Five common errors in pharma serialization codes and how to catch them on the line
Missing separators, wrong check digits, date format mix-ups, duplicate serial numbers and disallowed characters: the most frequent errors in pharma DataMatrix codes and how to prevent each one on the line.
The code on a medicine pack is more than a barcode: it carries the product identity, serial number, expiration date and batch in a single symbol. If any of these four fields is wrong, the pack causes trouble in shipping, at the pharmacy or in the regulatory report — whether that is Türkiye's ITS or the EU's FMD system. The errors below are the ones we see most often in the field; all of them can be caught at the start of the line by reading every printed code and parsing it field by field.
1. A missing separator after the serial number
In a GS1 code the GTIN (01) and the expiration date (17) have a fixed length, while the serial number (21) and the batch (10) are variable-length. Unless a variable field comes last, it must be followed by a separator (FNC1, ASCII 29). Without it, the scanner reads the date and batch that follow as part of the serial number. The code is printed and read — but read wrongly.
Prevention: fix the field order in the printer template; the verification camera should parse the printed content field by field instead of only checking "read / not read".
2. A GTIN with a wrong check digit
The last digit of a GTIN is a check digit computed from the others. A GTIN typed into master data by hand, or converted incorrectly from 13 to 14 digits, is printed wrongly on every pack on the line. Because the error starts in the data, not in the symbol, the camera reports "read" while the code is invalid.
Prevention: software should validate the check digit when the GTIN is entered into master data and when a work order is opened.
3. Date format confusion
The expiration date uses YYMMDD: year, month, day. A date entered out of DD.MM.YY habit can turn into a valid but wrong date in the symbol. Day "00" means the last day of the month, which causes inconsistencies between systems that do not handle it explicitly.
Prevention: take the date automatically from the work order instead of having operators type it; read the printed date back and compare it with the work order.
4. Duplicate serial numbers
The same serial number printed on two packs usually happens when a line is restarted or two lines share the same number pool. A duplicate code causes problems in reporting and breaks the traceability of the product in the field.
Prevention: serial numbers should come from a central, collision-free generator; printed and rejected numbers should be recorded permanently and never reused.
5. Characters outside the character set
GS1 alphanumeric fields use a limited character set: accented letters and spaces are not part of it. An accented letter or a space in a batch number violates the GS1 rules; depending on the scanner and system, the code is rejected or misread.
Prevention: define the batch and serial number format as a rule in master data and check it when the work order is opened.
Quick check
You can check the content of a code taken from the line in your browser with our GS1 barcode decoder: it splits the fields, validates the check digit and the date, and checks that the four serialization fields are present. The lasting fix is to run these checks on the line itself, for every pack.
Let's discuss this for your plant
More notes
All notes →- 3 min readMTBF, MTTR and availability: three numbers, three different questionsMTBF says how often a machine fails, MTTR how quickly it comes back, availability what share of the time the line can produce. We calculate all three from one example, show which decision each one supports, and list the four most common mistakes.
- 3 min readBearing life L10: what it says and what it does not, with load, speed and reliabilityFrom the catalogue dynamic load rating to the basic rating life, then to the reliability and operating-condition adjustment: we calculate a bearing's expected life step by step, show why a small increase in load shortens life so much, and list the questions L10 does not answer.
- 3 min readPareto of downtime causes: 80/20 is not a law, it is a starting pointWe rank one month of downtime records by cause and work out the cumulative share. The example deliberately does not follow 80/20: five of eight causes make up 86.7% of the total. We show how to choose the threshold, how record quality distorts the result, and what comes after Pareto.