cause_of_death
Details about specific diseases, conditions or injuries that caused or contributed to the death of an individual.
Details about specific diseases, conditions or injuries that caused or contributed to the death of an individual.
Purpose. To record details about specific diseases, conditions or injuries that caused or contributed to the death of an individual.
Source
| Model | Leg | Role |
|---|
openEHR-EHR-EVALUATION.cause_of_death.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. | — |
description | text | yes | Description | /data[at0001]/items[at0019] |
direct_cause
direct_cause_code
direct_cause_system
direct_cause_valueset_id | coded text
text, text, text, text | yes | Direct cause | /data[at0001]/items[at0002] |
direct_cause_duration | interval | yes | Direct cause duration | /data[at0001]/items[at0017] |
comment | text | yes | Comment | /data[at0001]/items[at0013] |
last_updated | timestamptz | yes | Last updated | /protocol[at0014]/items[at0015] |
Constraints
check ((direct_cause_code is null and direct_cause_system is null and direct_cause_valueset_id is null) or (direct_cause is not null and direct_cause_code is not null and direct_cause_system is not null and direct_cause_valueset_id is not null))
Unique
References
| Columns | Target | On delete |
|---|
form_id | form | cascade |
form_id, form_block_id | form_block | cascade |
direct_cause_valueset_id, direct_cause_code, direct_cause_system, direct_cause | valueset_code | restrict |
Referenced by
Indexes
cause_of_death_form_id_idx on form_id
Child tables
2 tables hang off cause_of_death, one row per repetition.
cause_of_death_antecedent_cause_s
Child table — one row per repetition, deleted with its parent.
| Column | Type | Null | Description | Source |
|---|
id | uuid primary key | no | Primary key. | — |
cause_of_death_id | uuid → cause_of_death | no | — | — |
position | integer | no | Order of this row within its parent, from zero. | — |
cause
cause_code
cause_system
cause_valueset_id | coded text
text, text, text, text | yes | Cause | /data[at0001]/items[at0003]/items[at0004] |
order_value
order_value_code
order_value_system
order_value_valueset_id | coded text
text, text, text, text | yes | Order | /data[at0001]/items[at0003]/items[at0005] |
duration | interval | yes | Duration | /data[at0001]/items[at0003]/items[at0009] |
Constraints
check ((cause_code is null and cause_system is null and cause_valueset_id is null) or (cause is not null and cause_code is not null and cause_system is not null and cause_valueset_id is not null))
check ((order_value_code is null and order_value_system is null and order_value_valueset_id is null) or (order_value is not null and order_value_code is not null and order_value_system is not null and order_value_valueset_id is not null))
Unique
cause_of_death_id, position
References
| Columns | Target | On delete |
|---|
cause_of_death_id | cause_of_death | cascade |
cause_valueset_id, cause_code, cause_system, cause | valueset_code | restrict |
order_value_valueset_id, order_value_code, order_value_system, order_value | valueset_code | restrict |
cause_of_death_contributing_conditions
Child table — one row per repetition, deleted with its parent.
| Column | Type | Null | Description | Source |
|---|
id | uuid primary key | no | Primary key. | — |
cause_of_death_id | uuid → cause_of_death | no | — | — |
position | integer | no | Order of this row within its parent, from zero. | — |
condition
condition_code
condition_system
condition_valueset_id | coded text
text, text, text, text | yes | Condition | /data[at0001]/items[at0020]/items[at0018] |
duration | interval | yes | Duration | /data[at0001]/items[at0020]/items[at0021] |
Constraints
check ((condition_code is null and condition_system is null and condition_valueset_id is null) or (condition is not null and condition_code is not null and condition_system is not null and condition_valueset_id is not null))
Unique
cause_of_death_id, position
References
| Columns | Target | On delete |
|---|
cause_of_death_id | cause_of_death | cascade |
condition_valueset_id, condition_code, condition_system, condition | valueset_code | restrict |
Value sets
| Value set | Codes |
|---|
org.openehr::openEHR-EHR-EVALUATION.cause_of_death.v1/order_value | 3 |