> ## 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.

# Medication Dispense

> Schema documentation for the Medication Dispense table in the Metriport data model

A medication dispense record represents the dispensing of a medication to a patient. This includes details about when the medication was prepared, dispensed, and the quantity provided.

**Reference Table:**

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

* **medication\_reference** (required): links to the medication that was dispensed
* **subject** (required): links to the patient who received the medication
* **performer.actor**: links to practitioners who performed the dispensing
* **location**: links to the location where the medication was dispensed

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

**Medication Dispense Table:**

**Primary Keys:**

* medication\_dispense\_id

**Foreign Keys:**

* patient\_id
* medication\_id

| Column                   | Data Type | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------------ | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| medication\_dispense\_id | varchar   | Unique identifier for the medication dispense                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| patient\_id              | varchar   | Unique identifier for the patient                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| medication\_id           | varchar   | Unique identifier for the medication                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| status                   | varchar   | Status of the medication dispense. Possible values:<br />– <code>preparation</code>: The core event has not started yet, but some staging activities have begun (for example, initial preparing and labeling of medication).<br />– <code>in-progress</code>: The dispensed product is being prepared and packaged.<br />– <code>cancelled</code>: The dispensing event was terminated prior to any output product being created.<br />– <code>on-hold</code>: The dispensing event has been temporarily halted but is expected to resume.<br />– <code>completed</code>: The dispensed product has been handed over to the patient or patient representative.<br />– <code>entered-in-error</code>: The dispense event was created in error and should not be considered valid.<br />– <code>stopped</code>: Actions implied by the dispense event have been permanently halted, before all of them occurred.<br />– <code>declined</code>: The dispense was declined and not performed.<br />– <code>unknown</code>: The authoring system does not know which of the status values applies for this dispense. |
| when\_handed\_over       | date      | Date when the medication was handed over                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| when\_prepared           | date      | Date when the medication was prepared                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| dose\_unit               | varchar   | Unit of measurement for the dose                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| dose\_amount             | varchar   | Amount of medication dispensed                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| days\_supply\_amount     | varchar   | Number of days the medication will last                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| days\_supply\_unit       | varchar   | Unit for days supply (typically "d")                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| note\_text               | varchar   | Additional notes about the dispense                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| meta\_source             | varchar   | Source document filename from FHIR meta.source                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| data\_source             | varchar   | **Deprecated.** Use `meta_source` instead.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| data\_source\_ext        | varchar   | Integration source of the data, derived from FHIR extension                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
