## 3 Proposed Metrics of Protocol Compliance
### The Criticality Level of Activities  
The clinical protocol typically incorporates a number of activities, each with potentially different levels of criticality (relative importance) to the desired outcome of the protocol. For instance, compare \"administering the correct dosage for an essential drug for a specific type of patient\" with \"checking the pillow/patient position\". In cases where a protocol incorporates activities of different relative criticality, the compliance level of a relatively more critical activity should have a larger influence on the overall level of compliance. Therefore, if available, this information should also be incorporated into the compliance metric.  
For this purpose, we propose using the OWA operator with an importance qualification [67; 68]. The importance qualification (\(I\)) transforms the weighting vector of the OWA operator from \(W\) into \(\overline{W}_{I}\). The weights of the weighting vector \(\overline{W}\) are defined as  
\[\overline{w}_{j}=\mu_{Q}\Bigg{(}\frac{\sum_{k=1}^{i}u_{k}}{\sum_{k=1}^{i}u_{k} }\Bigg{)}-\mu_{Q}\Bigg{(}\frac{\sum_{k=1}^{i-1}u_{k}}{\sum_{k=1}^{i}u_{k}} \Bigg{)} \tag{8}\]  
where \(u_{j}\) is the importance of the \(j\)-th largest element of the set \(\{a_{1},\ldots,a_{n}\}\)[68].  
In our context, first we calculate the compliance level for each trace (patient) \(t_{j},j=1,\ldots,m\) as  
\[c_{OWA_{1}}(t_{j})=F_{I}^{W}(\mu_{p}(a_{j1}),\ldots,\mu_{p}(a_{j_{j_{j}}}))=\sum _{k=1}^{r_{j}}\overline{w}_{k}b_{k} \tag{9}\]  
where \(r_{j}\) is the number of activities in the trace \(t_{j}\), and \(b_{k}\) is the \(k\)-th largest element in the set \(\{\mu_{p}(a_{j1}),\ldots,\mu_{p}(a_{j_{j_{j}}})\}\), i.e., set of compliance degrees of individual activities in trace \(t_{j}\). \(\overline{w}_{k}\) are the weights calculated according to (8), also taking into consideration the level of criticality or importance. Depending on the user's preference, the quantifier can also be defined linguistically with, _for all_, _most_, _almost all_.  
Next, we aggregate the compliance levels of the patients. We assume, however, that all patients are equally important. For this purpose, we use an OWA operator.  
\[C_{OWA_{1}}(P)=F(c_{OWA_{1}}(t_{1}),\ldots,c_{OWA_{1}}(t_{m})) \tag{10}\]  
Depending on the user's preference, averages can be used or the linguistic quantifiers (e.g., _all_, _most_, _almost all_, etc.) can be defined. We can interpret the obtained value depending on the used quantifiers, e.g., as the degree to which most patients have most of the important activities compliant with the protocol, provided that we use the linguistic quantifier _most_ to calculate the weighting vectors. The pseudo-code for calculating OWA-based compliance with the criticality of the activities is listed in Algorithm 3. The benefits of this method are that the use of quantifiers includes an expectation regarding compliance or non-compliance in the patient population and includes the importance factor for the activities.  
```
define targeted overall compliance define targeted compliance of an individual patient establish importance of the individual activities for each patient in the protocol calculate weights using (8) calculate patient's compliance using (9) calculate overall compliance using (10)
```  
**Algorithm 3** OWA-based compliance with criticality of the activities