Attrotech

Pharmacy Inventory Automation to Fight Counterfeit Drugs

How pharmacy inventory automation, batch tracking and NAFDAC verification cut stockouts, expiry losses and counterfeit drug risk for Nigerian pharmacies.

Pharmacy Inventory Automation to Fight Counterfeit Drugs

A pharmacist in Lagos or Kano faces two problems at once. First, running out of fast-moving drugs loses sales and sends patients to competitors. Second, buying stock from a long, informal supply chain raises the risk that some of it is fake, substandard or expired. Both problems come down to one weakness: poor visibility of what you bought, from whom, when it expires and where it went. Inventory automation fixes visibility, and visibility is the foundation of safer dispensing.

The problem: stock you cannot see, products you cannot trust

Most small and mid-sized pharmacies still run on notebooks, spreadsheets or a basic till that does not track batches. That creates predictable losses:

  • Expiry write-offs because nobody saw the batch approaching its date.
  • Stockouts of malaria, antibiotic and chronic disease medicines.
  • Overstock of slow items that tie up scarce working capital.
  • Shrinkage from untracked adjustments and theft.
  • Counterfeit exposure because supplier and batch details are not recorded, so a recall or a suspect product cannot be traced.

Nigeria has taken steps against fakes. NAFDAC introduced a scratch-code SMS check, the Mobile Authentication Service, which Safe Medicines reported lets patients text a code on the pack to a short code and receive a genuine or suspect reply, with the early pilot using short code 38353. Coverage has been limited to certain product categories and details change, so always confirm the current process on NAFDAC's official channels. Pharmacy software should complement these checks, not replace them.

The solution: batch-level inventory with smart alerts

1. Scan everything at receiving

When stock arrives, staff scan or key in the product, batch number, expiry date, supplier and invoice. Barcodes and GS1 DataMatrix or QR codes, where present on packs, make this fast. Any batch without a legible number is flagged for manual review before it reaches the shelf.

2. Run FEFO dispensing

First-expiry-first-out is easy to promise and hard to do on paper. The system suggests the oldest valid batch at the counter, and blocks expired items from being sold.

3. Forecast reorders with predictive analytics

Using sales history, seasonality (malaria peaks, school terms) and supplier lead times, a forecasting model proposes reorder quantities. Simple methods such as moving averages already beat guesswork, and gradient boosted models can add holiday and price effects when you have a year or more of data. An AI agent can then draft purchase orders for the manager to approve.

4. Verification and traceability workflow

Each received batch carries a verification status: verified through the manufacturer or NAFDAC channel, pending, or suspect. Suspect batches are quarantined in the system. If a recall notice arrives, a search by batch number shows exactly which customers and which shelves are affected.

5. Supplier scoring

Over time, the data shows which suppliers deliver short-dated stock, send mismatched invoices or have had batches flagged. Procurement can then favour licensed, reliable distributors.

What the data model looks like

Field Purpose
Product code and name Identify the item
Batch number Link to recalls and verification
Expiry date FEFO and expiry alerts
Supplier and invoice Provenance and audit trail
Verification status Verified, pending or suspect
Quantity and location Shelf and branch visibility

An alert rule can be as simple as:

alerts:
  - name: expiry_soon
    when: "days_to_expiry <= 90"
    notify: ["pharmacist_in_charge"]
  - name: low_stock
    when: "stock < reorder_point"
    action: "draft_purchase_order"
  - name: suspect_batch
    when: "verification == 'suspect'"
    action: "quarantine_and_notify"

Benefits

  • Less waste from expiry and overstocking.
  • Higher availability of essential medicines.
  • Safer dispensing through batch records and quarantine.
  • Faster recalls with a single search.
  • Cleaner books, since every movement is recorded, which also helps tax and audit preparation.
  • Multi-branch control from one dashboard.

Pharmacies attached to clinics gain further when stock links to prescriptions. See how patient flow and records fit together in AI and automation for Nigerian hospitals.

Proof and examples

We do not claim figures for pharmacies we have not served, and no software can guarantee a counterfeit-free supply chain. What technology can do is make suspicious patterns visible and create an auditable record. The building blocks are proven in our other work: inventory and order flows in e-commerce, for example Folamifit, and sensor and alert pipelines in StrikeClimate. Browse more on our solutions page.

For deeper background on how connected sensing improves monitoring in a related domain, read about IoT monitoring for agriculture and climate. Cold-chain medicines such as insulin and vaccines can use the same temperature-logging approach.

Implementation roadmap

  1. Week 1, clean your product list. Standardise names, units and pack sizes.
  2. Weeks 2 to 3, count and load. Do a full stock count and enter batches and expiry dates.
  3. Weeks 4 to 5, switch on receiving and FEFO. Train staff to scan or capture every delivery.
  4. Weeks 6 to 8, add alerts and reorder points. Start with your top 50 products.
  5. Weeks 9 to 12, forecasting and supplier scoring. Use the data you have collected to refine reorder quantities.
  6. Ongoing. Run monthly spot checks against physical stock and review suspect batch logs.

A fast first step is a simple batch-tracking app tailored to your workflow. Request a quote and we will scope it with you.

A word on people and process. Software only works when the receiving routine is respected, so make batch capture part of the delivery checklist and tie it to supplier payment: no complete batch record, no payment approval. Appoint one person per branch as the stock owner, hold a short weekly review of expiry and low-stock alerts, and keep a written procedure for quarantined items so that nobody sells a suspect product by accident. Small habits like these turn a database into real protection for patients.

FAQ

Can software detect counterfeit drugs by itself?

No. Software records provenance and flags anomalies, such as an unknown supplier or a duplicated batch number. Confirmation still comes through manufacturer and NAFDAC verification channels and a trained pharmacist's inspection.

Do we need barcode scanners?

Not at first. Manual batch entry works for a pilot, and a phone camera can read most barcodes. Dedicated scanners help once volume grows.

How does this help with compliance?

Complete batch, supplier and dispensing records make inspections and recalls easier to handle. Check the current requirements from NAFDAC and the Pharmacists Council of Nigeria for your licence category.

Make every shelf traceable

Better visibility protects patients and your margins. Book a free consultation to plan a batch-tracking system for your pharmacy, or chat with us on WhatsApp to ask about your setup.