Schema reference / Tables / view MDX source
substance_use_screening
Series of questions and associated answers to screen for use of any substances or a specific grouping, class or individual substance/s that may harm an individual's health or soci…
Series of questions and associated answers to screen for use of any substances or a specific grouping, class or individual substance/s that may harm an individual's health or social well-being.
Purpose. To record a framework for documenting answers to pre-defined screening questions about the use of any substances or a specific grouping, class or individual substance/s that may harm an individual's health or social well-being.
Source
| Model | Leg | Role |
|---|---|---|
openEHR-EHR-OBSERVATION.substance_use_screening.v1 | openEHR | defines this table |
Columns
| Column | Type | Null | Description | Source |
|---|---|---|---|---|
id | uuid primary key | no | Primary key. | — |
form_id | uuid → form | no | The form this entry was recorded on. | — |
form_block_id | uuid | yes | The block within the form, when the entry is bound to one. | — |
screening_purposescreening_purpose_codescreening_purpose_systemscreening_purpose_valueset_id | coded texttext, text, text, text | yes | Screening purpose | /data[at0022]/events[at0023]/data[at0001]/items[at0040] |
any_substance_use | boolean | yes | Any substance use? | /data[at0022]/events[at0023]/data[at0001]/items[at0052] |
description | text | yes | Description | /data[at0022]/events[at0023]/data[at0001]/items[at0042] |
overall_comment | text | yes | Overall comment | /data[at0022]/events[at0023]/data[at0001]/items[at0056] |
Constraints
check ((screening_purpose_code is null and screening_purpose_system is null and screening_purpose_valueset_id is null) or (screening_purpose is not null and screening_purpose_code is not null and screening_purpose_system is not null and screening_purpose_valueset_id is not null))Unique
form_block_id
References
| Columns | Target | On delete |
|---|---|---|
form_id | form | cascade |
form_id, form_block_id | form_block | cascade |
screening_purpose_valueset_id, screening_purpose_code, screening_purpose_system, screening_purpose | valueset_code | restrict |
Referenced by
substance_use_screening_specific_substanceviasubstance_use_screening_id
Indexes
substance_use_screening_form_id_idxonform_id
Child tables
1 table hang off substance_use_screening, one row per repetition.
substance_use_screening_specific_substance
Child table — one row per repetition, deleted with its parent.
| Column | Type | Null | Description | Source |
|---|---|---|---|---|
id | uuid primary key | no | Primary key. | — |
substance_use_screening_id | uuid → substance_use_screening | no | — | — |
position | integer | no | Order of this row within its parent, from zero. | — |
substance_namesubstance_name_codesubstance_name_systemsubstance_name_valueset_id | coded texttext, text, text, text | yes | Substance name | /data[at0022]/events[at0023]/data[at0001]/items[at0026]/items[at0021] |
used | boolean | yes | Used? | /data[at0022]/events[at0023]/data[at0001]/items[at0026]/items[at0024] |
last_used | timestamptz | yes | Last used | /data[at0022]/events[at0023]/data[at0001]/items[at0026]/items[at0003] |
timing | timestamptz | yes | Timing | /data[at0022]/events[at0023]/data[at0001]/items[at0026]/items[at0002] |
comment | text | yes | Comment | /data[at0022]/events[at0023]/data[at0001]/items[at0026]/items[at0025] |
Constraints
check ((substance_name_code is null and substance_name_system is null and substance_name_valueset_id is null) or (substance_name is not null and substance_name_code is not null and substance_name_system is not null and substance_name_valueset_id is not null))Unique
substance_use_screening_id, position
References
| Columns | Target | On delete |
|---|---|---|
substance_use_screening_id | substance_use_screening | cascade |
substance_name_valueset_id, substance_name_code, substance_name_system, substance_name | valueset_code | restrict |