Definition
The Consultation data model describes clinical encounters recorded in EMIS Web and made available for OpenSafely analysis. It captures the consultation’s identifiers, timing, provenance, completion status, and linkage to sections and appointment slots.
Constraints and Notes
Section titled “Constraints and Notes”- Primary key usage:
emis_consultation_idis part of a composite key with organisation in iPCV models and is not globally unique. - Patient identifier hashing:
emis_patient_idis a hashed identifier derived from patient ID + organisation.
Examples
Section titled “Examples”Filter incomplete consultations
Section titled “Filter incomplete consultations”Simple query to return consultations that are not complete:
SELECT emis_consultation_id, emis_patient_id, recorded_date, effective_date, completeFROM explorer_open_safely.consultationWHERE NOT complete;
