Case Study Industry: Pharmaceuticals

Pharma Serialization & Track-and-Trace

Key Business Outcomes

100% DSCSA Compliance

Passed FDA audits with flawless electronic Track-and-Trace capabilities.

400 Bottles / Minute

Achieved maximum packaging line speed with zero software bottlenecks.

Zero Manual Data Entry

Automated the generation and transmission of EPCIS XML documents to all supply chain partners.

The Challenge

A tier-1 generic pharmaceutical manufacturer was facing an imminent compliance deadline for the US Drug Supply Chain Security Act (DSCSA).

The mandate required them to uniquely serialize every single pill bottle, track its aggregation into cases and pallets, and share that data electronically (EPCIS) with wholesale distributors. Their legacy ERP could not handle the massive volume of data—printing and verifying 400 unique 2D datamatrix barcodes per minute on the high-speed packaging line caused the database to lock up, literally halting factory production. Furthermore, they had no way to electronically transmit the complex XML data to their supply chain partners.

Our Technical Solution

Vanavya Tech engineered a custom, high-speed Serialization and Level 3 Site Management system specifically designed for pharma compliance.

We decoupled the serialization engine from their legacy ERP. We built a blazing-fast backend using Rust, which communicates directly with the factory's Cognex vision cameras and Videojet printers on the packaging line. When a bottle gets printed, the camera scans it, and our software commits the serial number to a highly partitioned Cassandra database in under 20 milliseconds, ensuring the line never stops.

We also built a custom Aggregation App for the warehouse. Using rugged Zebra Android scanners, workers scan a barcode on a pallet, and the software instantly associates all 5,000 unique pill bottles inside that pallet into a digital parent-child hierarchy. Finally, an automated EDI/EPCIS module generates the required regulatory XML files and securely transmits them to distributors via AS2 protocols the moment a truck leaves the dock.

System Architecture

graph TD; A[Packaging Line Printers] -->|Serial Request| B{Rust High-Speed API}; B -->|Issue Serial #| A; C[Vision Cameras] -->|Verify Barcode| B; B -->|Commit to DB| D[(Cassandra DB)]; E[Zebra Scanner (Warehouse)] -->|Scan Pallet| F[Node.js Aggregation API]; F -.->|Link Child to Parent| D; D --> G[EPCIS Generation Engine]; G -->|XML over AS2| H[Wholesale Distributors];

Technical FAQs

Why use Rust instead of Java or C# for the backend?

Packaging lines move incredibly fast. If the software takes 100 milliseconds to verify a barcode, the physical bottle has already moved past the rejection arm on the conveyor belt. Rust provides the memory safety of high-level languages but with the bare-metal speed of C/C++, allowing us to achieve sub-20ms database commits.

How does the system handle "de-aggregation" (removing a bottle from a case)?

If a QA worker needs to pull one bottle out of a sealed case for testing, they scan the bottle with the Android app and press "De-aggregate." The software automatically breaks the parent-child link in the database, ensuring the distributor doesn't receive a manifest claiming 100 bottles when the case only has 99.