12 month warranty Request a Quote Technical Support
Sign In

How Pharmaceutical Serialization and Aggregation Works: From Unit-Level Coding to Pallet-Level Traceability

Aug 26, 2026
KY Automation
Industry Solution
Contents [hide]

    A pharmaceutical packaging line producing 400 cartons per minute must serialize every unit — print a unique 2D DataMatrix code, verify it with a camera, and upload that serial number to a government database — without slowing the line by a single carton. And then it must do the same for the case those cartons go into, and the pallet the cases sit on, all while maintaining an unbroken parent-child data chain from the individual pill bottle to the truck at the loading dock. This is pharmaceutical serialization and aggregation — a regulatory requirement under the U.S. Drug Supply Chain Security Act (DSCSA) and the EU Falsified Medicines Directive (FMD) — and it is as much a data management challenge as it is a printing and vision inspection challenge.

    Level 1: Unit-Level Serialization

    The serial number is born at the unit level — the individual carton, bottle, or blister pack that reaches the patient. A thermal inkjet or laser coder prints a unique GS1-compliant identifier on each unit: a Global Trade Item Number (GTIN) plus a serial number, typically encoded in a 2D DataMatrix symbol and accompanied by human-readable text (expiry date, batch number, serial number). The serial number is generated by the site's serialization server — not by the printer — and is guaranteed globally unique across all products from that manufacturer.

    Immediately after printing, a vision inspection camera captures an image of the DataMatrix code and verifies three things: (1) the code is physically printed and present, (2) the decoded data matches the expected serial number (print-grade verification, not just readability), and (3) the code quality meets ISO/IEC 15415 grading standards — typically a minimum grade of C (1.5) for DataMatrix codes in pharmaceutical use. Any unit that fails verification is rejected from the line by a pneumatic eject gate within 50–100 ms of the camera trigger. At 400 cartons per minute, that is one unit every 150 ms — the vision system, the verification algorithm, and the eject mechanism must collectively complete the inspection cycle in under 100 ms to stay in pace.

    Level 2: Carton and Case Aggregation

    Aggregation is the process of linking child serial numbers to a parent container. When serialized cartons are packed into a case, a second camera or barcode scanner reads the serial number of every carton entering the case and reports those child serial numbers to the serialization server. The server generates a new unique serial number for the case, prints a case label with its own DataMatrix code, and creates a database record that says: "Case XYZ contains cartons A, B, C, ..., N." This parent-child relationship is stored permanently — it is what allows a pharmacist to scan one case label and instantly retrieve every unit serial number inside without opening the case.

    The challenging part is bundle aggregation, where multiple units are packed simultaneously (e.g., 24 cartons dropped into a case in one motion). The vision system must read 24 DataMatrix codes in a single field of view — a task that requires area-scan cameras with multi-megapixel resolution and code-reading algorithms that can decode dozens of codes in a single image frame. The read rate must exceed 99.9% to avoid manual rework stations, where an operator hand-scans any carton the camera missed and manually links it to the case in the serialization software.

    Level 3: Pallet Aggregation and the Data Hierarchy

    The top level of aggregation is the pallet. A pallet label carries its own unique serial number, and the serialization server records that pallet as the parent of all cases stacked on it. The full data hierarchy — pallet → cases → cartons → units — forms a tree structure that can be traversed in either direction. A downstream wholesaler scans the pallet label at receiving and instantly knows every serial number on the pallet without opening a single case. A pharmacist scans a single carton and — through a national database query — can trace it all the way back to the pallet it shipped on, the case it was packed in, and the manufacturing batch that produced it.

    This data hierarchy is maintained in the manufacturer's serialization repository and, depending on the regulatory regime, uploaded to a national or regional verification system — the U.S. DSCSA interoperable electronic system, the EU European Medicines Verification System (EMVS), or similar national hubs in Russia (Chestny ZNAK), China, Brazil, and other markets with serialization mandates.

    The Serialization Software Stack

    Behind the cameras and printers is a multi-layer software architecture. The line-level serialization controller (typically an industrial PC or embedded controller) manages the real-time print-verify-reject cycle on a single packaging line, communicating directly with the printers, cameras, and eject gates at sub-100-ms latency. It requests serial number blocks from the site-level serialization server, which manages the pool of unique serial numbers allocated to that manufacturing site and handles parent-child aggregation records. The site server synchronizes with the enterprise-level repository, which connects to national verification systems and provides the interface for regulatory audits and supply-chain queries.

    The performance bottleneck is rarely the printer or the camera — it is the database transaction time for the aggregation record. Creating a parent-child relationship for 24 cartons packed into one case requires 25 database writes (one per carton, one for the case) that must complete before the next case arrives — typically within 2–3 seconds at line speed. The serialization database must be architected for high-frequency write operations, not the read-heavy workload of a typical enterprise ERP system.

    Compliance and Inspection

    Beyond the serialization itself, regulatory compliance requires that the manufacturer demonstrate traceability through periodic audits. A serialization system must be able to answer, within 24 hours, a query like: "For batch B7890, provide the full pallet-to-unit aggregation tree and the current disposition of every unit." This is not a production data query — it is a regulatory investigation query, and failure to respond within the prescribed timeframe can result in product quarantine or license suspension.

    The vision inspection systems used in pharmaceutical serialization — such as those built around industrial vision sensors — must maintain an audit log of every code read, every verification result, and every reject event, time-stamped to millisecond resolution and stored for the regulatory retention period (typically 5–7 years depending on the market).

    Serialization is not a printing project or a vision project — it is a data integrity project that happens to use printers and cameras. The system that tracks one billion unique serial numbers across five packaging lines and three distribution centers is the real engineering challenge.
    Contents