---
title: "procedure"
description: "A clinical activity carried out for screening, investigative, diagnostic, curative, therapeutic, evaluative or palliative purposes."
---

A clinical activity carried out for screening, investigative, diagnostic, curative, therapeutic, evaluative or palliative purposes.

**Purpose.** To record information about the activities required to carry out a procedure, including the planning, scheduling, performance, suspension, cancellation, documentation and completion.

## Source

| Model | Leg | Role |
|---|---|---|
| `openEHR-EHR-ACTION.procedure.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. | — |
| `procedure_name`<br />`procedure_name_code`<br />`procedure_name_system`<br />`procedure_name_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Procedure name | `/description[at0001]/items[at0002]` |
| `description` | `text` | yes | Description | `/description[at0001]/items[at0049]` |
| `indication`<br />`indication_code`<br />`indication_system`<br />`indication_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Indication | `/description[at0001]/items[at0070]` |
| `intent`<br />`intent_code`<br />`intent_system`<br />`intent_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Intent | `/description[at0001]/items[at0072]` |
| `method` | `text` | yes | Method | `/description[at0001]/items[at0065]` |
| `urgency`<br />`urgency_code`<br />`urgency_system`<br />`urgency_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Urgency | `/description[at0001]/items[at0058]` |
| `body_site` | `text` | yes | Body site | `/description[at0001]/items[at0063]` |
| `impact`<br />`impact_code`<br />`impact_system`<br />`impact_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Impact | `/description[at0001]/items[at0071]` |
| `outcome`<br />`outcome_code`<br />`outcome_system`<br />`outcome_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Outcome | `/description[at0001]/items[at0048]` |
| `procedural_difficulty` | `text` | yes | Procedural difficulty | `/description[at0001]/items[at0069]` |
| `complication` | `text` | yes | Complication | `/description[at0001]/items[at0006]` |
| `scheduled_datetime` | `timestamptz` | yes | Scheduled datetime | `/description[at0001]/items[at0066]` |
| `start_datetime` | `timestamptz` | yes | Start datetime | `/description[at0001]/items[at0073]` |
| `end_datetime` | `timestamptz` | yes | End datetime | `/description[at0001]/items[at0060]` |
| `total_duration` | `interval` | yes | Total duration | `/description[at0001]/items[at0061]` |
| `pathway_step_duration` | `interval` | yes | Pathway step duration | `/description[at0001]/items[at0074]` |
| `procedure_type`<br />`procedure_type_code`<br />`procedure_type_system`<br />`procedure_type_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Procedure type | `/description[at0001]/items[at0067]` |
| `reason` | `text` | yes | Reason | `/description[at0001]/items[at0014]` |
| `comment` | `text` | yes | Comment | `/description[at0001]/items[at0005]` |
| `requestor_order_identifier_value`<br />`requestor_order_identifier_system` | text, text<br />`text`, `text` | yes | Requestor order identifier | `/protocol[at0053]/items[at0054]` |
| `receiver_order_identifier_value`<br />`receiver_order_identifier_system` | text, text<br />`text`, `text` | yes | Receiver order identifier | `/protocol[at0053]/items[at0056]` |

## Constraints

```sql
check ((procedure_name_code is null and procedure_name_system is null and procedure_name_valueset_id is null) or (procedure_name is not null and procedure_name_code is not null and procedure_name_system is not null and procedure_name_valueset_id is not null))
check ((indication_code is null and indication_system is null and indication_valueset_id is null) or (indication is not null and indication_code is not null and indication_system is not null and indication_valueset_id is not null))
check ((intent_code is null and intent_system is null and intent_valueset_id is null) or (intent is not null and intent_code is not null and intent_system is not null and intent_valueset_id is not null))
check ((urgency_code is null and urgency_system is null and urgency_valueset_id is null) or (urgency is not null and urgency_code is not null and urgency_system is not null and urgency_valueset_id is not null))
check ((impact_code is null and impact_system is null and impact_valueset_id is null) or (impact is not null and impact_code is not null and impact_system is not null and impact_valueset_id is not null))
check ((outcome_code is null and outcome_system is null and outcome_valueset_id is null) or (outcome is not null and outcome_code is not null and outcome_system is not null and outcome_valueset_id is not null))
check ((procedure_type_code is null and procedure_type_system is null and procedure_type_valueset_id is null) or (procedure_type is not null and procedure_type_code is not null and procedure_type_system is not null and procedure_type_valueset_id is not null))
check (requestor_order_identifier_system is null or requestor_order_identifier_value is not null)
check (receiver_order_identifier_system is null or receiver_order_identifier_value 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 |
| `procedure_name_valueset_id, procedure_name_code, procedure_name_system, procedure_name` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `indication_valueset_id, indication_code, indication_system, indication` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `intent_valueset_id, intent_code, intent_system, intent` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `urgency_valueset_id, urgency_code, urgency_system, urgency` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `impact_valueset_id, impact_code, impact_system, impact` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `outcome_valueset_id, outcome_code, outcome_system, outcome` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `procedure_type_valueset_id, procedure_type_code, procedure_type_system, procedure_type` | [`valueset_code`](/docs/tables/valueset_code) | restrict |

## Referenced by

- [`procedure_procedure_detail`](/docs/tables/procedure_procedure_detail) via `procedure_id`
- [`procedure_multimedia`](/docs/tables/procedure_multimedia) via `procedure_id`

## Indexes

- `procedure_form_id_idx` on `form_id`

## Child tables

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

### `procedure_procedure_detail`

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

| Column | Type | Null | Description | Source |
|---|---|---|---|---|
| `id` | `uuid primary key` | no | Primary key. | — |
| `procedure_id` | `uuid` → [`procedure`](/docs/tables/procedure) | no | — | — |
| `position` | `integer` | no | Order of this row within its parent, from zero. | — |
| `anatomical_location_id` | `uuid` | yes | — | — |
| `anatomical_location_circle_id` | `uuid` | yes | — | — |
| `anatomical_location_relative_id` | `uuid` | yes | — | — |
| `device_id` | `uuid` | yes | — | — |

#### Constraints

```sql
check (num_nonnulls(anatomical_location_id, anatomical_location_circle_id, anatomical_location_relative_id, device_id) = 1)
```

#### Unique

- `procedure_id, position`

#### References

| Columns | Target | On delete |
|---|---|---|
| `procedure_id` | [`procedure`](/docs/tables/procedure) | cascade |
| `anatomical_location_id` | [`anatomical_location`](/docs/tables/anatomical_location) | no action |
| `anatomical_location_circle_id` | [`anatomical_location_circle`](/docs/tables/anatomical_location_circle) | no action |
| `anatomical_location_relative_id` | [`anatomical_location_relative`](/docs/tables/anatomical_location_relative) | no action |
| `device_id` | [`device`](/docs/tables/device) | no action |

#### Indexes

- `procedure_procedure_detail_anatomical_location_id_idx` on `anatomical_location_id`
- `procedure_procedure_detail_anatomical_location_circle_id_idx` on `anatomical_location_circle_id`
- `procedure_procedure_detail_anatomical_location_relative_id_idx` on `anatomical_location_relative_id`
- `procedure_procedure_detail_device_id_idx` on `device_id`

### `procedure_multimedia`

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

| Column | Type | Null | Description | Source |
|---|---|---|---|---|
| `id` | `uuid primary key` | no | Primary key. | — |
| `procedure_id` | `uuid` → [`procedure`](/docs/tables/procedure) | no | — | — |
| `position` | `integer` | no | Order of this row within its parent, from zero. | — |
| `attachment_id` | `uuid` | no | Multimedia | `/description[at0001]/items[at0062]` |

#### Unique

- `procedure_id, position`
- `procedure_id, attachment_id`

#### References

| Columns | Target | On delete |
|---|---|---|
| `procedure_id` | [`procedure`](/docs/tables/procedure) | cascade |
| `attachment_id` | [`attachment`](/docs/tables/attachment) | restrict |

#### Indexes

- `procedure_multimedia_attachment_id_idx` on `attachment_id`

