MVM Extended V8
MVM Extended V8
MVM Extended V8
*Corresponding author at: University of Nis, Faculty of Electronic Engineering, Laboratory for Medical Informatics
Aleksandra Medvedeva Street 14, Lab 533, 18000, Nis, Republic of Serbia.
E-mail addresses:
dragan.jankovic@elfak.ni.ac.rs (Dragan Jankovic),
aleksandar.milenkovic@elfak.ni.ac.rs (Aleksandar Milenkovic),
andjelija.djordjevic@elfak.ni.ac.rs (Andjelija Djordjevic),
vladimir.sibinovic@elfak.ni.ac.rs (Vladimir Sibinovic),
jankovicdill@gmail.com (Dimitrije Jankovic)
ABSTRACT
Objective: The main objective of this paper is the proposal of a new concept of medicine vending machines
(MVMs), called Personalized Medicine Vending Machines (PMVM), motivated by the need to increase social
distancing during the COVID-19 pandemic.
Material and methods: The medical information system MEDIS.NET, currently used in 25 health care institutions,
has been used as a keystone for the development of PMVM. Prescriptions data stored in patient electronic health
records in MEDIS.NET are used by pharmacies and patients to provide all conditions needed for the operation of
PMVM. In order to define the scenarios of use of PMVM, we used the real data from the Pharmacy Institution Nis,
whose services are used by almost half a million people.
Results: The conceptual model and the possibilities of use of personalized medicine vending machines are
developed.
Discussion: Vending machines are widely used in many areas, which cannot be said for MVMs, which are far less
used. Pandemics are usually followed by an enormous number of infected people, large number of patients in critical
conditions and unavoidable fatal outcomes. It has been shown in practice that any measure or way to increase social
distancing significantly reduces the number of infected patients and shortens the duration of the pandemic. We
propose PMVM, the modification of the existing MVM concept, which can provide better social distancing in the
case of pandemics and epidemics, such as the current COVID-19 pandemic. In order to enable the use of proposed
modification the following conditions need to be fulfilled: data on prescriptions are stored in the patient's electronic
health record, information on all prescribed drugs is stored in the central repository, all pharmacies have access to
data in the central repository. PMVM can be a significant service of smart cities.
Conclusion: The proposed PMVM concept can significantly increase the use of MVMs and thus directly reduce the
spread of virus during pandemics by reducing the number of social contacts. The use of PMVM can contribute to the
significant increase of the efficiency of smart cities during the combat against pandemics.
Keywords: personalized medicine vending machines; COVID-19; pandemic; social distancing, smart city
1. Introduction
The consequences of epidemics and pandemics are multiple and negative. They reflect on human health as well as
on the economy and practically all spheres of life. We are currently witnessing such consequences of the COVID-19
pandemic characterized by an enormous number of infected people, a huge number of critical patients and
unavoidable fatal outcomes. To reduce the consequences, it is necessary to adapt to the current situation in many
domains, both in behavior and in the usual processes of work and life. One of the most important measures against
the spread of the infection is the social distance i.e., the reduction of people’s contacts and life in infectious
environments. Ensuring social distancing is one of the most difficult tasks of the governments of countries during
the pandemic. It has been shown in practice that any measure or way to increase social distance significantly reduces
the number of infected patients and shortens the duration of the pandemic [19].
Besides health institutions, one of the high-risk places of infection spread are pharmacies, since a lot of patients,
infected or not, enter the pharmacies in order 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 medicines in a safer way, less likely to come into contact with the virus
itself? One solution is the use of medicine vending machines (MVM). The actual MVM concept is very similar to
the concept of any other kind of vending machines used in different areas, such as for selling food, drinks, cigarettes,
newspapers, etc. However, MVMs are not used sufficiently, due to the limited capacity of MVMs, 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, that 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 the pharmacists are exposed to.
The conference paper [18], presents the basic ideas about how to change the MVM concept. In this paper these
ideas are improved and extended and the concept of the so-called Personalized Medicine Vending Machine
(PMVM) is proposed, which should significantly increase the possibility of using MVM compared with the
traditional MVM, especially in times of epidemics and pandemics, such as the current COVID-19 pandemic. The
proposed concept of PMVM 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 health
care system organization that exists in the Republic of Serbia (RS), which we use as the base for the development of
our PMVM concept. Of course, the proposed PMVM concept can be implemented in any country with similar health
care systems.
In addition to increasing social distancing and reducing the spread of virus, which is the most significant reason
for the use of PMVMs, there are many other positive effects of PMVM that are also discussed in this paper, such as:
24/7 access, improved productivity of pharmacists, etc.
In the COVID-19 era the smart-city concept is extended with a number of services with the aim to reduce
negative effects of pandemics. Numerous services are added during the actual COVID-19 pandemic in many cities,
for example tracing tools in the city of Seoul. Seoul uses GPS, network connection history with nearby cellular
towers, and credit card records to learn where the patient has previously been and sends warnings to people they
have interacted with. Seoul also uses big data to anticipate possible local future outbreaks as well as applications to
register self-isolation [23]. The proposed features of PMVM make it a necessary integral part of smart cities which
can be widely used during pandemics.
The research papers [17] and [16] present the research conducted for creating a MVM in India and Kazakhstan,
respectively. In India, the MVMs are attractive for rural areas that don’t have access to pharmacies. A pilot project
implemented MVMs on campus as a 24/7 access to first-aid equipment and medicines in Kazakhstan. There are a
few papers which propose some technical improvements of the standard MVM, as well as its combination with other
devices and sensors, such as heartbeat sensor [22].
A remarkably interesting real-life story in COVID-19 times comes from Vancouver [6]. The opioid epidemic,
which caused the declaration of public health emergency in Vancouver four years ago, is made worse by the
COVID-19 pandemic. It is a crisis on top of a crisis. The usual harm-reduction approach, a designated location
where drugs can be taken with oversight by first aid-trained staff, is problematic. Such sites constitute a public
gathering place and have been closed in order to avoid public gatherings, which is one of the basic anti-COVID
measures. The illegal drug supply is getting more expensive and less predictable. Overdose deaths still happen often.
MySafe, Dispension Industries’ opioid-dispensing automated teller machine (ATM), debuted in Vancouver in
December 2019 as a part of Tyndall’s plan to replace risky street drugs with safe, pharmaceutical-grade opioids and
reduce the staggering rate of overdoses. About a dozen patients use the machine. All report an improved quality of
life and less involvement in the dangerous street activities that used to pay for their habit.
Despite all current usage of MVMs, it cannot be said that they are widely used and that all potential which they
offer is appropriately and adequately exploited. There are restrictions to the list of available medicines which is
distributed by means of MVMs. Usually in this way painkillers, oral contraceptives (“morning after pill”), baby
food, etc. are distributed.
There are different types of MVM but more or less they have the same set of components and supported
functionalities. The paper [4] considered one variant of MVM. The major MVM components are: a scanner to take
the input from a user, a system that includes servo motors for dispensing the medicine, large storage space to store
the pills, sensors to detect the motion of pills, an inventory monitoring system to keep track of the storage, an
industrial standard vertical foam fill machine to pack the medicine separately and a non-contact laser inkjet printer
to print the description which includes the time at which the medicine must be collected. The inventory monitoring
system also keeps track of the expiry date of each batch of medicine and sends alert to refill the storage when the
pills run out. It also holds an inbuilt system to receive money from the user for the drugs that are dispensed. All
these systems are monitored by a central microprocessor, which is programmed to receive input from the user via
the scanner and to actuate and control all the necessary components required to dispense the medication requested
by the user.
A different realization of MVM offers a different realization of some parts of MVM, for example payment system
(coins, banknote, pay card, E-banking, etc.).
Previously described cases showed that MVM can have a very good perspective. The full potential of MVM is
still to be improved and adjusted to the requirements. It is quite clear that for the expansion of MVM use some
concepts of MVM should be changed and adapted to a concrete scenario of use. The modification, which is inspired
by the COVID-19 pandemic and effort of all countries to reduce the virus SARS-CoV-2 [7] expansion by providing
better social distancing as one of the most efficient activities in the suppression of the spread of an epidemic, is
presented in this paper and is used in defining PMVM.
The proposed PMVM can be considered as one of the services provided by smart cities, because the smart city
concept includes improvements in the health care domain [8]. The COVID-19 pandemic has sparked the creation of
many new services in smart cities around the world. Over the past 15 months, COVID-19 has had a devastating
impact on economies, governments, and civil society. From rising death tolls to disruptions in day-to-day activities
and economic turmoil, no city is spared, putting significant pressure on local authorities, businesses, and
policymakers to act swiftly and adequately. As such, the world is collectively gaining new insights into science,
technology, and policy that could make our cities smarter and equip us with the knowledge and expertise to face
other global shocks and crises in the future. For instance, due to lockdowns and social distancing rules, many
developing urban areas are now forced to adopt new e-government and e-health services, providing manuals and
tutorials for citizens who are learning and becoming more open to the idea of using them. The pandemic has also
emphasized the importance of digital forms of work such as teleconsultations, online education, remote work, and e-
commerce, and other environmentally friendly practices, resulting in reduced traffic, congestion, and air pollution
[24].
The pandemic forced governments to take actions usually reserved for war, depression, and natural disasters.
Governments across the world are taking extreme measures to limit the loss of human lives and minimize economic
disruption. A number of Indian smart cities have used their ICCCs (Integrated Command and Control Centers) as
COVID-19 War Rooms to coordinate, manage, and monitor the city-level response to the pandemic. Using the
COVID-19 War Room, the cities set up data analytics and monitoring dashboards to manage and contain the spread
of the virus [25]. Some of created services are:
Contact tracing and tracking of suspected and positive cases,
ICCC as COVID-19 War Room,
Geographic Information System mapping and heat maps,
Dashboard for real-time visualization at the COVID-19 War Room,
Mobile applications for COVID-19 tracking,
Statistical tools and simulation models,
Traffic management through existing Integrated Traffic Management System infrastructure,
Drone surveillance,
Self-registration platform,
Interactive Voice Response System,
Artificial Intelligence based real-time analysis of surveillance footages to track social distancing violations,
E-doctor: Telehealth facilities and applications for online consultations and prescriptions,
Telemedicine support through ICCC,
Videoconferencing through the War Room to boost the morale of home quarantined cases,
Remote capacity building and training for healthcare workers.
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. The distribution of prescriptions issued per months is given in Table 1.
Number of
Month
Prescriptions
January 133798
February 107010
March 119959
April 76587
May 79489
Jun 97001
July 100208
August 82846
Septembe
100779
r
October 103122
November 94183
December 102560
Sum 1197542
* All data were collected from the
database of HCN in RS.
The number of prescriptions realized during 2020 in pharmacies within PIN pharmacies located in the city of Nis
and surrounding is 738151. The difference between the 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. Most pharmacies are open on weekdays from 07:00 to 20:00 and
there are no night shifts except for one town pharmacy that works non-stop. Most pharmacies are open until 15:00
on Saturdays and not open on Sundays. Table 2 provides an overview of the work of pharmacies by type as well as
the number of pharmacies by type (column “Number of Pharmacies”).
3.2 Prescriptions
Almost 4000 different medicines are officially used in RS, 2000 of which are prescribed more frequently than
other medicines. Fig. 2 shows top ten prescribed medicines at HCN in 2019 and 2020 during March, April, May,
and June, while Fig. 3 shows 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 is 211, while the number of drugs
prescribed more than 500 times is 355.
Fig. 2. Top 10 prescribed medicnes at HCN in 2019 and 2020 (March, April, May, June).
Fig. 3. Top ten prescribed medicines at HCN in the first 6 months of 2020.
The data from MIS MEDIS.NET show that physicians rarely prescribed to a patient during one visit only one
medicine. Table 3 shows the number of medicines that were prescribed during one visit to the HCN in the first 6
months of 2020. During 43.17% of all visits only one medicine was prescribed. However, there are more cases
where more than one medicine was prescribed per visit. Fig. 4 shows the usual situation where the patient collects
several medicines in a pharmacy, which prolongs the whole procedure.
Fig. 4. Pharmacy work – A patient raises in PIN multiple prescribed drugs from one visit in HCN [26].
Due to the huge number of medicines available on the market it is not possible to make all of them available
through one VM. Therefore, actual MVMs offer a limited number of medications. One open question is how to
choose which medicines should be available to patients in MVMs. The most prescribed medicines are good
candidates for the 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 drugs 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 limited use.
For most medicines, patients must have an adequate prescription, while for a smaller set of medicines the
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 pay or should partially pay for them. Therefore, MVM should be able to recognize all previously mentioned
cases and to process patient’s request properly.
In many cases patients ask a pharmacist for some explanation, usually about instructions for the proper medicine
usage. The pharmacist often writes by pencil on the medicine package the required dose and the way of application
of the medicine. Therefore, a simple MVM cannot cover these cases and patients should request assistance directly
at the pharmacy, where the staff is available, instead of using MVM. So, MVM should provide the possibility to
print out instructions, dosage, etc. if required by the patient.
4.4 Payment models
There are different models of payment for medicines, which depend on the country. In RS, for a huge number of
medicines patients pay only partially or nothing, while for other medicines they should pay the full price (for
example pensioners and children are privileged, they do not pay for medicines and it depends on the patient’s health
insurance). Also, the medicine price is liable to change. Therefore, MVM should support different pricing and
paying 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
records of their activities in order to prevent excessive medicine use. Saved patient activity data should be available
to all existing MVMs to prevent taking the same medicine on more MVMs.
Of course, there are other practical open questions related to the use of MVM, such as: where to install MVM
(near the pharmacy or not), the capacity of MVM, security (especially if there are narcotics), cooling, how and when
to add new medicines in a machine, etc.
The emergence and rapid expansion of epidemics greatly influence the daily lives of people, change health,
economic, working style, social as well as political routines. During pandemic outbreaks, a set of key activities [ 9]
which are updated with COVID-19 strategy [10] have been identified. Their strict implementation leads to the
reduction of a number of infected people and suppression of the spread of epidemic. The reduction of movement and
social distancing [11] (decreasing the number of possible contacts) especially for vulnerable groups (elderly people,
chronic patients) [12] have proved to be essential in combating a pandemic. It is quite clear that health facilities and
pharmacies are high-risk places in relation to the possibility of infection with the virus, especially if the virus is
transmitted by droplets i.e., by air such as SARS-CoV-2 virus [20]. Therefore, the need of people to come to
pharmacies should be reduced, i.e., they should be enabled to collect their medicines without entering pharmacies.
This fact again puts the focus on MVM, but it is clear that the existing concept and implementations of MVM must
undergo significant modifications. It also needs to become part of the health care system, and not just independent
devices, which operate 24/7 and potentially reduce 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 slow down the spread of the virus, which can be contributed by using
of MVMs.
6. Results
The presentation of improvements made on MVM, which enable the operations of PMVM, is given in the
sections that follow. The construction details of PMVM are also described below.
One of the main limitations of MVM is its capacity, because it is not possible to store all existing medicines in
one MVM. As mentioned above the number of medicines which is in use in RS is higher than 4000, while the
capacity of a machine is less than 200 different kinds of medicines. Therefore, MVM could be modified in such a
way to provide only the most frequently prescribed medicines. The drawback of this approach is the fact that usually
one visit results in more than one prescription i.e., more prescribed medicines. That means that a patient will get
prescribed medicines from MVM only if all prescribed medicines are on the list of most frequently prescribed
medicines. Otherwise, the patient again should go to the pharmacy to get medicines which are not on the list of the
most frequently prescribed medicines. Fig. 2 shows top ten medicines prescribed in the HCN. Medicines for
different illnesses belong to the list of top ten medicines, as well as different medicines used for the same illness
(Tensec and Concor are used for heart illness as well as Binevol which is predominantly used for hypertension).
Practically, that means that a huge number of medicines will not be present on this list. So, MVM needs to be
modified in a different way.
The improved version of MVM should solve this and most of the above-mentioned problems. So, this proposal
for the improvements of MVM, is named Personal Medicine Vending Machine (PMVM), and it is not based on the
list of most frequently used medicines. The concept of PMVM is described in the rest of the paper.
The concept of MVM as a machine for purchasing medicines from the set of medicines available through machine
should be changed to PMVM for obtaining medicines prescribed by physicians to the specific patients. In this
scenario, the patient has a prescription for some medicines given by a physician in a health care institution (HCI).
The prescription is immediately registered in the MIS of HCI. All prescription data registered in MIS are sent to the
central state repository (In RS, it is the information system (IS) of the Republic Fund of Health Insurance – acronym
in Serbian is RFZO). This information should be available to each pharmacy that has PMVM placed outside of the
pharmacy. Based on some identification method (personal ID card, health insurance card, password, QR code at
prescriptions, etc.) the patient gets medicines from the machine (which is previously prepared by a pharmacist based
on the patient request). The activity diagram for this scenario is shown in Fig. 5. A drawback of this concept is the
time delay needed until medicines become available to the patient from the time when the patient decides which of
various PMVMs he/she wishes to use.
PMVMs should be able to:
1. Receive a patient request – there are two scenarios: one possibility is that a patient sends a scan of the QR
code from the paper prescription via the web application or mobile application to the specific pharmacy
which has PMVM; the other possibility is related to the fact that HCI is connected with pharmacies
indirectly via RFZO IS and all prescriptions are available to all pharmacies on demand, therefore it is
needed only to send the unique prescription number (a barcode on the top of prescription – see Fig. 6).
After receiving the patient's request, two following scenarios are possible. In the first scenario the
pharmacy has all the medicines needed by the patient, 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 medicines, so he/she would need to decide whether to collect only the available
medicines in a particular pharmacy or to cancel the request and to try to get the medicines in another
pharmacy, i.e., another PMVM.
2. Provide a correct price according to each separate request (the price of a medicine is not same for all
patients, because some patients have a reduction of price (different type of health insurance); to enable
payment by coins, banknote (it must be able to return the change), credit cards and E-banking.
3. Provide a required medicine within a reasonable time from the arrival of the request and inform the patient
about it (or to provide a medicine within a predetermined customized time, for example 30 minutes or 1
hour, which is defined for each PMVM separately by PIN).
4. Forward the information via IS of a particular pharmacy to the central repository and indirectly to MIS of
the health institution (the data are entered in the patient's health record) as soon as the patient collects
prescribed medicines.
5. Withdraw medicines from PMVM if they have not been collected by the patient within the predefined time
period (for example 24 hours), to remove the request and to inform the patient at the same time.
In the section below there are a few scenarios for the use of PMVM. Additionally, the best-case scenario and
some alternative scenarios are also presented.
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 prescribed medicines – a patient has to decide whether he/she wants to
get the available medicines in this pharmacy and send a request to another pharmacy for the rest of medicines.
Scenario 3: A patient wants to get the prescribed medicines but also wants to obtain additional medicines
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.
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, which 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.
Since very often patients ask the pharmacist for the instructions of use of the medicine (each prescription has a
part related to the way of use and daily doses and frequency), a function can be added to the PMVM, where PMVM
is printing a short instruction of use of the medicine upon the request of the patient. The procedure related to the
interaction with other medicines and contraindications is similar. On the other hand, these services can be
independent of PMVM and realized as a part of the MIS, or as a part of a pharmaceutical information system (PIS).
The proposed concept of PMVM use implies that the device is located within the pharmacy and is available to
patients outside of the pharmacy. 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 would be ensured, then in this scenario
the use of the PMVM would significantly make life easier for the inhabitants of rural areas.
Now that the cases of use of PMVM have been proposed, a functional block diagram of it can be created. A
PMVM is envisioned as a locker like machine placed outside of a pharmacy. In that way so it can be accessed from
two sides, for the patients from the outside of pharmacy, and for the pharmacist from the inside of the pharmacy,
thus reducing the contact between the two. Fig. 7 shows a block diagram of the PMVM divided into three parts:
inside part, machine and outside part. Here the connection between the different parts of PMVM and their location is
shown.
To start from the inside, i.e., the pharmacy side. There will be a visual indication of queued orders, as well as the
indication of used and unused lockets. The best way of interaction between a pharmacist and PMVM is a
touchscreen display, where all of the information is shown. For additional instructions regarding medicines to the
patients a thermal printer can be used to print additional information and instructions of use of a certain medicine or
warnings. From the control panel a pharmacist can write and print these instructions to be placed alongside the
medicine. The proposed appearance from the inside is shown in Fig. 8.
On the outside, there is also a user interface that has a display to provide patients with information and
instructions about how to use the PMVM. There must be POS terminal installed for payment processing via credit or
debit cards. Also, money acceptance and change return for cash payments should be enabled. Patients can scan their
ID cards or healthcare cards for identification. Fig. 9, shows the appearance of the PMVM from the outside, the
patient side.
In the previous figures the PMVM is shown with 15 compartments. The idea is that the number of compartments
can be adjusted to the needs, as well as the size of individual compartments. In this example all compartments are
the same, but if needed size of compartments can be changed and does not need to be uniform.
To protect the prepared medicine outside, the door of a locker can only be opened after a patient has proven his
identity by scanning a card or a QR code. To ensure that the prepared medicine is not mixed up by the pharmacist,
the inside door also locks after the medicine is prepared and put inside the locker. In this way only the corresponding
patient can collect the medicine, or in an event of a cancellation, or if its not collected at the predetermined time, the
pharmacist can void the request and the inside door will open. Patients can, using the application, extend the time to
get a medicine, and/or cancel the request.
The idea is to build a prototype of the PMVM around a Raspberry PI development board. This board has been
chosed by the authors because of the availability of additional components needed for the prototype. To provide all
of the functionalities needed, the components and their purpose are presented in Table 4.
To build an intuitive, and easy to use control interface a touchscreen that can provides us with both display and
control ability can be used. For the Raspberry PI there are different diagonal touchscreens that are inexpensive and
easy to use. There is an issue when two screens need to be used simultaneously, , one for the inside and one for the
outside operations of the PMVM, as the Raspberry PI will have a hard time working with two screens. The solution
of the authors is to use two Raspberry PI development boards, where one is the controller and the other one is
peripheral. The peripheral controls the patient side of the PMVM, and sends requests to the controller. The
controller connects to the services and validates requests from the peripheral.
Having both the controller and the peripheral, enables the delegation of tasks between them for the better
optimization and user experience of the PMVM. This feature provides the faster development of the proposed
prototype. The distribution of tasks can also increase the security of the machine, where the peripheral is used for
low security tasks, and the controller is used for the crucial tasks.
Two use case scenarios of the PMVM will be described in the following section. The first one is shown in Fig. 10.
In this scenario, the pharmacy is ready to receive the request from the patient. Once it receives the request, a
pharmacist prepares the requested medicine, prints out any needed additional instructions, selects an unoccupied
locker, and places the requested medicine in the locker. The door is automatically locked as soon as it is closed from
the inside of the pharmacy and a notification is sent to the patient at the same time. When the patient arrives at the
PMVM, he/she needs to provide an identification by scanning an ID card, or a QR code from a prescription. If the
medicine needs to be paid, information is shown on the screen, and the payment processing is initiated. The payment
can be done via card, e-Banking, IPS QR (a payment system is implemented by the National Bank of Serbia), or in
cash. After the payment, the outside door of the compartment that holds the patient’s medicine is opened and after
collecting the medicine and closing the outside door the transaction is finished. This was the best case scenario.
If for any reason a pharmacy cannot fulfill an order, it can then notify the patient about it, which is shown in Fig.
11. There are two possibilities regarding the inability to fulfill an order. The pharmacy either does not have the
prescribed medicine, or it has only some of the medicines. In both situations the PMVM notifies the patient about
the state of order. If the pharmacy does not have the requested medicine, the patient can then send a request to the
other PMVM. If the pharmacy can fulfill a partial order, then the patient can decide if he/she wants to accept the
partial order or reject it. If accepted the partial order is processed as in the previous use case scenario. If rejected, the
patient can send a request to the other PMVM.
Fig. 11. The scenario where an order cannot be fulfilled.
7. Discussion
During the development of PMVM concept the data from HCN, PIN were used. The goal of the authors is to
develop the general concept of PMVM, which could be applied in many countries, not only in RS.
The proposed concept of PMVM can be applied fully in RS. The health care system of RS is mainly based on
state HCIs which are divided into three levels: primary (infirmaries which are spread throughout the whole country),
secondary (hospitals which support more specialties), and tertiary (highly specialized hospitals, usually as a part of
clinical centers). Patients can get prescriptions only from the primary health level institution. Starting from 2010 all
primary health level institutions have MIS, in which all prescription data are saved in patients’ EHR and sent to the
central state repository (“e-Recept” service in RFZO [21]) which is available to all state pharmacies and some
private ones (Fig. 12). When patients need to get medicines, they should go to any pharmacy, identify themselves
(each patient has the health care card and unique health care number (LBO) as well as personal ID card) and pay for
medicines, when needed. A special treatment is provided for chronic patients who have prescriptions for a 6-month-
long therapy (which is extended during the COVID-19 pandemic to 9 months). In this period chronic patients should
go to physicians only once and repeat it after 6 or 9 months. It is an important feature that directly reduces the
number of HCI visits and reduces the chance for the viral infection of patient during the visit at HCI [11].
Fig. 12. Health care system in RS.
Each prescription contains information about the patient, the physician who prescribed the medicine, the date of
prescription, the diagnosis, the name of medicine, the dose, amount and frequency of taking and the way of taking
the medicine. Fig. 6 shows the paper version of prescription (in Serbian) while Fig. 13 shows the electronic version
of prescription in our MIS MEDIS.NET (in Serbian). Table 5 presents the translation of most important terms of
prescriptions from Serbian to English, which can be found in Fig. 13. Information from pharmacies go to the RFZO
centralized system i.e. for each prescription RFZO has information when medicines are collected by the patient.
Fig. 13. Electronic version of prescription in MEDIS.NET.
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 a 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 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.
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., realization of several variants of PMVM such as: hybrid PMVM and
extended PMVM, which will be described below.
By analyzing the working hours of pharmacies, it can be concluded that 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 (these are types of pharmacies A, G, H, I, J), as well as in cases when MVM
is not part of the pharmacy, so filling PMVM with medicines is periodic. In order to meet the requirements in the
best possible way, it would initially be necessary to perform an analysis about the medicines which are most
commonly used. Then periodically for each specific MVM, the medicines 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 medicines too. Practically,
the PMVM device is the same but software application for ordering medicines must be realized .
Besides social distancing in the times of pandemic, PMVMs provide some other benefits. Some of positive effects
of using PMVM and their variations are:
PMVMs offer patients a 24/7 access to prescribed medicines,
PMVMs significantly expand access to medicines when pharmacies are closed,
PMVMs save patients time by informing them that a required medicine is not available in a particular
pharmacy,
PMVMs improve the productivity and work quality of pharmacists by reducing the number of present
patients at the pharmacy,
PMVMs facilitate access to medicines for people in rural areas.
After building a proof of concept prototype of PMVM, the data available and newly gathered data for the 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 realized.
8. 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 lack of equipment and software for 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 needed to change the basic concept of MVM. In this
paper a new type of MVM is proposed, the so-called Personalized Medicine Vending Machines (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 where patients can get prescribed medicines without entering pharmacies, which will
significantly reduce social contacts inside pharmacies and reduce the spread of the virus.
The proposed modification of MVM concept is adapted to the health care system organization in RS, however, it
can be used in all countries with a similar health care system.
Besides social distancing there are also some other positive effects of using PMVM: patients can get medicines
24/7, patients do not have to visit multiple pharmacies searching for an appropriate medicine, pharmacies can work
more efficiently (inexpensive distribution of medicines and increased number of patients who can be served), rural
areas can be better covered with medicines, etc.
In general, the use of proposed PMVM can be considered as a highly important service (in the health care
domain) provided by smart cities, since it will make medicines accessible to its citizens 24/7, thus improving the
quality of their life as well. Based on the proposed PMVM concept, a prototype in cooperation with PIN for the real
use will be implemented.
Acknowledges
The authors would like to offer their special thanks to all the staff at the Laboratory of Medical Informatics at the
Faculty of Electronic Engineering in Nis. The special thanks are extended to the Health Center Nis and Pharmacy
Institution Nis for enabling the use of the real medical data for the research that is presented in this paper.
Authors contributions
- Dimitrije Jankovic extracted the data from PIN and performed analysis and data interpretation,
- Andjelija Djordjevic and Aleksandar Milenkovic extracted the data from HCN and MEDIS.NET and
- All the authors revised and made a final approval of the submitted version.
Conflict of interests
Medical information system MEDIS.NET, as a source of data used in the submitted work, is a result of a joint
project of the Laboratory of Medical Informatics and Health Center Nis. As a commercial product, it is sold to other
Dragan Jankovic, Aleksandar Milenkovic and Andjelija Djordjevic received personal fees as full members of
Laboratory of Medical Informatics. Dimitrije Jankovic received personal fees as an employee of Pharmacy
Institution Nis.
Funding sources
This work has been supported by the Ministry of Education, Science and Technological Development of the
Republic of Serbia.
Summary Table
- Vending Machines are used in various domains, such as for selling food, various drink, cigarettes,
medicines, etc. Vending machines are also used for medicines, but incomparably less than in other
areas.
- Due to the COVID-19 pandemic, social distancing in closed spaces is implemented worldwide as one
of the most significant measures in combating the pandemic, making the use of vending machines
even more important, since users can obtain the necessary items outdoors. In addition to the financial
effects, human health appears as the dominant reason for using MVMs.
- Especially during the pandemic, a lot of people visit pharmacies in order to get necessary medicines
for their therapy or to strengthen their immune system, which can contribute to spreading the virus
faster, due to the lack of social distancing in pharmacies which are high risk places.
- The modified version of Medicine Vending Machine for the personal use of each patient can
contribute to lowering the number of patients present in pharmacies, since they would be able to
obtain the medicines necessary for the therapy from the machine in front of the pharmacy, outside.
- The upgrading of Medicine Vending Machine to Personalized Medicine Vending Machine can
significantly increase social distancing by reducing patient to patient and patient to pharmacist
contacts.
- By implementing Personalized Medicine Vending Machine, patients would be able to get the
medicines necessary for their therapy, as well as to buy some additional medicines, which do not
- Realization of Personalized Vending Machine concept requires: medical information systems in HCI,
centralized repositorium for medicine prescriptions and access of all pharmacies to the repositorium.
- A Personalized Medicine Vending Machine would also be located in remote areas, such as rural
areas, without the pharmacy. They would be periodically supplied with necessary medicines. This
feature of Personalized Medicine Vending Machine would increase the quality of life of the people in
rural areas.
References