In This Article
- Executive Summary
- What Process Mining Shows That a Deviation Dashboard Does Not
- The Event Data You Need From Deviations, CAPAs, and Change Controls
- What the Analysis Usually Finds
- Start With an Export, Not a Platform
- Data Quality Problems in Quality Event Logs
- Validation and Data Integrity When the Analysis Supports GxP Decisions
- Reading the Results Without Misleading Yourself
- Questions to Ask Before Funding a Process Mining Effort
- Conclusion
- For Further Reading
- References & Sources
Executive Summary
Most quality teams can tell you how many deviations are open and how many are overdue. Far fewer can say where in the workflow those records spend their time. Process mining answers that question. It reads the timestamped status history that your eQMS, LIMS, and ERP systems already record and rebuilds how deviations, CAPAs, and change controls move from opening to closure, including the loops, waits, and handoffs that no SOP flowchart shows.
The method is well studied in academic research, and its main risk is well known: the results are only as good as the event log. Applied to process mining in quality operations, that means three things. You need a small set of fields (a record ID, an activity, and a timestamp, plus role and site). You need to check that data for known defects before you trust any picture it produces. And you need to decide early whether the analysis is a one-time improvement exercise or something that will feed GxP decisions, because that choice sets the validation effort.
This article covers the event data to extract, the findings that typically appear, how to run a first analysis from a plain export before buying a tool, the data quality problems specific to quality system logs, and a risk-based view of validation and data integrity when the analysis starts to support decisions.
What Process Mining Shows That a Deviation Dashboard Does Not
A typical quality metrics dashboard counts things. It shows open deviations by site, CAPAs past due, change controls by category, and the average age of each. Those numbers matter, and ICH Q10 expects management to review performance indicators for exactly these processes. Its section on management review lists “Complaint, deviation, CAPA and change management processes” among the areas where indicators should be used to monitor the effectiveness of the pharmaceutical quality system.10 But a count does not explain itself. When the average deviation takes too long to close, the dashboard cannot tell you whether the time went into investigation, into waiting for a QA reviewer, into a record going back and forth between the site and the quality unit, or into a CAPA that had to be raised before closure.
Process mining in quality operations is built to answer that second kind of question. The Process Mining Manifesto, written by the IEEE Task Force on Process Mining, describes the field as a way to discover, monitor, and improve real processes by extracting knowledge from the event logs that information systems already keep.1 The key word is real. Instead of starting from the process you designed, you start from what the system recorded each record doing, in order, with a time attached to each step.
From Counts to Paths
Every deviation in an electronic QMS leaves a trail. It was opened, triaged, classified, assigned, investigated, perhaps returned for more information, reviewed, approved, linked to a CAPA, and closed. Each of those status changes carries a timestamp and, usually, the name of the person who made it. Put the trails of a few thousand records side by side and patterns appear that no single record shows: the share of records that go back to the investigator after QA review, the step where records wait longest, the sites where records change hands most often, and the paths through the workflow that nobody designed.
That is the shift from counting outcomes to seeing paths. A dashboard says what share of your deviations closed late. A process map built from the event log shows that most of the late ones went through a second review loop, or waited at the same approval step, or crossed from one site to another before closure. Those are different problems with different fixes, and the count alone cannot separate them.
Three Kinds of Analysis
The Manifesto describes three basic types of process mining.1 Each maps onto a question a quality leader already asks.
How Does the Process Run Today?
A discovery technique takes an event log and produces a process model without any prior model as input. For quality records, this is the map of how deviations or change controls move in practice, including the loops and shortcuts.
Does It Match the Procedure?
Conformance checking compares an existing model with the event log of the same process. Here the model is your SOP workflow, and the question is where recorded behavior departs from it.
Where Is Time Going?
Enhancement extends a model with information from the log. Using timestamps, the Manifesto notes, a model can be extended to show bottlenecks, service levels, throughput times, and frequencies.
Who Hands Work to Whom?
Research on social network mining shows how the same log can reveal handovers of work from one performer to the next.6 For quality records, it is most useful aggregated to roles, functions, and sites.
Why Quality Records Suit the Method
Quality system records are a good fit for process mining for a practical reason: regulated systems are required to keep the history that the method needs. EU GMP Annex 11 asks companies to consider, based on risk, building in a system-generated audit trail of all GMP-relevant changes and deletions, and it states that audit trails “need to be available and convertible to a generally intelligible form and regularly reviewed.”12 FDA’s data integrity guidance defines an audit trail as a secure, computer-generated, time-stamped electronic record that “allows for reconstruction of the course of events” for the creation, modification, or deletion of a record.14
Reconstructing the course of events is exactly what process mining does, just across many records at once. That does not mean every audit trail makes a good event log. Audit trails are written to show who changed what, field by field, and they often contain far more detail than a process analysis needs. But it does mean that most pharma and biotech companies running an eQMS already hold the data. The work is in choosing, extracting, and cleaning it, not in creating new data.
One honest note on the evidence. Published research applying process mining specifically to pharmaceutical deviations and CAPAs is thin. The nearest peer-reviewed work comes from neighboring fields. A 2025 study in the International Journal of Productivity and Performance Management used process mining to trace the root causes of quality deviations and non-conforming finished products in processed cheese production, and the authors note that the method is still rarely used in the food industry.9 Healthcare has a much larger literature, and a 2022 review by the Process-Oriented Data Science in Healthcare Alliance found that use there has mostly stayed within targeted research case studies.8 The general methods are mature. Their use in GMP quality operations is still early, which is a reason to start small and learn from your own data.
The Event Data You Need From Deviations, CAPAs, and Change Controls
The Manifesto’s second guiding principle is that log extraction should be driven by questions.1 Without a concrete question, it is very hard to decide which tables to pull. So before anyone opens a database, write down two or three questions the analysis should answer. For example: where do major deviations spend most of their time before closure? How often are investigations returned after QA review, and at which sites? How many change controls are reopened after approval? The questions decide the case, the activities, and the time window.
The Three Required Fields
Every process mining technique needs three things for each event: which case it belongs to, what happened, and when. In quality terms, that is the record number, the activity (usually a workflow status change), and the timestamp. Everything else is optional, although some of it is what turns a process map into something a quality leader can act on.
| Field | What It Means for Quality Records | Typical Source | Required? |
|---|---|---|---|
| Case ID | The deviation, CAPA, or change control number that groups events into one record history | eQMS record header | Yes |
| Activity | The step or status change: opened, triaged, investigation started, returned, QA approved, closed | eQMS workflow history or audit trail | Yes |
| Timestamp | Date and time of the status change, with time zone | eQMS workflow history or audit trail | Yes |
| Role or function | The function that performed the step (site QA, investigator, QA approver, area owner), not only the user name | User directory joined to the event | Strongly recommended |
| Site | The site that owns the record, and ideally the site of the person acting | Record header and user profile | Strongly recommended |
| Classification | Minor, major, critical; deviation category; change type | Record attributes | Recommended |
| Product, area, or batch | What the record concerns, for filtering and for linking to other records | Record attributes, ERP or MES reference | Recommended |
| Linked records | Related CAPAs, change controls, OOS investigations, complaints | eQMS relationship tables | Needed for cross-record analysis |
| Due date and extensions | Target dates and each change to them | Record attributes and audit trail | Recommended |
The role field deserves attention. A process map built on individual user names tends to turn into a conversation about people. A map built on roles and sites keeps the focus on the process, which is where it belongs. We come back to this point in the section on reading results.
Which Timestamps Count
Quality records often hold several dates that look interchangeable but mean different things. A deviation can have an occurrence date, a discovery date, a date it was entered into the system, and a date it was assigned. A CAPA can have a planned completion date, an actual completion date, and an effectiveness check date. For process mining, the most trustworthy times are usually those the system writes on its own when a status changes. Dates that users type into fields, such as the occurrence date, are useful context, but they behave differently and should be kept as attributes rather than mixed into the event sequence without thought.
The gap between occurrence and entry is itself worth measuring. If records are routinely entered days after the event, that delay will not show up in a closure-time metric that starts the clock at record creation. It will show up if you treat the occurrence date as the start of the case.
Choosing the Case: One Record Type or Several
The simplest analysis takes one record type and treats each record as a case. Deviations alone, or change controls alone, give a clean starting point. The harder questions cross record types. A deviation may generate two CAPAs, and one of those CAPAs may require a change control, which in turn touches several documents and a training update. The deviation cannot close until the CAPA plan is approved, and the CAPA cannot close until the change is implemented.
The Manifesto describes this problem with orders and deliveries: one order can lead to several deliveries, and one delivery can include lines from several orders, so the choice of case changes the process model you get.1 Quality records have the same many-to-many structure. Object-centric process mining was developed for this situation. The OCEL 2.0 specification, published by a group of researchers led from RWTH Aachen University, defines a log format that records events, the objects they touch, the relationships between objects, and how object attributes change over time, and it is offered in SQLite, XML, and JSON formats.5
For a first analysis, do not start there. Pick one record type, answer one question, and learn what your data looks like. Once the team trusts a single-case analysis of deviations, linking deviations to CAPAs is a natural second step. The traditional single-case format is standardized as IEEE 1849, the eXtensible Event Stream (XES) standard, first published by the IEEE Standards Association in November 2016 and since revised.4 Many process mining tools, open-source and commercial, can read it, and most can also read a plain CSV with the three required columns.
What the Analysis Usually Finds
Every organization’s data is different, and it would be wrong to promise a specific result. But the questions quality teams bring to process mining tend to cluster around a handful of patterns, and these are the patterns the techniques are designed to surface. Knowing them in advance helps you design the extract and read the output.
Rework Loops
A rework loop appears in the log as an activity that repeats within the same case: an investigation submitted, returned, resubmitted, returned again. In a discovered process model it shows up as an arrow pointing backward. The useful questions are how often it happens, at which step, for which record classes, and at which sites.
Rework in quality records is not always waste. A QA reviewer who returns an investigation because the root cause is not supported is doing the job ICH Q10 describes, where the investigation should use a structured approach with the objective of determining the root cause.10 The question is whether the loop is concentrated in ways that point to a fixable cause: a template that does not ask for the evidence reviewers want, investigators at one site who have not been trained on what a supported root cause looks like, or a classification step that sends records down the wrong path and forces a later correction.
Waiting for Approval
When the log carries timestamps for both the end of one step and the start of the next, the gap between them is waiting time. In quality workflows, the longest waits are often in queues for approval rather than in the investigative work itself. Process mining makes this visible by step and by role. It can show, for example, that investigations finish in a reasonable time but then wait for a QA approver, or that change controls wait for an impact assessment from a function that is not resourced for it.
Be careful with the word “waiting.” A record in an “under review” status may be waiting in a queue, or a reviewer may be working on it. The event log usually cannot tell the difference. What it can tell you is the elapsed time between status changes, which is enough to show where to look next.
Handoffs Between Sites and Functions
Research on mining social networks from event logs defines a handover of work as one event in a case followed directly by another event in the same case performed by someone else.6 Applied to quality records and aggregated to site and function, this shows how many times a typical record changes hands before it closes, and which handoffs carry the most delay.
Multi-site organizations often find that records crossing sites take a different path from records that stay local. A deviation at a manufacturing site that needs input from a central QA group, a testing laboratory, or a contract manufacturer will pick up handoffs, and each handoff can add a wait. The analysis does not tell you whether the handoff is necessary. It tells you how often it happens and what it adds to elapsed time, so the people who own the process can decide.
Paths the Procedure Does Not Describe
Conformance checking compares the log with a model of how the process should run. For quality records, the model is the SOP workflow. Because an eQMS workflow engine usually enforces the required steps, outright skipped approvals are less common than people fear. The departures that do appear are often subtler: records reopened after closure, records cancelled and recreated under a new number, classification changes late in the investigation, due dates moved several times, or steps completed in an unexpected order because the system allows it.
The Manifesto notes that some systems can be bypassed, so events may be missing or not recorded properly.1 In quality operations, the common bypass is work done outside the system: an investigation drafted in a shared document and entered all at once, or a cross-site discussion held in email. Process mining cannot see that work directly, but it often sees its signature, such as a long gap followed by a burst of status changes in a few minutes.
Extensions and Moving Due Dates
Many quality metrics programs track on-time closure against the current due date. If due dates are extended, a record can be “on time” after several extensions. When the event log includes each change to the due date, the analysis can show how many records were extended, how many times, and at which step. That gives a more honest view of timeliness than a single on-time percentage.
| Pattern | What It Looks Like in the Log | First Question to Ask |
|---|---|---|
| Rework loop | The same activity repeats within one case, such as “returned to investigator” | Is the loop concentrated by site, record class, or reviewer role? |
| Approval wait | Long elapsed time between “submitted for approval” and “approved” | Is this a queue problem or a resourcing problem for one role? |
| Cross-site handoff | Consecutive events by people at different sites or functions | Which handoffs add the most elapsed time, and are they all needed? |
| Unexpected path | Sequences the SOP workflow does not describe: reopen, cancel and recreate, late reclassification | Does the procedure, the system configuration, or training need to change? |
| Due date reset | Repeated changes to the target date field in the audit trail | How does timeliness look when measured against the original due date? |
| Burst entry | A long gap followed by many events within minutes | Is work happening outside the system and being entered later? |
Start With an Export, Not a Platform
It is tempting to begin with a tool evaluation. Process mining platforms are capable, and vendors will offer to connect to your eQMS directly. But a platform purchase made before anyone has looked at the data tends to produce a long integration project and a first result months later. A plain export gets you to a first result in weeks, tells you whether your data supports the questions you care about, and gives you a much sharper requirement list if you do buy a tool later.
Write the Questions and Pick One Record Type
Two or three questions, one record type, one time window. Twelve to twenty-four months of closed records is often enough to see stable patterns without pulling in records from a previous system configuration.
Find Where the Status History Lives
Ask the eQMS administrator or vendor where workflow status changes are stored. Many systems hold them in a workflow history table or report; others only in the audit trail. Confirm the timestamps carry a time and time zone, not only a date.
Export Through a Controlled Route
Use a standard report or a read-only query run by someone with the right access. Record what was exported, when, by whom, and with what filters. Treat the extract as a copy of GxP data and store it accordingly.
Shape the Log and Check Its Quality
Build one row per event with case ID, activity, timestamp, role, and site. Run the data quality checks described in the next section before drawing any conclusions.
Analyze, Then Show the Process Owners
Produce the discovered process map, the most common paths, the rework rate by step, and waiting time by step. Review the results with the people who run the process before anyone else sees them. They will spot data errors and explain patterns the data cannot.
Decide What Happens Next
Pick one improvement to test, a measure to track it, and a date to look again. Decide whether the analysis stays a one-time exercise or becomes a routine input to management review, because that decision drives the validation approach.
What a Spreadsheet Can and Cannot Do
With a clean event log in a spreadsheet, a capable analyst can answer a surprising number of questions. Sort by case and timestamp, and you can count how many times each record passed through each status, compute elapsed time between consecutive events, and flag cases where a status repeats. Pivot tables will give rework counts by site and median waiting time by step.
What a spreadsheet does poorly is show the process as a whole. Discovering a process model from thousands of cases, seeing the most common variants side by side, and checking conformance against a reference model are tasks for process mining software. The spreadsheet stage is still worth doing, because it forces the team to understand the log, and it often answers the first question on its own.
Open-Source Options
Between a spreadsheet and a commercial platform there is a middle option. PM4Py is an open-source process mining library for Python, introduced in 2019 by Berti, van Zelst, and van der Aalst. Its authors built it to close a gap: commercial tools offered limited support for custom algorithms, and many tools could only be used through a graphical interface, which made large-scale or repeatable analysis hard.7 A data analyst who already works in Python can use it to discover process models, check conformance, and compute performance statistics from a CSV export, with every step written down as code.
That last point matters more in a regulated setting than it might elsewhere. An analysis written as a script can be rerun on the next export, reviewed by a second person, and put under version control. That makes the move from a one-time exercise to a controlled, repeatable analysis much easier than if the work lived in a series of manual clicks.
When a Tool Purchase Makes Sense
A commercial platform is worth buying when the analysis needs to run continuously, when many people outside the analytics team need to explore the results, when the questions span several systems that are hard to join by hand, or when the organization wants object-centric analysis across deviations, CAPAs, and change controls at scale. By the time you reach that point, you will know which tables matter, which data quality problems you have to fix at the source, and which questions people come back to. That knowledge is the best requirement document you can bring to a tool evaluation.
A practical test before buying. If your team cannot produce a clean deviation event log as a CSV, a platform will not fix that. The connector will pull the same data, with the same defects, into a more expensive place. Get one clean export working first.
Data Quality Problems in Quality Event Logs
The research literature is blunt about this. In a paper presented at the 2013 IEEE Symposium on Computational Intelligence and Data Mining, Bose, Mans, and van der Aalst argued that process mining research had concentrated on analysis techniques while the quality of the input logs is critical to success, and they identified 27 classes of event log quality issues, including timestamp problems, imprecise activity names, and missing events.2 The Manifesto rates event logs on five maturity levels, from logs recorded automatically, systematically, and reliably, down to logs where events are recorded by hand and may not match reality. It states that analysis of the lowest levels is typically problematic and the results are not trustworthy.1
The Manifesto places the event logs of document management systems at its second-lowest level, because coverage varies and the system can be bypassed.1 Many eQMS platforms have their roots in document and workflow management. That does not mean your eQMS log is poor. It means you should check rather than assume.
A useful checklist comes from Suriadi, Andrews, ter Hofstede, and Wynn, who described a set of event log imperfection patterns drawn from their experience preparing logs, each with a description, its effect on results, how to detect it, and how to remedy it. They are clear that the collection is not complete.3 Several of their patterns map directly onto quality system data.
Timestamps
Date-only fields. Some eQMS reports export dates without times. If two status changes happen on the same day, their order is lost, and a process model built from them will show steps in the wrong order or as if they happened in parallel. Check whether the source holds full timestamps even when the standard report does not show them.
Form-based event capture. Suriadi and colleagues describe a pattern where data entered on an electronic form all receives the same timestamp, the moment the user clicks save, so the order of events is flattened into one time. Updating the form may rewrite every field to the log, creating apparent duplicate events.3 Investigation forms in an eQMS are a common source of this. The fix is usually to build the event log from workflow status changes rather than from every field-level audit trail entry.
Time zones and formats. The same research describes timestamps recorded in a format different from the one the analysis tool expects, including month and day order, separators, and the way time zone information is encoded, and notes that this is likely when a log is built from several sources.3 Global quality organizations combining records from sites in different time zones should convert everything to one standard (UTC is the usual choice) and keep the original value as well.
Entry errors. Where people type dates by hand, the research describes errors such as a wrong adjacent key or a missed change of day around midnight, which produce events that appear to happen before the events that caused them.3 A simple check catches most of these: flag any case where an approval appears to precede its submission.
Activity Labels
Same step, different names. The synonymous labels pattern describes values that differ in spelling but mean the same thing, which is common when a log is assembled from sources with different schemas.3 In a multi-site organization, or after an acquisition, “QA Approval,” “Quality Approved,” and “QA Sign-off” may all mean the same step. Each will appear as a separate activity in the process model unless you map them to one label. Keep the mapping table, because it is part of how the result was produced.
Events nobody performed. The collateral events pattern covers events that refer to a single process step but are recorded several times, for example because the system fires auxiliary events when a main event occurs, or because recording is very fine-grained.3 In an eQMS, notification emails, reminder triggers, and automatic field updates are typical examples. They add noise and make process models much harder to read. Filter them out, and document the filter.
Missing Cases and Work Outside the System
The elusive case pattern describes events that are not linked to a case identifier, so the analysis cannot group them into a record history.3 In quality operations, this shows up when part of the work is tracked somewhere else: an investigation worksheet in a shared drive, a CAPA effectiveness check tracked in a spreadsheet, or approvals collected by email and attached later. Those steps are invisible to the analysis. Be explicit about what the log covers and what it does not, so nobody reads a missing step as a skipped one.
History Carried Over From a Previous System
If your eQMS replaced an older system, migrated records may carry only a creation date and a closure date, with none of the steps in between. Mixing them with native records will distort every time-based measure. The simplest approach is to limit the analysis window to records created after go-live, or to flag migrated records and analyze them separately.
Do not clean the source to make the picture tidy. Every data quality fix belongs in the extraction and transformation step, recorded and repeatable, never as an edit to the GxP record. If the analysis finds a record with a wrong date, the correction goes through your normal data correction procedure, with its own audit trail.
Validation and Data Integrity When the Analysis Supports GxP Decisions
Process mining in a regulated company raises a fair question: does this analysis need to be validated? The answer depends on what the analysis is used for, which is how both FDA’s computer software assurance thinking and GAMP 5 approach the question.
Start From Intended Use
FDA’s guidance “Computer Software Assurance for Production and Quality Management System Software,” issued February 3, 2026, is device guidance from CDRH and CBER, and drug manufacturers use it by analogy.13 It asks manufacturers to start from the intended use of the software and then decide whether a failure would pose a high process risk. Among the examples it gives of functions that generally are not high process risk are those that “Collect and record data from the process for monitoring and review purposes that do not have a direct impact on production or process performance,” along with CAPA routing and automated change control management.13 ISPE’s GAMP 5 Second Edition, published in 2022 under the title “A Risk-Based Approach to Compliant GxP Computerized Systems,” takes the same risk-based view and stresses critical thinking by knowledgeable subject matter experts.15
For process mining, that suggests thinking in three tiers of use.
| Use | Example | Where Assurance Effort Goes |
|---|---|---|
| One-time improvement analysis | An analyst studies 18 months of deviation history to design a workflow change, and the findings feed a change control that is assessed on its own merits | Controlled extraction, a documented and reviewed analysis, and handling the extract as a copy of GxP data. Formal system validation is usually not proportionate. |
| Routine monitoring | A monthly process mining report on rework rate and waiting time by step is presented in quality management review | The extraction, transformation, and calculation logic, tested and under change control, with a record that shows what was tested and the result |
| Decision support | Analysis output is used to prioritize investigations, trigger escalation, or support a conclusion about CAPA effectiveness | Full risk-based validation of the data pipeline and the specific functions that drive the decision, with human review of the decisions themselves |
Moving from one tier to the next is a change in intended use. Treat it as one. A useful analysis tends to get used, and the common failure is an exploratory notebook that slowly becomes a monthly management review input without anyone deciding it should.
Where the Assurance Effort Belongs
The CSA guidance includes a completed example that is close to this situation: a manufacturer implementing a commercial business intelligence solution for data mining, analytics, and reporting, intended to understand product and process performance over time. In that example, the manufacturer judged the functions that connect to data sources and maintain data integrity to be high process risk, because their failure would produce inaccurate or inconsistent trending and could lead to missing quality trends. Those functions received scripted testing, including repeatability testing.13
The lesson for process mining is that the visual process map is rarely the riskiest part. The riskiest parts are the steps that turn source records into the event log: which records were included, how activities were mapped, how timestamps were converted, which events were filtered out. If those steps are wrong, every downstream picture is wrong, and nobody looking at the picture can tell. Put the assurance effort there. Test the extraction against a sample of records checked by hand, test the label mapping, test the time zone conversion, and test the filters.
For the analysis itself, ICH Q10 offers a useful anchor. The level of effort, formality, and documentation of an investigation should be commensurate with risk, in line with ICH Q9.10 The same principle applies to the tools used to study the quality system. A one-time analysis that informs a redesign deserves a careful, reviewed method. A recurring analysis that management relies on deserves testing and change control.
Data Integrity of the Copy
An event log extracted from an eQMS is a copy of GxP data. It contains record identifiers, user names, timestamps, and sometimes descriptive text about product quality issues. Handle it with the same care as the source. ALCOA+ (the principle that data should be attributable, legible, contemporaneous, original, and accurate, plus complete, consistent, enduring, and available) applies to the copy as well: you should be able to show where it came from, when it was taken, and that it has not been altered.
EU GMP Annex 11 states that when data are transferred to another format or system, validation should include “checks that data are not altered in value and/or meaning during this migration process.”12 That clause is written for migrations, but the principle carries over directly. When you reshape audit trail entries into an event log, you are changing format, and the checks that prove nothing changed in meaning are the same checks that make the analysis trustworthy. Record counts by status, spot checks of individual record histories against the source, and a reconciliation of totals are simple and effective.
Keep the extract in a controlled location with restricted access, and keep each extract that supported a decision. If a finding from process mining is cited in a change control or a management review, you should be able to reproduce it from the same extract and the same version of the analysis.
What the Analysis Does Not Replace
Process mining measures the process around investigations. It does not perform them. Under 21 CFR 211.192, any unexplained discrepancy or failure to meet specifications must be “thoroughly investigated,” the investigation must extend to other batches and products that may be associated with the failure, and a written record must include the conclusions and follow-up.11 None of that changes. The regulation sets requirements for the content and reach of an investigation; it does not set a deadline for closure. Timeliness targets come from your own procedures, which is one more reason to measure honestly how long the process takes and where the time goes. A faster process that produces weaker investigations is not an improvement, and the analysis should always be read alongside the quality of the investigations themselves.
Reading the Results Without Misleading Yourself
A process map is persuasive. It looks objective, it has numbers on every arrow, and it tends to end discussions. That is useful when the data is sound and the question is clear. It is dangerous when either is not. Three habits help.
Measure the Process, Not the Person
Event logs from quality systems name individuals. A handover analysis at the level of individual users can quickly turn into a ranking of who is slow. That is rarely the right conclusion, and it damages the reporting culture that a quality system depends on. If investigators believe the data will be used against them, they will find ways around the system, which makes the data worse.
The Manifesto lists safety among its criteria for good event data: privacy and security concerns should be addressed when events are recorded, and people should be aware of the kind of events being recorded and how they are used.1 In practice, aggregate to role, function, and site for anything shared beyond the analysis team. Agree in advance with HR and, where they exist, works councils or data protection officers what level of detail is appropriate, especially for sites in the EU.
Variation Is Not Always Waste
Healthcare process mining research has had to deal with processes that vary for good reasons. The 2022 review by Munoz-Gama and colleagues identifies the variability of healthcare processes as one of the distinguishing characteristics that needs targeted attention when applying process mining.8 Quality investigations share this trait. A critical deviation involving a sterility failure should not follow the same path or take the same time as a minor documentation error. A process model that mixes them will show a great deal of variation that is entirely appropriate.
Split the analysis by classification, by deviation category, and by whether a CAPA was raised. Compare like with like. Variation within a group of similar records is the signal worth chasing; variation between different kinds of records is often just the process working as designed.
Connect Findings to the Quality System
Findings from process mining should enter the quality system through its normal routes. A workflow redesign goes through change control. A training gap goes to the training owner. A recurring measure, such as rework rate at QA review, can become one of the performance indicators ICH Q10 asks management to review for deviation, CAPA, and change management processes.10 Q10 also lists improvements to the quality system and its processes, and the allocation or reallocation of resources, among the possible outcomes of management review.10 Process mining gives management a better basis for both.
What good looks like after a first analysis. One record type analyzed from a controlled export. A documented data quality check with known limits. Results reviewed first with process owners. One improvement chosen, approved through change control, with a measure and a date to look again. A clear decision on whether the analysis becomes routine, and if so, what testing it needs before it does.
Questions to Ask Before Funding a Process Mining Effort
For a senior quality, IT, or operations leader deciding whether to back this work, a short set of questions separates a useful effort from an expensive one.
What Decision Will This Inform?
If nobody can name the decision, such as a workflow redesign, a staffing change, or a training focus, the analysis will produce interesting pictures and no action.
Can We Produce a Clean Export?
Ask for a sample event log for one record type before any tool discussion. Its condition tells you more about the effort ahead than any vendor demonstration.
Who Owns the Process and the Result?
The process owner, usually in quality, should own the questions and the conclusions. IT or analytics owns the pipeline. Agreeing this in advance avoids a result nobody acts on.
What Is the Intended Use?
One-time analysis, routine monitoring, or decision support. Decide now, write it down, and plan the assurance effort to match. Revisit it when the use changes.
A sensible first scope. Closed deviations from one or two sites, twelve to twenty-four months, workflow status changes only, aggregated to role and site. Two questions: where does time go, and where does work loop back? That scope is small enough to finish quickly and large enough to show whether the method is worth extending.
Conclusion
Quality organizations already hold a detailed record of how their deviation, CAPA, and change control processes run. Regulations require that history to exist, and most of it goes unused beyond individual record review and summary counts. Process mining turns that history into a picture of the process as it operates: where records loop back, where they wait, and where they cross from one site or function to another. The methods are mature and well documented. What matters most in a GxP setting is the discipline around them: questions defined before extraction, a controlled export, honest checks on data quality, aggregation that keeps the focus on the process rather than on people, and a clear decision about intended use that sets the validation effort.
Sakara Digital works with pharma and biotech organizations on quality systems, data, and the analytics built on them. If you are considering process mining for deviations, CAPAs, or change controls and want an independent view on where to start, what your data can support, and how to keep the analysis consistent with your validation approach, we are happy to have that conversation.
For Further Reading
For Further Reading
- Fix Your Processes Before You Automate Them With AI
- Deviation Trending Analytics: From Excel to Real-Time Dashboards
- Managing a Multi-Site Deviation Backlog With One Quality Team
- Clearing a Change Control Backlog: A 90-Day Operating Plan
- Cleaning Legacy Deviation and CAPA Data Before an eQMS Migration
References & Sources
- van der Aalst, W., et al. “Process Mining Manifesto.” Business Process Management Workshops (BPM 2011), Lecture Notes in Business Information Processing, vol. 99, Springer, 2012, pp. 169-194. Open-access copy: https://air.unimi.it/retrieve/dfa8b98f-bf2d-748b-e053-3a05fe0a3a96/PMM.pdf
- Bose, R.P.J.C., Mans, R.S., and van der Aalst, W.M.P. “Wanna Improve Process Mining Results? It’s High Time We Consider Data Quality Issues Seriously.” 2013 IEEE Symposium on Computational Intelligence and Data Mining (CIDM), pp. 127-134. https://research.tue.nl/en/publications/wanna-improve-process-mining-results-its-high-time-we-consider-da-2/
- Suriadi, S., Andrews, R., ter Hofstede, A.H.M., and Wynn, M.T. “Event Log Imperfection Patterns for Process Mining: Towards a Systematic Approach to Cleaning Event Logs.” Information Systems, vol. 64, 2017, pp. 132-150. Pattern catalog: http://www.workflowpatterns.com/patterns/logimperfection/
- Wynn, M.T., van der Aalst, W., Verbeek, E., and Di Stefano, B. “The IEEE XES Standard for Process Mining: Experiences, Adoption, and Revision.” IEEE Computational Intelligence Magazine, vol. 19, no. 1, 2024, pp. 20-23. https://pa.win.tue.nl/the-ieee-xes-standard-for-process-mining-experiences-adoption-and-revision-society-briefs/
- Berti, A., Koren, I., Adams, J.N., et al. “OCEL (Object-Centric Event Log) 2.0 Specification.” arXiv:2403.01975, 2024. https://arxiv.org/abs/2403.01975
- van der Aalst, W.M.P., Reijers, H.A., and Song, M. “Discovering Social Networks From Event Logs.” Computer Supported Cooperative Work, vol. 14, no. 6, 2005, pp. 549-593. https://research.tue.nl/en/publications/discovering-social-networks-from-event-logs/
- Berti, A., van Zelst, S.J., and van der Aalst, W. “Process Mining for Python (PM4Py): Bridging the Gap Between Process- and Data Science.” arXiv:1905.06169, 2019. https://arxiv.org/abs/1905.06169
- Munoz-Gama, J., Martin, N., Fernandez-Llatas, C., et al. “Process Mining for Healthcare: Characteristics and Challenges.” Journal of Biomedical Informatics, vol. 127, 2022, article 103994. https://pa.win.tue.nl/process-mining-for-healthcare-characteristics-and-challenges/
- Loacker, P., Pöchtrager, S., Fikar, C., and Grenzfurtner, W. “Process Mining-Enhanced Quality Management in Food Processing Industries.” International Journal of Productivity and Performance Management, vol. 74, no. 4, 2025, pp. 1326-1346. https://www.emerald.com/insight/content/doi/10.1108/IJPPM-06-2024-0377/full/html
- International Council for Harmonisation. “ICH Q10: Pharmaceutical Quality System.” Step 4, June 2008. https://database.ich.org/sites/default/files/Q10%20Guideline.pdf
- U.S. Code of Federal Regulations. “21 CFR 211.192: Production Record Review.” eCFR. https://www.ecfr.gov/current/title-21/chapter-I/subchapter-C/part-211/subpart-J/section-211.192
- European Commission. “EudraLex Volume 4, Annex 11: Computerised Systems.” January 2011. https://health.ec.europa.eu/system/files/2016-11/annex11_01-2011_en_0.pdf
- U.S. Food and Drug Administration. “Computer Software Assurance for Production and Quality Management System Software.” Guidance for Industry and FDA Staff, February 3, 2026. https://www.fda.gov/media/188844/download
- U.S. Food and Drug Administration. “Data Integrity and Compliance With Drug CGMP: Questions and Answers.” Guidance for Industry, December 2018. https://www.fda.gov/media/119267/download
- ISPE. “GAMP 5 Guide, 2nd Edition: A Risk-Based Approach to Compliant GxP Computerized Systems.” July 2022. https://ispe.org/publications/guidance-documents/gamp-5-guide-2nd-edition








Your perspective matters—join the conversation.