-
Notifications
You must be signed in to change notification settings - Fork 120
Pharmacy Quantities Allow Fractions
Dr. M H B Ariyaratne edited this page Oct 18, 2025
·
2 revisions
This page explains how to use fractional quantities for medicines and devices in Pharmacy workflows when enabled for an item.
This is an end‑user guide. For technical details and the full change plan, see the developer reference at:
- Repository file: developer_docs/feature/allow-fractions-in-pharmacy.md
- Online (if browsable): https://github.com/hmislk/hmis/blob/main/developer_docs/feature/allow-fractions-in-pharmacy.md
Applies to: Pharmacy Issue (Disposals/Disbursements), Direct Purchase, GRN (receive/approval/costing), Purchase Return, GRN Return, Store Disbursement.
- Each item (AMP/AMPP) can be marked to allow decimal (fractional) quantities.
- When enabled for an item, quantity fields accept decimals (e.g., 0.5, 1.25).
- When disabled (default), quantity fields accept integers only (e.g., 1, 2, 10).
- Use fractional quantities for items that are dispensed, purchased, or received in partial units (e.g., compounded liquids, partial vials, split packs per policy).
- Keep integer‑only for items that must be processed as whole units (e.g., full packs, devices, single‑use items).
- Make sure the item is configured:
- Pharmacy Admin → AMP/AMPP → open item → toggle "Allow Fractions" → Save.
- In transaction screens (Issue, Direct Purchase, GRN, Returns):
- Select the item/batch as usual.
- Enter quantity:
- If the item allows fractions: decimals are accepted.
- If not: only whole numbers are accepted.
- Integer‑only items: decimal keystrokes are blocked; pasted decimals will be rejected when leaving the field.
- Fraction‑enabled items: decimal keystrokes are accepted; calculations reflect the decimal value.
- Any insufficient stock or general validation errors show as usual.
- Always confirm the item’s “Allow Fractions” setting before large batch entries.
- For split pack handling, align your quantity entry and units (Pack vs Unit) with departmental policy.
- Double‑check totals when mixing fractional and integer items on the same bill.
- I can’t enter decimals: Ensure the item’s "Allow Fractions" is enabled; reselect the item after saving.
- Decimals accept but totals look off: Confirm you’re entering against the correct unit (Pack vs Unit) and check price/pack conversions.
- GRN/Return fields still blocking decimals: Clear and reselect the item row; verify the admin toggle and that you’re editing the correct line.
- Where: Pharmacy Admin → AMP/AMPP → Allow Fractions toggle.
- Default: OFF (integer‑only) for all existing items to preserve behavior.
- Change impact: Immediately affects how quantities can be typed across pharmacy transactions for the configured item.
- Does this change retail sale quantities? Not in this phase. Retail pages that use integer quantities remain integer‑only.
- Can this be item‑specific? Yes—configured per item (AMP/AMPP).
- Is this a permission? No, it’s an item property. Usual privileges for admin access apply.
- Technical plan and page list: developer_docs/feature/allow-fractions-in-pharmacy.md
- Includes: updated entities (Item), DTOs (StockDTO), JPQL builders, and the exact XHTML files changed for QA.