Definition
The Patient data model provides a comprehensive, longitudinal record of an individual registered with healthcare organisations. It serves as the foundational dataset for patient-centric information, containing demographic details, registration status, and other key administrative data.
This model should be treated as the source of patient attributes that are stable across clinical event domains. It is designed to support direct patient analysis and to provide consistent patient filtering when joined to event models such as observations, consultations, medication, recall, allergy, and immunisation.
The Patient data model is a structured representation of all essential information related to an individual receiving healthcare services.
Information
Section titled “Information”This model contains one record per patient and organisation and includes the following information:
- Patient identifiers and linking fields (FKs)
- Personal information
- Registration organisation and GP fields
- Sociodemographic attributes
- Registration administrative information and dates
- Contact and access preference fields
- National data opt-out status
- Patient state calculated flags (active, registered, left, deceased)
- Confidentiality and sensitivity flags
- Data-sharing preference flags (local opt outs)
- Warehouse lineage fields for incremental processing
Patient Status Flags
Section titled “Patient Status Flags”The Patient model contains a set of derived status flags that represent a patient’s current registration, activity, and data-sharing status.
Registration and Patient Lifecycle Flags
Section titled “Registration and Patient Lifecycle Flags”The following flags describe a patient’s current relationship with an organisation:
- is_registered: Indicates that a patient has completed the full registration process and their healthcare record has been successfully registered with the organisation. In v2, this no longer includes pre-registered patients.
- is_active: Indicates that a patient is actively associated with the organisation and can engage with practice services. This includes both fully registered and pre-registered patients but excludes deceased patients.
- has_left: Indicates that a patient has left the organisation. Deceased patients are excluded from this status to ensure clear separation between patients who have left and patients who have died.
- is_merged: Indicates that the patient record has been merged into another patient record due to duplication and is no longer considered the active source record.
- has_died: Indicates that a patient is deceased.
Patient Filter Statuses
Section titled “Patient Filter Statuses”Whilst patient scope model (or patient filter) will determine which patients you should be able to see within the organisations in your DSA the patient model will retain a latest snapshot of all patients associated with those organisations and their corresponding status flags.
This was designed to replace Observation Opt-out model, available in IPCV V1, and consolidate the information in the patient model, making it a single source of truth for patient status and preferences.
Grain and Scope
Section titled “Grain and Scope”Each row is a unique patient record and each record is uniquely identified by either combining patient_id and organisation or the patient_uuid column.
The patient model is a current-state view for each patient and organisation pair, with change tracking fields available for incremental consumption. Only open organisations are processed in this model.
This model also includes the following key patient identifiers:
- patient_id: The unique internal identifier for the patient record within an organisation
- patient_uuid: The UUID derived from patient_id and organisation, providing a stable unique identifier.
- patient_guid: GUID for the patient record within an organisation.
- person_guid: Globally unique identifier for the patient across EMIS organisations.
- patient_number: GP facing patient number in the source system.
And the following healthcare services identifiers:
- nhs_number: National Health Service number.
- chi_number: Community Health Index number (Scotland).
- hc_number: Health and Care number (Northern Ireland).
- gha_number: Gibraltar Health Authority number
- ssd_number: Social Security Department number (Jersey)
- organisation: The unique EXA identifier for the healthcare organisation where the patient is registered.
The following fields are important for tracking data lineage and freshness:
- is_deleted: Indicates whether a patient record has been marked as deleted in the source system.
- is_sensitive: Indicates whether the record is flagged as sensitive.
- is_confidential: Indicates whether the record is confidential.
- transform_datetime: The timestamp indicating when the record was last processed and updated in the data model. This field is crucial for understanding the current state of the data.
Overview
Section titled “Overview”flowchart TB
subgraph container["Data Collection"]
n10["Patient Address"]
n11["Patient NDOP status"]
n12["Patient Registration Data"]
end
n17["Organisation 1"] --> n7
n17["Organisation 1"] --> n5
n18["Organisation 2"] --> n6
n18["Organisation 2"] --> n8
n18["Organisation 2"] --> n4
n7["Patient 123"] --> container
n5["Patient 98"] --> container
n6["Patient 456"] --> container
n4["Patient 20"] --> container
n8["Patient 47"] --> container
container --> n13["Gather Patient Data"]
n13 --> |"Unique Patient IDs"|n16["123, 98, 456, 20, 47"]
n16 --> n14["ETL"]
n14 --> n15["Patient Data Model"]
n7["Patient 123"]:::rect
n5["Patient 98"]:::rect
n6["Patient 456"]:::rect
n4["Patient 20"]:::rect
n8["Patient 47"]:::rect
n10:::rect
n11:::rect
n12:::rect
n13:::extract
n14:::event
n15:::database
n16:::rect
classDef rect rect
classDef extract circle
classDef event path
classDef database cylinder
Examples
Section titled “Examples”Currently active patients
SELECT emis_patient_id, registration_guid, patient_displayname, date_of_birth, registration_date, registration_end_date, has_carer, full_address, organisationFROM hive.explorer_ipcv_vanilla.patient_v2WHERE is_active;Patients opted out of national sharing
SELECT emis_patient_id, registration_guid, patient_displayname, date_of_birth, registration_date, registration_end_date, has_carer, full_address, organisationFROM hive.explorer_ipcv_vanilla.patient_v2WHERE NOT is_ndop;Patients in scope of the customer DSA
-- by joining to patient scopeSELECT p.emis_patient_id, p.registration_guid, p.patient_displayname, p.date_of_birth, p.registration_date, p.registration_end_date, p.has_carer, p.full_address, p.organisationFROM hive.explorer_ipcv_hestia.patient_v2 p JOIN hive.explorer_ipcv_hestia.patient_scope_v2 ps ON p.organisation = ps.organisation AND p.emis_patient_id = ps.emis_patient_id;
-- by excluding nulled recordsSELECT emis_patient_id, registration_guid, patient_displayname, date_of_birth, registration_date, registration_end_date, has_carer, full_address, organisationFROM hive.explorer_ipcv_hestia.patient_v2WHERE NOT registration_date IS NULL;