Schema
Schema Overview
Section titled “Schema Overview”| Column | Data Type | Description | Example |
|---|---|---|---|
is_deleted |
boolean | If this record should be considered soft deleted; all columns excluding primary keys will be NULL if TRUE | false |
code_id |
bigint | EMIS code ID - internal identifier | 2986010 |
consultation_id |
varbinary | Unique identifier for the linked consultation for this diary entry | F422B34E0AC397B6A8C9D0E1F2345678 |
consultation_section_id |
varbinary | Unique identifier for the linked consultation section for this diary entry | F422B34E0AC397B6A8C9D0E1F2345678 |
consultation_source_code_id |
bigint | EMIS code ID representing the consultation purpose; used for categorisation | 1572871000006117 |
diary_id |
varbinary | Unique identifier for the diary entry | F422B34E0AC397B6A8C9D0E1F2345678 |
duration_term |
varchar | Human-readable term describing the duration of the diary entry | 2 weeks |
effective_datetime |
timestamp(6) with time zone | Date and time when the consultation section came into effect | 2023-05-12 14:30:15.000000 UTC |
is_active |
boolean | Indicates whether the diary entry is currently active | true |
is_complete |
boolean | Indicates whether the diary entry is complete | false |
model_updated_datetime |
timestamp(6) with time zone | Date and time the model last updated this record | 2023-05-12 14:30:15.000000 UTC |
patient_id |
varbinary | Unique patient identifier | F422B34E0AC397B6A8C9D0E1F2345678 |
snomed_concept_id |
bigint | SNOMED CT concept identifier; may be NULL if no matching concept exists | 123456789 |
transform_datetime |
timestamp(6) with time zone | Date and time the data was made available in the model with a relevant change | 2023-05-12 14:30:15.000000 UTC |
Example Query
Section titled “Example Query”Use this query to preview recent rows and validate expected columns:
SELECT *FROM explorer_open_safely.diaryLIMIT 100;