Improving hospital operations management to reduce ineffective medical appointments

Abstract The main objective of this study is to meet management aspirations by promoting waste reduction and consequently improving patients` experience in a Portuguese public hospital. These aspirations include increasing hospital service quality in a continuous and efficient way. This management mindset uncovered divergences between medical appointment and magnetic resonance imaging (MRI) exam scheduling that were generating waste for both the hospital and patients. The main aspects considered in this study were the patients’ medical expectations, the quality, and cost of service provided. One-year retroactive encrypted data from medical appointments and MRI requisitions were provided for the algorithm development. Outcomes obtained from the algorithm revealed a high percentage of medical appointments occurring without the respective MRI exam results. These outcomes exposed waste existence that was hitherto unknown by the administration. Thus, the main algorithm function is to analyze future data to previously alert ineffective medical appointments. This progress contributes to reducing wasted medical and patient time. In summary, the main contribution of this article is to allow hospital managers to cross-check data from different sectors to identify divergences in future medical consultations that require exams or results of clinical analysis.


Abstract:
The main objective of this study is to meet management aspirations by promoting waste reduction and consequently improving patients` experience in a Portuguese public hospital. These aspirations include increasing hospital service quality in a continuous and efficient way. This management mindset uncovered divergences between medical appointment and magnetic resonance imaging (MRI) exam scheduling that were generating waste for both the hospital and patients. The main aspects considered in this study were the patients' medical expectations, the quality, and cost of service provided. One-year retroactive encrypted data from medical appointments and MRI requisitions were provided for the algorithm development. Outcomes obtained from the algorithm revealed a high percentage of medical appointments occurring without the respective MRI exam results. These outcomes exposed waste existence that was hitherto unknown by the administration. Thus, the main algorithm function is to analyze future data to previously alert ineffective medical appointments. This progress contributes to reducing wasted medical and patient time. In summary, the main contribution of this article is to allow hospital managers to cross-check data from different sectors to identify divergences in future medical consultations that require exams or results of clinical analysis.

ABOUT THE AUTHORS
Our team has been developing research projects with hospitals, aiming to contribute for the improvement of operations management performance in hospitals, focusing on the development of an operations management framework based on Lean Healthcare principles. This allows researchers and hospital managers to conduct organizational transformations based on continuous improvement and innovation in hospital operations management processes. Thus, we have been identifying main flows of operations in hospital contexts, namely in processes related to medical consultations, imaging department, and emergency department, and developing solutions for main problems, using continuous improvement teams and tools, supported by capacity analysis, discrete-event simulation, software development, and operations research approaches.

PUBLIC INTEREST STATEMENT
Medical appointments missed due to patient's noshow is a known fact among health organizations. Less known, but also of great relevance, is the occurrence of medical appointments that need to be rescheduled due to the lack of exam results. As interactions between sectors are complex and the monetary resources are limited in public organizations, a computer algorithm has the function of economically and quickly solving problems that usually depend on mechanical steps to analyze a high data volume. Implementing the study outcomes into the imaging sector of the hospital in question has the function of preventing the occurrence of ineffective medical appointments and promoting superior patient satisfaction, which is a result even more important in these pandemic times.

Introduction
The occurrence of unnecessary medical appointments represents a significant misuse of the hospital's resources and time, which culminates in dissatisfied patients with the inefficacy of medical treatments. Mittal et al. (2014) imply that the maximization of healthcare resources utilization results from the implementation of a robust appointment system.
Currently, in literature, it is common to find out studies about missed medical appointments due to patients' fault. Regardless of the reason for the patient not attending the scheduled appointment, and because of the waste elimination process that private and public sectors are going through, there is a call for a reduction in appointment failures due to the high cost associated (Bades et al., 2018), and many researchers already proposed different solutions for patient noshow events. By any means, it is evident that the attention is focused widely on the patient's noshow event, standing aside from the mistakes made by health organizations, such as scheduling errors and ineffective medical appointments.
By ineffective appointments, this article refers to the medical appointments that happen and add no benefit to patients. The occurrence of subsequent medical appointments with missing MRI exam results is the main issue addressed in this study, considering that such exam results may be a decisive factor for the existence of the medical consultation itself. Given the low budget available in public sectors to invest in the acquisition of new systems for automated data crossing, this paper aims to unfold a low-cost and effective alerting tool for fast identification of scheduled medical appointments without corresponding magnetic resonance imaging (MRI) results.
Public hospitals are currently facing difficulties in meeting the crescent demand for MRIs while trying to handle shorter outpatient waiting times. Also patient no-show is a global issue experienced by many hospitals, and according to Tsai et al. (2019), the burden associated with this matter is the missed medical appointment, which implies a quality loss in service provided due to improper occupation of existing resources, an issue which is also present when health organizations are responsible for the unattended appointment or the occurrence of ineffective appointment.
While missed appointments (a consequence of the patient no-show for a scheduled medical consultation) results in the inability to use this medical availability for another patient, which culminates in delay in medical treatment and financial losses for the health system, ineffective medical appointments generate similar negative results with the addition of an unnecessary motion for a hospital visit that does not add value to the patient.
As stated in the Toyota Production System (TPS) and also presented as a Lean Manufacturing principle, unnecessary motion is considered waste, what within service system was adapted to unnecessary people movement. Dinis-Carvalho et al. (2017) describe people's motion waste as any human motion from one point to another without resulting in added value to the customer. The occurrence of ineffective appointments causes delays that result in an increase in the hospital waiting list. From the patient's perspective, in addition to unnecessary motion, other factors such as extra transport expenses and changes in family and work routines are consequences of people's movement waste.
This study was developed in the imaging sector of a Portuguese hospital; the problem was previously identified by the hospital management and presented to the research team as an urgent case to be solved. The existing problem in the cited hospital, which is the occurrence of ineffective medical appointments due to the lack of capacity of the imaging sector to meet requests in the due date, is a problem present in several hospitals, both public and private. Covert et al. 2018 express the drop in quality aggregated to hospitals` medical care with high missed appointment levels, which can be also associated with the medical appointments that happen with no relevance to the patient, representing unnecessary visits to the hospital.

Conceptual background
Prompt medical assistance and human wellbeing are quality indicators within the health environment. In the prevailing dynamic global scenario, healthcare systems are rushed to promote patients satisfaction by delivering a better and more efficient care service (Shrestha et al., 2017). In the imaging sector, a properly managed appointment system could improve treatment outcomes and consequently enhance healthcare quality (Emery et al., 2009).
Switching to the user's perspective, customers expect to satisfy their latent needs when opting for a specific service. In order to deliver positive experiences, organizations have to increase service quality and continuously eliminate waste activities to reduce also the time required to perform the service and the high cost associated with the slow process. During the service's work in progress (WIP) there are unnecessary complexities that cause the delay which in turn result in customer dissatisfaction (George, 2003). Regarding the health environment, patients play the role of clients and crave effective treatment, thus, the need for waste reduction is as significant as in the industrial sector.
The participation of customers (patients) in the Healthcare service is fundamental for value creation. In order to improve the waste identification and facilitate the application of Lean principles in the service sector, Dinis-Carvalho et al. (2017) developed, through a case study conducted in a Portuguese public hospital, an article where the seven waste types classified in the TPS are adapted for this service context. Table 1 represents the new classification for service waste types identified in the case study including its relationship with TPS classification.
Lean philosophy, first implemented in the industrial area, is already well recognized as an efficient waste reduction approach. According to Gupta, Sharma and Sundar (2016) although there are divergences between Lean in manufacturing and Lean in services, the philosophical basis remains the same in both areas. When applied in the health environment it is popularly known as Lean health care what stands for practicing Lean principles in clinics and hospitals to improve any process in order to satisfy the patient's needs by reducing costs and wastes, resulting in organizations financial benefits (Amran et al., 2020;Gupta, Sharma, & Sunder, 2016), and patients improved experiences (Jiang & Malkin, 2016).
The intention of using the Lean approach on all organization sectors emerged on the 1990s with the term "Lean enterprise" (LE), and this concept encompasses the use of Lean approaches from the manufacturing sector to the whole organization, including service processes (Womack & Jones, 1994, p. 93). Womack & Jones (1994)  become a success in sectors, such as service and infrastructure, due to the tacit focus of Lean practices in eliminating waste and fostering added value for the final consumer. Hasle et al. (2016) identify three handicaps for the application of Lean concepts in Healthcare environments, in comparison with other service industries, such as insurance or financial services: (1) low lean maturity level, (2) higher process and operations complexity, and (3) different value interpretations among workers (doctors, nurses, and managers).
Lean philosophy can provide vast benefits when implemented holistically and instructed as a mutually beneficial strategy (Hallam & Contreras, 2018;Waring & Bishop, 2010); however, such approaches are missing in hospital operations management . Anyhow, the waste reduction approach can be applied independently in order to make progress in terms of organizational culture with the aim of implementing the Lean philosophy or even with the intention of maximizing the use of available resources. In this sense, Souza et al. (2020) emphasize the Lean connection with operations management for issues, such as ensuring patient flow. Vieira et al. (2020) also highlight the importance of managing health operations to ensure continuous improvement cycles. In this perspective, Covert et al. (2018) assert that hospital managers are focused on decrease health resources losses in order to provide a more efficient service using the full capacity becoming milder costs both for the institution and for the users.
O. AlRowaili et al. (2016) advocate that MRI exam delays represent a global obstacle to the health organizations' aim to deliver improved patient care. In this context, resource scarcity is frequently mentioned as a cause of long waiting lists in the health sector (Johannessen & Alexandersen, 2018). Doctors resort to MRI diagnostic for a better perception of the patients` real condition and thus act quickly on the disease's root cause (Shakoor et al., 2017). If the examination is not performed in a timely manner, treatment may become ineffective resulting in patient greater suffering.
According to Mieloszyk et al. (2017) and focused on patient no-shown episodes, radiology exams diverge from primary care due to a lack of direct contact between specialist doctors and patients. This statement does not directly clarify the question of the occurrence of ineffective consultations but demonstrates that there is a need for efficient communication between the requesting physician and the doctor who performed the MRI examination.

Case study
In this section, we consider the case study of a large Portuguese public hospital. Case study research is a practical investigation methodology of a contemporary phenomenon in the real environment so that existing studies are used as a basis for a deeper analysis of the considered phenomenon (Yin, 2018). Beyond the fact that ethical issues are always an important part of a research study, in the healthcare environment, this is even a more important and critical issue. Thus, considering the importance of preserving patient confidentiality as an indispensable principle, the hospital and patient data protection was assured during this research. For that reason, the data relating to appointments and exams were provided in a way already encrypted by the hospital, making it impossible to associate the data with any patient.
Since 2014 the hospital where the study was developed is considered one of the best Portuguese hospitals for achieving high global results on clinical excellence in its reference group in the National Health Assessment System. To complement clinical diagnosis, the hospital imaging service has the capacity to perform many different exams, such as Ultrasound; X-ray; Mammography; Densitometry; Orthopantomography; Biplanar Angiography; Computerized Axial Tomography (CAT); Hemodynamic Angiography; Magnetic Resonance Imaging (MRI). Nevertheless, the imaging sector is unable to respond to the growing demand for imaging services by these means of diagnosis, namely MRI, CAT, and ultrasound. Technological advances and associated benefits with medical diagnosis reflect the high demand for imaging techniques.
Considering the large volume of patients accessing the hospital and the graphical representation in Figure 1, which displays the crescent demand for complementary diagnostic procedures and therapy in Portugal (SNS, 2020), there is great interest from hospital administration in applying process improvement methodologies to ensure that patients have suitable medical care, with the correct diagnosis, in the shortest possible time, not only for the imaging sector but also other departments that experience a regular increase in waiting lists. Given that ultrasound, CAT and MRI are specialties in critical waiting list situations facing similar issues, MRI service is the focus of this study, including neuroradiology and radiology which are subspecialties belonging to MRI diagnosis.
The achievements expected from the resulting solution can benefit patients, doctors, and the organization, once hospital management can take action by having information otherwise not available regarding the system's inefficacy.
The solution development was based on the central issue presented by the hospital during the project progress, which is the occurrence of medical appointments without the respective result of a previously requested MRI exam.
For a better understanding of the problem faced by the under-study hospital, Figure 2 visually describes it. D1 is the starting event and represents the first medical appointment that generates one or more MRI requests. D3 represents the subsequent medical appointment that depends on the MRI result. D3 is scheduled by the medical doctor on D1, without knowing the MRI possible dates. In this scenario describing the problem, at least one exam will be scheduled on a date after D3, in this case represented by D4. It may happen that some other exams will be scheduled before D3, in this case illustrated by D2.
Thus, the problem presented by the hospital management occurs when an MRI exam is, due to lack of capacity or by human error, performed on a date after D3. Delayed MRI examination(s) requires that D3 be performed again on a date after D4, which makes the appointment scheduled at D3 to be an ineffective medical appointment.
At the beginning of the project, hospital management indicated that in most cases of ineffective medical appointments occurrence, the medical request for the MRI exam is on a non-traceable waiting list, since the MRI requests containing the necessary information for scheduling the exams exist only in physical form.
Focused on finding a plausible solution with the available resources, the developed model was structured to identify ineffective future medical appointments, due to a not performed imaging service requested by the same specialist (by the time of the consult appointment), so that the hospital administration can try to manage to anticipate the delayed MRI exam so it is performed before the medical appointment (an unlikely action due to lack of capacity of the imaging service), or reschedule the medical appointment. A delayed MRI means an MRI that will not be ready for the medical appointment that requested it, which is normally associated with scheduling problems in the imaging service due to lack of production capacity or human error.
The study object hospital has specific rooms for each specialty, being three for ultrasound, three for conventional digital X-ray, one for mammography, one for densitometry, one for orthopantomography, one for biplanar angiography, one for hemodynamic angiography one for TAC, and three for MRIs. The exam prescription is submitted, via the Glint computer system, by a specialist doctor who identifies the need for a more accurate diagnosis for a given patient.
The exams are performed by technicians trained in operating the MRI machines. For both neuroradiology and radiology, the MRI specialist doctors are responsible for screening the clinical priority of exams awaiting scheduling by technical assistants. Imaging physicians are also responsible for determining which protocol must be followed and, after the exam has been performed, for uploading the MRI report on the computer platform. The protocols serve to guide MRI technicians so that they have indications about which images should be captured, thus the presence of the doctor during the examination is not mandatory.
The main component addressed by this article is the identification, by using the hospital's existing resources, of the reasons for the occurrence of scheduled medical consultations (with prescribed exams) dated before the date of the respective MRI exam. This article then suggests a solution capable of alerting about the existence of this problem, also alerting about the most relevant case, which are consultations that will occur without the existence of an appointment for the requested exam. The imaging scheduling system at the hospital is partially computerized, being part of the process performed in an obsolete way, without computer record, which results in data loss and difficulty in obtaining quickly and accurately updated information from the waiting list structure. In order to request an MRI, the specialist doctor has, during the consultation with the patient, to request the exam by stating which images will be necessary to be taken as well as the symptoms presented by the patient. In the sequel, the order is sent via the computer system to the imaging sector, where it is printed and delivered to a radiology or neuroradiology specialist doctor so that he/she can, based on the medical prescription, determine the urgency level and the protocol to be followed. The mentioned process out of the computer system is present between the urgency level identification and the exam scheduling phase. After specifying the urgency level of the exam, the physical document is filed so that assistants can manually make MRI schedules according to the availability of resources from the imaging services.
The urgency level varies from 1 to 3, while level 3 stands for the least urgent level, and level 1 is the most priority level. The time limit stipulated by the Portuguese government to perform MRI is 90 days from the time of clinical indication, if these deadlines are not met, the patient must be referred to other units of the national health service or to other entities with agreements or conventions. The exams are scheduled by the technical assistants, based on the system capacity, the priority assigned to the exam prescription, and on the information related to human resources vacation. The assistants try to schedule exams for a date about 8 to 15 days before the medical appointment that is already scheduled by the specialty that prescribed the MRI exam.
Due to the large volume of MRI requests and the limited capacity of the imaging services, some exams remain on the waiting list, even though there is a medical appointment related to these exams. Also, the fact that the exam scheduling stage is not performed in a computerized system, some medical consultation may not be properly identified, which results in exams` appointment with a date after the consultation. Both cases lead to unnecessary motion of the patient to the hospital, and also the loss of the doctor's time in caring for the patient without the result of the respective MRI examination, resulting in an ineffective medical consultation that has to be rescheduled.
Another current possibility of failure due to the hand-operated process of scheduling exams is the loss of physical requests containing the priority level of MRI and the accomplishment protocol. Given the document is the only source of information used by assistants when scheduling MRI exams, by losing physical requests consequently leads to the non-scheduling of the respective examination which are consequences of the lack of an end-to-end computerized system. The proposed alerting tool can contribute to the imaging sector to identify MRI exams that have not been scheduled by enabling data cross between consultation and exam appointments. The fact that the urgency level screening and the determination of the protocol to be followed are manually classified and filed in physical form, on the one hand it entails the impossibility of obtaining statistical data so that the existing percentage of exams for each level can be calculated. On the other hand, the lack of a centralized computer system culminates in the inability of hospital management to identify the scheduling of consultations for the analysis of MRI results that are scheduled for a date prior to the exam date, what also causes unneeded motion by the patient to the hospital so that the requesting physician finds out that the exam has not yet been performed.
Besides causing great waste of time and resources for the hospital, these circumstances represent a negative experience for patients who attend the hospital without any progress regarding the diagnosis of their clinical condition. An algorithmic model capable of crossing the data referring to the scheduled appointments with the scheduled exams data has the potential to function as an alert indicating appointments that will happen before the corresponding exam is carried out or even if the exam is not scheduled due to lack of imaging sector capacity or due to data loss.

Solution approach
The proposed solution analyzes both data from subsequent medical appointments and MRI appointments waiting list to detect when a subsequent medical appointment (that requested an MRI exam) will occur before the MRI exam be performed (meaning, an ineffective medical appointment due to lack of MRI results).

Data
The hospital management sector provided encrypted data for a retroactive period of one year: medical appointments database and MRI exams database. These databases were used for the development phase and validation phase, and also to identify the percentage of delayed MRI exams that occurred in that period of time. This allowed to develop an algorithm to analyze planned MRI exams and planned medical appointments to alert the occurrence of ineffective medical appointments.
The medical appointment database consists of a process number, which corresponds to the patient identification number in the hospital`s computer system, it also contains information about which service is responsible for the appointment scheduling and the date for which the subsequent medical appointment was scheduled. The database includes both medical appointments requesting MRI exams and also medical appointments without requests for MRI exams. The algorithm correlates data from the medical appointments and from MRI exams databases, based on the type of appointment, and also based on the key database fields, which are the process number, the exam prescription date, and the prescribing service.
The exams database provides similar information as the medical appointment database, consisting of the process number, the prescribing service, the performing date of the exam, with the addition of the exam prescription date, the performing service, which can for example be radiology or neuroradiology and the number of the episode, which corresponds to a global count of performed exams at the hospital. The key MRI exams database fields are the process number, the prescribing service, the scheduled date of the exam, and the exam prescription date.
The Anomaly Detection Algorithm (ADA) runs under Excel Visual Basic for Applications (VBA), where the external data is obtained through a power query connection. In addition to making the data selection and organization process error-proof, the benefits of using the power query function translates into reducing the effort spent on programming language and consequently reducing the execution time. In summary, the function of the query in this study is to extract the necessary data from the existing database, clean, remodel, add new data and merge the two databases so that a new Excel table is generated for the algorithm analysis. These functions allowed to eliminate repeated data, reordering and changing table structure, and adding a new column with the type of appointment.

Anomaly detection algorithm
In this section, the ADA developed for the identification of ineffective medical appointments occurrence, including its decision parameters as well as its main purpose, is described. The first part of the algorithm is related with the organization of the data of the two databases (medical consultations and MRI exams) and was developed with Excel power queries. The second part of the algorithm is dedicated to the identification of ineffective medical appointments and was developed with Excel VBA. The details of these parts are described below, and the general organization of the algorithm is represented in the flowchart of Figure 3.  Barretiri et al., Cogent Engineering (2021) The resulting spreadsheet from the power query contains both the data for medical appointments and MRI exams for a given period. On the databases merging phase, the power query sorts multiple columns respecting the following order: (1) process number in ascending order; (2) prescription date in ascending order; (3) episode type in ascending order. This reorganization ensures that the data on each patient is grouped in the spreadsheet. Therefore, it ensures that each group of patient data is organized by date, and finally, with the ordering of the type of episode, it ensures that medical appointments with a date equal to the date of the exam prescription are placed in rows preceding the exam data since it refers to the medical appointments that prescribed the exam, these rows will not be marked as ineffective.
Considering that each row of the table generated by the power query is previously structured so that the algorithm can easily identify the ineffective medical consultations, the fact that the exam prescription date and the medical appointment date are placed on the same column, and that this column is the second priority on the multiple column sorting, it guarantees that medical appointments with a date after the date of the respective MRI exam will be placed in a subsequent row within the spreadsheet table for the top-to-bottom analysis run in a proper way.
In the case of a retrospective database, the designed algorithm is capable of crossing the medical consultations database and exams database in order to identify the failed exams and the consequent ineffective medical appointment, based on the patient process numbers, on the prescribing service and comparing the medical appointment date with the exam performing date. Failed exams correspond to exams that occurred on a date equal to or later than the medical consultation.
In the case of a database related to future medical appointments, the function of the algorithm is to alert the occurrence of ineffective consultations, including cases in which the exam date has not yet been scheduled. The algorithm is designed to present a general summary that indicates the percentage of failed exams as well as the percentage of ineffective medical appointments that will occur in the analyzed period.
In this overview, more detailed information (detailed by service) is numerically and graphically represented. This information is extremely important for the imaging management department to monitor the evolution and recurrence of ineffective medical appointments cases as well as the percentage of failed exams so that they can intervene to reduce waste related to non-effective medical appointments. Such detailed information may be sent to the hospital services, so they become informed about the coming ineffective medical appointments.
This detailed information is grouped by hospital service in separate documents for ease of use by the respective hospital services (and also each hospital service receives only its respective information). Such information contains all the needed data for a proper traceability procedure, so the hospital services are able to identify the upcoming ineffective medical appointments (and the tofail MRI that is causing it) and may take action to avoid it.
Considering the data structure referred to in 4.1, the algorithm first searches for an exam in the column that contains the type of episode by applying a top-down analysis. As soon as it finds one, a verification is made on the following rows as long as there is information about medical appointments for the same patient, that is, with the same process number. Only one ineffective medical appointment is enough for the exam under analysis to be marked as delayed.
The algorithm also checks if the medical appointment comes from the same service presented in the exam data. If these data match, the algorithm checks whether the medical appointment date is equal to or less than the exam date. If this scenario is identified, the model marks the medical appointment as ineffective and counts that failure for the respective service. The looping process continues until a different process number be found.
To represent a more detailed results dashboard, including percentages of ineffective medical appointments, all exams are identified and counted by service. The algorithm generates a final report containing the data previously described for each ineffective medical consultation. The final algorithm function is to activate the power queries that aim to filter and create separate sheets containing the list of ineffective medical consultations broken down by service. Unscheduled exams are automatically highlighted through the final power query process so that the imaging sector and the requesting services can directly identify it and manage it.
A final report is generated containing key information, from medical appointment and from MRI exams, where each report row represents an ineffective medical appointment, with the following fields of information: process number; prescribing service; episode number; performing service; exam prescription date; exam scheduled date; subsequent medical appointment date.
From the algorithm user's perspective, this computer application can perform several complex tasks with the push of a button. In custody of the databases referring to the medical appointments and expected MRI exams, the algorithm user must rename both files to a pre-established default name and then move these files to a folder previously set as the default. When opening the excel file containing the algorithm, the external data is automatically obtained and sorted by the power queries. Thus, after the data processing phase that takes an average of 0.93x10 À 4 seconds per information line, when the "run" button is pressed, all the algorithm operations described in this chapter are performed automatically in an average time of 1.84x10 À 4 seconds per information line.
For a global sense of the algorithm processing time, during the analysis of the period of 1 year of a general database (exams + medical appointments) containing 461,451 lines, the whole process was completed in approximately 128 seconds. It was not possible to quantify and compare the time spent by the hospital management to manually uncover future ineffective medical appointments, as this process was not even performed due to the large volume of MRI exam requests.
After this quick process, the hospital has at its disposal a dashboard containing relevant information to identify which services are most critical as well as an overview of delayed exams and ineffective medical appointments and the final report that allows the hospital to make future decisions based on evident data.

Results
This study analyzed data obtained from the imaging service process of a Portuguese hospital in the event of ineffective medical appointments and its relationship with divergences between consultation scheduling and performing dates of MRI scans.
During the study development, root causes of divergences between appointment schedules and MRI exam results have been investigated. For a patient-centered service model development and to equip the hospital management with an alerting tool, main disparity causes were classified, and a hybrid Excel algorithm, that scans a query filtered database through VBA language, was proposed.
The developed anomaly detection algorithm has several features being the alerting feature the core one. This tool aims to complement and to identify flaws in parallel with the current scheduling system. The benefit for the medical process translates into being able to present a more accurate diagnosis to the patient without having to request the patient's return to the hospital due to missing MRI results. For the patient, the main benefit is the fact of not experiencing an unnecessary visit to the hospital due to a lack of procedural management; hence, the hospital eliminates recurring waste in unnecessary medical appointments.
The criteria for the case study are to uncover the percentage of ineffective medical appointments that took place in a retrospective period analyzed, and with greater relevance, to identify future medical consultations that will occur without the corresponding MRI report.

Retrospective analysis
In retrospective analysis over a period of one year (2018-2019), 12,526 MRI exams and 448,925 medical appointments have been processed through the algorithm and graphically represented in Figure 4. From these, 9569 medical appointments were depending on MRI results to become effective. From the algorithm analyses, 16.01% of these consultations were identified as ineffective, which corresponds to 1532 medical appointments that required rescheduling in a second attempt to obtain the MRI report on the expected date. The percentage of delayed MRI exams presented by the algorithm was 12.2%, corresponding to 1538 exams, a result that raised management concern in optimizing internal processes to maximize the imaging sector production.
The occurrence of a higher number of delayed exams (1538) in relation to the number of ineffective medical appointments (1532) is due to the fact that a single patient may receive two MRI requests, one for radiology and the other for neuroradiology, requested by the same physician.
For cost analysis, in Portugal, the national health service is managed by the Ministry of Health, a government department whose task is to define and conduct national health policy, ensuring a sustainable application and use of resources with the evaluation of results. Given that the occurrence of ineffective medical appointments is the focus of this study, the cost of subsequent medical appointments represents a monetary waste associated with these occurrences.
For a uniform distribution of funds available for public health, Portuguese hospital entities are separated, according to the complexity of the services provided, into six different financing groups. Each group of hospitals has a maximum limit of subsequent medical appointment (subsequent medical appointment index) for each medical appointment performed for the first time in a particular specialty. The index works as a promoter of efficiency and an inducer of the implementation of clinical practices compatible with the monitoring of patients at the most appropriate level of care.
The hospital object of this case study was inserted, during the analyzed period, to a group with an index of 2.37 subsequent consultations to be paid by the Portuguese Ministry of Health, in which every subsequent medical visit represents a cost of €65 to public funds. Hospitals belonging to the same group with an average number of subsequent annual medical consultations higher than the pre-established index must bear the expenses arising from subsequent medical appointments. In this study, we assume, for cost estimation purposes, that these expenses have costs equal to those stipulated by the Portuguese NHS. Therefore, with the implementation of monthly analyses by the proposed algorithm, the hospital can reduce the number of ineffective consultations that, in the year analyzed, could be estimated, considering the encrypted data provided by the hospital and a unitary cost for each ineffective appointment, to have an associated cost of €99,580.

Future Analysis
In order to identify medical appointments that will occur without the corresponding MRI report, a future analysis was required by using the same database structure. The difference lies in the fact that the algorithm identifies consultations without scheduled MRI exams and those that have an MRI scheduled with a date after the date on which the subsequent appointment is scheduled.
In a future analysis performed for a period of one month (11/2020), 9285 MRI exams and 36,067 subsequent medical appointments have been processed through the algorithm and graphically represented in Figure 5. In this analysis, all consultations scheduled for the month of November 2020 were correlated with all pending MRI exams, including those that have already been scheduled and those that are on the waiting list.
The algorithm revealed that 1471 medical appointments were depending on MRI results to become effective. From these, 79.8% were identified as ineffective appointments, which corresponds to 1174 consultations that require rescheduling to obtain the MRI report on the expected date. The percentage of delayed MRI exams presented by the algorithm was 12.7%, corresponding to 1182 exams from the 9285 MRI exams waiting to be scheduled.
The algorithm outcome, in addition to preventing patients from unnecessarily visiting the hospital, can provide monthly savings of around €76,310 for the health organization and consequently for the public coffers. Compared with the retrospective analysis, this value is much higher than expected for monthly values, considering that the annual loss was around €99,000 between 2018 and 2019 due to ineffective medical appointments occurrence. These values were contested with the hospital administration who, after revalidating the tool through sampling analyses, confirmed the values veracity and justified this excessive number of delayed exams due to a lack of capacity on the part of the external MRI services provider to meet the demand for MRI requests sent by the hospital's imaging service. Table 2 summarizes the results obtained from the algorithm.

Discussion
This study identified the crescent need for MRI exams within the hospital aligned with the limited capacity in the imaging sector that makes it impossible to meet, in the expected time, all MRI requests from different hospital sectors. Taking into account the budgetary limitations and the urgency to reduce waste that hinders the maximum use of existing resources, the authors used the available data from future consultation and exam appointments to introduce a bilateral communication therefore nonexistent between the imaging sector and other services of the hospital. Thus, the main objective of this case study was to measure the current scenario and analyze the problem pre-identified by the hospital management to develop, test, and validate a quick fix algorithm able to merge the existing data to detect and preventively alert future occurrences of ineffective medical appointments.
Developing a solution in a hospital environment with the absence of a centralized computer system, where internal service requests occur without a knowledge of the service provider's availability to perform the task and also where several sectors depend on others but work independently, is a scenario that requires practical and effective intervention.
Aware of the limited data available for the development of the study, and as it is a hospital unit that must guarantee the protection of data and the privacy of patients, the team realized the need for a quick and effective intervention to reduce the existing waste resulting from ineffective medical consultations. Aiming for a fast and low-cost response action, the team developed the anomaly detection algorithm by utilizing the databases provided by the imaging service without adding the need to acquire external resources. The versatility feature present in this tool is an outstanding differential, given that the algorithm can be replicated among other hospital sectors experiencing similar inefficacies.
Due to the high volume of data and pre-established processes that cannot be changed and adjusted in a simple and fast way, the developed model helps to improve the level of service provided to patients with a significant reduction of waste and associated costs for the organization. Thus, the algorithm does not prevent the scheduling of ineffective medical appointments but prevents them from happening. In this context, the way the algorithm performs the data crossing is not trivial, given that hospital units do not communicate with each other.
The usefulness of this tool goes beyond alerting the existence of ineffective medical appointments in retrospective and future analyses or quantifying retrospective ineffective appointments related to the imaging sector. Combined with the fact that the whole process happens with the activation of a single button, the algorithm outcomes (dashboard and final report) are quickly generated, if compared to a manual sorting and analyses process, what makes the model a synonym for agility in the management of hospital services such as the imaging sector.
This tool can be implemented in other hospital sectors experiencing similar problems or even in hospital environments where the management team is unaware of ineffective appointments existence. In health organizations facing internal issues due to the lack of a centralized system, this algorithm can work as an alert capable of crossing data from different sectors to compare these data and acknowledge the existence of divergences in future appointments that require exams or clinical analysis results.
Therefore, in hospitals where ineffective consultation problems are not evident, this tool has the potential to confirm the effectiveness of future medical appointments or, in the event of unidentifiable ineffective medical appointments, bring to light improvement opportunities through waste reduction.
This focus on ineffective appointments is directly related to the growing willingness to maximize the use of existing resources, which is a consequence of the need of eliminating waste valuing sustainable development with improved customers` experience. By taking responsibility for existing failure in the occurrence of missed or ineffective medical consultations, health organizations can easily inspect causes and the associated factors for effective problem-solving framework development.
From the patient's point of view, the act of moving from home, from the workplace or from any possible location to attend a consultation that culminates in unnecessary movement, can become a negative experience where the patient's perception of their clinical condition remains the same, due to the lack of the result of a previously requested MRI examination, what can generate frustration in the patient and worsening his/her clinical condition.
This is an aspect that should be taken into consideration by hospital management in order to provide an improved service and achieve the medical appointment objective, which is clarifying patients` perceptions about their clinical condition and recommend future actions if the results obtained from clinical exams or analysis reflect this need.
In this context, the developed tool can be adapted and replicated to other sectors within the hospital where the model was developed or practically directly applied in any hospital that aims to implement a waste reduction culture and improve the patient experience.

Conclusion
In this case study, two different possibilities for ineffective medical appointments occurrence have been identified. The first is the case of exams already scheduled for dates after the date of the medical consultation. The second and most recurrent possibility is the non-scheduling of the exam due to the imaging sector's lack of capacity. By eliminating ineffective medical appointments resulting from delayed MRI exams, hospital management can reduce the financial impact caused by the associated waste and also assist in providing hospital services with higher quality.
Limited imaging service capacity for MRI exams and lack of a centralized informatics system were identified as the main reasons for ineffective appointments occurrence. An algorithm capable to previously alert this failure episode widely contributes to waste reduction within the hospital's environment.
As the model resulting from this project is able to identify the consultations that will occur without the corresponding MRI results, which are paramount for the requesting physician to display a more accurate diagnosis, the hospital has a greater chance of maintaining the agile and quality service provided to users in order to eliminate unpleasant situations experienced by both doctors and users in the case of medical appointments happening before the MRI exam is performed. This reduction in time wasted by consultations that happen unnecessarily is reflected in greater use of hospital resources and delivery of services closer to patients' expectations.
The developed tool demonstrated to be more than a temporary tool, given that the algorithm may be combined into the central system so that the root cause is addressed at the time that the hospital administration disposes of available resources to invest in an integrated system, capable of alerting existing divergences in the consultations and exams appointment process.
Among the limitations experienced by the research team, restrictions on access to the imaging sector due to the occurrence of the COVID-19 pandemic and the difficulty in obtaining future appointment data for monthly analyses are the most prominent. Another related limitation is the inability to quantify in terms of agility for hospital management, the improvement implemented due to the lack of a pre-existing process for ineffective medical appointments identification. Although the research team beliefs in the generic characteristics of this problem and the proposed solution, the limitations of a case study impose some care regarding the interpretation of the solutions. Nevertheless, most approaches can be replicated or used as inspiration for similar problems in different hospitals or at different services of the same hospital in northern Portugal.
In summary, the high percentage of delayed MRI exams uncovered by the developed tool reveals the need for studies focusing on the optimization of hospital procedures to maximize the use of available resources. Thus, developing an optimization model with the aim of reducing the waiting list in the imaging sector is an opportunity for future work to ensure timely medical treatment for patients. Studies can also be developed to identify the occurrence of ineffective medical appointments in all sectors of a hospital and due to different services or causes, in order to discover hidden waste.