13384 FACTA UNIVERSITATIS Series: Electronics and Energetics Vol. 38, No 3, September 2025, pp. 563 - 580 https://doi.org/10.2298/FUEE2503563M © 2025 by University of Niš, Serbia | Creative Commons License: CC BY-NC-ND Original scientific paper EMERGING CONCEPT OF PERSONALIZED MEDICINE VENDING MACHINE BASED ON THE ERA OF COVID-19 PANDEMIC Aleksandar M. Milenković1, Dragan Janković1, Anđelija Đorđević1, Vladimir Sibinović1, Aleksandar Veljanovski1, Dimitrije Janković2 1University of Niš, Faculty of Electronic Engineering, Department of Computer Science, Republic of Serbia 2Pharmacy Institutions Niš, Niš, Republic of Serbia ORCID iDs: Aleksandar M. Milenković https://orcid.org/0000-0003-1796-7536 Dragan Janković https://orcid.org/0000-0003-1198-0174 Anđelija Đorđević https://orcid.org/0000-0002-4760-8641 Vladimir Sibinović https://orcid.org/0000-0001-9091-2932 Aleksandar Veljanovski https://orcid.org/0009-0004-5840-0928 Dimitrije Janković N/A Abstract. This paper presents the new concept of Medicine Vending Machine (MVM), called Personalized Medicine Vending Machines (PMVM), motivated by the need to increase social distancing during the COVID-19 pandemic. The conceptual model, the scenarios of using PMVM, and all the necessary preconditions are provided. This paper proposes modifying the existing MVM concept, which can provide better social distancing in times of pandemics and epidemics, emphasizing personalization and picking up prescribed therapy. The medical information system MEDIS.NET has been used as a keystone in the development of PMVM. Pharmacies and patients use prescription data stored in patient electronic health records in MEDIS.NET to provide all conditions needed for the operation of PMVM. Real data from the Pharmacy Institution Niš and Health Center Niš are used to define the scenarios for the use of PMVM. The proposed PMVM would be a new service for smart cities that can contribute to the significant increase of the efficiency of smart cities during the combat against COVID-19 and any similar pandemics in the future. Key words: COVID-19, medical information system, pandemic, personalized medicine vending machines, smart city Received January 13, 2025; revised February 10, 2025; accepted February 10, 2025 Corresponding author: Aleksandar Milenković University of Niš, Faculty of Electronic Engineering, Department of Computer Science, Aleksandra Medvedeva 4, 18000 Niš, Republic of Serbia E-mail: aleksandar.milenkovic@elfak.ni.ac.rs https://orcid.org/0000-0003-1796-7536 https://orcid.org/0000-0003-1198-0174 https://orcid.org/0000-0002-4760-8641 https://orcid.org/0000-0001-9091-2932 https://orcid.org/0009-0004-5840-0928 https://orcid.org/0000-0003-1198-0174 564 A. M. MILENKOVIĆ, D. JANKOVIĆ, A. ĐORĐEVIĆ, V. SIBINOVIĆ, A. VELJANOVSKI, D. JANKOVIĆ 1. INTRODUCTION The consequences of epidemics and pandemics are multiple and negative. They reflect on human health, the economy, and practically all spheres of life. To reduce the consequences, it is necessary to adapt to the current situation in many domains, both in behavior and the usual work and life processes. One of the key measures to prevent the spread of infection is social distancing, which involves reducing contact between individuals and minimizing time spent in environments where the infection can spread. Practical experience has demonstrated that any measure or method aimed at increasing social distancing effectively reduces the number of infected individuals and shortens the duration of the pandemic [1]–[4]. Besides health institutions, one of the high-risk places for infection spread is pharmacies since many patients, infected or not, enter the pharmacies to collect medicines. The necessity to purchase or obtain prescribed medicines in pharmacies during epidemics and pandemics is even higher during those times. The question is: How is it possible to purchase or obtain prescribed medication in a safer way, less likely to come into contact with the virus itself? One solution is the use of medicine vending machines (MVM) [5]. The actual MVM concept is very similar to the idea of any other kind of vending machine used in different areas, such as for selling food, drinks, cigarettes, newspapers, etc. However, MVMs are not used sufficiently, due to their limited capacity, as well as due to the fact that the majority of medicines require prescriptions, etc. To enable the greater use of MVM and directly affect the reduction of social contacts, it is necessary to change the actual concept of MVM, which provides the use only for a limited set of medicines. The improved concept of MVM would reduce social contacts in pharmacies between the patients themselves and between the patient and pharmacist. Additionally, the demand for medicines is even higher during the times of pandemic, which puts additional pressure on pharmacists. Therefore, the use of MVM would also decrease the pressure that pharmacists are exposed to. The proposed concept of Personalized Medicine Vending Machine (PMVM) in this paper could be applied in practice if the following conditions are fulfilled: the data on prescriptions are stored in the patient's electronic health record (EHR), all health care institutions at the primary level have the medical information system (MIS), information on all prescriptions is stored in the central repository, all pharmacies have access to the data stored in the central repository. These requirements are fulfilled by the healthcare system organization in the Republic of Serbia (RS), which we use as the base for developing our PMVM concept. Of course, the proposed PMVM concept can be implemented in any country with similar healthcare systems. The primary reason for using PMVMs is to increase social distancing. Still, many other positive effects are also discussed in this paper, such as 24/7 access, improved productivity of pharmacists, quality of life, etc. The significant advantage of PMVM, in contrast to other existing solutions, is personalization. Patients can take prescribed medicines regardless of the significant number of existing medicines that can be prescribed and the limited capacity of the vending machine. PMVM solves the problem with the limited capacity of MVM and can provide the entire prescribed therapy. Commonly used over-the-counter medications are also offered. In the COVID-19 [6]–[8] era, the smart city concept was extended with several services to reduce the negative effects of pandemics, such as tracing tools in the city of Seoul [9]. The proposed features of PMVM make it an integral part of smart cities that can be widely used during pandemics. Emerging Concept of Personalized Medicine Vending Machine Based on the era of COVID-19 Pandemic 565 2. BACKGROUND AND RELATED WORK The widespread use of vending machines (VM) made simple everyday activities easier. They are used for dispensing food, drinks, cigarettes, newspapers, etc. [10]. The first VM was constructed in the 1st century A.D. by the Hero of Alexandria as the coin- operated machine for holy water dispensing [11]. In the US the first VM was installed in 1888 by the Thomas Adams Gum Company [10] for selling gum on the train platforms of New York City. US-based company InstyMeds distributed automatic dispensing machines that can provide patients with prescription medications [12]. InstyMed machines were approved by Arizona State University in 2014 for dispensing prescribed medications on its campus after closing the university pharmacy. Dr.Max is a chain of pharmacies in Slovakia that in August 2019 installed the first MVM in Slovakia [13]. Medicines offered via the MVM are over-the-counter medications: nutritional supplements and vitamins, probiotics, cold medicines, eye preparations, medical aid and first aid, intimate hygiene products, and food supplements. In India, the MVMs are attractive for rural areas that do not have access to pharmacies [14]. A pilot project implemented MVMs on campus as 24/7 access to first-aid equipment and medicines in Kazakhstan [15]. A few papers propose some technical improvements to the standard MVM. The authors in the paper [16] present the prototype of the All-Time Medicine and Health (ATMAH) device, designed to provide accessible medication and medical assistance to individuals in need. ATMAH consists of two key components: an automated medicine vending machine and an integrated online portal. The vending machine, which dispenses prescribed medications, is powered by a Raspberry Pi, a single-board computer that controls the dispensing mechanism. The system ensures that only the medications prescribed by a doctor are dispensed based on the patient's validated credentials in the database. During the COVID-19 pandemic, the authorities in Vancouver [17] chose designated locations where the trained staff monitored the drug collection by using vending machines. Many people used to gather to take opioid drugs. There is no need for face-to-face interaction, and no pharmacist is required. The machine requires minimal physical contact, ensuring a hygienic process. Additionally, the medications dispensed are sanitary. Even though there are numerous cases where MVMs have demonstrated their irreplaceable role in modern society, they still need to be exploited sufficiently. Medicines that can be distributed by the MVMs are currently limited to painkillers, oral contraceptives, baby food, etc., due to the complexity of the use of other medicines. There are various MVM types, but in general, they include the same set of key components and supported functionalities. The major MVM component is [18] a scanner for taking input from a user. This system consists of servo motors for dispensing the medicine, pills storage space, pill motion detection sensors, a monitoring system for checking the inventory storage, a vertical packaging machine that is enabled to pack each medicine in a separate package, and a contactless printer intended to print the description of medicine use, which also provides the time at which the medicine is supposed to be collected. Additionally to the activities mentioned above, the inventory monitoring system also controls the date of expiration of each medicine. It automatically sends an alert when the medicines run out to have the storage refilled. It also contains an integrated system that has the option to receive payment from the user for the medicines. 566 A. M. MILENKOVIĆ, D. JANKOVIĆ, A. ĐORĐEVIĆ, V. SIBINOVIĆ, A. VELJANOVSKI, D. JANKOVIĆ The authors discuss in the paper [19] the design of an anytime medicine vending machine to provide medication to those in need. It includes a card reader and an automatic dispenser controlled by an Arduino board, which releases medicines based on a doctor's e-prescription stored on a smart card. The system can be accessed through an online portal where patients can check their e-prescriptions and doctors can update them. The machine dispenses medicine only after validating the patient's credentials. Authors present developed Supplies Vending Machine [20] to address the challenges posed by the COVID-19 pandemic, where urgent and round-the-clock medical supply demands exceed the capabilities of traditional supply chains. The vending machine, designed for any time, anywhere access, features secure cashless payments, a security access system, and restocking alerts. It uses an Arduino Mega and NodeMCU ESP8266 Wi-Fi module, with components like an LCD, RFID module, push buttons, and sensors. Non-prescription vending machines [21] are increasingly used to dispense medicines, but their role in public health remains under-researched. While they offer benefits, such as convenience, they also pose risks like medicine interactions. This article aims to provide a framework for investigating the advantages and limitations of these machines. More research is needed to balance their benefits with regulatory concerns and patient safety, significantly improving access to non-prescription medicines during pandemics. The authors agreed that further studies are necessary to assess the impact of these machines on public health and quality of life. Lack of access to affordable over-the-counter medicines affects school attendance and health. To address this, Purdue University launched Pharmacy Vending Machines (PhVMs) in January 2021, providing 24/7 access to cold/flu medicines and other pharmaceuticals [22]. The paper [23] study analyzes the growing popularity of over-the-counter (OTC) vending machines and their impact on the pharmaceutical industry and consumer behavior. Using a bibliometric analysis of academic literature, the study examines OTC vending machines' evolution, trends, and future research areas. It emphasizes the need for stronger regulatory frameworks to address risks like medication abuse and incorrect dispensing while also advocating for interdisciplinary collaboration to ensure safety and maximize benefits. It is evident that in order to expand the use of MVM [5], certain concepts need to be modified and adapted for practical implementation. This paper presents the adaptation of MVM, driven by the global effort to control the spread of the COVID-19 virus through social distancing—one of the most effective measures for pandemic containment. These modifications are used to define the concept of Personalized MVM (PMVM). The proposed PMVM falls within the services offered by smart cities, as the concept of a smart city encompasses advancements in the healthcare sector [24]. The COVID-19 pandemic has created many new services in smart cities worldwide. In order to save human lives and to prevent the break of the economy, governments around the globe have been taking intense measures. The significant advantage of PMVM compared to other existing solutions is its ability to offer personalization. Unlike traditional MVM, PMVMs allow users (patients) to access their prescribed medicines directly (pre-prepared medicines placed in PMVM), regardless of the vast number of medicines that can be prescribed. This personalization is particularly valuable in ensuring that individuals receive the medicines they need, tailored to their prescriptions. Moreover, despite the limited capacity of the MVM, PMVM ensures that it can accommodate personalized therapy prepared in addition to standard medicines. This unique feature helps improve access to necessary medicines and is described with all necessary prerequisites in detail in the following sections. Emerging Concept of Personalized Medicine Vending Machine Based on the era of COVID-19 Pandemic 567 3. MATERIALS AND METHODS The materials and methods used to improve MVM and obtain a fully functional PMVM are described in the following section. 3.1. COVID-19 and epidemics – a new chance for PMVMs The emergence and rapid spread of epidemics affect people's daily lives by altering health, economic conditions, and work habits, as well as social and political dynamics. The set of key activities that are updated with the COVID-19 strategy [3] has been identified to develop a plan for putting pandemic outbreaks under control. Essential measures for combating the pandemic are the reduction of movement and social distancing [3], [25], especially for vulnerable groups [3]. As a result, patients should be able to collect their medications without having to enter pharmacies, highlighting the importance of the MVM. The adaptation of the existing concept and implementation of MVM to the new circumstances require significant modifications. It also needs to become part of the healthcare system and not just an independent device that operates 24/7 and potentially reduces the cost of dispensing medicines. In the age of pandemics, the economic factor is not dominant. Therefore, the direct financial benefit of using MVMs during the pandemic is not a priority. The priority is to create conditions to hold up the spread of the virus, to which the use of MVMs can contribute. 3.2. PIN and HCN data To propose the adequate modification of the MVM concept, real scenarios and work processes at Health Center Niš (HCN) and Pharmacy institution in Niš (PIN) have been analyzed, as well as the data from the medical information system (MIS) MEDIS.NET [26], collected during the 14 years in HCN. The City of Niš is the second largest in the Republic of Serbia (RS) in terms of land area and population. During the COVID-19 pandemic, it became the second-largest hotspot for disease in the country. The City of Niš is served by a single health center, which operates 63 branches across the Niš district in addition to its central facility. The HCN is the largest primary healthcare institution in RS and the Balkans based on the number of patients it serves, approximately half a million [1]. In the RS, several MISes are in use, three being the most dominant over the past 15 years, one of which is MEDIS.NET. This system is utilized in 25 primary healthcare facilities across southeastern Serbia. MEDIS.NET was developed at the Faculty of Electronic Engineering in Niš, in the Laboratory for Medical Informatics. The Ministry of Health of RS has granted MEDIS.NET a nationwide license for primary healthcare use. For over 14 years, MEDIS.NET has been extensively implemented and used at HCN [1]. The PIN is a state-owned pharmacy institution. PIN has 43 pharmacies located in the City of Niš and surrounding villages, as well as in neighboring smaller towns. In the vicinity of HCN, there are a few private health centers as well as private pharmacies. In some private pharmacies, patients can get medicines prescribed in HCN in the same way as in PIN. In defining the PMVM concept, we intensively used data from PIN and HCN related to prescriptions and medicines. The number of prescriptions that are realized monthly in PIN during 2020 ranged from 77000 to 114000. In 2020, the total number of realized prescriptions was 1070000. The number of prescriptions issued at HCN during 2020 is 1197542. 568 A. M. MILENKOVIĆ, D. JANKOVIĆ, A. ĐORĐEVIĆ, V. SIBINOVIĆ, A. VELJANOVSKI, D. JANKOVIĆ The number of prescriptions realized during 2020 in pharmacies within PIN pharmacies located in the City of Niš and surrounding is 738151. The difference between number of prescriptions issued in HCN and the number of prescriptions realized in PIN differ because patients can realize their prescriptions in some private pharmacies. The number of pharmacists working in PIN is 129. The average number of prescriptions per pharmacist is ranging from 595 to 886. There is a significant difference in the number of realized prescriptions per health worker and per pharmacy depending on the location (pharmacies in towns realize significantly more prescriptions than pharmacies in villages). The number of realized prescriptions is ranging from 300 to 2500. The working hours of pharmacies are different. Table 1 provides an overview of the work of pharmacies by type as well as the number of pharmacies by type (column "Number of Pharmacies"). Table 1 Opening hours of pharmacies within the PIN Pharmacy Type Number of Pharmacies Monday - Friday Saturday Sunday Type A 11 07:00 - 15:00 - - Type B 3 07:00 - 20:00 - - Type C 13 07:00 - 20:00 07:00 - 15:00 - Type D 3 07:00 - 20:00 07:00 - 20:00 08:00 - 15:00 Type E 2 07:00 - 20:00 07:00 - 15:00 07:00 - 14:00 Type F 1 00:00 - 24:00 00:00 - 24:00 00:00 - 24:00 Type G 1 07:00 - 14:00, 4 days/week - - Type H 4 07:00 - 14:00, 3 days/week - - Type I 3 07:00 - 14:00, 2 days/week - - Type J 2 07:00 -1 4:00, 1 day/week - - Fig. 1 Top 10 prescribed medicines at HCN in 2019 and 2020 [5] Emerging Concept of Personalized Medicine Vending Machine Based on the era of COVID-19 Pandemic 569 3.3. Prescriptions Almost 4000 different medicines are officially used in RS, 2000 of which are prescribed more frequently than other medicines. Fig. 1 shows the top ten prescribed medicines at HCN in 2019 and 2020 during March, April, May, and June, while Fig. 2 shows the top ten prescribed medicines in the first 6 months of 2020. In HCN, in the first 6 months of 2020, the number of medicines prescribed more than 1000 times was 211, while the number of medicines prescribed more than 500 times was 355. Fig. 2 Top 10 prescribed medicines at HCN in the first 6 months of 2020 [27] The data from MEDIS.NET show that physicians rarely prescribe only one medicine to a patient during one visit. During 43.17% of all visits in the first 6 months of 2020 in HCN, only one medicine was prescribed. However, there are more cases where more than one medicine was prescribed per visit (2: 18.91%, 3: 11.79%, 4: 8.76%, 5: 6.36%, 6: 4.37%, 7: 2.78%, 8: 1.67%, 9: 0.99% and 10 and more: 1.17%). Therefore, the patient usually collects several medicines in a pharmacy, which prolongs the whole procedure. 3.4. Prescription restrictions related to using traditional MVM Many factors and open-ended questions prevent the mass use of MVMs. In most cases, those are country-specific regulations, some universal obstacles, etc. Some of them will be considered below. Due to the significant number of medicines available on the market, it is only possible to make some of them available through one VM. Therefore, actual MVMs offer a limited number of medicines. One open question is how to choose which medicines should be available to patients in MVMs. The most prescribed medicines are good candidates for use via MVM, but this number is also too large. This means that MVMs should hold incomparably more medicines than the most commonly used MVMs so that the patient can obtain all the necessary medicines with the help of one MVM. This number of required medicines exceeds, by far, the capacities of the existing MVMs. Therefore, actual MVMs offer only a limited number of medicines, and this is one of the main reasons for their restricted use. An adequate prescription is required for the majority of medicines. In contrast, for a smaller set of medicines, a prescription is not needed (for example, vitamins, analgesics, hydrogen, medical alcohol, band-aids, etc.). Also, a set of medicines for which the prescription is not needed can be prescribed by a physician. In this case, a patient should not 570 A. M. MILENKOVIĆ, D. JANKOVIĆ, A. ĐORĐEVIĆ, V. SIBINOVIĆ, A. VELJANOVSKI, D. JANKOVIĆ pay or should partially pay for them. Therefore, MVM should be able to recognize all previously mentioned cases and to process patient's requests properly. In many instances, patients seek clarification from pharmacists, typically regarding instructions on properly using their medication. The pharmacist often writes the required dose and the way of application of the medicine package by pencil on the medicine package. Therefore, a simple MVM is not able to assist with those cases, so patients need to request assistance from the staff directly at the pharmacy. So, MVM should provide the possibility to print out instructions, dosage, etc., if required by the patient. There are different models of payment for medicines, which depend on the country. In RS, for the vast majority of medicines, patients need to pay partially, or they can take them free of charge. In contrast, for the other group of medicines, they need to pay the full price (for example pensioners and children are privileged, they do not pay for all medicines, it depends on the patient's health insurance). Also, the medicine price is liable to change, so the MVM should be adapted to different pricing and payment models, as well as payment methods (cash, card, E-banking). One of the questions is how to prevent someone from taking large amounts of medicines. This is especially important for narcotics and tranquilizers (antidepressants). MVMs must be enabled to identify the patients and record of their activities in order to prevent excessive medicine use. Saved patient activity data should be available to all existing MVMs to avoid taking the same medicine on more MVMs. Other considerations regarding the use of MVM include the location for its installation (e.g., in the vicinity of a pharmacy or elsewhere), its capacity, security (particularly for narcotics), cooling requirements, as well as how and when to replenish the medicine supply. 4. RESULTS The presentation of improvements made on MVM, which enable the operations of PMVM, is given in the following sections. 4.1. PMVM – the improved concept of MVM The capacity of MVM is actually one of its main limitations since it is only able to store some medicines in one MVM at a time. As mentioned above, more than 4000 medicines are in use in RS, while its capacity is sufficient for up to 200 different medicine types. Thus, one possible modification of the MVM should allow it to provide the most prescribed medicines. However, a limitation of this approach is that patients often have multiple prescriptions during a single visit to the pharmacy, meaning they will only be able to receive their medications from the MVM if those include the most frequently dispensed medicines. So the patient should again need to request the medicines not belonging to the most frequent medicines from the pharmacy. Fig. 1 presents the top ten medicines prescribed in the HCN. The list of top ten medicines comprises medicines for different illnesses, as well as various medicines used for treating the same disease (Tensec and Concor - used for heart illness, Binevol - mostly used for treating hypertension) [5]. Taking into account all the aforementioned, it can be deduced that numerous medicines will not be present on the MVM list. In order to tackle this issue, the MVM needs to be modified in a newly devised way. Emerging Concept of Personalized Medicine Vending Machine Based on the era of COVID-19 Pandemic 571 Fig. 3. Sequence diagram of using PMVM The improved version of MVM should be able to provide the solution to this and the issues stated above. So, the proposed concept of PMVM is based on something other than the list of the most frequently used medicines. It completely adjusts the MVM to the needs of each patient separately, which means that different patients will be able to obtain their medicines from the PMVM regardless of the fact if the medicines are more or less frequently prescribed. In this scenario, as soon as the patient receives a prescription for some medicines from the physician, the prescription is immediately registered in the MIS of HCI. Full prescription data entered into the MIS are transmitted to the central state system, which in Serbia is the information system (IS) of the Republic Health Insurance Fund (RFZO). Each pharmacy with the PMVM installed outside the pharmacy should have access to the prescription data. The use of some identification method (personal ID card, health insurance card, QR code at prescriptions, password, etc.) should enable the patient to get medicines from PMVM (a pharmacist prepares the machine in advance, as the patient requests it). Such cases are shown in Fig. 3 activity diagram. The time delay required from the moment a patient decides which PMVM to use until the medicines become available in the desired PMVM represents its slight drawback. PMVMs should have the capability to: 1. Take the request from a patient, which can be realized in two different ways. One option related to receiving the request requires that a patient scan a QR code on the printed paper prescription and then send the scan via the web application or mobile application to the specific pharmacy that has PMVM. The other option is based on the fact that RFZO IS connects HCI with pharmacies indirectly, which makes all prescriptions accessible to all pharmacies on demand. Therefore, it only needs to send the unique prescription number. After receiving the patient's request, the two following scenarios are possible. In the first scenario, the pharmacy has all the medicines needed by the patient, 572 A. M. MILENKOVIĆ, D. JANKOVIĆ, A. ĐORĐEVIĆ, V. SIBINOVIĆ, A. VELJANOVSKI, D. JANKOVIĆ while in the second scenario, the pharmacy has only some of the required medicines. The second scenario requires the patient to be informed about the unavailability of some medicine, so he/she would need to decide whether to collect only the available medicines in a particular pharmacy or to cancel the request and try to get the medicine in another pharmacy, i.e., another PMVM. 2. Show a correct price for all requests separately (medicine price can vary depending on a patient, since some patients, depending on their health insurance, have a reduction of price); to receive payments by coins and banknotes (it should be able to return the change), credit cards and E-banking. 3. Provide a medicine requested without a long delay, measuring from the request arrival and informing the patient accordingly, or provide a medicine within a prearranged timeframe (30 minutes, 1 hour, etc.), which can be defined for each PMVM separately by PIN. The time can be changed depending on real conditions, such as the frequency or day period of the requests of patients. 4. Forward the information via IS of a particular pharmacy to the central repository and indirectly to MIS of the HCI (the data are entered in the patient's health record) as soon as the patient collects prescribed medicines. 5. Withdraw medicines that have not been collected by patients within the predefined period from the PMVM (for example, 24 hours) to withdraw the request and to inform the patient at the same time. 4.2. PMVM usage scenarios In the section below, there are a few scenarios for the use of PMVM. Fig. 4 The best-case scenario of the use of PMVM 4.2.1. The best-case scenario (Fig. 4) 1) The patient goes to the HCI. 2) The physician prescribes a medicine to the patient and the prescription is entered in the patient's EHR within the MIS. Emerging Concept of Personalized Medicine Vending Machine Based on the era of COVID-19 Pandemic 573 3) MIS sends the prescription data to the central repository (IS of the RFZO). 4) The patient chooses in which pharmacy he/she wants to collect the prescribed medicine. 5) The pharmacy takes the prescription data from the central repository. 6) The pharmacy sends the exact time to the patient when the medicine will be available. 7) The pharmacist puts the prescribed medicine into the PMVM. 8) The patient comes to PMVM and obtains the medicine. 9) PMVM sends information to the pharmacy IS that the patient has collected the medicine. 10) Pharmacy IS sends information to the central repository that the patient has collected the medicine. 11) The central repository sends information to MIS that the patient has collected the medicine (it is saved in the patient's EHR). 4.2.2. Alternative scenarios (Fig. 5) There are some alternative scenarios. Scenario 1: A pharmacy does not have prescribed medicines – a patient needs to send the request to another pharmacy. Scenario 2: A pharmacy has only some of the prescribed medicines – a patient has to decide whether he/she wants to get the available medication in this pharmacy and send a request to another pharmacy for the rest of the medicines. Fig. 5 The scenario where an order cannot be fulfilled Scenario 3: A patient wants to get the prescribed medicines but also wants to obtain additional medications proposed by a physician (for example, some supplements, such as vitamins, probiotics, etc.) – a patient sends a request for both prescribed and proposed medicines via the web or mobile application. 574 A. M. MILENKOVIĆ, D. JANKOVIĆ, A. ĐORĐEVIĆ, V. SIBINOVIĆ, A. VELJANOVSKI, D. JANKOVIĆ Scenario 4: A patient did not collect medicines at the scheduled maximum time – the pharmacist removes medicines from the PMVM. Scenario 5: A possible scenario that should be strictly prohibited is taking the same medicine on several PMVMs. In this case, the patient will not be able to send the same requests to another pharmacy if the previous pharmacy did not cancel the request. This is done by the pharmacy's IS which sends to RFZO IS the information that the patient wants to get the medicine in that pharmacy. This means that the pharmacy's IS, before sending the information to the patient that he can obtain the medicine in their PMVM, checks whether the patient has sent the same request to another pharmacy. 5. DISCUSSION During the development of the PMVM concept, the data from HCN and PIN were used. The goal of the authors is to develop the general idea of PMVM, which could be applied in many countries, not only in RS. The proposed PMVM concept can be fully implemented in RS. Patients are enabled to obtain prescriptions solely from institutions at the primary healthcare level, such as health centers. MIS is installed in all primary health-level institutions since 2010, in which all prescription data can be saved in the EHR of a patient and afterward sent to the central state repository, which is available to all state pharmacies and some private ones. In order to get medicines, patients should go to any pharmacy and prove their identity. Each patient has a health care card and unique health care number (LBO) as well as a personal ID card, which can be used for identification [5]. If needed, patients can pay for medicines. There is also a special treatment for chronic patients whose prescriptions are valid for 6 months, which is the length of their therapy (it has been extended to 9 months during the COVID-19 pandemic). During the COVID-19 pandemic, chronic patients had to visit physicians once and repeat the visit after 6 or 9 months. It is one of the crucial features that directly contributes to the reduction of the number of HCI visits and decreases the chance of infection in patients at HCI [1]. Each prescription contains information about the patient, the physician who prescribed the medicine, the date of prescription, the diagnosis, the name of the medicine, the dose, the amount and frequency of taking and the way of taking the medicine. Information from pharmacies is sent to the RFZO centralized system, which is notified each time a patient collects their medication for a prescription. All data are encrypted. Based on the analysis of the working hours of pharmacies in PIN, it can be concluded that PMVM could be used in different scenarios. They differ in the time when the patient can send a request for medicine or when he/she can get the medicine from PMVM. The patient can collect the medicine at any time within 24 hours from the moment the medicine is inserted into the PMVM. The first scenario: the patient can order the medicine 24 hours a day. It can be done on PMVMs that are part of 24/7 pharmacies. The second scenario: the patient can order the medicine only during the working hours of the pharmacy where the PMVM is located, not later than half an hour before the end of the working hours. The third scenario: the patient orders the medicine at any time, but it is available after some time (several hours or even days). This scenario occurs if the PMVM is not part of Emerging Concept of Personalized Medicine Vending Machine Based on the era of COVID-19 Pandemic 575 the pharmacy but is located at a remote location. A drastic case is in rural areas when the supply of PMVM medicines is done periodically and not daily. The challenging aspect of PMVM use is its application in rural areas, i.e., where there is no actual pharmacy. If a periodic supply of medicines to the PMVM is ensured, then in this scenario, the use of the PMVM would significantly make life easier for the inhabitants of rural areas. The cost of delivering medicines to PMVM from a distant competent pharmacy is also increased in this scenario, but at the same time, it is the only way. In that case, it is necessary to provide a power supply and an Internet connection for PMVM to work smoothly. The main challenge is determining the ideal PMVM location to cover the most significant number of inhabitants living in rural areas with the least number of PMVM. It can be one of the challenges to further optimizing the PMVM concept. In addition to the basic form of PMVM previously described, there are usage scenarios that require certain modifications of the basic form of PMVM, i.e., the realization of several variants of PMVM, such as hybrid PMVM and extended PMVM. By analyzing the working hours of pharmacies (Table 1), it would be desirable to add a part to PMVM that would contain the most commonly used medicines. Such devices would be used in places where the working hours of pharmacies are short, as well as in cases when MVM is not part of the pharmacy, so filling PMVM with medicines is periodic. To meet the requirements in the best possible way, it would initially be necessary to perform an analysis of the medicines that are most commonly used. Then, periodically, for each specific MVM, the medications that patients require and use would be statistically analyzed, and the medicines in the PMVM changed accordingly. In addition to taking the prescribed medicines, a patient may request to buy some non- prescription medicines (recommended by physicians). So PMVM should provide non- prescribed but required medication, too. Practically, the PMVM device is the same, but software applications for ordering medicines should be realized. The role of the pharmacist is to fill PMVM with medicines based on the received requests of patients. In case a large number of PMVMs that would serve a large number of patients is needed, the role of a pharmacist could be taken over by a robot as described in the paper [28], where two robots of the ABB company are automating a pharmacy department at Shanghai Seventh People's Hospital. Besides social distancing during the times of pandemic, PMVMs provide some other benefits: ▪ offer patients 24/7 access to prescribed medicines, ▪ significantly expand access to medicines when pharmacies are closed, ▪ save patients time by informing them that a required medicine is not available in a particular pharmacy, ▪ improve the productivity and work quality of pharmacists by reducing the number of present patients at the pharmacy, ▪ facilitate access to medicines for people in rural areas. One of the potential shortcomings of the proposed PMVM, due to legal restrictions in the country regarding prescriptions, is the current impossibility of issuing prescriptions for opioids [29]. However, the number of prescriptions prescribing opioids is almost insignificant in relation to other prescribed medications (Fig. 6, Fig. 7). The relatively small number of prescribed opioids that will not be able to be picked up through PMVM does not reduce all other described benefits of the proposed concept. 576 A. M. MILENKOVIĆ, D. JANKOVIĆ, A. ĐORĐEVIĆ, V. SIBINOVIĆ, A. VELJANOVSKI, D. JANKOVIĆ Fig. 6 Total number of prescriptions, patients with more than one prescription, and percentage of medicines in the RS from February 2012 to February 2025 in the Health Center Niš Fig. 7 Total number of prescriptions, patients with more than one prescription, and percentage of medicines in the RS during the COVID-19 pandemic from March 2020 to May 2023 in the Health Center Niš Based on the features of the proposed PMVM concept, PMVM has a high potential to be a significant smart city service. The importance of PMVM will come to the fore, especially during pandemic periods such as the COVID-19 pandemic. After building a proof-of-concept prototype of PMVM, the data available and newly gathered data for further development and integration into the smart city concept will be used. By analyzing the usage of the PMVM, it can be determined if the capacity needs to be increased or if the location is not suitable for it. Available data can determine the best possible places for PMVM, e.g., pharmacies where a large number of prescriptions are Emerging Concept of Personalized Medicine Vending Machine Based on the era of COVID-19 Pandemic 577 realized. The expected effects of using PMVM will be an increase in social distancing and a reduction of the spread of the virus, the availability of medicines 24/7, a decrease in errors caused by handwritten prescriptions, an increase in the efficiency of pharmacies, saving patients the time needed to obtain medicines, etc. The healthcare system in RS and the place of PMVM in it are presented in Fig. 8. In the RS, all conditions for the implementation of the PMVM are fulfilled. All prerequisites are described at the beginning of this chapter, and they imply the existence of a centralized information system (Republic Fund of Health Insurance), MIS in healthcare institutions, and information systems in pharmacy institutions (Fig. 8). Security algorithms and protocols determined by the state authority secure demographic and medical data exchange between systems. Also, each PMVM must provide the same communication protocols for sensitive data protection. Interaction among patients and PMVM is only allowed if the patient has an identification card (health ID card) or an installed mobile application for authorization. Indeed, the competent ministry is required to allow the use of PMVM through additional secondary legal acts. The healthcare system in RS is similar to healthcare systems in countries in the Balkans. Therefore, the place of PMVM in the healthcare system of those countries can be the same as in the RS. Non-pharmacy trade involves selling medicines outside pharmacies, including limited- service pharmacies, supermarkets, petrol stations, and kiosks. Access to these products varies across Europe, with a general trend towards deregulation. Allowing patients to obtain medicines outside pharmacies promotes self-medication. This article reviews legal regulations on the non-pharmacy trade of medicines in European countries [30]. These places should be ideal for installing PMVM. Fig. 8 Healthcare system in RS and position of PMWM 578 A. M. MILENKOVIĆ, D. JANKOVIĆ, A. ĐORĐEVIĆ, V. SIBINOVIĆ, A. VELJANOVSKI, D. JANKOVIĆ 6. CONCLUSION VMs are widely used in many domains because they offer different services 24/7. In this paper the main focus is on their use for dispensing medicines to various groups of patients. However, because of the specific area of use and due to the need for more equipment and software for the safe and secure distribution of medicines, MVMs are not widely used. During the COVID-19 pandemic, the potential use of MVMs is highlighted since they can ensure social distancing, which is one of the most important measures in combating the pandemic when collecting medicines in pharmacies. To avoid all existing limitations for using actual MVMs, it is necessary to change the basic concept of MVM, emphasizing personalization and picking up prescribed therapy. In this paper, a new type of MVM is proposed, the so-called Personalized Medicine Vending Machine (PMVM). PMVMs can have significant success in RS if all conditions are fulfilled: primary HCI have an adequate MIS (all prescriptions for each patient are saved in EHRs) and that information about all prescriptions is available to all state and some private pharmacies. After the conditions mentioned above have been fulfilled, it would be possible to install PMVM in pharmacies, which would enable patients to get the medicines prescribed without needing to enter pharmacies, thus significantly reducing social contacts and decreasing the spread of the virus inside pharmacies. Although the proposed modifications to the MVM concept are tailored to the structure of the healthcare system in Serbia, they can also be applied in other countries with similar healthcare systems. In addition to social distancing, some other positive effects come together with the PMVM: medicines will be accessible 24/7 to patients, patients do not have to visit multiple pharmacies searching for an appropriate medicine, the work of pharmacies would be more efficient (inexpensive medicine distribution and increased number of patients served), rural areas can be better covered with medicines, etc. It should be noted that unlike the existing MVMs and MVM concepts proposed in some papers, our PMVM has virtually no limit on the number of different medicines that can be delivered to patients. Overall, the use of the proposed PMVM can be considered a key service within the healthcare sector of smart cities, as it will provide citizens with 24/7 access to medicines, thereby enhancing their quality of life. Based on the proposed PMVM concept, a prototype, in cooperation with PIN, will be implemented for real use. Acknowledgment: This work was partially supported by the Ministry of Science, Technological Development and Innovation of the Republic of Serbia [grant number 451-03-65/2024-03/200102]. REFERENCES [1] A. Milenković, D. Janković and P. Rajković, "Extensions and Adaptations оf Existing Medical Information System in Order To Reduce Social Contacts During COVID-19 Pandemic", Int. J. Med. Inform., vol. 141, p. 104224, 2020. [2] M. Gosak, M. U. G. Kraemer, H. H. Nax, M. Perc and B. S. R. Pradelski, "Endogenous Social Distancing and Its Underappreciative Impact on the Epidemic Curve", Sci. Rep., vol. 11, p. 3093, 2021. [3] P. G. Walker, C. Whittaker, O. Watson et al., The Global Impact of COVID-19 and Strategies for Mitigation and Suppression, Imperial College London, 2020. Emerging Concept of Personalized Medicine Vending Machine Based on the era of COVID-19 Pandemic 579 [4] J. D. Sachs et al., "The Lancet Commission on Lessons for the Future from the COVID-19 Pandemic", The Lancet, vol. 400, no. 10359, pp. 1224-1280, 2022. [5] D. Janković, A. Milenković and A. Djordjević, "Improving the Concept of Medication Vending Machine in the Light of COVID-19 and other Pandemics", In Proceedings of the 55th International Scientific Conference on Information, Communication and Energy Systems and Technologies (ICEST), Serbia, 2020, pp. 42-45. [6] M. Pizzato, A. G. Gerli, C. L. Vecchia and G. Alicandro, "Impact of COVID-19 on Total Excess Mortality and Geographic Disparities in Europe, 2020–2023: A Spatio-Temporal Analysis", Lancet Reg. Health Eur., vol. 44, p. 100996, 2024. [7] G. M Joynt and W. K. Wu, "Understanding COVID-19: What Does Viral RNA Load Really Mean?", Lancet Infect. Dis., vol. 20, pp. 635-636, 2020. [8] J. Agergaard, J. D. Gunst, B. Schiøttz-Christensen, L. Østergaard and C. Wejse, "Long-Term Prognosis at 1.5 Years After Infection with Wild-Type Strain of SARS-CoV-2 and Alpha, Delta, as Well as Omicron Variants", Int. J. Infect. Dis., vol. 137, pp. 126-133, 2023. [9] S. Yang and Z. Chong, "Smart City Projects Against COVID-19: Quantitative Evidence from China", Sustain. Cities Soc., vol. 70, p. 102897, 2021. [10] "Vending machine", Britannica. [Online], May 2024, Available at: https://www.britannica.com/money/vending- machine. [11] M. Shuttleworth, "Heron's Inventions". [Online], 2024, Available at: https://explorable.com/heron- inventions. [12] "Empowering Providers with Automated Dispensing of Prescriptions at the Point of Care". [Online], 2024, Available at: https://instymeds.com/. [13] "Dr.Max". [Online], 2024, Available at: https://www.drmax.sk/informacie-pre-media/35504. [14] A. Rakshitha, E. Hema, G. V. Priya, V. Rakshitha and L. Sapna, "Automatic Medicine Vending Machine", Int. J. Manag. Technol. Eng., pp. 1053-1058, 2018. [15] N. Kulmukhanova, A. Daribay, I. Temirtayev and U. Bassembek, "ZhardEM Medicine Vending Machine", In Proceedings of the Second International Conference on Computing and Network Communications, Astana, Kazakhstan, 2018, pp. 108-113. [16] P. Desai, B. Pattnaik, S. Dey, T. S. Aditya, K. Rajaraman and M. Aarthy, "All Time Medicine and Health Device", In Proceedings of the 5th International Conference on Advanced Computing and Communication Systems, Coimbatore, India, 2019, pp. 5-9. [17] A. Bethune, "Could an Opioid Vending Machine from Dartmouth Make Street Drug Users Safer During COVID-19 Pandemic?". [Online], 2020, Available at: https://www.saltwire.com/nova-scotia/could-an- opioid-vending-machine-from-dartmouth-make-street-drug-users-safer-during-covid-19-pandemic- 438458. [18] A. Brolin, M. Ravisankar, V. Gokulnath and M. Harivishanth, "Design of Automated Medicine Vending Machine Using Mechatronics Techniques", IOP Conf. Ser.: Mater. Sci. Eng., vol. 402, p. 012044, Sept. 2018. [19] M. Anusha, J. Chandana, A. U. Harshitha and T. V Shruthi, "Any Time Medicine Vending Machine", Int. J. Res. Appl. Sci. Eng. Technol. (IJRASET), vol. 10, pp. 949-954, 2022. [20] P. H. Ng, E. R. S. H. Chan, M. N. A. Rahman, M. F. Zolkifli, N. N. M. Rosli and M. N. Mahmud, "Medical Supplies Vending Machine", J. Electron. Voltage Appl., vol. 3, pp. 1-14, 2022. [21] A. A. Jairoun, S. S. Al-Hemyari, M. Shahwan, F. El-Dahiyat, M. Jairoun, B. Godman, A. Kurdi and S. Zyoud, "Access to Non-Prescription Medicines via Vending Machines: Key Considerations to Help Transfer the Self-Care Concept to the Next Generation While Managing Safety Risks", J. Pharm. Health Serv. Res., vol. 13, no. 4, pp. 396–401, 2022. [22] A. L. DeMaria, A. T. Hughes-Wegner, F. Rogozinski, T. Raff, M. M. Szabo and N. Noel, "Developing, Implementing, and Evaluating a Campus-Wide Pharmacy Vending Machine Program", Health Promot. Pract., vol. 24, no. 5, pp. 950-955, 2023. [23] A. A. Jairoun, S. S. Al-Hemyari, M. Shahwan, S. Alkhoujah, F. El-Dahiyat, A. A. S. Jaber and S. H. Zyoud, "Examining the Evolution and Impact of OTC Vending Machines in Global Healthcare Systems", Explor. Res. Clin. Soc. Pharm., vol. 16, p. 100540, 2024. [24] A. Visvizi and M. Lytras, Smart Cities: Issues and Challenges. Mapping Political, Social and Economic Risks and Threats, Elsevier, pp. 1–14, 2019. [25] A. Wilder-Smith and D. O. Freedman, "Isolation, Quarantine, Social Distancing and Community Containment: Pivotal Role for Old-Style Public Health Measures in the Novel Coronavirus (2019-nCoV) Outbreak", J. Travel Med., vol. 27, no. 2, p. taaa020, 2020. 580 A. M. MILENKOVIĆ, D. JANKOVIĆ, A. ĐORĐEVIĆ, V. SIBINOVIĆ, A. VELJANOVSKI, D. JANKOVIĆ [26] P. Rajković, D. Janković, A. Milenković, "Developing and Deploying Medical Information Systems for Serbian Public Healthcare: Challenges, Lessons Learned and Guidelines", Comput. Sci. Inf. Syst., vol. 10, pp. 1429-454, 2013. [27] A. Milenković, "Improving the Concept of Medical Information Systems in Order to Reduce the Effects and Consequences of Epidemics and Pandemics", Ph.D. dissertation, Faculty of Electronic Engineering, University of Niš, 2022. [28] ABB, "Robots Revolutionize Drug Dispensing at Shanghai Seventh People's Hospital". [Online], 2020. Available at: https://new.abb.com/news/detail/70025/robots-revolutionize-drug-dispensing-at-shanghai- seventh-peoples-hospital. [29] Paragraf Lex, "Rulebook on the Form and Content of a Doctor's Prescription, the Method of Issuing and Prescribing Medicines". [Online], 2024, Available at: https://www.paragraf.rs/propisi/pravilnik-o- obrascu-i-sadrzini-lekarskog-recepta-nacinu-izdavanja-i-propisivanja-lekova.html. [30] P. Oleszkiewicz, J. Krysinski, U. Religioni and P. Merks, "Access to Medicines via Non-Pharmacy Outlets in European Countries–A Review of Regulations and the Influence on the Self-Medication Phenomenon", Healthcare, vol. 9, no. 2, p. 123, 2021.