Skip to content

Pharmacy Barcode Verification and ADC Interface

Dr M H B Ariyaratne edited this page May 22, 2026 · 1 revision

Pharmacy Barcode Verification and ADC Interface

Introduction

HMIS supports barcode-based item identification throughout the pharmacy workflow — from goods receipt through to point-of-dispensing verification. Every drug item in the formulary can carry a GS1 or HIBC barcode, enabling scan-to-confirm at the dispense counter, reducing picking errors and near-miss events. For hospitals deploying Automated Dispensing Cabinets (ADC) — such as Pyxis, Omnicell, or Becton Dickinson units in ICUs, theaters, and wards — HMIS is designed to provide a bidirectional ADC integration layer that synchronises medication orders and withdrawal events between the ADC hardware and the HMIS pharmacy system. The ADC interface is currently on the development roadmap (GitHub issue #20845) and is not yet available in production; it will be implemented for hospitals that deploy ADC hardware.

Barcode Verification at Point of Dispensing

Barcode Assignment

Each AMP (Actual Medicinal Product) in the formulary can be assigned one or more barcodes:

  • Item barcode: identifies the drug product regardless of batch (e.g., GS1 GTIN on the product label).
  • Batch barcode: identifies a specific batch/lot (e.g., GS1-128 encoding batch number, expiry date, serial number).

Barcodes are imported in bulk via: Main Menu → Pharmacy → Admin → Import Barcodes (amp_import_barcode.xhtml, pharmacy_item_import_barcode.xhtml)

Or set individually on the AMP record: Main Menu → Pharmacy → Admin → AMP → [Edit Item] → Barcode

Scan-to-Confirm at Dispense

At the dispensing counter:

  1. The pharmacist selects the prescribed drug from the dispense screen.
  2. The system prompts: "Scan item barcode to confirm".
  3. The pharmacist scans the physical pack using a barcode scanner.
  4. HMIS verifies the scanned barcode matches the selected AMP.
  5. If matched: dispense proceeds.
  6. If mismatched: an alert is displayed — "Barcode mismatch — wrong item selected". The pharmacist must correct the selection before proceeding.

This scan-confirm step is the final safety barrier against wrong-drug dispensing errors.

Batch-Level Barcode Verification

For batches with GS1-128 or 2D (DataMatrix/QR) codes encoding batch number and expiry:

  1. The scanned barcode is decoded to extract batch number and expiry date.
  2. HMIS verifies the batch exists in the system and matches the selected batch.
  3. Any discrepancy (batch not found, expiry mismatch) generates an alert and is logged.

This supports serialisation and track-and-trace requirements for high-value or controlled drugs.

Automated Dispensing Cabinet (ADC) Interface

Status: Planned — on the development roadmap. Not yet available in production. GitHub issue #20845.

What Is an ADC?

Automated Dispensing Cabinets are secure, electronically-controlled medication storage units installed in wards, ICUs, operating theaters, and emergency departments. Nurses withdraw medications from the cabinet for patient administration. The HMIS-ADC interface ensures that:

  • Cabinet contents reflect HMIS pharmacy orders.
  • Cabinet withdrawals automatically create HMIS stock movement records.
  • Discrepancies between cabinet inventory and HMIS records are flagged for reconciliation.

Architecture

HMIS Pharmacy
    │  ▲
    │  │  HL7 RDS/RGV  or  REST API
    ▼  │
ADC Unit (Pyxis / Omnicell / BD)
    │
    ▼
Nurse withdraws medication
(scan-confirm at cabinet)

Outbound: HMIS → ADC

When a pharmacy issues or approves a medication order for a ward:

  1. HMIS transmits the order to the ADC unit assigned to that ward.
  2. The order includes: patient demographics, drug (AMP code + barcode), quantity, authorised dose.
  3. The cabinet unlocks the correct drawer for the nurse, with the patient's name displayed.
  4. Only the authorised drug and quantity can be removed.

Inbound: ADC → HMIS

When a nurse withdraws medication from the cabinet:

  1. The ADC records the withdrawal event (drug, quantity, batch, nurse ID, timestamp).
  2. HMIS receives the withdrawal event and auto-generates a PharmacyIssue record.
  3. Ward stock is decremented in HMIS.
  4. If the withdrawal has no matching HMIS order, a discrepancy alert is raised.

Barcode Verification at ADC

The ADC hardware requires the nurse to scan the medication pack barcode before withdrawal is confirmed. The scanned barcode is validated against the HMIS AMP barcode, ensuring the correct drug is removed. Scan failures trigger a cabinet lock and alert to the pharmacy.

ADC Configuration

Main Menu → Administration → Integration → ADC Cabinets

Setting Description
Cabinet ID Unique identifier for the ADC unit
Ward Mapping Which ward(s) this cabinet serves
Integration Protocol HL7 RDS/RGV (default) or REST API polling
Endpoint URL ADC communication endpoint
Sync Interval How frequently HMIS pulls withdrawal events (real-time or polling)

Discrepancy Report

Main Menu → Pharmacy → Reports → ADC Discrepancy Report

Shows, per shift or date range:

  • ADC withdrawals with no matching HMIS order (unordered removals).
  • HMIS orders with no corresponding ADC withdrawal (ordered but not removed).
  • Quantity mismatches between order and withdrawal.

This report supports controlled substance register reconciliation and regulatory audit.

Supported Barcode Standards

Standard Format Use Case
GS1 GTIN EAN-13, EAN-8, ITF-14 Product identification (item-level)
GS1-128 Code 128 with Application Identifiers Batch number + expiry date
GS1 DataMatrix 2D matrix Compact, on small packs (ampoules, unit-dose)
HIBC Code 39 / Code 128 Healthcare-specific labelling (ISO 15223)

Technical Reference

Item Detail
Barcode import pages amp_import_barcode.xhtml, pharmacy_item_import_barcode.xhtml
Barcode field barcode on Item / ItemBatch entities
ADC integration class com.divudi.ws.pharmacy.AdcIntegrationApi
ADC issue controller PharmacyIssueController (source for ADC-originated issues)
HL7 messages RDS (Pharmacy/Treatment Dispense) / RGV (Give)
GitHub issue #20845 — ADC Interface: Automated Dispensing Cabinet Integration
Related Pharmacy Dispensing Workflows, Pharmacy Formulary Management, Pharmacy Batch Management

Clone this wiki locally