Skip to content
Partner Developer Portal

Schema

Column NameData TypeDescriptionExample
is_deletedbooleanIf this record should be considered soft deleted; all columns excluding primary keys will be NULL if TRUEfalse
referral_observation_idvarbinaryUnique identifier for the referral observation recordF422B34E0AC397B6A8C9D0E1F2345678
transform_datetimetimestamp(6) with time zoneDate and time the data was made available in the model with a relevant change2023-05-12 14:30:15.000000 UTC
model_updated_datetimetimestamp(6) with time zoneDate and time the model last updated this record2023-05-12 14:30:15.000000 UTC
patient_idvarbinaryUnique patient identifierF422B34E0AC397B6A8C9D0E1F2345678
consultation_idvarbinaryUnique identifier for the linked consultation for this observation entryF422B34E0AC397B6A8C9D0E1F2345678
consultation_source_code_idbigintEMIS code ID representing the consultation purpose; used for categorisation1672871000006114
code_idbigintEMIS code ID - internal identifier348898019
effective_datetimetimestamp(6) with time zoneDate and time when the observation became clinically effective2023-05-12 14:30:15.000000 UTC
referral_made_datetimetimestamp(6) with time zoneDate that the referral was made2023-05-12 00:00:00.000000 UTC
ended_datetimetimestamp(6) with time zoneDate that the referral was ended, e.g. when the patient was seen or the referral was cancelled2023-05-12 00:00:00.000000 UTC
directionvarcharThe direction of the referral (in or out)in
urgencybigintThe urgency of the referral (0, 1, 2, 3, 4 or NULL)0
urgency_descriptionvarcharThe human readable description of the urgency (Routine, Soon, Urgent, Dated or 2 Week Wait)Routine
referral_mode_descriptionvarcharThe description for how the referral was made (e.g. Telephone, NHS e-Referral, Verbal, Written)Written
service_type_idbigintEMIS code ID representing the service type, e.g. 1775591000006112 - Referred to School Nursing Service1775301000006110

Use this query to preview recent rows and validate expected columns:

SELECT *
FROM explorer_open_safely.referral
LIMIT 100;