Remote Subscriber Database (RSD) Schema (Compass 1): Difference between revisions
(Added encounter_additional & encounter_event tables) |
|||
(4 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 123: | 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 263: | 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 299: | 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 334: | 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 480: | 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 | |id | ||
Line 722: | Line 753: | ||
|} | |} | ||
== Table: | == Table: encounter_event == | ||
{| 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 864: | 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 | |||
| | |||
| | |||
|- | |- | ||
| | |date_registered_end | ||
| | |date | ||
| | |DEFAULT NULL | ||
| | | | ||
Line 900: | Line 959: | ||
|- | |- | ||
| | |usual_gp_practitioner_id | ||
|bigint(20) | |bigint(20) | ||
| | |DEFAULT NULL | ||
| | | | ||
|practitioner.id | |||
|- | |- | ||
| | |registration_status_id | ||
| | |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" | 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 | |NOT NULL | ||
| | | | ||
Line 954: | Line 1,026: | ||
|- | |- | ||
| | |ethnic_name | ||
| | |varchar(100) | ||
| | |DEFAULT NULL | ||
| | | | ||
| | | | ||
|- | |- | ||
| colspan="5" | KEY | | colspan="5" | PRIMARY KEY (ethnic_code) | ||
| | |} | ||
== Table: flag == | |||
PRIMARY KEY (organization_id,person_id,id) | |||
| | {| class="wikitable sortable mw-collapsible mw-collapsed" border="1" | ||
!Column name | |||
!Data type | |||
!Constraint | |||
!Comments | |||
!References | |||
|- | |- | ||
| | |id | ||
| | |bigint(20) | ||
|NOT NULL | |||
| | |||
| | | | ||
|- | |- | ||
| | |organization_id | ||
| | |bigint(20) | ||
|NOT NULL | |NOT NULL | ||
|Owning organisation (i.e. publisher) | |||
| | | | ||
|- | |- | ||
| | |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,015: | Line 1,096: | ||
|- | |- | ||
| | |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) | |||
| | |||
|- | |- | ||
| | |is_active | ||
| | |tinyint(1) | ||
|NOT NULL | |NOT NULL | ||
| | | | ||
Line 1,040: | Line 1,116: | ||
|- | |- | ||
| | |flag_text | ||
| | |text | ||
| | | | ||
| | |This is a warning set by the publisher regarding he patient | ||
| | | | ||
Line 1,049: | Line 1,125: | ||
|- | |- | ||
| | | colspan="5" | PRIMARY KEY (organization_id,person_id,id), | ||
| | |- | ||
| | |||
| colspan="5" | UNIQUE KEY flag_id (id), | |||
|- | |||
| | | colspan="5" | KEY fk_flag_patient_id_organization_id (patient_id,organization_id), | ||
|- | |||
| 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( | |varchar(9) | ||
| | |NOT NULL | ||
| | | | ||
|local.authority.code | |||
|- | |- | ||
| | |local_authority_name | ||
| | |varchar(255) | ||
|DEFAULT NULL | |DEFAULT NULL | ||
| | | | ||
Line 1,093: | Line 1,178: | ||
|- | |- | ||
| colspan="5" | PRIMARY KEY ( | | colspan="5" | PRIMARY KEY (local_authority_code) | ||
|} | |} | ||
== Table: | == Table: location == | ||
PRIMARY KEY ( | 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 | |||
|- | |- | ||
| | |||
| | |id | ||
|NOT NULL | |bigint(20) | ||
| | |NOT NULL | ||
| | |||
Line 1,123: | Line 1,203: | ||
|- | |- | ||
| | |name | ||
|varchar(255) | |varchar(255) | ||
|DEFAULT NULL | |DEFAULT NULL | ||
| | |The name of a location set by the publisher. E.g. ward, clinic, domiciliary | ||
| | | | ||
Line 1,134: | Line 1,212: | ||
|- | |- | ||
| | |type_code | ||
| | |varchar(50) | ||
|DEFAULT NULL | |DEFAULT NULL | ||
| | | | ||
| | | | ||
Line 1,152: | Line 1,223: | ||
|- | |- | ||
| | |type_desc | ||
| | |varchar(255) | ||
|DEFAULT NULL | |DEFAULT NULL | ||
| | | | ||
| | | | ||
Line 1,170: | Line 1,234: | ||
|- | |- | ||
| | |postcode | ||
| | |varchar(10) | ||
|DEFAULT NULL | |DEFAULT NULL | ||
| | | | ||
| | | | ||
Line 1,179: | Line 1,245: | ||
|- | |- | ||
| | |managing_organization_id | ||
| | |bigint(20) | ||
|DEFAULT NULL | |DEFAULT NULL | ||
| | | | ||
| | | | ||
Line 1,188: | Line 1,256: | ||
|- | |- | ||
| | | 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 | |||
| | |||
| | | | ||
Line 1,215: | Line 1,286: | ||
|- | |- | ||
| | |lsoa_name | ||
|varchar(255) | |||
|DEFAULT NULL | |||
| | |||
| | |||
|- | |||
|imd_score | |||
|decimal(53) | |decimal(53) | ||
|DEFAULT NULL | |DEFAULT NULL | ||
| | |Index of Multiple Deprivation (IMD) Score | ||
| | | | ||
Line 1,224: | Line 1,306: | ||
|- | |- | ||
| | |imd_rank | ||
|int(11) | |int(11) | ||
|DEFAULT NULL | |DEFAULT NULL | ||
| | |Index of Multiple Deprivation (IMD) Rank (where 1 is most deprived) | ||
| | | | ||
Line 1,233: | Line 1,315: | ||
|- | |- | ||
| | |imd_decile | ||
|int(11) | |int(11) | ||
|DEFAULT NULL | |DEFAULT NULL | ||
| | |Index of Multiple Deprivation (IMD) Decile (where 1 is most deprived 10% of LSOAs) | ||
| | | | ||
Line 1,242: | Line 1,324: | ||
|- | |- | ||
| | |income_score | ||
|decimal(53) | |decimal(53) | ||
|DEFAULT NULL | |DEFAULT NULL | ||
| | |Income Score (rate) | ||
| | | | ||
|- | |- | ||
| | |income_rank | ||
|int(11) | |int(11) | ||
|DEFAULT NULL | |DEFAULT NULL | ||
| | |Income Rank (where 1 is most deprived) | ||
| | | | ||
Line 1,259: | Line 1,342: | ||
|- | |- | ||
| | |income_decile | ||
|int(11) | |int(11) | ||
|DEFAULT NULL | |DEFAULT NULL | ||
| | |Income Decile (where 1 is most deprived 10% of LSOAs) | ||
| | | | ||
Line 1,268: | Line 1,351: | ||
|- | |- | ||
| | |employment_score | ||
|decimal(53) | |decimal(53) | ||
|DEFAULT NULL | |DEFAULT NULL | ||
| | |Employment Score (rate) | ||
| | | | ||
Line 1,277: | Line 1,360: | ||
|- | |- | ||
| | |employment_rank | ||
|int(11) | |int(11) | ||
|DEFAULT NULL | |DEFAULT NULL | ||
| | |Employment Rank (where 1 is most deprived) | ||
| | | | ||
Line 1,286: | Line 1,369: | ||
|- | |- | ||
| | |employment_decile | ||
|int(11) | |int(11) | ||
|DEFAULT NULL | |DEFAULT NULL | ||
| | |Employment Decile (where 1 is most deprived 10% of LSOAs) | ||
| | | | ||
Line 1,295: | Line 1,378: | ||
|- | |- | ||
| | |education_score | ||
|decimal(53) | |decimal(53) | ||
|DEFAULT NULL | |DEFAULT NULL | ||
| | |Education Skills and Training Score | ||
| | | | ||
Line 1,304: | Line 1,387: | ||
|- | |- | ||
|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,608: | 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,787: | 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,966: | 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,002: | 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,040: | 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,281: | 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,403: | 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,603: | 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,639: | 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,835: | 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,000: | 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,068: | 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,200: | 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,236: | 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,433: | 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,469: | 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,505: | 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,563: | 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,659: | 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,706: | 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,781: | 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 |
---|