Pharma FMD/DSCSA serialization with AI — one badly aggregated serial is a pallet held at the border.

The Falsified Medicines Directive requires every pack to be serialized. iLEAN covers serialization + aggregation + reporting to the EU Hub (and to DSCSA in the US) on a single platform, without scrapping your lines or duplicating your product master data. The person signs — the agent does not seal on its own.

← See all pharma solutions

Pharma packaging line with an Edge camera reading the DataMatrix on every pack, a pallet aggregation terminal and an operator validating — FMD serialization with AI
The problem

Serializing is the easy part. Aggregating to the pallet with everything adding up is where the system breaks.

FMD was signed a decade ago and most pharma plants already print and verify the DataMatrix on the individual pack. But the production director's reality is uglier than the theory:

  1. Broken aggregation — the pack is fine, but while building bundle → master case → pallet, one code is misread, another is duplicated, another is left on the conveyor and nobody associates it. The pallet ships with an incomplete tree and falls over on arrival.
  2. Delayed reporting — the connection to the EU Hub (or to the national repository, SEVeM in Spain) drops, the system queues events, and by the time the network is back the pack is already invoiced but not commissioned. The distributor scans it, finds no active serial, and returns the batch.
  3. Multi-market by hand — Brazil, Russia, Saudi Arabia, the US: every national repository with its own scheme. The IT team lives on custom developments that break with every regulatory change.

The quality assurance manager knows it perfectly well: a correctly serialized pack on a badly aggregated pallet ends the same way — the batch does not sell and the notice goes to the regulator. What kills the system today is not the code, it is the coordination between the six places where the data lives.

How it fits the IRIS system

iLEAN does not add a seventh system — it seals the cracks between the line, the MES, the ERP and the EU Hub.

The problem with serialization is not a lack of technology: there are printers, there are cameras, there is middleware. The problem is that the information lives on six islands that do not talk to each other and, at the critical moment (the SKU changeover, palletizing at the end of the shift, the EU Hub going down on a Friday at 10 p.m.), something falls through the crack. iLEAN acts as the putty that covers that dead zone without asking you to change your MES, your ERP or the lines you already have running.

Tracer assigns and safeguards the serial. Vision reads every level of the pyramid. Writer notifies the EU Hub, DSCSA and whichever repository the market requires. The agent cross-references and holds when something does not add up. The person signs.

The three iLEAN pieces applied to pharma serialization:

  • iLEAN Tracer — the identity engine. It assigns serials against GS1 and safeguards them with the full tree (pack ↔ bundle ↔ master case ↔ pallet). At any moment it knows which serial is active, commissioned, decommissioned or in transit.
  • iLEAN Vision (Edge) — machine-vision terminals (CNN) at every aggregation station. They read the DataMatrix on the pack, the bundle, the master case and the pallet in milliseconds, and trigger the actuator if anything does not match the expected tree. It works with no network: if the WiFi drops, Vision keeps reading and holding. What is critical cannot depend on connectivity.
  • iLEAN Writer — the multi-market reporting engine. It generates EMVS messages (commission/decommission), EPCIS for DSCSA, ANVISA for Brazil, Chestny ZNAK for Russia. Adding a market is configuration, not development. If the national repository goes down, events are stored signed and resent as soon as it is back.

See the full IRIS architecture →

Before and after

Classic serialization vs. serialization with iLEAN Tracer + Vision + Writer

AspectClassic serialization (middleware + middleware + middleware)With iLEAN Tracer + Vision + Writer
Serial assignmentMaster data duplicated across MES, ERP and serializationA single identity in Tracer; everything else consumes, it does not copy
Pallet aggregationOperator with a handheld scanner, errors at shift changeVision reads every level; holds before sealing if the tree does not add up
Reporting to the EU HubBatch by batch, manual or overnight; manual retry if it dropsAt second zero, signed; automatic retry after a Hub outage
Multi-market (Brazil/Russia/Saudi Arabia)Custom development per market, fragileTemplate configuration; adding a market = one day
Network outage during palletizingThe line stopsVision and Tracer keep running locally; they sync when it is back
File for the AEMPS/EMA inspectorRebuild it by hand across several systems, daysAutomatic batch dossier, with an image and fingerprint of every level
Impact estimate

Impact estimate for your plant — to be validated with your numbers.

The block below is an estimate to be validated with the specific data of your plant. We put it forward so the committee has an order of magnitude; we refine it during the diagnostic.

  • Mid-sized pharma plant, 3 packaging lines for oral solids in blister/carton, serialization at pack level already installed but with recurring problems in pallet aggregation and EU Hub reporting.
  • Deployment of iLEAN Vision over the aggregation stations + Tracer as the identity layer + Writer toward the EU Hub/SEVeM. First value expected within a few weeks: reliable aggregation on one pilot line.
  • Indicative payback between 4 and 9 months, depending on how often pallets are currently held in distribution and the average cost of each hold (product immobilized, reverse transport, relabeling rework).
  • Expected reduction in aggregation non-conformity events of ≥ 30% on the pilot line, based on the pattern seen in other sectors with Edge vision over the conveyor.
  • The hard lever is a single batch released on time into a high-margin export market. One hold avoided pays for a good part of the pilot.

And the QA director's reasonable doubt

“What if the AI invents a serial or assigns it wrong?” — hallucination is a problem of free generation, not of anchored tasks. In tasks where the AI merely reads a code and verifies it against the master data (which is what Vision does with a DataMatrix), the best models brought error below 1.5% [1]. And even so, the three-ring architecture guarantees that what is critical is never done alone: Vision reads, Tracer safeguards, the agent proposes, the person signs. The pharma quality standard is in the same order of magnitude as automotive — 25 PPM [2] — and it is reached with human-machine jidoka, not with a dark factory.

[1] OpenAI paper “Why Language Models Hallucinate”, 2025 — on the reliability of AI in anchored tasks. [2] Symestic, automotive quality standard (25 PPM).

Frequently asked

What people ask about FMD/DSCSA serialization with AI

What exactly do FMD/DSCSA require?

Directive 2011/62/EU (FMD) and its delegated regulation 2016/161 require every individual pack of prescription medicine in the EU to be serialized with a unique identifier (GTIN + serial number + batch + expiry date) and reported to the EU Hub (EMVS), which pushes it down to the national repositories (in Spain, SEVeM). In the US, DSCSA requires end-to-end electronic traceability at the same level of detail. iLEAN covers both frameworks with a single engine: what differs is the message format, not the plant data.

How does it aggregate to the pallet?

Aggregation is the parent-child relationship between the individual pack, the bundle, the master case and the pallet — the whole hierarchical pyramid that lets you know, by reading a single code on the pallet, which serials are inside. iLEAN Vision reads the DataMatrix codes at every palletizing step (pack → bundle, bundle → master case, master case → pallet) and builds the tree in real time. If a code is missing or duplicated, it holds the operation before the pallet is sealed. The person signs; the agent does not seal on its own.

How does it report to the EU Hub?

iLEAN Writer generates the messages in the formats the EMVS requires (commission, decommission, etc.) and sends them to the EU Hub over a secure connection. The same goes for DSCSA (EPCIS 1.2). The reporting module runs in sync with the serialization engine, so a pack is never invoiced or shipped without its serial being effectively commissioned in the corresponding national repository. If the connection drops, the events are stored signed and resent as soon as it is back — no pack is left orphaned.

Does it work with existing lines?

Yes. iLEAN is designed to sit on top of the infrastructure you already have: if you already run thermal printers, vision cameras and rejectors, we integrate them. If you have a line with nothing on it, we bring the hardware. The same goes for your MES/ERP (SAP, Oracle, a pharma-specific vertical): we connect wherever there is an API, and where there is none, we read via OPC, OCR or whatever plant reality dictates. The putty between the systems you already have — not their replacement.

What about emerging markets?

Every emerging market has its own scheme (Brazil ANVISA, Russia Chestny ZNAK, Saudi Arabia SFDA, and so on) and usually requires its own message format and a different national repository. iLEAN Writer is an engine with templates configurable per market: adding a destination is configuration, not development. The plant data is the same; what changes is the envelope it is sent in.

Let's talk

Tell us about your case and in 48h we'll send you the estimated ROI of this AI serialization project for your pharma plant.

We work on your plant's real data, not ours. Diagnostic with no commitment.

Request estimated ROI in 48h See pharma