Skip to help content
30-day free trial. No payment required. Start free
SikaBooks
Pharmacy ยท Guide 4

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

  1. A cashier or pharmacist adds a pharmacy product to the POS cart
  2. 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.
  3. Before completing the sale, the system validates:
    • Is the product's batch expired? (blocked if expired_drug_sale_blocked is 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)
  4. If validation passes, the sale completes
  5. 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:

  1. The system shows the validation error with an override option
  2. A supervisor must approve the override with their PIN
  3. 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
  4. 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:

  1. Search for the prescription from the POS sell screen
  2. Link the matching prescription to the product line before checkout
  3. Each dispensed item updates the prescription's quantity_dispensed
  4. When all items are fully dispensed, the prescription status changes to Fully Dispensed
  5. 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.