Admin Inpatient Charge Type Labels - hmislk/hmis GitHub Wiki
Admin — Inpatient Charge Type Labels
Charge Type Labels allow administrators to customise the display names of inpatient charge categories on bills and reports. Instead of showing the internal enum name (e.g., RoomFacilityCharge), the bill can show a human-readable label (e.g., "Room Charges").
Page: Admin → Manage Inpatient Services → Charge Type Labels → Manage Charge Type Labels
XHTML: /inward/inward_charge_type_labels.xhtml
Controller: InwardChargeTypeLabelController
Privilege: InwardAdministration
Background
The InwardChargeType enum has over 100 values representing different categories of inpatient charges (room rent, timed services, surgery, professional fees, pharmacy, lab, etc.). By default these appear on bills using their internal names. The Charge Type Labels feature maps each enum value to a custom display string.
This is particularly useful when:
- The hospital uses different terminology than the system default
- Labels need to be in a local language
- Multiple enum values should be grouped under one label on a printed bill
Configuration
Each label record maps:
| Field | Notes |
|---|---|
| Charge Type | The InwardChargeType enum value |
| Label | Custom display text to show instead |
| Institution | Optional — apply the label only at a specific institution |
Ordering Reports and Final Bill Columns
Alongside the Custom Label, each charge type row also has two independent ordering numbers, plus a Final Bill Group:
| Column | Purpose |
|---|---|
| Report Order | Controls the left-to-right column order of charge types in the Inpatient Invoice Journal report. |
| Final Bill Order | Controls the print order of charge types (or charge-type groups — see below) on the Final Bill print formats that honour grouping: the standard Final Bill, Custom Bill, Custom Bill 2, Custom Bill 3 (Letterhead), and Bundled Custom 1. On the first four it only takes effect once the Bundle Grouped Charge Types setting is switched on (see below); until then each format keeps its existing order. |
| Final Bill Group | Free text, blank by default. See Bundling Charge Types on the Final Bill below. |
Both order numbers default to a value derived from the charge type's position in the
InwardChargeType enum (10, 20, 30, …), so leaving them untouched preserves
today's existing order exactly. To group related charges together (e.g. all
room-related charges — Room Charges, Administration Fee, Linen Charges,
Medical Care, MO Charges, Maintain Charges, Nursing Care), give them adjacent
numbers lower than the types you want them to appear before:

Report Order and Final Bill Order columns added to the labels page — here Room Charges, Administration Fee, Linen Charges, Medical Care, MO Charges, Maintain Charges, and Nursing Care have been given adjacent values (139–146) to sort them together.
Ties (including two types both left at their default) keep their original enum order, so an untouched type never jumps position just because a neighbour was customized.
(Issue #23340.)
Bundling Charge Types on the Final Bill
Some hospitals want their Final Bill print to show several charge types as one combined line — for example Room Charges, Meal Charges, and Maintain Charges added together under a single "Room Charges" heading — without changing how those same charge types appear anywhere else. Reports are never affected by this setting — the Inpatient Invoice Journal and the Charge Type Breakdown report always keep the full, granular per-type figures.
Bundling is off by default. Two things switch it on:
- On the standard Final Bill and the Custom Bill / Custom Bill 2 /
Custom Bill 3 (Letterhead) formats, an admin must turn on the
Inward Final Bill - Bundle Grouped Charge Typesapplication setting (Admin → Application Options, or ask CareCode). Until then these prints are byte-for-byte unchanged, regardless of any Final Bill Group values. - The Bundled Custom 1 format always applies the grouping whenever it is shown — it has no separate on/off for bundling.
To bundle charge types together:
- Open this page and find the charge types you want combined.
- Type the same text into the Final Bill Group field for each of
them — e.g. type
Room Chargesinto that field for Room Charges, Meal Charges, and Maintain Charges. - Save. Leaving the field blank (the default) means that charge type keeps printing on its own line, exactly as before.
- The combined line's position among the other lines follows the Final Bill Order of whichever member charge type has the lowest number.

Live on qa3.carecode.org (Coop test instance) — MealCharges and
MaintainCharges both set to the same Final Bill Group text, configured
through the REST Config API described below.
With Inward Final Bill - Bundle Grouped Charge Types switched on, this
takes effect on the standard Final Bill print (the one shown right
after generating the bill and on the reprint screen's Final Bill tab) and
on the Custom Bill, Custom Bill 2, and Custom Bill 3
(Letterhead) formats in the reprint screen's Custom Bills tab (see
Inpatient Final Bill).
The Bundled Custom 1 format applies it with no extra switch. The Custom
formats each still need switching on from that tab's Settings dialog
before they appear at all. Professional Charge and Assisting Charge
(doctor/nurse fees) can never be folded into a bundle — they always print
with their own per-staff amount breakdown, since that detail matters for
claims and payouts.
(Issue #23340 introduced this on Bundled Custom 1; issue #23651 extended it to the standard Final Bill and the other Custom formats.)
Changing labels, order, and grouping via REST API or AI Chat
These ConfigOption entries follow the same generic key-naming convention as
every other application option, so once a type's rows have been created —
which happens automatically the first time this page or the Invoice Journal
report loads, or via the discovery call below — they can be read or updated
through the existing generic Config API (/api/config, Config header):
GET /api/config/inward-charge-types— lists everyInwardChargeTypewith its default/custom label, Report Order, Final Bill Order, and Final Bill Group in one call; also seeds any missing rows so the endpoints below always succeed even for a type nobody has opened on this page yet.PUT /api/config/{key}— update one value by its exact key, e.g.Inward Charge Type Final Bill Group - RoomChargeswith body{"value": "Room Charges"}.POST /api/config/setInteger/{key}/{value}— for the two numeric order keys only, e.g.Inward Charge Type Report Order - RoomCharges.
The AI Chat search_config_options / manage_config_option tools work the
same way against these keys — no dedicated chat tool was needed.
Editing is only possible from this page
These labels are stored as ConfigOption entries (key prefix Inward Charge Type Label - ), which used to also be reachable and editable from the generic Admin → Application Options screen. Editing from there created two out-of-sync places to change the same value, so that screen now locks these keys — the Edit/Delete buttons are replaced with a "Managed on Inward Charge Type Labels page" note and any attempt to edit, delete, or CSV-import over one of these keys from Application Options is rejected server-side too. The same lock covers the Report Order, Final Bill Order, and Final Bill Group keys (prefixes Inward Charge Type Report Order - , Inward Charge Type Final Bill Order - , and Inward Charge Type Final Bill Group - ), for the same reason:

To change a label or an ordering number, always use this page (inward/inward_charge_type_labels.xhtml) — never Application Options. (Issues #23257, #23340.)
Context
Issues #19928 and #19930 introduced the charge type label system to support customised bill layouts across multiple deployment sites.
Related Articles
- Admin — Inpatient Module Configuration Overview — navigation overview
- Inpatient — Final Bill Generation — labels appear on the final bill