Blog

    Medication Tracking Software

    By GauravOctober 30, 202610 mins read
    On this page

    Medication tracking software records each step of a medication's path for one patient: the order or prescription, pharmacist verification, dispensing, each dose given or taken, and the review at every transition of care. In hospitals that means an eMAR with barcode scanning; in long-term care, home health and outpatient care it means medication pass lists, reconciliation tools and adherence apps.

    This guide follows a medication through those steps, lists the rules and standards that apply, maps the HL7 v2 messages and FHIR resources involved, and sets out the safety controls, measures and failure points to design for.

    What is medication tracking software?

    Building medication tracking into your product?

    Agnotic Technologies builds medication management software, from eMAR and barcode workflows to reconciliation tools, adherence apps and HL7 or FHIR pharmacy interfaces.

    Medication tracking software is a system that keeps one accurate medication record for a patient as each drug is ordered, verified, dispensed, given or taken and reviewed. It catches wrong-patient, wrong-dose, duplicate and missed-dose errors, using barcode checks in hospitals and reconciliation or adherence tools in outpatient and home care.

    Which kinds of medication tracking software exist?

    Medication tracking covers several products, each owning a different part of the path. Most projects build or connect two or three of them rather than one.

    • eMAR with barcode medication administration (BCMA): Nurses scan the patient wristband and the medication barcode before each dose, and the system checks the patient, drug, dose, route and time against the active order.
    • Medication reconciliation tools: Compare the patient's reported medications, pharmacy fill history and the EHR list at admission, transfer and discharge, and record each decision to continue, change or stop.
    • Adherence and reminder apps: Patients or caregivers log doses at home, receive reminders and share adherence data with the care team.
    • Controlled substance tracking: Counts, waste records and dispensing cabinet reports for scheduled drugs, with checks of the state prescription drug monitoring program where state law requires them.
    • Facility and home medication passes: Shift-based pass lists for long-term care and visiting nurses, which need to work offline and sync when the connection returns.

    Which rules and standards apply to medication tracking?

    Federal rules set how drugs are labeled, prescribed and billed, and accreditation standards shape how hospitals manage medication information.

    • Bar code rule: FDA regulation 21 CFR 201.25 requires most human prescription drugs, and certain over-the-counter drugs used in hospitals, to carry a linear barcode with the National Drug Code (NDC). That barcode is what BCMA scans.
    • Supply chain: FDA's Drug Supply Chain Security Act (DSCSA) requirements call on trading partners, including dispensers, to exchange transaction information and verify products at the package level.
    • Prescribing: CMS requires the NCPDP SCRIPT standard for Medicare Part D e-prescribing, and DEA rules at 21 CFR Part 1311 govern electronic prescriptions for controlled substances.
    • Certification: ONC's e-prescribing criterion 45 CFR 170.315(b)(3) remains in place, and the HTI-5 final rule revised the clinical information reconciliation and incorporation criterion at (b)(2).
    • Accreditation: The Joint Commission's National Performance Goals replaced the National Patient Safety Goals chapter for hospital and critical access hospital programs on 1 January 2026, and Medication Management is one of the goal topics.

    The HIPAA Security Rule applies to the ePHI in every medication record, so audit controls, unique user identification and access rules under 45 CFR 164.312 apply to the eMAR, the reconciliation tool and any app that stores doses.

    How does a medication move from order to review?

    Medication tracking loop: order or prescribe, verify and dispense, administer or take, then reconcile and review

    One medication moves from order to review in four steps. Each step produces a record the next step depends on, which is why a gap in integration shows up as a safety risk.

    • 1. Order or prescribe: The clinician orders in the EHR using an RxNorm-coded medication. Inpatient orders reach pharmacy as HL7 v2 RDE messages or FHIR MedicationRequest resources; outpatient prescriptions go to the pharmacy as NCPDP SCRIPT.
    • 2. Verify and dispense: The pharmacist checks interactions, allergies and dose, and the pharmacy system records the dispense as an HL7 v2 RDS message or a FHIR MedicationDispense, linked to the NDC on the package.
    • 3. Administer or take: Nurses scan the wristband and medication barcodes in the eMAR, which records each dose as an HL7 v2 RAS message or a FHIR MedicationAdministration. At home, patient-logged doses are stored as patient-reported data with their source shown.
    • 4. Reconcile and review: At admission, transfer and discharge, the reconciliation tool compares the EHR list, pharmacy fill history and the patient's own report, and the clinician records what continues, changes or stops.

    Which HL7 v2 messages and FHIR resources carry medication data?

    Most hospital medication data still moves as HL7 v2 pharmacy messages, while newer apps use FHIR R4. An interface engine such as Mirth Connect often maps between the two and normalizes codes to RxNorm.

    • HL7 v2 orders: RDE (pharmacy encoded order) with RXE segments, sent from the order system to pharmacy.
    • HL7 v2 dispenses: RDS (pharmacy dispense) with RXD segments, recording what left the pharmacy.
    • HL7 v2 give instructions: RGV (pharmacy give) with RXG segments, used where the pharmacy sends dose-level give instructions.
    • HL7 v2 administrations: RAS (pharmacy administration) with RXA segments, recording each dose given.
    • FHIR R4 resources: Medication, MedicationRequest, MedicationDispense, MedicationAdministration and MedicationStatement are defined in the base FHIR R4 medications module.
    • US Core profiles: US Core profiles Medication and MedicationRequest, and adds MedicationDispense from US Core 7. It does not profile MedicationAdministration or MedicationStatement, so a project that exchanges those resources needs its own profile or a partner's implementation guide.

    Mapping an administration from HL7 v2 to FHIR

    A dose recorded in an RAS message maps field by field to a FHIR MedicationAdministration. RXA-3, the start of administration, becomes effectiveDateTime. RXA-5, the administered code, becomes the medication code, normalized to RxNorm where the source sends a local or NDC code. RXA-6 and RXA-7, amount and units, become the dose. RXA-20, the completion status, maps to the resource status, so a refused or not-given dose is not reported as given.

    The patient and encounter come from the PID and PV1 segments, and the link back to the order comes from the ORC segment. Keep the original message identifier on the resource, so a failed or repeated message can be traced and does not create a second dose.

    Safety controls to build in

    • Code every medication with RxNorm and NDC: RxNorm identifies the clinical drug for checking and reporting; NDC identifies the exact package for scanning and supply chain records.
    • Scan by default: Require a scan for each dose, log every override with a reason from a fixed list, and review override reports with nursing and pharmacy leaders.
    • One owner for the active list: Decide which system owns the medication list and sync the others from it, instead of letting each keep its own copy.
    • Show the source of each entry: Label whether a medication came from an order, pharmacy fill data or the patient, so clinicians know how far to trust it.
    • Witness controlled-substance waste: Record a second user for waste of scheduled drugs, and reconcile cabinet counts against administrations each shift.
    • Design for offline: Medication passes in long-term care and home health need to keep working when the network drops, then sync without creating duplicate doses.
    • Test where the work happens: Run usability tests on medication carts and phones, with gloves, low light and interruptions, not only at a desk.

    What should you measure after go-live?

    Medication tracking software should report on its own use, so problems surface as numbers rather than incidents. Review these measures with pharmacy and nursing leaders each month.

    • Scan compliance: The share of doses given with a successful patient and medication scan, by unit.
    • Overrides: Override counts by unit, reason and medication, with the top reasons reviewed for workflow fixes.
    • Timing: Late and missed doses against the scheduled time.
    • Reconciliation: The share of admissions and discharges with a completed reconciliation.
    • Interfaces: Failed or delayed messages between the eMAR, EHR and pharmacy system.
    • Alerts: How often clinicians dismiss each alert type, to find rules that need tuning.

    Treat a rising override or failure rate as a workflow problem to fix, not a user problem to blame. Each reason code points at a cause, such as unreadable labels, a missing order or a scanner that does not reach the bedside.

    Where medication tracking projects fail

    • Free-text medications: Drugs typed as text cannot be checked for interactions or matched during reconciliation.
    • Alert overload: Too many low-value interaction alerts teach users to click through, including the important ones.
    • Scanning workarounds: Spare wristbands or barcodes taped to carts defeat BCMA, so watch scan rates and fix the causes.
    • One-way interfaces: If the eMAR does not send administrations back to the EHR and pharmacy, the records drift apart.
    • Clock and schedule mismatches: Dose timing errors appear when servers, devices and facilities use different time zones or schedule rules.
    • Weak controlled-substance trails: Missing waste and override records create compliance gaps and diversion risk.
    • Assuming US Core covers administration: Teams that plan a FHIR exchange of administrations around US Core find no profile to conform to.

    How Agnotic can help

    Medication tracking works only when every step from order to review writes a record the next step can trust. Agnotic Technologies builds those steps for hospitals, long-term care and digital health teams: eMAR and barcode workflows, reconciliation tools, adherence apps, and HL7 v2, FHIR R4 and NCPDP SCRIPT interfaces, with HIPAA-ready engineering on every record.

    Build medication tracking software with Agnotic

    Explore medication management services, or browse more articles in our Guides hub.

    Related reading on Agnotic

    Continue with HL7 v2 message structure, mapping HL7 v2 to FHIR, US Core implementation and Mirth Connect interfaces.

    Sources

    Frequently Asked Questions

    No. US Core profiles Medication and MedicationRequest, and MedicationDispense from US Core 7. MedicationAdministration and MedicationStatement are base FHIR R4 resources without US Core profiles.

    Talk to an engineer about your project

    Get help building eMAR, barcode, reconciliation or adherence software with HL7 v2, FHIR R4 and NCPDP SCRIPT interfaces.