---
title: "therapeutic_item_order"
description: "An order for a therapeutic item, including a medical device, used by the individual or a carer as part of direct provision of healthcare or to mitigate a healthcare risk."
---

An order for a therapeutic item, including a medical device, used by the individual or a carer as part of direct provision of healthcare or to mitigate a healthcare risk.

**Purpose.** To record an order for a therapeutic item, including a medical device, used by the individual or a carer as part of direct provision of healthcare or to mitigate a healthcare risk.

## Source

| Model | Leg | Role |
|---|---|---|
| `openEHR-EHR-INSTRUCTION.therapeutic_item_order.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. | — |
| `item_name`<br />`item_name_code`<br />`item_name_system`<br />`item_name_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Item name | `/activities[at0001]/description[at0002]/items[at0070]` |
| `body_site`<br />`body_site_code`<br />`body_site_system`<br />`body_site_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Body site | `/activities[at0001]/description[at0002]/items[at0092]` |
| `structured_body_site_anatomical_location` | `uuid` | yes | — | — |
| `structured_body_site_anatomical_location_circle` | `uuid` | yes | — | — |
| `structured_body_site_anatomical_location_relative` | `uuid` | yes | — | — |
| `directions` | `text` | yes | Directions | `/activities[at0001]/description[at0002]/items[at0009]` |
| `monitoring_instruction` | `text` | yes | Monitoring instruction | `/activities[at0001]/description[at0002]/items[at0107]` |
| `clinical_indication`<br />`clinical_indication_code`<br />`clinical_indication_system`<br />`clinical_indication_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Clinical indication | `/activities[at0001]/description[at0002]/items[at0018]` |
| `therapeutic_intent`<br />`therapeutic_intent_code`<br />`therapeutic_intent_system`<br />`therapeutic_intent_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Therapeutic intent | `/activities[at0001]/description[at0002]/items[at0148]` |
| `start_date_time` | `timestamptz` | yes | Start date/time | `/activities[at0001]/description[at0002]/items[at0012]` |
| `stop_date_time` | `timestamptz` | yes | Stop date/time | `/activities[at0001]/description[at0002]/items[at0013]` |
| `start_criterion` | `text` | yes | Start criterion | `/activities[at0001]/description[at0002]/items[at0011]` |
| `stop_criterion` | `text` | yes | Stop criterion | `/activities[at0001]/description[at0002]/items[at0016]` |
| `comment` | `text` | yes | Comment | `/activities[at0001]/description[at0002]/items[at0167]` |
| `order_identifier` | `text` | yes | Order identifier | `/protocol[at0005]/items[at0004]` |

## Constraints

```sql
check ((item_name_code is null and item_name_system is null and item_name_valueset_id is null) or (item_name is not null and item_name_code is not null and item_name_system is not null and item_name_valueset_id is not null))
check ((body_site_code is null and body_site_system is null and body_site_valueset_id is null) or (body_site is not null and body_site_code is not null and body_site_system is not null and body_site_valueset_id is not null))
check (num_nonnulls(structured_body_site_anatomical_location, structured_body_site_anatomical_location_circle, structured_body_site_anatomical_location_relative) <= 1)
check ((clinical_indication_code is null and clinical_indication_system is null and clinical_indication_valueset_id is null) or (clinical_indication is not null and clinical_indication_code is not null and clinical_indication_system is not null and clinical_indication_valueset_id is not null))
check ((therapeutic_intent_code is null and therapeutic_intent_system is null and therapeutic_intent_valueset_id is null) or (therapeutic_intent is not null and therapeutic_intent_code is not null and therapeutic_intent_system is not null and therapeutic_intent_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 |
| `item_name_valueset_id, item_name_code, item_name_system, item_name` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `body_site_valueset_id, body_site_code, body_site_system, body_site` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `clinical_indication_valueset_id, clinical_indication_code, clinical_indication_system, clinical_indication` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `therapeutic_intent_valueset_id, therapeutic_intent_code, therapeutic_intent_system, therapeutic_intent` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `structured_body_site_anatomical_location` | [`anatomical_location`](/docs/tables/anatomical_location) | no action |
| `structured_body_site_anatomical_location_circle` | [`anatomical_location_circle`](/docs/tables/anatomical_location_circle) | no action |
| `structured_body_site_anatomical_location_relative` | [`anatomical_location_relative`](/docs/tables/anatomical_location_relative) | no action |

## Referenced by

- [`therapeutic_item_order_item_details`](/docs/tables/therapeutic_item_order_item_details) via `therapeutic_item_order_id`

## Indexes

- `therapeutic_item_order_form_id_idx` on `form_id`
- `therapeutic_item_order_structured_body_site_anatomical_l_8e7477` on `structured_body_site_anatomical_location`
- `therapeutic_item_order_structured_body_site_anatomical_l_696ccd` on `structured_body_site_anatomical_location_circle`
- `therapeutic_item_order_structured_body_site_anatomical_l_46e0cd` on `structured_body_site_anatomical_location_relative`

## Child tables

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

### `therapeutic_item_order_item_details`

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

| Column | Type | Null | Description | Source |
|---|---|---|---|---|
| `id` | `uuid primary key` | no | Primary key. | — |
| `therapeutic_item_order_id` | `uuid` → [`therapeutic_item_order`](/docs/tables/therapeutic_item_order) | no | — | — |
| `position` | `integer` | no | Order of this row within its parent, from zero. | — |
| `device_id` | `uuid` | no | Item details | `/activities[at0001]/description[at0002]/items[at0143]` |

#### Unique

- `therapeutic_item_order_id, position`
- `therapeutic_item_order_id, device_id`

#### References

| Columns | Target | On delete |
|---|---|---|
| `therapeutic_item_order_id` | [`therapeutic_item_order`](/docs/tables/therapeutic_item_order) | cascade |
| `device_id` | [`device`](/docs/tables/device) | no action |

#### Indexes

- `therapeutic_item_order_item_details_device_id_idx` on `device_id`

