Pharma manufacturing is the making of medicines in a factory, in batches of lakhs of tablets or tubes, under strict rules. The rules say that the plant must prove, batch by batch, that every step was done exactly as the drug regulator approved. A factory that makes medicines is usually called a plant. The rules are called good manufacturing practice, or GMP.
India is one of the world's largest makers of medicines. Its plants make a large share of the world's generic medicines. A generic medicine is a cheaper copy that any company may make once the original medicine's patent has ended. Indian plants supply India, and they also export to America, Europe and Africa. So a plant near Hyderabad may be inspected by India's regulator, CDSCO, and also by the US FDA, America's drug regulator.
What must a plant prove? The rules for keeping such proof are called GxP compliance. A plant must prove four things.
First, every machine and every computer system works as it should. Proving this is called validation. Before a new mixer or a new piece of software is used for real batches, it is tested against written requirements. Computer system validation software records those tests digitally, instead of on binders of paper.
Second, every batch was made exactly by the approved recipe. On the factory floor, a manufacturing execution system (MES) shows each operator the next step, checks each weight and records each reading. Its record of one batch is called the electronic batch record.
Third, every mistake was investigated. Any departure from the approved plan is called a deviation. A quality management system (QMS) records each deviation, the investigation and the fix that follows. Plants also study what inspectors have found at other plants, through regulator inspection intelligence, so that they can fix the same problems in their own plant first.
Fourth, every pack can be traced. Serialisation and track-and-trace gives each pack its own number. The pack can then be followed from the plant to the pharmacy, and a fake pack can be caught. The general idea is described in track and trace.
Here is a typical batch. A plant near Hyderabad makes 1 lakh tubes of an antifungal cream. The mixing tank was validated last year. The MES directs the weighing and the mixing. The quality-control laboratory tests samples from the batch, and its LIMS records the results. One mixing step ran 10 minutes longer than allowed, so the QMS opens a deviation. A quality employee reviews the whole record and the investigation. Only then does the plant release the batch. Each tube's carton carries its own number before it leaves.
Why is software so important here? Many Indian plants still keep these records on paper. A paper batch record can run to hundreds of pages, filled in by hand and checked by hand. Digital records are faster to review, and they are harder to change without a trace. Regulators are also starting to let plants release batches on the evidence of validated digital data, rather than on a person's review of paper.