---
title: "precaution"
description: "A condition or state of the individual that is clinically significant and unique or idiosyncratic for this individual, and is considered vital information when making treatment de…"
---

A condition or state of the individual that is clinically significant and unique or idiosyncratic for this individual, and is considered vital information when making treatment decisions.

**Purpose.** To record a condition or state of the individual that is clinically significant and unique or idiosyncratic for this individual, and is considered vital information when making treatment decisions.

## Source

| Model | Leg | Role |
|---|---|---|
| `openEHR-EHR-EVALUATION.precaution.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. | — |
| `condition`<br />`condition_code`<br />`condition_system`<br />`condition_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Condition | `/data[at0001]/items[at0002]` |
| `status`<br />`status_code`<br />`status_system`<br />`status_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Status | `/data[at0001]/items[at0014]` |
| `evidence` | `text` | yes | Evidence | `/data[at0001]/items[at0003]` |
| `category`<br />`category_code`<br />`category_system`<br />`category_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Category | `/data[at0001]/items[at0013]` |
| `comment` | `text` | yes | Comment | `/data[at0001]/items[at0008]` |
| `valid_period_start` | `timestamptz` | yes | Valid period start | `/protocol[at0006]/items[at0022]` |
| `valid_period_end` | `timestamptz` | yes | Valid period end | `/protocol[at0006]/items[at0024]` |
| `review_date` | `timestamptz` | yes | Review date | `/protocol[at0006]/items[at0009]` |
| `last_updated` | `timestamptz` | yes | Last updated | `/protocol[at0006]/items[at0004]` |

## 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))
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 ((category_code is null and category_system is null and category_valueset_id is null) or (category is not null and category_code is not null and category_system is not null and category_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 |
| `condition_valueset_id, condition_code, condition_system, condition` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `status_valueset_id, status_code, status_system, status` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `category_valueset_id, category_code, category_system, category` | [`valueset_code`](/docs/tables/valueset_code) | restrict |

## Referenced by

- [`precaution_additional_details`](/docs/tables/precaution_additional_details) via `precaution_id`

## Indexes

- `precaution_form_id_idx` on `form_id`

## Child tables

1 table hang off `precaution`, one row per repetition.

### `precaution_additional_details`

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

| Column | Type | Null | Description | Source |
|---|---|---|---|---|
| `id` | `uuid primary key` | no | Primary key. | — |
| `precaution_id` | `uuid` → [`precaution`](/docs/tables/precaution) | no | — | — |
| `position` | `integer` | no | Order of this row within its parent, from zero. | — |
| `clinical_evidence_id` | `uuid` | no | Additional details | `/data[at0001]/items[at0025]` |

#### Unique

- `precaution_id, position`
- `precaution_id, clinical_evidence_id`

#### References

| Columns | Target | On delete |
|---|---|---|
| `precaution_id` | [`precaution`](/docs/tables/precaution) | cascade |
| `clinical_evidence_id` | [`clinical_evidence`](/docs/tables/clinical_evidence) | no action |

#### Indexes

- `precaution_additional_details_clinical_evidence_id_idx` on `clinical_evidence_id`

## Value sets

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

