Skip to content
Partner Developer Portal

Schema

Column NameData TypeDescriptionExample
is_deletedbooleanIf this record should be considered soft deleted; all columns excluding primary keys will be NULL if TRUEfalse
ageintegerPatient age in years43
date_of_birthtimestamp(6)Patient date of birth, rounded to the first of the month2023-05-01 00:00:00.000000 UTC
date_of_deathtimestamp(6)Patient date of death2023-05-12 00:00:00.000000 UTC
ethnicity_code_idbigintEMIS code ID of ethnicity code3
has_carerbooleanIndicates whether the patient has a carertrue
has_diedbooleanIndicates if the patient has diedfalse
imd_rounded_2019doubleRounded Index of Multiple Deprivation score based on 2019 boundaries21100
imd_rounded_2025doubleRounded Index of Multiple Deprivation score based on 2025 boundaries18400
index_of_multiple_deprivation_decile_2019bigintIMD decile (1 = most deprived, 10 = least deprived) based on 2019 boundaries5
index_of_multiple_deprivation_decile_2025bigintIMD decile (1 = most deprived, 10 = least deprived) based on 2025 boundaries4
is_activebooleanIndicates if the patient record is activetrue
is_consent_9nu0booleanIndicates whether a patient has consented for data sharing; FALSE = Patient HAS a type 1 opt-out, TRUE/NULL = Patient DOES NOT have a type 1 opt-outtrue
is_national_data_opted_inbooleanIndicates if the patient opted in to national data sharing; FALSE = Patient is OPTED OUT, TRUE/NULL = Patient is OPTED INtrue
middle_level_super_output_area_code_2019varcharPatient middle super output area (MSOA) code based on 2019 boundariesE02000001
middle_level_super_output_area_code_2025varcharPatient middle super output area (MSOA) code based on 2025 boundariesE02006927
model_updated_datetimetimestamp(6)Date and time the model last updated this record2023-05-12 14:30:15.000000 UTC
nhs_numbervarbinaryPseudonymised National Health Service numberF422B34E0AC397B6A8C9D0E1F2345678
organisation_idvarbinaryPseudonymised organisation identifier associated with the patient row9A4FC1D2B7E893100B2A4E6D8C1F3A5E
patient_idvarbinaryUnique patient identifierF422B34E0AC397B6A8C9D0E1F2345678
preferred_language_code_idbigintEMIS code ID of preferred language code1
registration_end_datetimetimestamp(6)Date and time the patient registration ended with the practice2023-05-12 14:30:15.000000 UTC
registration_start_datetimetimestamp(6)Date and time the patient registered with the practice2023-05-12 14:30:15.000000 UTC
residential_institute_codevarcharProvides both current and legacy residential institute codesRI001
sexvarcharPatient sexMale
sexual_orientation_code_idbigintEMIS code ID of sexual orientation code2
transform_datetimetimestamp(6)Date and time the data was made available in the model with a relevant change2023-05-12 14:30:15.000000 UTC

Use this query to preview recent rows and validate expected columns:

SELECT *
FROM explorer_open_safely.patient
LIMIT 100;