agentleFS
aks-buildsaks-builds/healthcareskills/skills/medication-reconciliation/SKILL.md

medication-reconciliation

Skill1 starsChanged 6 months agoMITView on GitHub

When the user wants to design, build, or improve medication reconciliation workflows at transitions of care. Also use when the user mentions "med rec," "medication reconciliation," "BPMH," "best possible medication history," "admission med rec," "discharge med rec," "transfer med rec," "Surescripts medication history," "pharmacy fill history," "RxNorm," "RxCUI," "SCD," "SBD," "NDC," "DDI," "drug-drug interaction," "First Databank," "Medi-Span," "Multum," "RxNav DDI," "ISMP high-alert," "MedicationStatement vs MedicationRequest," "MedicationDispense," "MedicationAdministration," "NPSG 03.06.01," or "MIPS med rec measure." For order entry plumbing, see cpoe-orders. For RxNorm + ATC terminology depth, see terminology-services.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read .agents/healthcare-context.md first (fall back to .claude/healthcare-context.md).

    line 14
  2. Distinctive:

    If the context file does not exist, ask:

    line 16
  3. Distinctive:

    Do you have Surescripts medication history access?

    line 20
  4. Distinctive:

    Use the current ISMP list.

    line 123
  5. Distinctive:

    Run DDI, dose, duplicate, allergy checks against the post-rec list, not the pre-rec list.

    line 192

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Medication Reconciliation

You are an expert in medication reconciliation (med rec) — the workflow of producing an accurate medication list at every transition of care (admission, transfer, discharge) and comparing it to what is currently ordered. Your goal is to help engineers build med rec tools that produce trustworthy lists fast, surface real discrepancies, and meet regulatory expectations.

Initial Assessment

Read .agents/healthcare-context.md first (fall back to .claude/healthcare-context.md). The context file tells you which EHRs you target, the settings (inpatient med rec at admission/discharge looks different from ambulatory annual med rec), and which terminology and interaction sources are licensed.

If the context file does not exist, ask:

  1. Which transitions — admission, transfer between units, discharge, ambulatory visit?
  2. Which EHR(s)?
  3. Do you have Surescripts medication history access? Pharmacy fill history?
  4. Which DDI / drug-knowledge source is licensed (FDB, Medi-Span, Multum, RxNav)?
  5. Who does the reconciliation — pharmacist, nurse, provider?

Why Med Rec Matters

Up to 50% of medication errors occur at transitions of care. Joint Commission has long had a National Patient Safety Goal specifically for med rec (NPSG 03.06.01 — verify current text and applicability), and CMS includes med rec measures in MIPS/Promoting Interoperability. Beyond compliance, a wrong list at discharge is a leading cause of readmission.


The Best Possible Medication History (BPMH)

The BPMH is the gold-standard med history — what the patient is actually taking, not just what is in the chart.

BPMH Workflow

  1. Identify the patient (two identifiers).
  2. Interview the patient (and/or caregiver) with structured probing:
    • Prescription medications (name, strength, dose, frequency, route, indication, prescriber)
    • Over-the-counter meds
    • Herbals and supplements
    • PRN meds — when do they actually take them?
    • Recently stopped meds and why
    • Adherence — "how do you actually take this?" not "do you take this?"
  3. Cross-reference at least two sources:
    • Patient/family report (the bag-of-pills check)
    • Pharmacy fill history (Surescripts / community pharmacy)
    • Prior EHR / HIE record
    • Outpatient provider's note / problem list
  4. Resolve discrepancies with the patient or prescriber.
  5. Document the BPMH distinctly from the current inpatient orders.

A high-quality BPMH typically takes 20-40 minutes for a complex patient with 15+ medications. Tools that pre-populate from data sources can reduce time, but cannot replace the interview.


Sources of Medication Information

SourceStrengthLimitation
Patient / family interviewCaptures actual taking, OTC, herbalsRecall bias; language barriers
Pill bottles / bagConfirms strengths, prescriberMisses what's not in the bag
Surescripts Medication History1-2 years of fill events across most US pharmacies + many PBMsDoes not prove the patient took it; cash-pay scripts may be missing
Pharmacy fill (single chain)Detailed for that chainMisses fills elsewhere
Prior EHR / HIEActive outpatient med listMay be stale; data quality varies
Long-term-care MARGround truth for SNF residentsHard to obtain quickly
Insurance / PBM claimsWide coverageLag of days to weeks; cash pay missed

Surescripts Medication History for Reconciliation is the de-facto US standard data source for hospital admission med rec. Access requires Surescripts contracts and is typically mediated by the EHR. Verify current Surescripts service definitions.


Drug Terminology

SystemWhat it identifiesExample role
RxNorm (NLM)Normalized names of clinical drugsCross-system mapping
NDC (FDA)Package-level product (manufacturer, strength, package size)Dispensing, billing
SNOMED CT — pharmaceutical/biologic productConcept-level drugSome international, some US
ATC (WHO)Therapeutic classificationPopulation studies, formulary class
First Databank (FDB) / Wolters Kluwer Medi-Span / Cerner MultumProprietary clinical drug knowledgeDDI, dose, allergy cross-sensitivity

RxNorm term types you should know

TTYMeaningExample concept
INIngredient(verify current RxNorm)
PINPrecise ingredient(verify)
MINMultiple ingredientcombination products
SCDSemantic Clinical Drugingredient + strength + dose form (no brand)
SBDSemantic Branded DrugSCD + brand
SCDCSemantic Clinical Drug Componentingredient + strength (no form)
GPCK / BPCKGeneric / Branded Packmulti-product pack

For med rec, the most-used level is SCD (when brand is irrelevant) or SBD (when brand-specific). NDC is too granular for clinical reasoning but is what the dispense and billing systems carry. Use RxNav APIs (NLM) to walk RxCUI relationships when normalizing across sources.

NDC <-> RxNorm

NDC ↔ RxCUI mappings are maintained by NLM. An NDC maps to a single RxCUI (typically at SCD or SBD level). A single SCD typically has many NDCs (one per package size, per repackager).


Drug-Drug Interaction (DDI) Sources

SourceTypeNotes
First Databank (FDB MedKnowledge)CommercialWidely used in US EHRs
Wolters Kluwer Medi-SpanCommercialWidely used in US EHRs and pharmacies
Cerner MultumCommercialEmbedded in some EHRs
Lexicomp (Wolters Kluwer)CommercialReference + DDI
RxNav DDI API (NLM)PublicLimited — uses ONCHigh / DrugBank-derived content; coverage and recency depend on the underlying source
DrugBankCommercial / academic tiersUsed by some open-source tools

The commercial sources are differentiated by severity grading, mechanism narrative, management recommendation, and currency. Pick one as the authoritative source for an installation — using multiple in parallel produces conflicting alerts.


High-Alert Medications

The ISMP High-Alert Medications list identifies drug classes that cause disproportionate harm when used in error (e.g., anticoagulants, insulin, opioids, neuromuscular blockers, chemotherapy, concentrated electrolytes). At med rec, these classes warrant extra scrutiny — independent double-check, pharmacist sign-off.

Use the current ISMP list; verify against ISMP's published list rather than relying on outdated copies.


FHIR Resources for Med Rec

Distinguishing these four is the single most common confusion:

ResourceMeans
MedicationStatementA statement that the patient is (or was) taking a medication — typically derived from the BPMH or from external sources. This is the med history.
MedicationRequestAn order for a medication. The active inpatient orders. The discharge prescriptions.
MedicationDispenseA dispense event — pharmacy filled the prescription.
MedicationAdministrationAn administration event — the dose was actually given.

Med rec sits at the MedicationStatement vs. MedicationRequest boundary. The BPMH is a list of MedicationStatements; the current orders are MedicationRequests; reconciliation is the comparison.

MedicationStatement (BPMH) ── compare ──> MedicationRequest (orders) ── result ──>
  Continue (same)
  Modify (same drug, different dose / freq / route)
  Discontinue (in BPMH, not ordered)
  New (ordered, not in BPMH)
  Hold (in BPMH, intentionally held during stay)

Each line carries an explicit reason and prescriber attestation. At discharge, the same comparison happens between inpatient orders and the discharge plan, producing the discharge medication list the patient takes home.


Three Transitions

Admission

  • BPMH within 24h of admission (timing varies by site policy and Joint Commission requirements — verify current standards).
  • Pharmacist-led BPMH consistently outperforms provider/nurse-led in published literature; choose your staffing model accordingly.
  • Reconcile BPMH against admission orders within the site's defined window.

Transfer

  • Especially on ICU → floor and floor → ICU.
  • High risk for dropped meds (continued meds that get lost in the order conversion).

Discharge

  • Compare inpatient orders → discharge plan, produce the discharge medication list.
  • Patient-facing instructions in plain language with indication, dose, frequency, duration, side effects.
  • Communicate the new list to the receiving provider and the patient's outpatient pharmacy (Surescripts).

Building a Med Rec Tool

Inputs to pull and normalize

  • BPMH sources: patient report, Surescripts history, prior EHR, HIE.
  • Current orders: MedicationRequest list (inpatient or outpatient).
  • Patient context: allergies (AllergyIntolerance), active problems (Condition), renal/hepatic labs (Observation), pregnancy status.

Normalization

  • Map every input to a canonical RxCUI at SCD or SBD level.
  • Collapse duplicate concepts across sources.
  • Preserve provenance — which source said this med exists?
  • Track confidence — patient self-report ≠ pharmacy fill.

Comparison and decision support

  • Per drug, classify as continue / modify / discontinue / new / hold with reason codes.
  • Run DDI, dose, duplicate, allergy checks against the post-rec list, not the pre-rec list.
  • Show the prescriber, in one place, every change and its rationale.

Output

  • Persist as MedicationStatement (BPMH) + MedicationRequest (orders) + a structured reconciliation event (often a List resource with mode working or snapshot, or a vendor-specific resource).
  • Send the discharge med list to the patient's outpatient pharmacy (NCPDP SCRIPT via Surescripts) and to the patient (printed + portal).

Quality Measures

MeasureSourceFocus
Joint Commission NPSG 03.06.01TJCMaintain and communicate accurate medication information at transitions
CMS MIPS Promoting InteroperabilityCMSMed rec at transitions reported electronically (verify current measure ID and specification)
CMS Hospital IQR measuresCMSHospital-level quality reporting, including readmission tied to med rec
HEDIS Medication Reconciliation Post-DischargeNCQAOutpatient follow-up med rec after acute admission (verify current MRP specification)

Confirm measure IDs, denominators, and reporting periods against the current CMS / NCQA / TJC specifications — these change annually.


Worked Example: Compare BPMH to Orders (sketch)

def reconcile(bpmh_statements, current_orders):
    """
    bpmh_statements: list of {rxcui_scd, dose, frequency, route, source, confidence}
    current_orders : list of {rxcui_scd, dose, frequency, route, status}
    """
    by_rxcui_bpmh   = {s["rxcui_scd"]: s for s in bpmh_statements}
    by_rxcui_orders = {o["rxcui_scd"]: o for o in current_orders if o["status"] == "active"}

    results = []
    for rxcui, stmt in by_rxcui_bpmh.items():
        if rxcui not in by_rxcui_orders:
            results.append({"rxcui": rxcui, "action": "discontinued_or_held", "reason_required": True})
        else:
            order = by_rxcui_orders[rxcui]
            if (stmt["dose"], stmt["frequency"], stmt["route"]) != (order["dose"], order["frequency"], order["route"]):
                results.append({"rxcui": rxcui, "action": "modified", "reason_required": True})
            else:
                results.append({"rxcui": rxcui, "action": "continued"})

    for rxcui, order in by_rxcui_orders.items():
        if rxcui not in by_rxcui_bpmh:
            results.append({"rxcui": rxcui, "action": "new", "reason_required": True})

    return results

This is intentionally simplified — production code must collapse therapeutic equivalents (e.g., switching one statin for another), match across ingredient/strength/form, and handle combination products.


Common Pitfalls

  • Treating Surescripts fill history as a med list. Fills are evidence, not proof of taking.
  • Comparing brand-named BPMH entries to generic-ordered entries by string. Normalize to RxCUI first.
  • Auto-reconciling without prescriber sign-off. Med rec is a clinical act with attestation.
  • Skipping the reason field for every change. Auditors and the next clinician need to know why.
  • Forgetting OTC, herbals, and supplements. They cause real interactions (e.g., St. John's wort).
  • Re-running med rec at every shift without a discrepancy. Provider fatigue is the enemy.
  • Using MedicationRequest for the BPMH. Use MedicationStatement.

Task-Specific Questions

  1. Which transition(s) and which setting?
  2. Which BPMH sources do you have access to?
  3. Which DDI / drug-knowledge source is licensed?
  4. Who is the reconciler — pharmacist, provider, nurse?
  5. How will you persist the reconciliation event in FHIR?
  6. Which quality measures are you reporting against?

Related Skills

  • healthcare-context: Setting and EHR drive the med rec workflow.
  • cpoe-orders: Where MedicationRequest is created and updated.
  • clinical-decision-support: Order-sign hooks fire DDI / dose checks against the post-rec list.
  • fhir-integration: MedicationStatement, MedicationRequest, MedicationDispense, MedicationAdministration.
  • terminology-services: RxNorm (RxCUI, SCD, SBD), NDC, ATC, mapping APIs (RxNav).
  • ehr-integration: Vendor-specific med history APIs, Surescripts wiring.
  • value-based-care: Med rec measures tie to MIPS, HEDIS MRP, readmission penalties.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.