## 4 Implementation of the Extended Algorithm  
### Model Discovery  
The proposed algorithm for discovering process models includes the basics of the Fuzzy Miner [27], which, in turn, originates from one of the first discovery techniques by [PERSON]. The main idea is to use the [PERSON] theory of discrete random processes to find the most probable transitions between events. The fundamental metric is significance, which can be determined for event classes (i.e., activities) and binary precedence relations over them (i.e., transitions). Significance is the absolute or case frequency of activities or transitions that occur in the event flow. It measures the relative importance of the behavior; events or precedence relations that are observed more frequently are deemed more significant. We use case frequency in conflict resolution, when two events may follow each other in any order in the event log, and process simplification, i.e., activity and transition filtering, and absolute frequency for statistics visualization.  
The algorithm constructs a directly follows graph (DFG) such as a finite state automaton, but with activities represented in nodes rather than in edges, i.e., Fuzzy map. Although this representation has known limitations [51; 52], it is more intuitive and understandable and can be easily transformed into other notations such as BPMN [32] or Petri Net [53]. Within the used visual notation, the green node (\"start\") indicates the beginning of the process and shows the total number of cases presented in the log, and the red node (\"end\") is related to a terminal state. The graph's internal nodes and edges show the absolute frequencies of events and transitions, respectively: the more value, the darker or thicker the element.  
However, fuzzy logic does not guarantee a reachable graph (see example in Figure 3), which is desired to see the complete behaviors of process traces. So, we modify model construction by performing the depth-first search (DFS) to check whether each node of the DFG is a descendant of the initial state (\"start\") and a predecessor of the terminal state (\"end\"). If the model does not match these conditions, we add edges with respect to their significance to the model until we obtain a reachable graph. This way, we overcome the possibility of discovering an unsound model (without the option to complete the process). Despite other DFG limitations [52], it permits cycles, which are crucial in our concept of meta-states, and is suitable for unstructured and complex processes, which exist in healthcare, due to constructing models with different levels of details.  
We show an example of a process model obtained by the proposed algorithm, adjusted manually, and resulting in 100% and 5% of activity and transition rates, respectively, in Figure 4. It means that only activities and transitions with significance more than or equal to 0.0 and 0.95, respectively, are included in the model. In other words, we aim to see only the main paths with all event variations. We attribute rates to the model as \(r_{a}/r_{t}\), where \(r_{a}\) is an activity rate, and \(r_{t}\) is a transition rate. The process model was discovered from the event data of a remote monitoring program for patients suffering from hypertension. More details about this and other datasets and process models for these event logs are given in Section 6.  
Figure 4: Model of the remote monitoring process performed for patients with hypertension.  
Figure 3: Example of disconnected model obtained by Disco ([[https://fluxicon.com/disco/](https://fluxicon.com/disco/)]([https://fluxicon.com/disco/](https://fluxicon.com/disco/)), accessed on 12 November 2022).