Improving hospital layout planning through clinical pathway mining

Clinical pathways (CPs) are standardized, typically evidence-based health care processes. They define the set and sequence of procedures such as diagnostics, surgical and therapy activities applied to patients. This study examines the value of data-driven CP mining for strategic healthcare management. When assigning specialties to locations within hospitals—for new hospital buildings or reconstruction works—the future CPs should be known to effectively minimize distances traveled by patients. The challenge is to dovetail the prediction of uncertain CPs with hospital layout planning. We approach this problem in three stages: In the first stage, we extend a machine learning algorithm based on probabilistic finite state automata (PFSA) to learn significant CPs from data captured in hospital information systems. In that stage, each significant CP is associated with a transition probability. A unique feature of our approach is that we can generalize the data and include those CPs which have not been observed in the data but which are likely to be followed by future patients according to the pathway probabilities obtained from the PFSA. At the same time, rare and non-significant CPs are filtered out. In the second stage, we present a mathematical model that allows us to perform hospital layout planning decisions based on the CPs, their probabilities and expert knowledge. In the third stage, we evaluate our approach based on different performance measures. Our case study results based on real-world hospital data reveal that using our CP mining approach, distances traveled by patients can be reduced substantially as compared to using a baseline method. In a second case study, when using our approach for reconstructing a hospital and incorporating expert knowledge into the planning, existing layouts can be improved.

Thi s v e r sio n is b ei n g m a d e a v ail a bl e in a c c o r d a n c e wit h p u blis h e r p olici e s. S e e h t t p://o r c a . cf. a c. u k/ p olici e s. h t ml fo r u s a g e p olici e s. Co py ri g h t a n d m o r al ri g h t s fo r p u blic a tio n s m a d e a v ail a bl e in ORCA a r e r e t ai n e d by t h e c o py ri g h t h ol d e r s .
Keywords Machine learning · Sequential pattern mining · Clinical pathways · Hospital layout planning · Healthcare operations management

Introduction
Planning the layout of a new hospital or reconfiguring existing ones is a complex task and the development of quantitative planning approaches has gained attention since the late 1970s (Elshafei 1977). Confusing layouts can add to patients' anxiety (Landro 2014) and uncertainty in patient flows challenges strategic decision making in healthcare (Blumenthal 2009). Also, new treatment methods, length of stay reduction and shifting from inpatient to outpatient care can lead to variation and uncertainty in hospital-wide patient flows. Therefore, learning significant clinical pathways (CPs) from data and dovetailing them with strategic hospital decision making in the context of hospital layout planning is the focus of this study.
We approach the problem in three stages: In the first stage, we choose an algorithm to learn significant CPs from large transactional data. In that stage, we address the problem to determine CP probabilities including those which have not been observed in the data but are likely to occur in the future. In the second stage, we present a mathematical model that allows us to perform hospital layout planning decisions based on the CPs and their probabilities as learned in the first stage. In the third stage, we evaluate our approach based on a real-world setting using different performance measures.
The remainder of this paper is structured as follows. In the next section, we review literature on CP mining and the use of CPs for hospital operations management. In this section, we also differentiate our work from other hospital layout planning approaches and highlight similarities and differences with the estimation of rare event probabilities. In Sect. 3,w e provide a description of the sequential pattern mining approach employed in our study. In this section, we also present a mathematical model for hospital layout planning and define performance metrics that will be evaluated in our study. In Sect. 4, a brief computational study is provided in order to demonstrate the effectiveness of our approach based on hypothetical data. In Sect. 5, we give a presentation of our results using real data. We finally provide a conclusion and outline streams for further research.

Related work
We break down related work into the following four streams: In the first stream, we delimit our work from evidence-based use of CPs since our work follows paradigms from data-driven CP and process mining. In the second stream, we review the use of CPs driven by healthcare operations management. We then highlight similarities and differences to related work on hospital layout planning problems and delimit our work from the estimation of rare event probabilities and sequential pattern mining approaches. We finally provide a summary of similarities and differences with existing work.

Medical-, data-driven clinical pathway and process mining
CPs support a consistent application of evidence-based medicine for the best patient outcomes. Often this has the effect of placing an emphasis on the reduction of unwarranted variation in clinical practice (Wennberg et al. 1977). Similarly, van de Klundert et al. (2010) define CPs as standardized, typically evidence-based health care processes. Instead of build-ing our research on the paradigm of CPs as a sub-discipline of evidence-based medicine, we follow a data-driven approach to infer CPs from data which has been studied by Zhang et al. (2015a), among others. The novelty of our approach is, however, that expert opinions can be incorporated into the learning process as Sect. 3 will reveal and that we bridge the gap between CP mining and operational decision making.
Mining healthcare processes has been the focus of previous literature and a review of approaches is provided by Rojas et al. (2016). Mans et al. (2015) conclude that data mining techniques cannot be used for process discovery, conformance checking, and other forms of process analysis. Some research exists that analyzes process variation in healthcare based on similarity measures between CPs (e.g. Huang et al. 2013;Combi et al. 2009). This is different to our work since we will allow for variations in CPs while filtering out non-significant ones. Adherence in CPs is investigated by van de Klundert et al. (2010). Zhang et al. (2015b)and Zhang et al. (2014) apply a hierarchical clustering approach to determine the most likely CP. The authors study the patients' health conditions and treatment approaches. Iwata et al. (2013) use a clustering and temporal analysis approach in order to identify missing information in existing CPs.

Healthcare operations-driven use of clinical pathways
Using CPs as an input of their model, Cardoen and Demeulemeester (2008) provide a strategic instrument for evaluating future changes to the hospital setting. Their simulation can be used to evaluate extreme or unrealistic conditions which can provide insights in the system. On an operational decision level, CPs are used in a variety of patient scheduling applications (Gartner and Padman 2017). For example, Gartner and Kolisch (2014) use CPs to schedule elective patients hospital-wide on scarce resources. Their work uses elective patients' CPs as an input parameter in their models and assume that once an elective patient contacts the hospital, the pathways are fixed. However, our work bridges strategic decisions with sequential pattern mining for both, elective and non-elective patients.

Hospital layout planning
In general, layout planning aims at arranging organizational units inside a building such that the available area is used optimally and total distances are minimized. Most layout planning applications arise in industrial environments. When optimizing manufacturing facilities, the most common objective is to minimize traffic areas and traveled distances for produced goods. Thus, reliable information about movements of goods during the production process is needed. Hospital layout planning is typically located on a strategic decision level. Problems are reviewed, among others, in Arnolds and Nickel (2015)w h e r eElshafei (1977)i sm o s t relevant for our work because of their travel distance minimization objective and model formulation as a quadratic assignment problem. However, we not only consider the planning of new hospitals but also the reconstruction and improvement of existing ones. We allow for an existing hospital to fix facilities at their location by fixing variables. Furthermore, we add constraints which bound the maximum travel distances between specialties.

Estimation of rare event probabilities and sequential pattern mining
Estimating the probability of rare CPs has similarities to estimating rare event probabilities. Bachoc et al. (2015) approached the latter problem by adapting the Hastings-Metropolis algorithm on Markov chains. Guyader et al. (2011) estimate the tail probability given quantiles or the other way around to predict quantiles using a tail probability. Similarly to Guyader et al. (2011), they extend the Hastings-Metropolis algorithm. Both approaches are different to our study because, based on the similarity of patient flows, we merge states and rare events that occurred in our data can be filtered out. Also, rare events which have not been observed yet but might occur in the future can be assigned a probability.
Sequential pattern mining discovers frequent sub-sequences as patterns in a sequence database and a taxonomy of different algorithms is provided by Mabroukeh and Ezeife (2010). Carrasco and Oncina (1994) described an algorithm which is based on generating a prefix tree and then state-merging is carried out using a similarity measure. Jacquemont et al. (2009) extended this algorithm. Similarly, Herbst and Karagiannis (1998) use a Bayesian model merging approach for the induction of Hidden Markov Models. The difference between (Herbst and Karagiannis 1998;Carrasco and Oncina 1994;Jacquemont et al. 2009) lies in particular in the state merging process where Jacquemont et al. (2009) employ a statistical view of it which we follow in our work. Moreover, we incorporate blacklisting into the merging which is not addressed in any of the discussed works.
In conclusion, the approaches proposed in this paper can be categorized into and differentiated from the literature as follows: First, we select and implement a machine learning approach in which clinical activities and their relations between each other are learned from data. Second, we provide a mathematical model that incorporates this information. Finally, we present evaluation criteria based on cross-validation in order to evaluate the machine learning approach in combination with layout planning. The sequential pattern mining can cope with forbidden state merges so that e.g. expert knowledge can be taken into account by introducing a blacklist. Thus, we are able to incorporate a decision maker's opinion into the layout planning procedure which is especially important when reconfiguring a layout as our study will reveal in Sect. 5.

Methods
In order to detect significant CPs, we evaluate a sequential pattern mining algorithm devised by Carrasco and Oncina (1994) which is extended by Jacquemont et al. (2009). The rationale to select this algorithm from the literature on sequential pattern mining is because the learning approach has only a weak representational bias (van der Aalst 2011) on the process model (Weber 2014). One explanation is that we focus on the hospital-wide specialty flow and therefore, we can neglect parallel bookings on different specialties. The algorithm learns a probabilistic deterministic finite state automaton (PDFA) which is, under certain conditions, equivalent to learning a hidden Markov model (see Dupont et al. 2005). For standard textbooks covering automata theory we refer to Hopcroft et al. (2007).

Learning a probabilistic deterministic finite state automaton (PDFA)
The algorithm first learns a probabilistic prefix-tree acceptor and afterwards, states are merged recursively by using a similarity measure.
Probabilistic Prefix Tree Acceptor (PPTA) In a PPTA which can be drawn as a graph, states are represented by a circle. In each circle, we write the index of the state and, after a colon, the probability to be final. States which have a probability greater than zero to be final are double-circled. The initial state is labeled by a "start" arc pointing it. Each transition between the predecessor and the successor state is represented by an arc. The label on each transition consists of the transition symbol and the corresponding transition probability in parentheses. The transition symbol is, in our healthcare application, the clinical procedure which leads from one state to another. The proportion of sequences coming from the previous state to the following state is the probability of this transition. Using training sequences e.g. from Table 1a in Sect. 4, a PPTA can be constructed which is shown in Fig. 1 in Sect. 4. Probabilistic Deterministic Finite State Automaton(PDFA) PDFAs are a generalization of PPTAs and we can formally describe them as follows: Let Q denote a finite set of states with state q i ∈ Q ∀i ∈ N ≥0 .Letq 0 ∈ Q denote the initial state. Let Σ be an alphabet in which letters are denoted by z ∈ Σ and z = # denotes the termination letter of a sequence. In our study, a letter corresponds to a 'clinical activity'. The term is used as a synonym with 'clinical procedure'. A clinical activity is performed on a facility (such as an operating room, imaging device or ward). Let q(q i , z) → q j be an injective transition function leading to state q j from state q i with letter z. Specifically, q i is equal to q j when we have a loop on state q i and letter z.L e tπ(q i , z) ∈[ 0, 1] be a probability function on the transitions and let π F (q i ) ∈[ 0, 1] be a function that assigns to each state a probability to be final. Then, A:= (Q,Σ,q (q i , z) , q 0 ,π (q i , z) ,π F (q i )) is a tuple that defines our PDFA.

State merging
In order to avoid an overfitting phenomenon, the algorithm to build a PDFA based on a PPTA merges states. This means that states are chosen in a lexicographical order and if they are sufficiently similar, according to a compatibility function, they are merged. This function recursively tests if the frequencies of each letter outgoing from the two considered states are not statistically different. Based on Hoeffding's bound (see Hoeffding 1963), this test decides that two states q 1 and q 2 can be merged if the condition described by Eq. (1) holds true. Here, α aut represents a generalization parameter while n(q 1 ) and n(q 2 ) are the number of sequences entering in q 1 and q 2 , respectively.
Blacklisting-enhanced state merging In order to avoid sequences to be generated that are from a medical point of view irrelevant, we check each time when we merge two states whether the incoming letter to and the outgoing letter from that new state are reasonable.
To avoid that two letters forbiddingly follow each other, we introduce a set B (blacklist) of forbidden tuples of letters, denoted by (z i , z j ) ∈ B.

Improving hospital layout planning through clinical pathway mining
In addition to material transportation costs that arise in industrial applications the most significant characteristic in a service environment of a hospital are the distances traveled by patients: Long travel distances do neither support the healing process nor patient satisfaction. To minimize total distances, accurate movement probabilities have to be determined which we will evaluate by combining the PDFA with a layout planning problem which will be introduced next.

Problem description
We extend the well-known quadratic assignment problem by the possibility to fix specialties to locations as well as taking into account maximum distances between specialties. The formal description of our hospital layout problem reads as follows: Let S denote the set of specialties and let L denote possible locations in a hospital in which specialties can be located. Let f i,k be the transition frequency between specialty i ∈ S and specialty k ∈ S. Here, a specialty does not only refer to specialty departments such as the radiology department but also to facilities such as the operating theater. Furthermore, let d j,l denote the distance between location j ∈ L and location l ∈ L.L e tC denote a set of specialty tuples and let D i,k be the maximum distance allowed between two specialties (i, k) ∈ C, for example, between the surgery room and the ICU. Let W denote a whitelist which is a set of tuples (i, j) ∈ W representing specialty i ∈ S and location j ∈ L. Especially, when specialties such as the emergency department must be located in a defined area as for example near the entrance or when a hospital evaluates reorganization this is an important feature as we will learn in our experimental study.

Model formulation
Using the binary variables we model the hospital layout problem as follows: Objective function (2) minimizes the traveling distances and Constraints (3) ensure that each specialty is assigned to exactly one location. Constraints (4) ensure that each location contains exactly one specialty. Constraints (5) ensure that a specialty is fixed at its desired location while Constraints (6) ensure that maximum distances between two specialties are not exceeded. Variable definitions and the domains are provided by (7). The presented model is non-linear but can be linearized by introducing additional continuous variables (Xia and Yuan 2006).

Evaluation methods and metrics
The clinical pathways and the layouts can be evaluated using different methods and metrics which are introduced in the following.

Mean absolute deviation (MAD) between clinical pathway probabilities
A trivial baseline approach is to split the transactional data into a training and testing set. For each pathway, the relative frequency is computed. The absolute differences in probabilities between the pathway from the training set and the testing set are then calculated and averaged. Appendix refapp:corssval provides implementation details of this method in Java. Another approach to calculate the MAD between pathway probabilities is to calculate the pathway probabilities by using the PDFA obtained from the learning set. The absolute differences in probabilities between the PDFA approach and the testing set are then calculated and averaged.

Significant clinical pathways
Given a maximum length l, we can enumerate pathways having length 1, 2,...,l.Forexample, using the alphabet Σ ={ A, B, C} and maximum length l = 5, we can enumerate pathways from A, AA, AAA,...,CCCCB, CCCCC. However, only a fraction of these pathways are actually significant. To check whether a pathway is significant, we introduce the percentile α sig ,thez-value from the standard normal distribution z α and the sample size N in the training sample. Given CP w, its probability p(w), the sample size from the training set N and the z-value from the standard normal distribution z α , we obtain a threshold k using the following equation (see Jacquemont et al. 2009): If the probability p(w) of pathway w is larger than its threshold k, the pathway can be considered significant.

Error of the layout planning problem (ELPP)
In order to demonstrate the effectiveness of the automaton approach for layout planning, we can incorporate significant clinical pathways into the layout planning problem as formulated in models (2)-(7). Based on the assignment of specialties to locations determined by the mathematical program, we calculate the walking distances using the test data. We finally compare them with the distances obtained using perfect information. In doing so, we assume that both the training and test data are known. We denote this measure as ELPP.

Cross-validation
Rather than using one training and one test set of CPs, we can carry out cross-validation experiments (Bishop 2006;Witten and Frank 2011). Suppose, we have a set of folds F with consecutive integer numbers running from 1, 2,...,|F|, for example, |F|=10 in the case of 10-fold cross-validation. In this case, the set of folds comes up to F :={1, 2,...,10} where each fold f ∈ F contains disjoint subsets of the observed transactional data. We index unique CPs by indices p ∈ P.Letπ train p, f be the probability of each unique pathway p ∈ P for the training fold f ∈ F and let π test p, f be the probability of pathway p ∈ P for the test fold f ∈ F . Then, using Algorithm 1 we determine the MAD across the |F| folds.
Similarly, we determine the ELPP across folds F using Algorithm 2. Calculate layout X f and ELPP f Once we have learned the probability of each significant pathway p ∈ P, we split them into a set of tuples (i, j) ∈ E which we denote as edges where i and j represent letters i.e. clinical activities in the pathways or facilities to be visited. Based on the layout X f learned in fold f ∈ F , we can now compute the walking distances based on the distribution of pathways in the test set of pathways. Based on the MAD and ELPP measures, we can determine confidence intervals. In our experimental study, we use the paired corrected t-test (Nadeau and Bengio 2001)i m p l emented in the Java-based WEKA machine learning library from Witten and Frank (2011).

Hospital-wide layout planning under uncertain clinical pathways: an example
The following example illustrates the approach for learning significant CPs. We will demonstrate the effectiveness of the automaton approach by using two different values for the generalization parameter α aut . Furthermore, we show how we feed the result into the layout planning problem. Assume, we have an alphabet Σ ={A, B, C} which represents the clinical procedures "radiotherapy procedure", "diagnostic procedure", and "surgical procedure" encoded by the letters A, B and C, respectively. Table 1a shows a sample set of 10 training sequences which will be used to learn the trivial and the automaton approach. The 10 testing sequences shown in Table 1b will later be used to evaluate the approaches.

Learning a probabilistic deterministic finite state automaton (PDFA)
To construct the PDFA, we first have to build a PPTA as explained in Sect. 3.1. In our example dataset shown in Table 1, we observe 10 sequences, of which 6 and 4 sequences start with letter A and B, respectively. Hence, we branch after the root state 0 to states 1 and   2. Branching after these states is similar. For example, of the 4 sequences which start with a B, 2 sequences have an A as second letter leading to state 10 with probability π(2, A) = 2 4 . Then, sequence BA terminates at state 10 with a 50% chance. The final PPTA is shown in Fig. 1. Now, if we evaluate the probability of, for example, pathway ABB, we start at state 0 and reach state 1 by the first letter A. The state is reached by 6 of 10 sequences and as a consequence the transition probability is π(0, A) = 6 10 . Using the second letter B as transition symbol, we reach state 3 with transition probability π(1, B) = 4 6 .Now ,thethird letter B of the sample pathway leads to state 6 with transition probability π(3, B) = 1 4 . Since our pathway has no more letters, we terminate at this state by probability π F = 1. We can now compute the probability of the pathway ABB by the product of the transition probabilities times the acceptance probability of the state reached after the last transition. π ABB = 6 10 · 4 6 · 1 4 · 1 1 = 24 240 = 1 10 .

Improving layout planning through clinical pathway mining
Now, assume we have the following distance matrix between the locations d i

Evaluation results
Comparing the two PDFAs that were generated above underlines that α aut has a substantial influence on the merging process and thus on the generalization of the original data. Using α aut = 0.2, a very generalized PDFA with only node 0 is left while using α aut = 0.9 leads to a less generalized automaton with 3 from the original set of 14 states. Another observation is that all sequences from Table 1(a) are represented by both PDFAs. In addition, the automaton for α aut = 0.2 can represent the sequence CBAAwhich is not included in the learning data, see Table 1(a). However, that sequence is not represented by the automaton's language for α aut = 0.9, see Fig. 4b. The reason for this difference in the generalization of the original data is that α aut appears in the denominator of the Hoeffding's bound calculation. The bigger the value of α aut the lower the threshold and, as a consequence, the lower the generalization. On the contrary, a small value of α aut leads to a more general automaton.

Mean absolute deviation (MAD) between clinical pathway probabilities
From the CPs of Table 1, we observe in total 16 unique pathways. The probability distributions of these pathways using the trivial and the automaton approach as well as the MADs are shown in Table 2. The figures reveal that the trivial approach fails to estimate probabilities of pathways which are not in the training set. Using the automaton approach, however, the pathway CB which is not in the training set receives a probability of 0.011 and 0.018 for α aut = 0.2andα aut = 0.9, respectively. The pathway CBAAwhich is failed to be discovered by the automaton approach  with α aut = 0.9, receives a probability of 0.001 for α aut = 0.2, similar to the ones of BAAC and AAC.

Significant clinical pathways
To compute significant pathways, we decide to use a large α sig = 0.33 because using a small one would give us no significant CP at all. We get z α = 0.440 while we observed N = 10 pathways from the training data (see Table 1(a)). For example in the case of w = ABA and the automaton with α aut = 0.9, p(ABA) = 0.027, the threshold comes up to k = 0.440 · 0.027·(1−0.027) 10 = 0.0226. Since this is smaller than the probability of the pathway (which was 0.027), the pathway is significant. Significant CPs are flagged by an asterisk in Table 2.

Error of the layout planning problem (ELPP)
We compute the walking distances in the optimal solution which means that we determine the hospital layout using the testing sample of pathways. The ELPP is then the difference between the walking distance from the perfect information problem and the one obtained with the trivial or automaton approach. The layouts and the ELPP are shown in Table 3.

Experimental investigation
In the following, we provide an experimental investigation of the presented methods. We first give a description how we generated the sequences (CPs) followed by an overview of the hospital and its distances between different locations. Afterwards, our evaluation metrics are introduced followed by a presentation of the results.

Data and sequence generation
We tested the sequential pattern mining and layout planning approach experimentally on data from a 350-bed sized hospital in Germany. Similarities between the U.S. healthcare system and other developed-world countries are that the data was collected for the billing of diagnosis-related groups (DRGs). As a consequence, we expect a similar data quality in other DRG systems such as U.S. and developed-world countries that employ DRG systems. We extracted 15,858 CPs from the hospital information system which corresponds to the same number of patients observed in the year 2011. We generated sequences using a Java routine which accesses a MySQL database that contains three tables: A master table with DRG and demographic patient information, a table containing timestamps and clinical procedures coded by the International Classification of Procedures in Medicine (ICPM) and a table which contains timestamps when the patient was admitted and discharged from each specialty. We joined the three tables by patient IDs, sorted the result by patient ID and timestamp and relabeled the ICPM code or specialty code with a unique letter. We finally concatenated the letters of each patient to get the sequences. Table 4 provides an overview of our alphabet. For example, the sequence XBNBJGBX represents a patient who enters the hospital and is admitted to the surgical ward. Afterwards, he receives a cardiovascular check in the functional diagnostics unit before he gets back to the surgical ward. Next, he receives a surgery and is admitted to the ICU. Then, he recovers at the surgical ward and leaves the hospital at its exit. The entrance, exit, functional and radiology diagnostic units shown in Fig. 5 are located on the lower level where the offices of the administrative staff are shown on the lower part of the picture. The ICU and the operating rooms are located on the first floor of the building and shown in Fig. 6a. Wards are located on the second to fifth floor and are shown in Fig. 6b.

Distance matrix generation
To run our experiments, we set up transfer time matrix (9). The order of the columns/rows represent the order of the letters, see Table 4. For example, the first column/row represents the current position of the internal medicine department while the second column/row represents the current position of the surgery department and so on. The fifth floor has three positions in which the urology, ear, nose, throat (ENT) and ophthalmology deparment are located. As a consequence, distances are zero between these locations, see column/row 3.
The rationale behind using transfer times instead of distances is because elevators exist in the hospital which are typically used when patients are transported. The data reflects an average working day. Each entry represents the time required in seconds from location j to location l.

Evaluation metrics
The sequential pattern mining approach is assessed using two evaluation metrics: Mean absolute deviation (MAD) and the error based on the layout planning problem (ELPP). The MAD is assessed by calculating the mean absolute difference between the probability distribution of significant CPs using the automaton approach and the actual probability distribution. We also assess a trivial baseline approach which uses the prior probability distribution of CPs.

Results
All computations were performed on a 2.4 GHz PC (Intel Core i7 4700MQ) with 32 GB RAM running a Windows 7 operating system. The mathematical model was coded in Java in an ILOG Concert environment. The solver used was ILOG CPLEX 12.6 (64 bit). We implemented the sequential pattern mining approach in Java, too.
We now compare the performance of the approaches broken down by MAD and ELPP and provide a comparison of the layout of our collaborating hospital with the layout that minimizes the ELPP based on the optimal parameter combination found by varying α sig and α aut . Finally, we show the results of our discussion of the solution with the hospital. Table 5 shows our 2-fold cross-validation experiments in which we varied the generalization parameter α aut . The table reveals that for the cross-validation experiments the lowest MAD is 0.083 and the lowest ELPP is 147.222. The figures also show that the MAD increases with increasing α aut which leads to the hypothesis that an over-generalized automaton overestimates some pathway probabilities. Figure 7a, b show the MAD and ELPP results, respectively. We varied α aut while we fixed α sig = 0.001. In addition, we restricted the maximum length of each CP to 5.

Results of the MAD and ELPP metrics
The results using MAD as metric show that using a small α aut value outperforms the trivial approach. More precisely, at a level of α aut = 0.001 the MAD becomes approximately 1.65E−4 which is lower than the MAD of the trivial approach which is 1.69E−4. Another observation is that the slope remains negative but it becomes more and more flat until α aut = 0.8 is reached.
Similarly, the ELPP results show a descent of the error for small α aut . A more detailed analysis reveals that at α aut = 0.1 the trivial approach which has an ELPP=17,500 is outperformed. However, with α aut > 0.4, the ELPP of the automaton approach again becomes worse than the trivial approach.

Evaluation of the hospital layouts
In order to see how the specialties would optimally be located we will use the whole sample data and evaluate the trivial as well as the automaton approach to calculate the probabilities and solve the layout planning problem. The sample data is now perfect information, since it represents the actual CPs observed at the collaborating hospital. Furthermore, we fix the entrance and exit at their original location. Table 6 shows the current hospital layout as well as the layouts obtained by the trivial and the automaton approach under perfect information.

Fixing hospital specialties based on recommendations from the hospital
Once again, the entrance and exit have been fixed on their current location. The only specialties that remain on their original position according to both approaches are the surgery department and urology. Both approaches locate the operating theater next to the surgery department which is reasonable. In most cases the trivial and the automaton approach give the same recommendations. Only the radiology department and orthopedic department are interchanged.
Although both approaches provide similar results we have to reconsider the allocation with regard to practicability when changing the current layout. Departments as the operating theater and radiology department can hardly be moved to another location as there are lots of special machines that cannot easily be moved to another location. That is why we additionally fixed the intensive-care, radiology department, operating theater and functional diagnostics. The resulting allocations for the different approaches can be seen in Table 7. Having fixed some specialties, both approaches deliver the same result except for the internal medicine and the surgery department which are interchanged. They stay on their current position with the automaton approach. The urology department and ENT specialty are recommended to stay at floor 4. Departments that should be located in upper floors than before are the ophthalmology department from floor 4 to 5, the orthopedics department from floor 3 to 4 and internal-medicine, following the trivial approach, from floor 2 to 3. It is recommended that the gynecology department moves down from floor 5 to 3 and the surgery department regarding to the trivial approach from floor 3 to 2. A possible explanation for this setup may be that the gynecology department and surgery department should be located closer to the functional areas in the ground and first floor.

Limitation of using transfer times
When setting up the transfer time matrix, we argue that patients use elevators to get from one specialty to another. This is true for patients that have to be transported, for example, from a ward to the operating theater. However, some patients may simply use the stairs for getting from one floor to another. Also, waiting times for an elevator may vary considerably during a working day. For example, there may be high traffic during breakfast, lunch and dinner times when food has to be transported to the specialties and back. Furthermore, times are depending on walking speeds which might be very different for different patient types or their transportation mode (walking, wheelchair and bed).

Generalizability of the results
The approaches presented in this paper enhance the current state of the art in literature on the strategic decision level in healthcare operations management. It links the work of Cardoen and Demeulemeester (2008) on the strategic decision level with clinical medical work on CP mining. From an operations management point of view, the sequential pattern mining approach presented could be used in a patient scheduling problem which is located on an operational decision level, see Gartner and Kolisch (2014).

Calibration of α aut
As could be seen in the example and the computational results, the automaton-based approach is sensitive to the α aut parameter which controls the state merging process. A parameter optimization of α aut should be carried out before applying the approach in practice. Otherwise, it can happen that a trivial approach outperforms the automaton-based pathway mining approach.

Applicability for existing and new hospitals
Our approach can be used for both applications: reorganization of existing and building of new hospitals. The difference is that for reorganizing a hospital, specialties would be fixed to locations (see Constraints (5)). This might also be necessary when planning a new hospital where for example the emergency room should be near to the entrance area on the ground floor. Fixing any specialty in advance leaves enough room for any other improvement (total travel distances or transfer times) that might be achieved by changing the location of the remaining specialties. However, the improvement potential may be reduced if some facilities are fixed to their locations rather than reorganizing or building the hospital without fixing variables.

Conclusion
In this paper, we have dovetailed clinical pathway (CP) mining with hospital-wide layout planning: First, we have selected and extended a machine learning approach to learn CPs from data. Then, we have presented a mathematical model for hospital layout planning which takes into account clinical pathways. It features not only the planning of new hospitals but also the reconfiguration of existing ones by partially fixing specialties to locations. We evaluated the approach in a cross-validation setting and have shown results based on different evaluation measures and level of detail. Depending on its generalization parameter, the chosen automaton approach outperformed a baseline approach significantly.
Future work will focus on parameter optimization. For example, a full factorial test design will be run to determine a (near optimal) generalization parameter α aut , paired with α sig which can filter out non-significant CPs. Alternatively, a heuristic search approach may be beneficial to determine both parameters.
Further extensions will be to evaluate patient types and transportation modes and trading off walking distances and transportation costs. Finally, we will test the applicability of our approach towards operational decisions such as hospital-wide patient scheduling.
Set of blacklisted tuples containing letters z i and z j π(q i , z) Probability function on the transition of q i given z ∈ Σ π F (q i ) Probability for state q i to be final f i,k Transition frequency between specialty i ∈ S and specialty k ∈ S d j,l Distance between location j ∈ L and location l ∈ L D i,k Maximum distance allowed between two specialties (i, k) ∈ C (i, j)C Set of tuples containing specialties i, j ∈ S q 0 ∈ Q Initial state q(q i , z) Transition function leading to a state given state q i and letter z ∈ Σ Q Finite set of states Σ

Set of letters (alphabet)
S Set of specialties W Whitelist of tuples (i, j) ∈ W which refer to specialty i ∈ S which is fixed on location j ∈ L Parameters and indices α aut Generalization parameter α sig Significance level to for CPs d j,l Distance between location j ∈ L and location l ∈ L D i,k Maximum distance allowed between two specialties (i, k) ∈ C f i,k Transition frequency between specialty i ∈ S and specialty k ∈ S π(q i , z) Probability function on the transition of q i given z ∈ Σ π F (q i ) Probability for state q i to be final Table 8 continued q 0 ∈ Q Initial state q(q i , z) Transition function leading to a state given state q i and letter z ∈ Σ (i, j) ∈ W Whitelist of tuples where specialty i ∈ S must be fixed on location j ∈ L Σ Alphabet Decision variables x i, j 1, if specialty i ∈ S is assigned to location l ∈ L, 0 otherwise Appendix 2: State merging with α aut =0.9 In order to demonstrate the influence of a different α aut on the merging process, we now employ α aut = 0.9 as parameter to calculate whether the PPTA's states from Fig. 1 can be merged. Using this α aut , we already see at the beginning that the states 0 and 1 cannot be merged because plugging α aut = 0.9 and the frequencies into Eq. (1)  |π(q(0, A)) − π(q(1, A))|= 6 10 − 0 = 0.600 > 0.458. Consequently, states 0 and 1 cannot be merged with α aut = 0.9. However, states 0 and 2 can be merged. Again, we skip the explanation of the remaining merging steps and show the final PDFA in Fig. 4b.