# Admin — Inpatient Discount Matrix The Inpatient Discount Matrix sets discount rules that are applied automatically to inpatient bills. There are separate rules for services & investigations, pharmacy items, and room facility charges. A rule can be limited to a discount scheme (membership), department, admission type, BHT type (payment method) or credit company. **Menu:** *Administration → Manage Inpatient Services → Discount Matrix* (then pick one of the three buttons) **Controller:** `InwardDiscountMatrixController` **Privilege:** `InwardAdministration` --- ## Discount Types There are three separate discount matrices, one for each type of charge: | Matrix | Applies To | |---|---| | Services & Investigations | Inpatient service and investigation bills | | Pharmacy | Medicines issued to a BHT (Direct Issue, and issues made from an Item Request) | | Room Facility Charges | Room, linen, maintenance and other room charge types | --- ## Fields | Field | Blank means | |---|---| | Discount Scheme | Required. The patient's scheme is chosen on the admission (e.g. *Life*) | | Department | All departments | | Category (Pharmaceutical / Service) | *See the warning below* | | Admission Type | All admission types | | BHT Type | All BHT types (Cash, Credit …) | | Credit Company | All companies. A company-specific row takes priority over a blank one | | Discount % | 0–100 | > ⚠️ **Do not leave the category blank to mean "all medicines".** A row with a scheme and a blank category is the scheme's catch-all fallback. It is also used by the Services & Investigations lookup, so it would discount services too. To give one discount on every medicine, add a row for every pharmaceutical category, as described below. --- ## Pharmacy — Giving One Discount on All Medicines Example: *Life* members get 2.5% off all inpatient medicines. 1. Open *Administration → Manage Inpatient Services → Discount Matrix → Inward Discount Matrix - Pharmacy*. 2. **Discount Scheme:** type and pick the scheme (e.g. *Life*). 3. **Pharmaceutical Category:** open the list and tick the checkbox in its header to **select all** categories. You can also tick individual categories, or type in the filter box to find them. 4. Leave Department, Admission Type, BHT Type and Credit Company blank so the rule applies to everyone on the scheme. 5. **Discount %:** enter the percentage (e.g. `2.5`) and click **Add**. ![All pharmaceutical categories selected for the Life scheme at 2.5%](images/24029-pharmacy-discount-select-all-categories.png) *All categories ticked for the Life scheme at 2.5%. The selected names are shown on one line.* One row is created for each selected category, and a message such as **"120 added"** appears. The scheme, department, BHT type and % stay filled in after saving, so you can go on adding rows for other categories. Only the category selection is cleared. ### Duplicates are skipped If a category already has an active row with exactly the same scheme, department, admission type, BHT type and credit company, it is **skipped rather than duplicated**. The message shows how many were added and how many were skipped. For example, selecting all categories again shows *"Nothing added - all 55 selected categories already have this discount"*. To change an existing percentage, edit it in the list instead. ![Adding the same discount again skips every category](images/24029-pharmacy-discount-duplicates-skipped.png) *Adding the same discount a second time: every category already has it, so nothing is duplicated.* ### Finding rows — Fill **Fill** lists the pharmacy discount rows, **filtered by whatever is currently selected above**: scheme, department, categories, admission type, BHT type and credit company. Fields left blank don't filter. For example, pick *Life* and click **Fill** to see only the Life rows. The list is paged (25 rows by default, up to 200), and blank values are shown as *All Departments / All Admission Types / All BHT Types / All Companies*. ![Pharmacy discount list filtered to the Life scheme](images/24029-pharmacy-discount-list-filtered.png) *Fill with the Life scheme selected lists only the Life rows, across several pages.* ### Doing the same through the API `POST /api/inward-discount-matrix` accepts `categoryIds` (a list) instead of `categoryId` and creates one row per category, skipping duplicates. See `developer_docs/api/using-apis/API_INWARD_DISCOUNT_MATRIX.md` in the code repository. --- ## Services & Investigations — Giving One Discount on All Services Example: *Life* members get 5% off all inpatient services and investigations. 1. Open *Administration → Manage Inpatient Services → Discount Matrix → Inward Discount Matrix - Services and Investigations*. 2. Pick the **Discount Scheme**. In **Category**, tick the header checkbox to select all. The list contains service categories, service sub-categories and investigation categories, each labelled with its type. 3. Leave Department, Admission Type, BHT Type and Credit Company blank. Enter the **Discount %** and click **Add**. It works exactly like the pharmacy page: one row per category, duplicates skipped, other fields kept, and **Fill** filters the list by the current selections. The list also has a **Category Type** column. ![Services and investigations discount rows for Life](images/24038-service-discount-list.png) *Life at 5% across service and investigation categories, filtered with Fill.* ### Discount setup checks A category discount reaches a service or investigation only if: - the item has a **Category**. Investigations whose Category is blank use their Legacy Investigation Category (see [List Investigations](List-Investigations)). - **both** the item and its fee have **Discount Allowed** ticked. The collapsible **Discount setup checks** panel at the bottom of the page counts what would block the discount. Nothing changes until you click an action: - **Store as Category**: copies the Legacy Investigation Category into Category for investigations where Category is blank. - **Allow Discounts**: turns on Discount Allowed for all active items of the ticked types (Investigation, Service, Inward Service) *and all their fees*. Only use it when the hospital's policy is that every such item may be discounted. ![Discount setup checks panel](images/24038-discount-setup-checks.png) *After both actions, all counts are 0.* The same tools are available through the API: `POST /api/investigations/copy-legacy-category` (dry run, add `?apply=true` to run), `POST /api/services/items/bulk-discount-allowed` and `POST /api/services/fees/bulk-margin` (with `discountAllowed`). --- ## Room Charges — Different Discounts by Room Category Example (Life): Room Charges 30% for Standard rooms and 5% for Deluxe / Super Deluxe rooms. Linen and Maintenance 5% for every room. 1. Open *Administration → Manage Inpatient Services → Discount Matrix → Inward Discount Matrix - Room Facility Charges*. 2. Pick the **Discount Scheme**. 3. **Room Charge Types:** tick one or more (e.g. *Room Charges*). 4. **Room Categories:** tick the categories this % applies to (e.g. *Standard*, *Standard Dup*). Leave it blank for a row that applies to **every room**. 5. Enter the **Discount %** and click **Add**. One row is created per charge type × room category, and existing identical rows are skipped. 6. Repeat for the other rates, e.g. *Room Charges* × the Deluxe-type categories at 5%, then *Linen Charges* + *Maintain Charges* with no room category at 5%. When a room is charged, the discount comes from the row for **that room's category** if one exists, otherwise from the all-rooms row. Each room of a stay is treated on its own, so a patient who moves from a Standard to a Deluxe room gets 30% for the Standard days and 5% for the Deluxe days. ![Room charge discounts per room category](images/24011-room-charge-discounts.png) *Life: Room Charges 30% for A/C and 5% for Non A/C, plus Linen and Maintenance 5% for all rooms.* API: `POST /api/inward-discount-matrix` with `scope=room`, `inwardChargeTypes` and optional `roomCategoryIds`. --- ## How the Discount Is Applied - **Services & investigations (inpatient service bills):** each fee gets `discount % × fee value`, when both the item and the fee allow discounts. The interim bill shows the discounts stored when the services were billed. **At final-bill settle the discount is applied again to every service on the admission using the patient's current scheme**, so services billed before the scheme was set on the admission are discounted too. - **Room charges, linen, maintenance and other room charge types:** worked out per room, by that room's category, on the interim and final bill. The discount is shown on the Room Charges tab, and the room line total is net of it. - **Pharmacy (native Direct Issue to BHT, including issues made from an Item Request):** each line gets `discount % × gross value`. The per-unit discount is stored on the line, and the bill's net total is after the discount. - **Cancellation** of such a bill creates an exact opposite bill, with the discount reversed in full. - **BHT Issue Return:** the returned quantity is credited at the discounted net rate. The return bill records its share of the discount, so the patient is never credited more than they were charged. - **Interim / final bill:** the Pharmacy total is the sum of the bills' net totals, so it is already net of discount, cancellations and returns. The lookup tries the most specific row first and then broader ones: **Item → Category → Parent Category → Department → scheme-wide (blank category)**. At each level a row for the admission's scheme wins over a row without a scheme. See [[Membership-Discount-Troubleshooter]] if a configured discount isn't showing up. --- ## Related Articles - [Inpatient — Final Bill Generation](Inpatient-Final-Bill-Generation) — where discounts show on the bill - [Admin — Inpatient Price Adjustments](Admin-Inpatient-Price-Adjustments) — service charge / margin (different from discounts) - [Admin — Inpatient Module Configuration Overview](Admin-Inpatient-Module-Configuration-Overview) — navigation overview