Finance Inpatient Final Bill - hmislk/hmis GitHub Wiki
Inpatient Final Bill
Introduction
The final bill closes the patient's inpatient episode. It consolidates every charge accumulated during the stay, applies discounts, sets off what has already been paid (deposits and interim payments), and leaves the balance to be collected at discharge. Settling it is the point at which the admission is financially closed.
This page covers the finance framing: where the final bill sits in the inpatient billing chain, what it is made of, and what happens to it afterwards. For the screen itself โ the Process/Save steps, the category totals, the configuration options that change its behaviour โ see Inpatient โ Final Bill Generation, which is the single source of truth for that page.
Where the Final Bill Fits
| Stage | Document | Page |
|---|---|---|
| During the stay | Interim bill โ a running summary, does not close anything | inward/inward_bill_intrim.xhtml |
| At discharge | Final bill | inward/inward_bill_final.xhtml |
| After settlement | Payment collection, then final bill versions if a correction is needed | inward/inward_bill_payment.xhtml |
There is no menu item that opens a blank final bill. The final bill is reached from the interim bill: open the admission's Interim Bill and click Create Final Bill. Once it exists, it is reached from the Inpatient Dashboard for the admission โ Final Bill to view or reprint it, Manage Final Bills where more than one version exists โ or through Inward โ Search โ Final Bill Search.
Settling requires the InwardSettleFinalBill privilege.
On the final bill screen the sequence is Process (or Process Bill, depending on configuration) to calculate, then Save Final Bill to commit. There is no button called "Generate Final Bill". See Inpatient โ Final Bill Generation.
What the Final Bill Is Made Of
Charges are gathered from every source that billed against the BHT during the admission โ room and timed services, services and investigations, outside charges, pharmacy and store issues, professional and surgery fees, and any admission items configured on the admission type โ and are grouped into InwardChargeType categories, one line per category.
The totals panel shows:
| Figure | Meaning |
|---|---|
| Total Charges | The sum of all charge categories, matrix markup included |
| Gross Total and Service Charge (Margin) | The split of Total Charges into base value and the markup applied by the price matrix; visible with the ShowServiceCharges privilege |
| Item Discounts / Charge Type Discounts / Bill Level Discount | The three levels at which a discount can reach this bill; Total Discount is their sum |
| Paid By Patient / Paid by Credit Company / Paid | What has already been collected โ deposits and interim payments โ split by payer |
For a credit patient, a credit company allocation panel splits the bill between the company and the patient's own co-payment.
Charge categories are documented on Admin โ Inpatient Charge Type Labels; the sources that feed them have their own pages, for example Inpatient Service Bills and Inpatient Outside Charges.
Discounts and Adjustments on the Final Bill
There is no "Price Adjustment" button on the final bill. Three things can reduce the amount, and they are different mechanisms:
- Rule-based discounts configured in advance on the Discount Matrix โ applied automatically as the bill is processed, and shown as Item Discounts and Charge Type Discounts
- Bill Level Discount โ a single figure typed on the final bill screen by an authorised user
- Adjusted Total per charge category, and per-row discount fields on room and related charges โ editable for most categories but locked for the ones driven by configured rules
The price matrix is not a discount: it adds the hospital's service-charge margin, and its value is already inside Total Charges. See Inpatient Price Adjustments for the distinction.
Collecting the Balance
From the settled final bill, Collect Patient Payment (or Collect Patient Co-payment for a credit patient) opens the payment screen โ inward/inward_bill_payment.xhtml, or the co-payment screen for credit admissions. If the patient has paid more than the balance, the excess is handled as a refund. See Inpatient โ Final Bill Payment and Inpatient Bill Refunds.
Professional fees for consultants and surgeons may be settled with the final bill or separately โ see Inpatient Professional Fees.
Reprinting and Correcting
- Reprint โ Inward โ Search โ Final Bill Search, or the Inpatient Dashboard's Final Bill button, which opens the bill for reprinting
- Correcting a settled bill โ a settled final bill is never edited in place. A new version is created instead; see Inpatient โ Final Bill Versions for creating a corrected version, retiring a bad one, and emailing a version to the patient
- Cancelling โ
inward/inward_cancel_bill_final.xhtml; see Inpatient โ Bill Cancellations and Refunds (Overview)
Custom Bill 3 (Letterhead) โ patient details
Custom Bill 3 always prints the patient's address, NIC, phone, guardian and corporate sponsor in the detail block at the top of the bill. There is nothing to switch on: these are part of the format.
An admission can be sponsored by more than one credit company. All of them are listed on the Credit Company line, separated by commas, and the line shows whenever the admission has a sponsor registered - it does not depend on the bill's own payment method. Where the same company has been registered twice against one admission, it is listed once.
The Settings dialog on the Custom Bills tab controls which formats are offered (and the per-field choices for Custom Bill 2) โ it has no per-field settings for Custom Bill 3.
Custom Bill 3 โ Due Amount Breakdown by Payer
When an admission's payment responsibility is split across one or more credit companies (and/or the patient has a co-payment portion), Custom Bill 3 prints one "Due from <Company>" line per credit company that still has an outstanding balance on this bill, instead of a single lump "Due Amount" figure. A "Due from Patient" line is added when the patient still owes a portion after all company commitments are accounted for. Rows are only shown when their own due is greater than zero โ a company that has already been fully paid, or a patient with nothing outstanding, simply gets no line.
For a plain self-pay (non-credit) bill, or a credit bill with no registered companies, the original single "Due Amount" line is shown unchanged.
Each company's due is computed the same way as the Credit Company Debtor Report (Inward โ Admissions โ Inpatient Analytics โ Payment Reports) โ the company's committed amount (fixed at settlement) minus whatever has actually been settled against it since โ so the two always agree. The patient's due is derived as whatever of the bill's net total was not committed to any company, less anything the patient has already paid, so the printed breakdown always reconciles back to the bill's own Net Total.
Custom Bill 3 for an admission with two credit companies committed to different amounts. Patient name, BHT/bill numbers, address, phone and guardian are redacted for this screenshot; the credit company names and amounts are real local test data.

Custom Bills โ Bundled Charge Types
An admin can combine several charge types into one summed line on the Final Bill print โ for example, Room Charges + Meal Charges + Maintain Charges all under one "Room Charges" heading โ instead of a line per charge type.
- Which charge types get combined, and under what label, is configured once for the whole hospital on the Inpatient Charge Type Labels admin page (the Final Bill Group column) โ nothing to choose at print time.
- On the standard Final Bill print (shown after generation and on the
reprint screen's Final Bill tab) and the Custom Bill, Custom Bill
2, and Custom Bill 3 (Letterhead) formats, the combining only
happens when the
Inward Final Bill - Bundle Grouped Charge Typesapplication setting is on. Bundled Custom 1 applies it with no extra switch. The Custom formats each still need switching on from the Custom Bills tab's Settings dialog before they appear at all. - With that setting off (the default), every format prints exactly as it does today, regardless of any Final Bill Group values โ the feature is inert by default.
- Reports (Invoice Journal, Charge Type Breakdown) always keep showing every charge type separately, regardless of this setting.

Live render on qa3.carecode.org (Coop test instance) โ the Bundled Custom
1 format opened from the Custom Bills tab. Patient name, BHT number, room,
address, guardian, and the two attending doctors' names are redacted for
this screenshot; the charge amounts and totals are real test data. This
particular bill only carries a RoomCharges charge, so the grouped line
prints alone โ with Meal or Maintain charges also present on a bill, they
would sum into the same "Room Charges" line, as demonstrated locally in
PR #23382.

Standard Final Bill print (reprint screen's Final Bill tab) for a local test bill after setting Final Bill Group = "Room & Board" on both Room Charges (5,800.00) and Meal Charges (1,006.25) โ they now print as one Room & Board 6,806.25 line, every other charge type still on its own line, and the Total (223,587.97) unchanged. Patient, guardian, doctor and cashier names redacted; amounts are real local test data. Verified in PR #23651 across all five formats.
Professional Charge โ the Printed Lines Add Up to the Total
On every Final Bill print (standard, Custom Bill, Custom Bill 2, Custom Bill 3, Bundled Custom 1, Green Sheet, VAT, Cancelled) and on the Professional Bill, the lines under Professional Charge add up to the Professional Charge amount.
A doctor is named only when the fee was entered through Add Professional
Fee. Professional charges that arrive any other way โ a service item whose
charge type is Professional Charge, such as an MRI "REPORTING - Dr ..." item
billed by the Diagnostic Centre with the radiologist's fee bundled in โ are
summed into one Other Professional Charges line. The label is the
application option Inward Final Bill - Label For Other Professional Charges.

One admission, the same doctor billed both ways: 5,000.00 of fees entered through Add Professional Fee are named, and 500.00 bundled inside the MRI reporting item prints as Other Professional Charges โ together the 5,500.00 Professional Charge. Doctor name replaced, patient details cropped; amounts are local test data.
To get a doctor named on the bill, enter the fee through Add Professional Fee, and have an administrator provide the service without its professional component so the charge isn't billed twice. See Inpatient โ Final Bill Generation for the two setups side by side.
Older final bills print the same way when reprinted: anything not entered as a professional fee falls into the Other Professional Charges line, so the lines still add up.
Header/Logo and Generated-by / Approved-by Stamps
Every Final Bill print format (standard, Custom Bill 2, Custom Bill 3 and 4, Bundled Custom 1, Green Sheet, VAT, and Professional Bill) can show a configurable institution header/logo, and every format now stamps who printed the copy and when, plus who approved the bill once it has been approved:
- Header/logo โ three application options control this, shared across
every format so one admin setting applies everywhere:
Inward Final Bill Header Templateโ a free-text/HTML template with{ins_name},{ins_address},{ins_phone},{ins_fax},{ins_email},{ins_web}placeholders, if setShow Inward Final bill header with institution detailsโ a plain fallback showing the institution's name/address/contact block when no template is setInaptient Final Bill Header Image URL(the "Inaptient" spelling is intentional โ an existing key, kept as-is for backward compatibility) โ a full-width header image/logo, shown independently of the two options above- Custom Bill 3 and Custom Bill 4 intentionally opt out of all three โ both are designed for pre-printed letterhead stationery that already carries the institution's header physically
- Generated by / Generated on โ always shown: the user currently printing this copy, and the current date/time โ distinct from the existing Prepared by line, which shows who originally created the bill record
- Approved by / Approved on โ shown only once the bill has actually
been approved (
Bill.approveAtset); silently absent on an unapproved bill, alongside the existing red "This final bill has NOT been approved" warning

Final Bill (standard format), reprint screen's Final Bill tab, with
Inaptient Final Bill Header Image URL set to a test logo. Patient name,
address, phone, BHT/bill numbers, referring/consultant doctor names, and
staff names are redacted; charge amounts and totals are real local test
data. This bill is unapproved, so no Approved by/on line prints. Verified
locally for issue #23600
across all eight Final Bill print formats.
Professional Bill Print โ Trailing Blank Page (fixed)
The Professional Bill print button, on the reprint screen's Professional
Bill tab, used to produce a second, completely blank page after the real
content โ every shared print format wraps its content in a div.a4bill, and
printing.css forces page-break-after: always on that class so several
bills printed back-to-back start clean pages between each other. Printed
alone, as the Professional Bill button does, that same rule left a forced
break after the only content there was, with nothing to fill the page it
broke to.
The fix is scoped to this one composite (finalProfessionalBill.xhtml) โ
it does not touch the shared printing.css rule other multi-bill print
flows still rely on for separation.

Before: printing the Professional Bill produced a 2-page PDF with the consultant fee table on page 1 and nothing at all on page 2. Patient name and BHT No redacted; consultant names and fee amounts are real local test data.

After: the same bill now prints as a single page โ "Page 1 of 1" โ with no trailing blank page. Verified locally for issue #23713.
Technical Reference
| Item | Detail |
|---|---|
| Page | inward/inward_bill_final.xhtml (breakdown: inward/inward_bill_final_break_down.xhtml) |
| Controller | BhtSummeryController |
| BillType | InwardFinalBill |
| Reprint page | inward/inward_reprint_bill_final.xhtml |
| Cancellation page | inward/inward_cancel_bill_final.xhtml |
| Payment page | inward/inward_bill_payment.xhtml (credit co-payment: credit/inward_patient_copay_payment.xhtml) |
| Professional fees | InwardProfessionalBillController |
| Settle privilege | InwardSettleFinalBill |
Related Pages
- Inpatient โ Final Bill Generation โ the end-user workflow for this screen
- Inpatient โ Final Bill Versions ยท Inpatient โ Final Bill Payment
- Inpatient Interim Bills โ the mid-stay equivalent
- Admin โ Inpatient Discount Matrix ยท Inward Price Adjustment Matrix
- Inpatient Professional Fees ยท Inpatient Bill Refunds
- Inpatient โ Bill Cancellations and Refunds (Overview)