← Methods repository
CONCEPTINTERMEDIATEPYTHON · R · SAS10 citations

Medication Order, Dispensing, Administration, and Reconciliation

The operational separation of four medication evidence layers - clinician order, pharmacy dispensing, actual administration, and reconciled medication history - so RWE exposure definitions use the source that matches the estimand instead of treating every medication record as proof that a patient started or received treatment.

Exposure Definitionmedication-exposureexposure-definitionmedication-orderdispensingmedication-administrationmedication-reconciliationeMARMAR
On this page
Methods reference only. Use primary source citations and local policy before applying this in a study protocol, regulatory submission, payer dossier, or clinical decision.
In plain language

A medication record can mean several different things. A doctor may order a drug, a pharmacy may dispense it, a nurse may administer it, and a hospital may reconcile it on a home medication list. These are not interchangeable. For a drug-effect study, the analyst usually needs proof the patient filled or received the medication, not just that it was prescribed.

When to use it
Any medication exposure, initiation, persistence, or safety study using EHR or linked data.
Linked EHR-claims studies, biologics/infusions, inpatient safety, primary non-adherence, and transitions-of-care questions.
Longitudinal pharmacoepidemiology where patients may receive drugs inside and outside one health system.
Watch out for
Requires more source-specific ETL and protocol decisions.
EHR-derived layers can be incomplete outside the health system and require source hierarchy logic.
Claims and dispensings are less clinically precise than MAR for exact dose and time.

Medication order, dispensing, administration, and reconciliation

are four different evidence layers in real-world medication data. They are often collapsed into one "drug exposure" table, but they do not mean the same thing. A MedicationRequest or EHR order means a clinician intended or prescribed therapy. A MedicationDispense or pharmacy claim means a medication was supplied or adjudicated for pickup. A MedicationAdministration record, MAR/eMAR entry, J-code service line, or infusion record means a dose was actually given. A medication reconciliation or medication statement means a clinician, patient, caregiver, pharmacy, or prior record reported that the patient was taking or should be taking a medication at a transition of care. RWE exposure validity depends on choosing the layer that matches the estimand.

Core conceptual distinction

The key distinction is intended treatment vs supplied treatment vs received treatment vs reported home medication. For an as-prescribed policy question, the order can be the exposure. For a new-user drug-effect question, a dispensing or administration usually defines initiation because a never-filled order is primary non-adherence. For an inpatient safety question, administration time is the exposure clock because the patient is at risk after the dose is given, not after it was ordered or dispensed to the ward. For transitions-of-care research, medication reconciliation identifies discrepancies between what should be continued, stopped, or changed; it is not proof that the patient had continuous drug supply. The same drug name can appear in all four places with four different dates and four different meanings.

Pros, cons, and trade-offs

  • Order vs dispensing: Orders capture prescriber intent and indication context, including primary non-adherence denominators. Dispensing confirms outpatient supply and supports days_supply-based episodes. Orders overcount actual exposure because many prescriptions are never filled; dispensings miss orders abandoned before fill and usually miss inpatient administrations. Use orders for uptake and prescribing questions; use dispensings for outpatient self-administered exposure.
  • Dispensing vs administration: Dispensing is strong for oral and self-administered outpatient drugs because the patient receives a supply. It is weak for inpatient and provider-administered products where a pharmacy supply event can precede, follow, or never result in an actual dose. Administration is the gold source for dose received, route, time, and partial doses, but it is usually limited to one health system and can miss outside infusions. Use administration records for inpatient, infusion, and exact-dose questions.
  • Administration vs medical-benefit claim: A MAR/eMAR entry records the clinical act; a J-code claim records the billable event. Claims improve population capture and can see outside facilities, but service dates and billing units are less clinically precise. For provider-administered drugs, prefer MAR when exact dose and time are needed; prefer claims when system-wide capture matters; use linked MAR plus claims when both validity and completeness matter.
  • Medication reconciliation vs active medication list: Reconciliation is a transition-of-care safety process that compares sources to find omissions, commissions, dose errors, and discontinued medications. Active medication lists are often stale. Reconciled home med lists are useful for preadmission exposure history and discrepancy outcomes, but they should not be treated as confirmed fills or administrations without supporting data.

When NOT to use - and when it is actively misleading

  • Do not define confirmed exposure from orders alone for a drug-effect study. A prescription never filled or administered cannot produce a pharmacologic effect. Treating orders as exposure biases effects toward the null and can misalign time zero.
  • Do not define inpatient or infused exposure from pharmacy supply alone. A product dispensed to a ward, cabinet, or infusion center is not necessarily administered to the patient.
  • Do not use medication reconciliation as a refill record. A reconciled medication list can be based on patient report or stale prior lists; it does not carry days_supply or prove current possession.
  • Do not merge dates without preserving event type. Order date, fill date, administration start time, claim service date, reconciliation time, and warehouse load time should remain distinct until a pre-specified hierarchy selects the analysis date.
  • Do not ignore reversals, abandonments, and cancellations. A paid pharmacy claim later reversed, a canceled order, or an administration marked not-done should not define initiation.

Data-source operational depth

  • EHR: Captures orders, medication lists, reconciliations, inpatient MAR/eMAR administrations, and sometimes outpatient infusion administrations. Strengths are indication context, exact administration time, dose, route, and stop/hold reasons. Weaknesses are external pharmacy fills and outside administrations. Always filter order intent/status and administration status; distinguish active orders from completed or canceled orders.
  • Pharmacy claims / dispensing systems: Best source for outpatient self-administered fills, NDC, fill_date, days_supply, quantity, and reversals. Cannot see orders that were never filled, inpatient doses, samples, over-the-counter use, or provider-administered drugs under the medical benefit.
  • Medical claims: HCPCS J/Q/C codes identify provider-administered drugs and service dates at population scale. They usually lack exact administration time, true dose infused, and clinical reasons for holds. Billing units require descriptor conversion and NOC-period NDC parsing.
  • Registry: Often records treatment as regimen, line of therapy, start/stop dates, or abstracted yes/no exposure. These fields may be clinically curated but less granular than claims or MAR. Preserve whether exposure was abstracted, imported, or patient-reported.
  • Linked data: The strongest approach combines EHR order/MAR context, pharmacy dispensing completeness, medical claims for outside/provider-administered care, and reconciliation history. The central analytic task is date and source reconciliation, not simply unioning records.

Worked example

A comparative safety study of injectable biologic initiation has four records: an EHR order on day 0, a specialty pharmacy dispense on day 3, a clinic administration on day 10, and a medical claim J-code on day 12. If the drug is self-injected at home, the day 3 dispense is a defensible initiation date after removing reversals. If the drug is clinic-administered, day 10 is the correct exposure start; day 3 only shows product supply. If the study uses claims-only data, day 12 may be the best available proxy but must be labeled as a service-date proxy, not exact administration time. Medication reconciliation at a later hospitalization may confirm the drug is on the home list, but it cannot determine the true first dose without linked order/dispense/admin evidence.

Decision diagram

flowchart TD
  Order[Order / MedicationRequest<br/>intent to treat] --> Dispense[Dispense / pharmacy claim<br/>supply provided]
  Dispense --> Admin[Administration / MAR or J-code<br/>dose given or billed]
  Recon[Medication reconciliation<br/>reported current/home medication list] --> Discrepancy[Discrepancy outcome<br/>continue, stop, change, omit]
  Order --> PNA[Primary non-adherence check<br/>ordered but no fill/admin]
  Admin --> Effect[Drug-effect exposure clock<br/>received treatment]
  Dispense --> Outpt[Outpatient self-administered episodes<br/>days_supply, PDC, persistence]
Medication evidence layers have different meanings. Exposure definitions should use the layer that matches the estimand and preserve the others as provenance.

Worked example

Scenario

One patient has four evidence records for the same biologic: an order, a dispense, an administration, and a medical claim. The correct initiation date depends on whether the estimand is as-prescribed, self-administered exposure, clinic-administered exposure, or claims-only utilization.

Dataset

Four medication evidence layers for one biologic start

event_typeevent_datesourcestatusinterpretation
order2023-04-01EHR MedicationRequestactiveclinician intended therapy
dispense2023-04-04pharmacy claimpaid_not_reversedoutpatient supply was provided
administration2023-04-11EHR MARcompleteddose was actually given in clinic
claim2023-04-12medical claim J-codepaidprovider billed administered product

Steps

1For an as-prescribed policy question, the order date can be the index because the prescribing decision is the exposure.
2For a self-administered outpatient drug-effect question, the paid non-reversed dispense date is the best initiation date.
3For a clinic-administered biologic safety question, the completed MAR administration date is the best initiation date.
4For a claims-only provider-administered drug study, the medical claim service date is the best available proxy but should be labeled as a proxy.
5The medication reconciliation list is useful if the patient is admitted later, but it cannot by itself prove first dose or continuous supply.

Result

The same source records support different estimands. For clinic-administered exposure, index_date = 2023-04-11 from the completed administration record; the order, dispense, and claim dates are retained as supporting provenance.

Trade-offs

vs. Treating all medication records as one exposure table
Pros of this
Preserves clinical meaning and prevents order, fill, administration, and reconciled-history records from being misused interchangeably.
vs. Pharmacy claims only exposure
Pros of this
Captures order intent, inpatient administrations, provider-administered drugs, and reconciliation discrepancies that pharmacy claims miss.
vs. MAR/eMAR only administration exposure
Pros of this
Adds outside/provider-administered claims and outpatient dispensing for more complete longitudinal capture.

Runnable example

Derive medication initiation from a normalized medication evidence table. Required input: med: person_id, drug_group, event_type, event_date, status, route_group, reversed event_type in {'order','dispense','administration','jcode_claim','reconciliation'}.

requires: pandas
import pandas as pd

def derive_medication_initiation(med: pd.DataFrame, route_group: str) -> pd.DataFrame:
    m = med.copy()
    m["event_date"] = pd.to_datetime(m["event_date"])

    if route_group == "self_administered":
        keep = (m["event_type"] == "dispense") & (~m["reversed"].fillna(False)) & \
               (m["status"].isin(["paid", "completed", "dispensed"]))
        cand = m[keep].assign(source_rank=1)
    elif route_group == "provider_administered":
        admin = (m["event_type"] == "administration") & (m["status"].isin(["completed", "given"]))
        claim = (m["event_type"] == "jcode_claim") & (m["status"].isin(["paid", "adjudicated"]))
        cand = pd.concat([
            m[admin].assign(source_rank=1),
            m[claim].assign(source_rank=2),
        ], ignore_index=True)
    else:
        raise ValueError("route_group must be self_administered or provider_administered")

    first = (cand.sort_values(["person_id", "drug_group", "source_rank", "event_date"])
                .groupby(["person_id", "drug_group"], as_index=False)
                .first())
    first = first.rename(columns={"event_date": "initiation_date", "event_type": "initiation_source"})

    # Preserve whether an earlier order exists; this is useful for primary non-adherence diagnostics.
    orders = (m[m["event_type"] == "order"]
                .groupby(["person_id", "drug_group"])["event_date"]
                .min()
                .rename("first_order_date")
                .reset_index())
    return first.merge(orders, on=["person_id", "drug_group"], how="left")[
        ["person_id", "drug_group", "initiation_date", "initiation_source", "first_order_date"]
    ]

Citations

FOUNDATIONAL / METHODS
  1. [1]Raebel MA, Schmittdiel J, Karter AJ, Konieczny JL, Steiner JF. Standardizing terminology and definitions of medication adherence and persistence in research employing electronic databases. Medical Care. 2013;51(8 Suppl 3):S11-S21.
  2. [2]Poon EG, Keohane CA, Yoon CS, et al. Effect of bar-code technology on the safety of medication administration. New England Journal of Medicine. 2010;362(18):1698-1707.
  3. [3]Fischer MA, Stedman MR, Lii J, et al. Primary medication non-adherence: analysis of 195,930 electronic prescriptions. Journal of General Internal Medicine. 2010;25(4):284-290.
  4. [4]Andrade SE, Kahler KH, Frech F, Chan KA. Methods for evaluation of medication adherence and persistence using automated databases. Pharmacoepidemiology and Drug Safety. 2006;15(8):565-574.
  5. [5]Gleason KM, Brake H, Agramonte V, Perfetti C. Medications at Transitions and Clinical Handoffs (MATCH) Toolkit for Medication Reconciliation. Agency for Healthcare Research and Quality. 2012.
APPLIED EXAMPLES
  1. [6]Cornish PL, Knowles SR, Marchesano R, et al. Unintended medication discrepancies at the time of hospital admission. Archives of Internal Medicine. 2005;165(4):424-429.
  2. [7]Pippins JR, Gandhi TK, Hamann C, et al. Classifying and predicting errors of inpatient medication reconciliation. Journal of General Internal Medicine. 2008;23(9):1414-1422.
REPORTING & GUIDANCE
  1. [8]Health Level Seven International. FHIR Release 4: MedicationRequest Resource. 2019.
  2. [9]Health Level Seven International. FHIR Release 4: MedicationDispense Resource. 2019.
  3. [10]Health Level Seven International. FHIR Release 4: MedicationAdministration Resource. 2019.