Remote Subscriber Database (RSD) Schema (Compass 1): Difference between revisions
(Added encounter_additional & encounter_event tables) |
|||
(9 intermediate revisions by one other user not shown) | |||
Line 3: | Line 3: | ||
PRIMARY KEY (organization_id,person_id,id) | PRIMARY KEY (organization_id,person_id,id) | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 118: | Line 118: | ||
|} | |} | ||
== Table: appointment == | == Table: appointment == | ||
Line 125: | Line 124: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 260: | Line 259: | ||
| colspan="5" | KEY appointment_patient_id (patient_id) | | colspan="5" | KEY appointment_patient_id (patient_id) | ||
|} | |} | ||
== Table: appointment_status == | == Table: appointment_status == | ||
Line 267: | Line 264: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 298: | Line 295: | ||
| colspan="5" | PRIMARY KEY (id) | | colspan="5" | PRIMARY KEY (id) | ||
|} | |} | ||
== Table: date_precision == | == Table: date_precision == | ||
Line 305: | Line 300: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 340: | Line 336: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 486: | Line 482: | ||
| colspan="5" | KEY encounter_snomed_concept_id (snomed_concept_id) | | colspan="5" | KEY encounter_snomed_concept_id (snomed_concept_id) | ||
|} | |} | ||
== Table: encounter_additional == | |||
{| class="wikitable sortable mw-collapsible mw-collapsed" | |||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |||
|id | |||
|bigint | |||
|NOT NULL | |||
|Same as the id column on the encounter table or encounter_event id column (sub encounters) | |||
| | |||
|- | |||
|property_id | |||
|varchar(255) | |||
|NOT NULL | |||
|IM reference (i.e. Admission method) | |||
| | |||
|- | |||
|value_id | |||
|varchar(255) | |||
|NOT NULL | |||
|IM reference (i.e. Emergency admission) | |||
| | |||
|- | |||
| colspan="5" |PRIMARY KEY (id, property_id) | |||
|} | |||
== Table: encounter_detail == | == Table: encounter_detail == | ||
PRIMARY KEY (organization_id,person_id,id) | PRIMARY KEY (organization_id,person_id,id) | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
|id | |||
|bigint(20) | |||
|NOT NULL | |||
|Same as the id column on the encounter table | |||
| | |||
|- | |- | ||
|organization_id | |||
|bigint(20) | |||
|NOT NULL | |||
|Owning organisation (i.e. publisher) | |||
|organization.id | |||
|- | |- | ||
|patient_id | |||
|bigint(20) | |||
|NOT NULL | |||
|The organisations record for this person’s registration. Patients may have multiple records across clinical systems and may have registered at an organisation multiple times | |||
|patient.id | |||
|- | |- | ||
|person_id | |||
|bigint(20) | |||
|NOT NULL | |||
|Unique individual across all organisations | |||
|person.id | |||
|- | |||
|- | |||
|practitioner_id | |||
|bigint(20) | |||
|DEFAULT NULL | |||
|The clinician the activity is recorded against | |||
|practitioner.id | |||
|- | |||
|episode_of_care_id | |||
|bigint(20) | |||
|DEFAULT NULL | |||
| | |||
| | |||
|- | |- | ||
|clinical_effective_date | |||
|date | |||
|DEFAULT NULL | |||
|The date the clinical code is recorded for | |||
| | |||
|- | |- | ||
|date_precision_id | |||
|smallint(6) | |||
|DEFAULT NULL | |||
|Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14) | |||
| | |||
| | |||
|- | |- | ||
|recording_practitioner_id | |||
|bigint(20) | |||
|DEFAULT NULL | |||
|Who recorded the encounter | |||
| | |||
|- | |- | ||
|recording_date | |||
|date | |||
|DEFAULT NULL | |||
| | |||
| | |||
|- | |- | ||
|appointment_id | |||
|bigint(20) | |||
|DEFAULT NULL | |||
|The unique reference for that appointment | |||
|appointment.id | |||
|- | |- | ||
|service_provider_organization_id | |||
|bigint(20) | |||
|DEFAULT NULL | |||
|Organisation that performed the encounter | |||
| | |||
|- | |- | ||
|location_id | |||
|bigint(20) | |||
|DEFAULT NULL | |||
|Where the encounter took place | |||
|location.id | |||
|- | |- | ||
|end_date | |||
|date | |||
|DEFAULT NULL | |||
| | |||
| | |||
|- | |- | ||
|duration_minutes | |||
|int(11) | |||
|DEFAULT NULL | |||
|Duration always in minutes | |||
| | |||
|- | |- | ||
|completion_status_concept_id | |||
|bigint(20) | |||
|DEFAULT NULL | |||
| | |||
| | |||
|- | |- | ||
|healthcare_service_type_concept_id | |||
|bigint(20) | |||
|DEFAULT NULL | |||
| | |||
| | |||
|- | |- | ||
|interaction_mode_concept_id | |||
|bigint(20) | |||
|DEFAULT NULL | |||
| | |||
| | |||
|- | |- | ||
|administrative_action_concept_id | |||
|bigint(20) | |||
|DEFAULT NULL | |||
| | |||
| | |||
|- | |- | ||
|purpose_concept_id | |||
|bigint(20) | |||
|DEFAULT NULL | |||
| | |||
| | |||
|- | |- | ||
|disposition_concept_id | |||
|bigint(20) | |||
|DEFAULT NULL | |||
| | |||
| | |||
|- | |- | ||
|site_of_care_type_concept_id | |||
|bigint(20) | |||
|DEFAULT NULL | |||
| | |||
| | |||
|- | |- | ||
|patient_status_concept_id | |||
|bigint(20) | |||
|DEFAULT NULL | |||
| | |||
| | |||
|- | |- | ||
| colspan="5" | PRIMARY KEY (organization_id,person_id,id), | |||
|- | |- | ||
| colspan="5" | UNIQUE KEY ix_encounter_detail_id (id), | |||
|- | |- | ||
| colspan="5" | KEY ix_encounter_detail_patient_id (patient_id), | |||
|- | |- | ||
| colspan="5" | KEY ix_encounter_detail_appointment_id (appointment_id), | |||
|- | |- | ||
| colspan="5" | KEY ix_encounter_detail_patient_id_organization_id (patient_id,organization_id) | |||
|} | |} | ||
== Table: encounter_event == | |||
== Table: | |||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
|id | |id | ||
|bigint(20) | |bigint(20) | ||
|NOT NULL | |NOT NULL | ||
| | | | ||
| | | | ||
|- | |- | ||
|organization_id | |organization_id | ||
|bigint(20) | |bigint(20) | ||
|NOT NULL | |NOT NULL | ||
|Owning organisation (i.e. publisher) | |Owning organisation (i.e. publisher) | ||
|organization.id | |organization.id | ||
|- | |- | ||
|patient_id | |patient_id | ||
|bigint(20) | |bigint(20) | ||
|NOT NULL | |NOT NULL | ||
|The organisations record for this person’s registration. Patients may have multiple records across clinical systems and may have registered at an organisation multiple times | |The organisations record for this person’s registration. Patients may have multiple records across clinical systems and may have registered at an organisation multiple times | ||
|patient.id | |patient.id | ||
|- | |- | ||
|person_id | |person_id | ||
|bigint(20) | |bigint(20) | ||
|NOT NULL | |NOT NULL | ||
|Unique individual across all organisations | |Unique individual across all organisations | ||
|person.id | |person.id | ||
|- | |- | ||
| | |encounter_id | ||
| | |bigint | ||
| | |NOT NULL | ||
| | | | ||
|registration.type.id | |registration.type.id | ||
|- | |- | ||
| | |practitioner_id | ||
| | |bigint | ||
|DEFAULT NULL | |DEFAULT NULL | ||
| | |The clinician the activity is recorded against | ||
|practitioner.id | |||
|- | |||
|appointment_id | |||
|bigint | |||
|DEFAULT NULL | |||
| | | | ||
|appointment.id | |||
|- | |- | ||
| | |clinical_effective_date | ||
| | |datetime | ||
|DEFAULT NULL | |DEFAULT NULL | ||
| | | | ||
| | | | ||
|- | |||
|date_precision_id | |||
|smallint | |||
|DEFAULT NULL | |||
|Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14) | |||
| | |||
|- | |- | ||
|snomed_concept_id | |||
| | |bigint | ||
|bigint | |DEFAULT NULL | ||
|DEFAULT NULL | | | ||
| | | | ||
|- | |- | ||
|original_code | |||
| | |varchar(100) binary | ||
| | |DEFAULT NULL | ||
|DEFAULT NULL | | | ||
| | | | ||
|- | |- | ||
|original_term | |||
| | |varchar(1000) | ||
|DEFAULT NULL | |||
| | |||
| | |||
|- | |- | ||
|episode_of_care_id | |||
| | |bigint | ||
|DEFAULT NULL | |||
| | |||
|episode.of.care.id | |||
|- | |- | ||
|service_provider_organization_id | |||
| | |bigint | ||
|DEFAULT NULL | |||
| | |||
| | |||
|- | |- | ||
|date_recorded | |||
| | |datetime | ||
|DEFAULT NULL | |||
| | |||
| | |||
|- | |- | ||
|location_id | |||
| | |bigint | ||
|DEFAULT NULL | |||
|Where the encounter took place | |||
|location.id | |||
|- | |- | ||
|finished | |||
| | |boolean | ||
|DEFAULT NULL | |||
| | |||
| | |||
|- | |- | ||
| colspan="5" | KEY | | colspan="5" | PRIMARY KEY (organization_id,person_id,id), | ||
|} | |} | ||
== Table: episode_of_care == | |||
0PRIMARY KEY (organization_id,person_id,id) | |||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
| | |id | ||
| | |bigint(20) | ||
|NOT NULL | |NOT NULL | ||
| | | | ||
Line 874: | Line 907: | ||
|- | |- | ||
| | |organization_id | ||
| | |bigint(20) | ||
| | |NOT NULL | ||
| | |Owning organisation (i.e. publisher) | ||
|organization.id | |||
| | |||
|- | |- | ||
| | |patient_id | ||
| | |bigint(20) | ||
|NOT NULL | |||
|The organisations record for this person’s registration. Patients may have multiple records across clinical systems and may have registered at an organisation multiple times | |||
|patient.id | |||
|- | |||
|person_id | |||
|bigint(20) | |||
|NOT NULL | |||
|Unique individual across all organisations | |||
|person.id | |||
|- | |||
|registration_type_id | |||
|smallint(6) | |||
|DEFAULT NULL | |||
| | |||
|registration.type.id | |||
|- | |- | ||
| | |date_registered | ||
| | |date | ||
| | |DEFAULT NULL | ||
| | | | ||
Line 912: | Line 948: | ||
|- | |- | ||
| | |date_registered_end | ||
| | |date | ||
| | |DEFAULT NULL | ||
| | | | ||
| | | | ||
Line 921: | Line 959: | ||
|- | |- | ||
| | |usual_gp_practitioner_id | ||
|bigint(20) | |bigint(20) | ||
|DEFAULT NULL | |||
|DEFAULT NULL | |||
| | | | ||
|practitioner.id | |||
|- | |- | ||
| | |registration_status_id | ||
|smallint(6) | |smallint(6) | ||
|DEFAULT NULL | |DEFAULT NULL | ||
| | | | ||
|registration.status | |||
|- | |- | ||
| | | colspan="5" | PRIMARY KEY (organization_id,person_id,id), | ||
| | |- | ||
| | |||
| colspan="5" | UNIQUE KEY episode_of_care_id (id), | |||
|- | |||
| | | colspan="5" | KEY episode_of_care_patient_id (patient_id), | ||
|- | |||
| colspan="5" | KEY episode_of_care_registration_type_id (registration_type_id), | |||
|- | |||
| colspan="5" | KEY episode_of_care_date_registered (date_registered), | |||
|- | |- | ||
| | | colspan="5" | KEY episode_of_care_date_registered_end (date_registered_end), | ||
|- | |||
| | |||
| | |||
| colspan="5" | KEY episode_of_care_person_id (person_id), | |||
|- | |||
| colspan="5" | KEY episode_of_care_organization_id (organization_id), | |||
|- | |- | ||
| colspan="5" | | | colspan="5" | KEY reg_type_id_patient_id_date_registered_date_registered_end (registration_type_id,patient_id,date_registered,date_registered_end) | ||
|} | |||
== Table: ethnicity_lookup == | |||
PRIMARY KEY (ethnic_code) | |||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | |||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
| | |ethnic_code | ||
| | |char(1) | ||
|NOT NULL | |||
| | |||
| | | | ||
|- | |- | ||
| | |ethnic_name | ||
| | |varchar(100) | ||
|DEFAULT NULL | |||
| | |||
| | |||
|- | |- | ||
| colspan="5" | PRIMARY KEY (ethnic_code) | |||
| colspan="5" | PRIMARY KEY ( | |||
|} | |} | ||
== Table: flag == | |||
PRIMARY KEY (organization_id,person_id,id) | |||
PRIMARY KEY (id) | |||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 1,056: | Line 1,062: | ||
|- | |- | ||
| | |organization_id | ||
| | |bigint(20) | ||
| | |NOT NULL | ||
| | |Owning organisation (i.e. publisher) | ||
| | | | ||
Line 1,065: | Line 1,071: | ||
|- | |- | ||
| | |patient_id | ||
| | |bigint(20) | ||
|NOT NULL | |||
|The organisations record for this person’s registration. Patients may have multiple records across clinical systems and may have registered at an organisation multiple times | |||
|patient.id | |||
|- | |||
|person_id | |||
|bigint(20) | |||
|NOT NULL | |||
|Unique individual across all organisations | |||
|person.id | |||
|- | |||
|effective_date | |||
|date | |||
|DEFAULT NULL | |DEFAULT NULL | ||
| | | | ||
Line 1,076: | Line 1,096: | ||
|- | |- | ||
| | |date_precision_id | ||
| | |smallint(6) | ||
|DEFAULT NULL | |DEFAULT NULL | ||
| | |Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14) | ||
| | | | ||
Line 1,087: | Line 1,105: | ||
|- | |- | ||
| | |is_active | ||
| | |tinyint(1) | ||
| | |NOT NULL | ||
| | | | ||
Line 1,098: | Line 1,116: | ||
|- | |- | ||
| | |flag_text | ||
| | |text | ||
| | | | ||
|This is a warning set by the publisher regarding he patient | |||
| | | | ||
| | |- | ||
| colspan="5" | PRIMARY KEY (organization_id,person_id,id), | |||
|- | |- | ||
| colspan="5" | | | colspan="5" | UNIQUE KEY flag_id (id), | ||
|- | |- | ||
| colspan="5" | | | colspan="5" | KEY fk_flag_patient_id_organization_id (patient_id,organization_id), | ||
|- | |- | ||
| colspan="5" | KEY | | colspan="5" | KEY fk_flag_date_precision (date_precision_id), | ||
| | |- | ||
| colspan="5" | KEY flag_patient_id (patient_id), | |||
|- | |||
| colspan="5" | CONSTRAINT fk_flag_date_precision FOREIGN KEY (date_precision_id) REFERENCES | |||
| | |||
|- | |- | ||
| colspan="5" | CONSTRAINT fk_flag_patient_id_organization_id FOREIGN KEY (patient_id, organization_id) REFERENCES patient (id, organization_id) | |||
|} | |||
== Table: local_authority_lookup == | |||
PRIMARY KEY (local_authority_code) | |||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | |||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
|local_authority_code | |||
|varchar(9) | |||
|NOT NULL | |||
| | |||
|local.authority.code | |||
|- | |||
|local_authority_name | |||
|varchar(255) | |||
|DEFAULT NULL | |||
| | |||
| | |||
|- | |- | ||
| colspan="5" | PRIMARY KEY (local_authority_code) | |||
|} | |||
== Table: location == | |||
PRIMARY KEY (id) | |||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | |||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
|id | |||
|bigint(20) | |||
|NOT NULL | |||
| | |||
| | | | ||
|- | |- | ||
|name | |||
|varchar(255) | |||
|DEFAULT NULL | |||
|The name of a location set by the publisher. E.g. ward, clinic, domiciliary | |||
| | |||
|- | |- | ||
|type_code | |||
|varchar(50) | |||
|DEFAULT NULL | |||
| | |||
| | | | ||
|- | |- | ||
|type_desc | |||
|varchar(255) | |||
|DEFAULT NULL | |||
| | |||
| | | | ||
|- | |- | ||
|postcode | |||
|varchar(10) | |||
|DEFAULT NULL | |||
| | |||
| | | | ||
|- | |- | ||
|managing_organization_id | |||
|bigint(20) | |||
|DEFAULT NULL | |||
| | |||
| | | | ||
|- | |- | ||
| colspan="5" | PRIMARY KEY (id), | |||
|- | |||
| colspan="5" | UNIQUE KEY location_id (id), | |||
|- | |- | ||
| colspan="5" | KEY fk_location_managing_organisation_id (managing_organization_id) | |||
|} | |||
== Table: Isoa_lookup == | |||
PRIMARY KEY (lsoa_code) | |||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | |||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
|lsoa_code | |||
|char(9) | |||
|NOT NULL | |||
| | |||
| | |||
|- | |- | ||
|lsoa_name | |||
|varchar(255) | |||
|DEFAULT NULL | |||
| | |||
| | | | ||
|- | |- | ||
|imd_score | |||
|decimal(53) | |||
|DEFAULT NULL | |||
|Index of Multiple Deprivation (IMD) Score | |||
| | |||
|- | |- | ||
|imd_rank | |||
|int(11) | |||
|DEFAULT NULL | |||
|Index of Multiple Deprivation (IMD) Rank (where 1 is most deprived) | |||
| | |||
|- | |- | ||
|imd_decile | |||
|int(11) | |||
|DEFAULT NULL | |||
|Index of Multiple Deprivation (IMD) Decile (where 1 is most deprived 10% of LSOAs) | |||
| | |||
|- | |- | ||
|income_score | |||
|decimal(53) | |||
|DEFAULT NULL | |||
|Income Score (rate) | |||
| | |||
|- | |- | ||
|income_rank | |||
|int(11) | |||
|DEFAULT NULL | |||
|Income Rank (where 1 is most deprived) | |||
| | |||
|- | |- | ||
|income_decile | |||
|int(11) | |||
|DEFAULT NULL | |||
|Income Decile (where 1 is most deprived 10% of LSOAs) | |||
| | |||
|- | |- | ||
|employment_score | |||
|decimal(53) | |||
|DEFAULT NULL | |||
|Employment Score (rate) | |||
| | |||
|- | |- | ||
|employment_rank | |||
|int(11) | |||
|DEFAULT NULL | |||
|Employment Rank (where 1 is most deprived) | |||
| | |||
|- | |- | ||
|employment_decile | |||
|int(11) | |||
|DEFAULT NULL | |||
|Employment Decile (where 1 is most deprived 10% of LSOAs) | |||
| | |||
|- | |- | ||
|education_score | |||
|decimal(53) | |||
|DEFAULT NULL | |||
|Education Skills and Training Score | |||
| | |||
|- | |- | ||
|education_rank | |||
|int(11) | |||
|DEFAULT NULL | |||
|Education Skills and Training Rank (where 1 is most deprived) | |||
| | |||
|- | |- | ||
|education_decile | |||
|int(11) | |||
|DEFAULT NULL | |||
|Education Skills and Training Decile (where 1 is most deprived 10% of LSOAs) | |||
| | |||
|- | |- | ||
|health_score | |||
|decimal(53) | |||
|DEFAULT NULL | |||
|Health Deprivation and Disability Score | |||
| | |||
|- | |- | ||
|health_rank | |||
|int(11) | |||
|DEFAULT NULL | |||
|Health Deprivation and Disability Rank (where 1 is most deprived) | |||
| | |||
|- | |- | ||
|health_decile | |||
|int(11) | |||
|DEFAULT NULL | |||
|Health Deprivation and Disability Decile (where 1 is most deprived 10% of LSOAs) | |||
| | |||
|- | |- | ||
|crime_score | |||
|decimal(53) | |||
|DEFAULT NULL | |||
|Crime Score | |||
| | |||
|- | |- | ||
|crime_rank | |||
|int(11) | |||
|DEFAULT NULL | |||
|Crime Rank (where 1 is most deprived) | |||
| | |||
|- | |- | ||
|crime_decile | |||
|int(11) | |||
|DEFAULT NULL | |||
|Crime Decile (where 1 is most deprived 10% of LSOAs) | |||
| | |||
|- | |- | ||
|housing_and_services_barriers_score | |||
|decimal(53) | |||
|DEFAULT NULL | |||
|Barriers to Housing and Services Score | |||
| | |||
|- | |- | ||
|housing_and_services_barriers_rank | |||
|int(11) | |||
|DEFAULT NULL | |||
|Barriers to Housing and Services Rank (where 1 is most deprived) | |||
| | |||
|- | |- | ||
|housing_and_services_barriers_decile | |||
|int(11) | |||
|DEFAULT NULL | |||
|Barriers to Housing and Services Decile (where 1 is most deprived 10% of LSOAs) | |||
| | |||
|- | |- | ||
|living_environment_score | |||
|decimal(53) | |||
|DEFAULT NULL | |||
|Living Environment Score | |||
| | |||
|- | |- | ||
|living_environment_rank | |||
|int(11) | |||
|DEFAULT NULL | |||
|Living Environment Rank (where 1 is most deprived) | |||
| | |||
|- | |- | ||
|living_environment_decile | |||
|int(11) | |||
|DEFAULT NULL | |||
|Living Environment Decile (where 1 is most deprived 10% of LSOAs) | |||
| | |||
|- | |- | ||
|idaci_score | |||
|decimal(53) | |||
|DEFAULT NULL | |||
|Income Deprivation Affecting Children Index (IDACI) Score (rate) | |||
| | |||
|- | |- | ||
|idaci_rank | |||
|int(11) | |||
|DEFAULT NULL | |||
|Income Deprivation Affecting Children Index (IDACI) Rank (where 1 is most deprived) | |||
| | |||
|- | |- | ||
|idaci_decile | |||
|int(11) | |||
|DEFAULT NULL | |||
|Income Deprivation Affecting Children Index (IDACI) Decile (where 1 is most deprived 10% of LSOAs) | |||
| | |||
|- | |- | ||
|idaopi_score | |||
|decimal(53) | |||
|DEFAULT NULL | |||
|Income Deprivation Affecting Older People (IDAOPI) Score (rate) | |||
| | |||
|- | |- | ||
|idaopi_rank | |||
|int(11) | |||
|DEFAULT NULL | |||
|Income Deprivation Affecting Older People (IDAOPI) Rank (where 1 is most deprived) | |||
| | |||
|- | |- | ||
|idaopi_decile | |||
|int(11) | |||
|DEFAULT NULL | |||
|Income Deprivation Affecting Older People (IDAOPI) Decile (where 1 is most deprived 10% of LSOAs) | |||
| | |||
|- | |- | ||
|children_and_young_sub_domain_score | |||
|decimal(53) | |||
|DEFAULT NULL | |||
|Children and Young People Sub-domain Score | |||
| | |||
|- | |- | ||
|children_and_young_sub_domain_rank | |||
|int(11) | |||
|DEFAULT NULL | |||
|Children and Young People Sub-domain Rank (where 1 is most deprived) | |||
| | |||
|- | |- | ||
|children_and_young_sub_domain_decile | |||
|int(11) | |||
|DEFAULT NULL | |||
|Children and Young People Sub-domain Decile (where 1 is most deprived 10% of LSOAs) | |||
| | |||
|- | |- | ||
|adult_skills_sub_somain_score | |||
|decimal(53) | |||
|DEFAULT NULL | |||
|Adult Skills Sub-domain Score | |||
| | |||
|- | |||
|adult_skills_sub_somain_rank | |||
|int(11) | |||
|DEFAULT NULL | |||
|Adult Skills Sub-domain Rank (where 1 is most deprived) | |||
| | |||
|- | |||
|adult_skills_sub_somain_decile | |||
|int(11) | |||
|DEFAULT NULL | |||
|Adult Skills Sub-domain Decile (where 1 is most deprived 10% of LSOAs) | |||
| | |||
|- | |||
|geographical_barriers_sub_domain_score | |||
|decimal(53) | |||
|DEFAULT NULL | |||
|Geographical Barriers Sub-domain Score | |||
| | |||
|- | |||
|geographical_barriers_sub_domain_rank | |||
|int(11) | |||
|DEFAULT NULL | |||
|Geographical Barriers Sub-domain Rank (where 1 is most deprived) | |||
| | |||
|- | |||
|geographical_barriers_sub_domain_decile | |||
|int(11) | |||
|DEFAULT NULL | |||
|Geographical Barriers Sub-domain Decile (where 1 is most deprived 10% of LSOAs) | |||
| | |||
|- | |||
|wider_barriers_sub_domain_score | |||
|decimal(53) | |||
|DEFAULT NULL | |||
|Wider Barriers Sub-domain Score | |||
| | |||
|- | |||
|wider_barriers_sub_domain_rank | |||
|int(11) | |||
|DEFAULT NULL | |||
|Wider Barriers Sub-domain Rank (where 1 is most deprived) | |||
| | |||
|- | |||
|wider_barriers_sub_domain_decile | |||
|int(11) | |||
|DEFAULT NULL | |||
|Wider Barriers Sub-domain Decile (where 1 is most deprived 10% of LSOAs) | |||
| | |||
|- | |||
|indoors_sub_domain_score | |||
|decimal(53) | |||
|DEFAULT NULL | |||
|Indoors Sub-domain Score | |||
| | |||
|- | |||
|indoors_sub_domain_rank | |||
|int(11) | |||
|DEFAULT NULL | |||
|Indoors Sub-domain Rank (where 1 is most deprived) | |||
| | |||
|- | |||
|indoors_sub_domain_decile | |||
|int(11) | |||
|DEFAULT NULL | |||
|Indoors Sub-domain Decile (where 1 is most deprived 10% of LSOAs) | |||
| | |||
|- | |||
|outdoors_sub_domain_score | |||
|decimal(53) | |||
|DEFAULT NULL | |||
|Outdoors Sub-domain Score | |||
| | |||
|- | |||
|outdoors_sub_domain_rank | |||
|int(11) | |||
|DEFAULT NULL | |||
|Outdoors Sub-domain Rank (where 1 is most deprived) | |||
| | |||
|- | |||
|outdoors_sub_domain_decile | |||
|int(11) | |||
|DEFAULT NULL | |||
|Outdoors Sub-domain Decile (where 1 is most deprived 10% of LSOAs) | |||
| | |||
|- | |||
|total_population | |||
|int(11) | |||
|DEFAULT NULL | |||
|Total population: mid 2012 (excluding prisoners) | |||
| | |||
|- | |||
|dependent_children_0_to_15 | |||
|int(11) | |||
|DEFAULT NULL | |||
|Dependent Children aged 0-15: mid 2012 (excluding prisoners) | |||
| | |||
|- | |||
|population_16_to_59 | |||
|int(11) | |||
|DEFAULT NULL | |||
|Population aged 16-59: mid 2012 (excluding prisoners) | |||
| | |||
|- | |||
|older_population_60_and_over | |||
|int(11) | |||
|DEFAULT NULL | |||
|Older population aged 60 and over: mid 2012 (excluding prisoners) | |||
| | |||
Line 1,627: | Line 1,771: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 1,801: | Line 1,945: | ||
| colspan="5" | KEY medication_order_dmd_id (dmd_id) | | colspan="5" | KEY medication_order_dmd_id (dmd_id) | ||
|} | |} | ||
== Table: medication_statement == | == Table: medication_statement == | ||
Line 1,808: | Line 1,950: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 1,987: | Line 2,129: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 2,018: | Line 2,160: | ||
| colspan="5" | PRIMARY KEY (id) | | colspan="5" | PRIMARY KEY (id) | ||
|} | |} | ||
== Table: msoa_lookup == | == Table: msoa_lookup == | ||
Line 2,025: | Line 2,165: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 2,058: | Line 2,198: | ||
| colspan="5" | PRIMARY KEY (msoa_code) | | colspan="5" | PRIMARY KEY (msoa_code) | ||
|} | |} | ||
== Table: observation == | == Table: observation == | ||
Line 2,065: | Line 2,203: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 2,301: | Line 2,439: | ||
| colspan="5" | KEY observation_original_code (original_code) | | colspan="5" | KEY observation_original_code (original_code) | ||
|} | |} | ||
== Table: organization == | == Table: organization == | ||
Line 2,308: | Line 2,444: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 2,425: | Line 2,561: | ||
| colspan="5" | KEY organization_id_parent_organization_id (id,parent_organization_id) | | colspan="5" | KEY organization_id_parent_organization_id (id,parent_organization_id) | ||
|} | |} | ||
== Table: patient == | == Table: patient == | ||
Line 2,432: | Line 2,566: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 2,632: | Line 2,766: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 2,663: | Line 2,797: | ||
| colspan="5" | PRIMARY KEY (id) | | colspan="5" | PRIMARY KEY (id) | ||
|} | |} | ||
== Table: patient_uprn == | == Table: patient_uprn == | ||
Line 2,670: | Line 2,802: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 2,866: | Line 2,998: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 3,026: | Line 3,158: | ||
| colspan="5" | UNIQUE KEY person_id (id) | | colspan="5" | UNIQUE KEY person_id (id) | ||
|} | |} | ||
== Table: practitioner == | == Table: practitioner == | ||
Line 3,033: | Line 3,163: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 3,096: | Line 3,226: | ||
| colspan="5" | UNIQUE KEY practitioner_id (id) | | colspan="5" | UNIQUE KEY practitioner_id (id) | ||
|} | |} | ||
== Table: procedure_request == | == Table: procedure_request == | ||
Line 3,103: | Line 3,231: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 3,230: | Line 3,358: | ||
| colspan="5" | KEY procedure_request_patient_id (patient_id) | | colspan="5" | KEY procedure_request_patient_id (patient_id) | ||
|} | |} | ||
== Table: procedure_request_status == | == Table: procedure_request_status == | ||
Line 3,237: | Line 3,363: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 3,268: | Line 3,394: | ||
| colspan="5" | PRIMARY KEY (id) | | colspan="5" | PRIMARY KEY (id) | ||
|} | |} | ||
== Table: referral_request == | == Table: referral_request == | ||
Line 3,275: | Line 3,399: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 3,467: | Line 3,591: | ||
| colspan="5" | KEY referral_request_snomed_concept_id (snomed_concept_id) | | colspan="5" | KEY referral_request_snomed_concept_id (snomed_concept_id) | ||
|} | |} | ||
== Table: referral_request_priority == | == Table: referral_request_priority == | ||
Line 3,474: | Line 3,596: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 3,505: | Line 3,627: | ||
| colspan="5" | PRIMARY KEY (id) | | colspan="5" | PRIMARY KEY (id) | ||
|} | |} | ||
== Table: referral_request_type == | == Table: referral_request_type == | ||
Line 3,512: | Line 3,632: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 3,543: | Line 3,663: | ||
| colspan="5" | PRIMARY KEY (id) | | colspan="5" | PRIMARY KEY (id) | ||
|} | |} | ||
== Table: registration_status == | == Table: registration_status == | ||
Line 3,550: | Line 3,668: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 3,603: | Line 3,721: | ||
| colspan="5" | PRIMARY KEY (id) | | colspan="5" | PRIMARY KEY (id) | ||
|} | |} | ||
== Table: registration_status_history == | == Table: registration_status_history == | ||
Line 3,610: | Line 3,726: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 3,701: | Line 3,817: | ||
| colspan="5" | ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='stores registration status history for GP registrations'; | | colspan="5" | ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='stores registration status history for GP registrations'; | ||
|} | |} | ||
== Table: registration_type == | == Table: registration_type == | ||
Line 3,708: | Line 3,822: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 3,750: | Line 3,864: | ||
| colspan="5" | PRIMARY KEY (id) | | colspan="5" | PRIMARY KEY (id) | ||
|} | |} | ||
== Table: schedule == | == Table: schedule == | ||
Line 3,757: | Line 3,869: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Line 3,827: | Line 3,939: | ||
| colspan="5" | UNIQUE KEY schedule_id (id) | | colspan="5" | UNIQUE KEY schedule_id (id) | ||
|} | |} | ||
== Table: ward_lookup == | == Table: ward_lookup == | ||
Line 3,834: | Line 3,944: | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
Latest revision as of 16:17, 16 September 2020
Table: allergy_intolerance
PRIMARY KEY (organization_id,person_id,id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: appointment
PRIMARY KEY (organization_id,person_id,id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: appointment_status
PRIMARY KEY (id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: date_precision
PRIMARY KEY (id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: encounter
PRIMARY KEY (organization_id,person_id,id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: encounter_additional
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: encounter_detail
PRIMARY KEY (organization_id,person_id,id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: encounter_event
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: episode_of_care
0PRIMARY KEY (organization_id,person_id,id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: ethnicity_lookup
PRIMARY KEY (ethnic_code)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: flag
PRIMARY KEY (organization_id,person_id,id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: local_authority_lookup
PRIMARY KEY (local_authority_code)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: location
PRIMARY KEY (id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: Isoa_lookup
PRIMARY KEY (lsoa_code)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|---|---|---|---|
PRIMARY KEY (lsoa_code) |
Table: medication_order
PRIMARY KEY (organization_id,person_id,id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: medication_statement
PRIMARY KEY (organization_id,person_id,id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: medication_statement_authorisation_type
PRIMARY KEY (id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: msoa_lookup
PRIMARY KEY (msoa_code)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: observation
PRIMARY KEY (organization_id,person_id,id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: organization
PRIMARY KEY (id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: patient
PRIMARY KEY (organization_id,person_id,id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: patient_gender
PRIMARY KEY (id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: patient_uprn
PRIMARY KEY (organization_id,person_id,id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: person
PRIMARY KEY (id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: practitioner
PRIMARY KEY (id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: procedure_request
PRIMARY KEY (organization_id,person_id,id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: procedure_request_status
PRIMARY KEY (id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: referral_request
PRIMARY KEY (organization_id,person_id,id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: referral_request_priority
PRIMARY KEY (organization_id,person_id,id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: referral_request_type
PRIMARY KEY (id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: registration_status
PRIMARY KEY (id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: registration_status_history
PRIMARY KEY (organization_id,person_id,id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: registration_type
PRIMARY KEY (id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: schedule
PRIMARY KEY (organization_id,id)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|
Table: ward_lookup
PRIMARY KEY (ward_code)
Column name | Data type | Constraint | Comments | ExpandReferences |
---|