---
title: "cause_of_death"
description: "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`](/docs/tables/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`<br />`direct_cause_code`<br />`direct_cause_system`<br />`direct_cause_valueset_id` | coded text<br />`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

```sql
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

- `form_block_id`

## References

| Columns | Target | On delete |
|---|---|---|
| `form_id` | [`form`](/docs/tables/form) | cascade |
| `form_id, form_block_id` | [`form_block`](/docs/tables/form_block) | cascade |
| `direct_cause_valueset_id, direct_cause_code, direct_cause_system, direct_cause` | [`valueset_code`](/docs/tables/valueset_code) | restrict |

## Referenced by

- [`cause_of_death_antecedent_cause_s`](/docs/tables/cause_of_death_antecedent_cause_s) via `cause_of_death_id`
- [`cause_of_death_contributing_conditions`](/docs/tables/cause_of_death_contributing_conditions) via `cause_of_death_id`

## 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`](/docs/tables/cause_of_death) | no | — | — |
| `position` | `integer` | no | Order of this row within its parent, from zero. | — |
| `cause`<br />`cause_code`<br />`cause_system`<br />`cause_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Cause | `/data[at0001]/items[at0003]/items[at0004]` |
| `order_value`<br />`order_value_code`<br />`order_value_system`<br />`order_value_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Order | `/data[at0001]/items[at0003]/items[at0005]` |
| `duration` | `interval` | yes | Duration | `/data[at0001]/items[at0003]/items[at0009]` |

#### Constraints

```sql
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`](/docs/tables/cause_of_death) | cascade |
| `cause_valueset_id, cause_code, cause_system, cause` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `order_value_valueset_id, order_value_code, order_value_system, order_value` | [`valueset_code`](/docs/tables/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`](/docs/tables/cause_of_death) | no | — | — |
| `position` | `integer` | no | Order of this row within its parent, from zero. | — |
| `condition`<br />`condition_code`<br />`condition_system`<br />`condition_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Condition | `/data[at0001]/items[at0020]/items[at0018]` |
| `duration` | `interval` | yes | Duration | `/data[at0001]/items[at0020]/items[at0021]` |

#### Constraints

```sql
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`](/docs/tables/cause_of_death) | cascade |
| `condition_valueset_id, condition_code, condition_system, condition` | [`valueset_code`](/docs/tables/valueset_code) | restrict |

## Value sets

| Value set | Codes |
|---|---|
| `org.openehr::openEHR-EHR-EVALUATION.cause_of_death.v1/order_value` | 3 |

