GMP deviation management: PDD template and example
This is a complete process definition document (PDD) for GMP deviation management, also called the deviation procedure, non-conformance handling in pharmaceutical manufacturing or event and deviation investigation. It describes how departures from approved procedures, specifications and process parameters are recorded, contained, classified, investigated, assessed for their effect on batches, approved by quality assurance, linked to CAPA and closed at a fictional manufacturer, with the roles, systems, decisions and controls you would expect on a regulated site.
Use it as a starting point, not as a ready-made quality procedure. It describes one plausible way of working and does not make a site compliant with GMP. Adapt it to your own quality system, your marketing authorisations and the expectations of your inspectors, and have your quality unit approve the result. Most sites change the classification criteria, the target days and the list of people who approve each class.
1. Purpose and scope
This procedure describes how Marbrook Pharmaceuticals records, contains, classifies, investigates and closes deviations from approved procedures, specifications and process parameters in GMP areas. It gives production, quality control, engineering and the quality unit one shared description of who does what, so that every deviation is recorded when it is found, product is protected while the cause is investigated, the effect on each batch is assessed and documented before release, and corrective and preventive actions are tracked to completion.
In scope
- Deviations from procedures, batch records, specifications and process parameters in manufacturing, packaging, warehouse and QC laboratories
- Equipment failures and environmental excursions that affect GMP operations
- Immediate containment, classification and investigation
- Assessment of the effect on affected batches
- Link to CAPA and to change control where actions require it
- Closure within the target days
Out of scope
- Out of specification laboratory results, which follow a separate OOS procedure and are linked when they arise from a deviation
- Customer complaints and product recalls
- Batch certification and release, which uses the deviation as an input
- Non-GMP events, such as health and safety incidents
2. Process at a glance
- Trigger
- An employee notices that something has not been done as the approved procedure, batch record or specification requires.
- Starts when
- The employee tells their supervisor and records the event in the quality system.
- Ends when
- The QA Manager closes the deviation after all actions and the linked CAPA are in place and the batch impact is documented.
- Volume
- About 520 deviations a year: roughly 360 minor, 140 major and 20 critical
- Working hours
- Manufacturing runs on three shifts, Monday 06:00 to Saturday 06:00. QA is on site Monday to Friday, 07:00 to 18:00, with an on-call QA contact for nights and weekends.
- Company in this example
- Marbrook Pharmaceuticals Ltd, a manufacturer of oral solid dose products in Cork, Ireland (about 380 employees)
- Inputs
- Event description and evidence, Batch record and procedures, Equipment, environmental and laboratory data, Training and maintenance records, Similar past deviations
- Outputs
- Deviation record with classification, Containment record, Investigation report with root cause, Batch impact assessment, QA approval, Linked CAPA, Closed deviation
3. Roles and responsibilities
- Reporter
- Any employee who finds a deviation. Informs the supervisor straight away and records the facts: what happened, when, where and which batch or equipment.
- Area Supervisor
- Takes immediate containment actions, stops or holds product and equipment where needed, confirms the facts and approves the initial record.
- QA Deviation Coordinator
- Reviews the record for completeness, numbers it, proposes the classification, assigns the investigation owner and tracks due dates.
- Investigation Owner
- The manager of the area where the deviation happened. Leads the investigation, writes the root cause and the proposed actions and answers QA questions.
- Subject Matter Expert
- Engineering, QC, validation and microbiology specialists who give technical input to the investigation and the batch impact.
- QC Analyst
- Provides laboratory data or additional testing requested by the investigation and records the results against the deviation.
- QA Manager
- Approves the classification of major and critical deviations, the investigation, the batch impact and the closure with an electronic signature.
- Qualified Person
- Uses the approved deviation and its batch impact assessment when deciding on batch certification. Is informed at once of any critical deviation.
- CAPA Owner
- Accepts the corrective or preventive actions, completes them by the due date and provides the evidence.
- Contract Partner (external)
- A customer or supplier that must be told under the quality agreement when a deviation affects their product or material.
4. Systems
- MasterControl Quality Excellence: deviation, CAPA and change records with electronic signatures
- Electronic batch record system: batch documents and in-process data
- LIMS: laboratory results and sample status
- SAP S/4HANA: batch status and stock blocking
- Environmental monitoring system: temperature, humidity and particle data
- Shared quality mailbox for notifications to contract partners
5. Process map
Draw your own swimlane: one lane per role from section 3, the steps from section 6 in order, and a diamond for each decision in section 7. Your process will differ from this example, so map it from what your team actually does.
6. Procedure, step by step
| # | Step | Who | What happens | System | Output |
|---|---|---|---|---|---|
| 1 | Report to the supervisor | Reporter | Tells the area supervisor straight away when a deviation is found and keeps the evidence unchanged, for example the printout, the affected material and the equipment settings. | Production floor | Deviation reported and evidence kept |
| 2 | Contain the situation | Area Supervisor | Stops the operation if product quality may be affected, segregates and labels affected material, blocks the batch in SAP if needed and informs the on-call QA contact outside normal hours. It takes 10 to 30 minutes. | Production floor, SAP S/4HANA | Containment actions in place |
| 3 | Record the deviation | Reporter | Enters the deviation on the same shift, with a description of the facts, the batches, equipment and rooms involved and the immediate actions. The target is 24 hours at most. It takes 15 to 30 minutes. | MasterControl Quality Excellence | Draft deviation record |
| 4 | Confirm the facts | Area Supervisor | Checks the description against what happened and the batch record and approves the initial record. About 10% are corrected at this point because the batch or time is wrong. | MasterControl Quality Excellence | Confirmed deviation record |
| 5 | Review and number the record | QA Deviation Coordinator | Checks the record within 1 working day, returns it if the facts or batch numbers are incomplete (about 15% of records) and checks for similar open or past deviations on the same equipment or product. | MasterControl Quality Excellence | Reviewed record, or returned record |
| 6 | Classify the deviation | QA Deviation Coordinator | Proposes minor, major or critical using the classification matrix: effect on product quality, patient safety, validated state and data integrity, and whether it repeats. About 70% are minor, 27% major and 3% critical. Classification is revisited when the investigation shows a larger effect. | MasterControl Quality Excellence | Initial classification |
| 7 | Confirm major and critical classification | QA Manager | Confirms or changes the classification of every major and critical deviation the same or the next working day. For a critical deviation, also informs the qualified person and the site director immediately. | MasterControl Quality Excellence | Confirmed classification |
| 8 | Assign the investigation | QA Deviation Coordinator | Assigns an investigation owner and sets due dates: 5 days for minor, 20 days for major and 10 days for the first report of a critical deviation. The overall target for closure is 30 calendar days. | MasterControl Quality Excellence | Investigation task with due dates |
| 9 | Investigate and find the root cause | Investigation Owner | Collects the evidence, interviews the people involved and analyses the cause with a 5 Why or fishbone method, checking equipment, material, method, people, environment and documents. The investigation for a major deviation takes 5 to 15 working days. Human error is accepted as a root cause only after the process and training have been looked at. | MasterControl Quality Excellence, electronic batch record system | Investigation report with root cause |
| 10 | Give technical input | Subject Matter Expert | Gives an opinion on the technical effect, for example on the stability, the sterility assurance or the validated state, and records it in the investigation. This takes 1 to 3 days. | MasterControl Quality Excellence | Documented technical assessment |
| 11 | Run additional testing if needed | QC Analyst | Performs the extra tests requested by the investigation, such as retests on retained samples or extended testing, under a protocol approved by QA. The result is linked to the deviation record. If a result is out of specification, the OOS procedure starts in parallel. | LIMS | Test results linked to the deviation |
| 12 | Assess the effect on batches | Investigation Owner | Lists every batch, lot and piece of equipment that could be affected, including batches made before the deviation was found, and records for each the conclusion and the reason. It takes 1 to 3 hours. | MasterControl Quality Excellence, SAP S/4HANA | Batch impact assessment |
| 13 | Propose corrections and actions | Investigation Owner | Proposes the correction for the event and corrective and preventive actions for the cause, each with an owner and due date. Major and critical deviations always need at least one action. | MasterControl Quality Excellence | Proposed actions |
| 14 | Review the investigation | QA Deviation Coordinator | Checks that the root cause is supported by evidence, that all affected batches are covered and that the actions address the cause. About 25% of major investigations are returned for more work. | MasterControl Quality Excellence | Reviewed investigation, or returned investigation |
| 15 | Approve the investigation and batch impact | QA Manager | Approves or rejects the investigation, the batch impact and the proposed actions with an electronic signature. Minor deviations can be approved by an authorised QA reviewer. It takes 30 to 60 minutes. | MasterControl Quality Excellence | Approved investigation, or rejection with comments |
| 16 | Be informed of the deviation | Contract Partner | When the quality agreement requires it, QA sends the deviation summary and the batch impact to the customer or supplier and records their reply in the deviation. About 8% of deviations are notified to a partner. | Shared quality mailbox | Partner informed and reply recorded |
| 17 | Open the linked CAPA | QA Deviation Coordinator | Creates a CAPA record linked to the deviation for each approved corrective or preventive action. If an action needs a change to equipment, a process or a document, opens a change control as well. About 40% of deviations lead to a CAPA. | MasterControl Quality Excellence | Linked CAPA and change records |
| 18 | Complete the actions | CAPA Owner | Carries out the action, attaches the evidence, for example a revised procedure, a training record or a repaired and requalified machine, and marks the action complete. | MasterControl Quality Excellence | Completed actions with evidence |
| 19 | Use the deviation for certification | Qualified Person | Reviews the approved deviations and batch impacts before certifying the batch. An open major or critical deviation on the batch stops certification until it is approved. | MasterControl Quality Excellence, SAP S/4HANA | Batch decision based on documented deviations |
| 20 | Close the deviation | QA Manager | Closes the deviation when the investigation and batch impact are approved and all corrective actions are in place or tracked in an open CAPA. Overdue closure is reported at the weekly quality meeting. | MasterControl Quality Excellence | Closed deviation |
7. Decision points and business rules
- Could product quality be affected now? Yes: stop, segregate and block the batch before anything else (step 2).
- Is the record complete and are the facts confirmed? No: return it to the reporter (steps 4 and 5).
- Minor, major or critical? Critical is escalated to the qualified person and the site director at once (steps 6 and 7).
- Is the root cause supported by evidence? No: return the investigation (step 14).
- Which batches and equipment could be affected? Including those produced before the deviation was found (step 12).
- Is additional testing needed, and is a result out of specification? Yes: run the protocol and start the OOS procedure in parallel (step 11).
- Does the quality agreement require us to inform a contract partner? Yes: send the summary and record the reply (step 16).
- Does a corrective or preventive action need a CAPA or a change control? Yes: open and link them (step 17).
8. Exceptions
- Deviation found outside QA hours (about 30%): the supervisor contains the event and calls the on-call QA contact, and the record is entered on the next working day with the time of the event.
- Investigation cannot finish within 30 days, for example waiting for a vendor report (about 12%): the owner requests an extension with a reason and QA approves a new date.
- Classification changes during the investigation (about 6%): QA reclassifies the deviation and sets the due dates for the new class.
- Same deviation repeats on the same equipment or step (about 9%): QA raises the classification and opens a trend review.
- Deviation discovered after the batch has been released or shipped (rare): the QA Manager and the qualified person assess the need for a field alert or recall under the separate procedure.
9. Controls
- Electronic signatures and audit trails in the quality system meet EU GMP Annex 11 and 21 CFR Part 11, and the reporter or investigation owner cannot approve their own deviation.
- Batches with an open major or critical deviation are blocked in SAP and cannot be certified until QA approves the deviation.
- Classification, root cause and batch impact are approved by the quality unit, not by the area where the deviation happened.
- Deviations are trended monthly by area, equipment, product and root cause category and reviewed at the quality management review.
- Overdue deviations and CAPAs are reported weekly to the QA Manager and monthly to the site director.
- Records are kept for at least 1 year after the batch expiry date and in any case for the period set by the marketing authorisation and regulatory requirements.
10. Known issues today
- Reporters describe events vaguely, and about 15% of records come back for facts and batch numbers.
- Root cause is often written as human error without looking at procedures or training.
- Batch impact is assessed by hand from several systems, so a related batch is sometimes missed.
- Investigations wait for expert input, and tasks in the system are not acted on until QA follows up by phone.
- Closure is delayed because open CAPAs on the deviation are not visible to the people who close it.
11. RACI matrix
R = responsible (does the work), A = accountable (owns the outcome), C = consulted, I = informed.
| Activity | Reporter | Area Supervisor | QA Coordinator | Investigation Owner | QA Manager |
|---|---|---|---|---|---|
| Report and contain the deviation | R | A/R | I | I | |
| Record and confirm the facts | R | A | C | ||
| Review and classify | I | R | C | A | |
| Investigate and find the root cause | C | C | C | A/R | I |
| Assess the effect on batches | C | C | R | A | |
| Review and approve the investigation | R | C | A | ||
| Open and complete CAPA | C | R | R | A | |
| Close the deviation | I | R | I | A |
12. KPIs
- Days from detection to closure
- Average calendar days between the event and closure, by class. The target is 30 days for major and 15 for minor.
- On-time closure rate
- Share of deviations closed on or before the target date.
- Records returned for rework
- Share of records or investigations returned by QA for missing facts or weak root cause.
- Repeat deviations
- Share of deviations with the same root cause category, equipment or step as one in the previous 12 months.
- Overdue open deviations
- Count of deviations past their due date at month end, split by age.
- Deviations per 100 batches
- Deviations raised divided by batches manufactured, times 100, by product and area.
How to adapt this template
- Replace the company, the products and the quality system with yours. If you work on paper or in another QMS, name the form or module where each step happens.
- Set your own classification matrix in step 6. Define minor, major and critical against patient safety, product quality, validated state and data integrity, and have it approved by your quality unit.
- Set the target days for each class from your own quality system and the commitments in your quality agreements. The numbers here are examples.
- Align the process with your OOS, CAPA, change control and complaint procedures. Say where one ends and the next starts.
- Check the percentages with real data from your quality system. The share of records returned and of investigations sent back for root cause shows where training is needed.
- This template describes one way of working and does not by itself show compliance with GMP. Have your quality unit review it against the regulations that apply to your site and products.
Questions people ask
What is a deviation in GMP?
Any departure from an approved procedure, instruction, specification or process parameter, planned or unplanned. It is recorded when it is found, classified by its risk to the product and the patient, investigated for its cause and assessed for its effect on batches before they are released.
What is the difference between a minor, major and critical deviation?
A minor deviation has no effect on product quality or the validated state. A major deviation could affect them, or shows that a significant control failed. A critical deviation has or is likely to have an effect on patient safety, product quality or data integrity. Each site defines the exact criteria in its own quality system.
How long should a deviation investigation take?
Many sites aim for closure within 30 calendar days, with a shorter first report for critical deviations and a shorter time for minor ones. The right target is the one in your quality system and your quality agreements. Extensions need a reason and QA approval.
What is the difference between a deviation and a CAPA?
A deviation is the record of an event and its investigation, including the correction and the batch impact. A CAPA is the follow-up action that removes the cause or prevents recurrence, tracked until it is completed and checked. One deviation can lead to several CAPAs, and some lead to none.
Is human error an acceptable root cause?
Rarely on its own. Inspectors expect to see why the error was possible: unclear instructions, training, workload, equipment design or environment. If these are examined and the person really did not follow a clear, trained procedure, that can be recorded, with an action for the system around it.
What is the difference between a PDD and an SOP?
An SOP tells one person how to do their part, often screen by screen. A PDD describes the whole process across roles, with decisions, exceptions, controls and volumes, so you can analyse it and change it. Many teams start from the SOP and write the PDD from it.
Can I use this template for free?
Yes. Download it in Word or PDF and adapt it to your company. The company in the example is fictional, and the template does not replace your own approved quality procedures.
Map your own version of this process.
Upload your SOP or describe the process. Processfix builds the map, simulates it and shows where the time goes. People review the results and decide.