Automatic Nurse Allocation based on a Population Algorithm for Home Health Care

The provision of home health care services is becoming an important research area, mainly because in Portugal the population is ageing and it is necessary to perform home care services. Home care visits are organized taking into account the medical treatments and general support that elder/sick people need at home. This health service can be provided by nurses teams from Health Units, requiring some logistics for this purpose. Usually, the visits are manually planned and without computational support. The main goal of this work is to carry out the automatic nurse’s allocation of home care visits, of one Bragança Health Unit, in order to minimize the nurse’s workload balancing, spent time in all home care visits and, consequently, reduce the costs involved. The developed methodology was coded in MatLab Software and the problems were efficiently solved by the particle swarm optimization method. The nurse’s allocation solution of home care visits for the presented case study shows a significant improvement and reduction in the maximum time, in the nurse workload balancing, as well as the patients waiting time.


INTRODUCTION
According to the World Health Organization the ageing people and dependency rate care of older people in Europe, namely in Portugal, is increasing. The number of people who need home care services, consequently, is growing over the years. The National Health System has to deal with more and more demanding scenarios in what concerns home care.
This scenario -to provide home care servicesis not only advantageous to elder/sick people but also to the National Health System since it is economically advantageous to keep people at home instead of providing them with a hospital bed (Nickel et al., 2012;Rest and Hirsch, 2015).
The home-based care provided by public or private entities has been the subject of recent research mainly in the operations research area with particular attention on route's optimization and on the staff teams composition that provide this kind of services (Nickel et al., 2012;Benzarti et al., 2013 Rasmussen et al., 2012). According to previous studies, the use of optimization strategies contributes to improve the Home Health Care services (Liu et al., 2013a;Sahin and Matta, 2015).
The Portuguese public health system consists in two types of units: Hospitals and Health Units. Health units are closer to the population, as they continuously monitor their patients and home care services are provided by the teams of health professionals (usually nurses) of these units. In this context, Health Units have to perform the schedule and the best allocation of the nursing teams inside and outside of the Health Units.
The schedule of the home care visits provided by the Health Unit teams depends on the patients, nurse profiles and resources to perform the home care. This represents a complex problem whose main goal is to minimize the time required to perform all the home care visits (considering the travel and treatment patient time) and to return to the Health Unit. In addition, the best allocation of the nurse teams should be provided, taking into account the workload balancing between them.
The rest of the paper is organized as follows: Section 2 gives a brief description of the literature review involved in Home Health Care and its applica-tions. Section 3 overviews the problem definition and formulation for nurses allocation, and Section 3 describes the general real data collection implemented in the case study. Section 4 presents the populationbased algorithm applied and coded to solve the optimization problem. Section 5 will present and discuss the obtained results and compared with is currently being performed. Finally, Section 5 rounds up the paper with the conclusions and future work.

LITERATURE REVIEW
Many countries, such as Portugal, face a growing elderly population, which increases the pressure on institutions and professionals to provide social and medical care in the most cost-effective way.
In this sense, a small literature review was carried out to determine the state of the art involved in keywords such as "Home Health Care", "Allocation", "Optimization" and "Scheduling". The same search was performed on the Scopus database which enabled the results of 94 documents from different sources such as journals, books and conference proceedings. With the bibliographic database collected, it was organized to enable the use of the Bibliometrix R-package (Aria and Cuccurullo, 2017). It is important to refer that today Bibliometrix is more than just a statistical tool, which includes all the main bibliometric methods of analysis, but we use it especially for science mapping and networks and not for measuring science, scientists, or scientific productivity. In this purpose, it was used the shiny interface for Bibliometrix, called Biblioshiny. It supports in a easy way of use the main features of Bibliometrix, like for example, data importing and conversion to data frame collection, data filtering, analytics and plots for three different level metrics (sources, authors, documents) and analysis of three structures of knowledge (conceptual structure, intellectual structure, social structure). In this sense, after analyzing the obtaining information, it is possible to observe that the annual scientific production in the field of applications and Home Health Care study has grown exponentially in the last 5 years. Figure 1 illustrates the extreme importance of studies and works that enhance the optimization of health logistics, such as primary care services and their decision support in this scientific environment.
Another analysis, more related to the scientific mapping and its conceptual structure, it was possible to collect the networks of conceptual words, which makes it possible to discover links and concepts through co-occurrences of terms. The concep- tual framework is often used to understand the topics covered by scholars (called the research front) and identify which are the most important and most recent questions. Thus, the co-word analysis through correspondence analysis was collected, according to the dendrogram topic, which enables the iconic representation that organizes the particular links. This analysis employs a quantitative method that leads to groupings and their ascending hierarchical order (similar to the branches of a tree).
The analysis and representation obtained can be visualized in Figure 2. In this figure, it is possible to highlight, from the top, the two large clusters that group the co-word analysis of the literature review performed. The weights vary depending on a specific co-word or its grouping, however it was possible to create connections already existing in the literature, with the work developed here. With a blue rectangle, you can focus on the terms nursing, home care services, workload balancing and decision making. In a smaller rectangle, scheduling algorithms and swarm optimization using particle swarm optimization (PSO) are referred to. Thus, it is easy to identify the importance of the literature involved, its health context and how the solution will be obtained in terms of an automatic nurse allocation system in a Health Unit. Moreover, it is expected to enhance the growth of this co-words in the future.
With this literature review, we sought to understand the domains that influence Home health care, such as its continuity of care and consistency, the staff involved, their competence and of course, the quality of this increasingly common practice, especially in regions of the interior of Portugal. The use of a bibliometric analysis made possible the optimized identification of relevant documents, according to, for example, the citation analysis as a quantitative evaluation of the main works in the area. From the obtained results and after its analysis, there is a steady growth of applications and studies on the home health care problem, and it is possible to highlight some works such as routing reviews and scheduling of home health care (Fikar and Hirsch, 2017), multi-objective optimization in Home care (Braekers et al., 2016), assignment and allocation (Cappanera and Scutellà, 2014), heuristics and meta-heuristics (Liu et al., 2013b;Hiermann et al., 2015), among others applied to this domain, revealing its extensive applicability.

PROBLEM DEFINITION
Health Centers have nurses devoted partially to the task of providing health care at patient's home, who live at any location in the area under supervision of the Health Center. For a given day, a Health Care Center needs to deal with two problems: the nurse schedule needs to perform all tasks inside and outside of the Health Care Center; and the cars' schedules availability.
In this work, it is studied the problem to schedule the tasks outside the Health Care Center, particularly, to find the home care visits schedule for a given day, in order to minimize the travel time to perform all visits.Then, the main objective of this study is to perform an automatic planning of home care visits by the nurses team schedule of the Health Care Center, in order to minimize all the time spent by the nurses to perform all home care visits. This optimization problem, is formulated and solved on some general assumptions. In this sense, it was considered the following assumptions: • Patients who live in the area of Health Care Center can have different profiles. • A patient profile is assumed to be known a priori and does not change during the home care visit. • The number and average duration of the treatments that characterize a patient profile are known and are the same among the patients who have the same profile (defined and given by Health Care Center). • The number of patients who need home care services and assigned to a working day is known in advance and does not change during that day. • Human resources that perform home care visits are known in advance. • All the patients assigned to a working day are covered, which means that all the patients admitted to the home care visits should be assigned to the nurses set. • The locations of all patients are known in advance.
• The time matrix of travel between all the localities is also known in advance. • All the travels begin and end up in the Health Care Center. • It was considered 15 minutes for the trip, in the same city, to visit different patients.
Taking into account all the above assumptions for a working day, consider the following general parameters for the formulation of nurses' schedule: • N is the total number of nurses assigned for home care visits.
• P is the total number of patients that need some treatments at their homes.
• L is the total number of different patients' locations.
• The list of the treatments that each nurse can perform.
Then, for a given X it is possible to define the nurse schedule and also the total time needed by each nurse to finish her work. So, consider the objective function T n (X) defined as which represents the time spent by the nurses to perform all treatments, including the returning journey to the Health Care Center. Then the constrained integer optimization problem will be defined as

GENERAL REAL DATA
It is intended to apply the developed problem formulations to a real problem of the Health Care Center. The data provided by the Health Care Center concern the day April 18, 2016. The data used were available by the Healthcare Center of Bragança (chosen by the institution and simulated a normal working day in the center), that is, simulated for nurses allocation. The home care services provided by the assigned nurses to this job can be classified into five different treatments (or home care visits). The treatments are thus divided according to their diversity. Thus, Treatment 1 (T.1) refers to curative care with an average time of 30 minutes, while Treatment 2 (T.2) refers to Surveillance and Rehabilitation, with an average duration of 60 minutes. Treatment 3 (T.3) is Curative and Surveillance care averaging 75 minutes, while Treatment 4 (T.4) is only Surveillance care and has an average care of around 60 minutes. Finally, Treatment 5 (T.5) concerns more general health care such as support and monitoring and has an average of 60 minutes as well.
On April 18, there were thirty one patients who needed home care visits by Health Care Center. The thirty one patients are from twelve different locations of the Bragança region, that belong to the action area of the Health Care Center. In Table 1, the locations are represented by the corresponding abbreviation. From hereafter it will be used only these abbreviations. In third column it is shown the related number of patients who need health care. The major part of the patients (18) are from Bragança city while 13 patients are from rural localities around Bragança. Each patient, required specific medical assistance, one or more different treatments from the 5 treatments that the nurses can performed.
On the other hand, the time required to travel between two locations is shown in Table 2. It was assigned 15 min to travel between two different places, in the same location.
Based on all the general data presented, the objective is to minimize the total time required for each nurse to provide all the treatments to all patients and return to the Health Unit in order to obtain the nurses allocation in a specific schedule. In addition to all the data previously presented, more specific information is needed to produce nurses' schedule. Thus, it is necessary to know, how many nurses are available for the study day and what treatments each one performs (nurses are allocated in different types of treatments, information obtained by the Health Care Unit).
The Health Care Center has twelve nurses designated to perform home care visits during the day in study. Table 3 shows the type of treatment that each nurse can perform, as well as the average time of each treatment.

PARTICLE SWARM OPTIMIZATION
The global optimization method used to solve the constrained integer optimization problem defined in (2) was the Particle Swarm Optimization (PSO). This method is a population-based stochastic optimization technique that is briefly described in the following. The Particle Swarm Optimization was developed by Kennedy and Eberhart (Kennedy, 2010) and it is inspired on natural social intelligent behaviors of bird flocking. PSO is a computational method that optimizes a given problem by iteratively measuring the quality of the various solutions. This method consists in the optimization of an objective function through the exchange of information between individuals (particles) of a population (swarm).
The PSO idea is to perform a set of operations and move each particle to promising regions in the search space (Poli et al., 2007;Imran et al., 2013).
The steps of the PSO are presented in Algorithm 1. Set v i = 1, for i = 1, ..., N pop , and k = 0.
3: while stopping criterion is not met do 4: Set k = k + 1.

5:
Update the value of xbest i for the individual with index i, for i = 1, ..., N pop .

6:
Update the value of gbest for all population P j , for j = 1, ..., k.

7:
Update the individual velocity according to:

8:
Update the individual position according to:

9:
If necessary, adapt x k+1 i to a feasible schedule.
10: end 11: The solution is given by gbest At each iteration the velocity of each individual i, v i , is adjusted. The velocity calculation is based on the best position found by the neighborhood of the individual, the best position found by the particle itself xbest and the best position found by the whole population, taking into account all individual -gbest or the best position overall (Bratton and Kennedy, 2007). During the iterative process if any coordinate of x k+1 i falls outside the search space it is projected to the feasible region.
The iterative procedure ends after a maximum number of iterations and/or after a maximum number of function evaluations.

RESULTS AND DISCUSSION
The main objective is to produce the best allocation for the existing problem in Health Units: nurses' schedule for home care visits.
The present study was carried out at the Health Care Center of Bragança, on a date provided by the Health Center, April 18, 2016. The planning daily route carried out on April 18 was made manually, that is, without any mathematical model or subject to computational mechanisms. The nurses' schedule was built and made available by the Health Care Center on April 18 for the twelve nurses that performed the home care visits in that day.
Analyzing the scheduling carried out manually by the Health Care Center, it is possible to conclude that all nurses have different work schedules ranging from 86 to 369 minutes. The number of patients that each nurse visits change from 1 (Nurse 8) to 7 (Nurse 3) and the Nurse 3 has the highest time to provide the home care visits. The time needed for each nurse to perform the health treatment is shown in the Table 4. On this working day, the highest time needed for home visits ended after 369 minutes. Therefore, and as mentioned above, the HUB presents an inconsistent schedule, with nurses performing many home care visits and others performing only one, ending with quite different travel times. Once again, and as mentioned above, the Health Unit of Bragança presents an inconsistent schedule, with an unbalanced workload.
The idea is to optimize this process of home care visit, and produce for the day in question (April 18, 2018), the nurses' best allocation.
In an attempt to plan the schedules automatically, one computational algorithm was used -the Particle Swarm Optimization method.The numerical results were obtained using an Intel(R) Core(TM) i7 CPU 2.2GHz with 6.0 GB of RAM and using the MatLab software. The fixed variable values for both methods were N pop = 30, w = 1 and c 1 = r 1 = 2.
Since the PSO is a stochastic method, each imple-mentation was tested with 100 runs in order to evaluate the results obtained and compare them with those originally elaborated by the Health Care Center. The stopping criteria were based on the maximum number of function evaluation and maximum number of iterations that were limited to 5000 and 1000, respectively. PSO had 100% of successful rate since they found a feasible solution in all runs. The Figure 3 depicts the obtained solution using PSO.
Regarding the identification of patients and treatments, P(1) -T.1 represents Patient 1 who needs Treatment 1. For example, the schedule of the Nurse 1, which has an effort per day of 4 hours, will be: moving from the HUB to the village of Parada (Bg -Pa) to carry out the home care visit of Patient 2, who requires the Treatment 1 (P(2) -T.1). After this, the nurse returns to the point of origin, the Health Care Center (Pa -Bg). For this nurse, the time spent in this home care visit was 86 minutes. From Figure 3 it is possible to see that the maximum time needed for the last nurse to perform all the visits and return to the Health Care Center was 260 minutes. The solution obtained has a significant time reduction (109 minutes) when compared to the HUB manual allocation/planning, which was 369 minutes. Table 5 presents the summary of PSO results, such as: the best optimal solution found among all runs ( f * min ), the average optimal solution ( f * avg ), and, finally, the average time needed to solve the optimization problem (Time avg ) in seconds. Analyzing the numerical results presented in the previous table, it is possible to verify the minimum total time found by PSO is 260 minutes and the average optimal solution among all runs was 307 minutes. Finally, it appears that the average time to solve the problem was 98 seconds, which means that PSO found the optimal solution very quickly.
In PSO, it was obtained an optimal solution, finding the best nurse allocation, searching for the best workload balancing as well as minimizing the maximum time in home care visit. This allows conclude that the Health Care Center can now opt for an optimized allocation that proposes the end of visits after 260 minutes.
In order to compare (in an easy and fast way) the time spent by each nurse, using the PSO allocation and the time obtained manually by the HUB, Table 6 lists for each nurse (first row), the time needed to fin- ish the home care visits done manually (second row) and the obtained time spent with PSO (third row). From the above table it is possible to state that with PSO algorithm, the maximum time spent by the nurses is 260 minutes. In turn, the maximum time spent by the nurses in HUB scheduling is 369 minutes (greater than the PSO computational solution). On the other hand, an automatic allocation is achieved that allows a faster solution and its quick replacement, if necessary, a better workload balance, favoring not only the work of nurses but also limiting the patients' waiting time.

CONCLUSIONS AND FUTURE WORK
Since, at the HUB, home care visits are planned manually and without computational support, this implies that the nurse's allocation of home care visits may not be the most appropriate in terms of the logistics of nurses and patients. In this way, and in an attempt to optimize the logistic process, specially in the nurses allocation, it is necessary to use strategies to minimize the maximum time spent by each nurse on home care schedule, without, however, worsening the quality of the provided services and, always, looking for the best schedules organization. Optimization can be used very advantageously in the context of Health Care Centers allocation for home care aged people visits.
The allocation problem of nurses in the HUB was efficiently solved using the PSO method. When compared to the manual solution and in use by the health unit, the maximum value of home visits was optimized, from 369 to 260 minutes, improving the work effort required by nurses. Moreover, the optimal solution was found quite fast and provides a better nurses workload balancing. This approach represents a gain for all the involved people, health professionals and patients.
For future work, it is possible to reformulate the problem taking into account a multi-objective approach providing strategic, tactical and operational decision-making support. This approach may consider minimizing not only the maximum time for each nurse, but also minimizing the total kilometers performed and necessary for each car, and also minimizing the total cost involved. In addition, as a future approach, more real health problems (with different parameter sizes) will be considered and compared not only to the manual case, but also with other stochastic algorithms in the literature, such as the Genetic Algorithm.