Pharmacy queue, billing and dispensing
Work the pharmacy prescription queue, bill a prescription from stock batch by batch, and understand when stock is deducted, returned or left pending.
This page is for pharmacists and front-desk staff who bill and hand over medicines. It covers the pharmacy queue, how a prescription turns into a pharmacy bill, and what happens to stock when the bill is paid or refunded.
In LeapHealthOS you do not mark a prescription as dispensed by hand. You bill it, the patient pays, and the payment deducts the stock and marks the prescription Dispensed.
Before you begin
Checklist for administrators
- An active bill type with the code
PHARMACYexists. Without it the billing screen shows "No Pharmacy bill type is configured." See Bills, bill types and line items. - The centre has at least one active
PHARMACYstore with stock. See Stores and store roles. - Doctors prescribe medicines picked from the item list. A medicine typed in without a linked item cannot be billed from stock.
The pharmacy queue
Click Pharmacy in the sidebar. Pharmacists and administrators see this menu.
- Pick your pharmacy store in the Select Store picker in the top bar. The queue shows prescriptions for that store, and billing will use its stock.
- Choose the date range. It starts on today.
- Use the tabs to filter:
- All: every prescription except drafts.
- Pending: prescriptions waiting to be billed (status Pending).
- Completed: prescriptions that are Dispensed.
The table shows the patient, Patient Type, Doctor, Completed At, Items and Status. Click View Prescription to open one.
A prescription opens on the Prescription tab, with Case Record, Billings and Patient Analytics (not available yet) alongside. Once the prescription is Dispensed, the Prescription tab is no longer shown.
Bill a prescription
Open the prescription
PharmacistIn the queue, click View Prescription on a Pending prescription.
Expected result: A pharmacy bill is built automatically on the Prescription tab.
Check the lines LeapHealthOS built
For each prescribed medicine, LeapHealthOS takes stock from the batch that expires first. If one batch does not cover the prescribed quantity, it adds a second line for the next batch, and so on. Each line is priced at the batch MRP (or the item MRP if the batch has none).
Read any warnings
A message appears if something could not be covered:
- "Not stocked in this pharmacy: ..." lists medicines with no usable stock in this store, or not linked to an item.
- "Not enough stock to cover: ..." lists medicines where the store has less than the prescribed quantity.
Adjust the lines if needed
You can change a line's batch from its drop-down (each option shows batch number, expiry and price), change the quantity (up to what the batch holds), or click Add batch to add a line from another batch. A line shows "Covered" when the prescribed quantity is met and "No more stock" when there is no other batch.
Collect the payment
Review the totals and click Collect Payment. Choose how the patient pays and confirm. See Creating a payment and collecting money.
Expected result: When the bill is fully paid, stock leaves the store and the prescription becomes Dispensed. Click New Bill to go back to the queue.
If the prescription cannot be billed, the tab says why:
Message | Meaning |
|---|---|
This prescription is not ready for billing. | The prescription is no longer Pending, so it cannot be billed from the queue. |
Select a pharmacy store to bill this prescription. | No pharmacy store is selected, or none exists. |
No Pharmacy bill type is configured. | Ask an administrator to create an active |
This prescription has no medication to bill | The prescription has no medicines. |
Rules for medicine lines
These rules apply to every medicine line on any bill, not only bills built from the pharmacy queue.
- The line needs a store. If the centre has exactly one active store it is used; otherwise the line must say which store it is dispensed from.
- Medicines need a batch. A
DRUGline must name a batch of that item. The batch must be active and not expired. - Never above MRP. The price defaults to the batch MRP, then the item MRP, then the item's selling price. A higher price is rejected, and so is a tax-exclusive price that goes above MRP once tax is added.
- Tax comes from the item. The GST rate, whether the price includes tax, and the HSN code are taken from the item.
Error | What to do |
|---|---|
Select a batch for this medicine before billing it | Pick a batch on the line. |
Batch has expired and cannot be billed | Choose another batch. Expired stock is written off automatically. |
Batch is not active and cannot be billed | The batch is quarantined or expired. Choose another batch. |
Unit price is higher than the batch MRP | Lower the price. |
Selling price plus tax is higher than the MRP | Lower the price or check the item's tax settings. |
Select the inventory store this line is dispensed from | Pick the store. |
When stock is deducted
Stock is deducted when the bill becomes fully paid, not when the bill is created. For each medicine line, LeapHealthOS takes the quantity from the batch on the line if it can still be sold, otherwise from the batch that expires first.
Stock is not reserved while a bill is open
Building or issuing a bill does not hold the stock. If another sale uses the same batch before this patient pays, the payment may find too little stock.
If stock runs out before payment
A payment is never blocked by missing stock. If the store cannot cover a line when the bill is paid, the payment still goes through, no stock is deducted for that bill, and the patient's activity shows a "Stock Dispense Pending" entry. The prescription is still marked Dispensed.
No retry for a pending dispense on screen
There is no button to deduct the stock later. If you hand over medicines after such a payment, the store's stock will read higher than what is on the shelf. Ask your implementation team to complete the dispense once stock has been received.
You cannot dispense manually
A prescription with medicines linked to stock items cannot be set to Dispensed by hand. It becomes Dispensed only when its pharmacy bill is paid. See Prescriptions.
Refunds and returned stock
What happens | Effect on stock |
|---|---|
Refund that selects specific lines | Those quantities go back into the batches they came from. |
Full refund of the bill | Everything that was dispensed goes back. |
Appointment terminated with a paid bill | Everything that was dispensed goes back. |
Partial refund without selecting lines | Stock is not returned. |
You cannot return more than was dispensed. Returned stock goes back into its original batch even if that batch has since expired or been quarantined, so check the batch before selling it again. See Adjustments, refunds and deposits.
Related pages
- Stock in, stock out and transfers
- Batches, expiry and low-stock alerts
- Bills, bill types and line items
Last updated on
Stock in, stock out and transfers
Read the Pharmacy and General Store stock screens, receive stock with Record inward, move it with Record outward, and set up the forms these buttons need.
Batches, expiry and low-stock alerts
How batches and their statuses control what can be sold, how expired stock is written off automatically, and how to get alerted when stock runs low.