Keywords

1 Introduction

The Internet of Things (IoT) is a rapidly growing network of interconnected devices that can share data and communicate with one another, and it has revolutionized a wide range of industries, including healthcare. IoT devices and systems can be used to gather and analyze data on patients, monitor their health conditions, and provide personalized and timely healthcare [1]. One area where IoT is particularly promising is in the development and monitoring of new drugs, such as inhibitor drugs used to slow down or stop specific biological processes or activities [2]. Monitoring the behavior and activity of subjects under the influence of such drugs is crucial to address two main issues: the drug effect itself and the pharmaceutical metrics [3, 4].

In this paper, we are presenting a proof of concept based on a case study to show we can follow the effect of drug intervention on a subject using IoT. To this end, we have monitored a subject in his residence where he was given three timestamped doses of anticholinergic drug. We used our IoT framework to monitor his daily physical activity inside the residence and analyzing the captured timeseries afterwards. To achieve such a task, the physical activity is monitored using motion sensors embedded in the ambient environment. Following, we used an outliers’ detection technique applied to the physical activity of the subject that relied on a sliding window applied to the entire timeseries collected. The mean and standard deviation of the subject’s physical activity was quantity within the sliding window. We considered the change in the subject’s physical behavior to be defined as outliers from the calculated mean and standard deviation gathered across the sliding window.

This paper is organized as following, Sect. 2 comprises the related work in this particular field of research. The methodology is presented in Sect. 3. Results and discussion are presented in Sects. 4 and 5, respectively. Finally, the conclusion is presented in Sect. 6.

2 Related Work

There has been significant interest in IoT research within the healthcare domain, resulting in the development of various applications for different diseases, settings, and populations. A comprehensive review conducted by Lin et al. [5] surveyed representative and active IoT application products and categorized their focuses into three care settings: (i) acute disease care, (ii) chronic disease care, and (iii) self-health management.

In acute disease care, it is crucial to collect patients’ vital signs accurately and in a timely manner. For example, Gao et. al. [6] collaborated closely with medical professionals to identify the key needs in health emergencies. They designed and implemented a system that records patients’ vital signs in real-time using wearable sensors, detects anomalies through a vital sign monitoring algorithm, and shares the data with authorized personnel via a web portal.

IoT applications in chronic disease management aim to enable remote health monitoring. For example, Al-Khafajiy et al. [7] presented Wearable Sensors for Smart Healthcare Monitoring System (SW-SHMS), a smart healthcare monitoring system that collects physiological data from wearable devices. In their system, the collected data is transmitted to a smartphone app via Bluetooth and then to the cloud over the internet. The processed data is displayed on a monitoring platform accessible by doctors. Another example is IMMED (Indexing MultiMEdia data from wearable sensors for diagnostics and treatment of Dementia) was proposed by Mégret et al. [8]. IMMED relies on wearable cameras to capture video and audio data of older adults’ daily activities to assess cognitive decline.

As the importance of health monitoring becomes increasingly recognized, more IT applications are being developed to assist with self-health management. For example, Sadek et al. [9] proposed an unobtrusive Apnea detection using a bed sensor and Sadek et al. [10] proposed a sleep monitoring system using a smart bed. Additionally, smartwatches have been utilized in activity recognition [11] and as a stress detection using heart rate variability [12]. Another technique for monitoring the indoor daily activity was proposed by Ahmed et al. [13] who relied on a thermal sensor array-based (TSA-based) system that can monitor sleeping activity, daily activity, and the no-activity class of a person.

Drug intervention management is important for health management and started to attract attention of clinical research. For example, clinical researchers are interested in evaluating how deprescribing anticholinergic and sedative medications impact people behavior. Based on a literature review, Reeve et al. [14] defined deprescribing as “the process of withdrawal of an inappropriate medication, supervised by a health care professional with the goal of managing polypharmacy and improving outcomes.” Although this definition has not yet been validated, it can be used as a basis for any deprescribing drug, even if further work is needed to get expert consensus to develop an internationally accepted definition [14].

Considering Reeves et al. [14] definition, in recent years there are accumulating evidence showing health improvement associated with deprescribing anticholinergic and sedative in older adults. For example, Ailabouni N. et al. [15] found that reducing anticholinergic and sedative medications in frail older people was feasible and beneficial and resulted in better health outcomes, fewer adverse effects, and improved mood and vigor. They also concluded that deprescribing with a patient-centered approach can be safe and effective. Dearing et al. [16] evaluated the effectiveness of a pharmacist-led medication optimization initiative using an electronic tool called the Drug Burden Index (BDI) Calculator in four hospital sites in Canada. This study aimed to achieve three objectives: First, to determine the impact of integrating an electronic clinical decision support tool, the DBI Calculator, into pharmacist medication optimization activities on medication changes and clinical outcomes; Second, to assess whether the effect of the intervention varies based on participant characteristics such as frailty status and sex, as well as the setting of the intervention, including different ward and hospital characteristics; and Third, to explore the implementation of the DBI Calculator into pharmacist-led medication optimization activities during inpatient admissions. The study found significant changes in DBI scores and clinical outcomes, indicating the potential benefit of such interventions. Similarly, Arvisais et al. [17] conducted a study to assess the efficacy of a pharmacist-physician intervention model in reducing the use of high-risk medications in older adult patients. The study reported that the intervention model was effective in reducing the use of high-risk medications. Also, Cossette et al. [1819] investigated the impact of a computerized alert system-based pharmacist-physician intervention model on Potentially Inappropriate Medications (PIM) use. The interventions resulted in a higher number of drug cessation and dosage reductions for targeted PIMs compared to a control group. In a pilot study conducted by Cossette et al. [20] in a primary care setting, an interdisciplinary pharmacist-physician intervention model based on alerts generated by a computerized alert system was implemented to reduce the use of PIM in community-dwelling older adults. The study found that a majority of the patients included in the study had medication change suggested by the pharmacist, indicating the potential effectiveness of this intervention model. These results can be generalized older adults living in different regions of the world. Studies conducted in New Zealand [21], Taiwan [22], and Texas [23] have highlighted the prevalence of PIM use and associated factors and suggested the need for screening tools such as the Beers criteria to identify PIMs and interventions to optimize or minimize their use.

Additionally, the use of PIMs can increase the likelihood of adverse drug reactions (ADRs), the harmful or unintended reactions to medications. The prevalence of ADRs is yet another significant concern for health care. Specifically, Beijer and de Blaey [24] found that among the older adult population one in six patients are for ADR as opposed to ~ 4% in the younger population [24]. Various studies have highlighted the burden of ADRs in hospital inpatients at large [25]. These studies have identified risk factors such as increasing age, admission to medical wards, and the number of regular medications. Strategies to minimize the burden of ADRs include computerized prescribing and monitoring systems, pharmacist involvement in ward rounds, improved monitoring, and education on prescribing practices. Harmful events resulting from PIMs also includes adverse drug events (ADEs) [26] that are more likely to occur in older adults with multiple chronic conditions as well as older adults taking specific medication classes. This highlights the importance of considering the overall health and medication profile of older adults to minimize the risk of ADEs. A study by Bressler et al. [27] emphasized the need for physicians to be continuously aware of potential adverse drug interactions in older patients and to consult pharmacists and/or patients to ensure appropriate medication prescribing.

As highlighted by numerous studies [181727], ensuring appropriate medication prescription and monitoring of older patients is crucial to avoid ADEs and ADRs. This emphasizes the need for continuous monitoring of patients’ behavior and vital signs, a task that can be facilitated using home-based non-intrusive IoT technology. In this context, our proposed system aims at extending the monitoring of patients’ physical activity levels using IoT technology, with the objective of detecting the impact of an inhibitor drug on the subject's behavior changes over time.

3 Methodology

In this section, we first describe our methodology at the system implementation level where we are present our system architecture and our approach to deployment. Following, we present the data analysis algorithm we used in the data collection section.

3.1 System Implementation

Architecture Overview: This project relies on the AMI-Platform [28] solution we have developed. Data flows through the platform as follows: A cluster of heterogeneous sensors at the end-user layer collects environmental and biomedical data, such as temperature, heart rate, and location. This data is then sent to the physical gateway for pre-processing and transmitted to the cloud layer through a secure channel established by the network layer. At the cloud layer, the data is decoded, processed, and stored in databases. The business layer serves as the user interface, offering dynamic graphs and charts for improved data visualization.

Deployment: We setup two gateway nodes. The first node handles serial communication with the sleep mat sensor that collects Ballistocardiogram (BCG), from which we can infer on the participant’s breathing rate and heartrate during sleep. The second node handles communication with all other deployed sensors that measures the participant’s indoor activity, including door sensors but also motion sensors that report on luminance, humidity, and temperature.

3.2 Data Collection and Analysis

In this study, a subject has been monitored for 7 months, from the end of July 2021 to early January 2022. The objective of this study is to detect changes in the overall behavior of the monitored subject after being given doses of a drug that inhibits physical activity. We have imputed missing activity values using the approach proposed by Ahmed et al. [29]. The overall activity curve for the subject inside his residence during the entire monitoring period is presented by Fig. 1. The timestamps at which these doses are given to the subject are tabulated in Table 1.

The detection algorithm measures the mean and standard deviation within a 3-days sliding window of activity calculated along the complete time series for the subject’s physical activity. Box-and-whisker plots were than calculated (Fig. 2) and used to define outliers for both the averages and standard deviations. Note that in our box-and-whisker plots outliers are calculated as all values above or below 1.5 times the interquartile range (the interquartile range where 50% of the data around the median). We defined outliers as change timestamps for the subject’s behavior. These outlier values are then back projected to the time domain to obtain the corresponding change timestamps. The corresponding change timestamps are presented in Table 2. The mean and standard deviation timestamps by both average and standard deviation at which the behavior changes are plotted with red dots overlapped on the same overall activity curve and presented by Fig. 2.

The change detected by the mean sliding window conforms with the expected timestamps for the inhibition effect more than that detected by the standard deviation sliding window. This is because these timestamps are close enough in temporal domain to those timestamps at which the 3 doses are given to the subject. However, the standard deviation sliding window detects more change timestamps than the average sliding window does. Although the change is detected at the end of the window, the right change timestamp is corrected by the window size, i.e., three days are subtracted from the detected timestamp.

Table 1. Timestamps at which actions were performed by the team.

4 Data Analysis Results

Daily activity time series for the subject under the effect of an activity inhibiting drug is presented in Fig. 1. There are two behavior states that can be found along the time series, and both have a similar meaning. One is characterized by a relatively low standard deviation, we referred to this state as the background activity state. The other is characterized by high standard deviations, we refer to this state as an (low or high) activity induced state. The background activity state is dominant across the monitoring period while the activity induced state occurs for short period in mid-August 2021, at the beginning of November 2021 and during the first week of December 2021. The background activity state is characterized by activity values ranging approximately between 5000 to 7000 movements (per day) with a standard deviation ranging between 0 and roughly 1800 (Fig. 3. Subject behavior changes timestamps overlapped on the activity timeseries). While the activity induced state is characterized by activity values higher than 7000 or lower than 4000 movements (per day).

Fig. 1.
figure 1

Subject physical activity time series.

Fig. 2.
figure 2

Boxplot and outliers for both average and standard deviation sliding window.

In our pilot study, 60% of the detected change (outliers) timestamps are associated with the standard deviation sliding windows’ outliers while the remaining 40% of the detected change timestamps are associated to the mean sliding. Note also that there is a change detection overlap of for 25% of the detected timestamps. There are six groups of change timestamps distributed along the entire daily physical activity timeseries of the subject (Fig. 3. Subject behavior changes timestamps overlapped on the activity timeseries). The 1st group starts in late July and ends in early August 2021, the 2nd group span the second half of August 2021, the 3rd group is in late October 2021, the 4th group is at the beginning of November 2021, the 5th group is at the beginning of December 2021, and the 6th group is in late December 2021. The typical changes’ timestamps are tabulated in Table 2.

Fig. 3.
figure 3

Subject behavior changes timestamps overlapped on the activity timeseries.

Table 2. Detected changes’ timestamps and their corresponding values and source of detection.

5 Discussion

For the inhibition drug experiment the average activity level is very high; about 6000 movements on average per day as the subject is a young person. Based on the timeseries, the subject’s activity level declines from late July 2021 to mid-August 2021. This decline is conformed with the expected outcome of the inhibition drug given to the subject as the effect of the drug is to inhibit the physical activity of the subject. This observation is in-line with the timestamp marked by the medical staff as the drug’s 1st dose intake, as reported in Table 1. There is another decline in the subject’s physical activity from October 30th 2021, to November 9th November 2021, which matches the administration of the 2nd dose as reported by the medical staff. A 3rd decline in the subject’s physical activity is observed and detected during the period extending from late December 2021 to early January 2022. In addition, a recovery period representing the subject’s convalescence from the inhibition drug to his normal overall daily physical activity is observed from mid-August 2021 to early September 2021. A 2nd recovery period is also observed in mid-November 2021. From the subject’s activity timeseries, we can observe that a convalescence period of roughly one week is required for the subject to recover from the effect of the inhibition drug.

6 Conclusion

In this paper we presented a promising application of IoT to monitor inhibitor drugs. We proposed to monitor the behavior and activity of individuals under the influence of drugs to assess their effectiveness, identify side effects, and make timely adjustments to drug levels based on patient status. As such, we have presented a novel approach for monitoring and analyzing the behavior of a subject in an indoor environment over a period of seven months. Our approach relies on the IoT AMI-Platform solution which collected data from a variety of sensors deployed in the participant’s environment. Our method uses sliding windows to calculate the mean and standard deviation of the subject’s activity over a 3-day period. Following, we rely on box-and-whisker plots to detect outliers in these values. These outliers represent changes in the subject’s behavior, which can be further analyzed to understand the effects of specific interventions, such as the administration of an inhibitor drug.

Our results also show the effectiveness of our approach in detecting changes in behavior over a 7-month monitoring period. Specifically, we were able to observe the expected decline in the subject’s physical activity following the administration of the inhibitor drug, as well as recovery periods following each dose. Such information is useful to medical professionals to evaluate the effectiveness of the drug and making decisions about its administration in the future. They also highlight our platform as a valuable tool for deploying and analyzing data collected from sensor networks in a variety of applications, including in healthcare as presented in our case study.