Effectiveness Optimization of an Automatic Medicine Dispenser Based on the Entry-Item-Quantity ABC Analysis Method and Track Utilization Rate Algorithm

Modern hospital pharmacies are undergoing broad-scale shifts toward informatization and automation. With the widespread use of automated medicine dispensing systems in major Chinese hospitals, their application value has been increasingly confirmed. However, relative to other countries, automation of China’s pharmacies was relatively delayed, and the use of imported automated equipment in domestic hospital pharmacies dealing with an enormous prescription burden poses substantial challenges in maintaining high automation efficiency when the hospital patient flow is at its peak. Objective to optimize the medicine storage system of automatic medicine dispensers and to improve the automation efficiency of pharmacies using the entry-item-quantity (EIQ)-ABC analysis method and a track utilization rate algorithm. Methods A total of 76,069 prescriptions from the CONSIS automated medicine dispensing system of medicine dispensing system of our hospital’s outpatient pharmacy were selected in June 2020, and the EIQ-ABC analysis method was used to perform associative classification of the dispensing volume and frequency of each medicine. The varieties of medicines in the automatic dispenser were adjusted according to the classification results, and then, the storage space of medicines was optimized using a track utilization rate algorithm. The performance of this method was evaluated by comparing the automatic rate of the dispensing volume, and the real-time window dispensing rate and prescription ratio before and after optimization. Results After the implementation of the EIQ-ABC analysis method and track utilization rate algorithm, the average automation rate of dispensing volume, real-time window average dispensing rate, and real-time window average prescription ratio increased by 2.46%, 4.4%, and 4.87%, respectively, which were significantly higher than those before implementation (P < 0.05). Conclusion Using the EIQ-ABC analysis method and the track utilization algorithm to optimize the varieties and storage space of medicines in an automatic medicine dispenser can fully utilize storage space, reduce instances of lack of medicine in the dispenser, and improve the fully automatic dispensing rate.


Introduction
Modern hospital pharmacies are undergoing broad-scale shifts toward informatization and automation. With the widespread use of automated medicine dispensing systems in major Chinese hospitals [1,2], their application value has been increasingly confirmed [3]. However, relative to other countries, automation of China's pharmacies was relatively delayed, and the use of imported automated equipment in domestic hospital pharmacies dealing with an enormous prescription burden poses substantial challenges in maintaining high automation efficiency when the hospital patient flow is at its peak [4]. One solution to this problem is to optimize the stored varieties and storage space of medicines in the machine, which can then be used for maximal dispensing, thereby improving the overall automation level of the pharmacy [5]. Such a fully automated system would offer more time to pharmacists in medication consulting for patients to ultimately improve the quality of pharmaceutical services. In this study, we used the entry-item-quantity (EIQ)-ABC analysis method to scientifically and rationally select the varieties of products to be stored in the automated drug-dispensing machine. The EIQ analysis method was first proposed by the Japanese scholar Suzuki Zhen, which is based on the three key elements of "Order Entry," "Item," and "Quantity" to statistically sort the order (prescriptions in this case) data and grasp the operation characteristics of a logistics system in the circulation link to discover any problems. This analysis can then be used to strengthen and improve the configuration of logistics facilities and logistics operation methods. An outpatient pharmacy is equivalent to a miniature logistics center in which each prescription is equivalent to an order, and the goods are equivalent to each variety of medicine. EIQ analysis is based on four indicators: EQ, EN, IQ, and IK [6,7]. In this study, we focused on the IQ and IK metrics; IQ indicates the total number of each medicine to determine the use and distribution of each medicine type, and IK indicates the number of times each medicine is used to calculate the dispensing frequency of each type of medicine.
The ABC classification method is also known as the Pareto analysis method. According to the frequency of occurrence, the objects are divided into three types of factors: A, B, and C. The cumulative frequency of the occurrence of each factor is then calculated; the cumulative frequency of A, B, and C factors ranges from 0% to 80%, 80% to 90%, and 90% to 100%, representing the main, secondary, and general influencing factor, respectively [8].
In this study, we used the EIQ analysis method to correlate the IQ (dispensing volume of each medicine) and IK (dispensing frequency of each medicine). Based on the ABC classification, cross-grouping was performed according to the IQ-ABC and IK-A'B'C'; the characteristics of medicine dispensing of each group were compared; and the varieties of products to be put into the machine were selected for further analysis [9].
We then applied a track utilization rate algorithm to optimize the medicine storage space in the automatic medicine dispenser, and the effect of the combination of these optimization strategies on improving the automation efficiency of the hospital pharmacy was tested.

Data Source
In 2016, our hospital introduced two automatic medicine dispensers (CONSIS H, Willach Pharmacy Solutions GmbH, Germany), composed of a computer control system, medicine-loading and storage system with a manipulator, and delivery system. The medicine storage system includes a total of 1,053 tracks, which has space to store 9,480-13,692 boxes of medicines. The automatic medicine dispenser information system receives the prescription information from the hospital information system, and makes a judgment according to the availability of the prescribed medicine. If all of the medicines indicated on the prescription are stored in the machine, the prescription will be assigned to the real-time window, and the associated inventory will be locked. However, if any of the medicines required are not stored in the machine, the prescription will be assigned to the pre-dispensing window. On receiving the prescription information, the CONSIS H system selects the appropriate boxes from the ramp-type medicine storage tank, which then slide down the ramp via gravity and are automatically dispensed; the elevator apparatus receives the medicines that have been dispensed for delivery and moves the medicines to the designated output port after appropriate delivery and sorting [10][11][12]. The outpatient pharmacy in our hospital has a total of six medicine delivery windows, including three pre-dispensing windows and three real-time windows. The first unit is responsible for dispensing medicines in machines in one pre-dispensing window and two real-time windows, and the second unit is responsible for dispensing medicines in machines in the remaining two pre-dispensing windows and one real-time window.
The prescription information of the CONSIS system of The First Affiliated Hospital of Jinan University's outpatient pharmacy from May to September 2020 was retrieved, and the following data were extracted for analysis: average daily dispensing volume and frequency of each medicine in prescriptions, the machine, and in each window; number of tracks used; number of varieties of medicines put into the machine; maximum inventory capacity in the machine; and medicine track utilization rate in the machine.

EIQ-ABC Analysis
The EIQ-ABC analysis method was used to adjust the varieties of medicines in the automatic medicine dispensers. We first screened out any medicine varieties that cannot be dispensed by the automatic medicine dispenser (see Table 1) and the remaining varieties that are tentatively scheduled to be dispensed, leaving a total of 592 varieties for EIQ-ABC analysis. Other factors that render the medicine unsuitable to be loaded to the machine Each medicine initially selected to be placed in the medicine dispenser was sorted in descending order according to the IQ, as the average daily dispensing volume (number of boxes), and divided into three groups according to the ABC classification method. The medicines were then sorted according to the IK, as the average daily dispensing frequency, and divided into three groups (A′, B′, and C′) using the ABC classification method. The data of the medicines according to the IQ-ABC and IK-A′B′C′ classifications were orthogonally grouped (see Table 2), and the varieties of medicines dispensed by the automatic medicine dispenser were determined according to the characteristics of the usage of each group of medicines.

Optimizing Medicine Storage Space
The track utilization rate of the automatic medicine dispenser refers to the utilization of the track for a certain medicine in the automatic medicine dispenser, which is equivalent to the ratio of the average daily usage amount of a certain medicine. This algorithm was used to track the capacity of the automatic medicine dispenser, which can be expressed by the following formula: where CL is the track utilization rate of a certain medicine in the automatic medicine dispenser, X is the average daily usage amount of a certain medicine, n is the number of tracks occupied by a certain medicine (tracks), and a is the quantity of a certain medicine (number of boxes) contained in one track.
According to the actual use of drugs in the pharmacy's automatic medicine dispenser, when the drug reserve in the machine is 1.3 times the average daily usage, it is considered capable of meeting the drug inventory demand in the peak period, ensuring a complete supply of varieties; that is, CL=X/1.3X=77%. Therefore, when the utilization rate of a certain track in the automatic medicine dispenser is 77%, the capacity for the medicine in the automatic medicine dispenser is deemed to be in the most reasonable state.
However, since the number and length of the tracks of the automatic medicine dispenser are fixed values (i.e., the storage space of the automatic medicine dispenser is limited) [13], it was necessary to set the CL value of each medicine to a flexible variable according to the actual use of each medicine. This ensures that the use of storage space of the automatic medicine dispenser reaches an ideal state; that is, more varieties of medicines should enter the automatic medicine dispenser to reduce the need for manual dispensing, while ensuring that the automatic medicine dispenser has a sufficient supply during peak hours. Considering the actual situation of the pharmacy, the CL value was set to 40-80%, and the number of tracks required for a certain medicine was calculated and adjusted based on this interval as n=X/(CL*a).

Optimizing the Distribution of Tracks
The medicines in the automatic medicine dispenser were sorted according to their CL values from high to low to screen out those with abnormal CL values. Specifically, when the CL value of a certain medicine is much higher than 80%, this indicates an insufficient number of tracks in the dispenser to support the demand for this medicine, indicating a dwindling inventory in the machine. If this medicine is not refilled in a timely manner, the automatic machine dispenser will not deliver the medicine as needed, which will have to be manually dispensed. In this situation, the prescription containing the medicine will not be assigned to the real-time window, thereby reducing the automation rate. Therefore, for medicines with abnormally high CL values, it is necessary to increase the number of tracks assigned to it in the automatic medicine dispenser. Conversely, medicines with too small CL values indicate an excess of tracks in the automatic medicine dispenser, reducing machine capacity; therefore, the number of tracks for this medicine would need to be reduced for optimizing automation performance.
As an example, Glucophage XR (metformin hydrochloride sustained-release tablets) has five original tracks in the machine, with capacity for a single track of nine boxes, resulting in a total capacity of 45 boxes in the machine. A total of 1,577 boxes of this medicine were dispensed from the automatic medicine dispenser in June. After calculation, the CL value was determined to be 116.81%, and the tracks were adjusted accordingly: two tracks were added so the total capacity in the machine was increased to 63 boxes, which reduced the CL value to a more reasonable 83.44% under the same conditions.

Performance Evaluation
The optimization performance of the EIQ-ABC approach with the track utilization algorithm was first assessed according to the ratio of the number of boxes dispensed by the automatic medicine dispenser to the total number of boxes dispensed in the pharmacy. A larger ratio indicates that more medicines can be dispensed through the medicine dispenser after optimization and that the machine is fully utilized.
We further assessed the real-time window dispensing rate and prescription ratio. The dispensing rate was calculated as the ratio of the number of dispensed boxes in the real-time window to the total number of boxes dispensed in the pharmacy, and the prescription ratio was calculated as the ratio of the number of prescriptions in the real-time window to the total number of prescriptions. A larger value indicates that more prescriptions can be dispensed by the machines, thereby reducing the manually dispensed amount, which would provide more time to pharmacists for medication consulting services to improve the overall quality of pharmacy services [14].

Statistical Analysis
The paired-sample t-test was applied to compare the data obtained 8 weeks before optimization and 8 weeks after optimization using SPSS 27.0 software; p < 0.05 indicated a statistically significant difference.

Application of EIQ-ABC Analysis for Adjusting the Varieties of Medicines in the Automatic Medicine Dispenser
Due to the limited storage space in the automatic medicine dispenser and based on the stock rack and stock space of medicines, the packaging size, and other reasons, orthogonal classification with the EIQ-ABC method determined that eight new medicines should be added, and seven medicines should be removed. After adjustment, there were 439 varieties of drugs in the automatic medicine dispenser (Table 3).

Newly added varieties IQ-IK classification Varieties removed from stock IQ-IK classification Enalapril maleate and folic acid tablets B-C' Olanzapine tablets 5 mg C-C' Sodium bicarbonate tablets B-A' Liushen pills C-C' Cinnamon twigs and Poria cocos tablets C-B' Rhinitis tablet C-C' Glimepiride tablets C-B'
Taurine eye drops C-C' Diclofenac sodium eye drops C-B' Meloxicam dispersible tablets C-C' Terazosin hydrochloride tablets C-C' Qingzhuo Qudu pills C-C' Marine capsules C-C' Shenyanshu tablets C-C' Levocetirizine hydrochloride tablets C-C'

Application of the Track Utilization Algorithm for Adjustment of the Number of Tracks in the Machine According to the Medicine Usage Rate
In July 2020, the CL value was used to adjust the number of tracks of the two CONSIS H automatic medicine dispensers (Unit 1 and Unit 2), and the CL values before and after optimization, number of tracks added after optimization, and maximum inventory in the machine added were compared.
After optimization, the proportion of medicine varieties with low CL values (0 < CL ≤ 40%) in Unit 1 and Unit 2 was reduced by 12.27% and 6.84%, respectively. The proportion of medicine varieties with a relatively reasonable CL value (40% < CL ≤ 80%) in Unit 1 and Unit 2 increased by 8.38% and 9.84%, respectively. The proportion of medicine varieties with a high CL value (CL > 80%) in Unit 1 increased by 3.9%, whereas that in Unit 2 decreased by 3% (Table 4).
After adjusting the number of tracks using the CL value, the number of medicine varieties with relatively reasonable CL values increased by 34 and 40, and the number of medicine varieties with low CL values decreased by 57 and 35 in Unit 1 and Unit 2, respectively. According to these results, 14 varieties of medicines with high CL values were removed from Unit 2. Due to the impact of the COVID-19 pandemic, Unit 1 opened two windows in May, June, and July, and opened three windows in August and September.
The monthly dispensing volume increased from 71,941 boxes in May to 115,866 boxes in September, resulting in an overall increase in the CL value; thus, the 16 varieties with excessively high CL values were added to Unit 1.
However, the overall CL value was still too low; nearly 65% of the varieties had a CL value of less than 40%. Therefore, the utilization of the track needed to be further optimized. By analyzing the medicine usage rate in the automatic medicine dispenser, the number of tracks for medicines that were occupying a disproportionately high amount of storage space in the machine was reduced, and the number of idle tracks was also reduced. At the same time, the number of tracks for medicines that occupied a disproportionately low amount of storage space in the machine was increased to relieve the pressure of pharmacists in manually replenishing these medicines, expanding the capacity for more required medicines and maximizing the utilization of limited storage space resources in the machine.
After optimization, the number of medicine storage tracks in Unit 1 increased by 20 and the maximum inventory capacity increased by 121 boxes, whereas the number of medicine storage tracks in Unit 2 increased by 12 and the maximum inventory capacity in the machine increased by 44 boxes (Table 5). Thus, the CL value can be used to conveniently and quickly adjust the number of tracks needed for each medicine in the machine and increase the maximum capacity to optimize the efficiency of the automatic medicine dispenser.

Implementation Performance
After implementation of the improvement measures, the automation rate of the average medicine dispensing volume increased by 2.46% compared with that determined before the optimization. The average drug-dispensing rate and prescription ratio of the real-time window increased by 4.4% and by 4.87% (p < 0.05), respectively (Table 6).

Discussion
The dispensing volume and dispensing frequency of each medicine are the two basic characteristics that reflect overall drug consumption. In this study, we applied the EIQ-ABC analysis method to combine these two key factors and considered the ABC classification for orthogonal grouping to provide a scientific and comprehensive basis for selecting the drugs to be loaded in an automatic medicine dispenser. By applying the EIQ-ABC method with a track utilization algorithm to the drugs stored and dispensed in two machines operating at the pharmacy of our hospital, we successfully optimized the varieties of the automatic dispensing machine to make full use of the storage space of the dispenser, reduce missing medicines with high demand, and improve the fully automatic medicine dispensing rate. In Gao et al. [15] study, EIQ-ABC analysis method was applied alone. Their results suggested that the appropriate inventory in the dispensing machine was roughly determined by analyzing the characteristics of each orthogonal grouping. However, it could not accurately calculate the most reasonable inventory of drugs in the dispensing machine.
The track utilization rate algorithm is simple and highly operable. Pharmacists can regularly monitor the CL value of drugs in the automatic medicine dispenser and adjust the number of tracks for drugs with abnormal CL value in a timely manner. In this way, the inventory of various drugs in the machine can meet daily consumption needs without taking up too much space, enabling the space of the automatic medicine dispenser to be fully utilized, with consequent overall improvement in automation performance. Shen et al. study [16] revealed that the method of track utilization algorithm could adjust the number of drug slots in the automatic dispensing machine. But it could not take drugs outside the automatic dispensing machine into account, resulting in some varieties suitable for entering the automatic dispensing machine were easily ignored.
The EIQ-ABC analysis method can analyze all of the drugs in the pharmacy both inside and outside of the automatic medicine dispenser and select suitable drugs to be stored in the machine, while the CL algorithm can quickly and easily optimize the number of tracks required for each medicine in the machine. In other words, the EIQ-ABC analysis method is used to select the medicines to be entered into the machine, and then the CL algorithm is used to adjust the number of tracks for that medicine in the machine. The combination of these two analysis methods had a significant effect in improving the level of automation in the pharmacy.
Despite improvement, the overall utilization rate of the first unit after optimization remained rather low. Due to the different usage rates of the two automatic medicine dispensers in the pharmacy, it is likely that setting both of their CL values to 77% may have led to deviations in the results.
When the prescription is assigned to the real-time window, the CONSIS system will lock the inventory of the prescribed medicine until the pharmacist confirms the medicine dispensing operation. When the remaining inventory of a certain medicine in the machine is not sufficient to dispense the next prescription, any subsequent prescriptions containing this medicine will only be assigned to the pre-dispensing window. This situation results in the accumulation of prescriptions in the pre-dispensing window and prolongs the waiting time for patients. Therefore, dispensing to the real-time windows in the machine should be increased, which requires a greater inventory. Because the first unit is responsible for one additional real-time window than the second unit, its CL value can be set lower than 77%. According to the CL value, the inventory of medicines in the first unit can be adjusted appropriately to avoid accumulation in the pre-dispensing window.

Summary
The degree of automation in an outpatient pharmacy can directly affect all aspects of the circulation process of medicines in the hospital and further affect the medical management mode for outpatient departments of the entire hospital [17]. In view of the medication characteristics of the outpatient pharmacy of our hospital, it is particularly important to optimize the existing software and workflow of the automated medicine dispensing system. Combination of the EIQ-ABC analysis method and track utilization rate algorithm can provide an optimized solution for the storage space management of an automated medicine dispenser, thereby fully utilizing its capacity to improve the automation level of the pharmacy, which in turn greatly improves the work efficiency and accuracy, shortens the waiting time of patients for their prescriptions, and improves the management level of the pharmacy. At the same time, such optimized automation liberates pharmacists from time-intensive simple transactional work to provide professional pharmacy services, thereby realizing transformation of the role and status of pharmacists in the hospital. Since the catalogue of medicines used in the hospital and the characteristics of drug use are not static, pharmacists can regularly add new medicine varieties suitable for the machine into the automatic medicine dispenser by using the EIQ-ABC analysis method and track utilization rate algorithm and adjust the storage of certain drugs with abnormal CL values in a timely manner. This approach can optimize the storage space in the automatic medicine dispenser to fully utilize its capacity.