In short: In pharma and food, counting quantity is not enough. Every batch and expiry date must be counted, quality-hold stock kept apart from released stock, and cold-storage locations handled properly. Scanning a GS1 DataMatrix captures the item, batch and expiry in one scan, and first-expiry-first-out (FEFO) issuing reduces write-offs.
The count says you have 2,000 packs of a certain medicine, and the number is right. But 600 of those packs expire next month, and 200 belong to a batch on quality hold that must not be issued. The total is correct; the decision built on it is wrong.
Pharmaceutical and food stock taking is not complete with counting alone. Every item must be counted by batch number, expiry date, quality status and storage condition. This article explains how that works in factory, distributor and pharmacy warehouses.
Key takeaways
- The counting unit in pharma and food is: item + batch number + expiry date + location.
- A GS1 DataMatrix carries batch, expiry and serial number, so all of it is read in one scan.
- Stock on quality hold is counted and reported separately from released stock.
- Alerts before expiry and before retest dates protect you from losses and non-compliance.
What must be counted in pharma and food?
| Data | Why it is counted |
|---|---|
| Batch / lot number | For traceability and recalls |
| Production and expiry dates | For first-expiry-first-out issuing and blocking expired stock |
| Quality status | On hold, released or rejected |
| Location and storage condition | Chilled, frozen, dry or moisture-free |
| Serial number (medicines) | Required by pharmaceutical track-and-trace at pack level |
GS1 DataMatrix: all the data in one scan
A GS1 barcode carries more than the item number. With Application Identifiers it can carry the GTIN (01), batch number (10), production date (11), expiry date (17) and serial number (21). During the count, the handheld reads all of this in one scan, so staff never type a date by hand.
In Saudi Arabia, the SFDA drug track-and-trace system (RSD) requires a GS1 DataMatrix on every sellable pack carrying GTIN, serial number, batch and expiry, with hierarchical aggregation of cases and pallets. See our pharmaceutical track & trace solutions for more.
Quality hold and release
Many pharmaceutical and food raw materials cannot be used on arrival. They are held until quality control tests them, then released for use or sale, or rejected. The system must reflect this status in counts and reports:
- On receipt, the material is recorded as “on hold” in the quarantine location.
- Held material cannot be issued to production or sale.
- Once the test result is approved, the status changes to “released” or “rejected”.
- The count shows quantities by status, so held stock is never counted as available.
Quality-test validity and retesting
Some materials have a retest date before their expiry date. After that date they must be retested before use. The system sends an alert ahead of the retest date and can automatically return the material to hold until it is tested again.
Cold storage and suitable locations
Meat, ice cream and some medicines need chilling or freezing, while paper goods and powders cannot tolerate humidity. When these properties are defined on the item card, the system suggests suitable storage locations on receipt and blocks unsuitable ones. During the count, cold rooms are counted fast to limit door openings.
First expiry, first out (FEFO)
In food and pharma, the rule is not “oldest first” but “earliest expiry first”. When stock is counted by batch and date, the system can direct issues to the batch that expires first and report items expiring within 30, 60 or 90 days.
Illustrative example from a Saudi warehouse
The following example is illustrative, based on patterns we see repeatedly in food warehouses:
A chilled and frozen food distributor manages 700 items across more than 3,000 batches. Counts recorded quantities only, with expiry dates kept in a separate file. After counting by batch and expiry using GS1 barcodes, near-expiry stock surfaced in back locations that were never being picked. The near-expiry report is now reviewed weekly, and waste dropped noticeably.
If these challenges sound familiar, see how Smart Stock Taking handles them and request a demo on your own products.
Common pharma and food count mistakes
- Counting quantity without batch: a correct number that is useless for recalls or proper issuing.
- Typing expiry dates by hand: a recurring error source that barcode reading eliminates.
- Counting quality-hold stock as available: leads to issuing unapproved material.
- Ignoring retest dates: using materials whose test validity has lapsed.
- Slow counts in cold rooms: long door openings harm the product.
Related reading: if your products carry serial numbers, see our serialized inventory count guide, and for Saudi pharmaceutical track-and-trace requirements, see AUTOMERA track & trace solutions.
How Automera helps
Smart Stock Taking supports counting by batch, production and expiry date; GS1 DataMatrix reading; quality hold and release; retest and near-expiry alerts; storage locations by product properties; and FEFO issuing. It connects with our track & trace solutions. For the general process, read our stock taking process guide.
Do you know what will expire in your warehouse in the next 60 days?
Book a free demo of Smart Stock Taking and see counting by batch, expiry and quality status on items from your own warehouse, with no commitment.
Packages & pricing: Smart Stock Taking packages start from SAR 5,000 for the first year. See the details on the packages page or download the brochure with prices (PDF).
Before comparing vendors, read our guide: How to choose the best inventory software in Saudi Arabia (2026).
Read also: SFDA RSD Track and Trace: What Pharma Plants Need
Frequently asked questions
How are medicines counted in a warehouse or pharmacy?
Each item is counted by batch number, expiry date and location, ideally by scanning a GS1 DataMatrix that carries this data, with quality-hold stock kept separate from available stock.
What is quality hold in a warehouse?
Material is recorded on receipt with a held status until quality control tests it, so it cannot be issued before release and is not counted as available stock.
What is the difference between FIFO and FEFO?
FIFO issues the oldest received stock first, while FEFO issues the stock that expires first, which suits food and medicines better.
Can the system read the expiry date from the barcode?
Yes. With GS1 barcodes that encode expiry and batch through Application Identifiers, the handheld reads them directly with no manual entry.
Sources: GS1 – Application Identifiers · LSPedia – Saudi Arabia DTTS requirements. Information current as of November 2026.
What is the right way to do a pharmacy stock take?
Organise medicines by location and count each item by batch and expiry, not just quantity. Keep expired, near-expiry and returned items in separate locations and check cold-storage items. A scanner that reads GS1 DataMatrix captures batch and expiry automatically; then reconcile the results with the pharmacy system.
