Inpatient Bill Cancellations and Refunds Overview - hmislk/hmis GitHub Wiki
Inpatient — Bill Cancellations and Refunds (Overview)
Inward bills are not edited in place — once saved, the way to "fix" a bill is to cancel it (which creates an opposite-signed bill that nets out the original) and re-bill correctly. Refunds work the same way.
This article is an index of the cancel / refund pages and when to use each one. Each row links to the underlying page; behaviour is consistent across them — they ask for a reason and then write a paired cancellation bill.
When to cancel vs. when to leave alone
| Situation | Action |
|---|---|
| Wrong service / investigation billed | Cancel that service bill. Re-bill correctly. |
| Wrong consultant on professional fee | Cancel the professional fee bill. Re-bill under the right consultant. |
| Wrong dose / wrong drug issued | Cancel the pharmacy issue. Re-issue correctly. The drug returns to stock. |
| Deposit collected by mistake | Cancel the deposit payment. The deposit balance on the BHT returns to zero. |
| Wrong final bill (after settle) | Cancel the final bill (admin-level action). The admission re-opens for editing. |
| Cash refund to patient (over-deposit / change) | Use the refund flow (creates a BILL_REFUND bill). |
Don't cancel as a shortcut just because a typo is hard to fix — every cancellation leaves a paired row in the audit trail. Cancel because the underlying transaction was wrong, not to clean up the bill list.
The pages
Cancelling
| Page | URL | Cancels |
|---|---|---|
| Cancel Final Bill | /inward/inward_cancel_bill_final.xhtml |
INWARD_FINAL_BILL |
| Cancel Payment Bill | /inward/inward_cancel_bill_payment.xhtml |
INWARD_PAYMENT (a patient-share payment after final bill) |
| Cancel Professional Bill | /inward/inward_cancel_bill_professional.xhtml |
A professional / consultant fee bill |
| Cancel Provisional Bill | /inward/inward_cancel_bill_provisional.xhtml |
A pre-final provisional bill |
| Cancel Refund Bill | /inward/inward_cancel_bill_refund.xhtml |
A refund (cancels the refund — re-asserts the original amount as owing) |
| Cancel Service Bill | /inward/inward_cancel_bill_service.xhtml |
A service / investigation bill against the BHT |
| BHT Bill Cancel | /inward/bht_bill_cancel.xhtml |
A generic BHT bill cancellation page |
| Cancel Deposit Payment Bill | /inward/inward_deposit_cancel_bill_payment.xhtml |
A patient deposit |
| Pharmacy BHT Retail Bill Cancel | /inward/pharmacy_cancel_bill_retail_bht.xhtml |
A pharmacy direct issue to BHT (see Inward Issue Cancellation) |
| Pharmacy BHT Return Bill Cancel | /inward/pharmacy_cancel_bill_return_bht.xhtml |
A pharmacy return bill |
| Theatre Surgery Professional Fee Cancel | /theater/surgery_professional_fees_cancel.xhtml |
A surgery professional fee — see Inward Professional and Surgery Payments |
Refunding
| Page | URL | Issues a refund for |
|---|---|---|
| Inward Refund | /inward/inward_bill_refund.xhtml |
General inward refund (e.g., excess deposit). |
| Service Bill Refund | /inward/inward_bill_service_refund.xhtml |
A service bill (InwardServiceController). |
| Pharmacy direct-issue return | /inward/pharmacy_bill_return_bht_issue.xhtml |
A pharmacy issue — returns stock and refunds the line. |
What a cancellation actually does
For every cancellable bill type, cancellation:
- Creates a new
Billof the matching cancellation type (e.g.,INWARD_PAYMENT_CANCELLATION). - Copies the bill items with negated
netValue. - Sets
referenceBillon the cancellation bill back to the original. - Updates running balances on the BHT (paid amount, settled amount, deposit balance) via the
BillBeanController.updateInwardDipositListfamily of methods. - Leaves the original bill intact and visible — it is not deleted. The cancellation bill sits next to it, signed opposite.
This pattern means any report that sums signed netValue is automatically correct — see the developer guide Inward Credit Company Settlement Tracking.
Audit trail
- The cancelling user and timestamp are stored on the cancellation bill.
- The reason captured at cancel time is kept on both the cancellation bill and (where applicable) on the cancelled bill.
- Reports filtered on
cancelled = falsewill miss cancellations of cross-period payments — see the same developer guide for the recommendedbillTypeAtomic IN (RECEIVED, CANCELLATION)query pattern.