Analyzing and Modelling Pharmacy Queue System Using Simulation

Waiting time and queue length at the pharmacy are very influential for customer satisfaction. A hospital’s pharmacy which the object of this study has a long waiting time. The aim of this study is to analyzing and modelling pharmacy queue using simulation method, then simulating a new scenario as an effort to improve the queue system. The improvement scenario was simulated by adding one server at payment locket. The simulation was carried out using empirical and theoretical approaches. The analysis was conducted based on the results of the simulation. Results showed that based on validity test can be concluded that the simulation using empirical and theoretical approach do not differ significantly from the real system. Based on the experiment from improvement scenario it showed that the addition of payment server did not show a significant difference from origin situation, the waiting time only decreased by approximately 30 minutes.


INTRODUCTION
Waiting time and queue length at the pharmacy are very influential for customer satisfaction. If the amount of the service unit is sufficient, the queue that occurs will be reduced. To better understand how the queuing system occurs, research and observations on the real queue system are carried out. The problem faced by the real system is a very long and saturating queue time at a hospital's pharmacy. Patients and their relative may easily get tired and impatient when queuing too long for drugs before leaving hospital. Therefore it is necessary to further analyze the queuing system at this pharmacy so that improvements can be made to the system that is not optimal. In this study, a pharmaceutical installation queue system is modeled so that it could be further analyzed. Modelling the real system is done by using simulation methods.
Sridadi [1] revealed that the application of modeling and simulation systems has been so rapidly developing and expanding in various fields both natural knowledge fields, such as physics, chemistry, biology, medicine, to social knowledge fields such us economics, social and politics. Simulation can help the decision maker to determine the optimal improvement scenario with more affordable cost and time. Because testing directly at the real system will be more difficult and takes a lot of energy and money. Therefore a lot of research uses simulation methods, both in products fields and services fields. Nashrudin et al [2] conducted simulation for planning the optimal number of machines to balance the production lines and considered the investment value using NPV, IRR, and BCR. A simulation at services area also has been done a lot. In many cases additional service facilities can reduce queuing, but the cost of providing additional services will result in reduced profits. Therefore to add facilities, the decision maker need to compare and calculate the adventages and disadventages of the scenario [3]. Studies using simulations that compare real systems with comparison to improvement scenario provided information related to the comparison of the advantages and disadvantages of aech scenario, thus the decision maker can be more confident in making decisions [4][5] [6].
Studies on outpatient pharmacy also have been done by many researchers, Dan et al [7] states study on outpatient pharmacy is important in many aspects, and it's one of the modern scientific management research objectives. Many studies at hospital pharmacies have found results about things or facilities that need to be p-ISSN : 1412-114X e-ISSN : 2580-5649 http://ojs.pnb.ac.id/index.php/LOGIC

Activity Cycle Diagram
The activity cycle diagram (ACD) is a method to describe the interactions of objects in a system that uses common graphical modeling notation to explain series of activities from real life circumtances [11]. The ACD of process that happen in this research object shown in figure 1. There are 3 locket that are always open at this pharmacy. Locket 2 is a place to submit prescriptions, Locket 1 (BRI Bank counters) for payment process, and Locket 4 for the patient take out their medicine.

Simulation
To make a simulation with theoretical distribution, first we have to find the distribution of each activities. We used StatFit software for finding the distribution. The results of distribution can be seen at table 1. Interarrival activities shows that the arrival of patients into the system follows the Pearson 6 distribution. 1 st queue represents the customer's waiting time for entering the prescription file into Locket 2. 2 nd queue represents the customer's waiting time to be called by Locket 1 for payment process. And 3 rd queue represents the customer's waiting time to be called by Locket 4 for taking out their medicine. We need to find the distribution to determine how many inputs will enter the system and time between arrivals of that inputs, when performing the simulation later. In addition, to ensure the simulation represents the real system.
Random generator is a random number that will be used in simulations which has a same pattern as the pattern of observational data from the real system. Random generator was build using the help of excel software based on input distribution that was obtained with StatFit Software from the previous step. Then simulation was done by using Extend Software. The simulation was carried out following the ACD that has been made and the data entered for each activities also followed the distribution that was previously calculated. The picture of how the simulation using Extend Software for real system can be seen at figure 1, while the proposed scenario can be seen at figure 2. The comparison of the theoretical distribution simulation results compared to the actual system can be seen in the graph of each activities. One of the example can be seen at Figure 3, which displays a comparison of the amount of patient that entered the system between the real system and the proposed scenario. From figure 3 it can be seen that the graph between real and simulations shows an average pattern that is quite similar, although an error still appears. In general, all activities showed that the pattern between the simulation and the real system is quite similar, although the error persists. Big enough error occurs at queue and take medicine activities, as show at Figure 4 and Figure 5. It happened because the amount of data being compared are different. The real system data had less data compared to the simulation, because some data from the real system need to be discarded at uniformity test because they are identified as outlier. But overall, all the pattern are quite similar. It can be concluded that the simulation using theoretical distribution are quite representative of the real system.  A comparison of the average waiting time from the real system and proposed scenario can be seen at Table  2. It can be seen that the addition of a server causing the average of waiting time to decrease even though the amount is only a little. Validation to the simulation was carried out to determine whether the simulation that has been done represents the real system or not. Validation was done by comparing the real data to the result of simulation using theoretical approaches. It was done using Kruskal Wallis test on SPSS software. The Kruskal Wallis Test is used because the data are not normally distributed. The result of validation data can be seen at Table 3. It shows that in all activities there is no significant difference in mean between real system data and the simulation. So it can be concluded that the simulation of the real data system is valid and can represent the real system. Data is not normally distributed There is no significant difference in mean Submit the recipe Data is not normally distributed There is no significant difference in mean Payment process Data is not normally distributed There is no significant difference in mean Take the medicine Data is not normally distributed There is no significant difference in mean Validity test was also performed on scenario simulation. The purpose is to test whether the scenario has a significant effect on the situation before the scenario was carried out. It was done by comparing the queue length at the payment server before server addition to after payment server addition. Scenario validation was performed using Mann Whitney test on SPSS software. The Mann Whitney test is used because the data are not normally distributed. The result can be seen at figure 4. Based on the Mann Whitney test, it can be seen that there is no significant average difference between real data and the theoretical approach. It means the proposed scenario does not have a big influence to the real system simulation. Verification is a process of checking whether the operational logic of the model is in accordance with the logic of the flowchart, or checking whether the computer simulation program is running as intended with the computer inspection [12]. In this simulation verivication is done by comparing the number of outputs from the real system simulation to the simulation of proposed scenario. Comparison of the output can be seen in Table 5. From the results of the experiments, it was decided not to use the proposed scenario. Because the proposed scenario, by adding a server at payment server, did not show a significant difference from origin situation, the waiting time only decreased by approximately 30 minutes. Adding a payment server to the system can not reduce the waiting time, because after further evaluation showed that the actual service time on the payment server is not too long. At the real system, the cause of bottle neck is the processing of recipes performed by employees. But this research was not study more deeply about how the prescription processing works. So we can not make a comparison about the result if we want to make another proposed scenario by adding an employee (a server) at recipes proceesing.

CONCLUSION
Results showed that based on validity test can be concluded that the simulation using empirical and theoretical approach do not differ significantly from the real system. And based on the experiment from improvement scenario it showed that the addition of payment server did not show a significant difference from origin situation or the real system, the overall waiting time only decreased by approximately 30 minutes.

ACKNOWLEDGEMENT
We would like to express our gratitude to Lembaga Pendidikan dan Pembinaan Manajemen (LPPM) of AKPRIND Yogyakarta for supporting this research.