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.
On this page
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.
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]
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_type | event_date | source | status | interpretation |
|---|---|---|---|---|
| order | 2023-04-01 | EHR MedicationRequest | active | clinician intended therapy |
| dispense | 2023-04-04 | pharmacy claim | paid_not_reversed | outpatient supply was provided |
| administration | 2023-04-11 | EHR MAR | completed | dose was actually given in clinic |
| claim | 2023-04-12 | medical claim J-code | paid | provider billed administered product |
Steps
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
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'}.
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"]
]data.table implementation of source-layer-aware medication initiation.
library(data.table)
derive_medication_initiation <- function(med, route_group) {
setDT(med)
med[, event_date := as.IDate(event_date)]
if (route_group == "self_administered") {
cand <- med[event_type == "dispense" &
fifelse(is.na(reversed), FALSE, reversed) == FALSE &
status %chin% c("paid", "completed", "dispensed")]
cand[, source_rank := 1L]
} else if (route_group == "provider_administered") {
admin <- med[event_type == "administration" & status %chin% c("completed", "given")]
claim <- med[event_type == "jcode_claim" & status %chin% c("paid", "adjudicated")]
admin[, source_rank := 1L]
claim[, source_rank := 2L]
cand <- rbindlist(list(admin, claim), fill = TRUE)
} else {
stop("route_group must be self_administered or provider_administered")
}
setorder(cand, person_id, drug_group, source_rank, event_date)
first <- cand[, .SD[1L], by = .(person_id, drug_group)]
setnames(first, c("event_date", "event_type"), c("initiation_date", "initiation_source"))
orders <- med[event_type == "order", .(first_order_date = min(event_date)), by = .(person_id, drug_group)]
merge(first[, .(person_id, drug_group, initiation_date, initiation_source)], orders,
by = c("person_id", "drug_group"), all.x = TRUE)
}SAS pattern for deriving provider-administered initiation with source precedence. Required dataset: work.med: person_id drug_group event_type event_date status reversed For self-administered drugs, use event_type='dispense' and non-reversed paid/completed fills.
/* Provider-administered initiation: completed MAR administration first, then paid J-code claim. */
data med_candidates;
set work.med;
length initiation_source $30;
if event_type = 'administration' and status in ('completed','given') then do;
source_rank = 1; initiation_source = event_type; output;
end;
else if event_type = 'jcode_claim' and status in ('paid','adjudicated') then do;
source_rank = 2; initiation_source = event_type; output;
end;
run;
proc sort data=med_candidates;
by person_id drug_group source_rank event_date;
run;
data initiation;
set med_candidates;
by person_id drug_group;
if first.drug_group then do;
initiation_date = event_date;
output;
end;
keep person_id drug_group initiation_date initiation_source;
format initiation_date date9.;
run;
/* Retain earliest order date for intent / primary non-adherence diagnostics. */
proc sql;
create table first_order as
select person_id, drug_group, min(event_date) as first_order_date format=date9.
from work.med
where event_type = 'order'
group by person_id, drug_group;
create table initiation_traceable as
select i.*, o.first_order_date
from initiation i
left join first_order o
on i.person_id = o.person_id and i.drug_group = o.drug_group;
quit;Citations
- [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]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]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]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]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.
- [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.
- [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.