Dispensing
Dispensing happens automatically when pharmacy products are sold through the POS sell screen. The Pharmacy module validates compliance and creates immutable dispensing records. 4.1...
Dispensing happens automatically when pharmacy products are sold through the POS sell screen. The Pharmacy module validates compliance and creates immutable dispensing records.
4.1 How Dispensing Works
- A cashier or pharmacist adds a pharmacy product to the POS cart
- If the drug requires a prescription, use the prescription search/link control on the POS line item. Link the prescription to each required product before completing the POS sale.
- Before completing the sale, the system validates:
- Is the product's batch expired? (blocked if
expired_drug_sale_blockedis enabled) - Is the batch near expiry? (warning shown)
- Does the drug require a prescription? (blocked for Class A without a valid prescription)
- Is the drug a controlled substance? (pharmacist-only check enforced)
- Does the quantity exceed the controlled substance limit? (warning/block)
- Is the product's batch expired? (blocked if
- If validation passes, the sale completes
- A Dispensing Log entry is created automatically with:
- Drug details and schedule snapshot
- Patient and doctor information (from prescription or sale)
- Batch number and expiry date
- Quantity and unit price
- Dispensed by (POS user)
- Link to the POS sale and prescription (if applicable)
The validation checkpoint blocks expired stock, invalid prescriptions, controlled-substance role violations, and quantity-limit failures. Near-expiry and allowed emergency situations are surfaced as warnings or override-required paths depending on your settings.
4.2 Emergency Overrides
When a validation check fails but the setting allow_emergency_override is enabled:
- The system shows the validation error with an override option
- A supervisor must approve the override with their PIN
- An Override Log entry is created (immutable) recording:
- Override type (emergency dispense without prescription, quantity exceeded, near-expiry)
- Drug and patient details
- Reason for override
- Approved by and requested by
- The sale proceeds with the override logged
All overrides appear in the Override Log report for regulatory review.
4.3 Prescription-Linked Dispensing
When dispensing against a prescription:
- Search for the prescription from the POS sell screen
- Link the matching prescription to the product line before checkout
- Each dispensed item updates the prescription's
quantity_dispensed - When all items are fully dispensed, the prescription status changes to Fully Dispensed
- Partially dispensed prescriptions show remaining quantities
4.4 After the Sale
After the sale posts, SikaBooks creates immutable dispensing records, updates prescription quantities, and exposes the activity in compliance reports:
- Dispensing Log records the sale item, drug schedule snapshot, batch allocation, patient, prescriber, dispenser, and linked prescription.
- Prescription status moves from Active to Partially Dispensed or Fully Dispensed based on remaining quantities.
- Reversals are created automatically when a POS sale is voided or returned, preserving the original audit trail.
- Compliance reports pull from the same immutable records, including Dangerous Drugs Record, Controlled Substances, Expiry, Prescription Fulfillment, and Override Log.