Scheduling of Preventive Maintenance in Healthcare Buildings Using Markov Chain

: The optimization of maintenance in healthcare buildings reduces operating costs and contributes towards increasing the sustainability of the healthcare system. This paper proposes a tool to schedule preventive maintenance for healthcare centers using Markov chains. To this end, the authors analyzed 25 healthcare centers belonging to the three Healthcare Districts of Spain and built between 1985 and 2005. Markov chains proved useful in choosing the most suitable maintenance policies for each healthcare building without exceeding a speciﬁc degradation boundary, which enabled achieving an ideal maintenance frequency and reduced the use of resources. Markov chains have also proven useful in optimizing the periodicity of routine maintenance tasks, ensuring a suitable level of maintenance according to the frequency of the failures and reducing the cost and carbon footprint. The healthcare centers observed during the study managed to save more than 700 km of journeys, reduce emissions in its operations as a whole by 174.3 kg of CO 2 per month and increase the overall e ﬃ ciency of maintenance operations by 15%. This approach, therefore, renders it advisable to plan the maintenance of healthcare buildings.


Introduction
Maintenance is one of the most critical activities in healthcare buildings since the safety of users and workers depends on its proper management [1]. It also entails considerable operating costs, mainly due to the high intensity of use of their facilities [2] and limits the productivity of an organization [3]. In addition, maintenance activities are an important source of knowledge management [4].
The Markov chain is a tool used to predict the degradation suffered by a system by simulating its stochastic degradation process [5]. The most appropriate maintenance policies for the systems studied can be determined with this tool [6]. Markov chains have been used as a simulation, decision making and engineering prediction technique [7]. However, despite being considered a suitable method for analysis, the hospital engineering sector does not appear to apply it that much [8]. Markov chains have also been useful in biomedical research in both animal and human experimentation, including but not limited to, blood pressure, the state of the patient during an illness and safety culture of health organizations [9], but have not been applied to the maintenance of healthcare buildings.
Healthcare buildings are designed to develop promotion, prevention and rehabilitation actions related to primary healthcare, and differ from hospitals in that they do not have hospital beds and do not perform surgeries [10]; they are, therefore, smaller in size. These buildings are difficult to maintain [11] given their complex and costly facilities and equipment, the correct functioning of which conditions

Methods
The authors studied 25 healthcare centers belonging to three different healthcare districts in Spain, built between 1985 and 2005, from a quantitative point of view. The selection of these healthcare centers was made to be representative. They represent the same number of beds and are in the same region, so the activity generated by health care and the climate of the area is similar in the centers. When analyzing the data, statistical analysis techniques based on simple and multiple correlations were used to determine the degree of interconnection between the variables. In all cases, the standard error of the estimate and its correlation coefficient were calculated. A healthcare center is a building designed to carry out Primary Health Care Assistance actions, which has adequate staff and equipment to meet those needs. It is designed according to the World Health Organization welfare protocols to optimize the user's first contact with the Health System. It has a continuous operation 24-365, therefore the maintenance of them is critical. As the healthcare buildings studied here are isolated centers located in large urban centers, specialists should carry out routine patrol maintenance every certain period of time. The frequency with which each patrol maintenance is carried out was set in three possible alternatives: 7, 15 and 21 days. A Markov chain is split into different states. These states correspond to the states of the system analyzed [30]. For this research, a nine state Markov chain has been developed, representing the degradation of healthcare facilities. All nine states of the Markov chain are designated as the degradation scale. The probability of system degradation corresponds to the state transition probability, which is obtained based on the statistical study of maintenance incidents that occur in health centers. These probabilities constitute the transition matrix of the Markov chain, i.e., the coefficients of that matrix. These coefficients were determined through the statistical analysis of the information available in the engineering and maintenance services of the healthcare centers analyzed. This analysis is based on minimizing the error that occurs between the observations during maintenance inspections and the predictions of the Markov model [31]. Firstly, the transition matrix is obtained based on the observed data [32]. After that, the transition matrix is determined, which reduces the discrepancy between the matrix obtained from the healthcare center incidents and the matrix determined from applying the Markov model. The Solver tool of Microsoft Excel is used to minimize the error. Finally, the validation of this analysis is done through the Pearson X 2 test [33]. The incidents used in this paper are defined as nonurgent breakdowns originating in a healthcare center. These incidents may include, window insulation failure, door damage, lighting failure, humidity, damage to stretchers or noncritical equipment, among others. The percentage degradation scale as a function of the number of incidents happening in the facilities of a healthcare center is shown in Table 1, is used as a reference to illustrate the current state of the system as a function of the number of monthly incidents and the percentage of degradation. The degradation scale has a range from 1 to 9, where 1 and 9 corresponds to an excellent and unacceptable condition. The table above shows that the number of monthly incidents that a healthcare center can have to avoid an unacceptable condition is more than forty. Preventive maintenance is implemented to prevent a health center from getting into an inadequate state of degradation. This is based on a patrol maintenance that fixes the incidents that have arisen in the healthcare centers. The following section details how to select the most appropriate maintenance policy and its respective periodicity. The variable that defines the state of the system called E n , is defined below. This variable characterizes the state of the system in the nth observation and is a row vector that has the same number of components as system states. The compilation of all {E 1 , E 2 , E 3 . . . E n } variables is the stochastic process. This type of study requires the future state to be independent of past states and depend only on the current state [34]. Therefore, Markov's property is fulfilled, and the probability of transition from state i to state j will be determined by Equation (1) [16]: where E n is the vector of the observation state n and P ij is the component of the transition matrix and represents the probability that the system passes from state i to j. Equation (1) reflects the probability of the system to reach state j while in state i. This Markov process is described in Equations (2) and (3): where E n is the state vector in the observation n, r is the initial state vector, P n is the transition matrix of n steps, formed by its components P ij n , which is the probability that the system will transit from state i to j, Q(E) represents the expected value of the system and E n (i) is the i-nth component of the vector and En determines the probability that the system will acquire the value i. The coefficients of the transition matrix (P ij ) are the result of the statistical analysis of the information obtained from 25 healthcare centers and includes the likelihood of the system moving from one state to another, plus the probability that it remains in the same state. An expert panel in the sector accepted and validated the transition matrix. The panel was formed by four hospital engineering specialists, two private institutions specialists, a technician in charge of the Technical Department of the Public Administration and a technician from the Technical Department of a private hospital. Two important aspects of the transition matrix were supervised by an expert panel. Firstly, the experts evaluated whether the structure of the matrix was correct and whether the matrix obtained showed evidence of degradation in the values. They observed that the higher the degradation state, the higher the probability that the system will change to a more adverse degradation state, and the lower the probability of remaining in the state. Secondly, they validated the coefficients of the transition matrix by verifying that the values of the system in each of the established degradation states were consistent with the existing situation in every healthcare center. Statistical evidence from the Spanish Ministry of Health and the Regional Health Service of Extremadura was also considered. The maintenance patterns were commented with the maintenance engineers of the target healthcare center, after analyzing the corresponding registers, and then assessed. The probability of transition between states or remaining in the same one is represented in a matrix in the state transition matrix [P] shown in Figure 1.
by verifying that the values of the system in each of the established degradation states were consistent with the existing situation in every healthcare center. Statistical evidence from the Spanish Ministry of Health and the Regional Health Service of Extremadura was also considered. The maintenance patterns were commented with the maintenance engineers of the target healthcare center, after analyzing the corresponding registers, and then assessed.
The probability of transition between states or remaining in the same one is represented in a matrix in the state transition matrix [P] shown in Figure 1.  The transition graph shown in Figure 2 and representing the system's degradation state was created considering the state transition probabilities of the matrix coefficients [P]: The system presents a gradual degradation, which means that the higher the state of the system, the probability of the system remaining in that state drops and the probability of it changing state increases. There are also several consecutive changes of states, for example, from state 2 to 4. There is less likelihood of this transition happening and is caused by several factors: emergencies that cause incidents during inspections or incidents that appear simultaneously before maintenance and that cause transitions to several states.
In order to determine the most appropriate maintenance policy for healthcare centers, maintenance must be represented in a matrix form. Al-Momani et al. (2005) represented the maintenance strategy of the system in a matrix form [35]. They designed the maintenance policy for a seven-state Markov chain. So, the maximum allowed degradation state is state 4, from which the system degradation is not adequate. In addition, the selected maintenance strategy allows the system's degradation state to be improved to degradation state 2. Therefore, Equation (4) is expressed as follows: This model is suitable, assuming that the maintenance is carried out soon after the inspection, without letting the system change state. Moreover, if the maintenance is not conducted, the system will enter an unacceptable state (Level 9), whereas if the relevant inspections and maintenance are carried out, the system should remain operative for long periods of time. The system presents a gradual degradation, which means that the higher the state of the system, the probability of the system remaining in that state drops and the probability of it changing state increases. There are also several consecutive changes of states, for example, from state 2 to 4. There is less likelihood of this transition happening and is caused by several factors: emergencies that cause incidents during inspections or incidents that appear simultaneously before maintenance and that cause transitions to several states.
In order to determine the most appropriate maintenance policy for healthcare centers, maintenance must be represented in a matrix form. Al-Momani et al. (2005) represented the maintenance strategy of the system in a matrix form [35]. They designed the maintenance policy for a seven-state Markov chain. So, the maximum allowed degradation state is state 4, from which the system degradation is not adequate. In addition, the selected maintenance strategy allows the system's degradation state to be improved to degradation state 2. Therefore, Equation (4) is expressed as follows: This model is suitable, assuming that the maintenance is carried out soon after the inspection, without letting the system change state. Moreover, if the maintenance is not conducted, the system will enter an unacceptable state (Level 9), whereas if the relevant inspections and maintenance are carried out, the system should remain operative for long periods of time.
Then, a study was conducted with Markov chains to choose the most suitable maintenance policy for each healthcare center. First, the maximum permitted degradation state was determined to reduce the array of options. For this study, a low degradation state was considered inappropriate for healthcare buildings. Therefore, the maximum state the system had to reach was 6, presenting a significant number of incidents as shown in Table 1. Healthcare centers are buildings designed to carry out Primary Health Care actions continuously 365 days a year. In this way, the state of degradation of a building should not damage the health and safety of the patients. For this reason, the maintenance policy selected must guarantee that the condition of the health centers does not reach state 6.
The selection of the optimum maintenance policy for the system is focused on choosing state i that the system can reach, and once achieved, perform the corresponding maintenance to re-establish the ideal state j. To this end, five maintenance policies were conducted, the results of which are collated in Table 2. Options 1 and 2 represent a maximum degradation state of 5 and 4, respectively, and after maintenance, the system returned to state 2. Options 3 and 4 admitted a maximum degradation state of 5 and 4 respectively, but these options returned to state 1 after maintenance. Lastly, option 5 considered the possibility of the system reaching the maximum degradation state of 5, but only returned to state 3 after maintenance.

Results
To simplify the results, the procedure for obtaining the probability that the system is in each of the states described in Table 1 for one of the five maintenance strategies is detailed. For the rest of the maintenance policies the process is the same, therefore only the results will be shown. Maintenance strategy number 2 has been chosen. The maintenance matrix [M] of this example is shown in Figure 3. collated in Table 2. Options 1 and 2 represent a maximum degradation state of 5 and 4, respectively, and after maintenance, the system returned to state 2. Options 3 and 4 admitted a maximum degradation state of 5 and 4 respectively, but these options returned to state 1 after maintenance. Lastly, option 5 considered the possibility of the system reaching the maximum degradation state of 5, but only returned to state 3 after maintenance.

Results
To simplify the results, the procedure for obtaining the probability that the system is in each of the states described in Table 1 for one of the five maintenance strategies is detailed. For the rest of the maintenance policies the process is the same, therefore only the results will be shown. Maintenance strategy number 2 has been chosen. The maintenance matrix [M] of this example is shown in Figure  3. By applying the proposed maintenance policy, the maintenance would be carried out in such a way that the system would never reach states higher than 4 and always returns to state 2, creating a regular sequence of states 2, 3 and 4, as illustrated in Figure 4.  By applying the proposed maintenance policy, the maintenance would be carried out in such a way that the system would never reach states higher than 4 and always returns to state 2, creating a regular sequence of states 2, 3 and 4, as illustrated in Figure 4. collated in Table 2. Options 1 and 2 represent a maximum degradation state of 5 and 4, respectively, and after maintenance, the system returned to state 2. Options 3 and 4 admitted a maximum degradation state of 5 and 4 respectively, but these options returned to state 1 after maintenance. Lastly, option 5 considered the possibility of the system reaching the maximum degradation state of 5, but only returned to state 3 after maintenance.

Results
To simplify the results, the procedure for obtaining the probability that the system is in each of the states described in Table 1 for one of the five maintenance strategies is detailed. For the rest of the maintenance policies the process is the same, therefore only the results will be shown. Maintenance strategy number 2 has been chosen. The maintenance matrix [M] of this example is shown in Figure  3. By applying the proposed maintenance policy, the maintenance would be carried out in such a way that the system would never reach states higher than 4 and always returns to state 2, creating a regular sequence of states 2, 3 and 4, as illustrated in Figure 4.  The maintenance strategy transition graph shows two parts of the process life cycle. The first goes from the initial state (1) to the first state of the periodic stage (2) and the second is a regular sequence of states 2, 3, 4 and 5. The real interest of the study lies in the analysis of this second part. The analysis of the behavior in the stationary state of the process probability distributions is one of the main problems of Markov chains. In particular, the boundary of each process probability distribution should be calculated for each state i when n tends to infinity and this boundary belongs to the distribution of probability in the space of states. If this boundary exists, it must be unique and the distribution boundary (π) must satisfy the properties shown in Equation (5) [17]: By implementing the maintenance strategy in the form of a matrix, Equation (5) becomes Equation (6): where each component of the vector π(j) corresponds with the time in which the system remains in state j after reaching the periodic behavior. Furthermore, for the solution to correspond to a process boundary distribution, the Markov chain must have been proven irreducible and aperiodic and the chain states recurrent positive. As for the maintenance policy analysis, the state vector for 20, 40 and 80 observations are first evaluated by Equation (1), which leads to Equations (7)- (9).
The results lead the authors to conclude that the higher the number of observations, the higher the probability of the system being in states 2 and 3, whereas the probability of the system being in state 1 is less. First element of the state vector of Equation (7) has a value of 0.442. Therefore, there is a 44.2% probability that the system is in the state of degradation 1. When the observations increase, the probability that the system is in state 1 decrease to 19.54% and 3.82% according to Equations (8) and (9) respectively. In the same way, it is proved as the value of the second and third element of the state vector increases. Finally, the system behavior was evaluated in a stationary state, i.e., when n tends to infinity. This was determined by solving Equation (6) The authors found that the probability of the system being in a stationary state while in state 1, 6, 7, 8 or 9 was nil since they are all outside the periodic sequence. This procedure has been carried out with 5 different maintenance strategies to compare them and determine which of them is more suitable for the system. The results are shown in Table 2.
The optimal solution was obtained by comparing the results of the Markov chains and relating them to the number of incidents in the corresponding healthcare centers. Options 1 and 3 were found to be less likely to be in the first five states, i.e., the system will remain less time in states that have been deemed suitable for healthcare centers. Therefore, options 2, 4 and 5 were analyzed to select the best solution. Option 5 presents a 0.39% probability that the system is in state 6. However, despite being a very low probability, the authors considered that the system could not reach that state so the option will not be suitable. The fourth option shows a high probability that the system is in states 1, 2 and 3 with a value of 49.55%, 25.81% and 22.58%, respectively. This determines that the system will be in the first three states most of the time with this maintenance policy. The second option has a 0% chance of being in state 1 since maintenance causes the system to return to state 2. The probabilities of the system being in states 2, 3, and 5 with this maintenance policy are 57.85%, 38.46% and 3.31%, respectively. The system in the states illustrated above is suitable in both cases.
These two maintenance strategies are not prioritized, but instead there is a combination of the two, according to the average monthly incidents of each of the 25 healthcare centers to obtain a better solution. Thus, the healthcare centers that require maintenance that resolves more incidents, but with less frequency, will opt for option 4. However, centers that require more regular maintenance, but correct fewer incidents, will choose option 2. As each healthcare center is more suited to one option than the other, the use of the two maintenance strategies will increase the success of the outcome. The number of average monthly incidents that each of the healthcare centers has was recorded to determine whether the maintenance is carried out every 1, 2 or 3 weeks. These data were extracted from the historical archives available at the technical services responsible for the maintenance of the health centers, for three years. Table 3 shows the average monthly incidents, RP being the speed factor with which the first failure occurs, considering A > 2 days; B from 3-6 days; C > 6 days, N • the average monthly number of nonurgent failures and HCC is the healthcare center studied. The relationship between the results shows that the maintenance frequency and policy depend on the average incidents in each of the healthcare centers every month. Table 4 shows when the maintenance is carried out according to monthly incidents and the most appropriate maintenance option. The broadest range of incidents allowed by each option was chosen, adequately managing the resources, and consequently, reducing maintenance costs. With this, the number of incidents corrected after maintenance in options 2 and 4 is 15 and 20, respectively. Therefore, this will be the maximum number of incidents allowed between maintenance visits. Table 5 shows the best maintenance option and periodicity for each of the 25 healthcare centers analyzed.
Then, the data of Table 5 were grouped by similarity of the frequency of maintenance actions of each of the centers and their respective maintenance policies. Figure 5 illustrates this grouping.
The authors found that option 2 was more convenient in 14 of the 25 healthcare centers since maintenance is carried out every week in five centers, every two weeks in two centers and every three weeks in seven centers. On the other hand, of the remaining 11 healthcare centers, seven centers have a periodicity of two weeks and four centers have a periodicity of three weeks. By optimizing the frequency of maintenance of a healthcare center, maintenance can be carried out at more appropriate times, instead of every 15 days across all the healthcare centers in the sample. This approach also reduces transport and labor costs. After conducting the study, the authors found that the healthcare centers of this study were able to save 700 km of travel per month, saving time and fuel, and reducing emissions by 174.3 kg of CO 2 each month.   3  42  1  1  21  3  4  19  3  2  32  2  6  27  2  5  23  3  8  20  3  7  38  2  9  30  2  10  33  2  11  15  3  15  32  2  12  14  3  16  31  2  13  41  1  18  36  2  14  17  3  19  21  3  17  41  1  24  34  2  20  18  3  25  26  3  21  12  3  22  44  1  23 42 1 Figure 5. Bar graph of maintenance periodicity.

Discussion
The best maintenance strategy was determined for each of the healthcare centers analyzed based on the results of the study. This maintenance strategy should prevent the selected system from reaching a state higher than the tolerable state (5). This is of utmost importance in healthcare buildings, the facilities of which are vital for patients [36]. In many cases, making decisions in the health sector is very difficult due to its complexity and its influence on the life quality of people [37]. The authors found that the combination of two maintenance policies ensures that the system is always appropriate, and that, therefore, the joint implementation of the two policies is much better than separate implementation. For this reason, it would be convenient to conduct a study every 6 months of the average incidents found in each of the 25 healthcare centers to readjust the maintenance policy and adjust the periodicity [38].
The Markov chains have proven to be useful to determine the best maintenance strategy for healthcare buildings. With this probabilistic tool, the most appropriate maintenance policy can be determined, which prevents healthcare centers from exceeding a certain degree of degradation, thus

Discussion
the average incidents found in each of the 25 healthcare centers to readjust the maintenance policy and adjust the periodicity [38].
The Markov chains have proven to be useful to determine the best maintenance strategy for healthcare buildings. With this probabilistic tool, the most appropriate maintenance policy can be determined, which prevents healthcare centers from exceeding a certain degree of degradation, thus guaranteeing the functioning of the system and the safety of the patients [39]. It also allows for planned and implemented maintenance strategies to save time and costs [40], which is one of the main objectives of hospital engineering [41].
This method was also found to allow for maintenance planning with more appropriate periods, which translates into savings in respect of travel costs and time spent on maintenance tasks. This optimizes the use of these resources and their possible use in other aspects. Also, the maintenance technician emits less CO 2 during his or her travels. The use of Markov chains for preventive maintenance planning is, therefore, part of a strategy based on circular economy [42], meeting savings and emission reduction targets. The outcome of this research is useful for planning the maintenance of healthcare centers, guaranteeing an appropriate level of maintenance according to the failures, and can be extrapolated to other buildings in the tertiary sector with similar complexity [43].

Conclusions
Based on the results, it can be concluded that the Markov chains are a suitable probabilistic tool to optimize the planning of preventive maintenance of healthcare centers. It allows for obtaining the maintenance strategy without the system not exceeding a certain state of degradation, and to establish the appropriate periodicity of maintenance. In this way it is possible to reduce the environmental impact of maintenance and increase the safety and health of the users of a healthcare center.
Before applying Markov's techniques, the maintenance frequency of all the health centers analyzed was 15 days. By applying this model, a periodicity of 3, 2 and 1 weeks was set according to the most appropriate maintenance policy and the average monthly number of incidents at each center. As a result, the periodicity of the patrol maintenance was optimized, preventing the system from exceeding the desired states of degradation. This resulted in a reduction in the time and distance traveled by the expert technician, thus reducing the cost of maintenance and the carbon footprint associated with the journey. Specifically, a saving of 700 km per month was achieved, which reduces 174.3 kg of CO 2 per month and an increase in overall maintenance efficiency of close to 15%.
Future work should be aimed at carrying out a comparative analysis between different healthcare centers in other countries, to analyze their behavior and deviations from the demand for corrective maintenance after applying the method proposed here. In addition, this statistical model can be applied to determine the most appropriate maintenance policy for the different elements of vital importance for the operation of sanitary buildings, such as the structure, windows, air conditioning systems, electrical energy distribution systems, water distribution system, electronic equipment, etc. In this way, the degradation of the above elements is not detrimental to the health service. Funding: This research was funded by VI Regional Research, Technological Development, and Innovation Plan of the Government of Extremadura, grant number GR-18029 through European Regional Development Fund.