A manufacturing execution system (MES) for pharma is software that directs and records each step of making a medicine on the factory floor. It covers every step, from weighing the ingredients to filling the packs. As the operators work, it writes the official record of the batch. This record is called the electronic batch record (EBR). A batch is one lot of medicine made in one run, such as 3 lakh tablets.
Every medicine has an approved recipe. It says which ingredients to use, how much of each, which machines to use and what readings each step must reach. In a plant that uses paper, operators follow a printed copy of the recipe and fill in the results by hand. The MES puts this recipe on a screen beside each machine. It shows the operator one step at a time. It does not allow the next step until the current one is done correctly.
Take, for example, a plant in Visakhapatnam that makes a diabetes medicine, metformin, in batches of 3 lakh tablets. At the weighing booth, the screen tells the operator to weigh 150.0 kg of metformin powder. The operator scans the barcode on the drum. The MES checks that it is the right material, from a batch that the quality team has approved, and that it has not expired. The scale is connected to the MES, so the weight is recorded directly, with no handwriting. If the operator puts 152 kg on the scale, the MES does not accept it, because the recipe allows only 0.5% more or less. The operator corrects the amount. Then the MES records who weighed it, and when.
The batch moves on to mixing, pressing and coating. At each step, the MES records the machine used, its settings and the readings. Every 30 minutes, an operator weighs 10 tablets and enters the results. Before a new batch starts in a room, the MES asks the operator to confirm that everything from the last batch has been removed. This check is called line clearance.
The MES exchanges information with other systems. Test results from the laboratory come from the LIMS. Any step that goes outside its limits is sent to the quality management system as a deviation. At the end of the line, the MES sends the batch number and quantities to serialisation software, which prints a number on each pack. The MES itself must first be validated, using computer system validation. The record-keeping rules it follows are described in GxP compliance.
How is this different from a general manufacturing execution system in a car or electronics factory? Both direct and record work on the floor. A pharma MES must also meet the drug regulators' rules for records. Every entry must show who made it and when. It cannot be changed without a trace. Every important step needs an electronic signature.