Pharmacy inventory looks like retail stock control until something goes wrong. A recalled lot that cannot be found, an expired vial dispensed, a controlled substance count that does not reconcile: each of these is a patient safety or regulatory problem, not a shrinkage line in a report.
This post covers how to design a pharmacy inventory management system: modeling items by NDC and package, tracking lots and expiry, counting controlled substances, setting reorder points, handling recalls and returns, and producing the records auditors ask for. It applies to retail, specialty and hospital outpatient pharmacies.
What is a pharmacy inventory management system?
Building inventory controls for a pharmacy?
Our quality management system page covers the controlled records, audits and corrective actions we build for regulated operations.
A pharmacy inventory management system tracks every drug package from receipt to dispensing or disposal, by product code, lot and expiry, with separate controls for controlled substances, reorder rules and recall handling. Agnotic Technologies designs it so any lot can be located and any count reconciled on request.
The test of the design is simple: when a recall notice arrives, how long does it take to say where every affected package is?
How should items be modeled?
Model items at the level the pharmacy buys, stores and dispenses them: the drug, each package size identified by its National Drug Code, and the unit of measure used for counting. Mixing these levels is the root of most count errors.
- Product: the drug, strength and form, shared by several packages.
- Package: each NDC with its package size and supplier details.
- Unit: tablets, milliliters or each, used consistently for counts and dispensing.
- Substitutes: equivalent packages linked, so a reorder can switch supplier without a new item.
How should lots and expiry be tracked?
Track lots and expiry from receipt: scan or enter the lot and expiry for each package received, keep them with the stock location, and record which lot was used for each dispense where the workflow allows.
Pick by earliest expiry first, show staff what expires soon, and block dispensing from expired stock. Move expired and near-expiry packages into a separate quarantine status so they cannot be picked by mistake.
How should controlled substances be counted?
Count controlled substances with their own perpetual inventory, separate from general stock, where every receipt, dispense, transfer, waste and adjustment is recorded with who did it and why. Physical counts then reconcile against that record.
DEA registrants must take a new inventory of all controlled substances on hand at least every two years; dispensers count opened Schedule I and II containers exactly, while Schedule III to V may be estimated unless a container holds more than 1,000 tablets or capsules.
- Perpetual record: running balance per item, updated by every transaction.
- Cycle counts: more frequent counts for high-risk items than the minimum the rules require.
- Discrepancies: an investigation record opened automatically when counts do not match.
- Two-person steps: witnessed waste and adjustments where policy requires.
How should reorder points be set?
Set reorder points from actual usage and supplier lead time, with a safety margin for items where running out would harm patients. Review them on a schedule, because seasonal demand and new prescribers change usage.
Keep separate rules for expensive specialty drugs, which are better ordered against specific prescriptions than held in stock, and for items with frequent shortages, which need alternatives recorded in advance.
How should recalls be handled?
Handle recalls by searching stock and dispensing history for the affected product and lots, quarantining what is on the shelf, and producing a list of patients who received affected lots where the recall requires notification.
The Drug Supply Chain Security Act outlines steps toward an interoperable, electronic way to identify and trace certain prescription drugs at the package level as they move through the US supply chain.
A recall workflow that depends on staff searching shelves by hand will miss packages. The lot data captured at receipt is what makes a fast, complete answer possible.
How should shortages be handled?
Handle shortages with alternatives agreed before they are needed: equivalent packages from other suppliers, therapeutic alternatives approved by the pharmacist in charge, and rules for rationing stock between patients or locations.
- Alternatives: each critical item linked to its approved substitutes.
- Allocation: remaining stock reserved for the patients or sites that need it most.
- Alerts: purchasing told when supplier fill rates drop, not when the shelf is empty.
- Records: which substitute was dispensed to whom, in case of later questions.
Specialty and high-cost drugs
Specialty and high-cost drugs need tighter handling than ordinary stock. They are often ordered for a named patient, stored under special conditions and returned or wasted with documentation.
Track them by patient order as well as by lot, record storage conditions such as refrigeration, and reconcile them individually rather than in bulk counts. A single lost package can matter more than a month of write-offs on common items.
Which audit reports should the system produce?
The system should produce, on demand, the reports inspectors and auditors ask for: controlled substance transaction histories, inventory counts with dates and counters, discrepancy investigations, recall actions and expired stock disposal.
Build these reports from the transaction records, not from separate spreadsheets. If a report and the transaction history can disagree, an auditor will eventually find the disagreement.
Receiving, returns and transfers
Receiving should match deliveries to orders, capture product identifiers, lots and expiry, and flag shortages or substitutions. Returns to suppliers and transfers between locations need the same detail, so stock never disappears between two records.
Record the transaction documents that come with each delivery alongside the receipt, so they can be produced when asked.
How does inventory connect to the pharmacy system?
Inventory connects to the dispensing system so each fill reduces stock, to wholesalers for orders and invoices, and to finance for valuation. In hospital outpatient pharmacies, it may also connect to automated dispensing cabinets.
Decide which system holds the perpetual balance. When the dispensing system and the inventory tool both keep counts, they drift apart. The other systems should read that balance and send transactions to it, never adjust a copy of their own.
What goes wrong with pharmacy inventory systems?
Inventory systems usually fail in the gaps between transactions. These are the common ones.
- Unit confusion: packages received as boxes and dispensed as tablets without a clean conversion.
- No lot capture: recalls answered by shelf searches and memory.
- Shared logins: controlled substance adjustments nobody can attribute.
- Static reorder points: set at launch and never reviewed.
- Two balances: dispensing and inventory systems both counting stock.
A worked example: an outpatient pharmacy recall
A hospital outpatient pharmacy receives a recall notice for two lots of an injectable. The inventory system shows one package of an affected lot on the shelf and none in transfer, and moves it to quarantine.
Dispensing history shows which patients received packages from the affected lots, because the lot was scanned at fill. The pharmacist reviews the list and the patient contact steps the recall calls for.
The recall record keeps the notice, the stock found, the quarantine and the patient list, ready for the next audit.
Who owns what?
The pharmacist in charge owns inventory policy and controlled substance records. Technicians own day-to-day receiving and counts. Engineering owns the system's accuracy and audit trail.
- Pharmacist in charge: policies, discrepancy investigations and recall decisions.
- Technicians: receiving, cycle counts, returns and quarantine.
- Purchasing: suppliers, reorder rules and shortage alternatives.
- Engineering: item model, integrations, audit trail and reports.
How do you test a pharmacy inventory system?
Test it with the awkward cases: partial packages, substitutions, expired stock, recalls, transfers and controlled substance discrepancies.
- Units: receive a box, dispense tablets and confirm the balance.
- Expiry: confirm expired stock cannot be picked.
- Recall: search a lot and find every package and patient affected.
- Controlled: make a count mismatch and confirm an investigation opens.
How do you measure inventory performance?
Measure safety and availability first, then cost. A cheap inventory with stockouts of critical drugs is not performing well, however good its turnover figures look.
- Stockouts of critical items, and how long each lasted.
- Expired stock written off, by item.
- Controlled substance discrepancies and time to resolve.
- Time to locate all stock and patients for a recall.
What are pharmacy inventory management best practices?
Model items by NDC and unit, capture lot and expiry at receipt, keep a perpetual record for controlled substances with attributable entries, base reorder points on usage and lead time, rehearse recalls and keep one source for stock balances.
Run a mock recall each quarter; it tests data, process and people at once. Pick a real lot received in the last few months, time how long it takes to find every package and every patient, and fix whatever slowed the search before the next real notice arrives.
How Agnotic can help
Agnotic builds pharmacy inventory systems and integrations: item and lot models, receiving with scanning, controlled substance records, reorder rules, recall searches and connections to dispensing and wholesaler systems.
Build pharmacy inventory controls with Agnotic
We build pharmacy systems for dispensing, stock and patient services.
Related reading on Agnotic
Pharmacy, lab inventory and prescribing.


