CompassV2TestPages:v2.X: Difference between revisions
Jump to navigation
Jump to search
DavidHesketh (talk | contribs) No edit summary |
DavidHesketh (talk | contribs) No edit summary |
||
(11 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<h1 id="firstHeading" class="firstHeading" lang="en-GB">Remote Subscriber Database (RSD) Schema (Compass 2) Version: | <h1 id="firstHeading" class="firstHeading" lang="en-GB">Remote Subscriber Database (RSD) Schema (Compass 2) Version: v231321e3242432</h1> | ||
<div id="bodyContent" class="mw-body-content"> | <div id="bodyContent" class="mw-body-content"> | ||
<div id="siteSub" class="noprint">From Discovery Data Service</div> | <div id="siteSub" class="noprint">From Discovery Data Service</div> | ||
<div id="contentSub"></div> | <div id="contentSub"></div> | ||
< | <h1><span class="mw-headline" id="Sortable_tables">allergy_intolerance</span></h1> | ||
<table class=" | <table class="mw-collapsible" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 16: | Line 17: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the allergy'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 22: | Line 24: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>patient.organization_id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 28: | Line 31: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> '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'</td> | ||
<td>patient.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 34: | Line 38: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique individual across all organisations'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 40: | Line 45: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the encounter this allergy was record in'</td> | ||
<td>encounter.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 46: | Line 52: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The clinician the activity is recorded against'</td> | ||
<td>practitioner.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 52: | Line 59: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date the clinical code is recorded for'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 58: | Line 66: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 64: | Line 73: | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Is this instance of the code a review of a previous encounter'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 70: | Line 80: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the clinical coding of the allergy'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 76: | Line 87: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the clinical coding of the allergy'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 82: | Line 94: | ||
<td>decimal(5,2)</td> | <td>decimal(5,2)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The age the patient was at the time of this event'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 88: | Line 101: | ||
<td>datetime</td> | <td>datetime</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'The date the allergy was recorded'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Unique index name: `allergy_intolerance_id` Index Columns: (id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `fk_allergy_intolerance_encounter_id` Index Columns: (encounter_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `fk_allergy_intolerance_patient_id_organization_id` Index Columns: (patient_id,organization_id)</td> </tr> <tr> | ||
< | <td colspan="5">Index name: `fk_allergy_intolerance_practitioner_id` Index Columns: (practitioner_id)</td> </tr> <tr> | ||
<table class=" | <td colspan="5">Index name: `allergy_intolerance_patient_id` Index Columns: (patient_id)</td> </tr> <tr> | ||
<td colspan="5">Index name: `allergy_intolerance_core_concept_id` Index Columns: (core_concept_id)</td> </tr> <tr> | |||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`)</td> </tr> </table> | |||
<h1><span class="mw-headline" id="Sortable_tables">appointment</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 106: | Line 125: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the appointment'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 112: | Line 132: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>organization.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 118: | Line 139: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> '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'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 124: | Line 146: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique individual across all organisations'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 130: | Line 153: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The clinician the activity is recorded against'</td> | ||
<td>practitioner.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 136: | Line 160: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The schedule the patient was put on to book multiple appointments. ID unique to the applied schedule'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 142: | Line 167: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The start date of the appointment'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 148: | Line 174: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The time allocated for the appointment, not necessarily the actual duration always in minutes'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 154: | Line 181: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Time between sent in and left always in minutes'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 160: | Line 188: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The status of the appointment e.g. arrived/sent in/left/DNA'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 166: | Line 195: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'How long the patient waited from being marked as arrived to being sent in'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 172: | Line 202: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'How long the patient was delayed for'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 178: | Line 209: | ||
<td>datetime</td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Date and time the patient was sent into the practitioner'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 184: | Line 216: | ||
<td>datetime</td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Date and time the patient left the practitioner'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 190: | Line 223: | ||
<td>varchar(36)</td> | <td>varchar(36)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Unique reference to the source of the appointment'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 196: | Line 230: | ||
<td>datetime</td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date the appointment was cancelled'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Unique index name: `appointment_id` Index Columns: (id)</td> </tr> <tr> | ||
<td colspan="5">CONSTRAINT | <td colspan="5">Index name: `fk_appointment_practitioner_id` Index Columns: (practitioner_id)</td> </tr> <tr> | ||
< | <td colspan="5">Index name: `appointment_patient_id` Index Columns: (patient_id)</td> </tr> <tr> | ||
<table class=" | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`)</td> </tr> </table> | ||
<h1><span class="mw-headline" id="Sortable_tables">appointment_additional</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 213: | Line 251: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'same as the id column on the patient table '</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 219: | Line 258: | ||
<td>int</td> | <td>int</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'IM reference (e.g. appointment type)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 225: | Line 265: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'IM reference (e.g. appointment type)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 231: | Line 272: | ||
<td>json</td> | <td>json</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'where there is no mapped value_id, just raw JSON'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 237: | Line 279: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'where there is no mapped value_id or raw JSON, just a basic text value (i.e. GP Practitioner number)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `appointment_additional_value_id` Index Columns: (value_id)</td> </tr> <tr> | ||
<td colspan="5">CONSTRAINT | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`id`,`property_id`)</td> </tr> </table> | ||
< | <h1><span class="mw-headline" id="Sortable_tables">concept</span></h1> | ||
<table class=" | <table class="mw-collapsible" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 254: | Line 298: | ||
<td>int</td> | <td>int</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique concept int DB identifier'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>document</td> | ||
<td>int</td> | <td>int</td> | ||
<td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Document this concept originated from'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td>varchar(150)</td> | <td>varchar(150)</td> | ||
<td> | <td>CHARACTER SET</td> | ||
<td> | <td> 'Unique human-readable concept id'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>draft</td> | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td> | <td>DEFAULT NULL,</td> | ||
<td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>name</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Short name'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>description</td> | ||
<td>varchar(400)</td> | <td>varchar(400)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Full name (or term for ontological concepts)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>scheme</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The coding scheme for the code (Read, CTV3, SNOMED etc)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>code</td> | ||
<td>varchar(40)</td> | <td>varchar(40)</td> | ||
<td> | <td>CHARACTER SET</td> | ||
<td> | <td> 'The code (non-unique unless coupled with a scheme)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>use_count</td> | <td>use_count</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td> | <td>No Constraint</td> | ||
<td> | <td> 'Rough indicator of number of occurences of the concept'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 308: | Line 361: | ||
<td>datetime</td> | <td>datetime</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'The timestamp of the last update to the concept'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `ix_scheme_code` Index Columns: (scheme,code)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `ix_code` Index Columns: (code)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `ix_dbid_code` Index Columns: (dbid,code)</td> </tr> <tr> | ||
<td colspan="5">CONSTRAINT | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`dbid`)</td> </tr> </table> | ||
< | <h1><span class="mw-headline" id="Sortable_tables">concept_map</span></h1> | ||
<table class=" | <table class="mw-collapsible" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 327: | Line 382: | ||
<td>int</td> | <td>int</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'the legacy (read 2, ctv3, icd10, opcs4, emis local, etc) concept'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 333: | Line 389: | ||
<td>int</td> | <td>int</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'the core (snomed, discovery) concept that the legacy concept maps to'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 339: | Line 396: | ||
<td>datetime</td> | <td>datetime</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Timestamp the map was last updated/added'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 345: | Line 403: | ||
<td>int</td> | <td>int</td> | ||
<td>NOT NULL,</td> | <td>NOT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 351: | Line 410: | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | |||
<tr> | |||
<td colspan="5">Unique index name: `concept_map_uq` Index Columns: (legacy,deleted,updated)</td> </tr> <tr> | |||
<td colspan="5">Index name: `ix_legacy_core` Index Columns: (legacy,core)</td> </tr> <tr> | |||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) (`id`)</td> </tr> </table> | |||
<h1><span class="mw-headline" id="Sortable_tables">database_version</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | |||
<th scope="col">Column Name</th> | |||
<th scope="col">Data Type</th> | |||
<th scope="col">Constraint</th> | |||
<th scope="col">Comment</th> | |||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | |||
<tr> | |||
<td>version</td> | |||
<td>varchar(255)</td> | |||
<td>NOT NULL</td> | |||
<td> 'version of the database'</td> | |||
<td>No Foreign Key reference</td> | |||
</tr> | |||
<tr> | |||
<td>valid_from</td> | |||
<td>date</td> | |||
<td>NOT NULL</td> | |||
<td> 'date that the version was updated'</td> | |||
<td>No Foreign Key reference</td> | |||
</tr> | |||
<tr> | |||
<td>valid_to</td> | |||
<td>date</td> | |||
<td>DEFAULT NULL</td> | |||
<td> 'date that the version was made outdated'</td> | |||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Unique index name: `valid_to_uq` Index Columns: (valid_to)</td> </tr> <tr> | ||
<td colspan="5">CONSTRAINT | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`valid_from`)</td> </tr> </table> | ||
< | <h1><span class="mw-headline" id="Sortable_tables">diagnostic_order</span></h1> | ||
<table class=" | <table class="mw-collapsible" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 368: | Line 463: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the diagnostic order'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 374: | Line 470: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>patient.organization_id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 380: | Line 477: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> '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'</td> | ||
<td>patient.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 386: | Line 484: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique individual across all organisations'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 392: | Line 491: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the encounter the observation was recorded at'</td> | ||
<td>encounter.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 398: | Line 498: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The clinician the activity is recorded against'</td> | ||
<td>practitioner.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>clinical_effective_date</td> | <td>clinical_effective_date</td> | ||
<td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date the diagnostic order was identified by a clinician'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 410: | Line 512: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 416: | Line 519: | ||
<td>double</td> | <td>double</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The value of the result of the observation'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 422: | Line 526: | ||
<td>varchar(50)</td> | <td>varchar(50)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The units of the result of the observation'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 428: | Line 533: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date of the result'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>result_text</td> | <td>result_text</td> | ||
<td>text</td> | <td>text</td> | ||
<td> | <td>No Constraint</td> | ||
<td> text associated with the result'</td> | <td> 'Any text associated with the result'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 440: | Line 547: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the clinical coding of the result'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 446: | Line 554: | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Whether the observation is marked as a problem'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 452: | Line 561: | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Whether the observation is a review of an existing problem'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 458: | Line 568: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The end date of the problem'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 464: | Line 575: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the parent observation in a complex observation eg systolic and diastolic blood pressures will have a parent observation of Blood pressure'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 470: | Line 582: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the clinical coding of the observation'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 476: | Line 589: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the clinical coding of the observation'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 482: | Line 596: | ||
<td>decimal(5,2)</td> | <td>decimal(5,2)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The age of the patient at the time of the observation'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 488: | Line 603: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the episodicity of the problem eg First, review, flare'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 494: | Line 610: | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Whether the diagnostic order is a primary order'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 500: | Line 617: | ||
<td>datetime</td> | <td>datetime</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Unique index name: `diagnostic_order_id` Index Columns: (id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `fk_diagnostic_order_encounter_id` Index Columns: (encounter_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `fk_diagnostic_order_patient_id_organization_id` Index Columns: (patient_id,organization_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `fk_diagnostic_order_practitioner_id` Index Columns: (practitioner_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `diagnostic_order_patient_id` Index Columns: (patient_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `diagnostic_order_core_concept_id` Index Columns: (core_concept_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `diagnostic_order_core_concept_id_is_problem` Index Columns: (core_concept_id,is_problem)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `diagnostic_order_core_concept_id_result_value` Index Columns: (core_concept_id,result_value)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `diagnostic_order_non_core_concept_id` Index Columns: (non_core_concept_id)</td> </tr> <tr> | ||
< | <td colspan="5">Index name: `ix_diagnostic_order_organization_id` Index Columns: (organization_id)</td> </tr> <tr> | ||
<table class=" | <td colspan="5">Index name: `ix_diagnostic_order_clinical_effective_date` Index Columns: (clinical_effective_date)</td> </tr> <tr> | ||
<td colspan="5">Index name: `ix_diagnostic_order_person_id` Index Columns: (person_id)</td> </tr> <tr> | |||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`)</td> </tr> </table> | |||
<h1><span class="mw-headline" id="Sortable_tables">encounter</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 524: | Line 647: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the encounter'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 530: | Line 654: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>patient.organization_id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 536: | Line 661: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> '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'</td> | ||
<td>patient.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 542: | Line 668: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique individual across all organisations'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 548: | Line 675: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The clinician the activity is recorded against'</td> | ||
<td>practitioner.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 554: | Line 682: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the appointment this encounter took part on'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 560: | Line 689: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date the clinical code is recorded for'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 566: | Line 696: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the precision of the date of the encounter'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 572: | Line 703: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Is this instance of the code a review of a previous encounter'</td> | ||
<td>episode_of_care.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 578: | Line 710: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the service provider organisation'</td> | ||
<td>organization.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 584: | Line 717: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the type of encounter'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 590: | Line 724: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the type of encounter'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 596: | Line 731: | ||
<td>decimal(5,2)</td> | <td>decimal(5,2)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The age the patient was when this encounter took place'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>type</td> | ||
<td>text</td> | <td>text</td> | ||
<td> | <td>No Constraint</td> | ||
<td></td> | <td> 'Unused'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>sub_type</td> | <td>sub_type</td> | ||
<td>text</td> | <td>text</td> | ||
<td> | <td>No Constraint</td> | ||
<td></td> | <td> 'Unused'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 614: | Line 752: | ||
<td>varchar(40)</td> | <td>varchar(40)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The admission method of the encounter'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 620: | Line 759: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The end date of the encounter'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>institution_location_id</td> | <td>institution_location_id</td> | ||
<td>text</td> | <td>text</td> | ||
<td> | <td>No Constraint</td> | ||
<td> to the institution the encounter took place at'</td> | <td> 'Reference to the institution the encounter took place at'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 632: | Line 773: | ||
<td>datetime</td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date the encounter was recorded'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Unique index name: `encounter_id` Index Columns: (id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `fk_encounter_practitioner_id` Index Columns: (practitioner_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `fk_encounter_episode_of_care_id` Index Columns: (episode_of_care_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `fk_encounter_service_provider_organization_id` Index Columns: (service_provider_organization_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `encounter_patient_id` Index Columns: (patient_id)</td> </tr> <tr> | ||
< | <td colspan="5">Index name: `fki_encounter_appointment_id` Index Columns: (appointment_id)</td> </tr> <tr> | ||
<table class=" | <td colspan="5">Index name: `fki_encounter_patient_id_organization_id` Index Columns: (patient_id,organization_id)</td> </tr> <tr> | ||
<td colspan="5">Index name: `encounter_core_concept_id_clinical_effective_date` Index Columns: (core_concept_id,clinical_effective_date)</td> </tr> <tr> | |||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`)</td> </tr> </table> | |||
<h1><span class="mw-headline" id="Sortable_tables">encounter_additional</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 652: | Line 799: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'same as the id column on the encounter table'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 658: | Line 806: | ||
<td>int</td> | <td>int</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'IM concept id reference (i.e. Admission method)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 664: | Line 813: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'IM concept id reference (i.e. Emergency admission)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 670: | Line 820: | ||
<td>json</td> | <td>json</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'where there is no mapped value_id, just raw JSON (i.e. birth delivery details)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 676: | Line 827: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'where there is no mapped value_id, or raw JSON, just a basic text value (i.e. FIN number)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `encounter_additional_value_id` Index Columns: (value_id)</td> </tr> <tr> | ||
<td colspan="5">CONSTRAINT | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`id`,`property_id`)</td> </tr> </table> | ||
< | <h1><span class="mw-headline" id="Sortable_tables">encounter_event</span></h1> | ||
<table class=" | <table class="mw-collapsible" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 693: | Line 846: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the encounter event'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 699: | Line 853: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>patient.organization_id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 705: | Line 860: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'The patient this event belongs to'</td> | ||
<td>patient.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 711: | Line 867: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'The person this event belongs to'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 717: | Line 874: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Reference to the parent encounter record'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 723: | Line 881: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The clinician the activity is recorded against'</td> | ||
<td>practitioner.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 729: | Line 888: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the appointment this encounter took part on'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 735: | Line 895: | ||
<td>datetime</td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date the encounter took place'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 741: | Line 902: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the precision of the date of the encounter'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 747: | Line 909: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the episode of care this encounter belongs to'</td> | ||
<td>episode_of_care.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 753: | Line 916: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the service provider organisation'</td> | ||
<td>organization.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 759: | Line 923: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the type of encounter'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 765: | Line 930: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the type of encounter'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 771: | Line 937: | ||
<td>decimal(5,2)</td> | <td>decimal(5,2)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The age of the patient at the time of the encounter'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>type</td> | <td>type</td> | ||
<td>text</td> | <td>text</td> | ||
<td> | <td>No Constraint</td> | ||
<td></td> | <td> 'Unused'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>sub_type</td> | <td>sub_type</td> | ||
<td>text</td> | <td>text</td> | ||
<td> | <td>No Constraint</td> | ||
<td></td> | <td> 'Unused'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 789: | Line 958: | ||
<td>varchar(40)</td> | <td>varchar(40)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The admission method of the encounter'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 795: | Line 965: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The end date of the encounter'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 801: | Line 972: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the institution the encounter took place at'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 807: | Line 979: | ||
<td>datetime</td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date the encounter was recorded'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 813: | Line 986: | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Whether the encounter is finished'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`) | <td colspan="5">Unique index name: `encounter_event_id` Index Columns: (id)</td> </tr> <tr> | ||
< | <td colspan="5">Index name: `fk_encounter_event_patient_id_organization_id` Index Columns: (patient_id,organization_id)</td> </tr> <tr> | ||
<table class=" | <td colspan="5">Index name: `fk_encounter_event_practitioner_id` Index Columns: (practitioner_id)</td> </tr> <tr> | ||
<td colspan="5">Index name: `fk_encounter_event_episode_of_care_id` Index Columns: (episode_of_care_id)</td> </tr> <tr> | |||
<td colspan="5">Index name: `fk_encounter_event_service_provider_organization_id` Index Columns: (service_provider_organization_id)</td> </tr> <tr> | |||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`)</td> </tr> </table> | |||
<h1><span class="mw-headline" id="Sortable_tables">episode_of_care</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 829: | Line 1,009: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the episode of care'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 835: | Line 1,016: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>patient.organization_id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 841: | Line 1,023: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> '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'</td> | ||
<td>patient.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 847: | Line 1,030: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique individual across all organisations'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 853: | Line 1,037: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the registration type of the patient'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 859: | Line 1,044: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the registration status of the patient'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 865: | Line 1,051: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date the registration was started for this episode of care'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 871: | Line 1,058: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date the registration was ended for this episode of care'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 877: | Line 1,065: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the usual GP for this episode of care'</td> | ||
<td>practitioner.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Unique index name: `episode_of_care_id` Index Columns: (id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `fk_episode_of_care_patient_id_organisation_id` Index Columns: (patient_id,organization_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `fk_episode_of_care_practitioner_id` Index Columns: (usual_gp_practitioner_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `episode_of_care_patient_id` Index Columns: (patient_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `episode_of_care_registration_type_concept_id` Index Columns: (registration_type_concept_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `episode_of_care_date_registered` Index Columns: (date_registered)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `episode_of_care_date_registered_end` Index Columns: (date_registered_end)</td> </tr> <tr> | ||
< | <td colspan="5">Index name: `episode_of_care_person_id` Index Columns: (person_id)</td> </tr> <tr> | ||
<table class=" | <td colspan="5">Index name: `episode_of_care_organization_id` Index Columns: (organization_id)</td> </tr> <tr> | ||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`)</td> </tr> </table> | |||
<h1><span class="mw-headline" id="Sortable_tables">event_log</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 899: | Line 1,092: | ||
<td>datetime(3)</td> | <td>datetime(3)</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'date time the change was made to this DB'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 905: | Line 1,099: | ||
<td>tinyint</td> | <td>tinyint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'type of transaction 0=insert, 1=update, 2=delete'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 911: | Line 1,106: | ||
<td>tinyint</td> | <td>tinyint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'identifier of the table changed'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 917: | Line 1,113: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'id of the record changed'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
</table> | </table> | ||
< | <h1><span class="mw-headline" id="Sortable_tables">flag</span></h1> | ||
<table class=" | <table class="mw-collapsible" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 932: | Line 1,130: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the flag'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 938: | Line 1,137: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>patient.organization_id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 944: | Line 1,144: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> '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'</td> | ||
<td>patient.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 950: | Line 1,151: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique individual across all organisations'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>effective_date</td> | <td>effective_date</td> | ||
<td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date the flag was entered onto the patients record'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 962: | Line 1,165: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 968: | Line 1,172: | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Whether the flag is active or not'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>flag_text</td> | <td>flag_text</td> | ||
<td>text</td> | <td>text</td> | ||
<td> | <td>No Constraint</td> | ||
<td> is a warning set by the publisher regarding he patient'</td> | <td> 'This is a warning set by the publisher regarding he patient'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Unique index name: `flag_id` Index Columns: (id)</td> </tr> <tr> | ||
<td colspan="5">CONSTRAINT | <td colspan="5">Index name: `fk_flag_patient_id_organization_id` Index Columns: (patient_id,organization_id)</td> </tr> <tr> | ||
< | <td colspan="5">Index name: `flag_patient_id` Index Columns: (patient_id)</td> </tr> <tr> | ||
<table class=" | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`)</td> </tr> </table> | ||
<h1><span class="mw-headline" id="Sortable_tables">location</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 991: | Line 1,200: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the location'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 997: | Line 1,207: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The name of a location set by the publisher. E.g. ward, clinic, domiciliary'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,003: | Line 1,214: | ||
<td>varchar(50)</td> | <td>varchar(50)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The type of location'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,009: | Line 1,221: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Textual description of the type of location eg GP Practice'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,015: | Line 1,228: | ||
<td>varchar(10)</td> | <td>varchar(10)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The postcode of the location'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,021: | Line 1,235: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the managing organisation of the location'</td> | ||
<td>organization.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Unique index name: `location_id` Index Columns: (id)</td> </tr> <tr> | ||
<td colspan="5">CONSTRAINT | <td colspan="5">Index name: `fk_location_managing_organisation_id` Index Columns: (managing_organization_id)</td> </tr> <tr> | ||
< | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`id`)</td> </tr> </table> | ||
<table class=" | <h1><span class="mw-headline" id="Sortable_tables">medication_order</span></h1> | ||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,038: | Line 1,255: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the medication order'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,044: | Line 1,262: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>patient.organization_id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,050: | Line 1,269: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> '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'</td> | ||
<td>patient.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,056: | Line 1,276: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique individual across all organisations'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,062: | Line 1,283: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the encounter the medication order was issued in'</td> | ||
<td>encounter.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,068: | Line 1,290: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The clinician the activity is recorded against'</td> | ||
<td>practitioner.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,074: | Line 1,297: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date the medication order was issued'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,080: | Line 1,304: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,086: | Line 1,311: | ||
<td>varchar(1000)</td> | <td>varchar(1000)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Textual description of the dose'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,092: | Line 1,318: | ||
<td>double</td> | <td>double</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The value of the medication that was prescribed eg 50'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,098: | Line 1,325: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The unit of the medication that was prescribed eg tablets'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,104: | Line 1,332: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'How many days the medication is prescribed for'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,110: | Line 1,339: | ||
<td>double</td> | <td>double</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The estimated cost of the medication'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,116: | Line 1,346: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the medication statement. A medication statement can have many medication orders'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,122: | Line 1,353: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the clinical coding of the medication'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,128: | Line 1,360: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the clinical coding of the medication'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,134: | Line 1,367: | ||
<td>varchar(6)</td> | <td>varchar(6)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'A reference to the drug in the BNF dictionary'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,140: | Line 1,374: | ||
<td>decimal(5,2)</td> | <td>decimal(5,2)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The age the patient was at the time of this event'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>issue_method</td> | <td>issue_method</td> | ||
<td>text</td> | <td>text</td> | ||
<td> | <td>No Constraint</td> | ||
<td> issue method of the medication eg hand written'</td> | <td> 'The issue method of the medication eg hand written'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td>date_recorded</td> | ||
<td colspan="5"> | <td>datetime</td> | ||
<td colspan="5"> | <td>DEFAULT NULL,</td> | ||
< | <td>No comment yet added</td> | ||
<table class=" | <td>No Foreign Key reference</td> | ||
</tr> | |||
<tr> | |||
<td colspan="5">Unique index name: `medication_order_id` Index Columns: (id)</td> </tr> <tr> | |||
<td colspan="5">Index name: `fk_medication_order_encounter_id` Index Columns: (encounter_id)</td> </tr> <tr> | |||
<td colspan="5">Index name: `fk_medication_order_patient_id_organization_id` Index Columns: (patient_id,organization_id)</td> </tr> <tr> | |||
<td colspan="5">Index name: `fk_medication_order_practitioner_id` Index Columns: (practitioner_id)</td> </tr> <tr> | |||
<td colspan="5">Index name: `medication_order_patient_id` Index Columns: (patient_id)</td> </tr> <tr> | |||
<td colspan="5">Index name: `medication_order_core_concept_id` Index Columns: (core_concept_id)</td> </tr> <tr> | |||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`)</td> </tr> </table> | |||
<h1><span class="mw-headline" id="Sortable_tables">medication_statement</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,164: | Line 1,412: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the medication'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,170: | Line 1,419: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>patient.organization_id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,176: | Line 1,426: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> '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'</td> | ||
<td>patient.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,182: | Line 1,433: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique individual across all organisations'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,188: | Line 1,440: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the encounter this medication was recorded in'</td> | ||
<td>encounter.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,194: | Line 1,447: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The clinician the activity is recorded against'</td> | ||
<td>practitioner.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,200: | Line 1,454: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date the medication was clinical relevant'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,206: | Line 1,461: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,212: | Line 1,468: | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Whether the medication is active or not'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,218: | Line 1,475: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date the medication was cancelled'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,224: | Line 1,482: | ||
<td>varchar(1000)</td> | <td>varchar(1000)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Texual description of the dose of the medication'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,230: | Line 1,489: | ||
<td>double</td> | <td>double</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The value of the medication that was prescribed eg 50'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,236: | Line 1,496: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The unit of the medication that was prescribed eg tablets'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,242: | Line 1,503: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the authorisation type'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,248: | Line 1,510: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the clinical coding of the medication'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,254: | Line 1,517: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the clinical coding of the medication'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,260: | Line 1,524: | ||
<td>varchar(6)</td> | <td>varchar(6)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'A reference to the drug in the BNF dictionary'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,266: | Line 1,531: | ||
<td>decimal(5,2)</td> | <td>decimal(5,2)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The age the patient was at the time of this event'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>issue_method</td> | ||
<td>text</td> | <td>text</td> | ||
<td> | <td>No Constraint</td> | ||
<td> issue method of the medication eg hand written'</td> | <td> 'The issue method of the medication eg hand written'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,278: | Line 1,545: | ||
<td>datetime</td> | <td>datetime</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Unique index name: `medication_statement_id` Index Columns: (id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `fk_medication_statement_encounter_id` Index Columns: (encounter_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `fk_medication_statement_patient_id_organization_id` Index Columns: (patient_id,organization_id)</td> </tr> <tr> | ||
< | <td colspan="5">Index name: `fk_medication_statement_practitioner_id` Index Columns: (practitioner_id)</td> </tr> <tr> | ||
<table class=" | <td colspan="5">Index name: `medication_statement_patient_id` Index Columns: (patient_id)</td> </tr> <tr> | ||
<td colspan="5">Index name: `medication_statement_dmd_id` Index Columns: (patient_id)</td> </tr> <tr> | |||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`)</td> </tr> </table> | |||
<h1><span class="mw-headline" id="Sortable_tables">observation</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,296: | Line 1,569: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the observation'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,302: | Line 1,576: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>patient.organization_id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,308: | Line 1,583: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> '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'</td> | ||
<td>patient.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,314: | Line 1,590: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique individual across all organisations'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,320: | Line 1,597: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the encounter the observation was recorded at'</td> | ||
<td>encounter.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,326: | Line 1,604: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The clinician the activity is recorded against'</td> | ||
<td>practitioner.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,332: | Line 1,611: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date the observation was identified by a clinician'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,338: | Line 1,618: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,344: | Line 1,625: | ||
<td>double</td> | <td>double</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The value of the result of the observation'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,350: | Line 1,632: | ||
<td>varchar(50)</td> | <td>varchar(50)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The units of the result of the observation'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,356: | Line 1,639: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date of the result'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>result_text</td> | <td>result_text</td> | ||
<td>text</td> | <td>text</td> | ||
<td> | <td>No Constraint</td> | ||
<td> text associated with the result'</td> | <td> 'Any text associated with the result'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,368: | Line 1,653: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the clinical coding of the result'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,374: | Line 1,660: | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Whether the observation is marked as a problem'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,380: | Line 1,667: | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Whether the observation is a review of an existing problem'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,386: | Line 1,674: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The end date of the problem'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,392: | Line 1,681: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the parent observation in a complex observation eg systolic and diastolic blood pressures will have a parent observation of Blood pressure'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,398: | Line 1,688: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the clinical coding of the observation'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,404: | Line 1,695: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the clinical coding of the observation'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,410: | Line 1,702: | ||
<td>decimal(5,2)</td> | <td>decimal(5,2)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The age of the patient at the time of the observation'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,416: | Line 1,709: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the episodicity of the problem eg First, review, flare'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,422: | Line 1,716: | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Whether the observation is a primary observation'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,428: | Line 1,723: | ||
<td>datetime</td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date the observation was recorded in the system'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Unique index name: `observation_id` Index Columns: (id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `fk_observation_encounter_id` Index Columns: (encounter_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `fk_observation_patient_id_organization_id` Index Columns: (patient_id,organization_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `fk_observation_practitioner_id` Index Columns: (practitioner_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `observation_patient_id` Index Columns: (patient_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `observation_core_concept_id` Index Columns: (core_concept_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `observation_core_concept_id_is_problem` Index Columns: (core_concept_id,is_problem)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `observation_core_concept_id_result_value` Index Columns: (core_concept_id,result_value)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `observation_non_core_concept_id` Index Columns: (non_core_concept_id)</td> </tr> <tr> | ||
< | <td colspan="5">Index name: `ix_observation_organization_id` Index Columns: (organization_id)</td> </tr> <tr> | ||
<table class=" | <td colspan="5">Index name: `ix_observation_clinical_effective_date` Index Columns: (clinical_effective_date)</td> </tr> <tr> | ||
<td colspan="5">Index name: `ix_observation_person_id` Index Columns: (person_id)</td> </tr> <tr> | |||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`)</td> </tr> </table> | |||
<h1><span class="mw-headline" id="Sortable_tables">observation_additional</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,452: | Line 1,753: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'same as the id column on the observation table'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,458: | Line 1,760: | ||
<td>int</td> | <td>int</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'IM reference (i.e. significance)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,464: | Line 1,767: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'IM reference (i.e. minor, significant)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,470: | Line 1,774: | ||
<td>json</td> | <td>json</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'the JSON data itself '</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,476: | Line 1,781: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'where there is no mapped value_id or raw JSON, just a basic text value'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `observation_additional_value_id` Index Columns: (value_id)</td> </tr> <tr> | ||
<td colspan="5">CONSTRAINT | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`id`,`property_id`)</td> </tr> </table> | ||
< | <h1><span class="mw-headline" id="Sortable_tables">organization</span></h1> | ||
<table class=" | <table class="mw-collapsible" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,493: | Line 1,800: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the organisation'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,499: | Line 1,807: | ||
<td>varchar(50)</td> | <td>varchar(50)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'ODS Code of the organisation'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>name</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Name of the organisation'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,511: | Line 1,821: | ||
<td>varchar(50)</td> | <td>varchar(50)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The type of organisation'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,517: | Line 1,828: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Textual description of the type of organisation eg GP Practice'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>postcode</td> | ||
<td>varchar(10)</td> | <td>varchar(10)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The postcode of the organisation'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,529: | Line 1,842: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The id of the parent organisation'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Unique index name: `organization_id` Index Columns: (id)</td> </tr> <tr> | ||
<td colspan="5">CONSTRAINT | <td colspan="5">Index name: `fki_organization_parent_organization_id` Index Columns: (parent_organization_id)</td> </tr> <tr> | ||
< | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`id`)</td> </tr> </table> | ||
<table class=" | <h1><span class="mw-headline" id="Sortable_tables">organization_metadata</span></h1> | ||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,546: | Line 1,862: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'organisation ID, corresponds to same ID in the organizaton table'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,552: | Line 1,869: | ||
<td>varchar(50)</td> | <td>varchar(50)</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'software name of publishing system, i.e. SystmOne'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,558: | Line 1,876: | ||
<td>datetime</td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'date time data was last sent to DDS'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,564: | Line 1,883: | ||
<td>datetime</td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'cutoff date time of the last extract from the publishing system'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) `id`,`publishing_software`)</td> </tr> </table> | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`id`,`publishing_software`)</td> </tr> </table> | ||
< | <h1><span class="mw-headline" id="Sortable_tables">patient</span></h1> | ||
<table class=" | <table class="mw-collapsible" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,580: | Line 1,901: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the patient'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,586: | Line 1,908: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>organization.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,592: | Line 1,915: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique individual across all organisations'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,598: | Line 1,922: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The title of the patient'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,604: | Line 1,929: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The first names of the patient'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,610: | Line 1,936: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The last name of the patient'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,616: | Line 1,943: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the gender of the patient'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,622: | Line 1,950: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The NHS number of the patient'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,628: | Line 1,957: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date of birth of the patient'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,634: | Line 1,964: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date of death of the patient'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,640: | Line 1,971: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the current address of the patient'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,646: | Line 1,978: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the ethnicity of the patient'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,652: | Line 1,985: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the organisation the patient is registered at'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,658: | Line 1,992: | ||
<td>smallint</td> | <td>smallint</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,664: | Line 1,999: | ||
<td>tinyint</td> | <td>tinyint</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,670: | Line 2,006: | ||
<td>tinyint</td> | <td>tinyint</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Unique index name: `patient_id` Index Columns: (id)</td> </tr> <tr> | ||
<td colspan="5">CONSTRAINT | <td colspan="5">Index name: `patient_person_id` Index Columns: (person_id)</td> </tr> <tr> | ||
< | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`)</td> </tr> </table> | ||
<table class=" | <h1><span class="mw-headline" id="Sortable_tables">patient_additional</span></h1> | ||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,687: | Line 2,026: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'same as the id column on the patient table '</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,693: | Line 2,033: | ||
<td>int</td> | <td>int</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'IM reference (e.g. Cause of death)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,699: | Line 2,040: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'IM reference (e.g. COVID)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,705: | Line 2,047: | ||
<td>json</td> | <td>json</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'where there is no mapped value_id, just raw JSON'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,711: | Line 2,054: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'where there is no mapped value_id or raw JSON, just a basic text value (i.e. GP Practitioner number)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `ix_patient_additional_id` Index Columns: (value_id)</td> </tr> <tr> | ||
<td colspan="5">CONSTRAINT | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`id`,`property_id`)</td> </tr> </table> | ||
< | <h1><span class="mw-headline" id="Sortable_tables">patient_address</span></h1> | ||
<table class=" | <table class="mw-collapsible" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the address'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,734: | Line 2,080: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>patient.organization_id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,740: | Line 2,087: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> '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'</td> | ||
<td>patient.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,746: | Line 2,094: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique individual across all organisations'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,752: | Line 2,101: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The first line of the address'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,758: | Line 2,108: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The second line of the address'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,764: | Line 2,115: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The third line of the address'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,770: | Line 2,122: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The fourth line of the address'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,776: | Line 2,129: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The city'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,782: | Line 2,136: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The postcode'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,788: | Line 2,143: | ||
<td>int</td> | <td>int</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'use of address (e.g. home, temporary)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,794: | Line 2,150: | ||
<td>date</td> | <td>date</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'The start date of this address being relevant'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,800: | Line 2,157: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The end date of this address being relevant'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,806: | Line 2,164: | ||
<td>varchar(9)</td> | <td>varchar(9)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'A reference to the LSOA_2001 code'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,812: | Line 2,171: | ||
<td>varchar(9)</td> | <td>varchar(9)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'A reference to the LSOA_2011 code'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,818: | Line 2,178: | ||
<td>varchar(9)</td> | <td>varchar(9)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'A reference to the MSOA_2001 code'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,824: | Line 2,185: | ||
<td>varchar(9)</td> | <td>varchar(9)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'A reference to the MSOA_2011 code'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,830: | Line 2,192: | ||
<td>varchar(9)</td> | <td>varchar(9)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The ward the address belongs to'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,836: | Line 2,199: | ||
<td>varchar(9)</td> | <td>varchar(9)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The local authority the address belongs to'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,842: | Line 2,206: | ||
<td>double</td> | <td>double</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) `organization_id`,` | <td colspan="5">Unique index name: `ux_patient_address_id` Index Columns: (id)</td> </tr> <tr> | ||
< | <td colspan="5">Index name: `fk_patient_address_patient_id_organization_id` Index Columns: (patient_id,organization_id)</td> </tr> <tr> | ||
<table class=" | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`organization_id`,`id`,`patient_id`,`person_id`)</td> </tr> </table> | ||
<h1><span class="mw-headline" id="Sortable_tables">patient_address_match</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,858: | Line 2,226: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,864: | Line 2,233: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL,</td> | <td>NOT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>patient_address.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,870: | Line 2,240: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,876: | Line 2,247: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,882: | Line 2,254: | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,888: | Line 2,261: | ||
<td>varchar(45)</td> | <td>varchar(45)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,894: | Line 2,268: | ||
<td>double</td> | <td>double</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,900: | Line 2,275: | ||
<td>double</td> | <td>double</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,906: | Line 2,282: | ||
<td>double</td> | <td>double</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,912: | Line 2,289: | ||
<td>double</td> | <td>double</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,918: | Line 2,296: | ||
<td>varchar(50)</td> | <td>varchar(50)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,924: | Line 2,303: | ||
<td>varchar(4096)</td> | <td>varchar(4096)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,930: | Line 2,310: | ||
<td>datetime</td> | <td>datetime</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,936: | Line 2,317: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,942: | Line 2,324: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,948: | Line 2,331: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,954: | Line 2,338: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,960: | Line 2,345: | ||
<td>varchar(10)</td> | <td>varchar(10)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,966: | Line 2,352: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,972: | Line 2,359: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,978: | Line 2,366: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,984: | Line 2,373: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,990: | Line 2,380: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,996: | Line 2,387: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,002: | Line 2,394: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,008: | Line 2,401: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `patient_address_uprn_index` Index Columns: (uprn)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `patient_address_patient_address_id` Index Columns: (id,uprn)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `patient_address_uprn_patient_address_id_fk` Index Columns: (patient_address_id)</td> </tr> <tr> | ||
< | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`id`)</td> </tr> </table> | ||
<table class=" | <h1><span class="mw-headline" id="Sortable_tables">patient_address_ralf</span></h1> | ||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,026: | Line 2,422: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL,</td> | <td>NOT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,032: | Line 2,429: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL,</td> | <td>NOT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>organization.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,038: | Line 2,436: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL,</td> | <td>NOT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>patient.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,044: | Line 2,443: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL,</td> | <td>NOT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>person.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,050: | Line 2,450: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL,</td> | <td>NOT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>patient_address.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,056: | Line 2,457: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>NOT NULL,</td> | <td>NOT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,062: | Line 2,464: | ||
<td>varchar(50)</td> | <td>varchar(50)</td> | ||
<td>NOT NULL,</td> | <td>NOT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,068: | Line 2,471: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>NOT NULL,</td> | <td>NOT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `fk_patient_address_ralf_organization_id` Index Columns: (organization_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `fk_patient_address_ralf_person_id` Index Columns: (person_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `ux_patient_address_ralf_id` Index Columns: (id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `patient_address_ralf_patient_id` Index Columns: (patient_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `patient_address_ralf_patient_address_id` Index Columns: (patient_address_id)</td> </tr> <tr> | ||
< | <td colspan="5">Index name: `patient_address_ralf_patient_address_match_uprn_ralf_00` Index Columns: (patient_address_match_uprn_ralf00)</td> </tr> <tr> | ||
<table class=" | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`id`,`patient_address_id`,`patient_address_match_uprn_ralf00`)</td> </tr> </table> | ||
<h1><span class="mw-headline" id="Sortable_tables">patient_contact</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,088: | Line 2,495: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the patient contact'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,094: | Line 2,502: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>patient.organization_id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,100: | Line 2,509: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> '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'</td> | ||
<td>patient.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,106: | Line 2,516: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique individual across all organisations'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,112: | Line 2,523: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'use of contact (e.g. mobile, home,work'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,118: | Line 2,530: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'type of contact (e.g. phone, email)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,124: | Line 2,537: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The start date of the contact being valid'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,130: | Line 2,544: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The end date of the contact being valid'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,136: | Line 2,551: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The value of the contact information eg phone number, email address'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) `organization_id`,`id`,`patient_id`,`person_id`) | <td colspan="5">Unique index name: `ux_patient_contact_id` Index Columns: (id)</td> </tr> <tr> | ||
< | <td colspan="5">Index name: `fk_patient_contact_patient_id_organisation_id` Index Columns: (patient_id,organization_id)</td> </tr> <tr> | ||
<table class=" | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`organization_id`,`id`,`patient_id`,`person_id`)</td> </tr> </table> | ||
<h1><span class="mw-headline" id="Sortable_tables">patient_pseudo_id</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,152: | Line 2,571: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the patient pseudo id'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,158: | Line 2,578: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>patient.organization_id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,164: | Line 2,585: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Reference to the patient this registration status history belongs to'</td> | ||
<td>patient.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,170: | Line 2,592: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Reference to the person this registration status history belongs to'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,176: | Line 2,599: | ||
<td>varchar(50)</td> | <td>varchar(50)</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'The name of the salt used to create the pseudo id'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,182: | Line 2,606: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> '"Secure Key IDentifier" - the pseudonymised ID generated for this patient using the salt specified in the salt_name column. Typically generated from patient NHS number, but is configurable on a case by case basis (e.g. may include date of birth)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,188: | Line 2,613: | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Whether the nhs number is valid'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,194: | Line 2,620: | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Whether the nhs number has been verified by the publisher'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Unique index name: `ux_patient_pseudo_id` Index Columns: (id)</td> </tr> <tr> | ||
<td colspan="5">CONSTRAINT | <td colspan="5">Index name: `fk_patient_pseudo_id` Index Columns: (patient_id,organization_id)</td> </tr> <tr> | ||
< | <td colspan="5">Index name: `patient_pseudo_id_patient` Index Columns: (patient_id)</td> </tr> <tr> | ||
<table class=" | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`)</td> </tr> </table> | ||
<h1><span class="mw-headline" id="Sortable_tables">patient_uprn</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,211: | Line 2,641: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> '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'</td> | ||
<td>patient.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,217: | Line 2,648: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>patient.organization_id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,223: | Line 2,655: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique individual across all organisations'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,229: | Line 2,662: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,235: | Line 2,669: | ||
<td>varchar(50)</td> | <td>varchar(50)</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,241: | Line 2,676: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,247: | Line 2,683: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,253: | Line 2,690: | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,259: | Line 2,697: | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,265: | Line 2,704: | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,271: | Line 2,711: | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`patient_id`) | <td colspan="5">Unique index name: `patient_uprn_id` Index Columns: (patient_id)</td> </tr> <tr> | ||
< | <td colspan="5">Index name: `fk_patient_uprn_patient_id_organisation_id` Index Columns: (patient_id,organization_id)</td> </tr> <tr> | ||
<table class=" | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`patient_id`)</td> </tr> </table> | ||
<h1><span class="mw-headline" id="Sortable_tables">person</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,287: | Line 2,731: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the person'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,293: | Line 2,738: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,299: | Line 2,745: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The title of the person'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,305: | Line 2,752: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The first names of the person'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,311: | Line 2,759: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The last name of the person'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,317: | Line 2,766: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the gender of the person'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,323: | Line 2,773: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The NHS number of the person'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,329: | Line 2,780: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date of birth of the person'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,335: | Line 2,787: | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date of death of the person'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,341: | Line 2,794: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Reference to the current address of the person'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,347: | Line 2,801: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the ethnicity of the person'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,353: | Line 2,808: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the organisation the person is registered at'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,359: | Line 2,815: | ||
<td>smallint</td> | <td>smallint</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,365: | Line 2,822: | ||
<td>tinyint</td> | <td>tinyint</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,371: | Line 2,829: | ||
<td>tinyint</td> | <td>tinyint</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td>No comment yet added</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) `id`) | <td colspan="5">Unique index name: `person_id` Index Columns: (id)</td> </tr> <tr> | ||
< | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`id`)</td> </tr> </table> | ||
<table class=" | <h1><span class="mw-headline" id="Sortable_tables">practitioner</span></h1> | ||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,387: | Line 2,848: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the practitioner'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,393: | Line 2,855: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>organization.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,399: | Line 2,862: | ||
<td>varchar(1024)</td> | <td>varchar(1024)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Name of the practitioner'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,405: | Line 2,869: | ||
<td>varchar(50)</td> | <td>varchar(50)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The code representing the role of the practitioner'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,411: | Line 2,876: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Textual description of the role of the practitioner eg General Medical Practitioner'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,417: | Line 2,883: | ||
<td>varchar(50)</td> | <td>varchar(50)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The GMC code of the practitioner'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) `id`) | <td colspan="5">Unique index name: `practitioner_id` Index Columns: (id)</td> </tr> <tr> | ||
< | <td colspan="5">Index name: `fk_practitioner_organisation_id` Index Columns: (organization_id)</td> </tr> <tr> | ||
<table class=" | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`id`)</td> </tr> </table> | ||
<h1><span class="mw-headline" id="Sortable_tables">procedure_request</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,433: | Line 2,903: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the procedure'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,439: | Line 2,910: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>patient.organization_id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,445: | Line 2,917: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> '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'</td> | ||
<td>patient.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,451: | Line 2,924: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique individual across all organisations'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,457: | Line 2,931: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the encounter the procedure was administered at'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,463: | Line 2,938: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The clinician the activity is recorded against'</td> | ||
<td>practitioner.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>clinical_effective_date</td> | <td>clinical_effective_date</td> | ||
<td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date the procedure was administered by a clinician'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,475: | Line 2,952: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,481: | Line 2,959: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the status of the procedure'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,487: | Line 2,966: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the clinical coding of the procedure'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,493: | Line 2,973: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the clinical coding of the procedure'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,499: | Line 2,980: | ||
<td>decimal(5,2)</td> | <td>decimal(5,2)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The age of the patient at the time of the procedure'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,505: | Line 2,987: | ||
<td>datetime</td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date the procedure was recorded in the source system'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Unique index name: `procedure_request_id` Index Columns: (id)</td> </tr> <tr> | ||
<td colspan="5">CONSTRAINT | <td colspan="5">Index name: `fk_procedure_request_patient_id_organization_id` Index Columns: (patient_id,organization_id)</td> </tr> <tr> | ||
< | <td colspan="5">Index name: `fk_procedure_request_practitioner_id` Index Columns: (practitioner_id)</td> </tr> <tr> | ||
<table class=" | <td colspan="5">Index name: `procedure_request_patient_id` Index Columns: (patient_id)</td> </tr> <tr> | ||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`)</td> </tr> </table> | |||
<h1><span class="mw-headline" id="Sortable_tables">referral_request</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,522: | Line 3,009: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the referral'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,528: | Line 3,016: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>patient.organization_id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,534: | Line 3,023: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> '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'</td> | ||
<td>patient.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,540: | Line 3,030: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique individual across all organisations'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,546: | Line 3,037: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the encounter the referral was made in'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,552: | Line 3,044: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The clinician the activity is recorded against'</td> | ||
<td>practitioner.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>clinical_effective_date</td> | <td>clinical_effective_date</td> | ||
<td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date the referral was made'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>date_precision_concept_id</td> | <td>date_precision_concept_id</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,570: | Line 3,065: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the organisation that made the refereral request'</td> | ||
<td>organization.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,576: | Line 3,072: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the organization receiving the referral'</td> | ||
<td>organization.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>referral_request_priority_concept_id</td> | <td>referral_request_priority_concept_id</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the priority of the referral'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,588: | Line 3,086: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the type of referral request'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>mode</td> | ||
<td>varchar(50)</td> | <td>varchar(50)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The mode of the referral'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,600: | Line 3,100: | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Whether this is an outgoing referral'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>is_review</td> | <td>is_review</td> | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> | <td> 'Whether this referral is a review'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,612: | Line 3,114: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the clinical coding of the referral'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,618: | Line 3,121: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the clinical coding of the referral'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,624: | Line 3,128: | ||
<td>decimal(5,2)</td> | <td>decimal(5,2)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The age of the patient at the time of the referral'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,630: | Line 3,135: | ||
<td>datetime</td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The date the referral request was added to the source system'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5"> | <td colspan="5">Unique index name: `referral_request_id` Index Columns: (id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `fk_referral_request_patient_id_organization_id` Index Columns: (patient_id,organization_id)</td> </tr> <tr> | ||
<td colspan="5"> | <td colspan="5">Index name: `fk_referral_request_practitioner_id` Index Columns: (practitioner_id)</td> </tr> <tr> | ||
< | <td colspan="5">Index name: `fk_referral_request_recipient_organization_id` Index Columns: (recipient_organization_id)</td> </tr> <tr> | ||
<table class=" | <td colspan="5">Index name: `fk_referral_request_requester_organization_id` Index Columns: (requester_organization_id)</td> </tr> <tr> | ||
<td colspan="5">Index name: `referral_request_patient_id` Index Columns: (patient_id)</td> </tr> <tr> | |||
<td colspan="5">Index name: `referral_request_core_concept_id` Index Columns: (core_concept_id)</td> </tr> <tr> | |||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`)</td> </tr> </table> | |||
<h1><span class="mw-headline" id="Sortable_tables">registration_status_history</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,648: | Line 3,160: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the registration status history'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,654: | Line 3,167: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,660: | Line 3,174: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Reference to the patient this registration status history belongs to'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,666: | Line 3,181: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Reference to the person this registration status history belongs to'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,672: | Line 3,188: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the episode of care this status history belongs to'</td> | ||
<td>episode_of_care.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,678: | Line 3,195: | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the registration status'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,684: | Line 3,202: | ||
<td>datetime</td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The start date for the period this registration status history was valid'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,690: | Line 3,209: | ||
<td>datetime</td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The end date for the period this registration status history was valid'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) `organization_id`,`id`,`patient_id`,`person_id`) | <td colspan="5">Unique index name: `ux_registration_status_history_id` Index Columns: (id)</td> </tr> <tr> | ||
< | <td colspan="5">Index name: `fk_registration_status_history_episode_id` Index Columns: (episode_of_care_id)</td> </tr> <tr> | ||
<table class=" | <td colspan="5">PRIMARY KEY CONSTRAINT(s) (`organization_id`,`id`,`patient_id`,`person_id`)</td> </tr> </table> | ||
<h1><span class="mw-headline" id="Sortable_tables">schedule</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | <tr> | ||
<th scope="col">Column Name</th> | <th scope="col">Column Name</th> | ||
<th scope="col">Type</th> | <th scope="col">Data Type</th> | ||
<th scope="col">Constraint</th> | <th scope="col">Constraint</th> | ||
<th scope="col">Comment</th> | <th scope="col">Comment</th> | ||
<th scope="col">Foreign Key Reference</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,706: | Line 3,229: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Unique Id of the schedule'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,712: | Line 3,236: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> | <td> 'Owning organisation (i.e. publisher)'</td> | ||
<td>organization.id</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,718: | Line 3,243: | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Reference to the practitioner who owns the schedule'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>start_date</td> | <td>start_date</td> | ||
<td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The start date of the schedule'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,730: | Line 3,257: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The type of schedule eg Timed Appointments'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,736: | Line 3,264: | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'Textual description of the location the schedule was held at'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,742: | Line 3,271: | ||
<td>varchar(150)</td> | <td>varchar(150)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> | <td> 'The name of the schedule'</td> | ||
<td>No Foreign Key reference</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) `organization_id`,`id`) | <td colspan="5">Unique index name: `schedule_id` Index Columns: (id)</td> </tr> <tr> | ||
<td colspan="5">PRIMARY KEY CONSTRAINT(s) (`organization_id`,`id`)</td> </tr> </table> | |||
<h1><span class="mw-headline" id="Sortable_tables">DATABASE UPDATE INFO</span></h1> | |||
<table class="mw-collapsible" border="1" style="border-collapse:collapse"> | |||
<tr> | |||
<th scope="col">New Version</th> | |||
<th scope="col">Date Updated</th> | |||
</tr> | |||
<tr> | |||
<td>v231321e3242432</td> | |||
<td>2022-12-16T10:49:45.099510800</td> | |||
</tr></table> |
Latest revision as of 10:50, 16 December 2022
Remote Subscriber Database (RSD) Schema (Compass 2) Version: v231321e3242432
allergy_intolerance
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the allergy' | No Foreign Key reference |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | patient.organization_id |
patient_id | bigint | 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 | NOT NULL | 'Unique individual across all organisations' | No Foreign Key reference |
encounter_id | bigint | DEFAULT NULL | 'Reference to the encounter this allergy was record in' | encounter.id |
practitioner_id | bigint | DEFAULT NULL | 'The clinician the activity is recorded against' | practitioner.id |
clinical_effective_date | date | DEFAULT NULL | 'The date the clinical code is recorded for' | No Foreign Key reference |
date_precision_concept_id | int | DEFAULT NULL | 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)' | No Foreign Key reference |
is_review | tinyint(1) | NOT NULL | 'Is this instance of the code a review of a previous encounter' | No Foreign Key reference |
core_concept_id | int | DEFAULT NULL | 'Reference to the clinical coding of the allergy' | No Foreign Key reference |
non_core_concept_id | int | DEFAULT NULL | 'Reference to the clinical coding of the allergy' | No Foreign Key reference |
age_at_event | decimal(5,2) | DEFAULT NULL | 'The age the patient was at the time of this event' | No Foreign Key reference |
date_recorded | datetime | NOT NULL | 'The date the allergy was recorded' | No Foreign Key reference |
Unique index name: `allergy_intolerance_id` Index Columns: (id) | ||||
Index name: `fk_allergy_intolerance_encounter_id` Index Columns: (encounter_id) | ||||
Index name: `fk_allergy_intolerance_patient_id_organization_id` Index Columns: (patient_id,organization_id) | ||||
Index name: `fk_allergy_intolerance_practitioner_id` Index Columns: (practitioner_id) | ||||
Index name: `allergy_intolerance_patient_id` Index Columns: (patient_id) | ||||
Index name: `allergy_intolerance_core_concept_id` Index Columns: (core_concept_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`) |
appointment
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the appointment' | No Foreign Key reference |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | organization.id |
patient_id | bigint | 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' | No Foreign Key reference |
person_id | bigint | NOT NULL | 'Unique individual across all organisations' | No Foreign Key reference |
practitioner_id | bigint | DEFAULT NULL | 'The clinician the activity is recorded against' | practitioner.id |
schedule_id | bigint | DEFAULT NULL | 'The schedule the patient was put on to book multiple appointments. ID unique to the applied schedule' | No Foreign Key reference |
start_date | date | DEFAULT NULL | 'The start date of the appointment' | No Foreign Key reference |
planned_duration | int | DEFAULT NULL | 'The time allocated for the appointment, not necessarily the actual duration always in minutes' | No Foreign Key reference |
actual_duration | int | DEFAULT NULL | 'Time between sent in and left always in minutes' | No Foreign Key reference |
appointment_status_concept_id | int | DEFAULT NULL | 'The status of the appointment e.g. arrived/sent in/left/DNA' | No Foreign Key reference |
patient_wait | int | DEFAULT NULL | 'How long the patient waited from being marked as arrived to being sent in' | No Foreign Key reference |
patient_delay | int | DEFAULT NULL | 'How long the patient was delayed for' | No Foreign Key reference |
date_time_sent_in | datetime | DEFAULT NULL | 'Date and time the patient was sent into the practitioner' | No Foreign Key reference |
date_time_left | datetime | DEFAULT NULL | 'Date and time the patient left the practitioner' | No Foreign Key reference |
source_id | varchar(36) | DEFAULT NULL | 'Unique reference to the source of the appointment' | No Foreign Key reference |
cancelled_date | datetime | DEFAULT NULL | 'The date the appointment was cancelled' | No Foreign Key reference |
Unique index name: `appointment_id` Index Columns: (id) | ||||
Index name: `fk_appointment_practitioner_id` Index Columns: (practitioner_id) | ||||
Index name: `appointment_patient_id` Index Columns: (patient_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`) |
appointment_additional
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'same as the id column on the patient table ' | No Foreign Key reference |
property_id | int | NOT NULL | 'IM reference (e.g. appointment type)' | No Foreign Key reference |
value_id | int | DEFAULT NULL | 'IM reference (e.g. appointment type)' | No Foreign Key reference |
json_value | json | DEFAULT NULL | 'where there is no mapped value_id, just raw JSON' | No Foreign Key reference |
text_value | varchar(255) | DEFAULT NULL | 'where there is no mapped value_id or raw JSON, just a basic text value (i.e. GP Practitioner number)' | No Foreign Key reference |
Index name: `appointment_additional_value_id` Index Columns: (value_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`id`,`property_id`) |
concept
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
dbid | int | NOT NULL | 'Unique concept int DB identifier' | No Foreign Key reference |
document | int | DEFAULT NULL | 'Document this concept originated from' | No Foreign Key reference |
id | varchar(150) | CHARACTER SET | 'Unique human-readable concept id' | No Foreign Key reference |
draft | tinyint(1) | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
name | varchar(255) | DEFAULT NULL | 'Short name' | No Foreign Key reference |
description | varchar(400) | DEFAULT NULL | 'Full name (or term for ontological concepts)' | No Foreign Key reference |
scheme | bigint | DEFAULT NULL | 'The coding scheme for the code (Read, CTV3, SNOMED etc)' | No Foreign Key reference |
code | varchar(40) | CHARACTER SET | 'The code (non-unique unless coupled with a scheme)' | No Foreign Key reference |
use_count | bigint | No Constraint | 'Rough indicator of number of occurences of the concept' | No Foreign Key reference |
updated | datetime | NOT NULL | 'The timestamp of the last update to the concept' | No Foreign Key reference |
Index name: `ix_scheme_code` Index Columns: (scheme,code) | ||||
Index name: `ix_code` Index Columns: (code) | ||||
Index name: `ix_dbid_code` Index Columns: (dbid,code) | ||||
PRIMARY KEY CONSTRAINT(s) (`dbid`) |
concept_map
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
legacy | int | NOT NULL | 'the legacy (read 2, ctv3, icd10, opcs4, emis local, etc) concept' | No Foreign Key reference |
core | int | NOT NULL | 'the core (snomed, discovery) concept that the legacy concept maps to' | No Foreign Key reference |
updated | datetime | NOT NULL | 'Timestamp the map was last updated/added' | No Foreign Key reference |
id | int | NOT NULL, | No comment yet added | No Foreign Key reference |
deleted | tinyint(1) | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
Unique index name: `concept_map_uq` Index Columns: (legacy,deleted,updated) | ||||
Index name: `ix_legacy_core` Index Columns: (legacy,core) | ||||
PRIMARY KEY CONSTRAINT(s) (`id`) |
database_version
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
version | varchar(255) | NOT NULL | 'version of the database' | No Foreign Key reference |
valid_from | date | NOT NULL | 'date that the version was updated' | No Foreign Key reference |
valid_to | date | DEFAULT NULL | 'date that the version was made outdated' | No Foreign Key reference |
Unique index name: `valid_to_uq` Index Columns: (valid_to) | ||||
PRIMARY KEY CONSTRAINT(s) (`valid_from`) |
diagnostic_order
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the diagnostic order' | No Foreign Key reference |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | patient.organization_id |
patient_id | bigint | 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 | NOT NULL | 'Unique individual across all organisations' | No Foreign Key reference |
encounter_id | bigint | DEFAULT NULL | 'Reference to the encounter the observation was recorded at' | encounter.id |
practitioner_id | bigint | DEFAULT NULL | 'The clinician the activity is recorded against' | practitioner.id |
clinical_effective_date | datetime | DEFAULT NULL | 'The date the diagnostic order was identified by a clinician' | No Foreign Key reference |
date_precision_concept_id | int | DEFAULT NULL | 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)' | No Foreign Key reference |
result_value | double | DEFAULT NULL | 'The value of the result of the observation' | No Foreign Key reference |
result_value_units | varchar(50) | DEFAULT NULL | 'The units of the result of the observation' | No Foreign Key reference |
result_date | date | DEFAULT NULL | 'The date of the result' | No Foreign Key reference |
result_text | text | No Constraint | 'Any text associated with the result' | No Foreign Key reference |
result_concept_id | int | DEFAULT NULL | 'Reference to the clinical coding of the result' | No Foreign Key reference |
is_problem | tinyint(1) | NOT NULL | 'Whether the observation is marked as a problem' | No Foreign Key reference |
is_review | tinyint(1) | NOT NULL | 'Whether the observation is a review of an existing problem' | No Foreign Key reference |
problem_end_date | date | DEFAULT NULL | 'The end date of the problem' | No Foreign Key reference |
parent_observation_id | bigint | DEFAULT NULL | 'Reference to the parent observation in a complex observation eg systolic and diastolic blood pressures will have a parent observation of Blood pressure' | No Foreign Key reference |
core_concept_id | int | DEFAULT NULL | 'Reference to the clinical coding of the observation' | No Foreign Key reference |
non_core_concept_id | int | DEFAULT NULL | 'Reference to the clinical coding of the observation' | No Foreign Key reference |
age_at_event | decimal(5,2) | DEFAULT NULL | 'The age of the patient at the time of the observation' | No Foreign Key reference |
episodicity_concept_id | int | DEFAULT NULL | 'Reference to the episodicity of the problem eg First, review, flare' | No Foreign Key reference |
is_primary | tinyint(1) | DEFAULT NULL | 'Whether the diagnostic order is a primary order' | No Foreign Key reference |
date_recorded | datetime | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
Unique index name: `diagnostic_order_id` Index Columns: (id) | ||||
Index name: `fk_diagnostic_order_encounter_id` Index Columns: (encounter_id) | ||||
Index name: `fk_diagnostic_order_patient_id_organization_id` Index Columns: (patient_id,organization_id) | ||||
Index name: `fk_diagnostic_order_practitioner_id` Index Columns: (practitioner_id) | ||||
Index name: `diagnostic_order_patient_id` Index Columns: (patient_id) | ||||
Index name: `diagnostic_order_core_concept_id` Index Columns: (core_concept_id) | ||||
Index name: `diagnostic_order_core_concept_id_is_problem` Index Columns: (core_concept_id,is_problem) | ||||
Index name: `diagnostic_order_core_concept_id_result_value` Index Columns: (core_concept_id,result_value) | ||||
Index name: `diagnostic_order_non_core_concept_id` Index Columns: (non_core_concept_id) | ||||
Index name: `ix_diagnostic_order_organization_id` Index Columns: (organization_id) | ||||
Index name: `ix_diagnostic_order_clinical_effective_date` Index Columns: (clinical_effective_date) | ||||
Index name: `ix_diagnostic_order_person_id` Index Columns: (person_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`) |
encounter
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the encounter' | No Foreign Key reference |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | patient.organization_id |
patient_id | bigint | 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 | NOT NULL | 'Unique individual across all organisations' | No Foreign Key reference |
practitioner_id | bigint | DEFAULT NULL | 'The clinician the activity is recorded against' | practitioner.id |
appointment_id | bigint | DEFAULT NULL | 'Reference to the appointment this encounter took part on' | No Foreign Key reference |
clinical_effective_date | date | DEFAULT NULL | 'The date the clinical code is recorded for' | No Foreign Key reference |
date_precision_concept_id | int | DEFAULT NULL | 'Reference to the precision of the date of the encounter' | No Foreign Key reference |
episode_of_care_id | bigint | DEFAULT NULL | 'Is this instance of the code a review of a previous encounter' | episode_of_care.id |
service_provider_organization_id | bigint | DEFAULT NULL | 'Reference to the service provider organisation' | organization.id |
core_concept_id | int | DEFAULT NULL | 'Reference to the type of encounter' | No Foreign Key reference |
non_core_concept_id | int | DEFAULT NULL | 'Reference to the type of encounter' | No Foreign Key reference |
age_at_event | decimal(5,2) | DEFAULT NULL | 'The age the patient was when this encounter took place' | No Foreign Key reference |
type | text | No Constraint | 'Unused' | No Foreign Key reference |
sub_type | text | No Constraint | 'Unused' | No Foreign Key reference |
admission_method | varchar(40) | DEFAULT NULL | 'The admission method of the encounter' | No Foreign Key reference |
end_date | date | DEFAULT NULL | 'The end date of the encounter' | No Foreign Key reference |
institution_location_id | text | No Constraint | 'Reference to the institution the encounter took place at' | No Foreign Key reference |
date_recorded | datetime | DEFAULT NULL | 'The date the encounter was recorded' | No Foreign Key reference |
Unique index name: `encounter_id` Index Columns: (id) | ||||
Index name: `fk_encounter_practitioner_id` Index Columns: (practitioner_id) | ||||
Index name: `fk_encounter_episode_of_care_id` Index Columns: (episode_of_care_id) | ||||
Index name: `fk_encounter_service_provider_organization_id` Index Columns: (service_provider_organization_id) | ||||
Index name: `encounter_patient_id` Index Columns: (patient_id) | ||||
Index name: `fki_encounter_appointment_id` Index Columns: (appointment_id) | ||||
Index name: `fki_encounter_patient_id_organization_id` Index Columns: (patient_id,organization_id) | ||||
Index name: `encounter_core_concept_id_clinical_effective_date` Index Columns: (core_concept_id,clinical_effective_date) | ||||
PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`) |
encounter_additional
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'same as the id column on the encounter table' | No Foreign Key reference |
property_id | int | NOT NULL | 'IM concept id reference (i.e. Admission method)' | No Foreign Key reference |
value_id | int | DEFAULT NULL | 'IM concept id reference (i.e. Emergency admission)' | No Foreign Key reference |
json_value | json | DEFAULT NULL | 'where there is no mapped value_id, just raw JSON (i.e. birth delivery details)' | No Foreign Key reference |
text_value | varchar(255) | DEFAULT NULL | 'where there is no mapped value_id, or raw JSON, just a basic text value (i.e. FIN number)' | No Foreign Key reference |
Index name: `encounter_additional_value_id` Index Columns: (value_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`id`,`property_id`) |
encounter_event
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the encounter event' | No Foreign Key reference |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | patient.organization_id |
patient_id | bigint | NOT NULL | 'The patient this event belongs to' | patient.id |
person_id | bigint | NOT NULL | 'The person this event belongs to' | No Foreign Key reference |
encounter_id | bigint | NOT NULL | 'Reference to the parent encounter record' | No Foreign Key reference |
practitioner_id | bigint | DEFAULT NULL | 'The clinician the activity is recorded against' | practitioner.id |
appointment_id | bigint | DEFAULT NULL | 'Reference to the appointment this encounter took part on' | No Foreign Key reference |
clinical_effective_date | datetime | DEFAULT NULL | 'The date the encounter took place' | No Foreign Key reference |
date_precision_concept_id | int | DEFAULT NULL | 'Reference to the precision of the date of the encounter' | No Foreign Key reference |
episode_of_care_id | bigint | DEFAULT NULL | 'Reference to the episode of care this encounter belongs to' | episode_of_care.id |
service_provider_organization_id | bigint | DEFAULT NULL | 'Reference to the service provider organisation' | organization.id |
core_concept_id | int | DEFAULT NULL | 'Reference to the type of encounter' | No Foreign Key reference |
non_core_concept_id | int | DEFAULT NULL | 'Reference to the type of encounter' | No Foreign Key reference |
age_at_event | decimal(5,2) | DEFAULT NULL | 'The age of the patient at the time of the encounter' | No Foreign Key reference |
type | text | No Constraint | 'Unused' | No Foreign Key reference |
sub_type | text | No Constraint | 'Unused' | No Foreign Key reference |
admission_method | varchar(40) | DEFAULT NULL | 'The admission method of the encounter' | No Foreign Key reference |
end_date | date | DEFAULT NULL | 'The end date of the encounter' | No Foreign Key reference |
institution_location_id | bigint | DEFAULT NULL | 'Reference to the institution the encounter took place at' | No Foreign Key reference |
date_recorded | datetime | DEFAULT NULL | 'The date the encounter was recorded' | No Foreign Key reference |
finished | tinyint(1) | DEFAULT NULL | 'Whether the encounter is finished' | No Foreign Key reference |
Unique index name: `encounter_event_id` Index Columns: (id) | ||||
Index name: `fk_encounter_event_patient_id_organization_id` Index Columns: (patient_id,organization_id) | ||||
Index name: `fk_encounter_event_practitioner_id` Index Columns: (practitioner_id) | ||||
Index name: `fk_encounter_event_episode_of_care_id` Index Columns: (episode_of_care_id) | ||||
Index name: `fk_encounter_event_service_provider_organization_id` Index Columns: (service_provider_organization_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`) |
episode_of_care
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the episode of care' | No Foreign Key reference |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | patient.organization_id |
patient_id | bigint | 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 | NOT NULL | 'Unique individual across all organisations' | No Foreign Key reference |
registration_type_concept_id | int | DEFAULT NULL | 'Reference to the registration type of the patient' | No Foreign Key reference |
registration_status_concept_id | int | DEFAULT NULL | 'Reference to the registration status of the patient' | No Foreign Key reference |
date_registered | date | DEFAULT NULL | 'The date the registration was started for this episode of care' | No Foreign Key reference |
date_registered_end | date | DEFAULT NULL | 'The date the registration was ended for this episode of care' | No Foreign Key reference |
usual_gp_practitioner_id | bigint | DEFAULT NULL | 'Reference to the usual GP for this episode of care' | practitioner.id |
Unique index name: `episode_of_care_id` Index Columns: (id) | ||||
Index name: `fk_episode_of_care_patient_id_organisation_id` Index Columns: (patient_id,organization_id) | ||||
Index name: `fk_episode_of_care_practitioner_id` Index Columns: (usual_gp_practitioner_id) | ||||
Index name: `episode_of_care_patient_id` Index Columns: (patient_id) | ||||
Index name: `episode_of_care_registration_type_concept_id` Index Columns: (registration_type_concept_id) | ||||
Index name: `episode_of_care_date_registered` Index Columns: (date_registered) | ||||
Index name: `episode_of_care_date_registered_end` Index Columns: (date_registered_end) | ||||
Index name: `episode_of_care_person_id` Index Columns: (person_id) | ||||
Index name: `episode_of_care_organization_id` Index Columns: (organization_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`) |
event_log
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
dt_change | datetime(3) | NOT NULL | 'date time the change was made to this DB' | No Foreign Key reference |
change_type | tinyint | NOT NULL | 'type of transaction 0=insert, 1=update, 2=delete' | No Foreign Key reference |
table_id | tinyint | NOT NULL | 'identifier of the table changed' | No Foreign Key reference |
record_id | bigint | NOT NULL | 'id of the record changed' | No Foreign Key reference |
flag
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the flag' | No Foreign Key reference |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | patient.organization_id |
patient_id | bigint | 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 | NOT NULL | 'Unique individual across all organisations' | No Foreign Key reference |
effective_date | datetime | DEFAULT NULL | 'The date the flag was entered onto the patients record' | No Foreign Key reference |
date_precision_concept_id | int | DEFAULT NULL | 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)' | No Foreign Key reference |
is_active | tinyint(1) | NOT NULL | 'Whether the flag is active or not' | No Foreign Key reference |
flag_text | text | No Constraint | 'This is a warning set by the publisher regarding he patient' | No Foreign Key reference |
Unique index name: `flag_id` Index Columns: (id) | ||||
Index name: `fk_flag_patient_id_organization_id` Index Columns: (patient_id,organization_id) | ||||
Index name: `flag_patient_id` Index Columns: (patient_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`) |
location
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the location' | No Foreign Key reference |
name | varchar(255) | DEFAULT NULL | 'The name of a location set by the publisher. E.g. ward, clinic, domiciliary' | No Foreign Key reference |
type_code | varchar(50) | DEFAULT NULL | 'The type of location' | No Foreign Key reference |
type_desc | varchar(255) | DEFAULT NULL | 'Textual description of the type of location eg GP Practice' | No Foreign Key reference |
postcode | varchar(10) | DEFAULT NULL | 'The postcode of the location' | No Foreign Key reference |
managing_organization_id | bigint | DEFAULT NULL | 'Reference to the managing organisation of the location' | organization.id |
Unique index name: `location_id` Index Columns: (id) | ||||
Index name: `fk_location_managing_organisation_id` Index Columns: (managing_organization_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`id`) |
medication_order
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the medication order' | No Foreign Key reference |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | patient.organization_id |
patient_id | bigint | 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 | NOT NULL | 'Unique individual across all organisations' | No Foreign Key reference |
encounter_id | bigint | DEFAULT NULL | 'Reference to the encounter the medication order was issued in' | encounter.id |
practitioner_id | bigint | DEFAULT NULL | 'The clinician the activity is recorded against' | practitioner.id |
clinical_effective_date | date | DEFAULT NULL | 'The date the medication order was issued' | No Foreign Key reference |
date_precision_concept_id | int | DEFAULT NULL | 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)' | No Foreign Key reference |
dose | varchar(1000) | DEFAULT NULL | 'Textual description of the dose' | No Foreign Key reference |
quantity_value | double | DEFAULT NULL | 'The value of the medication that was prescribed eg 50' | No Foreign Key reference |
quantity_unit | varchar(255) | DEFAULT NULL | 'The unit of the medication that was prescribed eg tablets' | No Foreign Key reference |
duration_days | int | DEFAULT NULL | 'How many days the medication is prescribed for' | No Foreign Key reference |
estimated_cost | double | DEFAULT NULL | 'The estimated cost of the medication' | No Foreign Key reference |
medication_statement_id | bigint | DEFAULT NULL | 'Reference to the medication statement. A medication statement can have many medication orders' | No Foreign Key reference |
core_concept_id | int | DEFAULT NULL | 'Reference to the clinical coding of the medication' | No Foreign Key reference |
non_core_concept_id | int | DEFAULT NULL | 'Reference to the clinical coding of the medication' | No Foreign Key reference |
bnf_reference | varchar(6) | DEFAULT NULL | 'A reference to the drug in the BNF dictionary' | No Foreign Key reference |
age_at_event | decimal(5,2) | DEFAULT NULL | 'The age the patient was at the time of this event' | No Foreign Key reference |
issue_method | text | No Constraint | 'The issue method of the medication eg hand written' | No Foreign Key reference |
date_recorded | datetime | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
Unique index name: `medication_order_id` Index Columns: (id) | ||||
Index name: `fk_medication_order_encounter_id` Index Columns: (encounter_id) | ||||
Index name: `fk_medication_order_patient_id_organization_id` Index Columns: (patient_id,organization_id) | ||||
Index name: `fk_medication_order_practitioner_id` Index Columns: (practitioner_id) | ||||
Index name: `medication_order_patient_id` Index Columns: (patient_id) | ||||
Index name: `medication_order_core_concept_id` Index Columns: (core_concept_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`) |
medication_statement
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the medication' | No Foreign Key reference |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | patient.organization_id |
patient_id | bigint | 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 | NOT NULL | 'Unique individual across all organisations' | No Foreign Key reference |
encounter_id | bigint | DEFAULT NULL | 'Reference to the encounter this medication was recorded in' | encounter.id |
practitioner_id | bigint | DEFAULT NULL | 'The clinician the activity is recorded against' | practitioner.id |
clinical_effective_date | date | DEFAULT NULL | 'The date the medication was clinical relevant' | No Foreign Key reference |
date_precision_concept_id | int | DEFAULT NULL | 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)' | No Foreign Key reference |
is_active | tinyint(1) | DEFAULT NULL | 'Whether the medication is active or not' | No Foreign Key reference |
cancellation_date | date | DEFAULT NULL | 'The date the medication was cancelled' | No Foreign Key reference |
dose | varchar(1000) | DEFAULT NULL | 'Texual description of the dose of the medication' | No Foreign Key reference |
quantity_value | double | DEFAULT NULL | 'The value of the medication that was prescribed eg 50' | No Foreign Key reference |
quantity_unit | varchar(255) | DEFAULT NULL | 'The unit of the medication that was prescribed eg tablets' | No Foreign Key reference |
authorisation_type_concept_id | int | DEFAULT NULL | 'Reference to the authorisation type' | No Foreign Key reference |
core_concept_id | int | DEFAULT NULL | 'Reference to the clinical coding of the medication' | No Foreign Key reference |
non_core_concept_id | int | DEFAULT NULL | 'Reference to the clinical coding of the medication' | No Foreign Key reference |
bnf_reference | varchar(6) | DEFAULT NULL | 'A reference to the drug in the BNF dictionary' | No Foreign Key reference |
age_at_event | decimal(5,2) | DEFAULT NULL | 'The age the patient was at the time of this event' | No Foreign Key reference |
issue_method | text | No Constraint | 'The issue method of the medication eg hand written' | No Foreign Key reference |
date_recorded | datetime | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
Unique index name: `medication_statement_id` Index Columns: (id) | ||||
Index name: `fk_medication_statement_encounter_id` Index Columns: (encounter_id) | ||||
Index name: `fk_medication_statement_patient_id_organization_id` Index Columns: (patient_id,organization_id) | ||||
Index name: `fk_medication_statement_practitioner_id` Index Columns: (practitioner_id) | ||||
Index name: `medication_statement_patient_id` Index Columns: (patient_id) | ||||
Index name: `medication_statement_dmd_id` Index Columns: (patient_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`) |
observation
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the observation' | No Foreign Key reference |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | patient.organization_id |
patient_id | bigint | 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 | NOT NULL | 'Unique individual across all organisations' | No Foreign Key reference |
encounter_id | bigint | DEFAULT NULL | 'Reference to the encounter the observation was recorded at' | encounter.id |
practitioner_id | bigint | DEFAULT NULL | 'The clinician the activity is recorded against' | practitioner.id |
clinical_effective_date | date | DEFAULT NULL | 'The date the observation was identified by a clinician' | No Foreign Key reference |
date_precision_concept_id | int | DEFAULT NULL | 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)' | No Foreign Key reference |
result_value | double | DEFAULT NULL | 'The value of the result of the observation' | No Foreign Key reference |
result_value_units | varchar(50) | DEFAULT NULL | 'The units of the result of the observation' | No Foreign Key reference |
result_date | date | DEFAULT NULL | 'The date of the result' | No Foreign Key reference |
result_text | text | No Constraint | 'Any text associated with the result' | No Foreign Key reference |
result_concept_id | int | DEFAULT NULL | 'Reference to the clinical coding of the result' | No Foreign Key reference |
is_problem | tinyint(1) | NOT NULL | 'Whether the observation is marked as a problem' | No Foreign Key reference |
is_review | tinyint(1) | NOT NULL | 'Whether the observation is a review of an existing problem' | No Foreign Key reference |
problem_end_date | date | DEFAULT NULL | 'The end date of the problem' | No Foreign Key reference |
parent_observation_id | bigint | DEFAULT NULL | 'Reference to the parent observation in a complex observation eg systolic and diastolic blood pressures will have a parent observation of Blood pressure' | No Foreign Key reference |
core_concept_id | int | DEFAULT NULL | 'Reference to the clinical coding of the observation' | No Foreign Key reference |
non_core_concept_id | int | DEFAULT NULL | 'Reference to the clinical coding of the observation' | No Foreign Key reference |
age_at_event | decimal(5,2) | DEFAULT NULL | 'The age of the patient at the time of the observation' | No Foreign Key reference |
episodicity_concept_id | int | DEFAULT NULL | 'Reference to the episodicity of the problem eg First, review, flare' | No Foreign Key reference |
is_primary | tinyint(1) | DEFAULT NULL | 'Whether the observation is a primary observation' | No Foreign Key reference |
date_recorded | datetime | DEFAULT NULL | 'The date the observation was recorded in the system' | No Foreign Key reference |
Unique index name: `observation_id` Index Columns: (id) | ||||
Index name: `fk_observation_encounter_id` Index Columns: (encounter_id) | ||||
Index name: `fk_observation_patient_id_organization_id` Index Columns: (patient_id,organization_id) | ||||
Index name: `fk_observation_practitioner_id` Index Columns: (practitioner_id) | ||||
Index name: `observation_patient_id` Index Columns: (patient_id) | ||||
Index name: `observation_core_concept_id` Index Columns: (core_concept_id) | ||||
Index name: `observation_core_concept_id_is_problem` Index Columns: (core_concept_id,is_problem) | ||||
Index name: `observation_core_concept_id_result_value` Index Columns: (core_concept_id,result_value) | ||||
Index name: `observation_non_core_concept_id` Index Columns: (non_core_concept_id) | ||||
Index name: `ix_observation_organization_id` Index Columns: (organization_id) | ||||
Index name: `ix_observation_clinical_effective_date` Index Columns: (clinical_effective_date) | ||||
Index name: `ix_observation_person_id` Index Columns: (person_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`) |
observation_additional
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'same as the id column on the observation table' | No Foreign Key reference |
property_id | int | NOT NULL | 'IM reference (i.e. significance)' | No Foreign Key reference |
value_id | int | DEFAULT NULL | 'IM reference (i.e. minor, significant)' | No Foreign Key reference |
json_value | json | DEFAULT NULL | 'the JSON data itself ' | No Foreign Key reference |
text_value | varchar(255) | DEFAULT NULL | 'where there is no mapped value_id or raw JSON, just a basic text value' | No Foreign Key reference |
Index name: `observation_additional_value_id` Index Columns: (value_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`id`,`property_id`) |
organization
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the organisation' | No Foreign Key reference |
ods_code | varchar(50) | DEFAULT NULL | 'ODS Code of the organisation' | No Foreign Key reference |
name | varchar(255) | DEFAULT NULL | 'Name of the organisation' | No Foreign Key reference |
type_code | varchar(50) | DEFAULT NULL | 'The type of organisation' | No Foreign Key reference |
type_desc | varchar(255) | DEFAULT NULL | 'Textual description of the type of organisation eg GP Practice' | No Foreign Key reference |
postcode | varchar(10) | DEFAULT NULL | 'The postcode of the organisation' | No Foreign Key reference |
parent_organization_id | bigint | DEFAULT NULL | 'The id of the parent organisation' | No Foreign Key reference |
Unique index name: `organization_id` Index Columns: (id) | ||||
Index name: `fki_organization_parent_organization_id` Index Columns: (parent_organization_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`id`) |
organization_metadata
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'organisation ID, corresponds to same ID in the organizaton table' | No Foreign Key reference |
publishing_software | varchar(50) | NOT NULL | 'software name of publishing system, i.e. SystmOne' | No Foreign Key reference |
last_data_to_dds | datetime | DEFAULT NULL | 'date time data was last sent to DDS' | No Foreign Key reference |
last_data_cutoff | datetime | DEFAULT NULL | 'cutoff date time of the last extract from the publishing system' | No Foreign Key reference |
PRIMARY KEY CONSTRAINT(s) (`id`,`publishing_software`) |
patient
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the patient' | No Foreign Key reference |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | organization.id |
person_id | bigint | NOT NULL | 'Unique individual across all organisations' | No Foreign Key reference |
title | varchar(255) | DEFAULT NULL | 'The title of the patient' | No Foreign Key reference |
first_names | varchar(255) | DEFAULT NULL | 'The first names of the patient' | No Foreign Key reference |
last_name | varchar(255) | DEFAULT NULL | 'The last name of the patient' | No Foreign Key reference |
gender_concept_id | int | DEFAULT NULL | 'Reference to the gender of the patient' | No Foreign Key reference |
nhs_number | varchar(255) | DEFAULT NULL | 'The NHS number of the patient' | No Foreign Key reference |
date_of_birth | date | DEFAULT NULL | 'The date of birth of the patient' | No Foreign Key reference |
date_of_death | date | DEFAULT NULL | 'The date of death of the patient' | No Foreign Key reference |
current_address_id | bigint | DEFAULT NULL | 'Reference to the current address of the patient' | No Foreign Key reference |
ethnic_code_concept_id | int | DEFAULT NULL | 'Reference to the ethnicity of the patient' | No Foreign Key reference |
registered_practice_organization_id | bigint | DEFAULT NULL | 'Reference to the organisation the patient is registered at' | No Foreign Key reference |
birth_year | smallint | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
birth_month | tinyint | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
birth_week | tinyint | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
Unique index name: `patient_id` Index Columns: (id) | ||||
Index name: `patient_person_id` Index Columns: (person_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`) |
patient_additional
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'same as the id column on the patient table ' | No Foreign Key reference |
property_id | int | NOT NULL | 'IM reference (e.g. Cause of death)' | No Foreign Key reference |
value_id | int | DEFAULT NULL | 'IM reference (e.g. COVID)' | No Foreign Key reference |
json_value | json | DEFAULT NULL | 'where there is no mapped value_id, just raw JSON' | No Foreign Key reference |
text_value | varchar(255) | DEFAULT NULL | 'where there is no mapped value_id or raw JSON, just a basic text value (i.e. GP Practitioner number)' | No Foreign Key reference |
Index name: `ix_patient_additional_id` Index Columns: (value_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`id`,`property_id`) |
patient_address
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the address' | No Foreign Key reference |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | patient.organization_id |
patient_id | bigint | 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 | NOT NULL | 'Unique individual across all organisations' | No Foreign Key reference |
address_line_1 | varchar(255) | DEFAULT NULL | 'The first line of the address' | No Foreign Key reference |
address_line_2 | varchar(255) | DEFAULT NULL | 'The second line of the address' | No Foreign Key reference |
address_line_3 | varchar(255) | DEFAULT NULL | 'The third line of the address' | No Foreign Key reference |
address_line_4 | varchar(255) | DEFAULT NULL | 'The fourth line of the address' | No Foreign Key reference |
city | varchar(255) | DEFAULT NULL | 'The city' | No Foreign Key reference |
postcode | varchar(255) | DEFAULT NULL | 'The postcode' | No Foreign Key reference |
use_concept_id | int | NOT NULL | 'use of address (e.g. home, temporary)' | No Foreign Key reference |
start_date | date | NOT NULL | 'The start date of this address being relevant' | No Foreign Key reference |
end_date | date | DEFAULT NULL | 'The end date of this address being relevant' | No Foreign Key reference |
lsoa_2001_code | varchar(9) | DEFAULT NULL | 'A reference to the LSOA_2001 code' | No Foreign Key reference |
lsoa_2011_code | varchar(9) | DEFAULT NULL | 'A reference to the LSOA_2011 code' | No Foreign Key reference |
msoa_2001_code | varchar(9) | DEFAULT NULL | 'A reference to the MSOA_2001 code' | No Foreign Key reference |
msoa_2011_code | varchar(9) | DEFAULT NULL | 'A reference to the MSOA_2011 code' | No Foreign Key reference |
ward_code | varchar(9) | DEFAULT NULL | 'The ward the address belongs to' | No Foreign Key reference |
local_authority_code | varchar(9) | DEFAULT NULL | 'The local authority the address belongs to' | No Foreign Key reference |
townsend_deprivation_index | double | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
Unique index name: `ux_patient_address_id` Index Columns: (id) | ||||
Index name: `fk_patient_address_patient_id_organization_id` Index Columns: (patient_id,organization_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`organization_id`,`id`,`patient_id`,`person_id`) |
patient_address_match
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | No comment yet added | No Foreign Key reference |
patient_address_id | bigint | NOT NULL, | No comment yet added | patient_address.id |
uprn | varchar(255) | CHARACTER SET | No comment yet added | No Foreign Key reference |
uprn_ralf00 | varchar(255) | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
status | tinyint(1) | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
uprn_property_classification | varchar(45) | CHARACTER SET | No comment yet added | No Foreign Key reference |
latitude | double | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
longitude | double | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
uprn_xcoordinate | double | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
uprn_ycoordinate | double | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
qualifier | varchar(50) | CHARACTER SET | No comment yet added | No Foreign Key reference |
match_rule | varchar(4096) | CHARACTER SET | No comment yet added | No Foreign Key reference |
match_date | datetime | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
abp_address_number | varchar(255) | CHARACTER SET | No comment yet added | No Foreign Key reference |
abp_address_street | varchar(255) | CHARACTER SET | No comment yet added | No Foreign Key reference |
abp_address_locality | varchar(255) | CHARACTER SET | No comment yet added | No Foreign Key reference |
abp_address_town | varchar(255) | CHARACTER SET | No comment yet added | No Foreign Key reference |
abp_address_postcode | varchar(10) | CHARACTER SET | No comment yet added | No Foreign Key reference |
abp_address_organization | varchar(255) | CHARACTER SET | No comment yet added | No Foreign Key reference |
match_pattern_postcode | varchar(255) | CHARACTER SET | No comment yet added | No Foreign Key reference |
match_pattern_street | varchar(255) | CHARACTER SET | No comment yet added | No Foreign Key reference |
match_pattern_number | varchar(255) | CHARACTER SET | No comment yet added | No Foreign Key reference |
match_pattern_building | varchar(255) | CHARACTER SET | No comment yet added | No Foreign Key reference |
match_pattern_flat | varchar(255) | CHARACTER SET | No comment yet added | No Foreign Key reference |
algorithm_version | varchar(255) | CHARACTER SET | No comment yet added | No Foreign Key reference |
epoch | varchar(255) | CHARACTER SET | No comment yet added | No Foreign Key reference |
Index name: `patient_address_uprn_index` Index Columns: (uprn) | ||||
Index name: `patient_address_patient_address_id` Index Columns: (id,uprn) | ||||
Index name: `patient_address_uprn_patient_address_id_fk` Index Columns: (patient_address_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`id`) |
patient_address_ralf
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL, | No comment yet added | No Foreign Key reference |
organization_id | bigint | NOT NULL, | No comment yet added | organization.id |
patient_id | bigint | NOT NULL, | No comment yet added | patient.id |
person_id | bigint | NOT NULL, | No comment yet added | person.id |
patient_address_id | bigint | NOT NULL, | No comment yet added | patient_address.id |
patient_address_match_uprn_ralf00 | varchar(255) | NOT NULL, | No comment yet added | No Foreign Key reference |
salt_name | varchar(50) | NOT NULL, | No comment yet added | No Foreign Key reference |
ralf | varchar(255) | NOT NULL, | No comment yet added | No Foreign Key reference |
Index name: `fk_patient_address_ralf_organization_id` Index Columns: (organization_id) | ||||
Index name: `fk_patient_address_ralf_person_id` Index Columns: (person_id) | ||||
Index name: `ux_patient_address_ralf_id` Index Columns: (id) | ||||
Index name: `patient_address_ralf_patient_id` Index Columns: (patient_id) | ||||
Index name: `patient_address_ralf_patient_address_id` Index Columns: (patient_address_id) | ||||
Index name: `patient_address_ralf_patient_address_match_uprn_ralf_00` Index Columns: (patient_address_match_uprn_ralf00) | ||||
PRIMARY KEY CONSTRAINT(s) (`id`,`patient_address_id`,`patient_address_match_uprn_ralf00`) |
patient_contact
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the patient contact' | No Foreign Key reference |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | patient.organization_id |
patient_id | bigint | 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 | NOT NULL | 'Unique individual across all organisations' | No Foreign Key reference |
use_concept_id | int | DEFAULT NULL | 'use of contact (e.g. mobile, home,work' | No Foreign Key reference |
type_concept_id | int | DEFAULT NULL | 'type of contact (e.g. phone, email)' | No Foreign Key reference |
start_date | date | DEFAULT NULL | 'The start date of the contact being valid' | No Foreign Key reference |
end_date | date | DEFAULT NULL | 'The end date of the contact being valid' | No Foreign Key reference |
value | varchar(255) | DEFAULT NULL | 'The value of the contact information eg phone number, email address' | No Foreign Key reference |
Unique index name: `ux_patient_contact_id` Index Columns: (id) | ||||
Index name: `fk_patient_contact_patient_id_organisation_id` Index Columns: (patient_id,organization_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`organization_id`,`id`,`patient_id`,`person_id`) |
patient_pseudo_id
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the patient pseudo id' | No Foreign Key reference |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | patient.organization_id |
patient_id | bigint | NOT NULL | 'Reference to the patient this registration status history belongs to' | patient.id |
person_id | bigint | NOT NULL | 'Reference to the person this registration status history belongs to' | No Foreign Key reference |
salt_name | varchar(50) | NOT NULL | 'The name of the salt used to create the pseudo id' | No Foreign Key reference |
Skid | varchar(255) | NOT NULL | '"Secure Key IDentifier" - the pseudonymised ID generated for this patient using the salt specified in the salt_name column. Typically generated from patient NHS number, but is configurable on a case by case basis (e.g. may include date of birth)' | No Foreign Key reference |
is_nhs_number_valid | tinyint(1) | NOT NULL | 'Whether the nhs number is valid' | No Foreign Key reference |
is_nhs_number_verified_by_publisher | tinyint(1) | NOT NULL | 'Whether the nhs number has been verified by the publisher' | No Foreign Key reference |
Unique index name: `ux_patient_pseudo_id` Index Columns: (id) | ||||
Index name: `fk_patient_pseudo_id` Index Columns: (patient_id,organization_id) | ||||
Index name: `patient_pseudo_id_patient` Index Columns: (patient_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`) |
patient_uprn
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
patient_id | bigint | 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 |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | patient.organization_id |
person_id | bigint | NOT NULL | 'Unique individual across all organisations' | No Foreign Key reference |
uprn | bigint | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
qualifier | varchar(50) | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
algorithm | varchar(255) | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
match | varchar(255) | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
no_address | tinyint(1) | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
invalid_address | tinyint(1) | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
missing_postcode | tinyint(1) | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
invalid_postcode | tinyint(1) | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
Unique index name: `patient_uprn_id` Index Columns: (patient_id) | ||||
Index name: `fk_patient_uprn_patient_id_organisation_id` Index Columns: (patient_id,organization_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`patient_id`) |
person
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the person' | No Foreign Key reference |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | No Foreign Key reference |
title | varchar(255) | DEFAULT NULL | 'The title of the person' | No Foreign Key reference |
first_names | varchar(255) | DEFAULT NULL | 'The first names of the person' | No Foreign Key reference |
last_name | varchar(255) | DEFAULT NULL | 'The last name of the person' | No Foreign Key reference |
gender_concept_id | int | DEFAULT NULL | 'Reference to the gender of the person' | No Foreign Key reference |
nhs_number | varchar(255) | DEFAULT NULL | 'The NHS number of the person' | No Foreign Key reference |
date_of_birth | date | DEFAULT NULL | 'The date of birth of the person' | No Foreign Key reference |
date_of_death | date | DEFAULT NULL | 'The date of death of the person' | No Foreign Key reference |
current_address_id | bigint | NOT NULL | 'Reference to the current address of the person' | No Foreign Key reference |
ethnic_code_concept_id | int | DEFAULT NULL | 'Reference to the ethnicity of the person' | No Foreign Key reference |
registered_practice_organization_id | bigint | DEFAULT NULL | 'Reference to the organisation the person is registered at' | No Foreign Key reference |
birth_year | smallint | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
birth_month | tinyint | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
birth_week | tinyint | DEFAULT NULL, | No comment yet added | No Foreign Key reference |
Unique index name: `person_id` Index Columns: (id) | ||||
PRIMARY KEY CONSTRAINT(s) (`id`) |
practitioner
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the practitioner' | No Foreign Key reference |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | organization.id |
name | varchar(1024) | DEFAULT NULL | 'Name of the practitioner' | No Foreign Key reference |
role_code | varchar(50) | DEFAULT NULL | 'The code representing the role of the practitioner' | No Foreign Key reference |
role_desc | varchar(255) | DEFAULT NULL | 'Textual description of the role of the practitioner eg General Medical Practitioner' | No Foreign Key reference |
gmc_code | varchar(50) | DEFAULT NULL | 'The GMC code of the practitioner' | No Foreign Key reference |
Unique index name: `practitioner_id` Index Columns: (id) | ||||
Index name: `fk_practitioner_organisation_id` Index Columns: (organization_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`id`) |
procedure_request
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the procedure' | No Foreign Key reference |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | patient.organization_id |
patient_id | bigint | 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 | NOT NULL | 'Unique individual across all organisations' | No Foreign Key reference |
encounter_id | bigint | DEFAULT NULL | 'Reference to the encounter the procedure was administered at' | No Foreign Key reference |
practitioner_id | bigint | DEFAULT NULL | 'The clinician the activity is recorded against' | practitioner.id |
clinical_effective_date | datetime | DEFAULT NULL | 'The date the procedure was administered by a clinician' | No Foreign Key reference |
date_precision_concept_id | int | DEFAULT NULL | 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)' | No Foreign Key reference |
status_concept_id | int | DEFAULT NULL | 'Reference to the status of the procedure' | No Foreign Key reference |
core_concept_id | int | DEFAULT NULL | 'Reference to the clinical coding of the procedure' | No Foreign Key reference |
non_core_concept_id | int | DEFAULT NULL | 'Reference to the clinical coding of the procedure' | No Foreign Key reference |
age_at_event | decimal(5,2) | DEFAULT NULL | 'The age of the patient at the time of the procedure' | No Foreign Key reference |
date_recorded | datetime | DEFAULT NULL | 'The date the procedure was recorded in the source system' | No Foreign Key reference |
Unique index name: `procedure_request_id` Index Columns: (id) | ||||
Index name: `fk_procedure_request_patient_id_organization_id` Index Columns: (patient_id,organization_id) | ||||
Index name: `fk_procedure_request_practitioner_id` Index Columns: (practitioner_id) | ||||
Index name: `procedure_request_patient_id` Index Columns: (patient_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`) |
referral_request
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the referral' | No Foreign Key reference |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | patient.organization_id |
patient_id | bigint | 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 | NOT NULL | 'Unique individual across all organisations' | No Foreign Key reference |
encounter_id | bigint | DEFAULT NULL | 'Reference to the encounter the referral was made in' | No Foreign Key reference |
practitioner_id | bigint | DEFAULT NULL | 'The clinician the activity is recorded against' | practitioner.id |
clinical_effective_date | datetime | DEFAULT NULL | 'The date the referral was made' | No Foreign Key reference |
date_precision_concept_id | int | DEFAULT NULL | 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)' | No Foreign Key reference |
requester_organization_id | bigint | DEFAULT NULL | 'Reference to the organisation that made the refereral request' | organization.id |
recipient_organization_id | bigint | DEFAULT NULL | 'Reference to the organization receiving the referral' | organization.id |
referral_request_priority_concept_id | int | DEFAULT NULL | 'Reference to the priority of the referral' | No Foreign Key reference |
referral_request_type_concept_id | int | DEFAULT NULL | 'Reference to the type of referral request' | No Foreign Key reference |
mode | varchar(50) | DEFAULT NULL | 'The mode of the referral' | No Foreign Key reference |
outgoing_referral | tinyint(1) | DEFAULT NULL | 'Whether this is an outgoing referral' | No Foreign Key reference |
is_review | tinyint(1) | NOT NULL | 'Whether this referral is a review' | No Foreign Key reference |
core_concept_id | int | DEFAULT NULL | 'Reference to the clinical coding of the referral' | No Foreign Key reference |
non_core_concept_id | int | DEFAULT NULL | 'Reference to the clinical coding of the referral' | No Foreign Key reference |
age_at_event | decimal(5,2) | DEFAULT NULL | 'The age of the patient at the time of the referral' | No Foreign Key reference |
date_recorded | datetime | DEFAULT NULL | 'The date the referral request was added to the source system' | No Foreign Key reference |
Unique index name: `referral_request_id` Index Columns: (id) | ||||
Index name: `fk_referral_request_patient_id_organization_id` Index Columns: (patient_id,organization_id) | ||||
Index name: `fk_referral_request_practitioner_id` Index Columns: (practitioner_id) | ||||
Index name: `fk_referral_request_recipient_organization_id` Index Columns: (recipient_organization_id) | ||||
Index name: `fk_referral_request_requester_organization_id` Index Columns: (requester_organization_id) | ||||
Index name: `referral_request_patient_id` Index Columns: (patient_id) | ||||
Index name: `referral_request_core_concept_id` Index Columns: (core_concept_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`organization_id`,`person_id`,`id`) |
registration_status_history
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the registration status history' | No Foreign Key reference |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | No Foreign Key reference |
patient_id | bigint | NOT NULL | 'Reference to the patient this registration status history belongs to' | No Foreign Key reference |
person_id | bigint | NOT NULL | 'Reference to the person this registration status history belongs to' | No Foreign Key reference |
episode_of_care_id | bigint | DEFAULT NULL | 'Reference to the episode of care this status history belongs to' | episode_of_care.id |
registration_status_concept_id | int | DEFAULT NULL | 'Reference to the registration status' | No Foreign Key reference |
start_date | datetime | DEFAULT NULL | 'The start date for the period this registration status history was valid' | No Foreign Key reference |
end_date | datetime | DEFAULT NULL | 'The end date for the period this registration status history was valid' | No Foreign Key reference |
Unique index name: `ux_registration_status_history_id` Index Columns: (id) | ||||
Index name: `fk_registration_status_history_episode_id` Index Columns: (episode_of_care_id) | ||||
PRIMARY KEY CONSTRAINT(s) (`organization_id`,`id`,`patient_id`,`person_id`) |
schedule
Column Name | Data Type | Constraint | Comment | CollapseForeign Key Reference |
---|---|---|---|---|
id | bigint | NOT NULL | 'Unique Id of the schedule' | No Foreign Key reference |
organization_id | bigint | NOT NULL | 'Owning organisation (i.e. publisher)' | organization.id |
practitioner_id | bigint | DEFAULT NULL | 'Reference to the practitioner who owns the schedule' | No Foreign Key reference |
start_date | datetime | DEFAULT NULL | 'The start date of the schedule' | No Foreign Key reference |
type | varchar(255) | DEFAULT NULL | 'The type of schedule eg Timed Appointments' | No Foreign Key reference |
location | varchar(255) | DEFAULT NULL | 'Textual description of the location the schedule was held at' | No Foreign Key reference |
name | varchar(150) | DEFAULT NULL | 'The name of the schedule' | No Foreign Key reference |
Unique index name: `schedule_id` Index Columns: (id) | ||||
PRIMARY KEY CONSTRAINT(s) (`organization_id`,`id`) |
DATABASE UPDATE INFO
New Version | CollapseDate Updated |
---|---|
v231321e3242432 | 2022-12-16T10:49:45.099510800 |