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, 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.

  • 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 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.

The patient model includes fields that reflect a patient’s registration standing with a GP practice.

FieldDescription
is_activePatient is currently on the active caseload
is_registeredPatient is currently registered with the practice
has_leftPatient has left the practice
has_diedPatient is deceased

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 in patient. Non-regular and unregistered patients are excluded at the filter layer before data reaches this model.
  • is_active, has_left, and has_died are surfaced as additional fields so consumers can further narrow to the population relevant to their use case.

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_93c1, 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_93c1, TRUE) = TRUE
AND COALESCE(is_national_data_opted_in, TRUE) = TRUE