# Pharmacy Billing and Prior Authorization ## Introduction HMIS integrates pharmacy dispensing and billing into a single workflow. Every dispense transaction — retail sale, ward issue, BHT inpatient supply, wholesale, or donation — generates a corresponding billing record in real time. Charges are linked to the patient encounter, payment method, and dispensed items for complete financial traceability. For credit patients and insured patients, HMIS supports a **pre-settlement (prior authorization) workflow** where billing is held for approval before the transaction is finalised. ## Navigation | Function | Menu Path | |---|---| | Retail Sale Billing | Main Menu → Pharmacy → Dispensing → Retail Sale | | Ward / BHT Billing | Main Menu → Pharmacy → Dispensing → Ward Issue | | Wholesale Billing | Main Menu → Pharmacy → Dispensing → Wholesale | | Pre-Settlement (Prior Auth) | Main Menu → Pharmacy → Billing → Pre-Settlement | | Sale Returns / Refunds | Main Menu → Pharmacy → Returns → Sale Return | | Pharmacy Bill Search | Main Menu → Pharmacy → Reports → Bill Search | | Supplier Payment | Main Menu → Pharmacy → Procurement → Supplier Payment | ## Pharmacy Bill Types | BillType | Description | |---|---| | `PharmacySale` | Retail OPD dispensing — cash or card payment at counter | | `PharmacySaleWithoutStock` | Credit dispensing — no stock decrement (for pre-billed or notional charges) | | `PharmacyWholeSale` | Wholesale supply to external institutions or departments | | `PharmacyIssue` | Department / ward issue (internal supply) | | `PharmacyBhtPre` | BHT pre-billing — charges accumulate during inpatient stay, included in final bill | | `PharmacyGrnBill` | Goods receive note — purchase from supplier | | `PharmacyGrnReturn` | GRN return — credit from supplier | | `PharmacyPurchaseBill` | Direct purchase (non-GRN) | | `PharmacyOrder` | Purchase order | | `PharmacyAdjustment` | Stock/price adjustment bill | | `PharmacyDonationBill` | Donation receipt | | `PharmacyPhysicalCountBill` | Stock take adjustment bill | ## Retail Sale Billing On completing a dispense at the retail counter: 1. Drug items and quantities are selected (from prescription or manual entry). 2. Pricing is auto-populated from the AMP retail price or applicable discount scheme. 3. Payment method is selected (cash, card, credit company, patient deposit, voucher). 4. Bill is finalised — stock is decremented, billing record created, receipt printed. `PharmacyBill` entity carries `saleValue`, `purchaseValue`, and `freeValue` (complimentary items) for margin reporting. ## Inpatient BHT Billing Pharmacy supplies to inpatients are pre-billed against the BHT (`PharmacyBhtPre`): - Charges accumulate through the admission. - At final bill preparation, all BHT pharmacy pre-bills are included automatically. - Payment is collected as part of the single inpatient final bill — the patient does not pay separately at the pharmacy counter for each supply. ## Credit Company (Insurance) Billing For insured patients with a credit company scheme: - Pharmacy bills can be routed to the credit company account. - The co-payment portion is collected from the patient; the remainder is billed to the insurer. - Outstanding credit pharmacy bills appear in the credit company receivables report. - Settlement is processed through the credit company settlement workflow (see [Credit Company Bill Settlement](Finance-Credit-Company-Bill-Settlement.md)). ## Prior Authorization (Pre-Settlement) Workflow For high-cost medications or insured patients requiring pre-authorization before dispensing: 1. The pharmacist creates a **pre-settlement record** for the patient and proposed medication (`PharmacyPreSettleController`). 2. The pre-settlement is submitted for internal review or transmitted to the insurer. 3. The reviewer (pharmacy supervisor or insurer) **approves or rejects** the pre-settlement. 4. On approval, the dispense transaction is allowed to proceed and the bill is generated. 5. On rejection, the pharmacist is notified — alternative medication or patient-funded dispensing is considered. The pre-settlement workflow ensures that high-cost drugs are not dispensed without coverage confirmation, reducing claim denials. ## Discount Application Pharmacy discounts are applied based on the patient's payment scheme, membership, or credit company agreement: - **Retail discount**: percentage or flat discount on AMP retail price. - **Wholesale price**: lower tier price for institutional or bulk supply. - **Free items** (`freeQty` on `PharmaceuticalBillItem`): complimentary units (e.g., buy 10 get 1 free promotions) recorded separately for financial reporting. - **Staff concession**: staff members receive configured discount rates on pharmacy purchases. ## Sale Returns and Refunds For returned medication (unused, wrong item, patient refusal): 1. Navigate to **Sale Return** (for retail) or **Issue Return** (for ward issues). 2. Select the original bill or search by patient/date. 3. Enter the items and quantities being returned. Batch is auto-populated from the original dispense. 4. A credit bill is generated. Stock is reinstated to the originating batch. 5. Refund is processed by cash, card credit, or credit to the patient's deposit account. ## Supplier Payment Purchases from suppliers (via GRN) generate payable amounts. Supplier payments are processed through: **Main Menu → Pharmacy → Procurement → Supplier Payment** (`SupplierPaymentController`) - Outstanding GRN payables are listed per supplier. - Payment amount is entered and confirmed. - A supplier payment bill is generated and the payable balance is reduced. ## Pharmacy Bill Search All pharmacy transactions are searchable through: **Main Menu → Pharmacy → Reports → Bill Search** (`PharmacyBillSearch`) Filter criteria: date range, bill type, patient, department, payment method, cashier. ## Technical Reference | Item | Detail | |---|---| | Pharmacy bill entity | `com.divudi.core.entity.PharmacyBill` | | Bill item entity | `com.divudi.core.entity.pharmacy.PharmaceuticalBillItem` | | Pre-settlement controller | `PharmacyPreSettleController` | | Sale controller | `PharmacySaleController`, `PharmacyFastRetailSaleController` | | Sale return controller | `SaleReturnController` | | Issue return controller | `BhtIssueReturnController`, `IssueReturnController` | | Supplier payment | `SupplierPaymentController` | | Bill search | `PharmacyBillSearch` | | Related | [Pharmacy Dispensing Workflows](Pharmacy-Dispensing-Workflows.md), [Finance Credit Company Bill Settlement](Finance-Credit-Company-Bill-Settlement.md) |