Inpatient Final Bill Generation - hmislk/hmis GitHub Wiki

Inpatient — Final Bill Generation

Page: /inward/inward_bill_final.xhtml Breakdown page: /inward/inward_bill_final_break_down.xhtml Reached from: Inpatient Dashboard → Billing → Final Bill (visible once the admission is discharged and payment-finalised), or from the Final Bill Search. Controllers: BhtSummeryController, InwardBeanController Privilege: InwardBilling

The final bill is the closing financial document of an admission: every charge that hit the BHT, totalled, with discounts, deposits, and credit-company allocations applied. Once settled, the admission's books are closed.

Pre-conditions

Before generating a final bill:

  1. Room discharge is done — see Room Discharge.
  2. Clinical discharge is preferably done, but is not technically required to print the final bill.
  3. All service / professional / outside / timed-service charges that should be on the bill have been added.
  4. All pharmacy issues for the stay have been raised (and returns processed).
  5. Deposits have been recorded and are reflected on the BHT — see Patient Deposits.
  6. The credit-company allocations (if any) are recorded — see Inward Admission Insurance and Credit Company Details.

If any of these are pending, the Process / Process Bill action will warn — see issues #19307 and #19308 for the validation pattern.

Flow on the page

The header has several buttons; which appear depends on config keys:

Button When shown What it does
Process Default Re-totals the BHT and refreshes the on-screen breakdown.
Process Bill (with "Show an Intermediate Bill on Final Bill Edit" enabled) Alt to Process Same as Process, plus generates an intermediate printable bill.
Check Final Bill "Show Print Button For Intermediate Bill on Final Bill Edit" Prints the intermediate bill — a draft for the cashier / patient to verify before settle.
Save Provisional Bill "Show Save Provisional on Final Bill Edit" Saves a provisional snapshot of the bill (no settlement). The admission gets a provisional bill that can later be promoted to final.
Settle Always Closes the bill — see "Settling" below.

A provisional bill is useful when the final amount needs to be reviewed (by the patient, by the credit company, by management) before money changes hands.

The breakdown

The body of the page shows the bill broken down by charge type (e.g., Pharmacy, Lab Investigations, Services, Outside Charges, Room, Professional Fees, Theatre, Timed Services). Each line shows:

Below the breakdown:

  • Sub-total.
  • Deposits — sum of recorded patient deposits, subtracted.
  • Credit-company allocations — split per insurer when more than one; each insurer becomes a separate "commitment bill" linked back to this final bill. See the developer guide Inward Credit Company Settlement Tracking for the data model.
  • Patient share — what the patient (or guardian) is expected to pay in cash / card.

Settling

Pressing Settle writes the final bill:

  • A Bill of type INWARD_FINAL_BILL is created (or an existing provisional is promoted to final).
  • One INWARD_FINAL_BILL_PAYMENT_BY_CREDIT_COMPANY is created per credit-company allocation.
  • The admission's paymentFinalized flag is set to true.
  • The Inpatient Dashboard now shows the Final Bill button instead of Interim Bill.

After settle, the bill is immutable:

  • New service / professional / outside charges cannot be added to this BHT (the dashboard's Add… buttons disable).
  • Cancelling the final bill to make further edits requires admin-level intervention through Bill Cancellations.

Print

A print preview is rendered automatically after Settle. You can also re-print from the Final Bill reprint page — see Final Bill Search by Discharge date for finding past bills.

See also