# A Non-Fungible Token Solution for the Track and Trace of Pharmaceutical Supply Chain
## 3 Track and Trace and Serialization Process of a Pharmaceutical Factory
### Serialization Manufacturing Technology  
Among different countries, there can be differences in the serialization rules; therefore, in order to implement the correct pharmaceutical serialization, the producer has to adopt the correct serialization format when printing and applying the QR code on the packages where the product has to be commercialized. While the GLN is uniquely assigned to the producer industry and the GTIN is assigned to a specific product, the other information needed to create a QR code are dynamic and vary according to the batch of production and the country of destination. Therefore, in order to complete the serialization process, the manufacturer has to rely on a complex process of production that, in the context of the pharmaceutical producers, brings us to a production infrastructure made up of five technological levels, as shown in Figure 4.  
Figure 3: GS1 QR codes for the serialization standard in Europe and the U.S. The industry equipment cooperates together at the various levels of the production process, allowing the automation of the packaging lines, which are generated as output pallets that aggregate a list of case boxes and unit boxes. The organization of the pallet is stored in the ERP system, which can be easily queried to identify the serial numbers characterizing each item. At the enterprise level (Level 4), the ERP and the serialization system communicate to exchange information about the next lot of products to schedule. This information is crucial to informing the equipment of Level 1 and Level 2 about Level 1, which communicate with each other and are controlled by the MES and/or the ERP. The cyber-physical systems that constitute the smart production and packaging lines are thus monitored by a real-time vision system that interacts with the other software (such as the ERP and MES), which are in charge of scheduling the lots of products to process according to a production plan. The packaging phase is one of the most critical because if the QR code applied at the various package levels is not printed in the correct way, the item has to be discarded. Therefore, Level 4 instructs the printer of Level 2 and Level 1 to correctly set up the format of the QR code and the serialization numbers to apply to the packages. As previously stated, traceability requires a unique code for each package; this information has to be readable along the entire supply chain lifecycle. During packaging, it is necessary to check the quality of the QR codes printed on the packaging in order to guarantee that the items are correctly labelled. Therefore, the serialization solution requires the integration of a real-time vision system able to monitor the process and to communicate with the other software of the serialization infrastructure (such as the ERP and MES) and with the packaging lines. This way, if the label of a serial number that characterizes a specific box unit is not correctly printed, it is automatically discarded. Another important function of the vision system is to control the aggregation requirement to guarantee that the hierarchical packaging performed by the packaging lines is correctly handled. In other words, the vision system keeps track of the boxes that have been placed into each case and the cases that have been placed into each unit load. As soon the last level of packaging has ended (generally corresponding with the lot unit load), the serialization software sends the hierarchy matrix list to the ERP, which closes the work order and commences the beginning of the next phases (storage, batch release, and delivery and shipping). During the batch release, the serialization software sends the official hierarchy  
Figure 4: Architecture of the information system for the serialization process. matrix list to the central regulatory (EMVO); it has to be stored permanently in the database of the serialization software.