A Review of Medication Adherence Monitoring Technologies †

: Medication non-adherence is a prevalent, complex problem. Failure to follow medication schedules may lead to major health complications, including death. Proper medication adherence is thus required in order to gain the greatest possible drug beneﬁt during a patient’s treatment. Interventions have been proven to improve medication adherence if deviations are detected. This review focuses on recent advances in the ﬁeld of technology-based medication adherence approaches and pays particular attention to their technical monitoring aspects. The taxonomy space of this review spans multiple techniques including sensor systems, proximity sensing, vision systems, and combinations of these. As each technique has unique advantages and limitations, this work describes their trade-offs in accuracy, energy consumption, acceptability and user’s comfort, and user authentication.


Introduction
Human lifespans will continue increases as the average quality of life improves.Evidence of this can be seen in recent reports that highlight the significant increase in aging population, especially in developed countries [1][2][3].As one would anticipate, the global population of people aged 60 years and older will grow by 250% in 2050 as compared to 2013 [4].Likewise, as society ages, long-term healthcare expenditures are projected to increase [5].In order to maintain a healthy aging population, the employment of Assistive Health Technology (AHT) increases [4].Based on this, great efforts are being made towards achieving greater expectations of the quality in healthcare systems [3].There is no doubt that rapid technological advances will revolutionize research in the 21st century in a number of disciplines; namely human health.New approaches to monitor human health, behavior, and activity will be enabled.Medication adherence is an important component of health and well-being, with voluminous studies showing the importance of adequate medication adherence [6][7][8][9][10].
Achieving healthy aging is challenging and thus requires several important strategies.Undoubtedly, correct medication is one of these strategies that are mainly related to the individual's behavior.In addition, it is well-known that medications are the primary approach for treating most illnesses [11].Hence, it requires the individual to take the medication as directed by the healthcare professional [12].However, medication adherence remains a common issue within the healthcare sector, and especially among older adults.In fact, more than 50% of the older people are living with multiple chronic illnesses.Thus, routine monitoring and assessment of the individual's adherence is crucial to improve their health outcomes [13].To be successful, this should be performed using accurate assessment methods.Current assessment methods of medication adherence have advantages as well as limitations.The main objective of the current article is to provide insights into what has been happening with respect to medication adherence monitoring technologies and address open research challenges for further improvement.
This review paper includes articles from journals, and conference papers and proceedings.We excluded articles classified as editorials, book reviews, white papers, or newspaper reports.While searching for papers, electronic databases including Google Scholar, IEEE Xplore, ACM Digital Library, Springer Link, MDPI, and Science Direct, were used.The descriptors we used were "medication adherence", or "medication intake", or "medication monitoring", or "medication compliance" in combination with at least one of others, including "technology", "sensor", "smartwatch", "wearable", "smart bottle", "pill bottle", "pillbox", "vision system", "Radio Frequency Identification (RFID)" and "Near Field Communication (NFC)".The search was inclusive of all years from 2004 through 2018.
Using primarily the full text and also the abstracts, we selected articles discussing medication adherence monitoring technologies and excluded papers discussing intervention applications.The literature review approach used in this paper follows an iterative and incremental procedure [14], and hence found and included new studies about medication adherence monitoring technologies and approaches to the surveyed studies.It is worth mentioning that there have been some commercial efforts in the past few years to develop medication adherence monitors, for example [15][16][17][18][19].However, we do not include these commercially available systems in this review as they are like black boxes and the information surrounding their design is either not published in any publicly available form or that information can be limited.
With the aim of describing how the state-of-the-art technology on medication adherence monitoring can improve healthcare systems, we divide the present paper into several sections based on the main monitoring or sensing technology used.We also compare the different medication adherence monitoring techniques and approaches related to accuracy, energy efficiency, and user's comfort.Given the importance of technology embodiment in medication adherence systems, this paper addresses the need of researchers and investigators of healthcare monitoring in both the engineering and medical societies.This paper is organized as follows; the following section introduces some background about medication adherence concept.In Section 3, existing reviews on medication adherence are discussed.In Section 4, the technology-based systems for medication adherence monitoring are described, and differences among these approaches are highlighted.Section 5 discusses the challenges and future trends associated with these approaches.Finally, the last section concludes the paper.

Medication Adherence
Medication adherence can be defined as the extent to which a person-taking medication adheres to a self-administered protocol [8,20,21].In other words, medication adherence refers to the medication-intake behavior of the patient conforming to an agreed medication regimen specified by the healthcare provider with respect to timing, dosage, and frequency [22,23].From another point of view, non-adherence refers to the failure of taking medication as prescribed, including in-consistency, missing doses, and failing to re-fill the medication.Nonetheless, studies showed that failure to meet the medication-intake regime can result in emergence of drug resistance, accelerated progression of disease, many irrevocable health complications [23,24], and increased mortalities [25].
The benefits of adhering to medication regimens are many.However, for the patient, high adherence to prescribed medication leads to less health complications, more treatments' benefits, and potentially active drug effect in the case of completely treated infectious disease [22].Another benefit is that medication adherence helps in minimizing drug wastage and reducing healthcare costs [26].On the other side, poor medication adherence proven to come with degradation in the health of the patient that may potentially lead to substantial disability or death, especially for patients that are chronically ill [8,27].

Medication Adherence Monitoring
Full adherence to medication is required as the drug can be effective only when it is taken [22].Nonetheless, maintaining strict medication adherence is required that deems maintaining administration timing, dosage quantity, and frequency [28].A wealth of reports revealed that up to 50% of the patients either never fill their medication prescriptions or do not use the medication as prescribed to them in medication regimens [8,27,[29][30][31][32].Unfortunately, poor adherence is prevalent among populations with chronic illnesses [18,33,34], which leads to hospital admission [35].In the US alone, poor medication adherence results in more than 100,000 mortalities annually, as well as hundreds of billion dollars of healthcare spending every year [36][37][38].A number of approaches have been used for the aim of monitoring medication adherence because it has been shown that improving adherence to medical therapy would substantially lead to both health and economic benefits [8].
In general, two key factors should be considered when discussing medication adherence.The first factor is monitoring, which is alternatively referred to as assessment, quantification, measurement, or evaluation.Medication monitoring means using some methods for observing if the patient has taken the medication or not.Hence, the effectiveness of the monitoring method plays a central role.The second factor is intervention.Interventions refer to the means that can be used for improving adherence to medication or correcting it once erroneous or drift is detected.However, the latter is more in the domain of the psychological and social sciences as it requires understanding the cultural, psychological and social factors that affect the patient's behavior [39][40][41], and thus it is out of the scope of this paper.
Methods that have been utilized for measuring medication adherence so far can be broadly divided into two categories, direct and indirect [8,42].Direct methods of measurement of adherence include direct observation of the patient while taking the medication, laboratory detection of the drug in the biologic fluid of the patient (i.e., blood or urine), laboratory detection of the presence of nontoxic markers added to the medication in the biologic fluid of the patient, and laboratory detection of the presence of biomarkers in the dried blood spots [43].Meanwhile, the patient's self reporting, pill-counting, assessing pharmacy refill rates, and using electronic medication event tracking systems are examples of indirect methods of measuring adherence.There is not a gold standard measurement system that fulfills the criteria for an optimal medication adherence monitoring.Each category comes with benefits and limitations at the same time.Direct measures are accurate, but they may require invasiveness, and they are usually expensive.In comparison, indirect methods are less expensive and provide good estimation of the medication adherence.However, these methods relay on the reliability of the user [44].As such, these factors should be taken into consideration when selecting the adherence measurement methodology.

Why Technology-Based Solutions?
Solutions to non-adherence demand the contribution of multiple factors.Nonetheless, the effectiveness and reliability of the monitoring method is central to achieving large improvements in adherence [9,45].Manual approaches require the attention and effort of the patient.Direct biochemical approaches require the patient to report to a clinic for fluid testing.In addition, the interventions associated with biochemical measurements, especially blood sample drawing, are of great burden for patients.
The development of Cyber-Physical Systems (CPS) for healthcare is advancing rapidly [46].More recently, such systems included few sensing and monitoring devices associated with mobile devices such as smart pill bottles, smart watches, smart phones, and wearables.The combination of these smart monitoring devices with interventions that remind the patient in case a deviation is detected has proven to improve medication adherence [47,48].Compared to manual approaches, electronic-based approaches can reduce the cost and effort from the user's interest.In addition, the accuracy of adherence measure, which is of great importance from the healthcare provider's point of view can be enhanced when using electronic-based systems.Furthermore, as we live in the era of the Internet of Things (IoT) [49], where everything is connected to the Internet, a connected health paradigm is becoming a more dominant field [50].One expectation of connected health is the automated capability of communicating the collected adherence measurements to the provider, and the feature of issuing reminder and alert messages based on the processed information [45,51].Moreover, electronic measurement systems can be portable and thus provide timely and long-term monitoring without restricting the user's mobility.In spite of the fact that electronic-based modalities can outperform traditional ones, the majority of electronic-based approaches come with limitations that act as burdens on the users, as we will see in Section 5.In fact, some of them have not achieved much success due to these burdens [42].Based on this, we conclude that there is no optimal electronic-based solution for medication adherence evaluation and, for that, much additional efforts will be required to realize accurate, low cost electronic adherence monitoring.

Related Work
Medication adherence is a crucial issue that needs to be monitored and assessed continuously.Thereafter, improvements can be made once deviations are detected.In the past, a wide number of review studies that addressed the medication adherence problem have been created.However, most reviews studied the medication adherence from a clinical point of view along with interventions [6][7][8][9]20,21,27,34,35,38].Moreover, only a few studies have presented the electronic-based interventions [29,42,44,45,[52][53][54][55][56].Little attention has been paid towards employing technology in medication adherence monitoring and enhancement as compared to the traditional modalities.These reviews have elucidated the role of technology-based solutions for medication adherence assessment, the potential benefits and limitations, but, no detailed discussion on the cyber-physical system, including system design, hardware development, and data analytics of these solutions were given.
A rare number of studies describe technology-based interventions for adherence monitoring and enhancement.For example, Park et al. [54] presented an overview of a number of electronic systems and methods of medication measurement.Other review articles have discussed the smartphones' applications [55], and tablet [44] applications technology for medication adherence that are in the form of automated reminder systems.In [45], the authors summarized some medication adherence measurement methodologies for older people that use alert and reminder systems, along with their potential advantages.In [57], some technological medication reminder approaches have been briefly described.It is worth mentioning that only a recent study by Rokni et al. [58] has reported some commercially available technology-based solutions.In addition, they provided a brief discussion of some clinical studies that involved electronic medication monitoring.It also discussed the challenges associated with medication monitoring technologies from data analytics, reliability, and scalability sides.It is obvious that these survey studies are limited in providing a detailed discussion of the technical sides of the different technology-based sensing or monitoring approaches for medication adherence.
Although we previously covered some recent applications for medication adherence monitoring [59] that rely on modalities such as sensor networks and proximity sensing, there is still a lack of comprehensive state-of-the-art survey studies concerning the recent medication adherence monitoring approaches.The main objective of this paper is to explore this topic further by extending the discussion on the monitoring systems, expanding the list of surveyed papers, taking account of other medication monitoring systems such as ingestible biosensors, and discussing the trade-offs of each technology in multiple dimensions.To our knowledge, this is the first review that addresses medication adherence monitoring approaches using a variety of emerging technologies.It is the first that looks at the medication adherence monitoring approaches from a technical point of view with the aim of promoting the future systems such that they help in filling the gaps that existed in the current ones.

A Review of Medication Adherence Monitoring Systems
Medication non-adherence is an extensively studied complex problem.The common conclusion of these studies is that several interventions are required to improve medication adherence [29].Nonetheless, technological interventions are believed to be supportive tools in improving adherence.This is due to the fact that they allow timely monitoring, and generate useful information about the patient's behavior for the healthcare provider [18,60].To date, a considerable number of systems have been proposed and developed that utilize monitoring and tracking techniques in various health-related projects, including medication adherence monitoring.In this section, we review the existing approaches on designing monitoring systems for medication adherence applications using emerging technologies.
Table 1 provides a taxonomy of the approaches reviewed in this paper.Table 2 summarizes the key properties of existing technology-based systems reviewed in this paper.[68] Wearable sensors -Hand-to-mouth motion Wang et al., 2014 [69] Wearable sensors -Taking a pill, drinking water and wiping mouth Chen et al., 2014 [70] Wearable sensors -Cap twisting and hand-to-mouth actions Serdaroglu et al., 2015 [71] Wearable sensors -open-pill-box, put-glass-back, put-pill-in-mouth, drink water Mondol et al., 2016 [72] Wearable sensors -User's response in the form of voice commands Abdullah and Lim, 2017 [73] Wearable sensors -Hands movement Hafezi et al., 2015 [74] Ingestible biosensors -Medication ingestion Chai et al., 2016 [24] Ingestible biosensors -Medication ingestion  [80] Computer vision -Pill bottle opening, pill picking, pill swallowing, bottle closing Dauphin and Khanfir, 2011 [81] Computer vision -Pill bottle picking, drinking a glass of water, putting glass back Huynh et al., 2009 [82] Computer vision -Tracking the face, the mouth, the hands, a glass of water, and the medication bottle Bilodeau and Ammouri, 2011 [83] Computer vision -Occlusion of hands, occlusion of a hand and the face, medication bottle recognition Sohn et al., 2015 [84] Computer vision -Bottle weight

Sensor-Based Systems
Recent years have seen the size, cost, and energy consumption of small wireless sensors decrease by several orders of magnitude [92].Indeed, today, low-power wireless sensors can be bought for an affordable price.These improvements have made it possible to connect everyday objects to the Internet, resulting in the visionary concept of the IoT [93,94].While there are a wealth of possible uses of the IoT for security, industry, and environment, measuring everyday activity to monitor and improve the health and well-being of persons is rapidly becoming an active area of research [95].Furthermore, the integration of CPS and the IoT's main components, Wireless Sensor Networks (WSNs) [96], into healthcare is playing an important role in developing new IoT-enabled CPS-based healthcare solutions [97].
Sensor networks and its subsets have been proven to be one of the outstanding tools for bridging the gap between the physical world and the computers by continuously enabling new applications in various walks of life [98].In the context of human health, sensor systems allow us to collect data on daily activities in a free-living environment and possibly over long time periods, seamlessly [99].One promising application in that field is the monitoring and assessment of subject for medication intake [100].In fact, sensor-based approaches are the most widely used among other approaches these days for adherence monitoring.Utilizing sensor networks into medicine intake and adherence monitoring systems comes with features and benefits.The regularity in measurements, remote monitoring capability, and context awareness are a few examples [100].In general, wireless sensors in this area of monitoring can be put into two main categories based on the form of deployment: fixed and wearable.Fixed sensors are tied to minimally mobile objects such as pillboxes or pill bottles, and home apparatuses.Meanwhile, wearable sensors are lightweight, have high data fidelity, and mobile devices that are attached to the user's body.Hence, wearable technology is becoming more dominant in enabling different healthcare applications [101], including medication adherence assessment.
In vivo or intra body communication and networking [102] is another emerging sensor-based communication and network technology within the IoT family, which is enabling a new set of healthcare applications.In vivo biosensors can be integrated with ingestible dose forms for wireless and real-time medicine ingestion events retrieval [103].
In this part, we describe the recent work on medication adherence monitoring using different forms of wireless sensing.

Smart Pill Container
Pillboxes and pill bottles equipped with sensors have been developed for monitoring the medication-taking activity.In this context, Hayes et al. [12,61] developed MedTracker.It is one of the earliest approaches that uses a 7-day multi-compartment pillbox embedding plungers in each compartment.It was designed to detect the lids of boxes opening as the plungers would activate a switch inside the pillbox that then triggers the micro-controller.The system uses Bluetooth technology for wireless transmission of the data to a nearby computer.Data was transmitted over the Bluetooth link every two hours for the aim of prolonging the lifetime of system, which was using a 9 V battery.The system includes RAM for storing medication taking events when there is no connection with the base station.However, it is obvious that the system is simple and is error prone as it considers any lid opening event as medication taking.Regardless of its simplicity, the system achieved a lifetime of eight weeks only, given it was powered from a considerably big battery.
In another approach that was recently carried on by Aldeer et al. [62], PillSense has been proposed.It uses a 3D printed pill bottle equipped with a magnetic switch sensor, an accelerometer, and a load cell.Furthermore, the system uses PIP-Tag mote [104] as a platform for collecting the data from the employed sensors and then transmitting them wirelessly to a base station attached to a nearby computer.The system simply relies on the idea of collaborative sensing where the switch sensor is utilized for monitoring cap removal, the accelerometer for monitoring pill pickup event, and the load cell for bottle weight sensing.Hence, with the aim of saving as much energy as possible, PillSense was designed such that it monitors cap removal through the magnetic switch sensor and only activates the accelerometer for motion sampling when cap removal is detected.Upon cap re-closure, the accelerometer is deactivated and the weight sensor is activated for one-time bottle weight sensing.Pill bottle weight checking adds another element of validation to see if there is a difference in the weight, each time the cap is removed.The system is wireless, unobtrusive, and supports portability.More importantly, it is energy efficient as it can work for more than three weeks on a coin-cell battery.
For a project that intended observing daily living of elderly people, Lee and Dey [63] developed a pillbox similar to that reported in [12,61].A 7-day compartment has been equipped with a Microcontroller (MCU), a ZigBee wireless module, an accelerometer, and a battery.Data were transmitted to a laptop located in the patient's home for further processing.The system has been clinically tested over a duration of ten months with two participants, but no results about the performance were reported.
It can be seen that such an approach aims to eliminate the intervention and attachment of sensors to the human body, and by that it ensures user's comfort while maintaining accuracy by using the accelerometer sensor.However, the system does not ascertain if a pill is actually ingested or not by the user.

Wearable Sensors
In the recent years, Inertial Measurement Units (IMU) have seen rapid achievements from both the cost and intelligence points of view [105].IMUs usually consist of accelerometers, gyroscopes, and magnetometers, or a combination of these [106,107].They have been widely used in healthcare applications by sensing motion and tracking individuals [108].Ultimately, the usage of motion sensors can help in revealing possible information about individual's health [104].In this part, we present many wearable sensing systems for medication adherence monitoring and place them in two categories, depending on the placement location of the body, neck-worn and wrist-worn.
• Neck-Worn Sensors: In one of the studies [64], the authors propose a wearable system for detecting user adherence to medication up to the level of determining if the medication has been ingested.They built a pendant-style necklace that includes a piezoelectric sensor, a Radio Frequency (RF) board, and battery.The piezoelectric sensor is used for sensing the mechanical stress resulting from skin motion during pill swallowing and generating voltage as a response.Acquired data is sent via Bluetooth to a mobile phone that runs classification algorithms where they are analyzed further.Data collected from a population of 20 subjects were used to train and test the proposed system and a Bayesian-Network classifier was used for classifying the data received from the smart necklace.The achieved precision and recall for capsule were 87.09% and 90%, respectively.It is worth mentioning that another step that is used in this system is a commercial smart pill [109].Major challenges associated with this approach pertain to user comfort and social acceptance [110] as the necklace needs to be worn by the patient and must be fastened and placed in contact with the skin during dose swallowing.
Another tool for assessing medication intake is using acoustic sensors in the form of neck wearables.Such an approach has been utilized for food intake monitoring applications [111].
Although this approach requires further research, it shows promise for being applicable to medication monitoring [112].In general, acoustic-based approaches focus on collecting acoustic data resulting from swallowing or ingestion activity with a microphone placed by the throat and then harnessing specific data analytics methodology for classifying and analyzing the swallowing events.Only one prototype of this class of wearables was developed by Wu et al. [65].
The neckwear device contains microphones, a flex sensor, and an RFID reader.The microphones and the flex sensor are to be employed for sensing throat movement and chewing sound associated with medication swallowing activity.Hence, the authors embedded an RFID reader as they aim for adding another element of medication adherence verification by monitoring pills equipped with ingestible biosensors when passing through the throat area.However, the study in its current version does not include any validation trials, thus making it difficult to make conclusions about the performance, social acceptance, and comfort of this approach.
Given the promise of acoustic sensing in food monitoring, it is highly likely that this technology will face the same challenges associated with other neck-worn sensors when applied in promoting medical compliance in older users [113].
• Wrist-Worn Sensors: When reviewing sensor-based systems, one should not ignore personal sensors.Personal sensors are a class of wearables that can be used for fashion and tracking purposes, such as smartwatches [114].Nonetheless, these wearables embed miniaturized and continuously progressing capabilities including Inertial Measurements Units (IMUs) (accelerometer, gyroscope, and magnetometer or a combination of these) [115,116].Thus, wearable and personal sensors have been recently used in many healthcare monitoring studies, including medication intake detection.The reason behind using IMUs in such systems is their ability to accurately recognize the intensity, direction, and angle of movements conjugated with medication intake activity in a 3D coordinate system [117].Collecting such data will help in modeling the user's physical activity and then infer if it is associated with medication taking activity or not.
In [66], an eZ430-Chronos wrist module manufactured by Texas Instruments (Dallas, TX, USA), has been used to collect and transmit signals from the on-board tri-axis accelerometer.Signal processing and data classification for medication intake gestures recognition were used.The system achieved an accuracy of 96.7% when taking the medicine by two hands and 88% when taking the medicine by one hand.
In [67,118], data obtained from a 3-axis accelerometer and gyroscope of a Samsung Galaxy Gear smartwatch manufactured by Samsung Electronics (Yeongtong District, Suwon, South Korea) were employed to predict pill bottle opening, pill removal, pill pouring into the secondary hands, and water bottle handling activities.However, an algorithm has been employed to predict medication ingestion from the data obtained from the inertial sensors by recognizing two activities: detecting the motion associated with cap twisting while the smartwatch is worn on the wrist, and wrist rotation for the palm to face upwards when pouring pills from the bottle into the other hand.Using these algorithms, the authors predicted the medication bottle opening and palm up activities with 30% and 83.7% precisions, and 87.5% and 100% recalls, respectively.Similarly, in [68], accelerometer and gyroscope sensors embedded in a pair of smartwatches placed on both wrists of the user were used to sense and transmit readings associated with pill taking activity from 10 users.Using a decision tree classifier, the system was able to detect the wrist movement while taking medication with 78.3% accuracy using one smartwatch placed on either of the wrists.Moreover, the accuracy of the system was 86.2% when using two smartwatches for tracking the motion of both hands.
Wang et al. [69] used accelerometery data samples from wrist-watches and dynamic time warping technique to test if a sample belongs to either activities: taking a pill with water or drinking water and wiping mouth.Data from 25 individuals were used to classify the hand movement gestures associated with one of the previously mentioned activities.The system achieved 84.17% true positive rate.A further research study of Chen et al. featuring wearable sensors presents a system for detecting two actions "cap twisting" and "hand-to-mouth" from a triaxial accelerometer and a gyroscope [70].Classification accuracies were 95% and 97.5% for cap twisting and hand-to-mouth actions, respectively.Another application of accelerometers embedded in smartwatches is presented in [71].One smartwatch placed on the right hand of the user was used to collect the acceleration data for the actions associated with medication intake.
The achieved accuracy for putting pill in mouth was 100%.However, there was a significant confusion associated with the processes of opening pill box and drinking water actions.Hence, their approach requires the user to take medication using the same hand on which the sensor is placed.
A medication tracking and reminder system, termed MedRem, was presented in [72].
Unlike other approaches that used IMUs available on smartwatches, MedRem uses the speaker microphone on a smartwatch to provide reminders and track medication adherence via voice commands.When reminders are provided in the form of voice commands, it is expected that the user send a recording via the microphone sensor to confirm or postpone taking medication.The smartwatch then uses an android speech recognizer to analyze user's input and update a server.
The system is capable of recognizing native and non-native English speakers commands with 6.43% and 20.9% error rates.
Finally, in a recent work, Abdullah and Lim [73] developed SmartMATES.It consists of two wrist worn sensors and a mobile phone app, where each of the wearable sensors is embedding an accelerometer and a Bluetooth module.The researchers assume that the patient takes the medication within a known interval of a given time of the day.Based on this, the mobile App triggers the wrist sensors to operate over a given time window to collect acceleration as well as RSSI (Received Signal Strength Indicator) measurements.Once hand movement is detected within this interval, the acceleration and RSSI is compared with pre-defined threshold values.
From this comparison, it can be concluded if each hand is in proximity of the other, which is the hands position associated with medication taking.
Advantages of wearable sensors approaches include the ability of monitoring the user behavior in a free-living environment [111].Another advantage is the accuracy of sensor-based systems.However, a main disadvantage that is pertained with wearable-based systems is the user acceptance and comfort, especially when considering old people [110,119].This is due to the requirement that the sensor should be attached to the user for possibly a long time and recharged frequently, as wearables are usually powered by small batteries.

Ingestible Biosensors
The use of biosensors in connected health is in its infancy.However, with the introduction of In vivo communications, it can be expected that the biosensor technology will dramatically improve over time and increase in value to advancing healthcare delivery [102,120].Ingestible devices are miniature capsule-looking devices that are digested and swallowed when taken through mouth like solid medications.These devices travel through the gastrointestinal tract and digestive system and collect data about specific physiological parameters [121].One application of these devices can be for medication adherence monitoring, where data about drug consumption are collected and transmitted to a body-worn or nearby device for further post-processing [122].
Researchers from Proteus Digital Health, Inc. (Redwood City, CA, USA) have designed a micro biosensor that is intended to be integrated with pharmaceutical oral dose (pill or capsule) for evaluating medication ingestion [74,[123][124][125].The sensor is built from an integrated circuit (IC) with a food particle size.The IC is built from specific materials, including gold.A specific layering design is followed that enables it to act as a battery that collects the current from contacting with the gastric fluid for powering the device.Upon contact with the gastric fluid, the ingestible sensor communicates with a wearable receiver worn by the patient and transmits a unique code.A mobile phone user interface can then identify the ingested medication based on the received code from the ingested biosensor.The designed device have been tested via multiple clinical studies, including humans.Furthermore, 412 subjects were involved in the clinical studies where they have performed more than 20,000 ingestions spanning 5656 days in total.The detection accuracy of medication ingestion was more than 99%.
Finally, the ingestible IC was proven to be safe prior to conducting the clinical trials, by testing dose on animals.MyTMed is another system for medication adherence monitoring that is based on ingestible biosensors [24,126].The central part of MyTMed is the digital capsule that can encapsulate oral medication.It is made of a standard gelatin pill capsule that includes a sesame seed size RFID tag.Upon ingestion by the patient, the gelatin capsule dissolves in the stomach and releases the medicine along with the RFID tag.The electrochemical reaction between the tag's electrolytes in gastric acid forms a bio-galvanic battery that enables it to emit a unique code in the forms of packets to a body worn receiver.Eventually, the receiver utilizes short messaging service (SMS) to relay the packets to a cloud server that can be accessed by the caregiver.Based on a 10 participants trail study with 96 ingestion events, the system's detection accuracy was 87.3% [127].
Advantages of biosensor-based techniques include their ability to detect concurrent medication ingestion events with relatively high accuracy.They are also able to identify the ingested medicine with no computational cost, since each medication has a unique code stored in the in vivo pill.However, as such systems require external receivers to be adhered to the individual's body, many users would object to wearing a banded device throughout the day and possibly for years (when considering people with chronic illnesses).Security and privacy is also an issue, with resource-constraint tags requiring low-energy and lightweight computing cryptographic tools [128].

Proximity Sensing
The visionary concept of IoT relays on some technologies, among which is the proximity detection [129,130].Hence, objects usage in our daily life can be monitored by sensing their proximity to other things.Two important wireless communication technologies that are currently used for proximity detection and sensing are RFID [131] and NFC [132].Overall, RFID and NFC are contactless short-range communication technologies that can be integrated in everyday life objects to sense the daily activities [133,134].Here, we describe the RFID-based and NFC-based systems in medication taking applications and their usefulness and shortcomings.
An early demonstration that applied RFID technology for medication taking was designed by Agrawala et al. [75].The system uses an RFID tag attached to a pill bottle that is placed on a platform embedding an RFID reader and LEDs.The LEDs flash to notify the patient when it is time to take medication.Using this system, it is inferred that the medication is taken when the medication bottle is picked from the platform and it is not within the coverage radius of the RFID reader anymore.The caregiver can track the patient's adherence via an Ethernet connection with the platform.Another RFID-based prototypical system is SmartDrawer [76].A drawer with an RFID reader that is capable of inventorying the pill bottles that are stored inside it as well as keeping a record of drug taking activities, is used.The pill bottles are equipped with RFID tags for identification and tracking.The system records the type of bottle and when it is removed from the drawer.In other words, it is assumed that the medication is taken when the bottle of that medicine is removed from the drawer and it is not within the scope of the RFID reader.RMAIS is a system that relies on RFID [77].It utilizes RFID technology, a scale, an Arduino µC board, an LCD panel, and a motorized rotation platform.Each pill bottle is equipped with a passive RFID tag that stores the medicine information and is read by a very short range RFID reader that is attached to the scale.Initially, the µC obtains the medicine details from the RFID tags.Based on the inherited information, the platform notifies the patient about medication taking time and introduces the medicine on time by rotating the platform and pushing the required pill bottle onto the scale.The LCD panel is employed to provide the dosage instructions.Finally, based on the scale measurement, the system can detect if the medication has been consumed.
RFID is not the only available tool for this approach.Other short communications-based approaches designed a smart blister that is equipped with a µC along with the NFC technology available on mobile phones, to develop an adherence tele-monitoring system [78,135].The idea is that the smart blister records the event of pill removal and reports this activity to a mobile phone that is in the proximity via NFC.The mobile phone then communicates this event to a remote server to be accessed by the caregiver that assesses the medication intake adherence.
As with the previous technology-based systems for medication adherence monitoring, proximity sensing-based systems have advantages as well as limitations.The main advantage is the possibility of retrieving information such as dosage instructions that may include timing, frequency, and quantity.Such information can be helpful when considering elderly patients.Another advantage of using proximity sensing is the non-invasiveness, as sensing tags are usually attached to the pill containers.However, the main limitation of these systems is the requirement that the pill container being located within a short distance (several centimeters) of the vicinity of the main part of the system, which is the reader.In addition, the possibility of encountering unrealistic situations in which it is assumed that the medication is consumed by patient when it is only moved away from the reader.Most importantly, there have been some studies that addressed possible harm to the fetus that are associated with the exposure to Ultra-High Frequency (UHF) RFID readers during pregnancy [136].

Vision-Based Systems
Recently, research in computer vision and image processing has attracted much attention, leading to the development of many algorithms for human activity representation and classification [137].So far, vision-based systems have been the basis for a number of important healthcare applications.In the context of human activity recognition within smart environments or "Smart Homes" [114], where ambient assistive living (AAL) technologies [2] exist; one choice for monitoring medication intake is to use vision modules for identifying and tracking inhabitants, motion, gestures, and subjects.In this section, we depict the current vision-based systems for medication intake monitoring and discuss their pros and cons.
In [79], a computer vision system was proposed for monitoring medication habits.The system uses one camera installed in the medication area, which may include a group of medication bottles.The aim of this system was to track if the right medication is being taken by the user.In order for the system to work, it is required that only one user appears closely in the field of view of the camera during the medication taking session.Algorithms for skin color distinction have been used in order to distinguish between skin and non-skin colors.First, the systems extract all skin regions of the person in front of the camera.Then, this information is used for detecting hand/face (hand over mouth) occlusions and hand/hand (bottle twisting) occlusions.Researchers used four users in different environments to evaluate the system.Six out of eight pill taking events were successfully detected.Hence, they consider the sequence of bottle opening, hand-to-mouth, and bottle closing as a pill taking event.
Another computer vision system for monitoring medication intake was developed by Valin et al. [80].The system considered multi-state scenarios including bottle opening, pill picking, pill swallowing, and bottle closing.It uses color classification algorithms for person detection and motion tracking by distinguishing the person's skin.In addition, colored bottles have been used for medication bottle detection.The recognition results were 90% classification accuracy for scenarios that differ from each other in the sequence of activities associated with medication taking.
The work in [81] focused on developing a technique for background suppression of videos captured by low resolution cameras and using this technique for the monitoring of medication intake.However, the technique was only tested with one participant and no accuracy measurements were reported.Furthermore, the system's accuracy may get affected for different colored clothes worn by the participants, as the experiments have been conducted with a participant wearing dark colors compared to the background.Another similar vision-based system developed by Huynh et al. [82] used a multi-level approach for detecting and tracking mobile objects during medication intake.The face, the mouth, the hands, a glass of water, and the medication bottle were tracked in this system.To achieve this, detection and tracking techniques for background subtraction, skin regions' segmentation, and using color information for bottle detection are used.The average success rate of activity recognition was 98% from a population of three subjects.In later work, the authors directly use two cameras for the aim of occlusion handling [138].
In another approach, Bilodeau and Ammouri [83] used skin detection and second order Hu moments for tracking body parts during medication taking.In addition, the Petri network was defined for modeling medication intake.From 12 video sequences of medication intake, the system was able to detect nine, as such, the authors suggested more additional features to be added to the system for further enhancement.Different from [82,138], occlusion between hands was classified as bottle opening, while occlusion between either hands and the face was considered as pill swallowing.
The literature in this area of visual systems also shows a monitoring system that consists of a digital scale and a camera that was presented in [84].A digital scale has been used such that it continuously measures and displays the medication bottle weight.The camera has been used to capture and send the scale's readings displayed on the screen to a nearby computer.Upon receiving the images, the computer then runs an image processing algorithm for processing the bottle's weight.From the bottle's weight decrease trend, the system can generate an alarm to remind the patient to take medication.It should be noted that although this work concentrates on vision analysis, it does not include any human subject tracking.It is obvious that such a system does not support mobility due to the fact that it requires the medication bottle to always be placed on the weight scale, and thus provides only a limited view.In addition, it requires the user to have a digital scale, a camera, and a computer.
Another visual-based clinical study using Microsoft Kinect (Redmond, WA, USA) as time of flight sensors for quantifying medication adherence among patients with Parkinson's disease [85].The Microsoft Kinect is used for approximating nodes on the human body while walking and then collecting the 3D locations of a number of skeletal joints.Hence, the velocity and acceleration of each joint was computed such that patient motion is obtained.The data is then classified using different data mining algorithms to discriminate adherent from non-adherent patients.The clinical study included seven Parkinson's disease patients first before taking their prescribed drugs and thereafter taking their prescribed drugs.Accuracies greater than 97% and 78% for an individually customized classification model and a generalized model were respectively achieved.
Although vision-based systems will play an important role in AAL environments, the main disadvantages of these approaches are their limitation in use and accuracy.In addition, vision-based approaches may demand several resources, which can be expensive.Another downside, especially with surveillance-video approaches, is the high computational cost associated with system training.Furthermore, as we progress further into the 21st century, users prefer fully mobile devices [139].However, in contrast, vision-based approaches do not support mobility.Finally, another limitation is the fact that the user is required to be within the scope of the camera and some parts of the body is not covered (hands and face) such that the system can capture and recognize these parts for detecting medication taking activity.

Fusion-Based Systems
It is seen from the studies we covered that each approach comes with drawbacks.As such, fusion-based systems have been developed that aim at blending advances available from multiple techniques for enhancing one or more technical drawback [111,140].In this section, we subdivide fusion-based systems into several categories, based on the blend of techniques used.

Proximity-Sensor Systems
In [86], Li et al. have designed a medication adherence system that was built with a cylindrically shaped 7-compartment pillbox, a wristband device, and a computer that all communicate with each other wirelessly.The pillbox is comprised of an Arduino microcontroller, a motor, a ZigBee transceiver, and an RFID reader.In addition, each compartment is embedded with a diode and a photo diode for detecting pill removal.The function of the MCU is to control the motor such that it rotates the compartment towards the user when it is time to take medication and when the RFID-based wristband is detected in the proximity of the pillbox.The wristband embeds an IMU, an RFID tag, and an LED.Hence, it is used for collecting motion data associated with pill picking and taking.Furthermore, the RFID tag and the LED are used for RFID proximity detection within the pillbox and reminding purposes, respectively.Once the wristband is detected in the proximity of the pillbox, the IMU is enabled to sample the motion data for possible hand gestures detection that is related pill taking.Finally, in order to verify the pill removal, the photo diode outputs a voltage to be measured by the MCU, at a given level depending on the light received from the LED and the blockage that may or may not result from the pill in that compartment.

Proximity-Visual Systems
A blend of RFID sensors and video camera has been used in [87,141] to characterize the medication taking activity in an in-home environment.In this work, medication bottles were equipped with RFID tags and stored in a medicine cabinet that embeds an RFID reader.The RFID technology is employed for identification purposes of the medication bottles placed in the cabinet.However, once a bottle is removed from the medication cabinet and it is out of the coverage of the reader's antenna, the identification process using RFID technology can not be achieved anymore.As such, the vision system is used such that it is activated once the medication bottle moves out of the range of the reader.The camera is used for tracking and verifying the occurrence of medication taking based on moving object detection and color model of the bottle.

Visual-Sensor Systems
Assistive living techniques have been used to track medication intake based on the patient's activity.One example is iMEC, that has been developed by Suzuki and Nakauchi [88] for medicine timing and pill taking detection.Some home appliances (refrigerator, microwave oven, chair, and bed) have been attached with ubiquitous sensors for predicting the behavior of the patient.A medicine case equipped with a camera has been used for detecting pill removal.Eventually, the blend of data from these devices were used for confirming medication adherence.Another example of monitoring medication adherence for people with dementia is presented in [89].A pillbox equipped with sensors and LEDs, and a Kinect were used in this system.The pillbox is used such that it detects two actions, opening of the compartment and taking medication, and closure of the compartment.Meanwhile, the Kinect is fixed near the medication compartment to detect two activities, bringing hand to mouth and bringing water cup to mouth.Hence, the pillbox uses magnetic reed sensors to detect compartment opening and closing, while the LEDs are used to notify the patient about the correct medication compartment.The skeletal tracking functionality provided by Kinect is used for retrieving the coordinates of the multiple joint positions of the patient, including head and hands.Finally, the authors evaluated the system using 20 subjects, with which a recognition accuracy ranged from 92% to 100% was achieved depending on the patient's facing angle with respect to the Kinect.

Sensor-App Systems
Personal mobile device technology has witnessed a rapid progression in recent years.The services brought by mobile devices, such as the different means of communications and user applications, have enabled a host of possibilities.Thus, mobile applications' industry have been in race, including those for promoting healthcare of older patients [44,142].Specifically, many mobile and tablet based applications have been developed for medication adherence in the form of automated reminder systems [143][144][145].
In this context, the sensor-app approach blends the use of sensor networks and mobile-app approaches for medication adherence tracking and monitoring.Abbey et al. [90] developed a pillbox containing multiple compartments with ambient light sensor fixed in each of them and a WiFi connection.Also, a mobile app has been developed that contains the medicine schedule.The pillbox and the mobile app are interconnected through an online data source.Hence, the mobile app generates alarms when it is the time of medication until the patient takes the medication from the pillbox or chooses to delay the action.In a recent study, Boonnuddar and Wuttidittachotti [91] proposed a pillbox-based system that uses the Arduino UNO WiFi and a load cell.Medication weight changes were reported to a server via the Internet.Also, a mobile application was developed that tracks the change in weight measurements and alerts the patient to take medication, if weight change is not detected.The system was tested for 160 times of medication taking and the accuracy of the mobile application notification functionally was 96.88%.

Challenges and Future Trends
Technology is transforming healthcare as it brings new promises.However, still there are some technological challenges that need to be addressed in order for these systems to make a broader impact.As highlighted in Table 2, some weakening factors that may limit the adoption of such systems are the accuracy, energy consumption, and acceptability.However, there are other factors that are respectively related either directly or indirectly to these main factors such as lifetime, data fidelity, and user's comfort.Discussed below are these challenges and highlights on the trade-offs between them.

System Accuracy and Data Fidelity
Achieving better healthcare requires accurate systems that capture the user's activity.This also applies to medication adherence monitoring systems.In general, accuracy is determined by the device being used for capturing the medication taking activity.Furthermore, the setting of medication taking can affect and limit the technology advances in use.For example, the system might operate at low-sampling rates as a trade-off for energy consumption minimization.However, this comes at the cost of lower data quality.Accuracy includes data quality, data precision, or data fidelity [104,146] Data fidelity can be characterized by the sampling frequency, the sensor operation mode (in case the systems supports multiple operation and power modes), and the duty cycling.Obtaining high accuracy data demands the system to be running at high-fidelity.However, high-fidelity systems deplete the battery energy at a fast rate (if it is battery-sourced), as their core should be set to run frequently for capturing the monitored event precisely.Thus, when engineering a medication tracking system, the energy consumption management should be considered carefully.

Energy Consumption and Lifetime
A medication adherence monitoring system can be battery-powered, for example, in the case of sensor networks and mobile device based systems, such as smartwatches, mobile phones, and tablets.This poses a challenge as the battery has limited energy budget [147].From a system point of view, it is anticipated that a sufficient amount of electric current is being fed to the system to ensure its functionality.At the same time, from a user point of view, it is expected that the system lifetime lasts for as long as possible as application developers must either frequently replace batteries or use rechargeable batteries.This would likely be inadequate for user's acceptance and costly [148][149][150][151].
It is worth mentioning that, for some kinds of technologies, energy consumption may not be an essential concern as they are either passive or not powered from a battery source.Strictly speaking, among various technologies, sensor-based systems have a bottleneck of being sensitive to energy consumption as they should be powered by small size batteries with limited capacities [152,153].This is due to the fact that Moore's law does not apply to battery manufacturing [154] and, thus, the battery components continue to be constrained.Moreover, typical sensor nodes are compact and as such there is not enough room for large batteries to be used, which places constraints on the energy cost [155].
Even though only rare studies focused on the energy consumption of medication adherence monitoring systems, this is still central in this context as it can severely affect the performance and efficiency of the system [149,156].This can be imagined by taking wearable systems powered by non-rechargeable batteries as an example.In general, the battery is a complex system that can behave unpredictably when affected by several factors and conditions, including the temperature and the applied load [157,158].High-fidelity motion sensors are utilized within wearable devices for accurately sensing and quantifying the motion associated with medication taking activity.However, there is a trade-off between energy consumption and data fidelity.On the one hand, the sensor device should be operating continuously and sampling data frequently.On the other hand, even if temperature conditions are perfect, enabling the sensor(s) for frequent data sampling results in increasing the internal resistance of the battery and affecting its chemical and physical properties [159].Consequently, the battery will not be put to rest for a sufficient time and recover its rated voltage.As a result, the battery voltage will continually drop with time until it reaches the cut-off voltage.Operating the battery under such timing and intensity conditions will not enable it to provide voltage at a sufficient level that operates the connected device correctly, even with a considerable amount of unused charge being left.
As a consequence of the experienced discharge behavior, the system's lifetime is directly affected.Generally speaking, users prefer systems with longer lifetime, compared to those with shorter lifetimes.As such, wise battery usage is required [160].Wisely using the battery requires techniques such as collaborative sensing to be employed for minimizing energy depletion in such systems.Once the energy consumption issue achieves notable progress, battery-powered systems such as wearable and portable systems can be used more widely in the area of adherence monitoring applications.

Acceptability and User's Comfort
The user's perception of a monitoring system has a great impact on its adoption and success.First, technological barriers such as battery energy consumption, mobility support, and others play a significant role as barriers to the wide acceptance of technology-based systems for medication adherence monitoring.Second, ethical challenges such as privacy and confidentiality also exist.Users are concerned about behaviors being monitored beyond medication taking and the potential of unintended users accessing the information collected [161].In addition, users, and especially the older ones, tend to have social, physical, demographic, and cultural barriers towards using technology and, as a result, barring the user's acceptance of modern technology [65,113,162].
In this regard, we can compare active sensing versus passive sensing systems.By active sensing, we mean that the sensing device is directly attached to the patient body and should be in place and active during the medication taking activity.An example of such a system can be a smartwatch.On the other hand, passive sensing is performed by using an off the patient body system.Nonetheless, portability is a leading specification that should be supported by medication adherence systems in order to earn the user's perception by maintaining comfort.However, as we discussed before, most portable systems, such as the wearable sensors, requires the user's attention by wearing it contentiously and charging or replacing its battery frequently [163].Meanwhile, passive sensing systems may be less accurate and not portable, but not sensitive to the battery replacement issue.Managing this trade-off implication requires a system that is portable but energy efficient and accurate [62].

Tampering, Authentication, and Active Non-Compliance
Two key challenges arise because users may try to actively deceive the system into thinking they are compliant when they are not.Tampering occurs when an unauthorized user receives the medication.The first challenge then becomes one of authentication-Is the person who is taking the medication who he claims to be? Tampering can arise for medications which can become addictive, such as opiates, where an addict or dealer has an incentive to fool the system.Authentication and authorization are analogous concepts in computer security-Is the person who they claim to be, and is this person authorized to take the medication?Although few projects have specifically tackled these security challenges, an array of wearables has investigated if a wearable is actually worn by the person it is supposed to [164].A second set of approaches attempts to prevent unauthorized access with the use of physical barriers, such as locks on the pillboxes.A related set of approaches does not try to prevent unauthorized access, but rather take an auditing approach.For example, learning the wrist motions of different people can create an audit trail [165], which can then be used to identify tampering for later remediation.
The second challenge is observing active non-compliance, which is when a legitimate user actively deceives the system.Such behavior can occur when a user disagrees with a medical professional's treatment, but appears to comply rather than challenge the professional's judgment.Active deception on the part of the user is more difficult to solve as the person using the system is legitimate, but chooses not to consume the medication.A variety of approaches can be employed, such as video monitoring, but simple actions, such as placing medication in the mouth, faking a swallow, and then spitting it out later, will deceive most current technologies.Creating monitoring systems that correctly identify active non-compliance remains an important research challenge.

Future Trends
It is clear from this review that most solutions have some sort of limitation.As such, the developed system may harness the advancements of a combination of technologies to achieve the ultimate goal.However, overcoming the challenges that were previously mentioned can be achieved as follows.In order to precisely monitor patient adherence, fine-grained sensors such as load cells, motion sensors for detecting and classifying gestures associated with hand-to-mouth movement, and switch or capacitive sensors for cap opening and closure verification, are strong candidate technologies.
The integration of sensors that consume very little energy with limited fidelity along with sensors that report much higher fidelity of activity but also power-hungry on a single platform and decide what sensor and when to have it on, is an example of collaborative sensing that can be harnessed for prolonging the lifetime of a battery-powered system [104,166].However, this requires sensor fusion algorithms that build a unified model based on different sensed and reported inputs-for example, Bayesian inference.In addition, since the wireless functionally in wireless-enabled systems constructs a bottleneck as it consumes a large portion from the battery energy, searching for low communication technologies is a must.An example of this can be the Transmit Only (TO) approach [167] that can be employed rather than WiFi or Bluetooth.The TO technique is a single hop communication that does not demand handshaking or acknowledgment, and thus it minimizes the energy consumed for packet transmission to only a few tens of micro joules [104].Finally, user's acceptability and comfort might be achieved by carefully designing a pill container that is low-energy consuming, smart, and wireless.

Conclusions
Medication non-adherence is a major problem in the healthcare sector.Poor medication adherence leads to healthcare resource wastage and sub-optimal treatment outcomes.As such, it has become an attractive research area for many researchers from multidisciplinary domains with the aim of developing new monitoring and interventions that can detect and correct medication taking regimens once they deviate.In this paper, we have covered the technology-based techniques and systems for medication adherence monitoring.In addition, we put special stress on the advantages, disadvantages, and challenges associated with these approaches, but how those translate into changed operational and clinical outcomes requires more feedback and observations of both patients and clinical practitioners.From this review, we can conclude that work is still required to enhance technology-based systems that can overcome these challenges, especially the accuracy, user comfort, and battery consumption.Finally, the paper reveals that many more clinical trails need to be conducted over long timescales and with large sample sizes in order to evaluate both the accuracy and the usability of medication adherence systems.

Table 1 .
A taxonomy of the technology-based approaches for medication adherence monitoring.

Table 2 .
Summary of main applications, strengths, and limitations of the current technologies used in medication adherence.
Proximity-Based SystemsDetects medication presence or absence within the proximity of reader's antenna Non-invasive Need to be coupled with other monitoring or sensing techniques for verification Vision-Based Systems Detects medication presence or absence within the scope of the camera Non-invasive Need to be coupled with tech or sensing techniques for verification Fusion-Based Systems Try to verify the operation of monitoring the medication taking activity Higher accuracy as compared to standalone technology Resource consuming Do not usually support mobility