-
Notifications
You must be signed in to change notification settings - Fork 134
Pharmacy Barcode Verification and ADC Interface
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.
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
At the dispensing counter:
- The pharmacist selects the prescribed drug from the dispense screen.
- The system prompts: "Scan item barcode to confirm".
- The pharmacist scans the physical pack using a barcode scanner.
- HMIS verifies the scanned barcode matches the selected AMP.
- If matched: dispense proceeds.
- 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.
For batches with GS1-128 or 2D (DataMatrix/QR) codes encoding batch number and expiry:
- The scanned barcode is decoded to extract batch number and expiry date.
- HMIS verifies the batch exists in the system and matches the selected batch.
- 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.
Status: Planned — on the development roadmap. Not yet available in production. GitHub issue #20845.
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.
HMIS Pharmacy
│ ▲
│ │ HL7 RDS/RGV or REST API
▼ │
ADC Unit (Pyxis / Omnicell / BD)
│
▼
Nurse withdraws medication
(scan-confirm at cabinet)
When a pharmacy issues or approves a medication order for a ward:
- HMIS transmits the order to the ADC unit assigned to that ward.
- The order includes: patient demographics, drug (AMP code + barcode), quantity, authorised dose.
- The cabinet unlocks the correct drawer for the nurse, with the patient's name displayed.
- Only the authorised drug and quantity can be removed.
When a nurse withdraws medication from the cabinet:
- The ADC records the withdrawal event (drug, quantity, batch, nurse ID, timestamp).
- HMIS receives the withdrawal event and auto-generates a
PharmacyIssuerecord. - Ward stock is decremented in HMIS.
- If the withdrawal has no matching HMIS order, a discrepancy alert is raised.
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.
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) |
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.
| 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) |
| 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 |