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 |
consultation_id | varbinary | Unique identifier for the consultation | F422B34E0AC397B6A8C9D0E1F2345678 |
consultation_source_code_id | bigint | EMIS code ID representing the consultation purpose; used for categorisation | 1572871000006117 |
effective_datetime | timestamp(6) with time zone | Date and time when the consultation came into effect | 2023-05-12 14:30:15.000000 UTC |
has_consultation_sections | boolean | Indicates whether the consultation has linked sections in the consultation_section model | true |
is_complete | boolean | Indicates whether the consultation is complete | true |
location_code_id | bigint | EMIS code ID representing the type of location where the consultation took place | 1563411000006111 |
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 |
slot_id | varbinary | Unique identifier for the appointment slot linked to this consultation | F422B34E0AC397B6A8C9D0E1F2345678 |
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.consultationLIMIT 100;