Inward BHT Issue Against Request - hmislk/hmis GitHub Wiki

Inward BHT Issue Against Request

Overview

This is the pharmacy-side screen used to issue medicines against a BHT Medicine Request already submitted by ward staff (see Inward BHT Medicine Request). Pharmacy staff open a request, pick the actual stock batch to issue for each requested item, adjust quantity if needed, and settle the bill.

When to Use

Use this screen when:

  • A ward has submitted a BHT Medicine Request and pharmacy needs to issue the medicines against it
  • The exact stock batch to issue differs from what was originally requested (different strength, different batch) and needs to be picked at issue time
  • A requested item is out of stock in the batch the system suggested and a substitute batch/item needs to be selected instead
  • The requested quantity needs adjusting at the point of issue (e.g. partial stock availability)

How to Use

Opening a Request for Issue

  1. Navigate to Inward โ†’ Pharmacy โ†’ BHT Issue Request List (ward_pharmacy_bht_issue_request_list_for_issue.xhtml)
  2. Search by date range, Request No, or BHT No, using Search All / Search Not Issued / Search Issued Only as needed
  3. Click Issue Medicines on the request's row โ€” this opens the BHT Issue screen for that request

Reviewing and Adjusting the Issuing Items Grid

The Issuing Items grid lists one row per requested item, pre-filled with the batch the system selected automatically (FEFO-ordered โ€” earliest expiry first).

Gross Value, Margin, Net Total (and Discount, where the IPBillingViewDiscount privilege is granted) are shown per line when the Nursing IP Billing - Show Rate and Value configuration option is enabled and the viewing user holds the NursingIPBillingViewRates privilege โ€” the same breakdown also totals up in the Bill Details panel on the right.

Issuing Items grid with the Gross Value / Margin / Net Total columns

Default view: Requested Item, the auto-selected Issuing Bill Item, Qty, and the Gross/Margin/Net breakdown.

To change the issuing batch/item or the quantity for a row:

  1. Click the pencil (row-edit) icon on the right of the row
  2. Both the Issuing Bill Item field and the Qty field become editable together
  3. To change the batch/item: type into the Issuing Bill Item box and pick a different stock/batch from the suggestions โ€” the row's Gross/Margin/Net recalculate immediately against the new item's rate
  4. To change the quantity: edit the Qty box directly โ€” enter the plain number of units to issue (a positive number; the system handles the internal stock-out accounting on its own)
  5. Click the checkmark to save the row, or the X to cancel

Issuing Items grid in row-edit mode, both fields open together

Row-edit mode: clicking the pencil opens the Issuing Bill Item and Qty fields together, not just one or the other.

If a requested item is out of stock in the auto-selected batch, use Select a Substitute next to the requested item name instead โ€” it opens a dialog listing other available batches to issue from, including alternative brands (other AMPs under the same generic/VMP, e.g. a different manufacturer's version of the same drug) when the requested item has any configured, not just other batches of the exact same item. This matches the substitute suggestions already shown to ward staff when they create the request (see Inward BHT Medicine Request) and to pharmacy staff on the Direct Issue to BHT screen (issue #23470 โ€” previously this dialog only ever showed the originally requested item's own batches, never true alternative brands).

Select a Substitute dialog listing alternative brands (Levo 500, Levocil 500mg Tablet) alongside other batches of the requested Leflox 500mg tablet

Requesting "Leflox 500mg tablet" โ€” the dialog now offers its alternative brands "Levo 500" and "Levocil 500mg Tablet" in addition to other batches of Leflox itself.

Issuing Items row after Replace โ€” Issuing Bill Item now shows the selected substitute brand

After clicking Replace on "Levocil 500mg Tablet", the row's Issuing Bill Item, Expiry and Qty update to the substitute batch while Requested Item still shows what the ward originally asked for.

Both paths โ€” the inline Issuing Bill Item field and the Select a Substitute dialog โ€” keep the row's Gross Value, Margin, and Net Total, and the Bill Details totals on the right, in sync with whichever item/batch is currently selected:

Grid and Bill Details totals matching after swapping the issuing item

Grid and Bill Details totals matching after editing the quantity

Substituting to a different strength scales the allowed quantity. When the Issuing Bill Item is switched to a different strength of the same drug (e.g. the ward requested Amoxicillin 500mg ร— 10, but the pharmacist issues Amoxicillin 250mg instead), the maximum Qty the row will accept scales by the strength ratio between the two items rather than staying capped at the originally requested unit count โ€” 10ร—500mg and 20ร—250mg deliver the same total dose, so both are allowed. This only applies when both items have strength master data (strengthOfAnIssueUnit/strengthUnit) recorded and share the same unit; otherwise the plain unit-count cap from before still applies unchanged (issue #23718).

Qty stuck at 10 after substituting to Amoxicillin 250mg โ€” the cap ignored the strength change

Before the fix: substituting the 500mg request to 250mg capsules still capped Qty at the original 10 units, silently reverting any higher value.

Qty of 20 accepted after substituting to Amoxicillin 250mg โ€” the cap now scales by strength

After the fix: the same substitution now accepts Qty 20 โ€” the correct dose-equivalent quantity โ€” and Gross/Margin/Net recalculate for it.

Qty of 21 clamped back to 20, not 10 โ€” the cap is still enforced, just correctly scaled

The cap is still enforced: an attempt to enter more than the scaled maximum (21, when 20 is correct) clamps back down to 20, not to the old unscaled 10.

The grid also has an Expiry column, showing the expiry date of the batch currently assigned to each row, so a pharmacist can scan for near-expiry stock across the whole bill without expanding every row individually.

If a request has two lines for the same medicine (e.g. the ward submitted it twice) and stock is limited, the first line to be processed claims what stock is available and the second line correctly shows no batch assigned instead of being double-booked against the same limited stock the first line already took:

Two requested lines for the same low-stock medicine; only the first line gets a batch, the second correctly shows no stock

15 units of "Panadol 500mg tab" requested on one line, 6 more on another, against only 3 units of actual stock โ€” the first line gets the 3 units, the second correctly shows "Not available" rather than being assigned the same already-claimed batch.

Adding Extra Items Manually

Besides issuing against the requested items, the Add Additional Items panel (top left of the screen, renamed from "Add Items" for clarity โ€” issue #23563) lets pharmacy staff add an item/batch to the bill that wasn't part of the original request โ€” e.g. issuing something the ward needs but didn't explicitly request.

This panel is visible by default. A hospital that wants pharmacy staff to issue only against what was actually requested can hide it โ€” for every department โ€” via the Adding new items for inpatient requests are allowed. application configuration option, without a code change or deploy.

BHT Issue page showing the panel renamed to "Add Additional Items", visible by default

The panel renamed from "Add Items" to "Add Additional Items", shown here in its default visible state while issuing against request Inward//26/050549 for BHT/57817.

  1. Search for the item in Medicines/Devices and pick a batch from the suggestions (Item, Code, Generic, Rate, Stocks, Expiry are shown per option)
  2. Enter Quantity
  3. Click + Add

A manually added row has no Requested Item text and, unlike a requested row, does not show the Select a Substitute icon โ€” there's nothing requested to substitute against.

The same batch cannot be added to the bill twice. If the picked batch is already on the bill โ€” whether as the auto-selected batch for a requested item, or from an earlier manual add โ€” + Add is blocked with "This batch is already in the bill. Edit the existing row's quantity instead." Edit the existing row's Qty (via the pencil icon) rather than adding a second line for the same batch.

+ Add blocked for a batch already on the bill; the grid still shows only the one existing row

Attempting to add "Zaart 50mg Tab" (batch expiring 31 Dec 27) a second time is blocked โ€” the grid still shows only the original row.

Issuing Items grid after a different batch was added manually โ€” Expiry column on both rows, no substitute icon on the manually-added row

A different batch/item adds normally as its own row (bottom); the requested row (top) keeps its Select a Substitute icon, the manually added row doesn't.

Settling the Bill

  1. Select the Porter / Staff Carrying Medicines to Ward โ€” required before settling
  2. Review the Stock Availability Report panel if it's showing a "Review โ€” insufficient stock" warning; settling is blocked until every flagged row is resolved (issue in full, or via Select a Substitute)
  3. Click Issue to BHT
  4. Confirm "Are you sure you want to Settle This Bill?"
  5. The bill preview opens, confirming the item(s), quantity, and totals that were actually issued

The printed bill preview (when the Pharmacy Request Issue Bill is PosHeaderPaper configuration option is enabled, which is the default paper type) shows the RATE and VALUE columns, and the Net Total line, only when the viewing user holds the NursingIPBillingViewRates privilege and the Pharmacy Bill Sent to Ward - Show Rate and Value configuration option is on โ€” a user without the privilege never sees rate/value, on screen or on the printout, regardless of this option. The same option, combined with IPBillingViewDiscount, also gates the Discount line, so switching it off suppresses every monetary field on the printout, not just rate/value. The option is an institution-level policy layered on top of those privileges: it decides whether a privileged user's printout includes pricing at all, independent of the separate Nursing IP Billing - Show Rate and Value option that (combined with the same privileges) gates the on-screen Issuing Items grid (above). It defaults to true (print for privileged users, matching prior behaviour); an admin can switch it off for hospitals that don't want any pricing on the physical slip handed to the ward (issue #23834).

Printed bill with the config option on โ€” RATE, VALUE, and Net Total are shown

Pharmacy Bill Sent to Ward - Show Rate and Value = true (default), viewed by a user with NursingIPBillingViewRates: RATE 17.85, VALUE 17.85, Net Total 17.85.

Printed bill with the config option off โ€” only ITEM and QTY are shown

Pharmacy Bill Sent to Ward - Show Rate and Value = false: the RATE/VALUE columns and Net Total line are omitted entirely โ€” same bill, same item, same privileged user. (A user without NursingIPBillingViewRates sees this same reduced view regardless of the option's value.)

Understanding Messages

  • "Please select the staff member (porter) who will carry the medicines to the ward." โ€” a porter must be picked before the bill can be settled
  • "Can not enter a minus value" โ€” appears if a Qty edit resolves to zero or less; the row is reset and needs a valid positive quantity
  • "No Sufficient Stocks?" โ€” the edited quantity (or the originally selected batch) doesn't have enough stock; pick a different batch or reduce the quantity
  • "Cannot issue <n> units of <item>. Only <remaining> units remaining to be issued." โ€” the edited quantity exceeds what's left unissued on the original request for that item. When the issuing item is a different strength than what was requested, <remaining> is already scaled for that strength difference (see above) โ€” it is not necessarily the same number of units that was originally requested
  • "This batch is already in the bill. Edit the existing row's quantity instead." โ€” appears when + Add is used to pick a batch that's already on the bill (auto-assigned or previously added manually); edit the existing row's Qty instead of adding a duplicate line
  • "Failed to settle bill. Please try again. Error: One or more items have insufficient stock. Please refresh and try again." โ€” appears at the final Issue to BHT step if a batch's real stock dropped below what this bill needs since the page was loaded (e.g. another pharmacist settled a different bill against the same batch in the meantime). The bill's items stay visible โ€” refresh, adjust quantities or pick a different batch/substitute, then try again.

Bill items still intact after a stock-shortage settlement error

The row survives the error unchanged โ€” no need to re-enter anything, just resolve the stock shortage and retry.

Permissions

  • NursingIPBillingViewRates โ€” required to see the Gross/Margin/Net columns and the Bill Details financial breakdown on screen (combined with the Nursing IP Billing - Show Rate and Value configuration option), and required to ever see RATE/VALUE/Net Total on the printed bill preview (combined with the separate Pharmacy Bill Sent to Ward - Show Rate and Value configuration option โ€” see above). Without this privilege, neither the screen nor the print shows rate/value, regardless of either option
  • IPBillingViewDiscount โ€” required to see the Discount column/total on screen, and required to ever see it on the printed bill preview (combined with the same Pharmacy Bill Sent to Ward - Show Rate and Value configuration option that gates RATE/VALUE for print). Without this privilege, neither the screen nor the print shows the discount, regardless of the option

Related Features

Back to Pharmacy

โš ๏ธ **GitHub.com Fallback** โš ๏ธ