Definition
The Patient data model provides a comprehensive record of individuals registered with healthcare organizations. It serves as the foundational dataset for patient-centric information, containing demographic details, registration status, organisation context, and key administrative data such as data sharing opt-in flags. This model is essential for accurately identifying and managing patient information across various healthcare services and systems.
Constraints and Notes
Section titled “Constraints and Notes”Soft deletion: Whenis_deletedis true this means the patient record in the source database has been deleted, not that the patient status has changed. Data fields will be nullified in upstream transformations and should be excluded from most analytical queries. Primary keys are preserved so deleted records and their relationships can still be identified. Foreign keys to coding tables are nullified as the coded information is no longer valid.
Patient Registration Status
Section titled “Patient Registration Status”The patient model exposes registration timing and activity indicators for each
patient.
Registration and Activity Fields
Section titled “Registration and Activity Fields”| Field | Description |
|---|---|
registration_start_datetime | Registration start timestamp |
registration_end_datetime | Registration end timestamp where present |
is_active | Patient is currently on the active caseload |
has_died | Patient is deceased |
organisation_id | Organisation identifier associated with the patient row |
Patient Consent Fields
Section titled “Patient Consent Fields”The patient model exposes two boolean fields that reflect a patient’s data
sharing consent status.
is_consent_9nu0 — Type 1 Opt-Out
Section titled “is_consent_9nu0 — Type 1 Opt-Out”Indicates whether a patient has consented for GP data sharing (SNOMED code 93C1).
| Value | Meaning |
|---|---|
FALSE | Patient has a Type 1 opt-out — GP record should not be shared beyond direct care |
TRUE / NULL | Patient does not have a Type 1 opt-out |
is_national_data_opted_in — National Data Opt-Out
Section titled “is_national_data_opted_in — National Data Opt-Out”Indicates whether a patient has opted in to national data sharing (e.g. for research and planning purposes).
| Value | Meaning |
|---|---|
FALSE | Patient is opted out of national data sharing |
TRUE / NULL | Patient is opted in to national data sharing |
- Both fields treat
NULLthe same asTRUE— aNULLmeans no opt-out has been recorded, not that the status is unknown.
Filtering Examples
Section titled “Filtering Examples”-- Exclude patients with a Type 1 opt-outWHERE COALESCE(is_consent_9nu0, TRUE) = TRUE
-- Exclude patients opted out of national data sharingWHERE COALESCE(is_national_data_opted_in, TRUE) = TRUE
-- Exclude patients with either opt-outWHERE COALESCE(is_consent_9nu0, TRUE) = TRUE AND COALESCE(is_national_data_opted_in, TRUE) = TRUE