Skip to content
Partner Developer Portal

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.

  • Soft deletion: When is_deleted is 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.

The patient model exposes registration timing and activity indicators for each patient.

FieldDescription
registration_start_datetimeRegistration start timestamp
registration_end_datetimeRegistration end timestamp where present
is_activePatient is currently on the active caseload
has_diedPatient is deceased
organisation_idOrganisation identifier associated with the patient row

The patient model exposes two boolean fields that reflect a patient’s data sharing consent status.

Indicates whether a patient has consented for GP data sharing (SNOMED code 93C1).

ValueMeaning
FALSEPatient has a Type 1 opt-out — GP record should not be shared beyond direct care
TRUE / NULLPatient 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).

ValueMeaning
FALSEPatient is opted out of national data sharing
TRUE / NULLPatient is opted in to national data sharing
  • Both fields treat NULL the same as TRUE — a NULL means no opt-out has been recorded, not that the status is unknown.
-- Exclude patients with a Type 1 opt-out
WHERE COALESCE(is_consent_9nu0, TRUE) = TRUE
-- Exclude patients opted out of national data sharing
WHERE COALESCE(is_national_data_opted_in, TRUE) = TRUE
-- Exclude patients with either opt-out
WHERE COALESCE(is_consent_9nu0, TRUE) = TRUE
AND COALESCE(is_national_data_opted_in, TRUE) = TRUE