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, and other 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 and they no longer meet the inclusion criteria or have moved practices. Patient entities will not be deleted in practice but it is theoretically possible so this column has been included. If a record is deleted 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 includes fields that reflect a patient’s registration
standing with a GP practice.
Registration Fields
Section titled “Registration Fields”| Field | Description |
|---|---|
is_active | Patient is currently on the active caseload |
is_registered | Patient is currently registered with the practice |
has_left | Patient has left the practice |
has_died | Patient is deceased |
How Registration is Determined
Section titled “How Registration is Determined”Registration status is derived from two attributes on the patient record: patient type and patient status.
- Regular patients are considered registered when their patient status falls within the active registration range.
- Non-regular patients (e.g. dummy or test records) are only considered registered when they match a specific non-regular registration status.
A patient is marked as registered (TRUE) if either condition is met; otherwise
FALSE.
- Only patients marked as regular (
is_regular = TRUE) and registered (is_registered = TRUE) are included inpatient. Non-regular and unregistered patients are excluded at the filter layer before data reaches this model. is_active,has_left, andhas_diedare surfaced as additional fields so consumers can further narrow to the population relevant to their use case.
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_93c1 — Type 1 Opt-Out
Section titled “is_consent_93c1 — 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_93c1, 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_93c1, TRUE) = TRUE AND COALESCE(is_national_data_opted_in, TRUE) = TRUE