Inventory Management at a Chilean Hospital Pharmacy: Case Study of a Dynamic Decision-Aid Tool

: Pharmacy inventory management is a critical process in healthcare centers. On the one hand, effective drug procurement is fundamental for fulﬁlling the therapeutic requirements of patients. On the other hand, as hospital pharmacies’ purchasing and storage costs comprise an important share in the hospital budgets, efﬁcient inventory management may play a central role in operational cost containment. Therefore, healthcare centers should design and implement decision-aid strategies for planning the purchase of drugs with the aim of avoiding excessive purchasing volumes and optimizing warehouse capacity, while also meeting forecast demand and ensuring critical stock levels. In this study, we present the methodological features of a decision-aid tool for planning the purchases and inventory levels for the controlled medication pharmacy of the Regional Hospital of Talca, Chile. We report the results obtained after 1 year of operation; these results show that our strategy produced more than 7% savings compared to the regular inventory planning strategy and was more effective in preserving critical stock levels. Furthermore, from a computational point of view, our strategy outperforms a recently published approach for a similar application.


Introduction
Hospitals must face, on a daily basis, challenges due to high demand for care and management required to deliver safe, quality care to patients. In studies addressing the demand for healthcare, some authors, such as [1,2], have recognized the wide dynamism of hospital management, complexity of clinical cases, and uncertainty, implying great challenges for predicting the demand for clinical attention (see, e.g., [3][4][5]). Meanwhile, health management implies clinical treatment with high quality standards, which requires adequate resource use and strengthening the existing staff capacity and skills, which translates into better care and a higher level of service, according to [6].
To satisfy the treatment demand, the disposition of medication, and clinical supplies in general, to treat a certain disease plays a fundamental role. To this end, [7] explains how essential it is for hospitals to know when and how much to buy considering management tools. Furthermore, as pointed out in [2], healthcare systems are strongly affected by demand uncertainty; therefore, effective management tools should feature strategies to cope with this phenomenon. Complementary, [8,9] consider that although the management of logistics activities is not part of a hospital's own actions, these should be addressed considering the impact they represent on the budget. As a consequence, several authors have addressed this critical issue over the last decades; we refer the reader to [2,[10][11][12][13][14] for recent examples of methodological tools designed for inventory management at hospitals.
The Chilean public health system features a purchasing modality in which each healthcare center manages its own medication purchase policy according to the healthcare demand it faces. These purchases are made, mainly from the Central de Abastecimiento del Sistema Nacional de Servicios de Salud (CENABAST), a state-owned intermediary among public health centers and private suppliers. According to [15], CENABAST deals with 75% of public supply, contributing to obtain economies of scale. However, as purchases are carried out by means of public tenders, CENABAST processing times are usually incompatible with the times and needs of healthcare centers. Therefore, in order to protect against the stock problems that this situation might cause, public hospitals typically implement rather simple but over-conservative purchasing strategies, that lead to excessive storing costs, losses due to expiration or inadequate handling, and security issues in the case of substances that could be subject to trafficking (such as opiates and stimulants). However, there are cases in which even over-conservative strategies fail in recognizing demand dynamics and cause stock shortages might lead to a insufficient clinical response.
Evidently, not only the Chilean public health system suffers from such type of managerial flaws. As a matter of fact, in several recent publications (see, e.g., [16][17][18]), the authors have highlighted the need of developing ad-hoc decision aid-tool in order to address the increasing risks associated to public healthcare supply chains. An effective alternative to address some of these risks is to incorporate, within the decision making systems, dynamic procurement and inventory strategies, capable of embodying demand and supply variability. A recent example of such approach is presented in [2], where the authors present a so-called rolling horizon strategy which is tested on a Chinese public hospital; as shown by the authors, such a dynamic approach is capable of hedging against demand volatility and of ensuring demand supply, while minimizing total procurement and storing costs. This example played an important role in the methodological motivation of our work, as the tackled problem shares similarities with the problem addressed in this paper.
In this paper, we present the methodological development and obtained results from addressing a medication procurement and inventory management problem at the Hospital Regional de Talca (HRT), the most important healthcare center in the Maule region (a Chilean administrative division with over 1 million inhabitants). At the HR, as in most of Chilean public healthcare centers, the standard protocols for medication procurement and inventory (i) stress the institution's budget, considering that the percentage of total drug spending in the HRT budget went from 12% in 2010 to 14% in 2018 (Information provided by the Chilean Ministry of Health), (ii) generate losses due to expiration (being the second hospital nationwide with more losses, reaching 75 million Chilean pesos), and most critically, (iii) fail to fully and timeously dispense prescription drugs to patients, reaching only 87.7% compliance in 2019 compared to the national average of 96.3% (Information provided by the Subsecretaria de Redes Asistenciales del Ministerio de Salud de Chile). As we will describe in detail in the following sections, the HRT medication (and clinical supplies in general) inventory management protocols are handled through internal pharmacies, which are associated to different clinical services (e.g., emergency room pharmacy, oncology pharmacy, dermatology pharmacy). One of the most relevant pharmacies, in terms of budget share, clinical implications, and security issues, corresponds to the pharmacy of controlled medication; it was for this pharmacy that we designed and implemented a decision-aid tool, based on a dynamic optimization scheme, for supporting the corresponding procurement and inventory management of medication.

Contribution and Paper Outline
The main contribution of this paper is the presentation of an effective methodological framework for cost-effective medication procurement and inventory management that addresses the common issues that rise in public healthcare systems. The proposed methodology is based on a dynamic scheme, known as rolling horizon, that features a mathematical optimization model and allows capturing, by means of a re-planning strategy, the variable nature of medication demand. The proposed methodology is an extension of the work presented in [2], and besides embedding an MIP model into a rolling horizon scheme, considers a more complex decision-making setting as well as a larger number of drugs in the planning process. Additionally, from a computational viewpoint, our methodology allows results to be obtained in a few seconds, which facilitates the decision-making process and improves the management of the entire planning process for controlled drug purchases. We present the results obtained after one year of implementation of the proposed system; these results show that, from an economic viewpoint, the strategy allowed the hospital to reduce, in 2018, the annual expenditure in the controlled medicines warehouse by 7.3%. Finally, the present methodology can be replicated to other warehouses of the institution, as well as to other health services in the country.
The rest of this paper is organized as follows. Section 2 presents the context and review of the literature related to techniques and methods used in drug purchase planning. Section 3 presents the proposed methodological framework used in this study. Section 4 explores a case study, which is applied in the HRT controlled drug warehouse. Section 5 presents the main results. Finally, Section 6 presents conclusions and guidelines for future research.

Context and Literature Review
Both in Chile and in the world, health problems and population demand constitute one of the main priorities in the design of public policies [19]. This reality refers not only to the high demand for healthcare services, which has been studied by [20][21][22][23][24], but also to the effects of the limited availability of medicines to treat patients with various types of diseases and levels of severity. See, for example, [25][26][27], who claim that this problem is caused by factors specific to health services (i.e., inadequate procurement planning and budgetary control) and by external factors (i.e., production problems and low quality of some manufactured drugs). This causes, in some cases, low quality of service, user dissatisfaction, deterioration in quality of life, and in extreme cases, can have fatal consequences (see, e.g., [28]). The need for health services to have the necessary drugs at the right time, in the right quantity, and at the right dose for each case has become one of the main challenges for these facilities to meet patient demand, which is also always growing, diverse, and volatile. In fact, [2,11] consider the uncertainty of demand as one of the main influencing factors in the logistical planning for the purchase of medication.
According to [29], the pharmaceutical section of the United States included about 10% of annual healthcare expenditures for drug consumption in 2009; despite the importance of the pharmaceutical industry globally, its supply chain management and inventory level management has not received commensurate attention. As noted by [28], if inventory management problems are compounded by poor financial purchasing policy and the high cost of some medication, it would be difficult for health services to respond effectively to population demand.
According to the analysis of the Department of National Budget, of the Chilean Ministry of Finance, presented in [30], expenditure on medicines in health services and dependent hospitals between 2010 and 2016 increased to 176.6 billion of Chilean pesos (USD 215 million), equivalent to a real growth of 78% and a real average annual growth of 10.1%. This situation is particularly accentuated in the Metropolitan region and in the Maule region (where the HRT is located). This is the main reason of why the HRT managers board entrusted us this study; the HRT, is the most complex center of the Maule region and it accounts for approximately 40% of the regional expenditure. Specifically in this hospital, spending on medicines has been increasing in recent years; the overall budget rose from 12% to 14% from 2010 to 2018, achieving an increase of almost 4 times its budget, that is, from USD 4 million in 2010 to USD 15.7 million in 2018 (Information provided by Chilean Ministry of Health, 2018). Therefore, improving the current drug inventory system became a priority for the financial sustainability of the hospital as well as of the regional service.
To improve budget management, to control inventory levels, but mainly to ensure the level of service to patients, some authors have developed different methods to improve the management of purchase and inventory management in hospitals. For example, [31] proposes an external network distribution system for medication considered non-critical by hospitals, generating better coordination with providers, minimizing inventory levels, and maintaining the quality of care for patients [32], instead, use a management system Lean, in the supply chain of a hospital in Seville, achieving, as in [31], optimization of stocks and user satisfaction. Meanwhile, [33,34] present a procedure for determining optimal solutions for inventory lot size, managing the time and quantity of deliveries from suppliers to hospitals, thereby minimizing costs in the supply chain. For its part, [35] sets out a system for categorizing medicines according to the medical condition of hospitalized patients, thereby improving inventory management. Meanwhile, [36] develop a bi-objective mixed-integer linear programming model for a pharmaceutical supply chain that helps make strategic and tactical decisions, minimizing costs and unmet demand. In the same line of linear programming, models [37,38], for example, achieve a reduction in costs, meet delivery times, and improve the quality of medication. The authors in [29] develop an order and reorder system considering the minimum and maximum levels of automated orders for optimal cycle and safety stock allocation, improving the expected number of daily reloads, service level, and storage space. In addition, in the healthcare industry, such authors as [12][13][14]39] use the VMI system to manage inventory and stock breaks. In fact, [39] describe how a South Korean hospital managed to reduce inventory spending by more than 30%. This system is also used by [40], reducing costs in human resources and improving the level of service to users.
Works by [2,10,11,41] propose models based on simulations and scenarios that consider the uncertainty of demand as an essential element for planning the purchase of medication and inventory management to support the management of health facilities. The work of [2] is of particular importance, as it develops a mathematical deterministic and stochastic model combined with a rolling horizon strategy. The hybrid model presented is composed of an acquisition system based on the VMI method to take advantage of economies of scale, which is extensively explained in [14,39,41]. Moreover, it adds an inventory balance model for the management of shipments within five departments of the hospital in Golou, China. In addition and if necessary, the model considers a purchase re-planning process based on the rolling horizon method. This model defines a dynamic pricing policy, the value of which depends on the quantity of drugs to be ordered; that is, the greater the quantity of drugs purchased, the lower the price per unit purchased. For the analysis, the authors use an example considering three types of medication for a planning and execution horizon of 12 and 2 days. The authors solve the resulting mathematical programming models using CPLEX 12.4; using a standard desktop machine, solving a single round of decision-making takes up to 1 hour and 50 minutes.
While the proposal by [2] contributes to the literature significantly, the application of this methodology in the HRT, or in Chile, would not be feasible considering, in particular, the regulations imposed by the Chilean Public Procurement Law. Furthermore, there are other differences between our approach and the one proposed by [2]: (i) greater number of items (i.e., types of drugs) should be considered (further details are provided in Sections 4 and 5), (ii) healthcare demand with patients of different characteristics to the reality of China, and (iii) budgetary availability that works through contracts intermediated with CENABAST and other suppliers. However, most importantly, the decision-making process for issuing purchase orders must be implemented within a limited period of time, and therefore, the methodology must be particularly efficient from a computation point of view and must provide, in shortened timeframes, the results for purchase decisions.
As a result of the above review, four conclusions can be drawn: 1. There is scientific evidence of the possibility for developing applications to manage medication purchase planning. The literature not only documents theoretical developments, but also presents multiple cases of success stories. 2. Progress is needed in addressing the gap between the state-of-the-art at the theoretical level and the widespread application of results. This is because some healthcare centers do not fully trust the generic applications for the purchase of medicines offered in the literature, especially because these do not take into account considerations and processes specific to health centers in Chile.
Therefore, it would be appropriate to adapt as far as possible the theoretical advances to the particular realities of each situation in order to increase the application and success of the results. 3. These are part of the therapeutic arsenal of medications that, for example, must be acquired, stored, and safeguarded under a particular protocol that remains under the responsibility, including legal, of the pharmacy manager. For all drugs, but particularly for controlled drugs, it is mandatory to avoid deficiencies in dispensing to users, losses, expiration, and inventory imbalances. For these reasons, the healthcare center must have a methodology to resolve the problems and, to meet their obligations, to satisfy the demand of patients in a determined period. In addition, it must consider the management of inventories differently to the traditional way. It should include an iterative and mixed planning process; that is, a mathematical model added to a re-planning method that incorporates the uncertainty and enables decision to be made about the purchase and management of inventory in a timely and efficient manner. In addition, the methodology must include costs not considered in other inventory management processes, the specific characteristics already described for the controlled medicines warehouse and the legal regulations in force in Chile. 4. Having a methodology capable of adapting to the local reality of regional health services, which supports the management of hospitals in the planning of purchases and inventory management, would generate potential savings for hospitals to use in other processes of patient care.
These conclusions reveal the relevance of and need to develop customized tools and applications that can be integrated within a methodological framework adapted to the reality of Chile's health services. Such a framework would help to adapt a health center's own systems for purchase planning and would contribute to improving the management of medication inventories.

Dynamic Decision-Aid Tool for Inventory Management: Methodology
In this section, we present the methodological details of the implemented dynamic decision-aid tool for cost-effective medication procurement and inventory management. The proposed methodology is based on a re-planning scheme known as rolling horizon and it features a mathematical optimization model; such combination allows, on the one hand, capturing the variable nature of medication demand and, on the other, addressing the common issues that rise in public healthcare systems.

Inventory Planning: A Brief Overview
As pointed out by [42][43][44][45], the inventory problem concerns holding an item in reserve to meet fluctuations in demand. From the economic viewpoint, the disposition of inventory in excess and shortage quantities generates cost problems for companies of any type (see, e.g., [46] for the case of Kodak, [47] for the returnable items industry, and [48,49] for the healthcare industry). In any industry, the common denominator is the same, that is, improving purchasing processes and managing inventory levels to provide an adequate level of service. Thus, when there are surpluses, companies must incur greater expenses to maintain excessive inventory levels at the risk of generating expirations in the case of perishable products. Meanwhile, in a situation of shortage or unsatisfied demand, companies must incur emergency purchases, which are accompanied by higher costs than those of planned purchases. Thus, it is necessary to find a level of inventory that balances both extremes, and to minimize total costs. To this end, [42,45] highlight that the problem is reduced to controlling the level of inventory by designing a policy that answers two questions: how much to order and when to order.
Following [2,37,38], using mathematical models with linear characteristics for purchase management and inventory levels for the healthcare industry, we follow the same direction; that is, we model the problem with functions of a linear nature, such as the objective function, expressed as a cost function, and the constraints, functions that express various aspects linked to the functionality of the warehouses.

An MIP Model for Purchasing and Inventory Planning
The first component of our decision-aid tool corresponds to an MIP model for optimizing purchasing and inventory planning decisions. In particular, the proposed model is an adaptation of the model recently proposed in [2] for a similar problem.
The proposed MIP model relies on the following notation. Finally, our model considers two decision variables; let X mpt be the volume (in [units]) of medication m ∈ M, bought from the supplier p ∈ P in period t ∈ T, and let I mpt be the inventory volume (in [units]) of medication m ∈ M, bought from supplier p ∈ P at the end of period t ∈ T.
Considering the definitions presented above, the objective function of the resulting planning model corresponds to the minimization of the purchasing, operational and storing costs incurred by the HRT, encoded by CT. The value of CT is made up of the sum of (i) the total cost of purchasing drugs from providers, CC, (ii) the total cost of storing medication in the main warehouse, CA, and (iii) the total cost of sending medicines from that warehouse to the final warehouses, CE. The values of CC, CA, and CE are given by: i.e., CT = CC + CA + CE. Additionally, the set of feasible inventory planning solutions is defined by the following set of constraints: Constraint (4) ensures that, at any given period t, the stored inventory respects the warehouse capacity CB. Constraint (5) ensures that the inventory level of medication m, at any given period t, is at least the critical stock S m . Constraints (6) and (7) ensure inventory balance among between consecutive periods. Finally, constraints (8) and (9) ensure the nature of decision variables. Therefore, the mathematical formulation of the medication purchase and inventory planning model is formally encoded by model (10): (3) and (4)-(9)} . (10) As noted in the introduction and literature review, a model such as (10) strongly relies on the accuracy of the parameter values, in particular of rather volatile parameters such as medication demand. As a matter of fact, these parameters have period-by-period uncertainty, as for planning purposes, the actual demand is not known until the period in question has elapsed. Such situations are typically approached by estimating demand using forecasting methods; hence, the performance of the resulting purchasing and inventory plan would depend largely on the quality of the forecast. However, due to the critical nature of the decision making context, it is necessary to design a more sophisticated tool that ensures a better inventory management. In consequence, we embed the MIP model (10) into an iterative framework based on the rolling horizon scheme, which allows a continuous re-planning of medication purchase. Such iterative scheme improves the the decision making process by enhancing its capacity to capture the variable nature of the demand.

Iterative (Operations) Management: The Rolling Horizon Method
Rolling horizon methods for tackling operations management problems, such as inventory planning, have been widely studied. An early reference of an MIP-based rolling horizon method, as the one proposed in this paper, can be found in [50], where the authors solve a large-scale process scheduling. An enhanced method is presented in [51], where the authors incorporate the so-called resource-task network, which allows to approach a wide range of scheduling problems. A more complex multiproduct production planning problem is tackled in [52], where the rolling horizon scheme is exploited to solve a stochastic optimization problem (by means of a Lagrangian relaxation method). The previous approach is further extended in [53], where an operational planning and medium-term scheduling framework is proposed; the designed approach relies on a robust planning model that includes various forms of market and process uncertainty.
Due to the dynamic nature of the healthcare planning, different rolling horizon strategies have been proposed in the literature, specially for supply procurement. For instance, in [54,55] the authors report results on the design and implementation of a dynamic strategy for medical resources allocation for the control of an influenza and a more general epidemic diffusion process, respectively. In both cases, the algorithmic scheme is based on iteratively solving an MIP model. Similarly, in [2] the authors propose a rolling horizon approach for a similar problem as the one addressed in this paper, i.e., a medicine logistics planning problem for which demand and supply uncertainties are handled by dynamically solving an MIP model whose parameter values are dynamically updated as well. The designed approach is tested on a real dataset showing the practical importance of this type of strategy when compared to the previous tool.
Further recent applications of rolling horizon in other decision-making contexts can be found. For example, in [56], an energy management system, based on a rolling horizon strategy, is designed for managing the operation of a renewable-based microgrid. Another example corresponds to [57], where this dynamic strategy is used within a real-time disruption management tool for rolling stock in passenger railway transportation. Figure 1 illustrates the dynamic process of the rolling horizon method. The method considers a planning horizon (PH), an execution period (EP), and a reference period (RP). The PH is usually defined on the basis of the typical tactical or strategic criteria of the decision making setting. The EP is defined considering the time period that we consider that our forecasts or estimations of the behavior of future events are likely to meet the actual realization of data. Finally, the RP corresponds to the time period that we consider is possible to produce sound and reliable forecasts (although not necessarily accurate).  Therefore, a rolling horizon decision-making process corresponds to an iterative process where decisions are planned (typically by solving an optimization problem, e.g., (10)) with respect to an RP and executed during an EP. When the EP is completed, problem data such as demand, purchases, and inventory levels are updated; this defines a new instance of the decision-making problem and the process repeats again, during the whole PH. Such dynamic scheme enables decision-makers to tackle the natural uncertainty associated to the future realization of data. As remarked above, this is a critical issue in healthcare management, not only from a medical point of view, but also from an economic point of view.
Considering the elements presented before and the decision-making setting described in the previous sections, the rolling horizon method for a pharmacy inventory management can be outlined as follows: Step 1. Update (e.g., by means of a forecasting method) the demand levels D bmt for the following RP period, for all m ∈ M and b ∈ B (and t taking values accordingly). Update (if necessary) all other parameters of problem (10): costs C mp , CA m , CE m , ∀p ∈ P, m ∈ M; available storage capacity CB; critical stocks S m , ∀m ∈ M; and existing inventory I I m , ∀m ∈ M.
Step 2. Compute the purchasing plan for the following RP period by solving the optimization problem encoded by (10) considering parameter values computed in Step 1.
Step 3. Conduct the drug purchasing plan during the EP according to the solution obtained in Step 2.
If the end of the EP does not coincide with the end of planning horizon PH and the hospital does not require substantial changes to the methodology, go to Step 1; otherwise, stop.
Using a similar scheme, [2] proposes a planning strategy for the purchase of three medications based on a PH and EP of 12 and 2 days, respectively. However, unlike the rather simple decision problem addressed in [2], the inventory management problem addressed in this paper comprises more than 30 medications, it must comply a strict regulation, and it should allow a one year planning considering an EP of one month and an RP of six months. In Section 5, we present the results obtained after applying at the HRT, during one year, the iterative strategy presented in this section.

Case Study: HRT's Controlled Medications Pharmacy
This section presents the case study for applying the methodology proposed in Section 3 to the controlled medication pharmacy at a public hospital, the HRT. A general context and dimension of the problem affecting management in this warehouse is presented.

Case Study: Regulation and Local Context
Chilean public hospitals, such as the HRT, must manage their procurement process of medications and, in general, of clinical supplies according to Law 20724, which is part of the Public Health Sanitary Code. This law indicates that the Ministerio de Salud de Chile (MINSAL) must define the so-called the pharmacological arsenal, which corresponds to all the medications that are regarded as critical and, therefore, their provision should be permanently guaranteed by every regional and local hospital. This regulation of the procurement process transforms to CENABAST as the main supplier of the HRT. However, when a given item in the pharmacological arsenal is out of stock in CENABAST, the HRT must purchase from other (private) suppliers (as a matter of fact, the planners must identify at least two potential back-up suppliers for each item in the arsenal).
In the HRT, as in most public hospitals, all the procurement logistic of medications and clinical supplies is managed by a central department (or central pharmacy) which stores supplies in the main warehouse. Internally, medications and clinical supplies are redistributed in so-called final warehouses and their management is in charge of specialized pharmacies (in this study we focus on one of them; the controlled medications pharmacy). These pharmacies feature as support departments for the inpatient, outpatient, and emergency units of the hospital. The pharmacies' main activities include, among others: (i) inform the purchasing planning to the central pharmacy; (ii) reception, storage, and distribution from the main warehouse to final warehouses; (iii) preparation and dispensation of (medications) prescriptions from the final warehouses to the patients; and (iv) pharmacovigilance.
The controlled medication pharmacy manages 34 different medications (|M| = 34), which are stored in two final warehouses (|B| = 2), the warehouse for hospitalized patients and the warehouse of the center for diagnostics and therapeutics. The storage capacity dedicated in these two warehouses to the controlled medications is CB = 5.22 m 3 . In 2017, this pharmacy dispensed to its patients 1,486,806 units at a cost of 394.4 million Chilean pesos (https://www.hospitaldetalca.cl/2015/hdetalca/ ?page_id=4986). Unlike other drugs, controlled drugs are stronger drugs and therefore, must be carefully controlled in their administration and dispensing to avoid problems of over-consumption and drug addiction. Thus, the process of purchasing and managing inventories of this type of medication must follow a different procedure to that of other medication.

Case Study: Brief Description
In order to have a better understanding of the structure of the problem faced by the controlled medications pharmacy, we report in Tables 1 and 2 the total annual cost (in millions of Chilean pesos) of the HRT operation and the total annual medication purchasing, operational, and storing costs (CT), respectively, over the past few years (Information source: HRT Costing System). The information indicates that the accumulated expenditure on medicines represents an increasing share of the institution's budget over time. The problem is amplified given that the HRT does not have a formal and standardized mechanism for medication procurement and storing planning; as a matter of fact, each pharmacy defines its own mechanism based rather on rules of thumb than analytical procedures. As a matter of fact, in the case of the controlled medications pharmacy, procurement planning was performed by placing purchasing orders following a very simple rule: for every medication, purchasing orders are placed twice a year, and the purchased volume is equal to the number of months that will be covered by the order (typically six months) multiplied by the largest monthly demand of the previous year. In the following, we will refer to this method as the previous method (PM)). It should be noted that, on average, between 2010 and 2018, pharmacy expenditure (or budget) represents 13.8% of the total budget of the institution. As pointed out in the literature review, both the U.S. pharmaceutical industry in 2012 and the Chilean Ministry of Finance in 2017 have noted that drug spending represents 10% of the annual budget. If the above is compared with the HRT, the latter presents an additional 3.8%, which is equivalent to an average of 2.2 thousand million Chilean pesos additionally incurred by the HRT each year from 2010 to date, and according to projections, this deficit accumulates in these years over 20 thousand million Chilean pesos. This increase in expenditure has a significant impact on the hospital's total budget and is related to the existence of gaps/difficulties in the management of the pharmacy unit, which are particularly due to (i) difficulty in knowing the real demand due to poor sensitivity in records, (ii) problems in planning purchases, (iii) deficit in controlling inventory levels and expiration of medicines, (iv) commitment diminished by records of incoming and outgoing medicines in the warehouse, (v) limitation of current information systems as management support, (vi) lack of coordination in the processes of requesting and delivering drugs from and to warehouses, (vii) weakened coordination and differences in purchase volumes between the unit requesting and the unit that finally purchases the drugs.
To observe the difficulties mentioned above, we had access to the information systems available for the collection of information, which allowed us to know: (i) historical records of medications' demand, (ii) the level of inventory, (iii) the entry and exit of medicines from warehouses, (iv) the critical stock of each medication, (v) the costs of the purchasing process, (vi) the available budget level, (vii) compliance with delivery dates by suppliers, among other relevant aspects.
As explained above, the main source of uncertainty is the demand of the different medications in the controlled medication pharmacy. Such uncertainty is mainly caused by the volatile behavior of the prevalence of the pathologies that require this type of pharmacological treatment. In order to capture this uncertainty, the values of D bmt (for all m ∈ M, b ∈ B, and for t according to the forecasting interval), were estimated using a state-of-the-art forecasting methodology based on a 4-degree polynomial regression (see, for textbook references on polynomial regression [58][59][60]). Such procedure was therefore embedded into the rolling horizon scheme (in particular in Step 1). In Figure 2, we present the results obtained by applying this polynomial regression for an 18 month period for four different medicament (this period covers the design, trial, and fully functional phases). The plots in this figure show the variability of the demand, and the capacity of the polynomial regression to compensate demand fluctuations.

Results and Discussion
This section presents the results obtained from the implementation of the proposed dynamic decision-aid tool (DM) during 2018. In order to measure these results we compare them with respect to the results that the HRT would have obtained using the original method (PM) and, also, using the solution of model (10) in a static fashion (SM).
It is important to point out that strategies DM and SM rely on solving instances of model (10); we have used MIP solver CPLEX TM 12.8 for this purpose. The tool was implemented on a laptop featuring an Intel Core TM i7 (8550U) 1.80 GHz (8 cores) processor, and 8 GB of RAM.

Results: Comparison with the Previous System
We now summarize the main findings attained when comparing the results obtained, during 2018, after the implementation of the designed dynamic decision-aid tool with the results that would have been obtained by using PM and SM.
As one of the goals of the HRT authorities is to control the hospital operational costs, the performance of a new procurement and inventory management method should be measured with respect to the reduction in the incurred costs. Hence, in order to measure such reduction, let CT PM , CT DM , CT SM be total medication purchasing, operational, and storing costs that the hospital would have incurred if the PM, DM, or SM, respectively, would have been used to manage the controlled medication pharmacy. Hence, the relative difference between CT SM and CT PM is given by and between CT DM and CT PM is given by Considering these definitions, we report in Table 3 the total cost values CT PM , CT DM , and CT SM , and the relative differences ∆(SM, PM)% and ∆(DM, PM)%, for 2018, on a monthly basis. The results reported in the table show that the proposed dynamic strategy DM was capable of inducing total annual savings of 7.3% with respect to the previous method; furthermore, the static strategy also outperforms the previous method by 4.54%. As can be seen in columns ∆(SM, PM)% and ∆(DM, PM)%, the values of monthly relative differences of CT SM and CT DM , respectively, with respect to CT PM , show that the proposed methods operate quite differently than the previous method (which, as explained before, operates on the basis of equally sized purchasing orders). For a more detailed comparison between the SM and DM strategies, we report in Tables A1 and A2 (in the Appendix A), respectively, the monthly purchase volume (in units) for each of the 34 medication managed by the controlled medication pharmacy considering the 2018 records. In addition to the purchased volumes, in these tables we also report in the last column, 'Saving %', the annual savings for each medication. We can observe that in both cases there are savings for all medication, but the relative savings vary largely among different medication. In particular, in the case of the dynamic approach, for Morphine hydrochloride 10 mg/mL savings could be over 13.50% and for Methylphenidate 10 mg the savings could be as little as less than 0.25%. When comparing column 'Total' (which accounts for the total annual purchased volume) and column 'Savings %', we observe that those medications with largest purchased volumes, and specially those with monthly purchases, are precisely those with the lowest savings, while those with a rather limited purchased volume have also a rather limited level of savings. This is mainly explained by the fact that CT is not only comprised by storing and dispatching costs (i.e., CA and CE), but also by the purchasing cost, CC. Thus, for those medications with a high demand, the value of CC is likely to be quite greater than the one of CA + CE. In consequence, the savings obtained by a more efficient inventory management (which is mainly associated to lower values of CA + CE), are likely to seem rather marginal in terms of CT, but significant from a managerial point of view (as a better inventory management also induces, in the long run, a more efficient purchasing strategy, i.e., lower values of CC). Despite of this, it is quite a valuable result that for all medication the dynamic approach shows lower values of CT when compared to the value that would have been obtained if the pharmacy managers had used their rule-of-thumb approach.
In addition to a better performance in terms of savings, a crucial difference between the dynamic approach with respect to the static one corresponds to the monthly purchasing profile. In Figure 3 we display two plots: one shows the monthly purchasing volume of Alprazolam 0.5 mg (a highly demanded drug), featured by SM and DM, and the other shows the monthly purchasing volume of all controlled medication, featured by SM and DM. When observing these two plots, we can clearly observe that the DM approach induces a more stable purchasing profile than the one induced by SM. The sawtooth behavior of the SM purchasing decisions, which is particularly clear in the case of Alprazolam 0.5 mg, reveals that the procurement decisions provided by using a single solution of (10) might expose the pharmacy, and in consequence to the patients, to a rather vulnerable situation in terms of ensuring the corresponding security stock. This is explained by the fact that a static model does not consider eventual perturbations in the demand and, as the one of the components of the total cost is the storing cost, the model does not associate any risk (but actually benefits) to allowing the stock levels to reach values close to the critical stock. The behavior of the purchased volume for all controlled medication, right plot in Figure 3, confirms the situation verified for Alprazolam 0.5 mg. As can be seen, the purchasing profile associated with the DM approach is notably more stable than the profile associated with the SM approach; hence, not only Alprazolam 0.5 mg might be exposed to shortages if the SM approach would have been used, but also other medication. Such a situation is prevented when using the dynamic approach.  The behavior described before can be further analyzed when observing Figure 4, where the inventory levels for two medications are shown. While Diazepam 10 mg/2 mL (left plot) is a medication with similar levels of demand over the year, Remifentanil 1 mg (right plot) is a medication whose demand varies largely in different months. For both cases, we display the inventory levels reported during 2018 using the dynamic tool, and the inventory levels that would have been obtained by using PM and SM (additionally, the critical stock levels are also shown). We can observe that the inventory levels associated to the previous strategy of the hospital, for both medication, are rather high when compared to the critical stock and also when compared to the inventory levels associated to SM and DM. Evidently, this is explained by the fact that the PM approach relies on an over-conservative rule, which resulted in high storing costs. On the contrary, both SM and DM feature more variable inventory levels, as orders are placed monthly. Despite of this, the benefits from the dynamic approach can be observed when comparing both plots. Since the demand of Diazepam 10 mg/2 mL is rather similar in different months, the DM approach performs similarly as SM; however, in the case of Remifentanil 1 mg, the variability of the demand is better captured by the dynamic approach, reducing the number of times that the stock reaches low levels. These examples allow to have better insights on the performance of the developed decision-aid tool.
From a computational point of view, the proposed method is also effective. In Table 4, we compare computational implementation and performance aspects of the proposed method and the method proposed in [2], which is equivalent in terms of the underlying mathematical programming problem. As can be seen from the table, using a similar machine and a similar MIP solver (CPLEX TM 12.8 and CPLEX TM 12.4, respectively), the formulated optimization problem is capable of providing optimal solutions in shorter time and for higher dimension instances (34 versus 3 medications). For comparison purposes, we compare the performance when solving one instance, i.e., a single round in the rolling horizon scheme.  14" (first round of decision-making) 6.591" (first round of decision-making)

Discussion
Given the operational cost structure exhibited by hospitals, and in particular by the HRT, and the permanent budget pressures that affect public hospitals, it was fundamental to ensure a cost-effective medication procurement and inventory policy. The results reported in the previous section show that the designed decision-aid tool was capable of responding to this need, i.e., reducing the medication procurement and inventory costs. Furthermore, such efforts do not only contribute to a more cost-effective strategy, but also to avoid stock shortages as demand forecasting is one of the key features of the implemented strategy.
The reduction of inventory levels due to a less over-conservative procurement strategy not only reduces inventory costs but also allows to prevent stock losses due to medication that exceed their expiration date or due to inadequate handling. Additionally, the implementation of the tool has reinforced the need for improving the quality of demand and procurement records as they are crucial for an effective inventory management strategy. Moreover, the proposed dynamic tool highlights the inefficiencies in the current pharmacy management strategy of the HRT, as most of the other pharmacies use the same previous strategy of the controlled medication pharmacy. Hence, by extending the proposed methodology to other pharmacies, in particular to the oncology drug pharmacy that concentrates a large share of the total medication procurement and inventory costs, the total savings would be very significant, even if the percentage savings were lower.
An additional aspect that should be considered by the managers of the controlled medication pharmacy is the possibility of defining clusters of medication according their demand. One cluster should correspond to the most demanded medication; as a matter of fact, only seven medications concentrate 80% of the annual purchasing costs (buprenorphine 35 ug trans patch, clobazam 10 mg (grifocloban), methyl phedinate 10 mg cr, morphine sulfate 30 mg, buprenorphine patch 10 mcg/h patch, phenobarbital sodium 200 mg, and fentanyl citrate 0. 5 mg/10 mL). Hence, the procurement and inventory of the medication within this cluster should be be managed more carefully, as any additional cost reduction could have a larger impact on the total operational cost of the pharmacy. Another cluster should correspond to those medications that require special storing conditions, in particular those that require additional security protocols (such as Amphetamine 10 mg or Morphine 10 mg), as they do not only imply higher storing costs but also higher risks in terms of security of the warehouse. Therefore, decision makers might include additional rules in order to ensure maximum stock levels (in addition to minimum security levels), so as to prevent higher storing costs as well as security threats. Evidently, the rules applies to the first cluster are compatible to those applied to the second cluster.
From a managerial point of view, and besides the reductions in the cost operation, there are additional benefits of the implemented tool and can be summarized as follows: (i) a more collaborative relationship is established with the suppliers as purchasing orders are informed with enough anticipation, avoiding potential shortages and reducing pressure (and the consequent price increases) to suppliers and logistic providers, (ii) a better characterization of medication demand, which not only allows a better procurement strategy from a clinical point of view, but also a better position when issuing public tenders, and (iii) the possibility of carrying out sensitivity analyses and future cost estimations in order to enrich the financial planning of the hospital.

Conclusions
As shown by [30,61], over 10% of the Chilean public hospitals' budget corresponds to medication procurement and inventory management; a similar situation occurs in other international contexts (see, e.g., [2]). At the Talca Regional Hospital (HRT), where we developed our research, over 20 billion Chilean pesos (over 25 USD million) have been spent in medication procurement and inventory operations from 2010 to date. Despite of the financial importance of medication procurement and inventory activities, Chilean public hospitals tend to use rather simple tools and protocols to manage their internal pharmacies, resulting in potentially inefficient solutions.
In order to face this situation, we developed a decision-aid tool for supporting procurement and inventory decisions at the controlled medication pharmacy of the HRT. The designed tool is based on a rolling horizon strategy combined with an ad-hoc mathematical optimization model, and it allows capturing the dynamic nature of the medication demand, while preventing having over-conservative inventory levels (which translate into higher operational costs). The results obtained during 2018 show that the designed tool is capable of reducing the total procurement and inventory costs in over 7% in a single year; furthermore, as presented in the discussion section, additional clinical and managerial benefits are obtained, which reveals the need to incorporating this type of tools into the Hospital' management systems.
Finally, due to the encouraging reported results, a natural venue for future work corresponds to the extension and adaptation of the implemented system to other pharmacies within the HRT (and eventually to other healthcare centers). Nonetheless, a key element that must be taken into account is that there are units within the HRT, such as the emergency room, where demand levels are quite unstable and guaranteeing critical stock levels usually results in a life-or-death matter. Therefore, from a methodological point of view, we should design and incorporate more advanced demand forecasting techniques and, eventually, more reliability-oriented optimization strategies.
Finally, given the large number of medicines in this care center's arsenal and their variability from period to period, we believe our work should incorporate data mining tools. These tools comprise new methods and techniques that would allow us to predict the demand, inventory balance, and critical stock of each drug, and to measure and evaluate the response of suppliers, among other aspects. They would enable improvement of purchase planning and inventory management of the entire arsenal of HRT's medication.