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

This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/medication.html) for full details.

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

**Design notes:** Core has no `medication_references` table (Medication is referenced by MedicationAdministration, MedicationDispense, etc.). The FHIR `ingredient` array is not modeled in core by design.

**Tables in this resource:**

* **medication** – Medication record (this page)
* [medication\_code\_coding](/medical-api/handling-data/schema-v100/medication/code_coding)
* [medication\_extension](/medical-api/handling-data/schema-v100/medication/extension)
* [medication\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/medication/extension_vcc_coding)

**Primary Keys:**

* medication\_id

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

| Column | Data Type | Description |
| - | - | - |
| medication\_id | varchar | Unique identifier for the medication |
| status | varchar | Status of the medication. Possible values:<br />– <code>active</code>: The medication is currently in use.<br />– <code>inactive</code>: The medication is not currently in use.<br />– <code>entered-in-error</code>: The medication record was entered in error. Refer to <a href="https://hl7.org/fhir/R4/valueset-medication-status.html" target="_blank" rel="noopener noreferrer">HL7 FHIR Medication Status</a> for more details. |
| code\_text | varchar | Free-text description of the medication |
| code\_rxnorm\_code† | varchar | RxNorm code for the medication |
| code\_rxnorm\_display† | varchar | Human-readable description from RxNorm |
| code\_ndc\_code† | varchar | National Drug Code for the medication |
| code\_ndc\_display† | varchar | Human-readable description from NDC |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |

**Related Tables:**

**Child:**

* [medication\_code\_coding](/medical-api/handling-data/schema-v100/medication/code_coding)
* [medication\_extension](/medical-api/handling-data/schema-v100/medication/extension)
* [medicationadministration](/medical-api/handling-data/schema-v100/medicationadministration/base)
* [medicationdispense](/medical-api/handling-data/schema-v100/medicationdispense/base)
* [medicationrequest](/medical-api/handling-data/schema-v100/medicationrequest/base)
* [medicationstatement](/medical-api/handling-data/schema-v100/medicationstatement/base)

## Version diff

**Renamed**

* `rxnorm_code` → `code_rxnorm_code`
* `rxnorm_display` → `code_rxnorm_display`
* `ndc_code` → `code_ndc_code`
* `ndc_display` → `code_ndc_display`
* `data_source` → `meta_source`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.