---
title: "advance_care_directive"
description: "A framework to communicate the preferences of an individual for future medical treatment and care."
---

A framework to communicate the preferences of an individual for future medical treatment and care.

**Purpose.** To record the preferences of an individual for future medical treatment and care.

## Source

| Model | Leg | Role |
|---|---|---|
| `openEHR-EHR-EVALUATION.advance_care_directive.v2` | 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. | — |
| `type_of_directive`<br />`type_of_directive_code`<br />`type_of_directive_system`<br />`type_of_directive_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Type of directive | `/data[at0001]/items[at0005]` |
| `status`<br />`status_code`<br />`status_system`<br />`status_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Status | `/data[at0001]/items[at0004]` |
| `description` | `text` | yes | Description | `/data[at0001]/items[at0006]` |
| `condition`<br />`condition_code`<br />`condition_system`<br />`condition_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Condition | `/data[at0001]/items[at0007]` |
| `comment` | `text` | yes | Comment | `/data[at0001]/items[at0038]` |
| `valid_period_start` | `timestamptz` | yes | Valid period start | `/protocol[at0010]/items[at0053]` |
| `valid_period_end` | `timestamptz` | yes | Valid period end | `/protocol[at0010]/items[at0054]` |
| `review_due_date` | `timestamptz` | yes | Review due date | `/protocol[at0010]/items[at0056]` |
| `last_updated` | `timestamptz` | yes | Last updated | `/protocol[at0010]/items[at0055]` |
| `mandate` | `text` | yes | Mandate | `/protocol[at0010]/items[at0027]` |
| `digital_representation` | `uuid` | yes | Digital representation | `/protocol[at0010]/items[at0060]` |

## Constraints

```sql
check ((type_of_directive_code is null and type_of_directive_system is null and type_of_directive_valueset_id is null) or (type_of_directive is not null and type_of_directive_code is not null and type_of_directive_system is not null and type_of_directive_valueset_id is not null))
check ((status_code is null and status_system is null and status_valueset_id is null) or (status is not null and status_code is not null and status_system is not null and status_valueset_id is not null))
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

- `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 |
| `type_of_directive_valueset_id, type_of_directive_code, type_of_directive_system, type_of_directive` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `status_valueset_id, status_code, status_system, status` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `condition_valueset_id, condition_code, condition_system, condition` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `digital_representation` | [`attachment`](/docs/tables/attachment) | restrict |

## Referenced by

- [`advance_care_directive_witness`](/docs/tables/advance_care_directive_witness) via `advance_care_directive_id`
- [`advance_care_directive_directive_location`](/docs/tables/advance_care_directive_directive_location) via `advance_care_directive_id`

## Indexes

- `advance_care_directive_form_id_idx` on `form_id`
- `advance_care_directive_digital_representation_idx` on `digital_representation`

## Child tables

2 tables hang off `advance_care_directive`, one row per repetition.

### `advance_care_directive_witness`

Child table — one row per repetition, deleted with its parent.

| Column | Type | Null | Description | Source |
|---|---|---|---|---|
| `id` | `uuid primary key` | no | Primary key. | — |
| `advance_care_directive_id` | `uuid` → [`advance_care_directive`](/docs/tables/advance_care_directive) | no | — | — |
| `position` | `integer` | no | Order of this row within its parent, from zero. | — |
| `person_id` | `uuid` | no | Witness | `/protocol[at0010]/items[at0025]` |

#### Unique

- `advance_care_directive_id, position`
- `advance_care_directive_id, person_id`

#### References

| Columns | Target | On delete |
|---|---|---|
| `advance_care_directive_id` | [`advance_care_directive`](/docs/tables/advance_care_directive) | cascade |
| `person_id` | [`person`](/docs/tables/person) | no action |

#### Indexes

- `advance_care_directive_witness_person_id_idx` on `person_id`

### `advance_care_directive_directive_location`

Child table — one row per repetition, deleted with its parent.

| Column | Type | Null | Description | Source |
|---|---|---|---|---|
| `id` | `uuid primary key` | no | Primary key. | — |
| `advance_care_directive_id` | `uuid` → [`advance_care_directive`](/docs/tables/advance_care_directive) | no | — | — |
| `position` | `integer` | no | Order of this row within its parent, from zero. | — |
| `location` | `text` | yes | Location | `/protocol[at0010]/items[at0058]/items[at0030]` |
| `copy_holder` | `uuid` | yes | Copy holder | `/protocol[at0010]/items[at0058]/items[at0059]` |

#### Unique

- `advance_care_directive_id, position`

#### References

| Columns | Target | On delete |
|---|---|---|
| `advance_care_directive_id` | [`advance_care_directive`](/docs/tables/advance_care_directive) | cascade |
| `copy_holder` | [`person`](/docs/tables/person) | no action |

#### Indexes

- `advance_care_directive_directive_location_copy_holder_idx` on `copy_holder`

## Value sets

| Value set | Codes |
|---|---|
| `org.openehr::openEHR-EHR-EVALUATION.advance_care_directive.v2/status` | 3 |

