Indonesian Journal of Electrical Engineering and Computer Science Vol. 9, No. 1, January 2018, pp. 164~169 ISSN: 2502-4752, DOI: 10.11591/ijeecs.v9.i1.pp164-169 164 Improving Medical Adherence using Smart Medicine Cabinet Monitoring System S. A. Ishak, H. Zainol Abidin*, M. Muhamad Faculty of Electrical Engineering, Universiti Teknologi MARA, 40450 Shah Alam, Selangor, Malaysia Article Info ABSTRACT Article history: Patients at home may forget to take their medicines on time, miss doses or even take overdoses. This particularly applies to the elderly at home. Hence, Received Aug 13, 2017 this paper presents a monitoring system to improve the medical adherence Revised Nov 11, 2017 which is based on Internet of Things (IoT) concept known as smart medicine Accepted Nov 27, 2017 cabinet monitoring system. The system is proposed to remind the elderly to take their medicines on time, to ensure that the elderly have taken their medicines and to notify the family member of the elderly about their Keywords: medication intake. This paper presents a method of monitoring the medication intake of the elderly which is based on IoT concept to display the Elderly data on the web database. The system uses an Arduino microcontroller, a Internet of Things toggle switch, LCD Display, limit switch, alarm system and a Wi-Fi module. Medical adherence The developed system is seen to be another alternative that would help the Smart cabinet elderly especially who are living alone for their medication adherence to home-based treatment. . Copyright © 2018 Institute of Advanced Engineering and Science. All rights reserved. Corresponding Author: H. Zainol Abidin, Faculty of Electrical Engineering , Universiti Teknologi MARA, 40450 Shah Alam, Selangor, Malaysia. Email: [email protected] 1. INTRODUCTION Taking prescribed medication with the exact dose and time as instructed is mandatory for any patient undergoing medical treatment. However, it is often that patients neglect to take their medication as directed. The condition such as in-taking of irregular medicine due to patient’s busy schedule, complication taking large number of medicines at a time and lack of knowledge about proper use of medicines can lead to non-adherence of medications [1]. Medication adherence is the patient’s conformance with the provider’s recommendation with respect to timing, dosage and frequency of medication-taking during the prescribed length of time. It is estimated that three out of four Americans do not take their medicines as directed [2]. Taking medication correctly may seem like an easy or personal thing, but not obeying or not taking medicines as directed is a common problem. Most people do not realize the consequences of non-compliance. Some people may not take their medicines as directed as they forget. However, there are many methods and technologies available to solve this problem. The Internet of Things (IoT) applications is one way of home monitoring especially for elderly people with special needs or chronic illnesses [3]. Medicine reminder system provides another alternative or technology that would be able to improve the medical adherence among the elderly who live independently. It also represents a substantial contribution to the efficiency of home-based treatment where family members are the only responsible persons to help the patients [1]. Thus, the family members of the elderly would not have to keep on reminding their parents to take their medication as directed by the doctor. Furthermore, for the elderly who might have an Alzheimer Journal homepage: http://iaescore.com/journals/index.php/ijeecs Indonesian J Elec Eng & Comp Sci ISSN: 2502-4752 165 Disease (AD), taking medicines on time would be a problem for them. Those who are suffering of AD might be confused whether they have taken their medicines or not, or how often or how many or which medicine should be taken. The medication monitoring system addresses the needs of chronically ill patients who require long- term medication. As the cost of the in-home medical care upswings, every individual will always look for a well-organized device to handle their medicines properly. Even though some medication reminders are available, most of them are too complicated for the elderly to use [1]. There are several ways proposed by the medical practitioners and researchers to improve the medication adherence among the patients. One of the popular methods is a reminder through Short Message Services (SMS). Pernell et al. [4] test the two-way SMS medications reminders for patients with Sickle Cell Disease (SCD) with and without asthma while Morton et al. [5] found that it was effective to use the SMS reminder system for children with Cystic Fibrosis (CF). Adler et al. [6] study the used of SMS as a reminder for Cardiovascular Disease (CVD) patients. Priyadharshini et al. [1] discusses the importance of taking medicines on time at the precise quantity especially for illiterate people. The paper proposed an Automatic Medication Reminder (AMR) system that uses a normal 4x4 matrix keypad, Microcontroller (Master IC & Slave IC), LCD display and Real Time Clock (RTC) module and alarm system to remind the patients to take the proper dosage at the right time. The AMR system is a low-cost device and it is easy to be handled by the elderly. However, there is a setback where it is unable to ensure that the patients have taken their medicines. An online reminder system was proposed in reference [7] where a report is generated in an electronic health record to identify patients prescribed with a new drug from a doctor in one of the primary care clinics. Patients will be reminded through the online system if they fail to collect the new prescription within a week. It is found that the nonadherence rate decreased from 65.5% to 22.2%. Research presented in [8] describes the development, prototyping and evaluation of Radio Frequency Identification (RFID) based Medication Adherence Intelligence System (RMAIS). This system is an automatic medication management and passive remote monitoring for outpatients where it provides a practical and economical means for ordinary patients to manage their own medications. This system is made up of several parts, which include a motorized rotation platform, scale RFID reader, user interface panel and microcontroller. It can support up to seven medicines. However, the prototype is uneconomical, and it needs skilled persons to operate it. Jingjing et al. [9] introduced an architecture of the four sections of the IoT oriented for home health monitoring service. A smoothness index method is applied to the monitoring of human health index where data from body temperature detection experiments verified the feasibility of the four sessions system. This paper proposes a smart medicine cabinet monitoring system to help the elderly with their medication intake. The results of the contributions of this paper are to remind the elderly to take their medicines on time, to ensure that the elderly have taken their medicines and to notify the family members of the elderly about their medication intake. Elderly will be reminded on their medication intake and always be monitored by their children or family members remotely to avoid improper prescription taking. This work would also beneficial to the doctors to monitor their patients. Orand et al. [10] stated that an affordable and expandable monitoring and actuating system is beneficial to medical professionals for dealing with the needs of patients . The rest of this paper is organized as follows. In Section 2, the development of the proposed system is elaborated in detail while Section 3 dwells with the prototype of the system. Finally, Section 4 concludes the paper and recommends future works that can be carried out. 2. SMART MEDICINE CABINET MONITORING SYSTEM Figure 1 shows a block diagram of the system. Two components are used as the inputs in this system. The LCD will prompt the user to press the switch and a toggle switch will act as the main switch to start the timer. The medicine cabinet where all the medicines are stored in it will act as the ‘sensor’ to detect whether the user has opened the cabinet or not. An Arduino MEGA 2560 is used in this project in which all the instructions and commands are executed and will be interpreted. When the timer expires, the alarm system sounds a buzzer; when the medicine cabinet is opened, the alarm system turns off the buzzer. Once the alarm system is activated, it sends data that is processed and analysed and displayed on the LCD. The output is shared onto the web database via Wi-Fi Module which is connected to Arduino MEGA 2560. The prototype of the system is shown in Figure 2. Figure 3 depicts the flowchart of the system’s operation. Initially the microcontroller is interfaced with the switch. The process is then followed by the user being asked to press the main switch in order to start the system. Once the main switch has been pressed, the timer will run according to medication schedule that has been set in the code. The buzzer is activated when it is time to take the medicine and once the user Improving Medical Adherence using Smart Medicine Cabinet Monitoring… (S. A. Ishak) 1 6 6 ISSN: 2502-4752 opens the medicine cabinet, the push button switch attached to the cabinet will deactivate the alarm system. At the same time, LCD will display a message that the medicine has been taken. The information of user taking medicines is also sent to Web database to notify the family members that the elderly has taken the medications. The data is shared to the database via Wi-Fi module ESP8266. Input Microcontroller Output Switch Buzzer Arduino LCD MEGA 2560 Medicine Web Cabinet Database Figure1. Block diagram of the system Figure 2. Prototype of the system Figure 3. Flowchart of the system The Arduino Mega 2560 [11] is a microcontroller board based on the ATmega2560 and it has 54 digital input/output pins of which 14 pins can be used as PWM outputs, 16 analog inputs, 4 UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header and a reset button [12]. The board can be operated on an external supply of 6 to 20 volts but the best recommended range is between 7 to 12 volts. The ATmega2560 has 256KB of flash memory for the codes which comprises of 8KB memory for the boot loader, 8KB of SRAM and 4KB of EEPROM. Each of the 54 digital pins can be used as an input or output using pinMode(), digitalWrite() and digitalRead() functions. Indonesian J Elec Eng & Comp Sci, Vol. 9, No. 1, January 2018 : 164 – 169 Indonesian J Elec Eng & Comp Sci ISSN: 2502-4752 167 Figure 4. Arduino MEGA 2560 Figure 5. Wi-Fi module ESP8266 ESP8266 WiFi module [12] is a WiFi serial transceiver module. Its small size and low cost features makes it suitable to be used as part of the sensor nodes. It operates on 3.3V and needs current up to 250mA. Current consumption is quite big; thus it is usually not powered by battery. To provide a common power, voltage adaptation is required, because the ESP8266 module uses 3.3V while most Arduinos work on 5V. A simple power circuit is shown in Figure 6. It uses a Texas Instruments LM1117 Linear Regulator [13] and 1kΩ resistors divider to provide appropriate voltages. The database used in this project is Oracle’s MySQL, database management system that uses Structured Query Language (SQL). For the real-time monitoring system, this data is stored in a MySQL database provided by XAMPP-phpMyAdmin. Figure 6. Wi-Fi module ESP8266 power circuit 3. FUNCTIONALITY TEST A functionality test was carried out to ensure that the system works according to specifications. Figure 7. Initially users are asked to switch on the device Improving Medical Adherence using Smart Medicine Cabinet Monitoring… (S. A. Ishak) 1 6 8 ISSN: 2502-4752 As depicted in Figure 7, users are asked to activate the system. The timer is set and the buzzer will be activated once the time for the elderly to take the medicine has been reached. Once the cabinet door is opened, the limit switch that is attached with the cabinet will trigger the alarm system to deactivate. The LCD will then display that the medicine has been taken as illustrated in Figure 8. Figure 8. Message on LCD once medicine is taken The data is then shared to the database via Wi-Fi module ESP8266 which is connected to the Arduino by a TCP/IP protocol stack. The elderly family members will be notified on the medicine intake through the web database as shown in Figure 9. If there are no new records in the particular time at which the medicines are supposed to be taken, their family can detect the abnormal activity of their parents. Figure 9. Keeping track of data using Web Database 4. CONCLUSION AND FUTURE WORK This paper has presented a health monitoring system to improve the medical adherence among the elderly who live independently. Currently, there are some medication reminder systems available. However, there are some drawbacks that can be improved such as being too expensive or difficult to use. In addition, most of them do not have notification feature. The developed system presented in this paper reminds the elderly to take the medicine on time as well as notify their family members so that they can monitor the elderly medicine intake. Based on the functionality test results, all the objectives stated have been successfully achieved. The effectiveness of keeping track of data via web database has been demonstrated. The results show that it is possible to monitor the medication intake of the elderly by just opening the medicine cabinet. This is the initial stage of developing the system. It may be further extended to cater for different types of medicines with different time intake. A smartphone app may also be developed for the monitoring system. The system can also be expanded to allow only the respective patient or elderly person to open the Indonesian J Elec Eng & Comp Sci, Vol. 9, No. 1, January 2018 : 164 – 169 Indonesian J Elec Eng & Comp Sci ISSN: 2502-4752 169 medicine cabinet, such as providing thumb print detection. This is to ensure that the medicine is stored safely in the cabinet to keep it out of reach and out of sight of small children. ACKNOWLEDGEMENT This work is funded by the Ministry of Higher Education (MOHE) through the Research Acculturation Grant Scheme, RAGS (600-RMI/RAGS 5/3 (16/2015). REFERENCES [1] R. Priyadharshini, S. Ramya, S. Kalaiyarasi, S. Mithuna, and Manivannan. L, Suthanthira Vanitha. N, “A Novel Approach of Microcontroller based Automatic Medication Reminder (AMR) System for Patients,” Int. J. Eng. Res., vol. V4, no. 4, Apr. 2015. [2] “Medication Adherence - Taking Your Meds as Directed.” [Online]. Available: http://www.heart.org/HEARTORG/Conditions/More/ ConsumerHealthCare/Medication-Adherence--- Taking- Your-Meds-as- Directed_UCM_453329_Article.jsp#. [Accessed: 13-Jun-2017]. [3] A. Rghioui and A. Oumnad, “Internet of Things: Surveys for Measuring Human Activities from Everywhere,” Int. J. Electr. Comput. Eng., vol. 7, no. 5, pp. 2474–2482, Oct. 2017. [4] B. M. Pernell, M. R. DeBaun, K. Becker, M. Rodeghier, V. Bryant, and R. M. Cronin, “Improving Medication Adherence with Two-way Short Message Service Reminders in Sickle Cell Disease and Asthma,” Appl. Clin. Inform., vol. 8, no. 2, pp. 541–559, 2017. [5] R. Morton, H. Elphick, E. Edwards, W. J. Daw, and N. S. West, “Investigating the feasibility of text message reminders to improve adherence to nebulized medication in children and adolescents with cystic fibrosis,” Patient Prefer. Adherence, vol. Volume 11, pp. 861–869, May 2017. [6] A. J. Adler, N. Martin, J. Mariani, C. D. Tajer, O. O. Owolabi, C. Free, N. C. Serrano, J. P. Casas, and P. Perel, “Mobile phone text messaging to improve medication adherence in secondary prevention of cardiovascular disease,” in Cochrane Database of Systematic Reviews, A. J. Adler, Ed. Chichester, UK: John Wiley & Sons, Ltd, 2017. [7] D. E. Kerner and E. L. Knezevich, “Use of communication tool within electronic medical record to improve primary nonadherence,” J. Am. Pharm. Assoc., vol. 57, no. 3, p. S270–S273.e2, May 2017. [8] C. McCall, B. Maynes, C. C. Zou, and N. J. Zhang, “An automatic medication self-management and monitoring system for independently living patients,” Med. Eng. Phys., vol. 35, no. 4, pp. 505–514, Apr. 2013. [9] Y. Jingjing, H. Shangfu, Z. Xiao, G. Benzhen, L. Yu, D. Beibei, and L. Yun, “Family Health Monitoring System Based on the Four Sessions Internet of Things,” TELKOMNIKA (Telecommunication Comput. Electron. Control., vol. 13, no. 1, pp. 314–320, Mar. 2015. [10] A. Orand, Y. Tomita, S. Okamoto, and S. Sonoda, “On the Design and Development of a Zigbee-Based Multimodal Input-Output Monitoring-Actuating System,” Int. J. Electr. Comput. Eng., vol. 5, no. 5, pp. 1143– 1152, Oct. 2015. [11] Mantech Electronics (Pty) Ltd., “Arduino Mega 2560.” [Online]. Available: http://www.mantech.co.za/datasheets/products/A000047.pdf. [Accessed: 13-Jun-2017]. [12] SparkFun Electronics, “WiFi Module - ESP8266 - WRL-13678 - SparkFun Electronics.” [Online]. Available: https://www.sparkfun.com/products/13678. [Accessed: 13-Jun-2017]. [13] Snos412n –, “LM1117 800-mA Low-Dropout Linear Regulator,” 2000. Improving Medical Adherence using Smart Medicine Cabinet Monitoring… (S. A. Ishak)