{'fraction_non_alphanumeric': 0.038175308035244146, 'fraction_numerical': 0.013286762382841296, 'mean_word_length': 4.8598169289314, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 1, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An Intelligent System for Patients’ Well-Being: A Multi-Criteria Decision-Making Approach

: The coronavirus pandemic has intensiﬁed the strain on medical care processes, especially waiting lists for patients under medical management. In Chile, the pandemic has caused an increase of 52,000 people waiting for care. For this reason, a high-complexity hospital (HCH) in Chile devised a decision support system (DSS) based on multi-criteria decision-making (MCDM), which combines management criteria, such as critical events, with clinical variables that allow prioritizing the population of chronic patients on the waiting list. The tool includes four methodological contributions: (1) pattern recognition through the analysis of anonymous patient data that allows critical patients to be characterized; (2) a score of the critical events suffered by the patients; (3) a score based on clinical criteria; and (4) a dynamic–hybrid methodology for patient selection that links critical events with clinical criteria and with the risk levels of patients on the waiting list. The methodology allowed to (1) characterize the most critical patients and triple the evaluation of medical records; (2) save medical hours during the prioritization process; (3) reduce the risk levels of patients on the waiting list; and (4) reduce the critical events in the ﬁrst month of implementation, which could have been caused by the DSS and medical decision-making. This strategy was effective (even during a pandemic period).


Introduction
According to Jiang et al. [1], healthcare systems worldwide are under constant stress due to increasingly complex health demands. This situation is accentuated by the global health emergency caused by COVID-19. In this case, Beisani et al. [2], Clement et al. [3], Ranganathan et al. [4], Bornstein et al. [5], Carrillo-de-la Peña et al. [6] noted how this has led to longer patient wait times (i.e., waiting lists), with some cases becoming critical, leading to deterioration in the health of patients. For example, before the pandemic, Chile had 1.6 million people on waiting lists for medical care processes. During the pandemic, the waiting list increased by more than 52,000 people nationwide (https://www.minsal.cl/wpcontent/uploads/2019/05/Glosa-06-1er-trimestre-2019.pdf, accessed on 25 August 2022). Moreover, Bowers [7], Clement et al. [3], Sutherland et al. [8] noted that when patients wait, their conditions can worsen; in some cases, other comorbidities can develop. In extreme cases, patients can die.
The reorganization of healthcare networks in response to the pandemic, as indicated by Radfar et al. [9], Willems et al. [10], Capanna et al. [11], De Filippis et al. [12], Veerapandiyan et al. [13], has led to imbalances in the usual care processes, resulting in unbalanced response capacities of clinical units and waiting list increases. In the face of this health crisis, WongLaura et al. [14], González-Olmo et al. [15] noted that patients do not seek care due to fear of contagion. Both situations have heightened the waiting list problems.
To address the waiting list problems caused by excess demand and COVID-19, Allepuz et al. [16], Harrison and Appleby [17] developed initiatives to organize their patients through prioritization strategies (i.e, by considering clinical factors). Others, such as Testi et al. [18], Solans-Domènech et al. [19], included social aspects in their prioritization strategies. These and other decision-support strategies, such as those proposed by Valente et al. [20], Pietrzak et al. [21], have led to the effective management of waiting lists for healthcare services.
In Chile, hospitals use digital and manual information systems to care for their medically managed populations through prioritization systems, which mainly include biomedical components in decision-making. In the case of HCH, many clinical units do not know the populations under medical supervision since current information systems lack effective records that facilitate decision-making by health teams. At that time, managing chronic patients was not one of the main priorities of health authorities and care centers. The improvement of this process was relegated to other concerns defined by the health authorities, causing a great lack of control over patients when the pandemic arrived.
According to Beisani et al. [2], Bornstein et al. [5], the COVID-19 pandemic has negatively impacted all patient care processes, causing the suspension of healthcare services in many cases. For the specific case of people under medical supervision in the HCH, patients began to suffer from critical events that worsened their health conditions, e.g., additional care in emergency units, a greater number of hospitalizations, and expired prescriptions, among other events. These causes, according to information from the HCH, were estimated to be 25.9% higher than in pre-pandemic times. Some authors, such as Govindan et al. [22], Leite et al. [23], Willan et al. [24], Du et al. [25], noted that this situation is becoming even more complex. It has generated reduced medical hours and attention capacity to meet the demands related to COVID-19. This has caused a reduction of more than 33.6% in medical check-ups in health institutions, i.e., from 176,401 consultations in 2019 to 131,961 in 2020), and an increase in the number of waiting days (of 13.2%), from 301 average days in December 2019 to 341 average days in December 2020, according to the Ministry of Health of Chile. This situation has forced the HCH to strengthen the management of its care processes, i.e., to characterize the population under medical management and implement strategies to continue providing healthcare services to patients while safeguarding health protocols.
To dimension the problem and the lack of control in handling care waiting lists in Chile, we present the number of patients under control by each HCH department. Specifically, our proposal focuses on the cardiology unit, which cares for 5503 patients who are part of the Department of Internal Medicine, representing 10.46%. Table 1 shows the number of patients suffering from chronic diseases. In Table 2, we group the patients according to the type of diagnosis, sex, and age.
In this paper, we present MCDM that responds to the needs and criteria of clinical and administrative management and the requirements of the patients and considers some unresolved gaps in the literature review. The results show that the tool provides support for managing the demands of patients on waiting lists and presents three methodological contributions: (1) an analytic ML method to cluster anonymous patients based on MCDM allows critical patients to be characterized; (2) a score for the critical events suffered by the patients; (3) a score based on clinical criteria, and (4) a dynamic and hybrid methodology for patient selection that links critical events with clinical criteria and patient vulnerability on the waiting list allowed to (1) characterize the most critical patients and triple the evaluation of medical records; (2) save medical hours during the prioritization process; (3) reduce the risk levels of patients on the waiting list; and (4) reduce the critical events in the first month of implementation, which the DSS and medical decision-making could have caused. The paper is organized as follows. Section 2 presents the related literature. In Section 3, we present the proposed methodology. The results are presented in Section 4. The discussion is presented in Section 5. Finally, in Section 6, we draw conclusions and future work.

Related Literature
Next, we present a brief description of the literature review for healthcare waiting list problems involving chronic patients in medical control. The review fills the research gap between the supply and demand that generates waiting lists as well as prioritization strategies (justifying our proposal).

Waiting List: The Gap between Supply and Demand in Healthcare
For Valente et al. [26], the population's health problems are main public policy challenges in clinical and budgetary spheres. According to Ramírez-Pereira et al. [27], this challenge is more relevant and complex in pandemic scenarios. Moreover, Grossman [28], Alcalde-Rabanal et al. [29], Braithwaite and Nolan [30], Solanki et al. [31], Verma et al. [32] pointed out that this situation, and others, such as the inability to manage the health problems of patients with available resources, generate important gaps between the health demand and the care supply that healthcare services must manage.
Jiang et al. [1] and others pointed out that the daily burdens experienced in healthcare services, as well as the demand for care with increasingly complex problems, generate an inevitable problem: waiting lists. Ramírez-Pereira et al. [27] mentioned that waiting times are longer due to COVID-19; according to Escobar and García-Centeno [33], the wait times for surgeries have increased from 7.6% to 19.4% due to the pandemic, further straining healthcare systems. Bowers [7], Sutherland et al. [8], Clement et al. [3] noted that while patients wait, health conditions worsen, and patients develop additional pathologies; in extreme cases, waiting can lead to the death of patients.
Various strategies have been developed to manage wait lists in healthcare services. Harper and Gamlin [34] considered a weekly sample of 400 outpatients measured in one year to avoid long waiting blocks. The model allowed the examination of various patient appointment calendars, identifying critical factors influencing wait times, and demonstrating that alternative appointment times reduce patient wait times without needing additional resources. On the other hand, Willis et al. [35] used supply and demand strategies for the successful and sustainable elimination of the waiting lists of urology outpatients. In addition, Naiker et al. [36], Déry et al. [37], Vijeratnam et al. [38], Rathnayake and Clarke [39] presented systematic reviews of the literature on various patient care processes, demonstrating the importance and urgency of managing waiting lists.
The gap between supply and demand has revealed the complexity involved in managing the demand for healthcare services, generating a lack of control over wait lists and negative effects on the health of patients. Some authors have proposed prioritization strategies that help minimize the problem.

Strategies for Patients' Prioritization
Some methods, e.g., data range aggregation, proposed by Fields et al. [40] (and others), are used to manage waiting lists in emergency services. Riff et al. [41] proposed a heuristicbased algorithm for radiotherapy treatment to minimize the average waiting times of patients. Other authors have developed strategies based on measuring the quantity and quality of the waiting list, e.g., Sutherland et al. [8] developed multivariate regression models to estimate associations between patient characteristics and their health, pain, and depression. A recent work proposed by Silva-Aravena and Morales [42] showed a method based on multi-linear regression to prioritize patients on surgical waiting lists. Other authors, such as Gutacker et al. [43], developed Poisson regression models to evaluate wait times for patients needing hip and knee replacement. Other authors, such as Azizi et al. [44], Dorado-Díaz et al. [45], Jegatheeswaran and Tolley [46], used different algorithms to characterize and prioritize waiting lists and provide valuable information to support decision-making in health units.
Allepuz et al. [16], García and Obando [47], Siciliani et al. [48], Tamayo et al. [49] noted that one of the main components proposed in the literature to solve the problem of waiting list management is the prioritization of patients, which is a score or ranking that links factors related to the disease and psychosocial elements of the patients to allocate hospital resources efficiently and effectively. Therefore, prioritization strategies are identified based on different criteria that affect patients. From the biomedical point of view, Allepuz et al. [16] and Harrison and Appleby [50] based their approach on a history of clinical severity to prioritize patients; however, Testi et al. [18], Solans-Domènech et al. [19], Silva-Aravena et al. [51], in addition to clinical elements, also considered psychosocial factors of the patients.
Predictive and more automated tools have prioritized patients on waiting lists. For example, hybrid metaheuristic strategies combined with algorithms inspired by nature have been studied by Petwal and Rani [52], whose approach was based on a simulation mixed with a scheme that predicted the evolution of the prioritized patient. Rahimi et al. [53], de Almeida et al. [54] added the experiences of clinical experts using the DELPHI approach with mathematical tools that attempted to sort patients dynamically as they waited. Additionally, considering the impact of COVID-19 on health management, Barrios et al. [55], Valente et al. [20], Pietrzak et al. [21], Beisani et al. [2], designed effective strategies to prioritize patients, adapting variables and new pandemic-related care criteria.
In Chile, some strategies have been developed to support the management of waiting lists. For example, Julio et al. [56] proposed a management model based on clinical components that measure the timeliness and fairness in the prioritization of patients. Martinez et al. [57] proposed a statistical survival model to predict the risk of patient mortality. The Kendall correlation was used to measure the association between mortality rate and waiting times. Recently, Silva-Aravena et al. [58] developed a dynamic biopsychosocial prioritiza-tion tool linked to a scheme that measured the vulnerability of waiting-list patients. Both dynamic prioritization and vulnerability are used to select patients for surgery.

Research Gap
In light of the background and methods presented in the literature review, it is clear that waiting list management processes are optimized through prioritization tools that support clinical management. As a result, the main findings that justify the adoption of the chosen method are presented as follows: 1.
In this research, in addition to the clinical variables used in the state-of-the-art, we incorporated management variables (critical events) to support health management. We combined machine learning tools, mathematical models, and a patient selection algorithm. This strategy is effective even during critical periods, such as a pandemic.

2.
International evidence demonstrates the importance of including dynamic prioritization methodologies to manage at-risk patient waiting lists. In Chile, there is an urgency to develop this type of prioritization tool, considering the scarcity of work in the area. 3.
One relevant factor discussed in the literature is the importance of medical opinions when defining criteria or factors that allow the development of the prioritization strategy since each clinical unit has its way of ordering its waiting patients.
The conclusions show the importance of developing prioritization systems for patients in Chilean hospitals based on MCDM, considering the waiting list increase and the aggravation of the patient's health conditions (both exacerbated by COVID-19).

Materials and Methods
According to Valente et al. [26], public health problems are some of the top priorities in the planning and designing of public policies. As a result, Turner et al. [59] and others created management systems to support their implementation. In this section, we present a methodology created with a multidisciplinary team, which includes the participation of HCH cardiology specialists. Figure 1 shows the methodology of the entire intelligent system, which helps simplify decision-making by health teams due to the classification and dynamic prioritization of patients under medical control. The process contains two principal stages: (1) assess the status of patients (under control) waiting for care with multidisciplinary teams made up of medical and non-medical professionals, followed by the Delphi method; conduct a focus group process with specialists in the area to determine the relevant variables that allow characterizing and prioritizing patients. Analyze the data and define clusters of patients by risk level; (2) develop mathematical models of the defined variables (critical events and clinical variables) with the opinions of expert physicians to differentiate each one of the patients in the same cluster and order them according to a score or priority scale; define a scale of vulnerability and individual risks; develop a patient selection algorithm.
Barrios et al. [55] noted that the medical community is calling for new patient care criteria to answer complex scenarios due to COVID-19, including greater participation of cardiology physicians and new patient characteristics and their diseases. Following these guidelines, we designed critical events and clinical variables that allowed us to organize patients on waiting lists. The descriptions of the selected variables are presented in Section 3.1.

Description of the Variables
A multidisciplinary team defined this research's critical events and clinical variables in the cardiology unit. This team comprised 15 physicians (all specialists in cardiology), 2 experienced nurses, 5 engineers, and 1 sociologist. The procedure was as follows: first, the non-medical team reviewed the literature to discover the relevant variables; second, the same team defined an ad hoc instrument with the collected variables; third, the team interviewed each medical specialist to validate the instrument and added more elements, if applicable; fourth, the team consolidated the opinions of the medical experts and produced a report of the various opinions; fifth, the report was presented to the consensus of medical specialists, who finally defined the variables and critical events to classify and prioritize chronic patients under control.
Due to the pandemic, patients have suffered from critical events generated by the lack of continuity of care, which is monitored daily in HCH. The critical events agreed upon by the health team to prioritize managed patients awaiting care are described below.

1.
Urgency (Urg): The critical Urg event is the number of visits that managed patients have made to the emergency unit during the last 30 days.

2.
Operating Room (Or): The Or event is the number of surgeries associated with a diagnosis and any surgery (scheduled or emergency) that a managed patient has undergone while waiting for care during the last 30 days.

3.
Hospitalization (Hosp): The Hosp event corresponds to the number of hospitalizations a managed patient has undergone while waiting for care during the last 30 days. For accounting purposes, all hospitalizations are considered, regardless of the type of diagnosis.

4.
Prescription status (Pre): The critical event Pre is very common in chronic patients who are waiting for care and corresponds to that situation where patients have expired prescriptions.
The clinical variables agreed upon by the medical team to characterize a patient's health conditions and, thus, obtain clinical prioritization, are as follows:

1.
Percutaneous revascularization (Per): Physicians use this variable to evaluate whether a patient is awaiting percutaneous revascularization. In our prioritization study, physicians classified the variable Per into two categories: 0 if the patient did not indicate percutaneous revascularization and I if the patient did.

2.
Dyspnea (Dys): The variable Dys is considered by physicians to know how respiratory distress or shortness of breath affects patients in the clinical prioritization scheme. In the present study, the variable Dys represented the following values: 0 if the patient did not present dyspnea; I if the patient maintained levels from previous management, and II if the level of dyspnea increased since the previous management.

3.
Fainting (Fai): The evaluation of the Fai variable was considered by the health team to determine whether, during the pandemic, patients experienced this episode with any loss of consciousness or postural tone (fainting or syncope). In this study, the Fai variables were 0 if the patient did not present with fainting or syncope and I if the patient did.

4.
Angina (Ang): The Ang variable is one of the main symptoms of cardiovascular patients. For this reason, the medical team evaluated whether patients had chest discomfort, including mild pain, a burning or overwhelming sensation, sharp stabbing pain, or pain that radiated to the neck or shoulders. The values that the Ang variable represented in the present work were 0 if the patient did not present angina, I if the patient maintained the level of angina since the previous management, and II if the angina increased since the previous management.

5.
Reduced LVEF (LVEF): The left ventricular ejection fraction variable, LVEF, provided valuable information to the health team in prioritizing care. In this study, physicians considered a lower-than-normal LVEF as problematic, i.e., when a patient presented values less than 40% in echocardiography or ventriculography. In this study, the LVEF variable represented the following values: 0 if the patient did not have a lower-thannormal LVEF, and I if values were lower-than-normal (i.e., LVEF < 40%).

6.
Revascularization surgery (Rev): The health team includes this condition in the prioritization scheme if the patient had a history of previous myocardial revascularization.
For the present work, Rev was 0 if the patient had no previous history of myocardial revascularization and I if the patient had a previous history.

7.
High-energy electrical devices (Hig): The health team included the Hig variable because it was possible to monitor the statuses of patients with high-energy electrical devices, sudden death is avoided, and the survival and quality of life of patients with heart failure increased. Hig was 0 if the patient does not have an unsynchronized and implantable cardioverter-defibrillator and I if the patient does. 8.
Management term expiration (Con): This variable refers to the treatment plan organized in medical management according to the conditions presented by each patient. For this, the health team needed to know whether patients had expired medical management. For prioritization purposes, the values that the variable Con represented were 0 if the medical check-up of the patient was not overdue and I if it was. 9.
Edema (Ede): When a patient has heart failure, the heart's lower chambers lose the ability to pump blood effectively, generating a backward movement of blood to the lower extremities of the body, and edema. For this reason, the Ede variable may be a warning about the possible heart problems of patients, which is why physicians consider it in the prioritization scheme. Ede was 0 if the patient did not present edema in their lower extremities and I if the patient did. 10. Heart valve prosthesis (Hea): The variable Hea occurs when one or more heart valve does not function properly and must be repaired with heart valve prostheses. Cardiologists use it in patients with valvular insufficiency or stenosis. For this prioritization study, the values that the Hea variable represented were 0 if the patient did not have prosthetic heart valves and I if the patient did.
We will now present the groups of patients identified by the unsupervised algorithm in the following subsection.

Patterns Recognition in Anonymous Patient Data
We performed the descriptive data analysis of anonymous patients using RStudio software (see Table 2). Then, we normalized the data, with a mean of 0 and a standard deviation of 1, to use the information on a similar scale, avoiding bias or disproportionate measurements in the records. Subsequently, we measured the relationships between variables, calculated the distance measure, and characterized the patients using the unsupervised agglomerative clustering algorithm.
To obtain the appropriate distance measure for the data set, we observed in the logs a multidimensional space of n-dimensions. Thus, the vector of n-coordinates was defined as; x = (x 1 , x 2 , . . . , x n ) and y = (y 1 , y 2 , . . . , y n ). In this way, and to measure the distance between the observations, we used the Manhattan distance, considering that it was less sensitive to outliers, i.e., it was a robust measure defined as follows;

Determining the Cluster Number in the Data
The distance or similarity between two clusters is given by their components' minimum and maximum distances. Then, the distance between the clusters C k , with n k elements, and C l , with n l elements, is defined as follows: (2) or, in the same way; In this way, following Equations (2) and (3), the optimal clusters for anonymous patient data were obtained using RStudio's NbClust command, which measures 30 indices simultaneously. Figure 2 shows the results obtained.

Characterization of Anonymous Patients: Agglomerative Cluster Analysis
Using the Manhattan distance and the information on the optimal number of clusters for the observations, the characterizations of patients using Ward's method are presented below as we sought to minimize the variances of data in each cluster to the centroid. Figure 3 shows the dendrogram obtained using the agglomerative algorithm provided by the RStudio factoextra library. In the development of the procedure and for the normalized data, we calculated the distance of each patient, considering the minimum variance of the observations within the same cluster. Through the function fviz dend, we characterize and classify patients with high, medium, and low priorities, using red, green, and black, respectively. We characterized patients using the pattern recognition method, which favors the decision-making of the health team (see Figure 4).  The strategy was developed in the cardiology unit of the HCH over nine months between July 2020 and March 2021, a period in which a minimum deliverable product was designed. Subsequently, between April and May 2021, stages of testing, solution improvement, and introduction to the clinical and administrative teams of the unit were carried out. Since June 2021, the system has been implemented. In the remainder of this section, we described our strategy's mathematical components based on the health team's opinion after acknowledging anonymous patient groups. This approach allows each patient to be differentiated within the same group.

Prioritization Method: Dynamic Score Function, Clinical Score Function, and Selecting Prioritized Patients
In this section, we present the decision-support methodology in the context of COVID-19, which allows for prioritizing and selecting managed patients waiting for medical care in the HCH cardiology unit. The first element corresponds to a dynamic prioritization function based on critical events that impact the health conditions of patients. The second element corresponds to a survey based on clinical variables that the specialty physicians carry out (to add the patient's characteristics and the disease conditions to the prioritization scheme). Finally, the third element corresponds to a patient selection and scheduling strategy based on (i) dynamic prioritization, (ii) the occurrence and repetition of critical events in patients, and (iii) clinical judgment of physicians in the area.

Dynamic Scoring Function
For a given patient, the prioritization score is calculated through the dynamic prioritization function that is composed, on the one hand, of the variables considered critical events, described in Section 3.1, and on the other hand, of a recurrence factor of critical events that upgrade the prioritization of patients.
The first element corresponds to the dynamic prioritization function associated with four critical events defined by physicians. To estimate its relevance, we considered the following procedure. We consulted each physician who gave an opinion on the four critical events to obtain a daily prioritization of each managed patient waiting for care. In that sense, and for each event, the physicians were consulted to assign a score between 0 (not relevant) and 10 (very relevant); let θ i,m be the score assigned by physician m ∈ {1, . . . , 15} to event i ∈ {1, . . . , 4}. Table 3 shows the score assigned by the 15 physicians to each of the critical events. Once the scores were collected, the relative weight of each event i ∈ {1, . . . , 4}, a i , was given by; where  For example, for the event Urg, the sum of the corresponding θ i:Urg,m is 137. Therefore, the weight associated with the event Urg was given by a i:Urg = 137/496 = 0.276, as A = 496. Table 3 shows the a i of the other critical events.
The second element of the prioritization function corresponds to a factor that dynamically evaluates the occurrence or absence of each critical event i ∈ {1, . . . , 4} for the managed patients waiting for care. Let µ i,p (t) be the dichotomous factor that evaluates the daily presence of critical events in patients, i.e., µ i,p (t) = [0, 1]. For example, if on day [t = 1] of the month, a patient p suffered a critical event, e.g., consulted for a health problem in the emergency unit, Urg, the system automatically assigns 1 and maintained this condition for 30 more days, µ i:Urg,p (t : 1 − 30) = 1. In contrast, if on day [t = 1], a patient p did not suffer from critical events, the system automatically assigned 0, i.e., µ i:Urg,p (t : 1) = 0. However, if the same patient p on day [t = 2] suffered from a critical event, e.g., the patient's medication prescription expired, Pre, the system would automatically assign 1 and maintain this condition for 30 more days, i.e., µ i:Pre,p (t : 2 − 31) = 1.
The third element of the prioritization function is given by the effects on the health of managed patients as a result of unattended care, e.g., not obtaining medical care for fear of being infected by COVID-19. The clinical effects that this situation caused patients has led to, according to data provided by the hospital, an increase of 25.9% in critical events or recurrences of these during the months of the pandemic, altering the clinical condition of patients and, therefore, their order of priority on the waiting list. Let λ i,p (t) be a recurrence factor determined by physicians that quantify the repetition of critical events in patients, which allows us to upgrade the prioritization. The factor is activated when a patient under medical management has had more than one critical event in a month. For example, if a patient p had 1 hospitalization during 1 month, λ i:Hosp,p (t) = 0; if he/she had 2 hospitalizations, λ i:Hosp,p (t) = 0.1; and if he/she had 3 hospitalizations, λ i:Hosp,p (t) = 0.2, and so on. The additional value in the prioritization of a managed patient waiting for care, ρ i,p (t), which is upgraded by the recurrence factor λ i,p (t), is shown below.
where n is the number of critical events suffered by a managed patient due to waiting.
In addition to the dynamism granted by the dynamic prioritization function of managed patients of the HCH cardiology unit during the pandemic, physicians surveyed the patients based on updated clinical information. This information provides an additional ele-ment added to dynamic prioritization, improving the selection and scheduling of managed patients while awaiting medical care.

Clinical Scoring Function
The clinical data represent the updated conditions of the patients, described in Section 3.1. These data allow us to comprehensively prioritize patients, including the dynamism of critical events and the updating of the clinical conditions of patients.
In this scheme, the first element corresponds to a clinical function. To estimate its relevance, we considered the following procedure. Each physician provided an opinion regarding the ten clinical variables for determining a value that recovered the conditions of the managed patients waiting for care, which could, therefore, be added to the dynamic prioritization of Equation (7). In that sense, they assigned a score between 0 (not relevant) and 10 (very relevant) for each of the variables; let α u,m be the score assigned by physician m ∈ {1, . . . , 15} to the clinical variable u ∈ {1, . . . , 10}. Table 4 shows the scores assigned to the 10 variables by the 15 physicians. Once the scores were collected, the relative weight of each variable u ∈ {1, . . . , 10}, b u , was given by; where For example, for the variable dyspnea, dys, the sum of the corresponding α u:dys,m was 123. Therefore, the weight associated with the dys variable was given by b u:dys = 123/1019 = 0.121, as B = 1019. Table 4 shows the b u of the other variables.  In the clinical functions, physicians assigned a value for each patient p associated with each of the clinical variables, which was previously defined and agreed upon by clinical professionals; let ε u,p be the level of the relative importance of the variable u associated with patient p. These values include the clinical condition of managed patients waiting for care. In the survey evaluation, the physicians assigned in consensus the level of importance that the variables took. For example, the categories for the dys variable associated with patient p are; (i) dys 0: "the patient does not present dyspnea = 0"; (ii) dys I: "the patient has maintained levels from previous management = 0.33" and (iii) dys II: "levels of dyspnea have increased since previous management = 0.67".
The relative importance of ε u,p assigned by physicians to patients and associated with clinical variables are shown in Appendix A. Therefore, the clinical score given to a patient p at time t,s p (t), is given bys In this way, the clinical score of patient p classified with dys "II" by a physician could be obtained following Equation (10), i.e.,s p (t) = b u:dys · ε u:dys "II",p = 0.121 · 0.67 ≈ 0.081. Similarly, for a patientp classified without dyspnea, the clinical score would besp(t) = 0.121 · 0 ≈ 0. In this way, and when a physician evaluates the ten clinical variables of patient p, the clinical prioritization,s p (t), is obtained.
Finally, the prioritization of managed patients of the cardiology unit who are awaiting care is a combination of the score obtained by the dynamic scheme given by the critical events, according to Equation (7), and by the clinical score, according to Equation (10). Therefore, the final score of a managed patient p waiting for care at time t,s p (t), is given by; Subsequently, we define a scheme that allows us to represent the patient's deteriorating condition while waiting. This scheme is the vulnerability function of managed patients. Similar to Silva-Aravena et al. [58], Rahimi et al. [60], the vulnerability of patient p at time where t c is the date of the last medical control of patient p and t mc is the date of the following medical care defined by doctor m for patient p, according to the patient's clinical condition.
Since v.(t) is defined by medical experts in the field, the function is effective for knowing the risk level of waiting for chronic patients and is also useful for selecting and scheduling prioritized patients. The outcome of v p (t) can be interpreted in two ways: (i) v p (t) < 1 means that the patient has been waiting less time than indicated by the physician for the next check-up (not vulnerable), and (ii) v p (t) ≥ 1 indicates that the patient has been waiting for a time equal to or greater than that indicated by the physician for the next check-up (vulnerable). To illustrate the level of vulnerability defined in Equation (12), we considered the case of managed patients, p andp, who received medical care on 2 January and 2 February, respectively. After the patients were attended to, and according to the clinical conditions of both, the physician indicated that managed patient p have a check-up in one month (t mc = 1) and patientp in two months (t mc = 2). If neither patient was scheduled on the indicated dates, the level of vulnerability of each patient on April 2 was; v p (04/02) = 3 1 = 3 and vp(04/02) = 2 2 = 1; this indicates that patient p was more vulnerable than patientp and their levels of risk, r p (t), were defined as follows; demonstrating that the patient risk level grows exponentially due to the waiting time.
Following the same example, patient p was seven times riskier than patientp and, therefore, required emergency medical care, i.e., r p (t) = exp [3] ≈ 20.1 and rp(t) = exp [1] ≈ 2.7. Knowings p (t), v p (t) and r p (t) for the entire waiting list, we performed an automated procedure that supported the clinical decision in the process of selection and scheduling of patients.

Selecting Prioritized Patients under Control for Scheduling
Now, we describe how the information obtained can be used to select and schedule patients for their medical care, which is the final component of our DSS. As described in the previous section,s p (t), v p (t) and r p (t) correspond to the final priority score, the level of vulnerability and risk for the entire waiting list of managed patients of the HCH cardiology unit at time t, respectively. Thes p (t) considers the effects caused by critical events and includes management elements to mitigate the effects caused by the pandemic and updated clinical conditions of the patients, while v p (t) and r p (t) incorporate the opinion of physicians in the area to measure the level of deterioration and risk in 'waiting' patients. Each month t, the cardiology unit is informed of the availability of appointments for the following month, t + 1. In this way, the unit organizes and selects patients from the waiting list that is scheduled according to the following procedure: • Step 1. For each patient p on the waiting list, update thes p (t), v p (t) and r p (t) values (see Equations (11)- (13)). • Step 2. Classify the patients hierarchically and only into one of the three groups, according to: Group 1: patients with more than 3 different critical events or ∑ i∈I λ i,p (t) ≥ 0.5; Group 2: patients with 2 or 3 different critical events or 0.5 > ∑ i∈I λ i,p (t) ≥ 0.2, and Group 3: patients with 0 or 1 critical events or ∑ i∈I λ i,p (t) < 0.2 (see Table 3 and Section 3.1). • Step 3. Classify the patients in each group into two categories: Category A: patients with v p (t) ≥ 1 ordering by r p (t) = exp ≥1 from highest to lowest, and Category B: patients with v p (t) < 1 ordering by r p (t) = exp <1 from highest to lowest. • Step 4. Schedule for t + 1 patients from Category A and Group 1. If medical hours are still available, schedule as many patients as possible from Category A and Group 2; and medical hours are still available, schedule as many patients as possible from Category A and Group 3. • Step 5. If Category A patients for all groups are successfully scheduled, repeat the previous procedure for Category B patients consecutively.
The specialist physicians classified the categories and groups of patients in the cardiology unit according to the influence of critical events and the patient vulnerability levels (due to the worsening of their conditions). The procedure described was performed automatically by the DSS. The list of patients scheduled for medical care was refined according to additional considerations not included in the tool, such as departure, medical licenses, permits, and vacations of physicians in the area of performing care, availability of appointments, and so on.

Results
In this section, we present the results obtained when using the tool. The results were discussed in a meeting with the health team of the cardiology unit, according to the following procedures. The physicians conducted randomized reviews of clinical cases of managed patients waiting for care using the previous prioritization strategy. They then compared them with the results provided by the new strategy in all processes evaluated. This comparison allowed the health team to certify improvements in the clinical management process and quantify the direct benefits for patients waiting for care when using the new tool. Subsequently, the HCH authorities approved the implementation of the new tool as a pilot plan in the cardiology unit. The details of the results obtained are presented below.

Evaluation of the Efficiency and Effectiveness in Scheduling Patients under Control
The relevance of the scheduling process was evaluated by the head physician of the cardiology unit. For reviewing records of patients under medical management who were waiting for care, they had one hour a day according to their schedules.
We compared the previous and new methods in the field, evaluating their efficiencies and effectiveness. From an efficiency point of view, we measured the number of patients under medical management waiting for care that the head physician could evaluate (during his available hours). Efficacy, meanwhile, was determined by the number of relevant patients evaluated by the head physician with his available hours. The average performance of the head physician with the previous method was 10 patients per hour (min: 8 and max: 11), equivalent to 200 patients per month (considering that each month has 20 working days), and the average relevance was 50% (minimum: 48% and maximum: 53%). With the new strategy, the head physician could evaluate an additional 400 patients and increase relevance by 40%. On the other hand, the physician's performance using the new tool was 30 patients per hour (min: 28 and max: 33), equivalent to 600 patients per month, and the average relevance was 90% (min: 85% and max: 93%). Table 5 shows the monthly results of both methods.  6 show the process and threads of prioritizing patients under medical management who are waiting for care. Figure 5 is associated with the previous prioritization strategy, while Figure 6 is related to the newly implemented strategy. In both schemes of the process, three phases were evaluated; Phase 1: evaluation of patients on the waiting list (see Figure 6) and prioritization of patients on the waiting list (see Figure 6); Phase 2: availability of schedule; and Phase 3: medical control.  Using the previous prioritization methodology, the time taken by the health team in each thread involves the following phases. Phase 1: (1) review of the patient on the list (3 min), (2) review of the medical history (if the patient had critical events during the last month) (mean: 5 min, standard deviation: 1 min), (3) evaluate the vulnerability of the patient on the waiting list (3 min) and (4), a review of the survey carried out by the health team to the patient (mean: 5 min, standard deviation: 1 min); Phase 2 (1) includes a patient on the urgent list (mean: 5 min, standard deviation: 1 min), (2) the availability of the schedule is on average 70%, and (3) the scheduling of one/1 patient (mean: 5 min, standard deviation: 1 min). Finally, Phase 3: (1) the medical management of a patient (mean: 15 min, standard deviation: 3 min), and (2) the patient remains in control with a 95% probability and returns to the waiting list.
With the new prioritization strategy implemented, the time taken by the health team in each thread involves the following phases. Phase 1: (1) data on critical events and patient surveys is retrieved in an almost automated way from the information system of HCH (5503 patients in 5 min ≈ 0.05 seconds per patient), and (2) apply the prioritization model per patient (5503 patients in 5 min ≈ 0.05 seconds per patient); Phase 2: (1) apply the selection algorithm per patient (2 min, since it has an automated stage, which is less than 1 s, and a manual review performed by the head physician), (2) the availability of the schedule it is on average 70%, and (3) scheduling of one/1 patient (mean: 5 min, standard deviation: 1 min). Finally, Phase 3: (1) the medical control of a patient (mean: 15 min, standard deviation: 3 min), and (2) the patient remains in control with a 95% probability and returns to the waiting list for attention. Table 6 shows a simulation that we carried out with the Bizagi process modeler software. To do this, we took a random sample of 100 patients under medical management on the waiting list for care. They were entered into the simulation scheme of both prioritization processes to compare their performances. The results indicate that the new strategy generated 46% savings in health team hours for the entire prioritization process compared to the previous method. The hours saved were allocated to other processes within the cardiology unit, which benefited patients, e.g., support and accompaniment to procedural examinations and health education talks, among others.

Evaluation of the Impact Generated by Critical Events
The critical events suffered by patients under medical management on the waiting list in the cardiology unit are situations that can cause the death of patients who, as a result of the pandemic, have not received their care on time. For that reason, we quantified the occurrences of these events by using both prioritization strategies. Table 7 shows all critical events suffered by patients under medical management in May 2021 (using the previous working method) and in June 2021 (using the new DSS strategy). In its first month of implementation, a 19.3% reduction in critical events was observed, possibly caused by DSS and clinical decision-making. A crucial component to measure the quality of the waiting list of patients in medical management is the level of vulnerability, v p (t), which was measured using the patients reviewed by the physicians in July 2021. To do this, we compared both prioritization methods using Equation (12) at time t. We added (as a complementary measure) the average vulnerability and patient p with the maximum vulnerability on the waiting list, v.(t), and max max v p (t), respectively. We randomly considered January 10 to evaluate the previous strategy and July 5 to evaluate the new tool. Table 8 shows that the new DSS improves the quality of the waiting list by reducing; v.(t) ≥ 1 in ≈ 45%;v.(t) by 83.3%; and max v p (t) by 86.7%. In addition, and due to the actions of the health team, the average risks of patients waiting for medical carer.(t) were greatly reduced.

Discussion
In this work, we proposed a dynamic scheme for prioritizing managed patients waiting for care in the HCH cardiology unit, considering critical events that the COVID-19 pandemic have accentuated. In addition, we added the clinical characteristics of patients with cardiovascular diagnoses and a vulnerability component to measure the risk levels of waiting patients. These elements were approved by the team involved in the design and implementation of the tool, as well as by the physicians of the cardiology unit and the HCH authorities.
When we compare our work with related literature, such as by Rahimi et al. [53], Silva-Aravena et al. [58], Rahimi et al. [60], De Santo et al. [61], our methodology and results show similarities and differences. The main similarity corresponds to the methodological design, in which the expert health team of the area under study participates, which allows organizing and ordering the patients according to unique criteria agreed upon by the professionals. On the other hand, and as one of the main differences, our decision support system provides greater control of the waiting list by consulting the databases daily for the occurrence of critical events in patients, which updates the waiting list prioritization and sends alerts to physicians before the next scheduled patient check-up; other strategies are dynamically updated through a mathematical calculation previously programmed but does not consider the occurrence of unforeseen critical events, and so priority is only updated when the patient visits the specialist again. At the same time, the new DSS has automatically updated all managed patients on the waiting list and evaluates them simultaneously using agglomerative clustering to crack critical patients from those who are not, using a score for critical events and a clinical score. However, the main differences in our methodology to the literary review are as follows: (i) The new strategy is capable of responding effectively to the COVID-19 pandemic scenario, and (ii) our results suggest a reduction in critical events and vulnerability levels in patients.
From a practical point of view, prioritizing and managing the waiting list to serve more patients must be accompanied by the necessary resources, i.e., having more appointment shifts, more hours from the health team and administration, and a greater capacity to carry out examinations and procedures, among other aspects not contemplated by the new strategy, as currently (and despite detecting critical events in real-time and prioritizing patients), there are finite resources for care. This limitation has triggered the urgent need to update the capacities in the cardiology unit.
One of the main components to consider when evaluating the tool's performance is the diversity of medical opinions regarding critical events and the clinical dimensions that characterize the conditions of managed patients in the cardiology unit. In fact, of the total number of physicians, one is an echocardiographer, five are clinical cardiologists, four are hemodynamics, three are heart surgeons, one is an electrophysiologic, and one is a cardiac rehabilitation physician. This diversity is mentioned in the medical opinion regarding the variables (see Tables 3 and 4). In this way, and for the same factor, some physicians may express different judgments according to the relevance of the clinical progression of the patients. In addition, both the prioritization scores obtained, s p (t) ands p (t), are sensitive to this clinical variability. In the same line of sensitivity, the final classification of patients on the border between one cluster and another always falls under the definition of the medical specialist. This methodological proposal could be complemented with various strategies, for example, (i) automation of other dimensions not currently considered by the new strategy, e.g., drug dispensing in coordination with primary healthcare (PHC), development of prioritization protocols that PHC physicians apply, and (ii) an automated learning tool that can predict the occurrence of critical events and emergencies before the medical consultation; see, for example, Lei et al. [62]. This strategy allows the prioritization measure to take on a more automated role without relying solely on medical criteria.
In addition, due to the design and implementation of the new strategy, the criteria of the cardiology unit physicians strongly shaped their functionalities. Therefore, if the composition of the clinical team changes, the system's characteristics could require some updates. Consequently, when adapting the tool to another clinical unit, it is necessary to consider future changes in the professional team over time.
The results show that the prioritization tool for managed patients in the context of the pandemic improves medical decision-making compared to the previous prioritization method since, as a product of the daily update of critical events and the completion of the clinical survey, the physicians can manage at all times those patients who may experience a deterioration in their health conditions as a result of waiting. This new strategy provides greater objectivity, transparency, and equity in the patient selection process and optimizes the workload hours of the health team. Regardless of the advantages presented above, some fundamental management aspects for the appropriate officials are unknown, and it is necessary to advance in greater automation of these (for example, coordinating the purchase of medicines with the centers of the healthcare network, including patients with expired prescriptions, and associated with difficult-to-access anticoagulant medications, such as acenocoumarol, or associated with the diagnosis of heart attacks within the prescriptions, among others).

Conclusions
In this work, we described the characteristics and results obtained from the management support system designed and implemented in the HCH cardiology unit to prioritize managed patients while waiting for medical care. The dynamic prioritization strategy considers an unsupervised algorithmic strategy based on pattern recognition mixed with evaluating critical events in anonymous patients, which has been accentuated due to the pandemic. It also includes updated clinical components of the patients, which are added to the prioritization strategy.
As shown in the results section, the designed system allows physicians' decisionmaking processes to be more efficient and effective. In fact, and according to the opinions of the team involved in the methodology design, the new strategy provides greater equity to the previous method. From a practical point of view, the results show greater efficiency and effectiveness in evaluating relevance for patient scheduling. Before the tool, each month, the head physician of the unit could evaluate an average of 200 patients with a 50% relevance. After the tool's implementation, he or she could evaluate 600 patients with a 90% relevance. In addition, by evaluating the patient prioritization process, the new strategy can save 46% of health team hours, proving to be more efficient than the previous method. Additionally, the waiting list patient vulnerability level and risk are reduced when using the new tool. Additionally, due to the new tool's alerts, the health team can provide medical care to patients before emergencies occur.
From a strategic point of view, for both the HCH and the region, the new tool was approved by HCH authorities to function as a pilot plan in the cardiology unit to be later replicated in other units and clinical departments, ensuring compliance with information security, and ethical and administrative protocols. From a tactical and operational point of view, the tool was designed to resolve the events suffered by patients waiting for care in the current COVID-19 health emergency. However, it is important to include other scenarios, such as radical changes in the protocols of quality and safety in patient care, (i) departure of medical specialists from the area, and (ii) instructions and government regulations on the management of waiting lists.
Finally, from a methodological point of view, the system could be strengthened by adding new automated techniques, i.e., interpretive machine learning algorithms, to identify the direct effects of certain variables in prioritization and, in this way, facilitate the decision-making of the health teams. In addition, the tool could include management elements that allow for better coordination with the other healthcare centers in the network, e.g., purchase planning, storage, and dispensing of medications, greater coordination with PHC and care centers to solve patient cases involving expired prescriptions, adding alerts for the centralized acquisition of difficult-to-access drugs that generate larger waiting lists, coordinating patient care with the regional emergency network, and optimizing bed management, among other management aspects. With all of this, the design and implementation of the new DSS can be extended and scaled to other departments and units with managed patients waiting for HCH care to observe institutional results involving a longer period of use of the tool, as well as to other hospitals in the region and the country.

Conflicts of Interest:
The authors declare no conflict of interest.

6.
Revascularization surgery (Rev). For a given patient p, the corresponding ε u:Rev,p value corresponds to ε u:Rev,p = 0 when the Rev category of patient p is "0", and ε u:Rev,p = 1 when the category is "I". 7.
High-energy electrical devices (Hig). For a given patient p, the corresponding ε u:Hig,p value corresponds to ε u:Hig,p = 0 when the Hig category of patient p is "0", and ε u:Hig,p = 1 when the category is "I". 8.
Management term expiration (Con). For a given patient p, the corresponding ε u:Con,p value corresponds to ε u:Con,p = 0 when the Con category of patient p is "0", and ε u:Con,p = 1 when the category is "I". 9.
Edema (Ede). For a given patient p, the corresponding ε u:Ede,p value corresponds to ε u:Ede,p = 0 when the Ede category of patient p is "0", and ε u:Ede,p = 1 when the category is "I". 10. Heart valve prosthesis (Hea)). For a given patient p, the corresponding ε u:Hea,p value corresponds to ε u:Hea,p = 0 when the Hea category of patient p is "0", and ε u:Hea,p = 1 when the category is "I".