Skip to content
Partner Developer Portal byOptum

Schema

ColumnData TypeDescription
diary_idbigintComposite primary key when combined with organisation. Not unique across organisations.
organisationvarcharOrganisation identifier required for Ranger to apply DSA.
is_deletedbooleanSoft-delete flag; include in queries to exclude deleted records.
transform_datetimetimestamp(6) with time zoneDatetime when the data was made available in the model due to an entry or relevant change.
model_updated_datetimetimestamp(6) with time zoneTimestamp indicating when the model last updated this record.
patient_idbigintPatient identifier; only patients meeting the inclusion criteria (valid NHS number, regular patients at England GP practices) are included.
consultation_idbigintForeign key referencing the consultation model; links the diary entry back to the parent consultation.
consultation_section_idbigintForeign key referencing the consultation section model; links the diary entry to a specific section within the consultation.
code_idbigintCode identifier used to look up the clinical code in the codeable concept dimension.
snomed_concept_idbigintSNOMED CT concept ID resolved from code_id via the dim_codeable_concept_v1 dimension; may be NULL if no matching concept exists.
consultation_source_code_idbigintCode representing the source or purpose of the consultation associated with this diary entry.
availability_datetimetimestamp(6) with time zoneDate and time when the diary entry becomes available or is scheduled for.
effective_datetimetimestamp(6) with time zoneDate and time when the diary entry came into effect.
duration_termvarcharHuman-readable term describing the duration of the diary entry.
is_activebooleanIndicates whether the diary entry is currently active.
is_completebooleanIndicates whether the diary entry is complete.