scieee AI-readable full text Open interactive document viewer

Effective optimisation of the patient circuits of an oncology day hospital: Mathematical programming models and case study

González Maestro, Adrián; Brozos Vázquez, Miguel; Casas Méndez, Balbina; López López, Rafael; López Rodríguez, Rosa; Reyes Santías, Francisco

Abstract

In this paper, we first use the information we have on the patients of an oncology day hospital to distribute the treatment schedules they have in each of the visits to this centre. To do this, we propose a deterministic mathematical programming model in such a way that we minimise the duration of the waiting room stays of the total set of patients and taking into account the restrictions of the circuit. Secondly, we will look for a solution to the same problem under a stochastic approach. This model will explicitly consider the existing uncertainty in terms of the different times involved in the circuit, and this model also allows the reorganisation of the schedules of medical appointments with oncologists. The models are complemented by a tool that solves the problem of assigning nurses to patients. The work is motivated by the particular characteristics of a real hospital and the models are used and compared with data from this case.

Full text

  Citation: González-Maestro, A.; Brozos-Vázquez, E.; Casas-Méndez, B.; López-López, R.; López-Rodríguez, R.; Reyes-Santias, F. Effective Optimisation of the Patient Circuits of an Oncology Day Hospital: Mathematical Programming Models and Case Study. Mathematics 2022,10, 62. https://doi.org/10.3390/ math10010062 Academic Editor : David Vivas-Consuelo, Natividad Guadalajara-Olmeda, Isabel Barrachina Martínez and Frank Werner Received: 20 November 2021 Accepted: 21 December 2021 Published: 25 December 2021 Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. Copyright: © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/). mathematics Article Effective Optimisation of the Patient Circuits of an Oncology Day Hospital: Mathematical Programming Models and Case Study Adrián González-Maestro 1,† , Elena Brozos-Vázquez 2,† , Balbina Casas-Méndez 3,† , Rafael López-López 1,4,† , Rosa López-Rodríguez 2,† and Francisco Reyes-Santias 1,5,*,† 1 Health Research Institute of Santiago de Compostela (IDIS), Complexo Hospitalario Universitario of Santiago de Compostela (SERGAS), 15706 Santiago de Compostela, Spain; [email protected] (A.G.-M.); [email protected] (R.L.-L.) 2Department of Medical Oncology, Hospital Clínico Universitario of Santiago de Compostela, 15706 Santiago de Compostela, Spain; [email protected] (E.B.-V.); [email protected] (R.L.-R.) 3 Department of Statistics, Mathematical Analysis and Optimization, Universidade of Santiago de Compostela, 15782 Santiago de Compostela, Spain; [email protected] 4Translational Medical Oncology Group (ONCOMET), 15706 Santiago de Compostela, Spain; 5Department of Business, Universidade of Vigo, 36310 Vigo, Spain *Correspondence: francisco.r[email protected] † These authors contributed equally to this work. Abstract: In this paper, we first use the information we have on the patients of an oncology day hospital to distribute the treatment schedules they have in each of the visits to this centre. To do this, we propose a deterministic mathematical programming model in such a way that we minimise the duration of the waiting room stays of the total set of patients and taking into account the restrictions of the circuit. Secondly, we will look for a solution to the same problem under a stochastic approach. This model will explicitly consider the existing uncertainty in terms of the different times involved in the circuit, and this model also allows the reorganisation of the schedules of medical appointments with oncologists. The models are complemented by a tool that solves the problem of assigning nurses to patients. The work is motivated by the particular characteristics of a real hospital and the models are used and compared with data from this case. Keywords: treatment schedules; medical appointment scheduling; integer linear programming; stochastic programming; nurse assignment; case study 1. Introduction Nowadays, a large proportion of diagnosed cancer cases are treated without the need for hospitalisation of the patient, which in general proves to be a great help in favour of the patient’s well-being and a better quality of life. Normally, oncological therapies are performed in day centres where the patient goes to carry out the different requirements of his or her treatment and then returns home, where the therapy recovery takes place. On the other hand, during the last decades, the number of cases of cancer patients increased significantly (an enlargement that we are still experiencing today) mainly due to improvement in the life expectancy of individuals. It is particularly older people who are more prone to these diseases. Greater demand means greater difficulty in maintaining the quality of services offered to patients. Specifically, we are referring to the capacity to maintain stable waiting times for patients during their stay in these centres. It should be noted that these types of centres have quite complex protocols of action that can be prone to generate significant waiting times for patients. It should be borne in mind that these are high-demand services combined with an organisation that sometimes has room for improvement. All this means that the planning Mathematics 2022,10, 62. https://doi.org/10.3390/math10010062 https://www.mdpi.com/journal/mathematics Mathematics 2022,10, 62 2 of 31 of clinical centres to treat cancer patients is an important task of concern for the various professionals involved in hospitals and clinics at regional, national and international level. It should be noted that the existing treatments for this disease are quite expensive, and therefore, are faced with the obvious (but sometimes infeasible) solution of investing more money in these centres. However, the question arises as to whether it is possible to improve the organisation of the different procedures carried out in these units, without necessarily increasing the resources available. The entire process designed for the care and treatment of oncology patients comprises various stages to be covered by the patient on the day he/she comes to the hospital. It involves the collaboration of many professionals from the team, specialised in very different tasks (nurses, doctors, pharmacists, etc.), and the use of certain limited resources, both material (appointment rooms, special chairs for treatments, etc.) and human. Therefore, the existence of an efficient action protocol between all these agents is a key ingredient in minimising patient waiting time, the creation of the different appointments and the planning of nursing staff and other professionals involved (see [ 1 ]). 2. Motivation: The Problem of the ODH in Santiago de Compostela (Spain) At the Oncology Day Hospital (ODH) in Santiago de Compostela (a city in northwestern Spain), cancer patients are treated on a daily outpatient basis by providing two types of medical services, namely consultations with doctors and chemotherapy treatments. These actions are strongly related, the consultation, i.e., the medical act, being a necessary antecedent to be able to carry out the treatments later on, albeit during the same day. The hospital’s current approach is to give patients an estimated appointment time, leaving the start of the treatment as an undetermined time that will be made known to the patient only in the moments before the treatment takes place. This creates the problem that the patient must remain in the hospital waiting room between the two medical services, which often causes, at the very least, uncertainty and, at times, discomfort for the patients. Going into more detail, the ODH is a service of the Hospital Clínico Universitario of Santiago de Compostela (CHUS) where chemotherapy treatments are carried out on patients with different types of cancer. The health area of Santiago de Compostela (SCHA), see Figure 1, is large (450,000 inhabitants) and, for this reason, the ODH attends approximately 20,000 patients per year, which translates into 30,000 consultations with oncologists and 20,000 treatment sessions. Each patient, depending on the type of cancer they suffer from and the stage they are at, has a treatment adapted to their own characteristics, but they all have in common that they are carried out periodically. Specifically, treatments can be given in cycles of one session every one, two, three or six weeks. Therefore, the number of patients to be seen at the centre (as well as the type of cancer they suffer from) on a given day is information that is known in advance. The circuit that a patient follows in this centre is as follows. First, they are registered on arrival at the centre and a blood test is performed. When the test results are ready, an oncologist certifies that they are correct and has a review with the patient. If everything related to the patient’s health status is in order, the pharmacy is ordered to prepare the patient’s chemotherapy substances. When the preparation is ready, the patient is transferred to one of the chemotherapy infusion chairs (if one is available). When the process is finished, the patient leaves the chair and leaves the centre. In order to formalise an algorithm that processes the specific circumstances of a working day and determines appointment times, it is necessary to know two types of data: permanent data and data specific to the working day in question. Permanent data are data that remain unchanged over a period of time. Therefore, in this category we have deterministic data such as the number of chairs available, the number of nurses, pharmacists and oncologists available and the opening and closing hours of the centre. These data will generate capacity constraints that need to be taken into account. Mathematics 2022,10, 62 3 of 31 SCHA Figure 1. Health Area of Santiago de Compostela, in Spain. The ODH has the following data: oncologist consultation hours from 8:00 h to 15:00 h, chemotherapy treatment hours from 8:00 h to 22:00 h, the duration of analyses is between 45 and 60 min, the duration of appointments with oncologists is 45 min for new patients and 15 min for old patients (on average), nine oncologists work every morning (three of each of the three specialties or types of cancer under consideration), five nurses work every morning and two every afternoon with one additional nurse for reinforcement at certain times, five wards with eight chemotherapy chairs (a total of 40 chairs) and three pharmacists prepare infusions every day. It is assumed that each nurse needs 15 min to start each treatment and, in addition, at any given time can be attentive to the performance of 16 treatments. The average time taken to prepare medicines for treatment is 70 min. We note that the number of physical and human resources is fixed but the times of the different stages show variability. The data specific to the working day in question are the number of patients to be seen and the type of cancer each of them suffers from (the duration of treatments can vary according to, especially, the type and stage of cancer), as well as how many of them are new patients and how many are not. The latter significantly affects the patient’s treatment time, as nurses need additional time to inform the new patient before starting chemotherapy. In a preliminary investigation, refs. [ 2 , 3 ] analyzed the time ODH patients waited from the end of the appointment with the oncologist to the start of the administration of treatment. They concluded that the time these patients have to spend when they come to the hospital for intravenous chemotherapy means discomfort and a worsening of their quality of life, and it is therefore necessary to incorporate new measures to minimize lost time in an environment such as a hospital. The aim of this work is twofold. Firstly, by means of a deterministic model, to use the information we have on the patients of the oncology day hospital in Santiago de Compostela to distribute the different medical appointments they have in each of their visits to the centre in such a way as to minimise the duration of the waiting room stays for the total number of patients and taking into account the restrictions of the circuit. This is expected to improve the quality of life of patients and make the planning work of the service professionals more manageable. Secondly, we will look for a solution to the same problem under a stochastic approach. This model will explicitly take into account the existing uncertainty in the duration of the times affecting the process, to achieve better planning results, and will also allow the reorganisation of medical appointment schedules with oncologists. The models are complemented with a tool that solves the problem of assigning nurses to patients. The work is motivated by the Mathematics 2022,10, 62 4 of 31 particular characteristics of the ODH and the model results are used and compared with data from this real case. 3. Literature Review Let us take a look at different aspects of current work. Mathematical tools for decision support in health management . Ref. [ 4 ] provides a review of recent optimisation studies that present decision-support tools for the design and planning of outpatient appointment systems. In ref. [ 5 ], as an aid for healthcare managers with the COVID-19 patient prioritisation and scheduling problem, a tool was developed based on artificial intelligence, using the neural networks method, and operations research, using a mathematical fuzzy interval model. The results of this study indicated that the combination of both models provides an effective evaluation under conditions of scarce initial information to select a suitable list. The proposed approach achieves one goal: to minimise mortality rates under the constraints of available resources in each hospital. The main objective of [ 6 ] is the efficient and balanced use of equipment and resources in hospital operating theatres. In this context, data sets from one hospital were used through the methods of goal programming and constraint programming. The main objective of [ 7 ] is the design and application of a binary scheduling model to support the decision making process, especially with regard to manpower scheduling in organisations with stochastic demand. The results were applied to the personnel allocation process in the ambulance service station in Subotica (Serbia). Optimizing the operation of oncology day centers or primary care clinics. There are several works addressing the tasks of optimising oncology day centres or primary care clinics appointment scheduling, with mathematical, artificial intelligence and simulation scheduling techniques being the most commonly used. Below we describe some of the works that address problems that are quite similar to the Santiago de Compostela ODH. In this work we focus on daily optimization of patient circuits, which could be extended to a weekly planning. Naturally, this task is integrated into a more general problem such as the schedule corresponding to the instant of initiation of treatment plans, which has been addressed by different authors, who have highlighted its relevance. Incidents such as a patient failing to keep appointments and the availability of resources clearly impact on the problem at hand. Ref. [ 8 ], in their work to quantify the association between cancer treatment delay and mortality, concludes that cancer treatment delay is a problem in healthcare systems worldwide. It is now possible to quantify the impact of delay on mortality in order to prioritise and model. Even a four-week delay in cancer treatment—surgical indications, systemic treatment and radiotherapy—is associated with increased mortality in seven types of cancer. Policies focused on minimising delays in cancer treatment initiation could improve population survival outcomes. Ref. [ 9 ], following a systematic review, concludes that a comprehensive strategic approach, including realignment of resources, operational efficiency and process improvement, holds the most promise for improving the efficiency and effectiveness of outpatient and ambulatory services, thereby reducing waiting times and improving health outcomes. These three broad areas identified are complementary and offer a comprehensive approach to policy improvement in these areas. In research by [ 10 ], they perform a baseline measurement of lung cancer patients’ waiting times for systemic therapy across the UK. The authors understand that the continued introduction of new therapies will have a significant effect on service demands and recommend that health service managers model the likely impact on resource needs, and suggest the use of the so-called C-PORT tool developed by the UK Department of Health. A study conducted by [ 11 ] at a single radiotherapy cancer treatment centre shows that the majority of outpatient consultations (80%) were seen within 20 min of their scheduled time. The reported delays were due to clinic workflow and the coordination of multiple appointments throughout the day. Findings from such studies, the authors believe, can help formulate strategies to improve efficiency and patient satisfaction. The problems identified by [ 12 ] in the course of an audit of patient waiting time and physician consultation time in a primary Mathematics 2022,10, 62 5 of 31 care clinic were addressed by the aforementioned paper which has formulated strategies to improve waiting and consultation time, including increasing staffing, implementing an algorithm for a staggered appointment system for patient follow-up and improving the queuing system for walk-in patients attending the clinic. The results shown in [ 13 ] provide some insights into waiting time, which is a barrier to healthcare delivery in mainland China. The authors show that adopting improvements in outpatient management software, following detailed analysis of patient data, patient surveys and patient interviews, can be an effective way to deal with long waiting time. Applications of deterministic mathematical programming to the optimization of oncology patient circuits. Ref. [ 14 ] presents the situation of a clinical centre to which patients come to receive chemotherapy sessions with a certain periodicity, forming regular cycles of treatment sessions. Two objectives are pursued. On the one hand, to reduce as much as possible the delays in the patients’ cycles, given that excessive delays in the time between chemotherapy sessions greatly diminish their effectiveness. On the other hand, to reduce the hospital costs associated with the hours of work that are carried out. Ref. [ 15 ] addresses the problem of minimising patient waiting times during a working day in a centre offering oncology appointments and chemotherapy treatments in a context where it is already known how many and what type of patients need to be seen. Initially, a biobjective optimisation problem is posed, trying to achieve a balanced workload throughout the working day both in terms of the use of the chemotherapy chairs and in terms of the consultations with the oncologists. Once the process has been completed, and a new method of appointment scheduling has been obtained, the simulation will be used to corroborate that the desired level of balanced workload can be achieved, as well as to compare it with the existing method and verify that the new method is more efficient. In [ 16 ], in the context of a centre to which patients come for chemotherapy, the problem of minimising delays in patient treatments and the total working time of the centre is addressed. Specifically, the aim is to find the optimal starting day of treatment for each patient so that their chemotherapy cycle is completed as soon as possible, as well as for the centre’s professionals to achieve this goal with as few working hours as possible. However, the problem is also posed by taking the number of resources as a decision variable to find out what would be the appropriate number of professionals and chairs to achieve optimal performance (if the hospital were in a position to devote a larger budget to increase such resources). The modelling in the paper by [ 17 ] studies a way to proceed when, for a given working day, patients in the centre are assigned appointments with their oncologist and chemotherapy treatments. Furthermore, it is assumed that the appointments with each patient’s oncologist are scheduled in advance, and the problem faced is to determine the schedules of each patient’s chemotherapy treatment sessions. Thus, this work is close to the problem at hand, although the constraints and the objective itself are not identical to those of ODH. However, it is noteworthy that the work has the great advantage that the proposed model can be solved exactly and very quickly, for the planning of a working day with a number of patients around 100, which is a good property inherited by the models introduced in our paper. In [ 18 ], treatments are scheduled for new patients and nursing needs are taken into account, taking into account last minute cancellations and multiple objectives. Ref. [ 19 ] uses a model similar to those considered in vehicle routing problems to balance resource use and minimise waiting times. They make simplifications such as not setting a limit on the number of nurses, although they plan a set of days. They only accurately solve problems with about 30 patients and generally use a two-stage heuristic involving a constructive algorithm and a local search. They perform a sensitivity analysis and use a second model that adjusts appointments robustly to longer than expected treatments. Applications of stochastic mathematical programming to the optimization of oncology patient circuits. Ref. [ 20 ] addressed the problem of adjusting outpatient time and appointments along with the optimal number of physicians, for an outpatient appointment system in an individual block/fixed interval class, by using an adaptive penalty Mathematics 2022,10, 62 6 of 31 genetic algorithm. The length of service time for medical consultation, the time required for laboratory tests, and the time deviation from the appointment time are modelled by random variables. No-show patients are also included in the system. Using the adaptive penalty scheme, optimisation constraints are handled automatically and numerically. The solution methodology is easily applicable to other appointment systems. Ref. [ 21 ] presents a two-stage stochastic integer schedule to design patient appointment schedules under uncertainty of treatment times. The goal is to minimise a trade-off between the expected waiting times of patients and the expected total time to treat them. It is shown that solving this optimisation problem requires prohibitive computational time, so a heuristic algorithm is developed to find approximate solutions. Ref. [ 22 ] proposes such a model that is solved by averaging sample scenarios, which is an approach that can result in affordable computational times. This approach has served as a source of inspiration for the second model introduced in this paper. The work is motivated by a multidisciplinary oncology clinic that communicates the diagnosis and explains the treatment plan to its patients. In addition, regular patients are also seen by the clinicians. Therefore, all clinicians involved need a work plan in which various types of patients can be scheduled. These work plans are designed to optimise the waiting time of the patients and the waiting time of the clinicians. In [ 23 ], patient waiting times, chemotherapy chair downtime and nurse overtime are minimised using a stochastic programming algorithm. The work [ 24 ] includes stochastic programming aimed at minimising waiting times and the implementation of the methods with OpenSolver. Optimization of oncology patient circuits through simulation techniques. A discrete event simulation model to explore appointment scheduling in a general hospital outpatient chemotherapy department has been developed by [ 25 ]. They consider different statistical distributions of the times involved in the problem. They identified an efficient schedule that kept bed utilisation at a tolerable level, restricting excess waiting time in a clinical setting. The authors suggest a scheduling method based on infusion time for the outpatient chemotherapy department. The study [ 26 ] proposes a feasible solution that increases resource utilisation without affecting patient service. The proposed simulation model shows how, with a better balance in the appointment system, the clinic could increase the number of patients seen by 18% while maintaining the same total patient time in the system. In other words, the model establishes a new schedule for infusion chairs that would allow more patients to enter the system and maintain the workload of nurses and pharmacists. The model distributes patients to available slots without exceeding the capacity of human resources. By means of simulation, waiting times, allocation of wards to specialists, multiple clinics and the use of resident and senior doctors are simultaneously considered in [ 27 ]. The convenience of computerised data collection is highlighted. Ref. [ 28 ] analyses the effects of possible improvements to the circuit by simulation. Consultation with the oncologist and pharmacy work are highlighted as key steps. They recommend citation for all stages and improved information flow between them. Other methods applied to optimize the management of oncology patient circuits . Research by [ 29 ] addresses an oncology patient admission and allocation problem. The probability of patient appointment cancellation, as an important indicator of possible future gaps, is considered by the author in making admission and patient allocation decisions. The aim of walk-in admission by general outpatient clinics is to reduce the negative impact of patient absences and cancellations, and to improve the utilisation and accessibility of the clinic. This study presents a learning-based outpatient management (LGOM) system that focuses specifically on the management of patient admission and allocation during the day. The author develops a Markov decision process model to capture the patient admission decision process in the general outpatient clinic. Admission and patient allocation decisions are made from the perspective of maximising the long-term benefit of the system. LGOM is trained with simulation data and then applied to the real situation and the policy is updated to reflect the actual information. Ref. [ 30 ] applied a decision tree analysis to predictors that were significantly correlated with patient attendance behaviour to assess the probability Mathematics 2022,10, 62 7 of 31 of no-shows. The authors then developed a dynamic appointment scheduling procedure using different over-demand strategies for different numbers of appointments. A computer simulation was used to evaluate the effectiveness of the dynamic procedure against two other methods of randomly and uniformly assigning appointments. The dynamic scheduling procedure resulted in increased scheduling efficiency through overbooking, but with less than 5% risk of appointment conflicts (i.e., two patients presenting at the same time). In [ 31 , 32 ], discrete event simulation is incorporated into a kaizen approach aimed at reducing waiting times and better distributing the workload of hospital staff. The inclusion of this approach in a lean process has enabled staff to participate in a team-based problem-solving approach. 4. Contribution of the Paper Within the field of literature reviewed in the previous section, this work was born as a consequence of the margin for improvement detected by ODH professionals in Santiago de Compostela, Spain. The primary objective is to be able to provide day hospital patients with an appointment as close as possible to the start time of their treatment, once the consultation with the oncologist has taken place. This would avoid the uncertainty that currently exists, as the patient leaving the oncology appointment now has to wait to be called to start oncology treatment without any additional information. Furthermore, it would be desirable to reduce waiting times, according to [2,3] studies. Therefore: • The first contribution was to measure the times involved in the circuit for all patients visiting the centre during a normal working week. Despite the difficulty of this task, the collaboration of each and every one of the CHUS professionals involved has been very valuable and has not only served to feed the models developed in the work, but has also shed light on the true reality of the times of the different stages of the circuit. This is of great use to the aforementioned professionals and in making different decisions aimed at improving the service. • Then, the model proposed in [ 17 ] was selected as it represents a problem very close to that of ODH and solves it very efficiently, and its objective and restrictions were adapted to fully represent our problem. The data collected have been used for the definition of the model parameters. A data-driven procedure is used to determine the ready times at which each patient can receive cancer treatment. While providing promising initial results, this model is deterministic and is not able to capture the underlying stochasticity in the mix of patients. • Thus, a second model is proposed, which generalises the previous one and, following the [ 22 ] approach, it is based on the data driven construction of different scenarios obtained from cluster analysis methods, that take into account the stochasticity of the times of the different stages of the process and the consequent variety in the patient mix. This second model achieves the objective of not only scheduling treatment appointments but also rescheduling appointments with oncologists from the original ones. In addition, an improvement in patient waiting times is achieved by comparing the results provided by the model with the available data. All models are programmed with the AMPL [ 33 ] language and solved with the Gurobi ( https://www.gurobi.com/, last accessed 20 Decemer 2021) solver in a fast way (seconds). The PC used for this work was a Lenovo Intel(R) Core(TM) i7-1065G7, 8 GB RAM, Windows 10 64-bit operating system. • Finally, the results obtained in both models feed a third and last model created to assign the nurses in charge of providing the treatment to the patients. All of this, in short, provides a decision support tool in a healthcare context. It incorporates a prediction for patients of the start time of their oncological treatments, built through optimization criteria, resulting in individual and societal benefits measurable through the objective function of the proposed mathematical models. Currently, the method used to perform these tasks is human-based. To our knowledge, no such study has been carried out in the environment close to the ODH. Mathematics 2022,10, 62 8 of 31 5. Materials and Methods We set out to use mathematical optimisation to obtain an algorithm that, by providing fully defined patient schedules, (i.e., including an estimate of both oncology review and chemotherapy treatment), also minimises waiting times between both medical services. To this end, interviews were arranged with all professionals involved in the circuit experienced by ODH patients and the existing literature on the topic of mathematical optimisation applied to outpatient chemotherapy was consulted. Our aim was to have a global understanding of how these types of problems are usually attacked mathematically and, from this knowledge, to be able to offer a solution that is valid for the specific circumstances of ODH. During the week of 11 January 2021 we collected data in the ODH of Santiago de Compostela on the duration of the different times related to consultations with oncologists and chemotherapy treatments. Specifically, we took the time differences between the theoretical and real times of the beginning of the oncological check-ups, the times of the durations of these check-ups, the time differences between the end of the check-ups and the times when the substances are ready to be administered, and finally the times of the durations of the chemotherapy treatments. From these data we can get an idea of where the critical stages of the process lie and how to approach the possible modelling of the problem. 5.1. Deterministic Model for Treatment Appointments Under a deterministic approach and starting from an established schedule for appointments with the oncologist, the strategy would be to define a certain time as a margin between the theoretical start of oncology check-ups and the start of chemotherapy treatments that we consider appropriate for a large majority of patients. From this point, we would have an estimated time for each patient from which they would be ready to receive chemotherapy treatment and we could establish, for all treatments, optimal schedules with respect to the estimated waiting time for all patients that day. In this way, the patients would know in advance not only the estimated time for their check-up with the oncologist, but also an approximate time to receive their chemotherapy treatment. Thus, in addition to the optimisation process itself, we introduce the benefit for patients of knowing at what time (or from what time, in the case of a day with hypothetical delays) they will be called to start their treatment, allowing them to organise their idle time without the uncertainty of being called by the ODH at any time. Once accurate information was obtained, the model of [ 17 ] was adapted to the particularities of our problem as follows. 5.1.1. Parameters P: it establishes the number of patients with a chemotherapic appointment. K: it establishes the number of chemotherapic chairs available. T: it establishes the number of time slots used to split the 14 daily working hours. lpwith p∈ {1, ..., P}: chemotherapic treatments’ duration of each patient. rp with p∈ { 1, ..., P} : it establishes, for each patient, the first time slot where his chemotherapic treatment could be scheduled. Ndispt with t∈ { 1, ..., T} : number of available nurses inside the chemotherapic room for each time slot. 5.1.2. Variables xp,t with p∈ { 1, ..., P} and t∈ { 1, ..., T} : binary variable that is equal to 1 if the p patient begins his treatment in the time slot t. Cmax : integer variable that establishes which time slot will be the first one with no treatment associated. λ1 and λ2 : positive real variables. We will use them in order to ponder both parts of the bi-objective function. Now we are prepared to formalize a mathematical model for this situation. Mathematics 2022,10, 62 9 of 31 5.1.3. Mathematical Model min λ1·P ∑ p=1 T ∑ t=1 [(t−1−rp)·xp,t]+λ2·Cmax subject to T ∑ t=1 xp,t= 1, ∀p∈ { 1, ..., P} (1) rp ∑ t=1 xp,t= 0 provided that rp> 0, ∀p∈ { 1, ..., P} (2) Cmax ≤T , (3) T ∑ t=1 (t+lp− 1 )·xp,t≤Cmax , ∀p∈ { 1, ..., P} (4) P ∑ p=1 t ∑ a=max{1,t−lp+1} xp,a≤K,∀t∈ {1, ..., T}(5) P ∑ p=1 t+2 ∑ a=t xp,a≤5, ∀t∈ {1, ..., 24}(6 ) P ∑ p=1 t+2 ∑ a=t xp,a≤6, ∀t∈ {25, ..., 84}(7) P ∑ p=1 t+2 ∑ a=t xp,a≤3, ∀t∈ {85, ..., 108}(8) P ∑ p=1 t+2 ∑ a=t xp,a≤2, ∀t∈ {109, ..., 165}(9) P ∑ p=1 t ∑ a=max{1,t−lp+1} xp,a≤16 ·Ndispt,∀t∈ {1, ..., T}(10) As we can see, we want to minimize a bi-objective function converted into a single objective with weights. The first part of that function is an expression that grows while the sum of the differences between the moments when the treatments could have started and the moment when then really began increases. The second part references the moment of the day when the last treatment ends. Minimizing the first objective means reducing the average waiting time of patients, while minimizing the second implies achieving a working schedule that finalizes as soon as possible. Since the ODH’s interest is, above all, to provide an appointment schedule for treatments and to shorten patients’ waits, we have made all the calculations with λ1= 0.9 and λ2= 0.1. In any case, the inclusion of Cmax in the model results in obtaining, in addition to the appointments for the different patients, the time at which the last treatment was completed. Constraint (1) ensures that each patient starts exactly once his or her scheduled treatment. Constraint (2) ensures that no treatment is scheduled before it has been prepared in the oncology pharmacy. Constraints (3) and (4) make sure that the course of the infusion of the patient who finishes his treatment last is not later than the closing time of the hospital and, obviously, not earlier than the instant at which any other patient finishes their treatment. We impose constraint (5) in order to prevent that in any moment the number of chemotherapeutic chairs is surpassed by the number of ongoing treatments. Constraints (6)–(9) form a block that ensures that, over the course of the entire working day, at no time can a nurse initiate more than one treatment in a 15-min period, taking into account how the number of nurses available will vary over the course of the working day. The purpose of constraint (10) is to make sure that nurses’ working capacity is not exceeded. In other words, that no nurse has to deal with more than 16 ongoing treatments at any time. Mathematics 2022,10, 62 16 of 31 6. Results of the Case Study After having validated the behavior and efficiency of the previous models, with numerical examples, we show here the main results obtained by applying them to the ODH data; a total of 290 patients attended over the 5 days of a week. 6.1. Summary of the Collected Data We now proceed to summarise the statistical information from the data collected in the hospital during the week of 11 January 2021. We will show four pairs of boxplots and histograms, one for each considered time in the data. In terms of the analysis of the data obtained, it is concluded that the majority of oncological check-ups do not take more than 45 min longer than the estimated start time. However, as we can see in Figure 4there are still non-negligible amounts of data above this threshold. Furthermore, the interquartile range of the sample exceeds 30 min in duration, indicating the large variability involved in this waiting time. With regard to the duration of appointments with the oncologist, it seems clear that, in general, the duration of appointments with the oncologist is less than a quarter of an hour (more than 60% of the data show times of less than 15 min). The interquartile range is barely more than 10 min and there are relatively few outliers (see Figure 5). Substance preparation is the most problematic stage of the whole process. As we can see in Figure 6, duration times tend to cluster between 50 and 100 min. Moreover, the interquartile range is around three quarters of an hour. Therefore, this is a stage with long average times and great variability. Finally, the stage of chemotherapy treatments is the one that shows the greatest variability, presenting significant volumes of data beyond four hours in duration (see Figure 7). The comparison between the latter times and the data on the duration of oncology check-ups shows that it is clear that this stage shows much more variability. Specifically, the data collected in the ODH during the week analysed show that more than 80% of the oncological check-ups carried out lasted less than half an hour, while with regard to chemotherapy treatments, 35.35% of the total lasted between 0 and 100 min, 33.44% lasted between 100 and 200 min, 22.29% lasted between 200 and 300 min and 8.92% lasted more than 300 min. On the other hand, it is worth mentioning that the chemotherapy treatment stage is the last stage of the process, and therefore the one with the most uncertainty regarding its possible start time. Much of this uncertainty is explained by the immediately preceding process: the pharmacy stage. This stage is second only to the chemotherapy stage itself in terms of variability. All these factors make the planning of treatment schedules a more delicate task than the planning of oncology consultations. 0 10 20 30 40 50 600 10 20 30 40 50 600 10 20 30 40 50 60 0 20 40 60 80 Figure 4. Boxplot and histogram of the oncological check-ups’ delays. Axis X : delay time in minutes. Axis Y: number of patients. Mathematics 2022,10, 62 17 of 31 0 20 40 60 80 100 ● ● ● ●● ●● ●● ●● 0 20 40 60 80 Figure 5. Boxplot and histogram of the oncological check-ups’ durations. Axis X : check-ups’ durations in minutes. Axis Y: number of patients. 0 10 20 30 40 50 60 ● ●●●● 0 50 100 150 200 Figure 6. Boxplot and histogram of the durations of substance preparation. Axis X : durations of substance preparation in minutes. Axis Y: number of patients. Looking in detail at the data collected during the week of 11–15 January, we can see that if we want to take an upper level for the differences between the theoretical and real start times of the oncological revisions that are fulfilled by 85% of the patients, we should go to 60 min. On the other hand, to establish an upper limit for the duration of these check-ups suitable for 85% of the patients, we must go to 60 min. Regarding the time of preparation of the therapy substances, in order to again obtain a new level that covers 85% of the patients, we need 90 min. Therefore, it may seem wise to take a margin of 210 min over the theoretical starting time of the oncological check-up to determine the moment from which both the patient and the treatment will be ready for the chemotherapy session. This framework should be applied indiscriminately to all patients, given that we do not have any estimate of the specific duration of each patient’s revisions. On the other hand, we do have an estimate of the duration of the chemotherapy treatments that each patient will receive. For this purpose, we will run the model with the prudent “ready times” described above Specifically, apart from the aforementioned 210 min of time between the Mathematics 2022,10, 62 18 of 31 beginning of the theoretical review and the moment when the patient is ready to receive the chemotherapy, we are going to execute the program with 180, 150 and 120 min of margin. The 180 min margin is the result of considering 45 min of time for the delay of the oncologic revision, 45 for the duration of this and 90 for the preparation of the drugs. The 150-min rate considers 30, 30 and 90 min, respectively. Finally, the margin of 120 considers 15, 15 and 90 min, respectively. We will be able to get an idea of what we could achieve if the delays in the start of the reviews were mitigated or if the durations of the processes of the reviews themselves and of the formation of the patient’s therapy substances were reduced. 0 10 20 30 40 50 60 70 0 50 100 150 200 250 Figure 7. Boxplot and histogram of the durations of the treatments. Axis X : durations of the treatments in minutes. Axis Y: number of patients. 6.2. Results of the Deterministic Model Table 2shows the sum of waiting times for all patients for each day of the week of 11 January 2021 . The first column shows the waiting times for the current procedure, while the following columns show the waiting times resulting from applying the deterministic model with specific ready times. The Model 1 column shows the waiting times obtained with the model using ready times that are the result of setting a margin of 210 min between the theoretical start of the review and the time when the patient is ready to receive the therapy. The Model 2 column represents the analogous data taking a 180-min window. Column Model 3 shows a margin of 150 min, and finally column Model 4 shows 120 min of margin. Table 2. Total waiting minutes over the different ready times considered provided by the deterministic model. At Present Model 1Model 2Model 3Model 4Patients Monday 7339 9255 7900 6250 4600 56 Tuesday 10,382 13,375 11,675 9275 7115 72 Wednesday 7351 9790 8190 6360 4480 61 Thursday 5906 7790 6360 4860 3360 50 Friday 5810 8075 6615 5085 3555 51 Total 36,788 48,285 40,740 31,830 23,110 290 Note that if we take a margin of 210 min to calculate the “ready times”, we would be assuming the price of worsening waiting times by an average of 48 min per patient in exchange for having a well-defined schedule for both oncology check-ups and chemotherapy Mathematics 2022,10, 62 19 of 31 treatments. It seems debatable whether or not the model is worth applying in these circumstances. However, considering small advances in “ready times”, the situation improves considerably. Thus, by simply reducing the margin of the times with which we generate the ready times by 30 min (i.e., taking margins of 180 min), we would have a situation in which we achieve a complete planning of the day, increasing the average waiting time per patient by less than 20 min. If we consider even greater improvements, taking margins of 150 and 120 min, we would manage to reduce waiting times by an average of 17 and 45 min per patient, respectively. It should be noted that results are sensitive to the choice of the length of the time intervals considered. Table 3gives a comparison of results considering time intervals of length 5, 10 or 15 min. We see that the results are worse for the values 10 and 15, which justifies our choice of 5 min. Table 3. Total waiting minutes obtained with the deterministic approach, using Model 1 for the ready times, with different durations of the considered time intervals. Duration of the Time Intervals: 5 min 10 min 15 min Monday 9255 9770 10,815 Tuesday 13,375 14,120 15,420 Wednesday 9790 10,320 10,890 Thursday 7790 8180 8250 Friday 8075 8470 9285 Total 48,285 50,860 54,660 Figure 8shows how the number of treatments in progress evolves throughout the day on Monday according to the current procedure and how the model would be applied with ready times resulting from taking margins of 120 min. As we can see, when using the mathematical model, the distribution of the treatment workload tends to shift to earlier hours compared to the current procedure. Specifically, the model proposes more treatments in progress between 11:30 am and 2:30 pm, but less in the afternoon, except for a short period between 7:00 pm and 7:30 pm. This distribution of treatments is consistent with the deterministic model being able to reduce total waiting times. This is a positive consequence for both patients and ODH professionals: patients in general would finish their treatments earlier and be able to return home earlier, which we can translate into a higher quality of service for them, while for the service professionals there is a greater margin of response to possible delays in order not to have to perform treatments beyond the official ODH closing time. Table 2and Figure 8show the overall improvement provided by the deterministic model in terms of patients’ waiting times and the effects on their treatment start times. Next, Table 4and Figure 9show the specific changes or values of the variables in the optimal situation. Thus, in Table 4we consider the data for Monday 11 January 2021. Specifically, for each of the patients, we provide the duration of the application of their treatment, the actual start time for its application and the start time proposed by the deterministic model considering a time margin of 120 min, all expressed in time units of 5 min. Mathematics 2022,10, 62 20 of 31 Figure 8. Comparison of the number of oncology treatments in progress actually being performed and those proposed by the deterministic optimization model (120 min of margin) at each point in time on Monday, 11 January 2021. Axis X : time of the day between 8:00 am and 10:00 pm. Axis Y : number of treatments in progress. Table 4. Treatment duration, actual start time and start time proposed by the deterministic model with 120 min of margin, expressed in number of 5-min periods, for the 56 patients on Monday 11 January 2021. Patient Treatment Real Proposed Patient Treatment Real Proposed Number Duration Time Time Number Duration Time Time 1 29 72 61 29 54 60 50 2 30 65 46 30 44 46 47 3 19 55 49 31 82 65 61 4 23 77 81 32 27 59 57 5 25 56 41 33 18 54 45 6 27 50 57 34 24 66 50 7 37 50 53 35 21 67 45 8 24 46 57 36 45 74 53 9 22 57 57 37 27 84 61 10 30 60 49 38 13 57 41 11 65 43 76 39 39 45 44 12 59 49 72 40 46 42 50 13 82 50 52 41 28 80 49 14 69 51 74 42 33 91 81 15 12 66 53 43 12 80 65 16 9 80 69 44 40 41 44 17 12 53 57 45 49 39 47 18 12 65 43 46 44 60 66 19 40 55 41 47 30 90 67 20 8 82 69 48 84 42 52 21 21 53 42 49 39 81 85 22 35 63 55 50 36 93 69 23 18 65 61 51 30 84 58 24 18 63 65 52 22 68 65 25 46 38 44 53 19 72 53 26 43 38 39 54 26 70 41 27 45 52 47 55 24 84 61 28 8 80 65 56 61 56 73 Figure 9represents these data, which for clarity are expressed, both in the upper and lower graph, as a function of the time of day and ordered, from bottom to top, by the duration of the treatment, from the longest to the shortest. The top graph shows the Mathematics 2022,10, 62 21 of 31 actual data and the bottom graph shows the model proposal. For each patient, the time elapsed from the opening time of the centre to the start of treatment is shown in blue and the treatment time in red. We can see in detail how, when applying the deterministic model, there is a higher number of treatments in progress between 12:30 h and 14:00 h. However, let us note that its applicability is determined by achieving delay times in the start of oncology appointments and the duration of oncology appointments themselves of no more than 15 min, and a treatment preparation of no more than 90 min, i.e., time margins for receiving treatment, from the scheduled appointment time with the oncologist, adjusted to 120 min. 8 10 12 14 16 18 20 22 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 Actual time elapsed from the opening of the centre to the start of treatment (blue) and treatment duration (red) 8 10 12 14 16 18 20 22 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 Time proposed by the deterministic model from the opening of the centre to the start of treatment (blue) and treatment duration (red) Figure 9. Time elapsed from the opening of the centre to the start of treatment (blue colour) and treatment duration (red colour) on Monday 11 January 2021: actual data (top) and data proposed by the deterministic model with time margins of 120 min (bottom). Patients have been ordered from down to up from the longest to the shortest treatments. X-axis: time of day between 8:00 and 22:00 h. Y-axis: patient number. Mathematics 2022,10, 62 22 of 31 6.3. Results of the Stochastic Model Before using the stochastic model we have to divide the patients using the k -means method. After applying this algorithm on the set of our patients we obtain four subgroups. Table 5shows, for each group or scenario, the mean of the four times of interest of the oncological patient circuit. Next, Table 6contains the sum of waiting times obtained for all patients for each day of the week of 11 January 2021. The first column shows the waiting times for the current procedure, while the following columns show the waiting times resulting from applying the stochastic model, the percentages of improvement and the number of patients for each day, respectively. It can be seen that the improvement achieved in waiting times using the stochastic model is between that achieved by the deterministic model in its two most optimistic cases (that is, margins). Specifically, waiting times in this case are reduced by 17%, which translates into mitigating each patient’s wait by an average of 21 min. The results in Table 6are expected values, calculated from the realizations of the randomized experiment and the probabilities of the different scenarios. In Table 7we delve into the results, showing for Monday, 11 January 2021, the waiting times obtained in each of the scenarios, the probabilities of the scenarios, the average already shown in Table 6and , additionally, the total computation time with Gurobi. We note that scenario 4 is the one with the longest treatment processing times and translates into longer waiting times. Figure 10 also shows for Monday, 11 January 2021 the comparison between actual oncologist appointment times and those proposed by the stochastic model. We see that the last are less concentrated (i.e., more dispersed) in the early morning hours in the interest of reducing patient waiting times. Table 5. Average times (minutes) for each scenario designed to apply the stochastic model. Scenario 1Scenario 2Scenario 3Scenario 4 Check-ups’ delays 49 14 15 41 Oncological check-ups 13 21 11 9 Substance preparation 63 42 90 147 Treatments 125 77 116 197 Patients 59 56 75 16 % Patients 28.6% 27.2% 36.4% 7.8% Table 6. Waiting minutes provided by the stochastic model and with actual procedure. At Present Stochastic Model Improvement (%)Patients Monday 7339 6029 17.74 56 Tuesday 10,382 7544 27.3 72 Wednesday 7351 6392 13.0 61 Thursday 5906 5239 11.3 50 Friday 5810 5344 8.0 51 Total 36,788 30,548 17.0 290 Table 7. Mean value of waiting minutes on Monday, 11 January 2021, waiting time in the randomized experiment realizations, probabilities of each scenario, actual waiting time and computation time (s). At Scenario Scenario Scenario Scenario Average Computing Present 1 2 34Result Time 7339 6550 3585 6385 10,975 6029 215 Probabilities 28.6 27.2 36.4 7.8 Mathematics 2022,10, 62 23 of 31 8 9 10 11 12 13 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 Actual appointment time with oncologist 8 9 10 11 12 13 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 Oncologist appointment time proposed by the stochastic model Figure 10. Actual oncologist appointment time and stochastic model proposed appointment time for patients on Monday 11 January 2021. X-axis: time of day between 8:00 and 13:00 h. Y-axis: patient number. 7. Discussion, Conclusions and Framework for a Further Research Agenda From all the literature reviewed, the studies by [ 15 , 17 ] largely inspired our proposed deterministic model. Ref. [ 15 ] solves a problem of scheduling appointments for patients attending an oncology centre, although the main objective is to achieve a scheduling scheme that avoids peaks in the workload of the centre’s professionals during the working day, while [ 17 ] mainly aims to reduce patient waiting times and makespan as much as possible. Therefore, as far as the objective function is concerned, our deterministic model is more similar to the work of [ 17 ], although the set of constraints generated by the context of this study are quite different from those emanating from the reality of the ODH. While Mathematics 2022,10, 62 24 of 31 the deterministic model provides positive estimated results in terms of reducing patient waiting times, although it is fairly simple to implement, the relatively random nature of the problem may be a limitation of this model. For this reason, in this paper, a twostage stochastic programming model is also presented ( [ 34 ]). We assume uncertainty with respect to the time duration of the different stages of the patient circuit and consider several possible scenarios for the flow of the set of patients through the different stages of the process. Classification techniques were used to design these scenarios. We thus present a model that offers several possible schedules for the chemotherapy of each patient. The role of the oncology day hospital professionals is to decide, depending on how the working day is, which estimate to communicate to each patient for the start of treatment. Note that this model is a stochastic generalisation of our deterministic model, close to that of [ 17 ]. It should be said at this point that an advance of our work over [ 17 ]’s is that it provides not only a treatment appointment for each patient, which also takes into account the workflow of the day in question, but also automates and optimises the generation of appointments with oncologists. It is also worth noting the relationship between the three models generated in this setup in the sense that we can use the stochastic model to optimise appointments with oncologists, then use these results in the deterministic model to obtain treatment appointments, and finally, with the results of the deterministic model to assign nurses to patients. In terms of resolution of the stochastic model, we adopt the approach of [ 22 ] and, as in this paper, resolution efficiency is achieved. Although the resolution method we use is close to that of [ 22 ], there are important differences in the two studies, as the latter is motivated by a multidisciplinary clinic and the aim is to minimise patient waiting time and weighted overtime and downtime of different clinics. The randomness is attributed to the possible arrival of multidisciplinary patients which is modelled through the use of the multinomial statistical distribution, however the problem we investigated concerning appointments for oncological treatment and the randomness in the different times that make up the circuit of a patient in the day centre is not considered. At the ODH, the distribution of patients seen each day in the different specialities is not uncertain and is organised by the doctors themselves. Ref. [ 23 ] is one of the most recent studies that addresses the establishment of appointments for receiving oncologic treatments by means of a two-stage stochastic model. The main difference with the present study is that the motivating center performs the consultation with the physician and the actual infusion of the treatment on different days, so that only the existence of uncertainty in the duration of treatments is considered. However, the work of [ 23 ] simultaneously plans the succession of patient arrivals at the center, the appointment time, and the assignment of patients to nurses and chairs. Although the compact approach is elegant, it is laborious to solve and requires the use of a specific heuristic algorithm resulting from the adaptation of the Progressive Hedging Algorithm and a detailed computational study to determine its performance. However, when working with a number of nurses and chairs similar to that of ODH, computation times in excess of one thousand seconds are required. In any case, the methodology of both works is different and it should be noted that [ 23 ] proposes as a future line something that we are addressing, such as the joint planning of treatment schedules and appointments with the oncologist. To conclude the discussion, we mention the reference of [ 24 ], also relatively recent and close to our study. There too, both deterministic and stochastic approaches are employed. First, it proposes to develop a method of of oncologist and chemotherapy appointments with the objective of balancing the workload of nurses and oncologists, to the extent that the number of chairs occupied, or oncology appointments started, in each unit of time is a decision variable in the problem. It uses an integer programming model, nonlinear in fact, which, rather than determining specific appointments for patients, provides the number of clients initiating their treatment or consultation in a given time period. The discrete-event simulation methodology for modeling the flow of patients in the oncology clinic is used to show that the proposed scheduling methods can improve the well-being of patients by reducing waiting Mathematics 2022,10, 62 25 of 31 times and improve staff work by providing a more balanced workload. Factors that affect workload balance, such as patient volume or nurse scheduling, are also studied. As for the stochastic approach, they address the problem of scheduling chemotherapy patients with uncertainty in the duration of treatments. They propose a two-stage stochastic programming model, which is very difficult to solve due to the large number of scenarios, the non-linear constraints used and the need for additional variables and constraints. Therefore, they propose a two-stage algorithm to compute the expected downtime and waiting time. This two-stage algorithm does not guarantee optimisation with respect to patient waiting time and downtime and therefore they propose as a future research direction to develop new methods to solve the proposed stochastic programming model. Results with real data are also not provided. With respect to the conclusions, the stochastic model, in addition to appointments for treatments we obtain defined schedules for patients with respect to their medical appointments, making the minimisation of patient waiting times between medical appointments more effective. This model has an estimated improvement in waiting times of 17%. Note that the scheduling of check-up times respects minimum restrictions to ensure that the schedules are manageable for the oncologists in charge of the first stage of the process. It would be up to the service professionals to select one model or the other. While the use of the deterministic model is simpler and allows the automation of the allocation of treatment appointments, thus improving on the current system and relieving the nurses of this responsibility, the stochastic model takes into account more information about the timing of the process and allows the initial oncology appointments to be rescheduled. However, this model requires daily coordination of all involved staff on the work progress to select the appointment provided to patients. Other strategies are also possible, such as choosing the earliest appointment among all possible appointments, for each patient, or the later one. If we analyse Table 2in detail, we can see that the result of applying our deterministic model with the 210 and 180 min quotas is to increase patients’ waiting times, but in exchange for offering them in advance a specific timetable for both their oncology check-up and their chemotherapy session. It should be noted that this increase, in the case of the 180 min quota (the most realistic), is less than 4000 min over the total of all patients in the week in which the data was collected. This represents an increase in waiting time on average of less than a quarter of an hour per patient, which does not seem too much considering that the average waiting time per patient with the current procedure is close to two hours (110 min). Therefore, it might seem worthwhile to apply the algorithm and assume this increase in waiting time in order to obtain fully defined schedules in advance. Moreover, we also have to take into account that the distribution of treatments obtained with the algorithm offers professionals a greater capacity to react to unforeseen events, as we mentioned when analysing Figure 8. On the other hand, it had also seemed interesting to explore the option of reducing the second stage waiting times of patients by a reasonable investment of resources or by other strategies. As we can see in Table 2, just by reducing the average margin time by 30 min, a complete organisational scheme for patients can be obtained without increasing waiting times compared to the current situation. On the contrary, waiting times will be reduced compared to the current baseline. With respect to the stochastic model, in addition to achieving defined schedules for patients with respect to the two medical commitments they have, this model provides an estimated improvement in waiting times of 17%, a measure obtained from the available data. The stochastic model is complemented by a tool that solves the problem of assigning nurses to patients, which uses directly the results of the stochastic model as parameters. Finally, we agree with [ 27 ] or [ 28 ], among others, about the convenience of computerised data collection and efficient information flow among the stages of a circuit of oncology patients.