CompassV2TestPages:v2.X: Difference between revisions
Jump to navigation
Jump to search
DavidHesketh (talk | contribs) No edit summary |
DavidHesketh (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<h1 id="firstHeading" class="firstHeading" lang="en-GB">Remote Subscriber Database (RSD) Schema (Compass 2) Version: v2.1. | <h1 id="firstHeading" class="firstHeading" lang="en-GB">Remote Subscriber Database (RSD) Schema (Compass 2) Version: v2.1.2</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> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">allergy_intolerance</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 11: | Line 11: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td> | <td>encounter_id</td> | ||
<td> | <td>bigint</td> | ||
<td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the encounter this allergy was record in',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 26: | Line 24: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT '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> COMMENT '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> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>non_core_concept_id</td> | ||
<td>int</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'Reference to the clinical coding of the allergy',</td> | |||
</tr> | |||
<tr> | |||
<td>id</td> | |||
<td>bigint</td> | <td>bigint</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Unique Id of the allergy',</td> | ||
<td> | </tr> | ||
<tr> | |||
<td>date_recorded</td> | |||
<td>datetime</td> | |||
<td>NOT NULL</td> | |||
<td> COMMENT 'The date the allergy was recorded',</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 40: | Line 48: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the clinical coding of the allergy',</td> | <td> COMMENT 'Reference to the clinical coding of the allergy',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>person_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Unique individual across all organisations',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>practitioner_id</td> | ||
<td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The clinician the activity is recorded against',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>date_precision_concept_id</td> | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>is_review</td> | ||
<td> | <td>tinyint(1)</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Is this instance of the code a review of a previous encounter',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>organization_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Owning organisation (i.e. publisher)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>clinical_effective_date</td> | ||
<td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The date the clinical code is recorded for',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>age_at_event</td> | ||
<td> | <td>decimal(5,2)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The age the patient was at the time of this event',</td> | ||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`),</td> </tr> </tbody> | |||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">appointment</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 114: | Line 101: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td>patient_id</td> | <td>patient_id</td> | ||
Line 129: | Line 108: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT '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> COMMENT '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> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>appointment_status_concept_id</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The status of the appointment e.g. arrived/sent in/left/DNA',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>patient_wait</td> | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'How long the patient waited from being marked as arrived to being sent in',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>date_time_sent_in</td> | ||
<td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Date and time the patient was sent into the practitioner',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td> | <td>bigint</td> | ||
<td>NOT NULL</td> | |||
<td> COMMENT 'Unique Id of the appointment',</td> | |||
</tr> | |||
<tr> | |||
<td>source_id</td> | |||
<td>varchar(36)</td> | |||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Unique reference to the source of the appointment',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>person_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Unique individual across all organisations',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>practitioner_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The clinician the activity is recorded against',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 185: | Line 156: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Time between sent in and left always in minutes',</td> | <td> COMMENT 'Time between sent in and left always in minutes',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>planned_duration</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The time allocated for the appointment, not necessarily the actual duration always in minutes',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>start_date</td> | ||
<td> | <td>date</td> | ||
<td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The start date of the appointment',</td> | ||
<td> | </tr> | ||
<tr> | |||
<td>organization_id</td> | |||
<td>bigint</td> | |||
<td>NOT NULL</td> | |||
<td> COMMENT 'Owning organisation (i.e. publisher)',</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>patient_delay</td> | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'How long the patient | <td> COMMENT 'How long the patient was delayed for',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 213: | Line 186: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Date and time the patient left the practitioner',</td> | <td> COMMENT 'Date and time the patient left the practitioner',</td> | ||
<td> | </tr> | ||
<tr> | |||
<td>schedule_id</td> | |||
<td>bigint</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'The schedule the patient was put on to book multiple appointments. ID unique to the applied schedule',</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 220: | Line 198: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The date the appointment was cancelled',</td> | <td> COMMENT 'The date the appointment was cancelled',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`),</td> </tr> </tbody> | ||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">appointment_additional</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 238: | Line 209: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td> | <td>json_value</td> | ||
<td> | <td>json</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'where there is no mapped value_id | <td> COMMENT 'where there is no mapped value_id, just raw JSON',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'same as the id column on the patient table ',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>text_value</td> | ||
<td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'where there is no mapped value_id or raw JSON, just a basic text value (i.e. GP Practitioner number)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>property_id</td> | ||
<td> | <td>int</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'IM reference (e.g. appointment type)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>value_id</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'IM reference (e.g. Appointment Type)',</td> | ||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>PRIMARY KEY CONSTRAINT(s) `id`,`property_id`),</td> </tr> </tbody> | |||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">concept</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 285: | Line 251: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td> | <td>Code</td> | ||
<td>varchar( | <td>varchar(40)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The code (non-unique unless coupled with a scheme)',</td> | |||
<td> COMMENT 'The | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 307: | Line 264: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Unique concept identifier',</td> | <td> COMMENT 'Unique concept identifier',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 321: | Line 270: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Unique Id of the concept',</td> | <td> COMMENT 'Unique Id of the concept',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 328: | Line 276: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Concept grouping construct, deprecated',</td> | <td> COMMENT 'Concept grouping construct, deprecated',</td> | ||
<td> | </tr> | ||
<tr> | |||
<td>Scheme</td> | |||
<td>bigint</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'The coding scheme for the code (Read, CTV3, SNOMED etc)',</td> | |||
</tr> | |||
<tr> | |||
<td>Draft</td> | |||
<td>tinyint(1)</td> | |||
<td>NOT NULL</td> | |||
<td> COMMENT 'Whether its draft/autocreated or confirmed as a "proper" concept',</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 335: | Line 294: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Full name (or term for ontological concepts)',</td> | <td> COMMENT 'Full name (or term for ontological concepts)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>use_count</td> | ||
<td> | <td>bigint</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> | <td> DEFAULT '0' COMMENT 'Rough indicator of number of occurences of the concept',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 349: | Line 306: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'The timestamp of the last update to the concept',</td> | <td> COMMENT 'The timestamp of the last update to the concept',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>Name</td> | ||
<td> | <td>varchar(255)</td> | ||
<td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Short name',</td> | ||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>PRIMARY KEY CONSTRAINT(s) `dbid`),</td> </tr> </tbody> | |||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">concept_map</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 367: | Line 323: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td> | <td>legacy</td> | ||
<td>int</td> | <td>int</td> | ||
<td>NOT NULL | <td>NOT NULL</td> | ||
<td> | <td> COMMENT 'the legacy (read 2, ctv3, icd10, opcs4, emis local, etc) concept',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 389: | Line 336: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Timestamp the map was last updated/added',</td> | <td> COMMENT 'Timestamp the map was last updated/added',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>core</td> | ||
<td>int</td> | <td>int</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'the | <td> COMMENT 'the core (snomed, discovery) concept that the legacy concept maps to',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td>int</td> | <td>int</td> | ||
<td>NOT NULL</td> | <td>NOT NULL,</td> | ||
<td> | <td></td> | ||
<td> | </tr> | ||
<tr> | |||
<td>deleted</td> | |||
<td>tinyint(1)</td> | |||
<td>DEFAULT NULL,</td> | |||
<td></td> | |||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>PRIMARY KEY CONSTRAINT(s) `id`),</td> </tr> </tbody> | |||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">diagnostic_order</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 414: | Line 365: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td> | <td>problem_end_date</td> | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The date of the | <td> COMMENT 'The end date of the problem',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 443: | Line 378: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Whether the diagnostic order is a primary order',</td> | <td> COMMENT 'Whether the diagnostic order is a primary order',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>result_value_units</td> | ||
<td> | <td>varchar(50)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The units of the result of the observation',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 464: | Line 390: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the episodicity of the problem eg First, review, flare',</td> | <td> COMMENT 'Reference to the episodicity of the problem eg First, review, flare',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>clinical_effective_date</td> | ||
<td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The date the diagnostic order was identified by a clinician',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>result_text</td> | ||
<td> | <td>text</td> | ||
<td> | <td>COMMENT 'Any</td> | ||
<td> | <td> text associated with the result',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td> | <td>bigint</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Unique Id of the diagnostic order',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>result_concept_id</td> | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the clinical coding of the result',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>person_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Unique individual across all organisations',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>practitioner_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The clinician the activity is recorded against',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 520: | Line 432: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Whether the observation is marked as a problem',</td> | <td> COMMENT 'Whether the observation is marked as a problem',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>result_value</td> | ||
<td> | <td>double</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The value of the result of the observation',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>result_date</td> | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The date of the result',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>non_core_concept_id</td> | ||
<td> | <td>int</td> | ||
<td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the clinical coding of the observation',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>core_concept_id</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the clinical coding of the observation',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>patient_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT '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> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>date_recorded</td> | ||
<td> | <td>datetime</td> | ||
<td>DEFAULT NULL,</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>is_review</td> | |||
<td>tinyint(1)</td> | |||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Whether the observation is a review of an existing problem',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>date_precision_concept_id</td> | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>parent_observation_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the parent observation in a complex observation eg systolic and diastolic blood pressures will have a parent observation of Blood pressure',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>organization_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Owning organisation (i.e. publisher)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>age_at_event</td> | ||
<td> | <td>decimal(5,2)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The age of the patient at the time of the observation',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>encounter_id</td> | ||
<td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the encounter the observation was recorded at',</td> | ||
</tr> | </tr> | ||
<tr> | |||
<td>PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`),</td> </tr> </tbody> | |||
</table> | |||
<h2><span class="mw-headline" id="Sortable_tables">encounter</span></h2> | |||
<table class="sortable" border="1" style="border-collapse:collapse"> | |||
<tr> | |||
<th scope="col" width="10%">Column Name</th> | |||
<th scope="col" width="10%">Type</th> | |||
<th scope="col" width="10%">Constraint</th> | |||
<th scope="col" width="10%">Comment</th> | |||
</tr> | |||
<tbody> | |||
<tr> | <tr> | ||
<td>appointment_id</td> | <td>appointment_id</td> | ||
Line 623: | Line 522: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the appointment this encounter took part on',</td> | <td> COMMENT 'Reference to the appointment this encounter took part on',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>sub_type</td> | ||
<td> | <td>text</td> | ||
<td>COMMENT 'Unused',</td> | |||
<td> COMMENT ' | <td></td> | ||
<td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>institution_location_id</td> | ||
<td>text</td> | |||
<td>COMMENT 'Reference</td> | |||
<td> to the institution the encounter took place at',</td> | |||
</tr> | |||
<tr> | |||
<td>patient_id</td> | |||
<td>bigint</td> | <td>bigint</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT '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> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>core_concept_id</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the | <td> COMMENT 'Reference to the type of encounter',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>non_core_concept_id</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the type of encounter',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>person_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Unique individual across all organisations',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>practitioner_id</td> | ||
<td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The clinician the activity is recorded against',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>date_recorded</td> | ||
<td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The date the encounter was recorded',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>date_precision_concept_id</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the precision of the date of the encounter',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>admission_method</td> | ||
<td> | <td>varchar(40)</td> | ||
<td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The admission method of the encounter',</td> | |||
<td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>episode_of_care_id</td> | ||
<td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | |||
<td></td> | <td> COMMENT 'Is this instance of the code a review of a previous encounter',</td> | ||
<td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Unique | <td> COMMENT 'Unique Id of the encounter',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>organization_id</td> | ||
<td> | <td>bigint</td> | ||
<td>COMMENT ' | <td>NOT NULL</td> | ||
<td></td> | <td> COMMENT 'Owning organisation (i.e. publisher)',</td> | ||
<td> | </tr> | ||
<tr> | |||
<td>age_at_event</td> | |||
<td>decimal(5,2)</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'The age the patient was when this encounter took place',</td> | |||
</tr> | |||
<tr> | |||
<td>clinical_effective_date</td> | |||
<td>date</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'The date the clinical code is recorded for',</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>service_provider_organization_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the service provider organisation',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 721: | Line 624: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The end date of the encounter',</td> | <td> COMMENT 'The end date of the encounter',</td> | ||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>Type</td> | |||
<td>text</td> | |||
<td>COMMENT 'Unused',</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`),</td> </tr> </tbody> | |||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">encounter_additional</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 732: | Line 641: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td> | <td>text_value</td> | ||
<td> | <td>varchar(255)</td> | ||
<td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'where there is no mapped value_id, or raw JSON, just a basic text value (i.e. FIN number)',</td> | ||
<td> | </tr> | ||
<tr> | |||
<td>json_value</td> | |||
<td>json</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'where there is no mapped value_id, just raw JSON (i.e. birth delivery details)',</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'same as the id column on the encounter table',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 754: | Line 666: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'IM concept id reference (i.e. Emergency admission)',</td> | <td> COMMENT 'IM concept id reference (i.e. Emergency admission)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>property_id</td> | ||
<td> | <td>int</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'IM concept id reference (i.e. Admission method)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>PRIMARY KEY CONSTRAINT(s) `id`,`property_id`),</td> </tr> </tbody> | ||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">encounter_event</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 779: | Line 683: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td> | <td>appointment_id</td> | ||
<td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the | <td> COMMENT 'Reference to the appointment this encounter took part on',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td> | <td>bigint</td> | ||
<td>NOT NULL</td> | |||
<td> COMMENT 'Unique Id of the encounter event',</td> | |||
</tr> | |||
<tr> | |||
<td>sub_type</td> | |||
<td>text</td> | |||
<td>COMMENT 'Unused',</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>episode_of_care_id</td> | |||
<td>bigint</td> | |||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the episode of care this encounter belongs to',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>core_concept_id</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the | <td> COMMENT 'Reference to the type of encounter',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 808: | Line 720: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the type of encounter',</td> | <td> COMMENT 'Reference to the type of encounter',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>clinical_effective_date</td> | ||
<td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The date the encounter took place',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 822: | Line 732: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The clinician the activity is recorded against',</td> | <td> COMMENT 'The clinician the activity is recorded against',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>date_recorded</td> | ||
<td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The date the encounter was recorded',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>date_precision_concept_id</td> | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the | <td> COMMENT 'Reference to the precision of the date of the encounter',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 864: | Line 750: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The admission method of the encounter',</td> | <td> COMMENT 'The admission method of the encounter',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 871: | Line 756: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the institution the encounter took place at',</td> | <td> COMMENT 'Reference to the institution the encounter took place at',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>age_at_event</td> | ||
<td> | <td>decimal(5,2)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The age of the patient at the time of the encounter',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>type</td> | ||
<td>bigint</td> | <td>text</td> | ||
<td>COMMENT 'Unused',</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>organization_id</td> | |||
<td>bigint</td> | |||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Owning organisation (i.e. publisher)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>person_id</td> | ||
<td> | <td>bigint</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The person this event belongs to',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>service_provider_organization_id</td> | ||
<td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | |||
<td></td> | <td> COMMENT 'Reference to the service provider organisation',</td> | ||
<td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 906: | Line 792: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The end date of the encounter',</td> | <td> COMMENT 'The end date of the encounter',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 913: | Line 798: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Reference to the parent encounter record',</td> | <td> COMMENT 'Reference to the parent encounter record',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 920: | Line 804: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'The patient this event belongs to',</td> | <td> COMMENT 'The patient this event belongs to',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>finished</td> | ||
<td> | <td>tinyint(1)</td> | ||
<td>DEFAULT NULL</td> | |||
<td></td> | <td> COMMENT 'Whether the encounter is finished',</td> | ||
<td> | |||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`),</td> </tr> </tbody> | |||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">episode_of_care</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 938: | Line 821: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
Line 946: | Line 828: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT '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> COMMENT '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> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>usual_gp_practitioner_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the usual GP for this episode of care',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 967: | Line 840: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the registration status of the patient',</td> | <td> COMMENT 'Reference to the registration status of the patient',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 974: | Line 846: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The date the registration was ended for this episode of care',</td> | <td> COMMENT 'The date the registration was ended for this episode of care',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 981: | Line 852: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Owning organisation (i.e. publisher)',</td> | <td> COMMENT 'Owning organisation (i.e. publisher)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>date_registered</td> | ||
<td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The date the registration was started for this episode of care',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 995: | Line 864: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Unique individual across all organisations',</td> | <td> COMMENT 'Unique individual across all organisations',</td> | ||
<td> | </tr> | ||
<tr> | |||
<td>id</td> | |||
<td>bigint</td> | |||
<td>NOT NULL</td> | |||
<td> COMMENT 'Unique Id of the episode of care',</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,002: | Line 876: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the registration type of the patient',</td> | <td> COMMENT 'Reference to the registration type of the patient',</td> | ||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`),</td> </tr> </tbody> | |||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">event_log</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 1,013: | Line 887: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | |||
<td>table_id</td> | |||
<td>tinyint</td> | |||
<td>NOT NULL</td> | |||
<td> COMMENT 'identifier of the table changed',</td> | |||
</tr> | |||
<tr> | <tr> | ||
<td>dt_change</td> | <td>dt_change</td> | ||
Line 1,021: | Line 900: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'date time the change was made to this DB',</td> | <td> COMMENT 'date time the change was made to this DB',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,028: | Line 906: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'type of transaction 0=insert, 1=update, 2=delete',</td> | <td> COMMENT 'type of transaction 0=insert, 1=update, 2=delete',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>record_id</td> | |||
<td>bigint</td> | |||
<td>record_id</td> | |||
<td>bigint</td> | |||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'id of the record changed'</td> | <td> COMMENT 'id of the record changed'</td> | ||
</tr> | </tr> | ||
</tbody> | </tbody> | ||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">flag</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 1,053: | Line 922: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | |||
<td>flag_text</td> | |||
<td>text</td> | |||
<td>COMMENT 'This</td> | |||
<td> is a warning set by the publisher regarding he patient',</td> | |||
</tr> | |||
<tr> | <tr> | ||
<td>patient_id</td> | <td>patient_id</td> | ||
Line 1,061: | Line 935: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT '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> COMMENT '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> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,068: | Line 941: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Whether the flag is active or not',</td> | <td> COMMENT 'Whether the flag is active or not',</td> | ||
<td> | </tr> | ||
<tr> | |||
<td>organization_id</td> | |||
<td>bigint</td> | |||
<td>NOT NULL</td> | |||
<td> COMMENT 'Owning organisation (i.e. publisher)',</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,075: | Line 953: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The date the flag was entered onto the patients record',</td> | <td> COMMENT 'The date the flag was entered onto the patients record',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>person_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Unique individual across all organisations',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Unique | <td> COMMENT 'Unique Id of the flag',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,103: | Line 971: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)',</td> | <td> COMMENT 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`),</td> </tr> </tbody> | ||
</table> | |||
<h2><span class="mw-headline" id="Sortable_tables">location</span></h2> | |||
</table> | |||
<h2><span class="mw-headline" id="Sortable_tables"> | |||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 1,121: | Line 982: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td> | <td>type_desc</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Textual description of the type of location eg GP Practice',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>managing_organization_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the managing organisation of the location',</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> COMMENT ' | <td> COMMENT 'The name of a location set by the publisher. E.g. ward, clinic, domiciliary',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,157: | Line 1,007: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The postcode of the location',</td> | <td> COMMENT 'The postcode of the location',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>type_code</td> | ||
<td> | <td>varchar(50)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The type of location',</td> | ||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>id</td> | |||
<td>bigint</td> | |||
<td>NOT NULL</td> | |||
<td> COMMENT 'Unique Id of the location',</td> | |||
</tr> | |||
<tr> | |||
<td>PRIMARY KEY CONSTRAINT(s) `id`),</td> </tr> </tbody> | |||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">medication_order</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 1,175: | Line 1,030: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td>patient_id</td> | <td>patient_id</td> | ||
Line 1,190: | Line 1,037: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT '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> COMMENT '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> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>core_concept_id</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the clinical coding of the medication',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>duration_days</td> | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'How many days the medication is prescribed for',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>bnf_reference</td> | ||
<td>varchar(6)</td> | |||
<td>varchar( | |||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'A reference to the drug in the BNF dictionary',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>issue_method</td> | ||
<td> | <td>text</td> | ||
<td>COMMENT 'The</td> | |||
<td> COMMENT 'The | <td> issue method of the medication eg hand written',</td> | ||
<td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>dose</td> | ||
<td> | <td>varchar(1000)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Textual description of the dose',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>estimated_cost</td> | ||
<td> | <td>double</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The estimated cost of the medication',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>person_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Unique | <td> COMMENT 'Unique individual across all organisations',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>practitioner_id</td> | ||
<td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The clinician the activity is recorded against',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>medication_statement_id</td> | ||
<td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the medication statement. A medication statement can have many medication orders',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Unique | <td> COMMENT 'Unique Id of the medication order',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,288: | Line 1,103: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)',</td> | <td> COMMENT 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>non_core_concept_id</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the | <td> COMMENT 'Reference to the clinical coding of the medication',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,302: | Line 1,115: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The value of the medication that was prescribed eg 50',</td> | <td> COMMENT 'The value of the medication that was prescribed eg 50',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>organization_id</td> | ||
<td> | <td>bigint</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Owning organisation (i.e. publisher)',</td> | ||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>clinical_effective_date</td> | |||
<td>date</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'The date the medication order was issued',</td> | |||
</tr> | |||
<tr> | |||
<td>encounter_id</td> | |||
<td>bigint</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'Reference to the encounter the medication order was issued in',</td> | |||
</tr> | |||
<tr> | |||
<td>age_at_event</td> | |||
<td>decimal(5,2)</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'The age the patient was at the time of this event',</td> | |||
</tr> | |||
<tr> | |||
<td>quantity_unit</td> | |||
<td>varchar(255)</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'The unit of the medication that was prescribed eg tablets',</td> | |||
</tr> | |||
<tr> | |||
<td>PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`),</td> </tr> </tbody> | |||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">medication_statement</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 1,320: | Line 1,156: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td> | <td>cancellation_date</td> | ||
<td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The date the medication was cancelled',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>Issue_method</td> | ||
<td> | <td>text</td> | ||
<td>COMMENT 'The</td> | |||
<td> COMMENT 'The | <td> issue method of the medication eg hand written',</td> | ||
<td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>patient_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT '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> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>date_recorded</td> | ||
<td> | <td>datetime</td> | ||
<td> | <td>DEFAULT NULL,</td> | ||
<td></td> | |||
<td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>core_concept_id</td> | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the clinical coding of the medication',</td> | <td> COMMENT 'Reference to the clinical coding of the medication',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>bnf_reference</td> | ||
<td> | <td>varchar(6)</td> | ||
<td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'A reference to the drug in the BNF dictionary',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>dose</td> | ||
<td> | <td>varchar(1000)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Texual description of the dose of the medication',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>person_id</td> | ||
<td> | <td>bigint</td> | ||
<td>NOT NULL</td> | |||
<td> COMMENT 'Unique individual across all organisations',</td> | |||
</tr> | |||
<tr> | |||
<td>authorisation_type_concept_id</td> | |||
<td>int</td> | |||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the authorisation type',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>practitioner_id</td> | ||
<td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The clinician the activity is recorded against',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>clinical_effective_date</td> | ||
<td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The date the medication was clinical relevant',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>date_precision_concept_id</td> | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>non_core_concept_id</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the clinical coding of the medication',</td> | |||
<td> COMMENT 'Reference to the | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,426: | Line 1,241: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Unique Id of the medication',</td> | <td> COMMENT 'Unique Id of the medication',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,433: | Line 1,247: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Whether the medication is active or not',</td> | <td> COMMENT 'Whether the medication is active or not',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>quantity_value</td> | ||
<td> | <td>double</td> | ||
<td>DEFAULT NULL | <td>DEFAULT NULL</td> | ||
<td> | <td> COMMENT 'The value of the medication that was prescribed eg 50',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>organization_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Owning organisation (i.e. publisher)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>encounter_id</td> | ||
<td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the encounter this medication was recorded in',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>age_at_event</td> | ||
<td> | <td>decimal(5,2)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The age the patient was at the time of this event',</td> | ||
<td> | </tr> | ||
<tr> | |||
<td>quantity_unit</td> | |||
<td>varchar(255)</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'The unit of the medication that was prescribed eg tablets',</td> | |||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`),</td> </tr> </tbody> | |||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">observation</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 1,472: | Line 1,288: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td> | <td>problem_end_date</td> | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The date of the | <td> COMMENT 'The end date of the problem',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>is_primary</td> | ||
<td> | <td>tinyint(1)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Whether the observation is a primary observation',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>episodicity_concept_id</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the | <td> COMMENT 'Reference to the episodicity of the problem eg First, review, flare',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>result_value_units</td> | ||
<td> | <td>varchar(50)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The units of the result of the observation',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>result_text</td> | ||
<td> | <td>text</td> | ||
<td>COMMENT 'Any</td> | |||
<td> COMMENT ' | <td> text associated with the result',</td> | ||
<td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,515: | Line 1,325: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the clinical coding of the result',</td> | <td> COMMENT 'Reference to the clinical coding of the result',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>person_id</td> | ||
<td> | <td>bigint</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Unique individual across all organisations',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>practitioner_id</td> | ||
<td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The clinician the activity is recorded against',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>is_problem</td> | ||
<td> | <td>tinyint(1)</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Whether the observation is marked as a problem',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>result_value</td> | ||
<td> | <td>double</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The value of the result of the observation',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>result_date</td> | ||
<td>date</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'The date of the result',</td> | |||
</tr> | |||
<tr> | |||
<td>non_core_concept_id</td> | |||
<td>int</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'Reference to the clinical coding of the observation',</td> | |||
</tr> | |||
<tr> | |||
<td>core_concept_id</td> | |||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the clinical coding of the observation',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,557: | Line 1,373: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT '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> COMMENT '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> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>date_recorded</td> | ||
<td> | <td>datetime</td> | ||
<td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The date the observation was recorded in the system',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>is_review</td> | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Whether the observation is | <td> COMMENT 'Whether the observation is a review of an existing problem',</td> | ||
<td> | </tr> | ||
<tr> | |||
<td>date_precision_concept_id</td> | |||
<td>int</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)',</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,578: | Line 1,397: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT '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> COMMENT 'Reference to the parent observation in a complex observation eg systolic and diastolic blood pressures will have a parent observation of Blood pressure',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>organization_id</td> | ||
<td> | <td>bigint</td> | ||
<td>COMMENT ' | <td>NOT NULL</td> | ||
<td> | <td> COMMENT 'Owning organisation (i.e. publisher)',</td> | ||
<td> | </tr> | ||
<tr> | |||
<td>id</td> | |||
<td>bigint</td> | |||
<td>NOT NULL</td> | |||
<td> COMMENT 'Unique Id of the observation',</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>age_at_event</td> | ||
<td> | <td>decimal(5,2)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The age of the patient at the time of the observation',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>encounter_id</td> | ||
<td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the encounter the observation was recorded at',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>clinical_effective_date</td> | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The date the observation was identified by a clinician',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`),</td> </tr> </tbody> | ||
<td> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables">observation_additional</span></h2> | |||
<table class="sortable" border="1" style="border-collapse:collapse"> | |||
<tr> | |||
<th scope="col" width="10%">Column Name</th> | |||
<th scope="col" width="10%">Type</th> | |||
<th scope="col" width="10%">Constraint</th> | |||
<th scope="col" width="10%">Comment</th> | |||
</tr> | |||
<tbody> | |||
<tr> | |||
<td>property_id</td> | |||
<td>int</td> | |||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'IM reference (i.e. significance)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>text_value</td> | ||
<td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'where there is no mapped value_id or raw JSON, just a basic text value',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'same as the id column on the observation table',</td> | ||
<td> | </tr> | ||
<tr> | |||
<td>json_value</td> | |||
<td>json</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'the JSON data itself ',</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>value_id</td> | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'IM reference (i.e. minor, significant)',</td> | ||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>PRIMARY KEY CONSTRAINT(s) `id`,`property_id`),</td> </tr> </tbody> | |||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">organization</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 1,645: | Line 1,480: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td> | <td>bigint</td> | ||
<td>NOT NULL</td> | |||
<td> COMMENT 'Unique Id of the organisation',</td> | |||
</tr> | |||
<tr> | |||
<td>Name</td> | |||
<td>varchar(255)</td> | |||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'the | <td> COMMENT 'Name of the organisation',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>type_desc</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Textual description of the type of organisation eg GP Practice',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>ods_code</td> | ||
<td> | <td>varchar(50)</td> | ||
<td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'ODS Code of the organisation',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>type_code</td> | ||
<td> | <td>varchar(50)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The type of organisation',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>Postcode</td> | ||
<td> | <td>varchar(10)</td> | ||
<td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The postcode of the organisation',</td> | ||
<td> | </tr> | ||
<tr> | |||
<td>parent_organization_id</td> | |||
<td>bigint</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'The id of the parent organisation',</td> | |||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>PRIMARY KEY CONSTRAINT(s) `id`),</td> </tr> </tbody> | |||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">organization_metadata</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 1,692: | Line 1,534: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td> | <td>last_data_to_dds</td> | ||
<td>datetime</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'date time data was last sent to DDS',</td> | |||
</tr> | |||
<tr> | |||
<td>publishing_software</td> | |||
<td>varchar(50)</td> | <td>varchar(50)</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'software name of publishing system, i.e. SystmOne',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'organisation ID, corresponds to same ID in the organizaton table',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>last_data_cutoff</td> | ||
<td> | <td>datetime</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'cutoff date time of the last extract from the publishing system',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>PRIMARY KEY CONSTRAINT(s) `id`,`publishing_software`)</td> </tr> </tbody> | ||
<td> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables">patient</span></h2> | |||
<table class="sortable" border="1" style="border-collapse:collapse"> | |||
<tr> | |||
<th scope="col" width="10%">Column Name</th> | |||
<th scope="col" width="10%">Type</th> | |||
<th scope="col" width="10%">Constraint</th> | |||
<th scope="col" width="10%">Comment</th> | |||
</tr> | |||
<tbody> | |||
<tr> | |||
<td>date_of_death</td> | |||
<td>date</td> | |||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The date of death of the patient',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>current_address_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the current address of the patient',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>date_of_birth</td> | ||
<td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The date of birth of the patient',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>title</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The title of the patient',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>person_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Unique individual across all organisations',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>nhs_number</td> | ||
<td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The NHS number of the patient',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>gender_concept_id</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the gender of the patient',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>birth_week</td> | ||
<td> | <td>tinyint</td> | ||
<td> | <td>DEFAULT NULL,</td> | ||
<td></td> | |||
<td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>first_names</td> | ||
<td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL | <td>DEFAULT NULL</td> | ||
<td> | <td> COMMENT 'The first names of the patient',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>last_name</td> | ||
<td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL | <td>DEFAULT NULL</td> | ||
<td> | <td> COMMENT 'The last name of the patient',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Unique Id of the patient',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>organization_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Owning organisation (i.e. publisher)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>birth_year</td> | ||
<td> | <td>smallint</td> | ||
<td>DEFAULT NULL | <td>DEFAULT NULL,</td> | ||
<td></td> | |||
<td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>ethnic_code_concept_id</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the | <td> COMMENT 'Reference to the ethnicity of the patient',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>birth_month</td> | ||
<td> | <td>tinyint</td> | ||
<td>DEFAULT NULL | <td>DEFAULT NULL,</td> | ||
<td></td> | |||
<td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>registered_practice_organization_id</td> | ||
<td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the organisation the patient is registered at',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`),</td> </tr> </tbody> | ||
<td> | </table> | ||
<td> | <h2><span class="mw-headline" id="Sortable_tables">patient_additional</span></h2> | ||
<td> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<td> | <tr> | ||
<th scope="col" width="10%">Column Name</th> | |||
<th scope="col" width="10%">Type</th> | |||
<th scope="col" width="10%">Constraint</th> | |||
<th scope="col" width="10%">Comment</th> | |||
</tr> | |||
<tbody> | |||
<tr> | |||
<td>json_value</td> | |||
<td>json</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'where there is no mapped value_id, just raw JSON',</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td> | <td>bigint</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'same as the id column on the patient table ',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>property_id</td> | ||
<td> | <td>int</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'IM reference (e.g. Cause of death)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>value_id</td> | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'IM reference (e.g. COVID)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>text_value</td> | ||
<td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'where there is no mapped value_id or raw JSON, just a basic text value (i.e. GP Practitioner number)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>PRIMARY KEY CONSTRAINT(s) `id`,`property_id`),</td> </tr> </tbody> | ||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">patient_address</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 1,917: | Line 1,720: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td> | <td>address_line_2</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The second line of the address',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>patient_id</td> | ||
<td> | <td>bigint</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT '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> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>lsoa_2001_code</td> | ||
<td> | <td>varchar(9)</td> | ||
<td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'A reference to the LSOA_2001 code',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>city</td> | ||
<td> | <td>varchar(255)</td> | ||
<td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The city',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>address_line_4</td> | ||
<td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The fourth line of the address',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>msoa_2001_code</td> | ||
<td>varchar(9)</td> | <td>varchar(9)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'A reference to the | <td> COMMENT 'A reference to the MSOA_2001 code',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>postcode</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The postcode',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>Id</td> | ||
<td> | <td>bigint</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Unique Id of the address',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>person_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Unique individual across all organisations',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>address_line_3</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The third line of the address',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>townsend_deprivation_index</td> | ||
<td> | <td>double</td> | ||
<td>DEFAULT NULL | <td>DEFAULT NULL,</td> | ||
<td></td> | |||
<td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>msoa_2011_code</td> | ||
<td>varchar(9)</td> | <td>varchar(9)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'A reference to the MSOA_2011 code',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>start_date</td> | ||
<td> | <td>date</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The start date of this address being relevant',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,042: | Line 1,805: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The end date of this address being relevant',</td> | <td> COMMENT 'The end date of this address being relevant',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>ward_code</td> | ||
<td>varchar(9)</td> | <td>varchar(9)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The ward the address belongs to',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>use_concept_id</td> | ||
<td> | <td>int</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'use of address (e.g. home, temporary)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>address_line_1</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The first line of the address',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>organization_id</td> | ||
<td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Owning organisation (i.e. publisher)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>lsoa_2011_code</td> | ||
<td>varchar( | <td>varchar(9)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'A reference to the LSOA_2011 code',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>local_authority_code</td> | ||
<td>varchar(9)</td> | <td>varchar(9)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The local authority the address belongs to',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>PRIMARY KEY CONSTRAINT(s) `organization_id`,`Id`,`patient_id`,`person_id`),</td> </tr> </tbody> | ||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">patient_address_match</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 2,116: | Line 1,852: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td> | <td>latitude</td> | ||
<td> | <td>double</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>match_pattern_street</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | <td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>abp_address_postcode</td> | ||
<td>varchar(10)</td> | |||
<td>varchar( | |||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | <td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>abp_address_organization</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | <td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>abp_address_street</td> | ||
<td>varchar( | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | <td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>longitude</td> | ||
<td>double</td> | |||
<td>DEFAULT NULL,</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>match_date</td> | |||
<td>datetime</td> | |||
<td>DEFAULT NULL,</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>match_pattern_postcode</td> | |||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | <td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>patient_address_id</td> | ||
<td>varchar( | <td>bigint</td> | ||
<td>NOT NULL,</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>qualifier</td> | |||
<td>varchar(50)</td> | |||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | <td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>algorithm_version</td> | ||
<td>varchar( | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | <td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>uprn_xcoordinate</td> | ||
<td>double</td> | <td>double</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>uprn_ycoordinate</td> | ||
<td> | <td>double</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>match_pattern_building</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | <td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>uprn_property_classification</td> | ||
<td> | <td>varchar(45)</td> | ||
<td>CHARACTER SET</td> | |||
<td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | |||
</tr> | |||
<tr> | |||
<td>status</td> | |||
<td>tinyint(1)</td> | |||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>abp_address_locality</td> | ||
<td>varchar( | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | <td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>uprn</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,</td> | <td> utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td> | <td>bigint</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> | <td> AUTO_INCREMENT,</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,250: | Line 1,973: | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | <td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,257: | Line 1,979: | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | <td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>uprn_ralf00</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td> | <td>DEFAULT NULL,</td> | ||
<td></td> | |||
<td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>abp_address_town</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | <td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>epoch</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> utf8mb3 COLLATE | <td> utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>match_pattern_flat</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | <td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>abp_address_number</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>CHARACTER SET</td> | <td>CHARACTER SET</td> | ||
<td> utf8mb3 COLLATE | <td> utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,</td> | ||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>PRIMARY KEY CONSTRAINT(s) `id`),</td> </tr> </tbody> | |||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">patient_address_ralf</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 2,310: | Line 2,020: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td> | <td>organization_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL,</td> | <td>NOT NULL,</td> | ||
<td></td> | <td></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>patient_address_match_uprn_ralf00</td> | ||
<td>varchar( | <td>varchar(255)</td> | ||
<td>NOT NULL,</td> | <td>NOT NULL,</td> | ||
<td></td> | <td></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>person_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL,</td> | <td>NOT NULL,</td> | ||
<td></td> | <td></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>ralf</td> | ||
<td> | <td>varchar(255)</td> | ||
<td>NOT NULL,</td> | <td>NOT NULL,</td> | ||
<td></td> | <td></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>patient_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL,</td> | <td>NOT NULL,</td> | ||
<td></td> | <td></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>patient_address_id</td> | ||
<td> | <td>bigint</td> | ||
<td>NOT NULL,</td> | <td>NOT NULL,</td> | ||
<td></td> | <td></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>salt_name</td> | ||
<td> | <td>varchar(50)</td> | ||
<td>NOT NULL,</td> | <td>NOT NULL,</td> | ||
<td></td> | <td></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td> | <td>bigint</td> | ||
<td>NOT NULL,</td> | <td>NOT NULL,</td> | ||
<td></td> | <td></td> | ||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>PRIMARY KEY CONSTRAINT(s) `id`,`patient_address_id`,`patient_address_match_uprn_ralf00`),</td> </tr> </tbody> | |||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">patient_contact</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 2,378: | Line 2,080: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | |||
<td>value</td> | |||
<td>varchar(255)</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'The value of the contact information eg phone number, email address',</td> | |||
</tr> | |||
<tr> | <tr> | ||
<td>patient_id</td> | <td>patient_id</td> | ||
Line 2,386: | Line 2,093: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT '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> COMMENT '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> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>end_date</td> | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The end date of the contact being valid',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>organization_id</td> | ||
<td> | <td>bigint</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Owning organisation (i.e. publisher)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>use_concept_id</td> | <td>person_id</td> | ||
<td>int</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | |||
<td> COMMENT 'Unique individual across all organisations',</td> | |||
</tr> | |||
<tr> | |||
<td>id</td> | |||
<td>bigint</td> | |||
<td>NOT NULL</td> | |||
<td> COMMENT 'Unique Id of the patient contact',</td> | |||
</tr> | |||
<tr> | |||
<td>use_concept_id</td> | |||
<td>int</td> | |||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'use of contact (e.g. mobile, home,work',</td> | <td> COMMENT 'use of contact (e.g. mobile, home,work',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,414: | Line 2,129: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'type of contact (e.g. phone, email)',</td> | <td> COMMENT 'type of contact (e.g. phone, email)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>start_date</td> | ||
<td>date</td> | <td>date</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The start date of the contact being valid',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>PRIMARY KEY CONSTRAINT(s) `organization_id`,`id`,`patient_id`,`person_id`),</td> </tr> </tbody> | ||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">patient_pseudo_id</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 2,453: | Line 2,146: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td> | <td>person_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the person this registration status history belongs to',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>is_nhs_number_verified_by_publisher</td> | ||
<td> | <td>tinyint(1)</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Whether the nhs number has been verified by the publisher',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Unique Id of the patient pseudo id',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,482: | Line 2,171: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Owning organisation (i.e. publisher)',</td> | <td> COMMENT 'Owning organisation (i.e. publisher)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>Skid</td> | ||
<td> | <td>varchar(255)</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT '"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> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,503: | Line 2,183: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Reference to the patient this registration status history belongs to',</td> | <td> COMMENT 'Reference to the patient this registration status history belongs to',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>salt_name</td> | ||
<td> | <td>varchar(50)</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The name of the salt used to create the pseudo id',</td> | ||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>is_nhs_number_valid</td> | |||
<td>tinyint(1)</td> | |||
<td>NOT NULL</td> | |||
<td> COMMENT 'Whether the nhs number is valid',</td> | |||
</tr> | |||
<tr> | |||
<td>PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`),</td> </tr> </tbody> | |||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">patient_uprn</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 2,521: | Line 2,206: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
Line 2,529: | Line 2,213: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT '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> COMMENT '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> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>match</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>person_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Unique individual across all organisations',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>algorithm</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,564: | Line 2,237: | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>uprn</td> | ||
<td> | <td>bigint</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>qualifier</td> | ||
<td> | <td>varchar(50)</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>missing_postcode</td> | ||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>organization_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Owning organisation (i.e. publisher)',</td> | ||
<td> | </tr> | ||
<tr> | |||
<td>invalid_address</td> | |||
<td>tinyint(1)</td> | |||
<td>DEFAULT NULL,</td> | |||
<td></td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>invalid_postcode</td> | ||
<td> | <td>tinyint(1)</td> | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td></td> | ||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`patient_id`),</td> </tr> </tbody> | |||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">person</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 2,610: | Line 2,284: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | |||
<td>last_name</td> | |||
<td>varchar(255)</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'The last name of the person',</td> | |||
</tr> | |||
<tr> | <tr> | ||
<td>title</td> | <td>title</td> | ||
Line 2,618: | Line 2,297: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The title of the person',</td> | <td> COMMENT 'The title of the person',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>date_of_death</td> | ||
<td> | <td>date</td> | ||
<td>DEFAULT NULL | <td>DEFAULT NULL</td> | ||
<td> | <td> COMMENT 'The date of death of the person',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>registered_practice_organization_id</td> | ||
<td>bigint</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'Reference to the organisation the person is registered at',</td> | |||
<td>bigint | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'Reference to the | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,653: | Line 2,315: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The date of birth of the person',</td> | <td> COMMENT 'The date of birth of the person',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>birth_week</td> | ||
<td> | <td>tinyint</td> | ||
<td>DEFAULT NULL | <td>DEFAULT NULL,</td> | ||
<td></td> | |||
<td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,667: | Line 2,327: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The NHS number of the person',</td> | <td> COMMENT 'The NHS number of the person',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>organization_id</td> | ||
<td> | <td>bigint</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Owning organisation (i.e. publisher)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>first_names</td> | ||
<td>varchar(255)</td> | <td>varchar(255)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The first names of the person',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,688: | Line 2,345: | ||
<td>DEFAULT NULL,</td> | <td>DEFAULT NULL,</td> | ||
<td></td> | <td></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>ethnic_code_concept_id</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the ethnicity of the person',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Unique Id of the person',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>current_address_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the current address of the person',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>gender_concept_id</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the | <td> COMMENT 'Reference to the gender of the person',</td> | ||
<td> | </tr> | ||
<tr> | |||
<td>birth_month</td> | |||
<td>tinyint</td> | |||
<td>DEFAULT NULL,</td> | |||
<td></td> | |||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>PRIMARY KEY CONSTRAINT(s) `id`),</td> </tr> </tbody> | |||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">practitioner</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 2,727: | Line 2,386: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Unique Id of the practitioner',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,742: | Line 2,399: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Name of the practitioner',</td> | <td> COMMENT 'Name of the practitioner',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>organization_id</td> | ||
<td> | <td>bigint</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Owning organisation (i.e. publisher)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,756: | Line 2,411: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The GMC code of the practitioner',</td> | <td> COMMENT 'The GMC code of the practitioner',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,770: | Line 2,417: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The code representing the role of the practitioner',</td> | <td> COMMENT 'The code representing the role of the practitioner',</td> | ||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>role_desc</td> | |||
<td>varchar(255)</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'Textual description of the role of the practitioner eg General Medical Practitioner',</td> | |||
</tr> | |||
<tr> | |||
<td>PRIMARY KEY CONSTRAINT(s) `id`),</td> </tr> </tbody> | |||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">procedure_request</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 2,781: | Line 2,434: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | |||
<td>clinical_effective_date</td> | |||
<td>date</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'The date the procedure was administered by a clinician',</td> | |||
</tr> | |||
<tr> | <tr> | ||
<td>patient_id</td> | <td>patient_id</td> | ||
Line 2,789: | Line 2,447: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT '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> COMMENT '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> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>core_concept_id</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the clinical coding of the procedure',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>person_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Unique individual across all organisations',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,810: | Line 2,465: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The clinician the activity is recorded against',</td> | <td> COMMENT 'The clinician the activity is recorded against',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>date_precision_concept_id</td> | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>encounter_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the encounter the procedure was administered at',</td> | ||
<td> | </tr> | ||
<tr> | |||
<td>status_concept_id</td> | |||
<td>int</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'Reference to the status of the procedure',</td> | |||
</tr> | |||
<tr> | |||
<td>non_core_concept_id</td> | |||
<td>int</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'Reference to the clinical coding of the procedure',</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,831: | Line 2,495: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Owning organisation (i.e. publisher)',</td> | <td> COMMENT 'Owning organisation (i.e. publisher)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>age_at_event</td> | ||
<td> | <td>decimal(5,2)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The | <td> COMMENT 'The age of the patient at the time of the procedure',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,845: | Line 2,507: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The date the procedure was recorded in the source system',</td> | <td> COMMENT 'The date the procedure was recorded in the source system',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Unique | <td> COMMENT 'Unique Id of the procedure',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`),</td> </tr> </tbody> | ||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">referral_request</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 2,884: | Line 2,524: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td>clinical_effective_date</td> | <td>clinical_effective_date</td> | ||
Line 2,899: | Line 2,531: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The date the referral was made',</td> | <td> COMMENT 'The date the referral was made',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>is_review</td> | ||
<td> | <td>tinyint(1)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Whether this referral is a review',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>outgoing_referral</td> | <td>patient_id</td> | ||
<td>bigint</td> | |||
<td>NOT NULL</td> | |||
<td> COMMENT '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> | |||
</tr> | |||
<tr> | |||
<td>requester_organization_id</td> | |||
<td>bigint</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'Reference to the organisation that made the refereral request',</td> | |||
</tr> | |||
<tr> | |||
<td>outgoing_referral</td> | |||
<td>tinyint(1)</td> | <td>tinyint(1)</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Whether this is an outgoing referral',</td> | <td> COMMENT 'Whether this is an outgoing referral',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,920: | Line 2,561: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the clinical coding of the referral',</td> | <td> COMMENT 'Reference to the clinical coding of the referral',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>referral_request_type_concept_id</td> | ||
<td>int</td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the | <td> COMMENT 'Reference to the type of referral request',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,948: | Line 2,573: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the priority of the referral',</td> | <td> COMMENT 'Reference to the priority of the referral',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>encounter_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the encounter the referral was made in',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>person_id</td> | ||
<td> | <td>bigint</td> | ||
<td>NOT NULL</td> | |||
<td> COMMENT 'Unique individual across all organisations',</td> | |||
</tr> | |||
<tr> | |||
<td>Mode</td> | |||
<td>varchar(50)</td> | |||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The mode of the referral',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>practitioner_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The clinician the activity is recorded against',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>recipient_organization_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the organization receiving the referral',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,990: | Line 2,609: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The date the referral request was added to the source system',</td> | <td> COMMENT 'The date the referral request was added to the source system',</td> | ||
<td> | </tr> | ||
<tr> | |||
<td>age_at_event</td> | |||
<td>decimal(5,2)</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'The age of the patient at the time of the referral',</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 2,997: | Line 2,621: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)',</td> | <td> COMMENT 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>organization_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Owning organisation (i.e. publisher)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>core_concept_id</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Reference to the clinical coding of the referral',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Unique Id of the referral',</td> | ||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`),</td> </tr> </tbody> | |||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">registration_status_history</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 3,029: | Line 2,650: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | <tr> | ||
<td> | <td>person_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | |||
<td> COMMENT 'Reference to the person this registration status history belongs to',</td> | |||
</tr> | |||
<tr> | |||
<td>start_date</td> | |||
<td>datetime</td> | |||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'The start date for the period this registration status history was valid',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>id</td> | ||
<td> | <td>bigint</td> | ||
<td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Unique Id of the registration status history',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 3,051: | Line 2,675: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Owning organisation (i.e. publisher)',</td> | <td> COMMENT 'Owning organisation (i.e. publisher)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>registration_status_concept_id</td> | ||
<td> | <td>int</td> | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Reference to the registration status',</td> | |||
<td> COMMENT 'Reference to | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 3,079: | Line 2,687: | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT 'Reference to the patient this registration status history belongs to',</td> | <td> COMMENT 'Reference to the patient this registration status history belongs to',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 3,086: | Line 2,693: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The end date for the period this registration status history was valid',</td> | <td> COMMENT 'The end date for the period this registration status history was valid',</td> | ||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>episode_of_care_id</td> | |||
<td>bigint</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'Reference to the episode of care this status history belongs to',</td> | |||
</tr> | |||
<tr> | |||
<td>PRIMARY KEY CONSTRAINT(s) `organization_id`,`id`,`patient_id`,`person_id`),</td> </tr> </tbody> | |||
</table> | </table> | ||
<h2><span class="mw-headline" id="Sortable_tables"> | <h2><span class="mw-headline" id="Sortable_tables">schedule</span></h2> | ||
<table class="sortable" border="1" style="border-collapse:collapse"> | <table class="sortable" border="1" style="border-collapse:collapse"> | ||
<tr> | <tr> | ||
Line 3,097: | Line 2,710: | ||
<th scope="col" width="10%">Constraint</th> | <th scope="col" width="10%">Constraint</th> | ||
<th scope="col" width="10%">Comment</th> | <th scope="col" width="10%">Comment</th> | ||
</tr> | </tr> | ||
<tbody> | <tbody> | ||
<tr> | |||
<td>id</td> | |||
<td>bigint</td> | |||
<td>NOT NULL</td> | |||
<td> COMMENT 'Unique Id of the schedule',</td> | |||
</tr> | |||
<tr> | |||
<td>practitioner_id</td> | |||
<td>bigint</td> | |||
<td>DEFAULT NULL</td> | |||
<td> COMMENT 'Reference to the practitioner who owns the schedule',</td> | |||
</tr> | |||
<tr> | <tr> | ||
<td>start_date</td> | <td>start_date</td> | ||
Line 3,105: | Line 2,729: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The start date of the schedule',</td> | <td> COMMENT 'The start date of the schedule',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>organization_id</td> | ||
<td>bigint</td> | <td>bigint</td> | ||
<td>NOT NULL</td> | <td>NOT NULL</td> | ||
<td> COMMENT ' | <td> COMMENT 'Owning organisation (i.e. publisher)',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 3,119: | Line 2,741: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The name of the schedule',</td> | <td> COMMENT 'The name of the schedule',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 3,133: | Line 2,747: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'The type of schedule eg Timed Appointments',</td> | <td> COMMENT 'The type of schedule eg Timed Appointments',</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 3,147: | Line 2,753: | ||
<td>DEFAULT NULL</td> | <td>DEFAULT NULL</td> | ||
<td> COMMENT 'Textual description of the location the schedule was held at',</td> | <td> COMMENT 'Textual description of the location the schedule was held at',</td> | ||
</tr> | </tr> | ||
</tbody> | <tr> | ||
<td>PRIMARY KEY CONSTRAINT(s) `organization_id`,`id`),</td> </tr> </tbody> | |||
</table> | </table> |
Revision as of 13:28, 23 November 2022
Remote Subscriber Database (RSD) Schema (Compass 2) Version: v2.1.2
allergy_intolerance
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
encounter_id | bigint | DEFAULT NULL | COMMENT 'Reference to the encounter this allergy was record in', |
patient_id | bigint | NOT NULL | COMMENT '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', |
non_core_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the clinical coding of the allergy', |
id | bigint | NOT NULL | COMMENT 'Unique Id of the allergy', |
date_recorded | datetime | NOT NULL | COMMENT 'The date the allergy was recorded', |
core_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the clinical coding of the allergy', |
person_id | bigint | NOT NULL | COMMENT 'Unique individual across all organisations', |
practitioner_id | bigint | DEFAULT NULL | COMMENT 'The clinician the activity is recorded against', |
date_precision_concept_id | int | DEFAULT NULL | COMMENT 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)', |
is_review | tinyint(1) | NOT NULL | COMMENT 'Is this instance of the code a review of a previous encounter', |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
clinical_effective_date | date | DEFAULT NULL | COMMENT 'The date the clinical code is recorded for', |
age_at_event | decimal(5,2) | DEFAULT NULL | COMMENT 'The age the patient was at the time of this event', |
PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`), |
appointment
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
patient_id | bigint | NOT NULL | COMMENT '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', |
appointment_status_concept_id | int | DEFAULT NULL | COMMENT 'The status of the appointment e.g. arrived/sent in/left/DNA', |
patient_wait | int | DEFAULT NULL | COMMENT 'How long the patient waited from being marked as arrived to being sent in', |
date_time_sent_in | datetime | DEFAULT NULL | COMMENT 'Date and time the patient was sent into the practitioner', |
id | bigint | NOT NULL | COMMENT 'Unique Id of the appointment', |
source_id | varchar(36) | DEFAULT NULL | COMMENT 'Unique reference to the source of the appointment', |
person_id | bigint | NOT NULL | COMMENT 'Unique individual across all organisations', |
practitioner_id | bigint | DEFAULT NULL | COMMENT 'The clinician the activity is recorded against', |
actual_duration | int | DEFAULT NULL | COMMENT 'Time between sent in and left always in minutes', |
planned_duration | int | DEFAULT NULL | COMMENT 'The time allocated for the appointment, not necessarily the actual duration always in minutes', |
start_date | date | DEFAULT NULL | COMMENT 'The start date of the appointment', |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
patient_delay | int | DEFAULT NULL | COMMENT 'How long the patient was delayed for', |
date_time_left | datetime | DEFAULT NULL | COMMENT 'Date and time the patient left the practitioner', |
schedule_id | bigint | DEFAULT NULL | COMMENT 'The schedule the patient was put on to book multiple appointments. ID unique to the applied schedule', |
cancelled_date | datetime | DEFAULT NULL | COMMENT 'The date the appointment was cancelled', |
PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`), |
appointment_additional
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
json_value | json | DEFAULT NULL | COMMENT 'where there is no mapped value_id, just raw JSON', |
id | bigint | NOT NULL | COMMENT 'same as the id column on the patient table ', |
text_value | varchar(255) | DEFAULT NULL | COMMENT 'where there is no mapped value_id or raw JSON, just a basic text value (i.e. GP Practitioner number)', |
property_id | int | NOT NULL | COMMENT 'IM reference (e.g. appointment type)', |
value_id | int | DEFAULT NULL | COMMENT 'IM reference (e.g. Appointment Type)', |
PRIMARY KEY CONSTRAINT(s) `id`,`property_id`), |
concept
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
Code | varchar(40) | DEFAULT NULL | COMMENT 'The code (non-unique unless coupled with a scheme)', |
Id | varchar(150) | NOT NULL | COMMENT 'Unique concept identifier', |
dbid | int | NOT NULL | COMMENT 'Unique Id of the concept', |
Document | int | NOT NULL | COMMENT 'Concept grouping construct, deprecated', |
Scheme | bigint | DEFAULT NULL | COMMENT 'The coding scheme for the code (Read, CTV3, SNOMED etc)', |
Draft | tinyint(1) | NOT NULL | COMMENT 'Whether its draft/autocreated or confirmed as a "proper" concept', |
Description | varchar(400) | DEFAULT NULL | COMMENT 'Full name (or term for ontological concepts)', |
use_count | bigint | NOT NULL | DEFAULT '0' COMMENT 'Rough indicator of number of occurences of the concept', |
updated | datetime | NOT NULL | COMMENT 'The timestamp of the last update to the concept', |
Name | varchar(255) | DEFAULT NULL | COMMENT 'Short name', |
PRIMARY KEY CONSTRAINT(s) `dbid`), |
concept_map
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
legacy | int | NOT NULL | COMMENT 'the legacy (read 2, ctv3, icd10, opcs4, emis local, etc) concept', |
updated | datetime | NOT NULL | COMMENT 'Timestamp the map was last updated/added', |
core | int | NOT NULL | COMMENT 'the core (snomed, discovery) concept that the legacy concept maps to', |
id | int | NOT NULL, | |
deleted | tinyint(1) | DEFAULT NULL, | |
PRIMARY KEY CONSTRAINT(s) `id`), |
diagnostic_order
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
problem_end_date | date | DEFAULT NULL | COMMENT 'The end date of the problem', |
is_primary | tinyint(1) | DEFAULT NULL | COMMENT 'Whether the diagnostic order is a primary order', |
result_value_units | varchar(50) | DEFAULT NULL | COMMENT 'The units of the result of the observation', |
episodicity_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the episodicity of the problem eg First, review, flare', |
clinical_effective_date | date | DEFAULT NULL | COMMENT 'The date the diagnostic order was identified by a clinician', |
result_text | text | COMMENT 'Any | text associated with the result', |
id | bigint | NOT NULL | COMMENT 'Unique Id of the diagnostic order', |
result_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the clinical coding of the result', |
person_id | bigint | NOT NULL | COMMENT 'Unique individual across all organisations', |
practitioner_id | bigint | DEFAULT NULL | COMMENT 'The clinician the activity is recorded against', |
is_problem | tinyint(1) | NOT NULL | COMMENT 'Whether the observation is marked as a problem', |
result_value | double | DEFAULT NULL | COMMENT 'The value of the result of the observation', |
result_date | date | DEFAULT NULL | COMMENT 'The date of the result', |
non_core_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the clinical coding of the observation', |
core_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the clinical coding of the observation', |
patient_id | bigint | NOT NULL | COMMENT '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', |
date_recorded | datetime | DEFAULT NULL, | |
is_review | tinyint(1) | NOT NULL | COMMENT 'Whether the observation is a review of an existing problem', |
date_precision_concept_id | int | DEFAULT NULL | COMMENT 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)', |
parent_observation_id | bigint | DEFAULT NULL | COMMENT 'Reference to the parent observation in a complex observation eg systolic and diastolic blood pressures will have a parent observation of Blood pressure', |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
age_at_event | decimal(5,2) | DEFAULT NULL | COMMENT 'The age of the patient at the time of the observation', |
encounter_id | bigint | DEFAULT NULL | COMMENT 'Reference to the encounter the observation was recorded at', |
PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`), |
encounter
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
appointment_id | bigint | DEFAULT NULL | COMMENT 'Reference to the appointment this encounter took part on', |
sub_type | text | COMMENT 'Unused', | |
institution_location_id | text | COMMENT 'Reference | to the institution the encounter took place at', |
patient_id | bigint | NOT NULL | COMMENT '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', |
core_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the type of encounter', |
non_core_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the type of encounter', |
person_id | bigint | NOT NULL | COMMENT 'Unique individual across all organisations', |
practitioner_id | bigint | DEFAULT NULL | COMMENT 'The clinician the activity is recorded against', |
date_recorded | datetime | DEFAULT NULL | COMMENT 'The date the encounter was recorded', |
date_precision_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the precision of the date of the encounter', |
admission_method | varchar(40) | DEFAULT NULL | COMMENT 'The admission method of the encounter', |
episode_of_care_id | bigint | DEFAULT NULL | COMMENT 'Is this instance of the code a review of a previous encounter', |
id | bigint | NOT NULL | COMMENT 'Unique Id of the encounter', |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
age_at_event | decimal(5,2) | DEFAULT NULL | COMMENT 'The age the patient was when this encounter took place', |
clinical_effective_date | date | DEFAULT NULL | COMMENT 'The date the clinical code is recorded for', |
service_provider_organization_id | bigint | DEFAULT NULL | COMMENT 'Reference to the service provider organisation', |
end_date | date | DEFAULT NULL | COMMENT 'The end date of the encounter', |
Type | text | COMMENT 'Unused', | |
PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`), |
encounter_additional
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
text_value | varchar(255) | DEFAULT NULL | COMMENT 'where there is no mapped value_id, or raw JSON, just a basic text value (i.e. FIN number)', |
json_value | json | DEFAULT NULL | COMMENT 'where there is no mapped value_id, just raw JSON (i.e. birth delivery details)', |
id | bigint | NOT NULL | COMMENT 'same as the id column on the encounter table', |
value_id | int | DEFAULT NULL | COMMENT 'IM concept id reference (i.e. Emergency admission)', |
property_id | int | NOT NULL | COMMENT 'IM concept id reference (i.e. Admission method)', |
PRIMARY KEY CONSTRAINT(s) `id`,`property_id`), |
encounter_event
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
appointment_id | bigint | DEFAULT NULL | COMMENT 'Reference to the appointment this encounter took part on', |
id | bigint | NOT NULL | COMMENT 'Unique Id of the encounter event', |
sub_type | text | COMMENT 'Unused', | |
episode_of_care_id | bigint | DEFAULT NULL | COMMENT 'Reference to the episode of care this encounter belongs to', |
core_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the type of encounter', |
non_core_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the type of encounter', |
clinical_effective_date | datetime | DEFAULT NULL | COMMENT 'The date the encounter took place', |
practitioner_id | bigint | DEFAULT NULL | COMMENT 'The clinician the activity is recorded against', |
date_recorded | datetime | DEFAULT NULL | COMMENT 'The date the encounter was recorded', |
date_precision_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the precision of the date of the encounter', |
admission_method | varchar(40) | DEFAULT NULL | COMMENT 'The admission method of the encounter', |
institution_location_id | bigint | DEFAULT NULL | COMMENT 'Reference to the institution the encounter took place at', |
age_at_event | decimal(5,2) | DEFAULT NULL | COMMENT 'The age of the patient at the time of the encounter', |
type | text | COMMENT 'Unused', | |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
person_id | bigint | NOT NULL | COMMENT 'The person this event belongs to', |
service_provider_organization_id | bigint | DEFAULT NULL | COMMENT 'Reference to the service provider organisation', |
end_date | date | DEFAULT NULL | COMMENT 'The end date of the encounter', |
encounter_id | bigint | NOT NULL | COMMENT 'Reference to the parent encounter record', |
patient_id | bigint | NOT NULL | COMMENT 'The patient this event belongs to', |
finished | tinyint(1) | DEFAULT NULL | COMMENT 'Whether the encounter is finished', |
PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`), |
episode_of_care
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
patient_id | bigint | NOT NULL | COMMENT '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', |
usual_gp_practitioner_id | bigint | DEFAULT NULL | COMMENT 'Reference to the usual GP for this episode of care', |
registration_status_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the registration status of the patient', |
date_registered_end | date | DEFAULT NULL | COMMENT 'The date the registration was ended for this episode of care', |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
date_registered | date | DEFAULT NULL | COMMENT 'The date the registration was started for this episode of care', |
person_id | bigint | NOT NULL | COMMENT 'Unique individual across all organisations', |
id | bigint | NOT NULL | COMMENT 'Unique Id of the episode of care', |
registration_type_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the registration type of the patient', |
PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`), |
event_log
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
table_id | tinyint | NOT NULL | COMMENT 'identifier of the table changed', |
dt_change | datetime(3) | NOT NULL | COMMENT 'date time the change was made to this DB', |
change_type | tinyint | NOT NULL | COMMENT 'type of transaction 0=insert, 1=update, 2=delete', |
record_id | bigint | NOT NULL | COMMENT 'id of the record changed' |
flag
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
flag_text | text | COMMENT 'This | is a warning set by the publisher regarding he patient', |
patient_id | bigint | NOT NULL | COMMENT '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', |
is_active | tinyint(1) | NOT NULL | COMMENT 'Whether the flag is active or not', |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
effective_date | date | DEFAULT NULL | COMMENT 'The date the flag was entered onto the patients record', |
person_id | bigint | NOT NULL | COMMENT 'Unique individual across all organisations', |
id | bigint | NOT NULL | COMMENT 'Unique Id of the flag', |
date_precision_concept_id | int | DEFAULT NULL | COMMENT 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)', |
PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`), |
location
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
type_desc | varchar(255) | DEFAULT NULL | COMMENT 'Textual description of the type of location eg GP Practice', |
managing_organization_id | bigint | DEFAULT NULL | COMMENT 'Reference to the managing organisation of the location', |
name | varchar(255) | DEFAULT NULL | COMMENT 'The name of a location set by the publisher. E.g. ward, clinic, domiciliary', |
postcode | varchar(10) | DEFAULT NULL | COMMENT 'The postcode of the location', |
type_code | varchar(50) | DEFAULT NULL | COMMENT 'The type of location', |
id | bigint | NOT NULL | COMMENT 'Unique Id of the location', |
PRIMARY KEY CONSTRAINT(s) `id`), |
medication_order
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
patient_id | bigint | NOT NULL | COMMENT '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', |
core_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the clinical coding of the medication', |
duration_days | int | DEFAULT NULL | COMMENT 'How many days the medication is prescribed for', |
bnf_reference | varchar(6) | DEFAULT NULL | COMMENT 'A reference to the drug in the BNF dictionary', |
issue_method | text | COMMENT 'The | issue method of the medication eg hand written', |
dose | varchar(1000) | DEFAULT NULL | COMMENT 'Textual description of the dose', |
estimated_cost | double | DEFAULT NULL | COMMENT 'The estimated cost of the medication', |
person_id | bigint | NOT NULL | COMMENT 'Unique individual across all organisations', |
practitioner_id | bigint | DEFAULT NULL | COMMENT 'The clinician the activity is recorded against', |
medication_statement_id | bigint | DEFAULT NULL | COMMENT 'Reference to the medication statement. A medication statement can have many medication orders', |
id | bigint | NOT NULL | COMMENT 'Unique Id of the medication order', |
date_precision_concept_id | int | DEFAULT NULL | COMMENT 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)', |
non_core_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the clinical coding of the medication', |
quantity_value | double | DEFAULT NULL | COMMENT 'The value of the medication that was prescribed eg 50', |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
clinical_effective_date | date | DEFAULT NULL | COMMENT 'The date the medication order was issued', |
encounter_id | bigint | DEFAULT NULL | COMMENT 'Reference to the encounter the medication order was issued in', |
age_at_event | decimal(5,2) | DEFAULT NULL | COMMENT 'The age the patient was at the time of this event', |
quantity_unit | varchar(255) | DEFAULT NULL | COMMENT 'The unit of the medication that was prescribed eg tablets', |
PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`), |
medication_statement
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
cancellation_date | date | DEFAULT NULL | COMMENT 'The date the medication was cancelled', |
Issue_method | text | COMMENT 'The | issue method of the medication eg hand written', |
patient_id | bigint | NOT NULL | COMMENT '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', |
date_recorded | datetime | DEFAULT NULL, | |
core_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the clinical coding of the medication', |
bnf_reference | varchar(6) | DEFAULT NULL | COMMENT 'A reference to the drug in the BNF dictionary', |
dose | varchar(1000) | DEFAULT NULL | COMMENT 'Texual description of the dose of the medication', |
person_id | bigint | NOT NULL | COMMENT 'Unique individual across all organisations', |
authorisation_type_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the authorisation type', |
practitioner_id | bigint | DEFAULT NULL | COMMENT 'The clinician the activity is recorded against', |
clinical_effective_date | date | DEFAULT NULL | COMMENT 'The date the medication was clinical relevant', |
date_precision_concept_id | int | DEFAULT NULL | COMMENT 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)', |
non_core_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the clinical coding of the medication', |
id | bigint | NOT NULL | COMMENT 'Unique Id of the medication', |
is_active | tinyint(1) | DEFAULT NULL | COMMENT 'Whether the medication is active or not', |
quantity_value | double | DEFAULT NULL | COMMENT 'The value of the medication that was prescribed eg 50', |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
encounter_id | bigint | DEFAULT NULL | COMMENT 'Reference to the encounter this medication was recorded in', |
age_at_event | decimal(5,2) | DEFAULT NULL | COMMENT 'The age the patient was at the time of this event', |
quantity_unit | varchar(255) | DEFAULT NULL | COMMENT 'The unit of the medication that was prescribed eg tablets', |
PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`), |
observation
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
problem_end_date | date | DEFAULT NULL | COMMENT 'The end date of the problem', |
is_primary | tinyint(1) | DEFAULT NULL | COMMENT 'Whether the observation is a primary observation', |
episodicity_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the episodicity of the problem eg First, review, flare', |
result_value_units | varchar(50) | DEFAULT NULL | COMMENT 'The units of the result of the observation', |
result_text | text | COMMENT 'Any | text associated with the result', |
result_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the clinical coding of the result', |
person_id | bigint | NOT NULL | COMMENT 'Unique individual across all organisations', |
practitioner_id | bigint | DEFAULT NULL | COMMENT 'The clinician the activity is recorded against', |
is_problem | tinyint(1) | NOT NULL | COMMENT 'Whether the observation is marked as a problem', |
result_value | double | DEFAULT NULL | COMMENT 'The value of the result of the observation', |
result_date | date | DEFAULT NULL | COMMENT 'The date of the result', |
non_core_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the clinical coding of the observation', |
core_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the clinical coding of the observation', |
patient_id | bigint | NOT NULL | COMMENT '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', |
date_recorded | datetime | DEFAULT NULL | COMMENT 'The date the observation was recorded in the system', |
is_review | tinyint(1) | NOT NULL | COMMENT 'Whether the observation is a review of an existing problem', |
date_precision_concept_id | int | DEFAULT NULL | COMMENT 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)', |
parent_observation_id | bigint | DEFAULT NULL | COMMENT 'Reference to the parent observation in a complex observation eg systolic and diastolic blood pressures will have a parent observation of Blood pressure', |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
id | bigint | NOT NULL | COMMENT 'Unique Id of the observation', |
age_at_event | decimal(5,2) | DEFAULT NULL | COMMENT 'The age of the patient at the time of the observation', |
encounter_id | bigint | DEFAULT NULL | COMMENT 'Reference to the encounter the observation was recorded at', |
clinical_effective_date | date | DEFAULT NULL | COMMENT 'The date the observation was identified by a clinician', |
PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`), |
observation_additional
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
property_id | int | NOT NULL | COMMENT 'IM reference (i.e. significance)', |
text_value | varchar(255) | DEFAULT NULL | COMMENT 'where there is no mapped value_id or raw JSON, just a basic text value', |
id | bigint | NOT NULL | COMMENT 'same as the id column on the observation table', |
json_value | json | DEFAULT NULL | COMMENT 'the JSON data itself ', |
value_id | int | DEFAULT NULL | COMMENT 'IM reference (i.e. minor, significant)', |
PRIMARY KEY CONSTRAINT(s) `id`,`property_id`), |
organization
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
id | bigint | NOT NULL | COMMENT 'Unique Id of the organisation', |
Name | varchar(255) | DEFAULT NULL | COMMENT 'Name of the organisation', |
type_desc | varchar(255) | DEFAULT NULL | COMMENT 'Textual description of the type of organisation eg GP Practice', |
ods_code | varchar(50) | DEFAULT NULL | COMMENT 'ODS Code of the organisation', |
type_code | varchar(50) | DEFAULT NULL | COMMENT 'The type of organisation', |
Postcode | varchar(10) | DEFAULT NULL | COMMENT 'The postcode of the organisation', |
parent_organization_id | bigint | DEFAULT NULL | COMMENT 'The id of the parent organisation', |
PRIMARY KEY CONSTRAINT(s) `id`), |
organization_metadata
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
last_data_to_dds | datetime | DEFAULT NULL | COMMENT 'date time data was last sent to DDS', |
publishing_software | varchar(50) | NOT NULL | COMMENT 'software name of publishing system, i.e. SystmOne', |
id | bigint | NOT NULL | COMMENT 'organisation ID, corresponds to same ID in the organizaton table', |
last_data_cutoff | datetime | DEFAULT NULL | COMMENT 'cutoff date time of the last extract from the publishing system', |
PRIMARY KEY CONSTRAINT(s) `id`,`publishing_software`) |
patient
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
date_of_death | date | DEFAULT NULL | COMMENT 'The date of death of the patient', |
current_address_id | bigint | DEFAULT NULL | COMMENT 'Reference to the current address of the patient', |
date_of_birth | date | DEFAULT NULL | COMMENT 'The date of birth of the patient', |
title | varchar(255) | DEFAULT NULL | COMMENT 'The title of the patient', |
person_id | bigint | NOT NULL | COMMENT 'Unique individual across all organisations', |
nhs_number | varchar(255) | DEFAULT NULL | COMMENT 'The NHS number of the patient', |
gender_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the gender of the patient', |
birth_week | tinyint | DEFAULT NULL, | |
first_names | varchar(255) | DEFAULT NULL | COMMENT 'The first names of the patient', |
last_name | varchar(255) | DEFAULT NULL | COMMENT 'The last name of the patient', |
id | bigint | NOT NULL | COMMENT 'Unique Id of the patient', |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
birth_year | smallint | DEFAULT NULL, | |
ethnic_code_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the ethnicity of the patient', |
birth_month | tinyint | DEFAULT NULL, | |
registered_practice_organization_id | bigint | DEFAULT NULL | COMMENT 'Reference to the organisation the patient is registered at', |
PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`), |
patient_additional
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
json_value | json | DEFAULT NULL | COMMENT 'where there is no mapped value_id, just raw JSON', |
id | bigint | NOT NULL | COMMENT 'same as the id column on the patient table ', |
property_id | int | NOT NULL | COMMENT 'IM reference (e.g. Cause of death)', |
value_id | int | DEFAULT NULL | COMMENT 'IM reference (e.g. COVID)', |
text_value | varchar(255) | DEFAULT NULL | COMMENT 'where there is no mapped value_id or raw JSON, just a basic text value (i.e. GP Practitioner number)', |
PRIMARY KEY CONSTRAINT(s) `id`,`property_id`), |
patient_address
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
address_line_2 | varchar(255) | DEFAULT NULL | COMMENT 'The second line of the address', |
patient_id | bigint | NOT NULL | COMMENT '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', |
lsoa_2001_code | varchar(9) | DEFAULT NULL | COMMENT 'A reference to the LSOA_2001 code', |
city | varchar(255) | DEFAULT NULL | COMMENT 'The city', |
address_line_4 | varchar(255) | DEFAULT NULL | COMMENT 'The fourth line of the address', |
msoa_2001_code | varchar(9) | DEFAULT NULL | COMMENT 'A reference to the MSOA_2001 code', |
postcode | varchar(255) | DEFAULT NULL | COMMENT 'The postcode', |
Id | bigint | NOT NULL | COMMENT 'Unique Id of the address', |
person_id | bigint | NOT NULL | COMMENT 'Unique individual across all organisations', |
address_line_3 | varchar(255) | DEFAULT NULL | COMMENT 'The third line of the address', |
townsend_deprivation_index | double | DEFAULT NULL, | |
msoa_2011_code | varchar(9) | DEFAULT NULL | COMMENT 'A reference to the MSOA_2011 code', |
start_date | date | NOT NULL | COMMENT 'The start date of this address being relevant', |
end_date | date | DEFAULT NULL | COMMENT 'The end date of this address being relevant', |
ward_code | varchar(9) | DEFAULT NULL | COMMENT 'The ward the address belongs to', |
use_concept_id | int | NOT NULL | COMMENT 'use of address (e.g. home, temporary)', |
address_line_1 | varchar(255) | DEFAULT NULL | COMMENT 'The first line of the address', |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
lsoa_2011_code | varchar(9) | DEFAULT NULL | COMMENT 'A reference to the LSOA_2011 code', |
local_authority_code | varchar(9) | DEFAULT NULL | COMMENT 'The local authority the address belongs to', |
PRIMARY KEY CONSTRAINT(s) `organization_id`,`Id`,`patient_id`,`person_id`), |
patient_address_match
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
latitude | double | DEFAULT NULL, | |
match_pattern_street | varchar(255) | CHARACTER SET | utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, |
abp_address_postcode | varchar(10) | CHARACTER SET | utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, |
abp_address_organization | varchar(255) | CHARACTER SET | utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, |
abp_address_street | varchar(255) | CHARACTER SET | utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, |
longitude | double | DEFAULT NULL, | |
match_date | datetime | DEFAULT NULL, | |
match_pattern_postcode | varchar(255) | CHARACTER SET | utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, |
patient_address_id | bigint | NOT NULL, | |
qualifier | varchar(50) | CHARACTER SET | utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, |
algorithm_version | varchar(255) | CHARACTER SET | utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, |
uprn_xcoordinate | double | DEFAULT NULL, | |
uprn_ycoordinate | double | DEFAULT NULL, | |
match_pattern_building | varchar(255) | CHARACTER SET | utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, |
uprn_property_classification | varchar(45) | CHARACTER SET | utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, |
status | tinyint(1) | DEFAULT NULL, | |
abp_address_locality | varchar(255) | CHARACTER SET | utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, |
uprn | varchar(255) | CHARACTER SET | utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL, |
id | bigint | NOT NULL | AUTO_INCREMENT, |
match_pattern_number | varchar(255) | CHARACTER SET | utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, |
match_rule | varchar(4096) | CHARACTER SET | utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, |
uprn_ralf00 | varchar(255) | DEFAULT NULL, | |
abp_address_town | varchar(255) | CHARACTER SET | utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, |
epoch | varchar(255) | CHARACTER SET | utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL, |
match_pattern_flat | varchar(255) | CHARACTER SET | utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, |
abp_address_number | varchar(255) | CHARACTER SET | utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, |
PRIMARY KEY CONSTRAINT(s) `id`), |
patient_address_ralf
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
organization_id | bigint | NOT NULL, | |
patient_address_match_uprn_ralf00 | varchar(255) | NOT NULL, | |
person_id | bigint | NOT NULL, | |
ralf | varchar(255) | NOT NULL, | |
patient_id | bigint | NOT NULL, | |
patient_address_id | bigint | NOT NULL, | |
salt_name | varchar(50) | NOT NULL, | |
id | bigint | NOT NULL, | |
PRIMARY KEY CONSTRAINT(s) `id`,`patient_address_id`,`patient_address_match_uprn_ralf00`), |
patient_contact
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
value | varchar(255) | DEFAULT NULL | COMMENT 'The value of the contact information eg phone number, email address', |
patient_id | bigint | NOT NULL | COMMENT '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', |
end_date | date | DEFAULT NULL | COMMENT 'The end date of the contact being valid', |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
person_id | bigint | NOT NULL | COMMENT 'Unique individual across all organisations', |
id | bigint | NOT NULL | COMMENT 'Unique Id of the patient contact', |
use_concept_id | int | DEFAULT NULL | COMMENT 'use of contact (e.g. mobile, home,work', |
type_concept_id | int | DEFAULT NULL | COMMENT 'type of contact (e.g. phone, email)', |
start_date | date | DEFAULT NULL | COMMENT 'The start date of the contact being valid', |
PRIMARY KEY CONSTRAINT(s) `organization_id`,`id`,`patient_id`,`person_id`), |
patient_pseudo_id
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
person_id | bigint | NOT NULL | COMMENT 'Reference to the person this registration status history belongs to', |
is_nhs_number_verified_by_publisher | tinyint(1) | NOT NULL | COMMENT 'Whether the nhs number has been verified by the publisher', |
id | bigint | NOT NULL | COMMENT 'Unique Id of the patient pseudo id', |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
Skid | varchar(255) | NOT NULL | COMMENT '"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)', |
patient_id | bigint | NOT NULL | COMMENT 'Reference to the patient this registration status history belongs to', |
salt_name | varchar(50) | NOT NULL | COMMENT 'The name of the salt used to create the pseudo id', |
is_nhs_number_valid | tinyint(1) | NOT NULL | COMMENT 'Whether the nhs number is valid', |
PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`), |
patient_uprn
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
patient_id | bigint | NOT NULL | COMMENT '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', |
match | varchar(255) | DEFAULT NULL, | |
person_id | bigint | NOT NULL | COMMENT 'Unique individual across all organisations', |
algorithm | varchar(255) | DEFAULT NULL, | |
no_address | tinyint(1) | DEFAULT NULL, | |
uprn | bigint | DEFAULT NULL, | |
qualifier | varchar(50) | DEFAULT NULL, | |
missing_postcode | tinyint(1) | DEFAULT NULL, | |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
invalid_address | tinyint(1) | DEFAULT NULL, | |
invalid_postcode | tinyint(1) | DEFAULT NULL, | |
PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`patient_id`), |
person
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
last_name | varchar(255) | DEFAULT NULL | COMMENT 'The last name of the person', |
title | varchar(255) | DEFAULT NULL | COMMENT 'The title of the person', |
date_of_death | date | DEFAULT NULL | COMMENT 'The date of death of the person', |
registered_practice_organization_id | bigint | DEFAULT NULL | COMMENT 'Reference to the organisation the person is registered at', |
date_of_birth | date | DEFAULT NULL | COMMENT 'The date of birth of the person', |
birth_week | tinyint | DEFAULT NULL, | |
nhs_number | varchar(255) | DEFAULT NULL | COMMENT 'The NHS number of the person', |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
first_names | varchar(255) | DEFAULT NULL | COMMENT 'The first names of the person', |
birth_year | smallint | DEFAULT NULL, | |
ethnic_code_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the ethnicity of the person', |
id | bigint | NOT NULL | COMMENT 'Unique Id of the person', |
current_address_id | bigint | NOT NULL | COMMENT 'Reference to the current address of the person', |
gender_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the gender of the person', |
birth_month | tinyint | DEFAULT NULL, | |
PRIMARY KEY CONSTRAINT(s) `id`), |
practitioner
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
id | bigint | NOT NULL | COMMENT 'Unique Id of the practitioner', |
name | varchar(1024) | DEFAULT NULL | COMMENT 'Name of the practitioner', |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
gmc_code | varchar(50) | DEFAULT NULL | COMMENT 'The GMC code of the practitioner', |
role_code | varchar(50) | DEFAULT NULL | COMMENT 'The code representing the role of the practitioner', |
role_desc | varchar(255) | DEFAULT NULL | COMMENT 'Textual description of the role of the practitioner eg General Medical Practitioner', |
PRIMARY KEY CONSTRAINT(s) `id`), |
procedure_request
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
clinical_effective_date | date | DEFAULT NULL | COMMENT 'The date the procedure was administered by a clinician', |
patient_id | bigint | NOT NULL | COMMENT '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', |
core_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the clinical coding of the procedure', |
person_id | bigint | NOT NULL | COMMENT 'Unique individual across all organisations', |
practitioner_id | bigint | DEFAULT NULL | COMMENT 'The clinician the activity is recorded against', |
date_precision_concept_id | int | DEFAULT NULL | COMMENT 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)', |
encounter_id | bigint | DEFAULT NULL | COMMENT 'Reference to the encounter the procedure was administered at', |
status_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the status of the procedure', |
non_core_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the clinical coding of the procedure', |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
age_at_event | decimal(5,2) | DEFAULT NULL | COMMENT 'The age of the patient at the time of the procedure', |
date_recorded | datetime | DEFAULT NULL | COMMENT 'The date the procedure was recorded in the source system', |
id | bigint | NOT NULL | COMMENT 'Unique Id of the procedure', |
PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`), |
referral_request
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
clinical_effective_date | date | DEFAULT NULL | COMMENT 'The date the referral was made', |
is_review | tinyint(1) | DEFAULT NULL | COMMENT 'Whether this referral is a review', |
patient_id | bigint | NOT NULL | COMMENT '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', |
requester_organization_id | bigint | DEFAULT NULL | COMMENT 'Reference to the organisation that made the refereral request', |
outgoing_referral | tinyint(1) | DEFAULT NULL | COMMENT 'Whether this is an outgoing referral', |
non_core_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the clinical coding of the referral', |
referral_request_type_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the type of referral request', |
referral_request_priority_concept_id | smallint | DEFAULT NULL | COMMENT 'Reference to the priority of the referral', |
encounter_id | bigint | DEFAULT NULL | COMMENT 'Reference to the encounter the referral was made in', |
person_id | bigint | NOT NULL | COMMENT 'Unique individual across all organisations', |
Mode | varchar(50) | DEFAULT NULL | COMMENT 'The mode of the referral', |
practitioner_id | bigint | DEFAULT NULL | COMMENT 'The clinician the activity is recorded against', |
recipient_organization_id | bigint | DEFAULT NULL | COMMENT 'Reference to the organization receiving the referral', |
date_recorded | datetime | DEFAULT NULL | COMMENT 'The date the referral request was added to the source system', |
age_at_event | decimal(5,2) | DEFAULT NULL | COMMENT 'The age of the patient at the time of the referral', |
date_precision_concept_id | smallint | DEFAULT NULL | COMMENT 'Identifies the precision of the clinical effectiveness date to either year (1) month (2) day (5) minute (12) second (13) millisecond (14)', |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
core_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the clinical coding of the referral', |
id | bigint | NOT NULL | COMMENT 'Unique Id of the referral', |
PRIMARY KEY CONSTRAINT(s) `organization_id`,`person_id`,`id`), |
registration_status_history
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
person_id | bigint | NOT NULL | COMMENT 'Reference to the person this registration status history belongs to', |
start_date | datetime | DEFAULT NULL | COMMENT 'The start date for the period this registration status history was valid', |
id | bigint | NOT NULL | COMMENT 'Unique Id of the registration status history', |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
registration_status_concept_id | int | DEFAULT NULL | COMMENT 'Reference to the registration status', |
patient_id | bigint | NOT NULL | COMMENT 'Reference to the patient this registration status history belongs to', |
end_date | datetime | DEFAULT NULL | COMMENT 'The end date for the period this registration status history was valid', |
episode_of_care_id | bigint | DEFAULT NULL | COMMENT 'Reference to the episode of care this status history belongs to', |
PRIMARY KEY CONSTRAINT(s) `organization_id`,`id`,`patient_id`,`person_id`), |
schedule
<tbody> </tbody>Column Name | Type | Constraint | Comment |
---|---|---|---|
id | bigint | NOT NULL | COMMENT 'Unique Id of the schedule', |
practitioner_id | bigint | DEFAULT NULL | COMMENT 'Reference to the practitioner who owns the schedule', |
start_date | date | DEFAULT NULL | COMMENT 'The start date of the schedule', |
organization_id | bigint | NOT NULL | COMMENT 'Owning organisation (i.e. publisher)', |
name | varchar(150) | DEFAULT NULL | COMMENT 'The name of the schedule', |
type | varchar(255) | DEFAULT NULL | COMMENT 'The type of schedule eg Timed Appointments', |
location | varchar(255) | DEFAULT NULL | COMMENT 'Textual description of the location the schedule was held at', |
PRIMARY KEY CONSTRAINT(s) `organization_id`,`id`), |