Medicine Barcodes in Bahrain and Qatar: What Your Scanning App Has to Handle.
Since 2022, Bahraini pharmacies, clinics, and hospitals have been scanning medication barcodes. Next is Qatar. Its Ministry of Public Health has given the pharmaceutical industry a year to comply with an order for a nationwide track-and-trace system. The phone camera is going to do a lot more work if you develop or manage an app that distributors, warehouse workers, or pharmacy employees use in either country.
This article describes what is printed inside the code, what the two nations require, and where scanning a real medicine box goes wrong. It also provides you with a launch checklist and a test plan. The reporting guidelines are not covered in great detail. Their documents are linked at the end, and those are owned by the authorities.
Why medicines get a 2D code
The GTIN is the only information stored in a typical retail barcode. Every box of the same medication has the same number, and it indicates which product is inside. For a till, that is sufficient. Following a single pack from a factory to a patient is insufficient.
More can be stored in a 2D code. A medicine pack's batch, expiration date, and unique serial number are added. Once each pack is distinct, an authority can verify its authenticity, track its whereabouts, and remove a single batch from the market if something goes wrong.
Both countries give these reasons themselves. Bahrain's NHRA describes its system as a way to keep counterfeit medicines away from patients. When Qatar announced its initiative with GS1 Qatar in 2024, the Ministry of Public Health said the aim was to confirm that medicines in circulation are authentic and to make withdrawing drugs from the market easier when needed.
Bahrain: scanning since 2022
Resolution No. 41 of 2017 and its Medicines Barcoding and Serialization Guideline are the foundation of the traceability system run by Bahrain's National Health Regulatory Authority (NHRA). Under the resolution, every medicine pack must carry a 2D barcode that encodes four things: the GTIN (Global Trade Item Number), the batch number, the expiry date, and a unique serial number.
The requirement covers medicines manufactured in Bahrain, imported medicines, and medicines manufactured overseas and packaged in Bahrain.
The data is sent to the NHRA-MVC Traceability Hub, a central platform run by rfXcel and Medical Value Chain (MVC). You can read more about how it was launched in the rfXcel and MVC announcement, and about how the hub is used in practice in the official NHRA circulars, such as Circular No. (01) 2023 on compliance with the hub.
The rollout came in steps:
When | What happened |
|---|---|
Nov 2017 | Resolution No. 41 of 2017 is signed into law. |
Apr 2018 | Product master data is reported through the GS1 UAE BrandSync portal. |
Nov 2020 | The NHRA-MVC hub is set up. Circular 46 tells invoicing companies that represent manufacturers to register in it. |
Sep 2021 | Circular 26 tells pharmacies to get a location code (GLN) from GS1 Bahrain, register in the hub and finish software training by 31 October 2021. |
May to Jun 2022 | Agents and distributors (from 1 May) and dispensers (from 1 June) start scanning the 2D code of every medicine they receive, and scan it again when they ship or dispense. |
Aug 2022 | Circular 30 reminds everyone to have 2D Data Matrix scanning in place. Residual stock and orders placed during the pandemic are left out of reporting for now. |
NHRA's plan also has an aggregation stage. Customs scan the 2D code on aggregated shipments when they arrive, and agents, distributors and import pharmacies scan the code on each pallet label they receive. For app builders this means pallet and case labels get scanned along with single packs.
Qatar: one year to comply
The Ministry of Public Health's Pharmacy and Drug Control Department issued Circular PDC/2026/18 to confirm Ministerial Decision No. 26 of 2026. According to Marhaba Qatar, the decision took effect on 18 June 2026. It sets up a national system for tracking and tracing medicines, called Tataboo. Manufacturers, importers, distributors, warehouses and pharmaceutical institutions have one year to comply. That puts the deadline around June 2027, and the US Commercial Service also points to mid-2027. Neither source gives an exact date, so check the circular for the one that applies to you.
The rule covers every medicine in circulation: made in Qatar, imported as a finished product, or made abroad and packaged in a licensed factory inside the country. Each pack needs a GS1 2D Data Matrix barcode that carries the product's GTIN, a unique serial number, the expiry date and the batch number.
None of this came from nowhere. The Ministry and the GS1 Qatar Office, which sits under the Qatar Development Bank, announced a joint initiative for 2D barcodes and serial codes in March 2024. The US Commercial Service calls Qatar the last major GCC market to formalize the mandate, and says its data model matches the Saudi and UAE systems.
Bahrain and Qatar side by side
Bahrain | Qatar | |
|---|---|---|
Authority | NHRA | Ministry of Public Health |
National system | NHRA-MVC Traceability Hub | Tataboo |
Code | GS1 2D Data Matrix | GS1 2D Data Matrix |
Data in the code | GTIN, expiry, batch, serial | GTIN, expiry, batch, serial |
Medicines covered | Made in Bahrain, imported, or made abroad and packaged in Bahrain | Made in Qatar, imported as finished products, or made abroad and packaged in Qatar |
Who is covered | Manufacturers, agents, distributors, pharmacies, hospitals and clinics | Manufacturers, importers, distributors, warehouses and pharmaceutical institutions |
Status | Scanning live since mid-2022 | One-year compliance window from 18 June 2026 |
What is inside the code
A GS1 Data Matrix on a medicine box holds four pieces of data. Each one is tagged with a GS1 Application Identifier (AI), the short number that tells software what follows it.
Field | AI | Sample value |
|---|---|---|
GTIN | 01 | 95012345678903 |
Expiry date | 17 | 280331 (31 March 2028, written YYMMDD) |
Batch or lot | 10 | A1B2C3 |
Serial number | 21 | 7381920455 |
The sample values are made up. Your app doesn't receive four neat fields, though. It receives one string with the identifiers and values run together. For the sample above it looks like this:
0195012345678903GTIN
17280331Expiry
10A1B2C3Batch
GSSeparator
217381920455Serial
Two details trip people up. The GTIN and the expiry date always have the same length, so nothing marks where they end. Batch and serial numbers vary in length, so a separator character (the ASCII 29 group separator) closes any variable-length field that isn't last. Code that splits the string at fixed positions will break on the first pack that differs from the sample.
The last digit of the GTIN is a check digit calculated from the other thirteen. Checking it takes a few lines of code and catches a misread before the app accepts it. For the sample, the digits 9501234567890 produce a check digit of 3. The expiry date is worth a check too. If it is earlier than today, the app can warn the pharmacist before the pack is handed over.
The same data is also printed in readable form near the code, and the Bahrain guideline asks for human-readable data elements. That printed text is a useful fallback when a code is too damaged to scan, because a worker can type the values in.
barKoder includes a GS1 parser that does the splitting for you, so your code can work with an expiry date instead of slicing characters.
Where the code gets scanned
The same code gets scanned in very different places, and each one puts different demands on the app.
The pharmacy counter
Staff scans one pack at a time, often with a customer waiting. The app needs a fast first read, a clear result and a visible expiry check. The code may be small, and the carton may be glossy.
Useful here: Data Matrix decoding, the GS1 parser.
The distributor's receiving dock
A delivery puts dozens of cartons and a pallet label in front of the camera. The app has to read several codes at once, and often to find one specific code among them.
Useful here: Batch MultiScan and Search & Find.
The hospital pharmacy or clinic storeroom
Light is poor, the signal can be weak, and the phones are a mix of models. Labels get scuffed and wiped down. Scanning has to keep working on the device itself.
Useful here: on-device scanning, MatrixSight for damaged codes.
What goes wrong on a medicine box
We covered the general causes in Pharma Barcodes Acting Up. For pharmacies and warehouses in the Gulf, these are the ones to plan for:
- Small codes on small cartons. A Data Matrix on a small pack takes up very little space, so each square of the code covers only a few camera pixels. Moving closer helps until the camera loses focus, and then it makes things worse.
- Glossy and curved packaging. Lacquer, foil, bottles and blister sleeves throw glare into the camera or bend the code out of shape. Tilting the phone usually fixes it, but a pharmacist with a queue won't do that on every scan. barKoder's segment decoding is built for distorted codes.
- Damaged or dirty labels. Boxes get handled, shelved and wiped. A code can lose some of its squares and still hold enough data to decode, if the engine is built for it.
- Motion and low light. Staff scan while walking, in rooms that aren't bright. Why Barcode Scanning Fails explains how blur, light and focus affect a scan.
- Dozens of packs in one view. Receiving a delivery fills the frame with codes. Reading all of them, or only the one you want, saves a lot of repeat scans.
- Weak connections in storerooms. Scanning in barKoder runs on the device, so the camera keeps working. Sending the result to the national system is a separate step for your backend.
- Mid-range phones. Counter and warehouse devices are often not flagships. Test on the ones your users actually carry.
How to test before launch
A scanner that reads clean sample packs tells you very little. Test it the way your users will use it:
- Collect real packs. Get 40 to 50 from the market you're building for, from different manufacturers. Include the smallest cartons and the glossiest foils.
- Use the phones your users own. Take one recent model, one mid-range and one older one.
- Test in the real places. Try the counter lighting, a dim storeroom, a spot near a window, and a hand that is moving.
- Record two numbers. Count how many packs scan, and time the first successful scan.
- Check the parsed fields. For every pack that scans, compare the GTIN, expiry, batch and serial with the printed text.
- Repeat after every update. Run the same pack set again whenever you update the SDK or the app.
For a first look, the barKoder demo apps and the printable testing sheet let you scan a range of 1D and 2D codes on your own phone. The free trial covers up to 25 devices with unlimited scans, and needs no credit card.
A checklist before you ship
- Enable Data Matrix, plus only the other barcode types your app really needs.
- Parse the GS1 fields instead of slicing the string, and handle variable-length fields and the separator.
- Check the GTIN check digit and the expiry date before accepting a scan.
- Offer manual entry of the printed values for codes that won't scan.
- Keep scanning and reporting in separate layers. Build the reporting to NHRA-MVC or Tataboo in your backend, to each authority's own specification.
- Test with real packs from the Bahraini and Qatari markets, glossy ones included.
- Re-read the current circulars before launch, because deadlines and scope can change.
barKoder reads the barcodes. It doesn't connect to NHRA or Ministry of Public Health systems, and nothing in this post means an authority has approved any scanner.
One scanning layer for several markets
The information in the code is the same as what Qatar requests, and Saudi Arabia and the United Arab Emirates already have national medicine tracking systems in place. Thus, in all of these markets, a scanning layer that parses GTIN, serial, batch, and expiry is effective. The reporting aspect is different. Every nation has its own system and regulations; according to TraceLink, Bahrain and the United Arab Emirates both use EPCIS-based systems, but they report in different ways. You only need to rewrite the reporting portion when you enter a new market if you keep the two layers separate.
2D codes are also heading for retail packaging under GS1 Sunrise 2027. Our post Get Ready for GS1 Sunrise 2027 covers that side.

Sources
- MOPH mandates medicine tracking system across pharmaceutical supply chain, Marhaba Qatar
- Qatar national medicine track-and-trace mandate, US International Trade Administration
- MoPH, QDB initiative to bolster Qatar's pharma supply chains, Qatar Tribune, 25 March 2024
- Circular No. (30) 2022, Use of the NHRA-MVC Traceability Hub, NHRA Bahrain
Frequently Asked Questions
Both Bahrain and Qatar mandate that all pharmaceutical products carry a GS1 2D Data Matrix barcode on every unit pack. The 2D barcode must encode four key data elements:
- GTIN (Global Trade Item Number)
- Expiration Date (YYMMDD format)
- Batch or Lot Number
- Unique Serial Number
Bahrain’s National Health Regulatory Authority (NHRA) has enforced full 2D scanning and reporting via the NHRA-MVC Traceability Hub since mid-2022. Qatar’s Ministry of Public Health established a national track-and-trace system called Tataboo, giving pharmaceutical supply chain entities a one-year compliance window starting June 18, 2026.
While both systems require the exact same GS1 2D Data Matrix data model on individual medicine packs, their implementation timelines and central reporting backends differ:
- Bahrain (NHRA-MVC): Fully active since 2022. Manufacturers, distributors, and pharmacies report barcode scans directly to the central NHRA-MVC Traceability Hub run by rfXcel and MVC.
- Qatar (Tataboo): Launched under Ministerial Decision No. 26 of 2026, setting a compliance deadline around mid-2027. Supply chain stakeholders report to Qatar’s national Tataboo platform.
Because data elements are identical across GCC nations (including Saudi Arabia and UAE), developers can build a single, unified scanning and parsing layer while keeping market-specific reporting logic in the backend.
A GS1 2D Data Matrix barcode on a medicine carton combines four data fields into a single encoded string, separated by GS1 Application Identifiers (AIs):
- GTIN (AI 01): 14-digit product identifier
- Expiry Date (AI 17): 6-digit expiration date in
YYMMDDformat - Batch/Lot Number (AI 10): Variable-length alphanumeric code
- Serial Number (AI 21): Variable-length unique pack identifier
When parsing these strings in mobile apps, variable-length fields (like batch and serial numbers) end with an ASCII 29 group separator (GS) unless they appear last in the code sequence.
Mobile barcode scanning in healthcare environments commonly fails due to six main factors:
- Tiny Barcode Size: Small pill boxes limit barcode dimensions, reducing pixel resolution when scanned up close.
- Glare and Curved Packaging: Glossy foil, blister packs, and round medicine bottles create lighting glare and curved distortions.
- Damaged or Wiped Labels: Physical handling, rubbing, and chemical wipe-downs obscure printed barcode elements.
- Poor Storeroom Lighting & Camera Blur: Motion blur from fast-moving staff combined with dim warehouse light degrades image focus.
- Multiple Barcodes in Frame: Receiving docks present dozens of barcodes at once, requiring multi-scan capability.
- Low-End Hardware: Non-flagship mobile devices used in retail pharmacies may struggle with fast autofocus or low-light processing.
Before launching a barcode scanning app for pharmaceutical compliance in the Gulf region, developers should complete this test plan:
- Parse GS1 Fields Properly: Use a dedicated GS1 parser to process variable-length fields, check digits, and ASCII separators instead of static string slicing.
- Validate Check Digits & Dates: Automatically verify the GTIN check digit and flag expired medication dates before registering a scan.
- Provide Manual Fallback: Allow staff to manually enter human-readable printed text when a code is physically damaged beyond recognition.
- Separate Scanning from Reporting: Run fast, on-device barcode parsing locally on the phone, sending reporting data to NHRA-MVC or Tataboo via background API calls.
- Test on Real Market Packs: Gather 40–50 actual pharmaceutical samples from Bahrain and Qatar across budget, mid-range, and older smartphones under varying lighting conditions.


