## 2 Background and Related Work
### Compliance Checking Using Process Mining  
In recent years, process mining has become increasingly popular as a technique for offline compliance checking, also called auditing [21; 48; 49]. Process mining is an analysis technique that uses process execution logs or traces that reside in an organization's information systems [50]. In general, process mining can be used (i) for _discovering_ process models from the execution logs, (ii) for process model _enhancement_, and (iii) for _conformance checking_[51]. Conformance checking enables the organization to assess whether the processes (operations) were correctly executed with respect to the prescribed set of rules [28].  
Process mining is also applied to the healthcare domain [51; 52; 53; 54; 55; 56; 57; 58], but the focus has mainly been on discovering a process model from the event log of diagnosis and treatment activities, often leading to'spaghetti models'. The goal of conformance checking for healthcare processes has received less attention thus far [59; 60; 61].  
Conformance checking assumes the existence of a process model and the observed behavior of actors as they execute the process. This observed behavior is recorded in an execution log, which consists of a list of the tasks that were performed, their timestamps and identifiers of the case for which the task was performed. Additional information, such as the actor performing the task and information about the task, can enable further analysis [62; 63]. In general [62; 63; 64], four metrics are proposed that aim to quantify the level of compliance:  
* Fitness indicates the degree to which log traces (in our context protocol executions) can be linked with valid execution paths in the process model, i.e., can the model reproduce the log traces?
* Appropriateness refers to the degree of accuracy to which the process model describes the observed behavior.
* Precision indicates how well a model represents the behavior seen in a log, especially in the context of superfluous activities.
* Generalization indicates whether the process model represents the process paths in a generic way or only the behavior observed in the data.  
In the healthcare context, a clinical protocol can be considered a process model and the information collected in the EHR can (partially) represent the observed behavior as an execution event log [30]. Hence, the fitness refers to compliance with the protocol, while the other metrics can be considered indicators for protocol validity, which is beyond the scope of this paper.  
In order to calculate the fitness, one first needs to align or replay the captured behavior in the form of execution traces with the (predefined) process model. This alignment will result in calculating four values, namely \(p\)-the number of produced tokens, \(c\)-the number of consumed tokens, \(m\)-the number of missing tokens and \(r\)-the number of remaining tokens. Ideal alignment results in \(m=0\) and \(r=0\). The fitness of a single trace is calculated as  
\[fitness(\sigma,N)=\frac{1}{2}\Big{(}1-\frac{m}{c}\Big{)}+\frac{1}{2}\bigg{(}1 -\frac{r}{p}\bigg{)} \tag{1}\]where \(N\) is the process model and \(\sigma\) is the trace. Fitness can be interpreted as a distance between the log traces and the closest valid execution path, and hence, assess process compliance. More details can be found in [50; 64].