-
Notifications
You must be signed in to change notification settings - Fork 135
Pharmacy Dispensing Workflows
HMIS supports end-to-end medication dispensing across all care settings — outpatient (OPD), inpatient (IP), and emergency (ETU). Electronic prescriptions created by clinicians flow directly into the pharmacy queue, where pharmacists review, verify, and dispense against the prescription record. Every dispense transaction is linked to the patient encounter, decrementing stock in real time and generating a billing record simultaneously.
| Care Setting | Menu Path |
|---|---|
| OPD Retail Dispensing | Main Menu → Pharmacy → Dispensing → Retail Sale |
| Inpatient Ward Issue | Main Menu → Pharmacy → Dispensing → Ward Issue (BHT) |
| ETU / Direct Inpatient Issue | Main Menu → Pharmacy → Dispensing → Inpatient Direct Issue |
| Prescription List | Main Menu → Pharmacy → Prescriptions → Prescription List |
- The clinician creates a prescription from the OPD consultation screen, specifying drug, dose, frequency, duration, and route.
- The pharmacist opens the Retail Sale page and searches for the patient by name, registration number, or mobile number.
- The system displays active prescriptions for the patient. The pharmacist selects the prescription to dispense.
- Drug items, quantities, dose instructions, and pricing are auto-populated from the prescription.
- The pharmacist verifies stock availability and batch selection, then confirms the dispense.
- A pharmacy bill is generated and payment is collected. The prescription is marked as dispensed.
The retail sale screen supports several dispensing interfaces:
-
Standard (
pharmacy_bill_retail_sale.xhtml) — full feature, item search, prescription link -
Fast Retail (
pharmacy_fast_retail_sale.xhtml) — streamlined for high-volume counters -
Cashier-facing (
pharmacy_bill_retail_sale_for_cashier.xhtml) — cashier-only payment view
- The ward nurse or doctor creates a medication order linked to the patient's BHT (Bed Head Ticket).
- The pharmacy receives the order and opens Ward Issue (BHT) (
pharmacy_issue.xhtml). - The pharmacist searches by BHT number or patient name.
- Ordered items are listed. The pharmacist verifies quantities, selects batches, and approves the issue.
- Stock is decremented from the issuing pharmacy store. A BHT issue bill is created.
- The ward receives the medication and records administration.
For inpatient billing, pharmacy issues can be pre-billed (PharmacyBhtPre bill type) — charges accumulate on the BHT and are included in the final inpatient bill at discharge.
For emergency or high-volume inpatient dispensing, the Inpatient Direct Issue workflow (InpatientDirectIssueNativeSqlController) provides a performance-optimised path:
- The pharmacist selects the patient encounter (ETU or ward admission).
- Items are added manually or pulled from active prescription orders.
- Issue is finalised with a single confirmation step.
- Stock movement and billing are committed atomically.
This controller uses optimised SQL for fast throughput under high concurrent load typical of emergency departments.
Prescription entity fields used in the dispensing workflow:
| Field | Description |
|---|---|
item |
Drug item (linked to pharmacy item master) |
dose / doseUnit
|
Prescribed dose quantity and unit |
frequency / frequencyUnit
|
How often (e.g., 3 times daily) |
duration / durationUnit
|
Length of treatment (e.g., 5 days) |
issueQty |
Total quantity to dispense |
prescribedFrom / prescribedTo
|
Treatment period |
indoor |
True = inpatient prescription |
Prescriptions link to the patient's PatientEncounter, ensuring the correct episode context for OPD, inpatient, and ETU encounters.
If a dispensed item must be returned (unused medication, wrong item):
-
OPD sale return: Main Menu → Pharmacy → Returns → Sale Return (
SaleReturnController) -
Ward issue return: Main Menu → Pharmacy → Returns → Issue Return (
BhtIssueReturnController)
Returns reverse the stock movement and generate a credit bill. Original batch and pricing are preserved for accounting accuracy.
| Item | Detail |
|---|---|
| OPD dispense controller |
PharmacySaleController, PharmacyFastRetailSaleController
|
| Inpatient issue controller |
PharmacyIssueController, PharmacySaleBhtController
|
| ETU/direct issue controller | InpatientDirectIssueNativeSqlController |
| Prescription entity | com.divudi.core.entity.clinical.Prescription |
| Bill types |
PharmacySale, PharmacyBhtPre, PharmacyIssue
|
| Related | Pharmacy Batch Management, Pharmacy Billing |