Drug track and trace in pharmacies: the DataMatrix code and what it changes
Drug track and trace means knowing the journey of every pack of medicine, from the factory to the patient. A small square code on the pack carries its identity, and the pharmacy is the last link in the chain. This guide explains the code and what you need from your software.
What is drug track and trace?
A track and trace system records each pack at every step: from the manufacturer or importer, to the distributor, to the pharmacy, and finally to the patient. The aim is to catch counterfeit and smuggled medicines, and to make it easy to recall a specific batch if a defect appears.
The pharmacy benefits directly too: you know that what is on your shelf is genuine, and exactly which batch and expiry date you hold.
What is the DataMatrix code on the pack?
It is a square, two-dimensional code, unlike the ordinary striped barcode. An ordinary barcode carries only the product number; the DataMatrix carries the details of the pack itself:
- The global product number (GTIN).
- The batch number.
- The expiry date.
- A serial number that identifies this pack among all others.
What changes in the pharmacy
- You need a barcode scanner that reads two-dimensional codes.
- You need software that understands the code and takes the batch and expiry from it, instead of typing them.
- The sale is recorded against the pack itself, not just the product.
- In Egypt you also need a GLN for your pharmacy, and to follow the Drug Authority's rollout: the readiness checklist.
Track and trace in Pharmafly
In Pharmafly Cloud Pro, and in Pro when it ships in 2027, the cashier reads the DataMatrix code on the pack first time, along with ordinary barcodes and scale barcodes, and the pack is linked to Egypt's drug track and trace system from the sales screen itself, with no extra step.
Every item is recorded with its expiry date and batch number, and sales take the nearest expiry first. In Saudi Arabia, Cloud Pro works with the Saudi Food and Drug Authority's RSD system from the same sales screen.
Benefits beyond compliance
- Expiry date and batch come from the code, so there are fewer typing mistakes.
- Reports of items close to expiry become more accurate.
- If a batch is recalled, you know at once whether you hold it.
Frequently asked questions
Does Pharmafly read the DataMatrix code?
Yes. Pharmafly Cloud Pro reads the DataMatrix code on medicine packs, along with ordinary barcodes and scale barcodes. Pro will do the same when it ships in 2027.
Does the software connect to the drug track and trace system?
Yes. The code is read and linked to Egypt's drug track and trace system from the sales screen in Cloud Pro, and in Saudi Arabia Cloud Pro works with RSD.
Do I need a new barcode scanner?
The DataMatrix code needs a scanner that reads two-dimensional codes. Contact us and we tell you what suits your pharmacy.
Related guides
- Drug track and trace in Egypt: what does your pharmacy need? A practical guide for pharmacy owners: what Egypt's drug track and trace system is, how far the rollout has come in 2026, what a GLN is, and how to prepare your pharmacy, software and scanner.
- E-receipts for pharmacies: issue them from your pharmacy software What the Egyptian Tax Authority e-receipt means for pharmacies, how it differs from the e-invoice, and how Pharmafly sends every sale to the ETA automatically from the sales screen.
- E-invoicing for pharmacies: when you need it and how to issue it When a pharmacy needs an e-invoice, how it differs from the e-receipt, what to expect from your software, and how Pharmafly issues e-invoices for Egypt's ETA and Saudi Arabia's ZATCA phase 2.
- Pharmacy software in Saudi Arabia: how to choose Choosing pharmacy software in Saudi Arabia: ZATCA phase 2 e-invoicing, SFDA RSD drug track and trace, expiry, branches, cost and support. How Pharmafly Cloud Pro fits.