> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metriport.com/llms.txt
> Use this file to discover all available pages before exploring further.

# medicationdispense

Indicates that a medication product is to be or has been dispensed for a named person/patient. This resource covers the supply of medications to a patient. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/medicationdispense.html) for full details.

**Previous version:** [medication\_dispense](/medical-api/handling-data/schema-v000/medication-dispense)

**Tables in this resource:**

* **medicationdispense** – Main medication dispense record (this page)
* [medicationdispense\_extension](/medical-api/handling-data/schema-v100/medicationdispense/extension)
* [medicationdispense\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/medicationdispense/extension_vcc_coding)
* **medicationdispense\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)

**Reference Table:**

The `medicationdispense_references` table contains normalized references from the medication dispense to other entities. It supports the following reference properties:

* **medication\_reference**: links to the [medication](/medical-api/handling-data/schema-v100/medication/base) that was dispensed
* **subject**: links to the [patient](/medical-api/handling-data/schema-v100/patient/base) who received the medication
* **performer.actor**: links to [practitioner](/medical-api/handling-data/schema-v100/practitioner/base) or [organization](/medical-api/handling-data/schema-v100/organization/base) per `reference_type`

For detailed information about reference table structure and indexing, see the [Reference Tables documentation](/medical-api/handling-data/schema-v100/reference_tables).

**Primary Keys:**

* medicationdispense\_id

**Foreign Keys:**

* patient\_id – links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table
* medication\_id – links to the [medication](/medical-api/handling-data/schema-v100/medication/base) table

<div style={{textAlign: 'right'}}><sub>† Metriport Platform added</sub></div>

| Column                 | Data Type | Description                                                                                                                         |
| ---------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| medicationdispense\_id | varchar   | Unique identifier for the medication dispense                                                                                       |
| patient\_id            | varchar   | Unique identifier for the patient (subject)                                                                                         |
| medication\_id         | varchar   | Reference to the dispensed medication                                                                                               |
| status                 | varchar   | Status of the dispense (e.g. preparation, in-progress, completed, cancelled, on-hold, entered-in-error, stopped, declined, unknown) |
| whenhandedover         | datetime  | Date/time the medication was handed over                                                                                            |
| whenprepared           | datetime  | Date/time the medication was prepared                                                                                               |
| quantity\_unit         | varchar   | Unit of quantity dispensed                                                                                                          |
| quantity\_value        | varchar   | Quantity dispensed                                                                                                                  |
| dayssupply\_unit       | varchar   | Unit for days supply                                                                                                                |
| dayssupply\_value      | varchar   | Number of days supply                                                                                                               |
| note\_text†            | varchar   | Additional notes about the dispense (first note)                                                                                    |
| meta\_source           | varchar   | Source document filename from FHIR meta.source                                                                                      |
| data\_source\_ext†     | varchar   | Integration source derived from FHIR extension                                                                                      |

**Related Tables:**

**Parent:**

* [medication](/medical-api/handling-data/schema-v100/medication/base)
* [patient](/medical-api/handling-data/schema-v100/patient/base)

**Child:**

* [medicationdispense\_extension](/medical-api/handling-data/schema-v100/medicationdispense/extension)

## Version diff

**Renamed**

* `medication_dispense_id` → `medicationdispense_id`
* `when_handed_over` → `whenhandedover`
* `when_prepared` → `whenprepared`
* `days_supply_unit` → `dayssupply_unit`
* `data_source` → `meta_source`
