Introduction

Pharmaceutical manufacturing is an area with high regulation and precise quality control of drug products. There are initiatives in place for advanced manufacturing technologies to be utilized in the pharmaceutical industry [1]. This requires the regulatory constraints to be applied in new ways to these manufacturing practices. Primary focus is on advancement of continuous pharmaceutical manufacturing. For patient safety and regulatory perspectives, the history of each pharmaceutical product should be known and traceable so that the products can be recalled if needed. This is straightforward for batch pharmaceutical manufacturing since each batch of raw materials produces a corresponding batch of final product. However, in continuous pharmaceutical manufacturing, establishing a historical relationship between the raw materials and finished product is a challenging task and thereby the product recalls are currently difficult. Therefore, a systematic framework including the methods and tools are needed through which the pharmaceutical products manufactured in continuous process can be traced back to the raw materials.

There have been recent developments in real-time process analytical technology (PAT) and process modeling to monitor and understand the continuous manufacturing process. To overcome challenges in real-time critical quality attribute (CQA) assurance, advanced control strategies have been implemented [2]. Further understanding of particulate systems is also being developed for applications about continuous powder feeding, which is required for robustness of continuous manufacturing process [3]. Another challenge, which must be addressed for continuous processes, is the traceability of raw materials in the final products. As per regulatory guidelines, “the failure of a batch of any of its components to meet any specifications shall be thoroughly investigated, whether or not the batch has been already distributed” [4]. This requires that each component in the formulation should have associated batch number from manufacturer. Every tablet lot and batch should have an associated record of each component’s specific batch information to maintain material traceability should any component fail to meet specification and an investigation finds recall is required. If recall is required, knowing which tablet batches and lots within the batch contain the affected component would allow exact affected tablets to be recalled, no more and no less.

Thus far, there has been a focus on part production and batch production. Traceability in these processes is easier to accomplish in comparison to continuous processes. There is a lack of scientific literature on traceability in continuous processes, especially in application of pharmaceutical manufacturing. The literature present addresses challenges in the diary, food, mining, and pulp industries. Lundqvist and Kubulnieks focuses on traceability applied to the chemical pulp mill operation, creating a system with operator interaction and feedback and prediction of process performance to improve operator’s modifications [5]. While this would be a useful and applicable strategy in the pharmaceutical industry, there is less flexibility with operator making changes to the process. Quality is of utmost importance in pharmaceutical manufacturing and tolerances much smaller as compared to pulp mill operations. Therefore, operator modifications to the process are much less frequent. In pulp processing, the residence time distribution (RTD) is on scale of days, not minutes or seconds, therefore the accuracy and experimental considerations of RTD are not addressed in this work, which would be required for applications in the pharmaceutical industry. Moe introduced the advantages of internal traceability within manufacturing step in the supply chain, such as improved process control, correlation or process data to raw materials, and the cause and effect indications for non-conforming product [6]. However, the details of implementing, such a strategy, are not discussed, especially the method of RTD for internal traceability, which is of utmost importance for applications of traceability in continuous pharmaceutical manufacturing. Mousavi et al. focuses on the standardization and automation strategies essential for supply chain tracking in animal products [7]. This system however fails to utilize traceability within manufacturing steps and the use of RTD. Jansen-Vullers et al. describe the accurate managing of traceability information through a systematic framework [8]. However, implementation of RTD methodology for in-process traceability of raw materials, an essential piece for material traceability in the pharmaceutical industry, is not addressed. Folinas et al. describe data management framework for food supply chain operation using conventional technologies, such as internet, email, and cell-phones [9]. However, this framework does not address use of RTD in traceability framework, which is necessary for implementation for continuous manufacturing traceability. Finally, Kvarnström and Oghazi discuss traceability in continuous processes and the use of RTD [10]. However, this work describes the various methods and does not present a framework in which RTD can be used for traceability. There is no discussion on what information is extracted from RTD or how that information is used for material traceability. Therefore, a systematic material traceability framework is needed that can be efficiently applied to continuous pharmaceutical manufacturing process. The work presented in this manuscript provides a solution for implementation of material traceability in continuous manufacturing, specifically for pharmaceuticals.

One strategy for material tracing in a process is using the RTD, which describes how material moves through continuous unit operations [10, 11]. By conducting tracer experiments using a pulse or step change of detectable material at the inlet, the response of the tracer at the outlet can be measured [12]. The amount of time it takes for tracer to first be detected at the outlet, as well as the time it takes for clearance of the tracer material provide valuable information for material traceability. RTD is a well-established technique and extensively has been used to characterize manufacturing processes. However, much less attention has been paid to employing the RTD concept for material traceability in continuous pharmaceutical manufacturing applications.

In this work, we developed a systematic framework for implementing material traceability in direct compression continuous tablet manufacturing process using the principles of residence time of the entire continuous line. A systematic framework is necessary for material traceability to ensure that this methodology is implemented properly. Because material traceability is not able to be verified during production, there must be certainty that all considerations and factors that influence the accuracy and implementation are understood. In this manuscript, the term “material traceability” is limited to the tracking of tablet component batch numbers to final drug product, not upstream synthesis steps nor supply chain distribution steps. A material traceability software prototype has also been developed. This work describes many of the considerations required for implementation of such a software tool with the continuous process monitoring and control software, to provide specifications necessary for U.S. Food and Drug Administration (FDA) compliance.

In the next part of the manuscript, the continuous manufacturing process referred to is described. Next, the batch and lot definition are defined and discussed. Then, the systematic material traceability framework is described. After, the considerations required for software development are detailed. Next, the material traceability software prototype has been developed and presented. The application of the framework has been demonstrated in a case study. Finally, a comprehensive discussion has been provided and the conclusions presented.

Continuous Manufacturing Process Description

The process considered for design of the material traceability implementation framework is a continuous direct compaction tablet manufacturing pilot plant situated at C-SOPS, Rutgers University, NJ, USA. Specifics of the plant have been previously described [13]. Extensive experimentation has been performed on the performance of this continuous line [14,15,16]. To add, recent advances in flowsheet modeling for process analysis and optimization have added valuable insight to the operation of this line [17, 18].

Figure 1 illustrates the flowsheet for the continuous direct compaction tablet manufacturing process. Three gravimetric feeders provide the necessary active pharmaceutical ingredient (API), excipient (EX), and lubricant to the system. The feeders manufactured by K-Tron contain a hopper that holds a specific amount of material and rotating screws below the hopper to feed the powder out of the barrel at specific rates. These feeds flow into a continuous blender manufactured by Glatt to create a more homogenous mixture of raw materials. The blended powder flows into the tablet press (Fette). Powder enters the feed frame within the tablet press and is finally compacted into tablets.

Fig. 1
figure 1

Configuration of unit operations used for demonstration of continuous direct compression tablet manufacturing process

Batch and Lot Definition

The following definitions are defined according to the Code of Federal Regulations Title 21 [4].

  • Batch: “specific quantity of drug or other material that is intended to have uniform character and quality, within specified limits, and is produced according to a single manufacturing order during the same cycle of manufacture.”

  • Lot: “batch, or a specific identified portion of a batch, having uniform character and quality within specified limits; or, in the case of a drug product produced by continuous process, it is a specific identified amount produced in a unit of time or quantity in a manner that assures its having uniform character and quality within specified limits.”

  • Lot number: “means any distinctive combination of letters, numbers, or symbols, or any combination of them, from which the complete history of the manufacture, processing, packing, holding, and distribution of a batch or lot of drug product or other material can be determined.”

In order to comply with the guidelines, set by the FDA with regard to defining “batch” and “lot” there is a specific way continuous manufacturing pharmaceutical drug product batches and lots can be defined. For commercial applications, where regulatory guidelines are mandatory, it is required to follow a manufacturing protocol [4]. This protocol defines validated operating conditions for the unit operations involved in manufacturing. This holds true for continuous manufacturing as well as the traditional batch processes. Each unit operation in the line would have a set of parameter ranges, which the parameter must operate within and usually there is a set point for each parameter to follow during production. If a production order follows this group of set points, as well as stays within the parameter ranges, then the product should have “uniform character and quality, within specified limits” due to reproducibility of the process at the same conditions. In continuous manufacturing, this can also be the case. If no change is made to operating conditions and the process is not interrupted, then the length of time which this is true would follow the definition of a “batch.”

In the case that one component of the formulation changes batch number, theoretically, the tablet quality should not change given that the process conditions are unchanged. However, for material traceability purposes, the tablets containing raw material from one batch and another need to be distinguished. This raw material batch change occurs during a single manufacturing order and with no changes to the process conditions, therefore is still the same batch. However, we can assign these tablets containing new raw material batch to a separate “lot,” within the current tablet batch. This would be a “specific identified portion of a batch” in which the tablets contain material from a raw material batch different from the previous lot. The idea is that, when tablets are released, with a specific batch number and lot number, it exactly traces to what raw material batches may be present in the tablet. By changing the lot based on raw material batch composition in the tablets, it can be certain, if recall was required for specific raw material batch, which lot of tablets must be recalled as well, without recalling the entire batch, many of which tablets contain none of the recalled raw material batch.

As illustrated in Fig. 2, if there was a change in raw material batch, the tablet lot number would increment once that new batch is predicted to reach the tablet. Tablets would be collected, knowing that raw material from both the old and new batch can be present in the tablet. Once it is predicted that all the old material has cleared from the line and none will be present in the tablets, a new lot number would be assigned to the tablets and collected separately from the other lots. That way, lots of tablets containing different raw material batch compositions will be known and their raw material make up will be logged.

Fig. 2
figure 2

Demonstration of concentration of new component (e.g., excipient) batch changes at the outlet of the system. At t = 0, the new batch of excipient is added to the feeder. 1, 2, 3: tablets lots. T1, T2: time to initiate new lots

As shown in Fig. 2, at t = 0, the new batch of one component (e.g., excipient) is added to the feeder. According to residence time experiments, we can predict that at t = T1, the new batch will begin to be present in the tablets. That defines the start of a new tablet lot, lot number 2, where both previous and new batches of excipient are present in the tablets. Then at t = T2, the previous batch of excipient has been entirely cleared from line and no longer present in tablets. Therefore, tablet lot is defined as lot number 3. The same concept will apply for the other components of formulation. The correlation between tablet lot number and batch number is given in Table 1.

Table 1 Correlation between tablet lot number and batch number as illustrated in Fig. 2

This strategy can be also applied to systems where multiple components are transitioning from previous batches to new batches as illustrated in Fig. 3. As shown in the figure, the excipient (e.g., lactose) refill occurs at t = 0 s. Then at t = 120 s, the API (e.g., acetaminophen) component refill occurs. At t = T1, the new batch of excipient is predicted to be present in the tablets, as well as the previous batch. At t = T2, the new batch of API is predicted to be present in the tablets, as well as the previous batch. At t = T3, the excipient previous batch is cleared from the continuous line, leaving tablets to contain only new batch. And at t = T4, the API previous batch is cleared from the continuous line, leavings tablets to contain only the new batch. Based on the time at which these events occur dictates when new tablet lots should be defined. The tablet lot definitions and compositions are described in Table 2. Similarly, the concept can be applied for multi-component formulations. The complexities in material traceability will increase as the number of components will increase. The change in batches can occurs in any order depending on formulation composition and feeder capacity. Therefore, a systematic software tool is needed to manage the complexities.

Fig. 3
figure 3

Tablet lot assignment based on concentration of new component batch. Excipient is transitioning from Excipient_Batch 1 to Excipient_Batch 2 and API is transitioning from API_Batch 1 to API_Batch 2. Excipient batch change initiated at t = 0. API batch change initiated at t = 120

Table 2 Correlation between tablet lot number and lactose and acetaminophen batch numbers as illustrated in Fig. 3

If there was a change in process set points outside of the range defined in the validated protocol, if a new manufacturing protocol was to begin to be followed, or if the production line stopped for any reason, that would signify a different batch of tablets. When raw material batches change, the lot would increment within the new batch of tablets. For the records, this naming system would allow batch records to still contain all process condition set points and ranges for that batch, and actual process variables can be compared to the protocol to ensure no deviation outside of the ranges.

Systematic Framework for Material Traceability

Many specific steps must be taken to integrate material traceability, as outlined in Fig. 4. There are three initial steps which must be completed in parallel. The first requirement is plant automation and communication between control hardware and software. This allows for process data storage, as well as communication between control software and material traceability tool. Another step is the creation of the feeder refill protocol to be followed during continuous operation of the feeders. This must be determined early in the framework since both RTD experiment and the process operation require reproducible refill results. Final step is finalization of formulation specifics, which includes what materials are used, the grade, and type of each component, as changes in this could affect RTD and material traceability.

Fig. 4
figure 4

Overview of proposed systematic framework for material traceability

The next step is to configure the continuous manufacturing line by determining each unit operation, specify the tooling to be in each piece of equipment and assemble the continuous line. This is critical because changes in any of these specifications will change the RTD for the process, leading to inaccurate traceability. Then, experiments are conducted to determine RTD of each component from moment of refill to outlet of process. The information extracted from the RTD is stored in a model library. Now, all the information and process decisions have been made to implement the material traceability methodology. And in executing this methodology, a log file is created defining the raw material batch numbers for each tablet lot.

In order to implement this framework for material traceability, there are a few conditions which must be met prior to operation during production. The first condition is that a protocol must be written detailing the feeder refill procedures. The accuracy and repeatability of this procedure are essential for creating consistent RTD models, as well as increasing accuracy of the RTD models’ parameters to the continuous production campaign where the models’ parameters will be implemented. The refill procedure must specify the size of feeder hopper on each feeder, as well as the point in which refill occurs. This information must be defined and standardized, so that RTD models accurately replicate conditions during continuous manufacturing process. In order to define the specific process attributes we are looking to get out of the model, the minimum residence time and maximum residence time, the RTD models must also be developed in a specific and consistent manner.

The goal of these RTD tracer experiments is to determine from the moment that a new batch is used to refill each feeder, how long it takes for that new material batch to make it into the tablet, as well as how long it takes for the old material batch to be cleared from the process. RTD models can be built by doing tracer experiments with a pulse of near-infrared (NIR) detectable material which has similar flow properties. Since the model will be applied to a “step” change of new batch of material, rather than a pulse, we propose that the RTD tracer experiments be performed with a step change. This will provide cumulative change data, rather than a RTD, but will better simulate the raw material batch change experienced during production. Using the empirical data for the tracer concentration over time, we will be able to determine the duration of time after refill occurs that the tracer is detected (minimum residence time), in addition to the time duration after which only tracer is present and all initial material has cleared (maximum residence time).

To conduct these RTD tracer experiments most effectively, there are a few specific details that must be understood and applied. First point to note is that each component in the formulation will have different residence time in the continuous line. Because different components having different flow properties, their hold up in their respective feeder will be different. In addition, some materials will be added to the process further downstream, therefore decreasing their residence time in the system. For example, lubricant is normally added after milling operation. Therefore, a tracer experiment must be performed for each component independently. Second point to note is that these RTD tracer experiments are formulation specific and depend on composition of the blend as it moves down the line. This means that each tracer experiment must be performed with the intended powder formulation used in production, powder substitutes should not be used for the other raw materials when RTD is being determined for one specific component. Third point to note is that these RTD experiments determine residence time attributes of the entire line. To validate the results from convolution of individual RTDs, an entire line experimental RTD must be conducted to prove that the models accurately predict behavior of the entire process. However, for the applications in material traceability, the minimum and maximum residence time values are the primary information extracted from RTD experiments. Such values can be gathered directly from an RTD experiment of the entire line and RTD models of the individual unit operations are not required. It also decreases the number of tracer experiments that need to be performed for each formulation. For example, with a continuous direct compression manufacturing line, as seen in Fig. 1, that has six unit operations—three feeders (one for each raw material), one co-mill, one continuous blender, and one tablet press—the number of experiments is greatly reduced from 11 individual unit operation tracer experiments down to three entire line tracer experiments. RTD for each unit operation and every component within each operation requires one RTD experiment per feeder, two experiments for the mill, three experiments for the blender, and tablet press, resulting in 11 RTD experiments to describe three components in this line. RTD of the entire line requires just three experiments, one per component. This methodology stores the tablet lot number in the control platform. Therefore, prior to running the production batch, the lot number signal must be configured to communicate between the material traceability tool and the control platform. This configuration can be done in a number of ways. One common communication protocol to send information between different pieces of software is through OLE process control (OPC) servers. The OPC server management software must be configured to pass the desired information through the network to the desired location.

Once these processes are completed offline prior to the production run, a material traceability tool can be utilized to trace composition of each tablet lot created during a production batch. This tool must be capable of logging the raw material batches for each tablet lot, as well as send the lot number via OPC to the control system at the correct time based on the residence time attributes. To accomplish these tasks, the program must allow the user to specify the residence time attributes for each component, as well as the number of raw material this specific formulation contains. It must also allow user to specify the batch number of the initial raw material drums. Then, it must allow for seamless changes of batches, creating new tablet lot and logging what material is present in each of the lots and send that information in real-time through OPC to the control system for data logging. The program for sending lot changes to the control system must be able to handle multiple changes in rapid succession, where multiple raw material components are “transitioning” between batches. And finally, it must provide the log to the user in an easy-to-read manner so that the material lot information can be included in the master batch record for that batch of tablets.

Residence Time Distribution Model Library

For the RTD models to accurately predict the appearance of the new raw material batch in the tablet, as well as the time delay for clearance of the previous raw material batch, models must be built for each formulation, and component within that formulation. Depending on the current design of the continuous tablet manufacturing line and the specific unit operations, the time delay values must be determined. When determining RTD models, the tooling of each unit operation should be exactly the same as to be used in production. Any change that could affect the flow properties of the powder blend will impact the RTD model. If there is a change in tooling of a continuous blender for example, or if a different type of blender is added, RTD determinations must be re-tested to determine the time delays of the entire line associated with the new equipment or tooling of existing equipment. Also, if there is a formulation with same components but different strength, new RTD models must be determined due to changes in feeding ratios. This could affect the RTD of each component; therefore, a new set of model parameters would be used and stored in the model library. Also, if the formulation is the same, but there is a change in tablet production rate, it would also affect the RTD parameters. So, for each combination of formulation and production rate present, specific RTD parameters must be determined.

There are many methods for determining the minimum and maximum residence time experimentally. One possible method would be to monitor tracer composition in tablet using PAT. Spectroscopy calibration model development for this formulation would be required to allow for real-time detection of tracer in tablets. This PAT instrument could be NIR, Raman, or microNIR, depending on the formulation and tracer. The limitation of this strategy is the limit of detection for low concentrations of tracer in the tablet. To avoid this limitation, it is also possible to analytically determine tracer concentration in tablets. A high-performance liquid chromatography (HPLC) method could be developed to detect much lower concentrations of tracer, increasing accuracy of minimum and maximum residence time attributes.

The steps involved in applying the RTD model for material traceability are systematically shown in Fig. 5. First, the refill protocol must be developed and followed for the experiments. Then, according to the manufacturing order, the production rate and formulation specifics must be applied. This means that each feeder must run at the correct production rate, and the specific components must all be used. The tracer is needed to perform an RTD experiment. Since each component has different properties, a tracer must be selected to match those properties and demonstrate the same flow behavior of each component. The continuous process is started, and then the tracer is added to the feeder according to the refill protocol as a step change. The minimum and maximum residence times for that component are then determined by detection of outlet tracer concentration. Then the line is reset and the process is repeated until residence time attributes for every component have been determined. These values are then added to the model library, which will be used by the material traceability tool.

Fig. 5
figure 5

Application of RTD model for material traceability

Supporting Software Tools

In order to implement real-time material traceability into continuous pharmaceutical tablet manufacturing, a suite of different software tools is required as shown in Fig. 6. The first is the utilization of a traditional programming language to interface with the user. This will allow user to enter the tablet batch name, select RTD model parameters, and make raw material batch changes during run-time. This could be MATLAB, python, Java, or any other language to design the user interface.

Fig. 6
figure 6

Hardware and software integration for material traceability

What is also needed is a plant automation system and control software. To track the tablet lot number, this value could be sent to the control software and stored like other plant process variables. That way, comparisons and trends could be observed in real-time as the tablet lots change based on the raw material batches they contain. This could be very useful if certain CQAs change in connection with a raw material batch change. For example, if fill depth in the tablet press is actuating more dramatically to control main compression force after a lot change, then we may be able to understand how that new raw material batch impacts the tablets when compared to the previous raw material batch.

Also required is OPC server management software. This allows signals to be communicated from one OPC server to another, namely the machine that is running the material traceability program and the server in the control system. This is extremely useful when communicating signals over a network between different devices. A client computer near the feeders could be running the material traceability program and initiating raw material batch changes. Then, the lot number signal can be sent via OPC to the computer that contains the controls software. This OPC server management software allows user to customize the OPC tags and addresses to allow this seamless communication to occur in real-time, accurately incrementing lot number changes as they are predicted to occur.

Systematic Algorithm for Material Traceability

A systematic algorithm for material traceability is shown in Fig. 7. As shown in the figure, the first step is to scan initial drums and select model from RTD model library. Then operation of the continuous line begins start-up phase, where all unit operations reach desired operating conditions. Then the start-up phase is completed and tablets are to be collected. The material traceability software tool is then started, and tablet lot number is initialized. When refill of one of component feeders occurs using a new batch, lot number is incremented according to residence time values for that feeder. This is continued until batch is complete, successfully tracing material batch number for each tablet lot.

Fig. 7
figure 7

Systematic algorithm for material traceability

Expandable Features/Future Add-Ons

Formulation Library

In a commercial setting, where many continuous batches of the same formulation are being run, it could be possible to create a formulation library, containing the material names and residence time minimum and maximum for each component at a certain production rate. That would ensure that material component names are correct and there is no operator error when entering residence time values. Once residence time maximum and minimum are validated for a certain plant for a certain formulation, the values could be added to the library.

Scanning of Raw Materials and Final Tablet Drums

To improve upon the efficiency of the system and limit the need for manual entry of new batch numbers into the program, raw material drums could contain radio frequency identification sensors (RFID) to transmit information to a materials database [19]. By scanning the passive tag with an RFID reader, batch information could be sent to the material batch queue. This would allow much more information about each raw material batch to be passed into the program, such as manufacturer name, location of manufacture, as well as flowability properties, like particle size, moisture content, and density measurements. And when it is time for the component’s new batch, operator could select from a list of scanned drums already put into the queue.

Once drums begin to be filled with tablets, the RFID tag on each drum could contain batch and lot information. The RFID reader is capable of writing information to the RFID tag, which would allow the tablet lot number and batch number written to a tag on a drum. As the RFID technology continues to improve, more information can be stored in the tag, besides just identification numbers [19].

Automation of Batch Refill

Another way to automate raw material tracing would be to initiate batch change when refill is detected. Because the control software is connected to the feeder in real-time, the software can read the signal of the net weight of the feeder. Prior to detection of a positive change in net weight, the operator would only need to specify which drum in the queue is soon to be refilled, and incrementation of the lot can initiate automatically.

Automation of Tablet Lot Collection

In the tablet press, the outlet chute can actuate a flap and change where the tablets are collected. This feature is often used for acceptance and rejection of tablets based on real-time measured critical process parameters (CPPs) and CQAs. This technology could also be utilized when a new tablet lot is defined, as predicted by the material traceability tool. The control software could simply detect a change in tablet lot number and actuate the chute to put tablets into the next container designated for the next lot. The design for this could manifest itself by using two flaps in series. Traditional tablet rejection and acceptance criteria control the first flap. Then the path for accepted tablets will have a second flap to direct tablets to appropriate lot container. The proposed system would have three tablet collection locations, one for rejections, one for current lot, and one for handling the previous lot and preparing for the next one. This would remove operator’s responsibility of switching the tablet container exactly when the new lot is defined, which would introduce a source of human error. This would greatly improve the operation of the line, especially with formulations with many different components refilling at different intervals over a longer production time.

Taking this concept further for automation of tablet collection, the drums could be arranged on a system of conveyor belts, moving the drums into position when appropriate and removing drums when they either are full or lot number has incremented. This would be most useful for production orders with many components and a high production rate.

Further Examination of Residence Time

The current method of determining residence time is dependent on the formulation and specific production rate. If there is a component change or change in production rate, the residence time experiments will need to be revalidated. Experimentation to better understanding of how production rate and component flowability properties affect the residence time values would decrease the amount of experimentation required for changes in formulation or production rate. If demand for product was increased, a prediction of the new residence time values would allow for increase in production rate to meet such a demand, without the need to experimentally determine residence time minimum and maximum values.

Software Development

The primary responsibility of the software is to handle information required for material traceability. The functionality of the software can be sorted into two areas: the initial configuration prior to production and run-time operation of the program. For initial configuration, each feeder must be assigned to a specific material. The residence time attributes associated with each feeder must be stored. The raw material batch number for each feeder must initially be stored. During run-time, the program must send lot number to the control system. The program must also increment lot number based on residence time attributes for the correct feeder. Also, it is responsible for maintaining the tablet lot log in real-time. These responsibilities of the material traceability program are illustrated in Fig. 8.

Fig. 8
figure 8

Dataflow for material traceability program

Residence Time Attributes

As described in “Residence Time Distribution Model Library,” each feeder has its own specific minimum and maximum residence time values due to varying powder properties and flow rates. The minimum and maximum times are retrievable based on the name feeder which is going through the batch change. The residence time values contained in this data structure represent the duration of time the impact of that refill is predicted to reach the outlet of the process.

Batch Number Organization

Each feeder is designated to a specific raw material during a production order. Initially, each feeder hopper is filled prior to the start of the continuous production. Therefore, each feeder contains material with its unique batch number. The batch number for raw material within each feeder is stored with that feeder. Tablets created during this time contain material from the specified batches. Upon refill of a hopper in which a new batch number is present, the feeder and new batch number must be specified. There will be a period of time, specified by the residence time values, in which tablets will contain material from both batch numbers.

Tablet Lot Log

This is the data structure of tablet lot numbers and the corresponding batch numbers for each component in the tablet lot. After refill of material with a new batch number, transitional lot will be designated in which the component in transition will have both batch numbers recorded, to indicate the possible composition of tablets. Every time refill occurs with new batch of material, tablet lots will increment, specifying composition of each tablet lot as the batch numbers of the components comprising the tablets within that lot. This data structure must be accessible by the main program to append new lots to the table.

Refill Instances

In preparation for a refill, the feeder must be specified and the batch number for new material must be stored. Once refill of a feeder is initiated, the minimum and maximum residence times are used to delay the simultaneous incrementation of lot number and update of tablet lot log to reflect outlet composition of tablets within the new lot. It is possible for refills of different feeders to occur in rapid succession, therefore multiple components in tablet to be undergoing transitions. The tablet lot log must be appended upon reaching the respective minimum and maximum residence times for each feeder’s component, such as described in Fig. 3.

Software Prototype

The developed software prototype has two primary windows: the configuration window and the runtime window.

Initialization and Configuration Window

This window allows the user to input the values required for material traceability. Specifically, the component names, minimum and maximum residence time values for each component, and the initial batch number for each component. This information will be used for creation of a material traceability log, which contains the tablet lot number, and the batch numbers for each component present in that lot. Before the production run begins, the log is initialized with lot number 1, and the batch number for each component is the initial batch numbers.

In this window, we are also able to select whether or not we want to run in “TEST” mode or “RUN” mode. By selecting these, we specify if an OPC connection should be established between program and server for control system. Once all information is supplied, a button is pressed which initializes the material traceability system and the runtime window appears.

Runtime Window

The runtime window appears when tablet batch is running and provides user with operations that are useful during runtime. One side provides a material traceability log updated in real-time. The other side is the refill queue. This queue allows users to input future refill information. This allows easier operation when it is time to refill a component feeder with a new raw material batch. The component names provided in the configuration window appear in a drop-down menu, where the user selects the appropriate name and inputs the new batch number. That information is then added to the queue, which is visible to the user.

Entries in the queue can be selected to either be removed from queue or used in refill. When a queue item is selected for refill, the residence time attributes associated with that component are applied to timers. The timers delay the incrementation of lot and the update of the material traceability log. When refill is performed, two timers begin: one delaying a function callback to define component batch number as both old batch number and new batch number and one for defining component batch number as solely the new batch number. This timer will delay the callback function until the elapsed time has passed as specified by the timer. So, whatever the status of the log is when the timer ends, the log and lot number will be updated accordingly. This allows multiple components to change at varying intervals. A change for one component does not affect a change in different component. So, when one component is transitioning between old and new batches, a different component can also be transitioning without interruption.

Depending on whether the status of the program is in “TEST” or “RUN” mode will determine whether it sends the lot number value to the OPC server on the PC running the control system. The callback function at timer completion looks for the “run mode” to determine whether or not to run the function to send lot number value through OPC.

Completion of Batch

When production has ended, a file is created to store the residence time values used during the program’s operation, as well as the material traceability tablet lot log. This allows for accountability and recordability when analyzing the batch post-production.

Case Study

Process Description and Setups

To demonstrate the application of the developed framework and corresponding software prototype in a continuous direct compaction tablet manufacturing pilot-plant, we defined a few process conditions to meet. First, the sample formulation used in this case study is 25% acetaminophen (API), 74% lactose (excipient), and 1% magnesium stearate (lubricant). To create these tablets, our plant must be arranged such that the top level of the plant has the API and excipient feeders, feeding into the co-mill. Then on the middle level, the lubricant feeder adds to the powder stream and it enters the continuous blender. From there, the powder blend enters tablet press on the lower level. This can be seen in Fig. 1. To create tablets with 325 mg active ingredient, this defines that total tablet weight is 1.3 g. If we define the production rate of our process to be 16,000 tablets per hour, that means we will be feeding 20.8 kg per hour of powder formulation blend into the tablet press. And given our formulation, the feed rates defined in Table 3 are required for each component in the line.

Table 3 Feed rate for tablet components

In this manuscript, assumed values for the minimum and maximum residence times are used for demonstration of the application of the framework. To demonstrate the concept and implement the framework, these values can be approximated based on process understanding. For example, because the composition of lactose is almost triple that of acetaminophen in this formulation, we can conclude that the minimum and maximum residence time for lactose will be shorter. And since magnesium stearate has a very low feed rate relative to acetaminophen, we would expect it to have the highest maximum residence time. The values given in the Table 4 may be hypothetical, but successfully illustrate the point that each component will have specific residence time values and could be determined experimentally to accurately predict minimum and maximum residence times of an actual system. This is also visualized in Fig. 9.

Table 4 Hypothetical minimum and maximum residence time of components based on formulation ratios and feeder positions
Fig. 9
figure 9

Graphical illustration of the minimum and maximum residence times of each component and how they could differ based on feeder location and formulation ratios

Demonstration of the Application of Developed Framework and Software Prototype

To implement the framework in our continuous pilot plant, we must perform or simulate the off-line determinations. Above, we have determined the hypothetical formulation we want to manufacture, as well as the minimum and maximum residence time attributes for the system running at 16,000 tablets per hour.

The next step was to build a user interface to input batch information for material traceability. This program was built using MATLAB and contains features relevant to the implementation of material traceability in our bespoke plant. This first screen (see Fig. 10) allows the user to input the material information, initial raw material batch number, and minimum and maximum residence times for that component. It also allows user to operate in either demonstration mode, which does not connect through OPC servers to the control software, or in OPC connection mode, which does send lot number signal in real-time to the control software.

Fig. 10
figure 10

Initial window where material name, initial batch number of each component, and the minimum and maximum residence times of each component are input by user

After configuration, the production run is initiated and the runtime screen is displayed as shown in Fig. 11. There are two panels: the batch change queue and the tablet lot composition log. The queue allows user to input the future batch changes for the different materials. The log allows user to see the batch number of each component in that lot of tablets.

Fig. 11
figure 11

Run-time screen where the tablet lot number is sent to control system and batch numbers for the components can be added to the queue

As seen in Fig. 12, once batches have been added to the queue, they can either be applied by selecting that entry and pressing refill button upon refill or can be removed from queue if user error. Once refill is pressed, any entry that is selected is initiated. The minimum and maximum residence times for that component are applied to accurately increment the tablet lot number and update composition when impact reaches the process outlet. Every time a minimum or maximum residence time is reached, the lot is incremented and that lot number signal is sent through OPC to the control software.

Fig. 12
figure 12

Addition of new batches to the batch change queue

In this example, lactose batches change much more quickly than the other two components. As demonstrated in Fig. 13, lactose was changed from batch number 20020 to 20030 to 20040 during production. Then when lactose was changing from 20040 to 20050, acetaminophen was changing from 10010 to 10020. The tablet lots incremented following the strategy proposed in Fig. 3. When the batch is complete, the “complete batch” button can be pressed and information is saved into separate file to be included in master batch records, as seen in Fig. 14.

Fig. 13
figure 13

Tablet lot composition log with raw material batch changes have occurred

Fig. 14
figure 14

Completion of tablet batch

Demonstration of Material Tracing in Five-Component Formulation

The developed software prototype is also capable of handling formulations with many more components. Figure 15 demonstrates the prototype handling material traceability for a five-component formulation. Here, we can see components “A” through “E” change batch numbers during operation. In this example, component B changes first. Also, before batch 1 for component B is fully cleared from the line, component D changes. Then after D completes the transition, component A changes. Then, component B changes again.

Fig. 15
figure 15

Material traceability for five-component formulation. Component names “A” through “E” represent five different components in a potential formulation

Discussions

There are many impacts this tool can provide with respect to direct compression continuous tablet manufacturing in industry when operating at commercial scale. The first being automatic logging of tablet lot number and associated raw material batch information. This feature allows this information to be accurately stored in master batch record, specifying the raw material batch information for each tablet lot. By having the tablet lot number stored with the process variables as well as raw material batch properties associated with that specific tablet lot, this data can be used for process monitoring and troubleshooting. Multivariate analysis techniques can be applied to the process data to determine correlations between the different parameters. After all, it is possible that a change in raw materials could affect a CPP for tablet production and that would be easily seen if raw material batch information is included with process data, which this framework allows for.

This accurate material traceability also allows transitional lots to be tested and released, not immediately discarded because of uncertainty in composition. In principle, changing batch of raw material should not impact tablet quality. This material traceability tool would run in parallel with any other process monitoring technologies to determine acceptance and rejection.

And finally, this framework for integration could be used to incorporate material traceability into the control software. So, instead of developing a stand-alone tool to meet the process requirements, this tool could be built directly into the software as another feature. This would make data management easier, as well as integration of this feature into the process monitoring dashboard. That way, all process monitoring could be done from one programmed dashboard, containing material traceability user interface, PAT results, CPPs, and real-time CQAs displayed for operators and engineers.

Conclusions

A systematic framework has been developed for material traceability in continuous pharmaceutical manufacturing process. A corresponding software prototype has been also developed to automate the procedure. The application of the framework has been demonstrated through direct compaction continuous tablet manufacturing process case study. The developed framework is generic and therefore can be applied in any continuous manufacturing process. This framework takes evolving fields in pharmaceutical engineering, such as experimental determination of residence time, predictive models for residence time of individual unit operations based on material properties, improved unit operations for continuous application, as well as advancing the understanding of these processes, and utilizes them to accomplish this necessary goal of material traceability. The newest and best ways being developed in these evolving fields will only strengthen and make more efficient this framework for material traceability in continuous pharmaceutical manufacturing. The developed framework is complementary to the existing control platform and thus should have a broad application in continuous pharmaceutical manufacturing industries. The future work includes the practical demonstration of the developed systematic framework and corresponding software tool for material traceability in continuous direct compression pharmaceutical tablet manufacturing pilot-plant.