Keywords

1 Introduction

Today in the domain of the health care of patients the biggest mistakes happen because the obligations and the everyday life lead people to the lack of care for themselves and they do not follow the doctors’ orders. Patients are people of a different profile. No matter if they are students, businessmen, programmers, housewives, retirees or children, they all can be equally careless about their health. Life, as is lead today, is full of responsibilities and stress, which makes people prone to a variety of diseases. In desire to maintain health using modern technologies we are getting a chance to, by relying on our smartphones, stay healthy and in good shape.

In health care the important problem is that the patients often forget to take the right amount of medicines in the right time. It is important to mention that, for example, taking antibiotics is time dependent since if the medicine is not taken in the right time, its effect is annulled. The situation is similar with some other medications. In order not to depend on other people to remind them about taking the medicines, patients need to adopt taking the medicines as a part of their routine, while not allowing anything to distract them or to make them forget about the medicines. A certain percentage of people thus use technologies like the reminder, most frequently the alarm on their smartphones.

As a solution of the mentioned problem is imposed the idea of the Android application which goal would be to remind the patient to take the right medicine and the right amount, as well as to warn them that the pills or capsules are running out and that the patient should visit the chosen doctor and get the new prescription. The prescriptions must be valid and taken from the medical information system of the health institution where the user is being treated. MEDIS.NET is a medical information system developed for the needs of the institutions of primary health care. It is used in more than 25 institutions of that type in the Republic of Serbia [1, 2]. PersonalMedicationReminder application downloads prescriptions for the certain patient from the electronic medical record from MEDIS.NET medical information system. Patients should be enabled to, besides getting the predefined values, customize on their own the number of tablets per box, the period of taking the medicine, recommended dose (for certain medications that are taken as needed or tablets such as vitamins or diet supplements is already made possible to independently change the default dose or period recommended by the doctor), as well as to set the alarm for the next medicine for all the prescriptions that the application gets from the server. Also, for over-the-counter medicines, patient should be enabled to input all the important data for the medicine bought at the drugstore and to set the alarm for it. It is also necessary to make possible the permanent deletion of the prescription at any moment if the user wants that, or to temporarily turn the reminder off for a medicine taken as needed. In this way, the possibility of taking the wrong dose of a certain medicine or not taking it can be brought to a minimum.

In this paper is presented the Android application in which, by incorporating the electronic reminder with an alarm, the solution to the described problem was implemented. While some applications are developed in such a way that for their use they need to be connected to an additional hardware, for using the PersonalPillsReminder application it is enough for the user to stick to the prescriptions and medicines with a simple interaction with the application and minimal time spent. Patients do not have to remember the time and the amount of the medicine that they are to consume. Instead of them, the smart mobile application, in which the alarms are set for the time when the right dosage of the right prescribed medicine should be taken, is taking care of that. Authentication for the access to the application and the server where the medical record of the patient is stored is done through the personal identification number of the insured (LBO) and the PIN which are stored in the database on the server. All the communication with the server is protected by using the HTTPS protocol. When the alarm starts, the notifications are shown to the user on the display of the smartphone until the he confirms taking the prescribed dose of the medicine. The number of the remaining tablets for each medicine is stored separately. The system is developed to provide the simple navigation and user interface.

Throughout this work will be presented the earlier researches and conceptual description of the solutions. The architecture and the design of the Android application PersonalMedicationReminder and its components were implemented using Eclipse development environment and Restful web service [2, 3]. After the evaluation of the proposed solution, the directions of the further researches are shown and the conclusion was made.

2 Earlier Research

Applications that represent a kind of medical reminders, according to the functionality they offer, are sorted into three main categories:

  • SMR (Simple Medication Reminders): applications that offer basic functionality of remembering prescriptions, notifying the user, setting the alarm, choosing the type of notifications and accompanying sound effects, postponing the alarm, etc.

  • AMR (Advance medication reminders): provides additional options like the time zone change support, overdose protection, different description, instructions, etc.

  • MMA (Medication management apps): basically AMR applications that support multiple user accounts. They enable users to store important information, contacts of the chosen doctors, reminders for the future checkups, etc. [4].

The usage of the applications in the field of health care and protection is increasing every day. Some of them need additional hardware as sensors, RFID tags or motion detectors [5]. Many attempts to reduce the administrative mistakes in treating patients were focused on the development of the medical dispensers. Below are given the examples of the applications which are results of the earlier researches.

MyMediHealth application is the reminder for children. It is performed on the smartphones and it enables configuring reminders for notifying the user about the medicine that is scheduled at that time [6, 7].

Wedjat represented an attempt of the integration of the support in the health care and wireless computing. The application was conceptualized so that is prevents patients from making mistakes caused by administration. Main functionalities are: reminder of the necessary daily intake of the medicines, instructions related to the allowed intake of the medicaments and storing the data about the consumed medicines [8].

Med Minder application is a simple and free solution envisioned as a planer application which main flaw was that it took to much manual settings thus too much time [9].

Medical Reminder and Healthcare. Android application’s goal is to remind the patients with the ringing of the alarm to take their dose of the medicine. Through this application they could see the contacts of the doctors and hospitals, in order to schedule an appointment. It is possible to set the date, the time of the alarm and the instructions for multiple medicines at the same time. Besides the alarm, the user would get the notification via SMS or e-mail [10].

Medication Reminder System is also an Android application for patients. It automatically sets the time when the patient should take the next dose of the medicine. Those data the application takes from the prescription of the patient and in that way makes the possibility for mistakes that the patient can make by setting the time by himself smaller [11].

Majority of the applications on the market offer reminders that are based on timers. Some of these applications allow only one notification for a certain medicine a day, and do not support time intervals such as reminders every few hours or every few days. Small number of applications has the option of postponing the alarm for certain medications, which is bad if the user does not react immediately, because he can forget to take the medicine. The weak point of the current systems is that the user must input all the medications he uses alone, which takes a lot of time. There is no service that stores the original prescriptions by medical institutions. There are no notifications for the patient that his medicines will run out in a certain number of days and that he should visit the doctor for the new prescription. Because of the manual input of the prescriptions there is a big possibility for mistakes which could result in big problems in patient’s treatment. Bigger problem present the reminders that were notifying the user to take the medicine at a certain time, but without the doctor prescribed dose and periods, which again can cause a significant damage for the patient.

3 Proposed Solution

Studying the previous solutions and the needs of the users, a set of functionalities that would in the most adequate way be made into an Android application was listed. Application would on its own download the prescriptions from the server of the medical institution or let the user input the medications that are bought over-the-counter. It would make possible for the user to get the prescribed therapy (one medicine per prescription) and to create the events through which it would notify the user that it’s time to take the therapy.

For starting the application, it would be necessary to authenticate the patient by inputting the LBO (personal identification number of the insured) and a PIN (which is provided by the doctor). It should be made possible (configurable) to memorize the credentials in the memory of the telephone so that the users would not have to input them every time, if they want to.

From the system of the health institution, it is needed to deliver to the mobile application the exact date, as well as the prescriptions for the authenticated user. Each prescription should have the diagnosis, medicine (code, name, strength, unit of measure) and the frequency of taking the medicine. Each medicine has a certain amount of tablets/capsules per package (e.g. 20 capsules of a certain antibiotic in the package).

That number is different between different producers, so, the patient should input the number of tablets in the package taken from the pharmacy each time they get the new prescription. The user should be reminded that he had consumed the whole package a few days earlier so that he would have enough time to visit the doctor for further treatment (this option should be configurable, e.g. notify 1 day earlier, 7 days earlier). The user would be able to change the number of the remaining tablets/capsules in the package (lost one tablet, the package in gotten in the pharmacy contained 20 instead of 30 tablets, etc.)

The problem would be if the user does not take the medicine in the scheduled time (e.g. the user does not have the medicine with him, does not see the notification in time, sees but forgets to take the medicine). Depending on the medicine, it can be taken immediately, or taken as scheduled. If the medicine should be taken as soon as possible, than it is necessary to change the time for the next taking of the medicine (if the medicine is taken every 8 h, than it is necessary to take the medicine from that moment on every 8 h). There are some medicines (e.g. vitamins) that can be taken at any time of the day, but it is important to take them that day. Then, there are medicines that are taken according to a scheme (e.g. 2 tablets in the morning, 1 tablet in the afternoon, 0.5 mg in the evening, and a different scheme for each day). The doctor can tell the patient to take the medicine every six hours, but after two days to take it every 8 h if he feels better. For that reason, the user should be given the option to change the frequency of taking the medicine (the default frequency should be suggested which the user would be able to change as needed).

The important request is that the notification about the therapy must be delivered always to the patient, even if there is the power or the internet connection outage. The time of the next taking of the therapy shouldn’t be dependent on the time zone.

When the application is started for the first time, the service for downloading the active prescriptions would be summoned if the user chooses to turn on the reminders. It is necessary to define the time after which the application would download the prescriptions from the server by itself. For example, the application would once a day download the status from the database of the medical information system. That option would be configurable (e.g. every 8 h, or every 24 h, etc.). It would be good to enable the option for the user to reload the prescriptions on request.

There should also be the option to delete the prescription from the application. The user would be able to change at any time: the frequency of taking the medicine, number of tablets in the package, in how many hours should he take the medicine, the total number of tablets per package, how many days earlier should he be notified that he needs the new prescription and to download new prescriptions not older than the configured number of days.

The background service would take care about the time when the alarm should be activated and for which prescription, as well as when the alarm should remind the user when to get the new prescription. It would start automatically when starting the phone. The data about the prescriptions that are downloaded via the service, time for taking the next medicine, and everything else relevant for the prescription would be stored in the phone’s memory and reached from there, as long as the application reloads the list searching for the new prescriptions from the server.

Frequency in taking therapy can be: once a day every other day, once a week, once a month, once a year, as needed and according to a scheme. When the prescriptions are downloaded for the first time, the user is immediately notified to input the number of tablets/capsules for the new prescriptions and to activate the alarms. The user should decide whether he would take the therapy according to the defined scheme (the determined number of hours) or he would adjust the time (input the time in hours or minutes). The same is applicable to the amount of the medicine used.

When the alarm starts when it is time for taking the medicine on an Android telephone a notification would appear (sound, vibration and light). If the user ignores the notification it would repeat every 15 min. When the patient opens the notification and clicks on it, a prescription would open and the user would have two options: to confirm taking the medicine or to postpone the alarm for some time. After a certain time of taking the therapy when the number of tablets would be smaller than the configured number of days, the user would be notified to schedule a new doctor’s appointment. In each moment the user would be able to delete each prescription individually, to turn off the notifications for it or to delete all the prescriptions from the list. When the prescription is marked for deletion, it will remain on the list for another 48 h if the user wants to undo the deletion, and after that it will be deleted from the application. No matter if the prescription was downloaded from the database of the medical information system of the health institution or the user input the data by himself, the alarms and the notifications will function just the same.

4 Implementation and Solution Architecture

The client application was developed for Android API 3.0 and higher. The development environment used for this purpose was Eclipse Juno 4.2 and Java programming language.

A client application PersonalMedicationReminder, which communicates with the server of the medical information system via Restfull web service for downloading prescriptions, was developed for Android devices. Basic functionalities illustrated in the example of the demo application from mHealth (abbreviation for the term used to describe the usage of mobile devices and services for the practice of medicine and public health) field are:

  • The service starts upon starting the phone.

  • LBO and PIN can be but do not have to be stored in the phone’s memory, depending on whether the user wants to input them every time he checks or updates the prescriptions in the application.

  • Once the LBO is input and the prescriptions are downloaded, the user cannot input a different LBO before the previous reminders are deleted.

  • All the prescriptions are remembered in the phone’s memory.

  • The service performs checks for new prescriptions not older than the date set by the user.

  • Frequency of updating the prescriptions and notifications about the lack of medicines the user configures in the application.

  • The alarm and the notifications for the medicines function independently from the Internet connection.

  • The user gets a predefined period for taking the medicine which can be customized. It is necessary to input the number of tablets in the package to start the reminder for the medicine.

  • If the battery on the phone is drained, and the telephone is turned off in the moment when the notification about the therapy should appear, the user will be notified about it as soon as the phone is turned back on.

  • When the user clicks on the notification the application is started, and the user can postpone the alarm or confirm that he took the medicine and set the alarm for the next taking of the therapy.

  • The prescription can be marked for deletion and will be permanently deleted from the list after 48 h. During that period, the user can restore the marked prescription.

  • When the user is left with less than, for example, 7 days of medication supply (the predefined number of days in the application), he is notified that he needs a new prescription. The user also gets a similar notification when the whole package is consumed (Fig. 1).

    Fig. 1.
    figure 1

    PersonalMedicalReminder-screen with prescription data

The Fig. 2 shows the organization and the architecture of the system. In the architecture there is: a service that works in the background, a layer which deserializes the data from the server, processes them and stores them in the application and a U/I component for setting the changeable parameters of the service and for the interaction of the user with the application.

Fig. 2.
figure 2

The system architecture.

The background service starts automatically after turning the Android device on and for the customizable parameters in the stated cases, it sets a predefined value that is stored in the telephone memory. If there is a need for the change of those parameters, it was made possible for the user to input the wanted values, and the changes would be stored in the memory of the device. All the values in the application are stored in the.xml file, in the application folder. It takes care of the reminders related to each separate prescription, activates the alarms and the reminders and sends them further to the user’s interface.

The advanced level, i.e. the level for gathering, deserialization and storing of the data from the prescriptions accepts the given data and classifies them into predefined objects for storing the values used in the application.

The user interface helps in signing in the user for the server of the medical institution, shows the prescriptions and the notification, but it also makes it possible for the user to set the parameters used in the application.

Pictures of the display of the application are shown below.

One of the shortcomings which can be seen in the very beginning is that the reminder must be manually set for each medicine. Since there is no data about the number of tablets/capsules per package on the server of the medical institution, the user must input that number by himself and then start the reminder and the alarm.

One more shortcoming is that the database permanently stores all the prescriptions and does not delete them when the patient finishes the therapy. Due to this, the application must take care about it by itself which prescriptions it would show and which prescriptions it would consider expired. After each taking of the therapy, the number of tablets in the prescription is automatically decreased. The moment when that number is zero, the reminder for the medication is turned off. The prescription stays visible until the user deletes it or until it is older than three months. After three months the service automatically removes the prescription from the list.

5 Conclusion

Methods that are currently used for reminding patients to follow the therapy can be demanding in terms of time and resources, and are based on either the help of the family and friends or on paying the person who would periodically check the patient and take care of him. The automatic planner would enable lowering the amount of mistakes that can happen for previously stated reasons and at the same time it would lead to the quality improvement of the care since it would decrease the amount of time that the patient or the medical stuff would have to spend.

For the development of the application that will be used by majority of people, Android platform is seen as the best solution. Android makes the development of the application easy since Java gives a whole set of libraries. Of course, it is possible to use Java on the other embedded Linux platforms, but there such a wide variety of user APIs does not exist.

In this paper is presented a developed Android mobile application which is simple for use and that helps patients to follow the prescribed therapies. The service is done as a background service and it contacts the sever as often and the user wants it (parameter is possible to set in the mobile application). The prescriptions are stored in the telephone’s memory, while taking very little memory space due to the fact that the data are texts.

Further steps in improving the application would be adding the option for scheduling the appointments with the chosen doctor through the mobile application which will save a lot of time to the user. The default value of the tablets per package could be configurable on the level of application, so that the reminder could be started automatically without waiting for the patient to input the number of tablets for a newly downloaded prescription. For the mobile application to be available to all the patients for the three major smartphone operation systems versions for the iOS and Windows Phone mobile platforms will be developed.