---
title: "medication_screening"
description: "Series of questions and associated answers used to screen for the use of medications."
---

Series of questions and associated answers used to screen for the use of medications.

**Purpose.** To create a framework for recording answers to pre-defined screening questions about the use of any specified medication or grouping of medications.

## Source

| Model | Leg | Role |
|---|---|---|
| `openEHR-EHR-OBSERVATION.medication_screening.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. | — |
| `screening_purpose`<br />`screening_purpose_code`<br />`screening_purpose_system`<br />`screening_purpose_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Screening purpose | `/data[at0022]/events[at0023]/data[at0001]/items[at0040]` |
| `any_medications_used` | `boolean` | yes | Any medications used? | `/data[at0022]/events[at0023]/data[at0001]/items[at0027]` |
| `description` | `text` | yes | Description | `/data[at0022]/events[at0023]/data[at0001]/items[at0043]` |

## Constraints

```sql
check ((screening_purpose_code is null and screening_purpose_system is null and screening_purpose_valueset_id is null) or (screening_purpose is not null and screening_purpose_code is not null and screening_purpose_system is not null and screening_purpose_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 |
| `screening_purpose_valueset_id, screening_purpose_code, screening_purpose_system, screening_purpose` | [`valueset_code`](/docs/tables/valueset_code) | restrict |

## Referenced by

- [`medication_screening_specific_medication`](/docs/tables/medication_screening_specific_medication) via `medication_screening_id`

## Indexes

- `medication_screening_form_id_idx` on `form_id`

## Child tables

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

### `medication_screening_specific_medication`

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

| Column | Type | Null | Description | Source |
|---|---|---|---|---|
| `id` | `uuid primary key` | no | Primary key. | — |
| `medication_screening_id` | `uuid` → [`medication_screening`](/docs/tables/medication_screening) | no | — | — |
| `position` | `integer` | no | Order of this row within its parent, from zero. | — |
| `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[at0022]/events[at0023]/data[at0001]/items[at0026]/items[at0021]` |
| `used` | `boolean` | yes | Used | `/data[at0022]/events[at0023]/data[at0001]/items[at0026]/items[at0024]` |
| `latest_dose` | `timestamptz` | yes | Latest dose | `/data[at0022]/events[at0023]/data[at0001]/items[at0026]/items[at0003]` |
| `timing` | `timestamptz` | yes | Timing | `/data[at0022]/events[at0023]/data[at0001]/items[at0026]/items[at0002]` |
| `comment` | `text` | yes | Comment | `/data[at0022]/events[at0023]/data[at0001]/items[at0026]/items[at0025]` |

#### 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))
```

#### Unique

- `medication_screening_id, position`

#### References

| Columns | Target | On delete |
|---|---|---|
| `medication_screening_id` | [`medication_screening`](/docs/tables/medication_screening) | cascade |
| `medication_name_valueset_id, medication_name_code, medication_name_system, medication_name` | [`valueset_code`](/docs/tables/valueset_code) | restrict |

### Referenced by

- [`medication_screening_specific_medication_additional_details`](/docs/tables/medication_screening_specific_medication_additional_details) via `medication_screening_specific_medication_id`

### `medication_screening_specific_medication_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_screening_specific_medication_id` | `uuid` → [`medication_screening_specific_medication`](/docs/tables/medication_screening_specific_medication) | no | — | — |
| `position` | `integer` | no | Order of this row within its parent, from zero. | — |
| `dosage_id` | `uuid` | no | Additional details | `/data[at0022]/events[at0023]/data[at0001]/items[at0026]/items[at0041]` |

#### Unique

- `medication_screening_specific_medication_id, position`
- `medication_screening_specific_medication_id, dosage_id`

#### References

| Columns | Target | On delete |
|---|---|---|
| `medication_screening_specific_medication_id` | [`medication_screening_specific_medication`](/docs/tables/medication_screening_specific_medication) | cascade |
| `dosage_id` | [`dosage`](/docs/tables/dosage) | no action |

#### Indexes

- `medication_screening_specific_medication_additional_deta_0b16b9` on `dosage_id`

