---
title: "medication_summary"
description: "Summary or persistent information about the use of a single medication or group of medications, especially where the pattern of use or cumulative dosage needs to be monitored."
---

Summary or persistent information about the use of a single medication or group of medications, especially where the pattern of use or cumulative dosage needs to be monitored.

**Purpose.** To record summary or persistent information about the use of a single medication or group or class of medications, especially where the pattern of use or cumulative dosage needs to be monitored.

## Source

| Model | Leg | Role |
|---|---|---|
| `openEHR-EHR-EVALUATION.medication_summary.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. | — |
| `medication_name`<br />`medication_name_code`<br />`medication_name_system`<br />`medication_name_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Medication name | `/data[at0001]/items[at0002]` |
| `clinical_description` | `text` | yes | Clinical description | `/data[at0001]/items[at0007]` |
| `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 | `/data[at0001]/items[at0028]` |
| `onset_of_use` | `timestamptz` | yes | Onset of use | `/data[at0001]/items[at0009]` |
| `cumulative_dose_magnitude`<br />`cumulative_dose_units` | quantity<br />`numeric`, `text` | yes | Cumulative dose | `/data[at0001]/items[at0015]` |
| `cessation_of_use` | `timestamptz` | yes | Cessation of use | `/data[at0001]/items[at0010]` |
| `reason_for_cessation`<br />`reason_for_cessation_code`<br />`reason_for_cessation_system`<br />`reason_for_cessation_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Reason for cessation | `/data[at0001]/items[at0030]` |
| `cumulative_duration` | `interval` | yes | Cumulative duration | `/data[at0001]/items[at0027]` |
| `last_updated` | `timestamptz` | yes | Last updated | `/protocol[at0005]/items[at0006]` |

## Constraints

```sql
check ((medication_name_code is null and medication_name_system is null and medication_name_valueset_id is null) or (medication_name is not null and medication_name_code is not null and medication_name_system is not null and medication_name_valueset_id is not null))
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 ((cumulative_dose_magnitude is null and cumulative_dose_units is null) or (cumulative_dose_magnitude is not null and cumulative_dose_units is not null))
check ((reason_for_cessation_code is null and reason_for_cessation_system is null and reason_for_cessation_valueset_id is null) or (reason_for_cessation is not null and reason_for_cessation_code is not null and reason_for_cessation_system is not null and reason_for_cessation_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 |
| `medication_name_valueset_id, medication_name_code, medication_name_system, medication_name` | [`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 |
| `reason_for_cessation_valueset_id, reason_for_cessation_code, reason_for_cessation_system, reason_for_cessation` | [`valueset_code`](/docs/tables/valueset_code) | restrict |

## Referenced by

- [`medication_summary_episode`](/docs/tables/medication_summary_episode) via `medication_summary_id`

## Indexes

- `medication_summary_form_id_idx` on `form_id`

## Child tables

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

### `medication_summary_episode`

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

| Column | Type | Null | Description | Source |
|---|---|---|---|---|
| `id` | `uuid primary key` | no | Primary key. | — |
| `medication_summary_id` | `uuid` → [`medication_summary`](/docs/tables/medication_summary) | no | — | — |
| `position` | `integer` | no | Order of this row within its parent, from zero. | — |
| `episode_onset` | `timestamptz` | yes | Episode onset | `/data[at0001]/items[at0008]/items[at0011]` |
| `episode_indication`<br />`episode_indication_code`<br />`episode_indication_system`<br />`episode_indication_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Episode indication | `/data[at0001]/items[at0008]/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 | `/data[at0001]/items[at0008]/items[at0020]` |
| `description` | `text` | yes | Description | `/data[at0001]/items[at0008]/items[at0014]` |
| `episode_amount_magnitude`<br />`episode_amount_units` | quantity<br />`numeric`, `text` | yes | Episode amount | `/data[at0001]/items[at0008]/items[at0016]` |
| `episode_cessation` | `timestamptz` | yes | Episode cessation | `/data[at0001]/items[at0008]/items[at0012]` |
| `episode_duration` | `interval` | yes | Episode duration | `/data[at0001]/items[at0008]/items[at0031]` |
| `episode_reason_for_cessation`<br />`episode_reason_for_cessation_code`<br />`episode_reason_for_cessation_system`<br />`episode_reason_for_cessation_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Episode reason for cessation | `/data[at0001]/items[at0008]/items[at0013]` |
| `route`<br />`route_code`<br />`route_system`<br />`route_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Route | `/data[at0001]/items[at0008]/items[at0032]` |
| `therapeutic_response`<br />`therapeutic_response_code`<br />`therapeutic_response_system`<br />`therapeutic_response_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Therapeutic response | `/data[at0001]/items[at0008]/items[at0022]` |

#### Constraints

```sql
check ((episode_indication_code is null and episode_indication_system is null and episode_indication_valueset_id is null) or (episode_indication is not null and episode_indication_code is not null and episode_indication_system is not null and episode_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))
check ((episode_amount_magnitude is null and episode_amount_units is null) or (episode_amount_magnitude is not null and episode_amount_units is not null))
check ((episode_reason_for_cessation_code is null and episode_reason_for_cessation_system is null and episode_reason_for_cessation_valueset_id is null) or (episode_reason_for_cessation is not null and episode_reason_for_cessation_code is not null and episode_reason_for_cessation_system is not null and episode_reason_for_cessation_valueset_id is not null))
check ((route_code is null and route_system is null and route_valueset_id is null) or (route is not null and route_code is not null and route_system is not null and route_valueset_id is not null))
check ((therapeutic_response_code is null and therapeutic_response_system is null and therapeutic_response_valueset_id is null) or (therapeutic_response is not null and therapeutic_response_code is not null and therapeutic_response_system is not null and therapeutic_response_valueset_id is not null))
```

#### Unique

- `medication_summary_id, position`

#### References

| Columns | Target | On delete |
|---|---|---|
| `medication_summary_id` | [`medication_summary`](/docs/tables/medication_summary) | cascade |
| `episode_indication_valueset_id, episode_indication_code, episode_indication_system, episode_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 |
| `episode_reason_for_cessation_valueset_id, episode_reason_for_cessation_code, episode_reason_for_cessation_system, episode_reason_for_cessation` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `route_valueset_id, route_code, route_system, route` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `therapeutic_response_valueset_id, therapeutic_response_code, therapeutic_response_system, therapeutic_response` | [`valueset_code`](/docs/tables/valueset_code) | restrict |

### Referenced by

- [`medication_summary_episode_additional_details`](/docs/tables/medication_summary_episode_additional_details) via `medication_summary_episode_id`

### `medication_summary_episode_additional_details`

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

| Column | Type | Null | Description | Source |
|---|---|---|---|---|
| `id` | `uuid primary key` | no | Primary key. | — |
| `medication_summary_episode_id` | `uuid` → [`medication_summary_episode`](/docs/tables/medication_summary_episode) | no | — | — |
| `position` | `integer` | no | Order of this row within its parent, from zero. | — |
| `dosage_id` | `uuid` | yes | — | — |
| `medication_detail_id` | `uuid` | yes | — | — |
| `therapeutic_direction_id` | `uuid` | yes | — | — |

#### Constraints

```sql
check (num_nonnulls(dosage_id, medication_detail_id, therapeutic_direction_id) = 1)
```

#### Unique

- `medication_summary_episode_id, position`

#### References

| Columns | Target | On delete |
|---|---|---|
| `medication_summary_episode_id` | [`medication_summary_episode`](/docs/tables/medication_summary_episode) | cascade |
| `dosage_id` | [`dosage`](/docs/tables/dosage) | no action |
| `medication_detail_id` | [`medication_detail`](/docs/tables/medication_detail) | no action |
| `therapeutic_direction_id` | [`therapeutic_direction`](/docs/tables/therapeutic_direction) | no action |

#### Indexes

- `medication_summary_episode_additional_details_dosage_id_idx` on `dosage_id`
- `medication_summary_episode_additional_details_medication_dd8ed0` on `medication_detail_id`
- `medication_summary_episode_additional_details_therapeuti_4e4551` on `therapeutic_direction_id`

