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

# Medication

> The FHIR Medication resource as produced by Connective Health

[FHIR R4 Medication](https://www.hl7.org/fhir/R4/medication.html) ·
[US Core Medication](https://hl7.org/fhir/us/core/STU9/StructureDefinition-us-core-medication.html)

<Info>
  `Medication` is produced differently across the FHIR outputs. In
  [Bulk Medication History](/fhir/bulk-medication-history-bundle) it is always a standalone, deduplicated resource.
  In the [Patient Everything](/fhir/patient-everything-bundle) and
  [Patient Summary](/fhir/patient-summary-bundle) bundles it is only produced when the customer is configured for
  full `Medication` resources, and is then **contained** inside its `MedicationRequest`. The **Stable ID** and
  **Fields** sections below cover both, with a column per output.
</Info>

# Stable ID

| Output                       | Recipe                                                                                                                                                                                                                                                                                                                                                                      |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Patient Everything / Summary | No `id` is assigned. When produced, the resource is contained inside its parent [MedicationRequest](/fhir/resources/medication-request) and is neither addressable on its own nor deduplicated -- so unlike Bulk Medication History, the same drug product does **not** collapse into one shared resource. Use the parent `MedicationRequest`'s `id` to track it over time. |
| Bulk Med History             | Derived from the product code, drug description, form code, and strength. Because the patient is **not** part of this ID, an identical medication is represented by a single shared `Medication` resource across every `MedicationRequest` and `MedicationDispense` that reference it -- including across different patients.                                               |

<Note>
  When the customer is not configured for full `Medication` resources in the bundles, none are produced at all --
  the drug is published inline as `MedicationRequest.medicationCodeableConcept` instead. See
  [Medication representation](/fhir/resources/medication-request#medication-representation).
</Note>

# Fields

| Field                            | Patient Everything / Summary | Bulk Med History | Notes                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| -------------------------------- | ---------------------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `meta.profile`                   | 1..1                         | 1..1             | Always set to the US Core Medication profile URL.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `code`                           | 1..1                         | 1..1             | Bundles: a single coding for the drug, using the same "effective" code that would otherwise be published inline on the `MedicationRequest` -- typically [RxNorm](http://www.nlm.nih.gov/research/umls/rxnorm) or [NDC](http://hl7.org/fhir/sid/ndc), see [Code Systems](/fhir/code-systems). Bulk Med History: `system` is set to [NDC](http://hl7.org/fhir/sid/ndc) and `display` to the source drug description; `code` is only populated when the source product code is an 11-digit NDC code (and is not the "compounded medication" sentinel value) -- otherwise `code` is left blank while `system` and `display` are still set. |
| `ingredient.itemCodeableConcept` | 0..1                         | 0..0             | Bundles only: the drug name code, when the source carries one distinct from the product code, expressing the underlying drug rather than the packaged product. Not populated in Bulk Med History.                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `form.coding`                    | 0..1                         | 0..1             | Bundles: a single coding for the medication's dose form (e.g. tablet, capsule), when the source carries one. Bulk Med History: `system` is set to the [NCI Thesaurus](https://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl). `code` comes from the source form code; `display` is looked up from a reference data set of NCPDP form codes and may be blank if the code is not recognized.                                                                                                                                                                                                                                               |

<Note>
  `status`, `manufacturer`, and `amount` are not populated in either output. Strength is published on the
  prescription rather than on `Medication` in the bundles, as `MedicationRequest.dosageInstruction.doseAndRate.dose`.
</Note>
