IoT in medical diagnosis: detecting excretory functional disorders for Older adults via bathroom activity change using unobtrusive IoT technology

The Internet of Things (IoT) and Artificial Intelligence (AI) are promising technologies that can help make the health system more efficient, which concurrently can be particularly useful to help maintain a high quality of life for older adults, especially in light of healthcare staff shortage. Many health issues are challenging to manage both by healthcare staff and policymakers. They have a negative impact on older adults and their families and are an economic burden to societies around the world. This situation is particularly critical for older adults, a population highly vulnerable to diseases that needs more consideration and care. It is, therefore, crucial to improve diagnostic and management as well as proposed prevention strategies to enhance the health and quality of life of older adults. In this study, we focus on detecting symptoms in early stages of diseases to prevent the deterioration of older adults' health and avoid complications. We focus on digestive and urinary system disorders [mainly the Urinary Tract Infection (UTI) and the Irritable Bowel Syndrome (IBS)] that are known to affect older adult populations and that are detrimental to their health and quality of life. Our proposed approach relies on unobtrusive IoT and change point detections algorithms to help follow older adults' health status daily. The approach monitors long-term behavior changes and detects possible changes in older adults' behavior suggesting early onsets or symptoms of IBS and UTI. We validated our approach with medical staff reports and IoT data collected in the residence of 16 different older adults during periods ranging from several months to a few years. Results are showing that our proposed approach can detect changes associated to symptoms of UTI and IBS, which were confirmed with observations and testimonies from the medical staff.

The Internet of Things (IoT) and Artificial Intelligence (AI) are promising technologies that can help make the health system more e cient, which concurrently can be particularly useful to help maintain a high quality of life for older adults, especially in light of healthcare sta shortage. Many health issues are challenging to manage both by healthcare sta and policymakers. They have a negative impact on older adults and their families and are an economic burden to societies around the world. This situation is particularly critical for older adults, a population highly vulnerable to diseases that needs more consideration and care. It is, therefore, crucial to improve diagnostic and management as well as proposed prevention strategies to enhance the health and quality of life of older adults. In this study, we focus on detecting symptoms in early stages of diseases to prevent the deterioration of older adults' health and avoid complications. We focus on digestive and urinary system disorders [mainly the Urinary Tract Infection (UTI) and the Irritable Bowel Syndrome (IBS)] that are known to a ect older adult populations and that are detrimental to their health and quality of life. Our proposed approach relies on unobtrusive IoT and change point detections algorithms to help follow older adults' health status daily. The approach monitors long-term behavior changes and detects possible changes in older adults' behavior suggesting early onsets or symptoms of IBS and UTI. We validated our approach with medical sta reports and IoT data collected in the residence of di erent older adults during periods ranging from several months to a few years. Results are showing that our proposed approach can detect changes associated to symptoms of UTI and IBS, which were confirmed with observations and testimonies from the medical sta .

KEYWORDS
Internet of Things, excretory functional disorders, early detection, irritable bowel syndrome, urinary tract infection, older adults

. Introduction
Early detection and prevention of health issues are today's major public health challenges facing medical staff and policymakers (1,2). This situation is more critical for older adults since aging is associated with a serious decline in physical and cognitive abilities, a situation that is emphasized by the poor management of aging-related health problems. Nowadays, existing geriatric services have limited abilities to detect possible health changes and adapt medical assessment and intervention for older adults. Bridging the gap between these geriatric needs and existing services is a major incentive to improve the impact of these services. We argue that detecting older adults' possible health problems as early as possible helps reduce the economic burden on society, improve quality of life for older adults, and promote healthy aging (3,4).
Technological observations based on the Internet of Things (IoT) and artificial intelligence (AI) are perceived as possible solutions for continuous monitoring and early detection of older adults' health problems. They enable us to collect real-time data and make prompt decisions that help medical staff (e.g., geriatricians) detect health-related problems at an early stage, without the need to perform classical tests (e.g., psycho-geriatric tests) that have limitations including assessment inaccuracies and the difficulty for older adults to recall past events. Therefore, we propose an unobtrusive approach for long-term behavior monitoring and early detection of possible changes in older adults' health status based on IoT and change point detection analysis. These technologies enrich medical observations and enhance medical assessment by providing new objective observations of daily living activities. Additionally, classical methods are insufficient to follow health status daily (5) because they retrospectively approach changes after their occurrences and do not focus on the early detection of changes. In this study, we focused on the early detection of digestive and urinary system disorders in older adults. Approximately 10%−15% of older adults are estimated to develop irritable bowel syndrome (IBS) in developed countries (6), numbers that can increase to 45% in underdeveloped countries (7). As for urinary tract infections (UTIs), ∼2% of the world's population develops this condition every year (8).
Our approach proposes a way to detect changes in a subject's bathroom activity behavior. However, our method does not assess the cause underlying this behavior change. It was only following the medical staff 's assessment of our results that we were able to associate our results with a UTI.

. Background
The human excretory system is responsible for removing excess undesirable material, usually fluids and solids, from the body to ensure the body continues to work efficiently. The human excretory system is composed of multiple subsystems, each of which is responsible for getting rid of a particular form of body waste. The urinary and digestive systems are subsystems that are part of the excretory system. The urinary system is responsible for filtering blood and excreting excess water and salts as urine (9). As for the digestive system, it is responsible for getting rid of indigestible food particles in the form of solid feces through defecation (10). IBS and UTIs are among the known problems of the human excretory system.
IBS is a disorder that can occur in the large intestines, a part of the digestive system. The most common symptoms associated with IBS include abdominal pain, usually associated with bowel movements, nighttime diarrhea, and constipation. IBS usually occurs in people 50 years old or older (11).
UTI is a disorder that occurs in the urinary system. Symptoms may include sudden changes in urinary habits (such as increased frequency or urgency), pain or burning while urinating, and pain or tenderness in the pelvis, lower back, or abdomen (12). Untreated UTIs can spread from the bladder to the kidneys and beyond. As such, treating a UTI early can keep it from spreading and overwhelming the immune system, especially in older adults or anyone with a deficient immune system (13). UTI is one of the most commonly diagnosed infections in older adults. It is the most frequently diagnosed infection in long-term care residents, accounting for over a third of all nursing homeassociated infections (14,15). It is second only to respiratory infections in hospitalized patients and community-dwelling adults over the age of 65 (16, 17).
As our population ages, the burden of IBS and UTI in older adults is expected to grow simply because there is an increased number of older adults in the population, resulting in the need to improve diagnostic, management, and prevention strategies; elements that are critical to enhancing the health of older adults. As a first step to accomplishing this goal, we need to improve the follow-up of the overall bathroom activity of older adults to gain a better understanding of their general bathroom behavior. Hence, in the present study, we propose an unobtrusive IoT system to monitor the overall bathroom behavior of older adults inside their residences, which will enable us to detect unusual emerging behaviors across their overall bathroom behavior.

. Related work
There are multiple scales and tests (e.g., psycho-geriatric) in medical science that analyze older adults' behavior and detect possible health changes. Among these scales, the Short Emergency Geriatric Assessment (SEGA) evaluates the frailty of older adults (18), the Mini-Mental State Examination (MMSE) targets cognitive changes, such as orientation problems, attention difficulties, and language troubles (19), the Geriatric Depression Scale (GDS) investigates changes in mood and emotions; e.g., sadness, sedentary life, and depression (20), the Instrumental Activities of Daily Living (IADL) identifies changes in activities of daily living associated with autonomy loss (21), and the Mini Nutritional Assessment (MNA) investigates nutritional changes, such as eating difficulties, weight loss, and protein intake insufficiency (22).
While these medical scales and tests help medical staff (e.g., geriatricians) analyze and evaluate older adults' behavior and identify possible health problems, there are limits to their efficiency. For example, it is inconvenient for older adults to recall past events in full detail at the time of an assessment (23). Therefore, subjective information and missing details might influence assessment results (24). Often, it is also impractical for older adults to move to Frontiers in Public Health frontiersin.org . /fpubh. . a specific location to get an assessment (25). In addition, the assessments require older adults to reply to a given set of questions or perform specific tasks, which may have a negative impact, such as anxiety, if they are unable to reply to some questions or perform some tasks. Therefore, medical staff would benefit from using additional means to gather more thorough and complete objective observations to complete their medical assessment. In this respect, IoT monitoring technologies can be used to closely follow older adults in their living environment (e.g., at home), to detect possible health changes early (26).
IoT technologies offer portable devices, and medical equipment that can be used to gather data on patients, identify diseases, keep track of the patient's health, and send out notifications once a medical emergency is detected. These solutions include a variety of technologies, such as electrocardiogram (ECG) and pneumography monitoring systems (27)(28)(29), glucose level monitoring solutions (30,31), temperature monitoring solutions (32,33), and blood pressure monitoring systems (34)(35)(36). IoT technology can be used to detect short-term health problems, e.g., Aloulou et al. (37) deployed movement, pressure, proximity, and vibration sensors in nursing home rooms to detect night wandering and toilet falls. Semantic reasoning rules recognize the activities of daily living in real time and notify formal caregivers about potential anomalies. Rantz et al. (38) used motion and bed sensors to track movement, pulse, breathing, and bed restlessness to retrospectively detect health changes. Following the occurrence of significant health events, geriatricians review the monitoring data to investigate possible correlations. Another study (39) focused on sleep monitoring, as a lack of sleep may increase the risk of cognitive decline in older adults. A remote and non-intrusive technology was proposed to help patients monitor their sleep at home. A sensor mat equipped with an integrated microbending multimode fiber was deployed and evaluated in a freeliving environment. The study enabled researchers to analyze the participants' sleep quality using various parameters deduced from the sensor mat. Vital signs, namely heart rate, respiratory rate, and body movements, were also reported to detect abnormal sleep patterns. Sensory observations have helped care-focused medical staff focus on areas that require more detailed attention, confirm their medical assessments, and detect patterns of decline not usually detected during regular office visits. A complete technical review for sleep cycle monitoring is conducted by the same authors afterward in Siyanbade et al. (40).
Based on AI technologies, other solutions were proposed to detect mental health problems, depression, stress, and bipolar disorder. In the study proposed by Alam et al. (41), a convolutional neural network (CNN) was used to analyze and classify a person's mood into six different categories: happy, thrilled, sad, calm, distressed, and angry. An advanced machine learning system was also adopted by Pandey (42) to identify stress periods in advance using heart rate. The proposed solution informs the patient about their stress level and prevents accidents. Similarly, Zekri et al. (43) were interested in detecting older adults' behavior changes. In their study, they modeled older adults' behavior and defined the normal behavior of a person as a sequence of four activities (sleeping, eating, taking a shower, and leaving home). An unsupervised approach based on the density-based clustering (DBSCAN) algorithm was applied, and the deviations were detected by computing a similarity score between the current behavior of the older adult and her/his normal behavioral pattern. Another study (44) applied deep learning methods, including CNNs and extreme learning machines (ELMs), to differentiate between ballistocardiogram (BCG) and non-BCG signals. BCG signals were collected using an IoT-based micro-bend fiber optic sensor mat from 10 patients with obstructive sleep apnea. The study used three methods to balance the number of BCG and non-BCG signals, including undersampling, oversampling, and generative adversarial networks (GANs). The system's performance was evaluated using 10-fold cross-validation, and the best results were obtained using CNN-ELM with GANs as the data balancing method. The results showed an average accuracy, precision, recall, and F-score of 94%, 90%, 98%, and 94%, respectively. Furthermore, the study presented by Sadek et al. (45) focused on contactless monitoring of heart rate (HR) using under-mattress (BCG) sensors. The authors studied the potential of two wavelet-based methods, the multiresolution analysis of the maximal overlap discrete wavelet transform (MODWT-MRA) and continuous wavelet transform (CWT), for HR detection using a microbend fiber optic sensor (MFOS). BCG signals were collected from 10 sleep apnea patients during an overnight polysomnography (PSG) study, and the MFOS was placed under the bed mattress. The PSG electrocardiogram (ECG) signals were used as a reference to evaluate the proposed HR detection algorithms. The results showed that the CWT with a derivative of Gaussian (Gaus2) provided slightly better results compared to the MODWT-MRA, CWT (frequency B-spline), and CWT (Shannon). However, the total precision for MODWT-MRA was higher than Gaus2.
As previously detailed above, IoT sensor observations can help care-focused medical staff in their practice. However, we could not find other technological solutions in the literature that help match observations with UTI and IBS symptoms. In this field, the gold standard to diagnose UTI and IBS includes (1), for UTI, lab screening through urine sample analysis, and (2) for IBS, stool tests. Moreover, healthcare providers are likely to evaluate IBS with a complete medical history and a physical exam and try to match symptoms with the IBS definition. They may also run tests to rule out some other possible causes of these symptoms. In our approach, we argue that an IoT system can be used as an aiding technological tool to follow-up on health status (including UTI and IBS) by following subject activity, in this research, in the bathroom.
In our research, an IoT system, which encompasses motion sensors to detect the participant's movement inside the bathroom, is used along with conventional statistical methods to monitor and detect the change in the overall bathroom behavior of individual participants. As in our previous research, where we monitored and identified behavior change on a granular level, that is, activity (and sub-activity) levels were evaluated daily [e.g., (46-48)], this research focused on high-level behavior change detection. However, in the present study, the goal is to show that reporting triggers to healthcare professionals (based on behavior change detection), it enables them to be more efficient and offer better health followup. Moreover, we presented the ability to impute the missing data found along with the collected data at any missing rate. Furthermore, the level of analysis we propose here requires fewer  sensors as well as less installation and maintenance costs. Put simply, the system we present here is more economically viable and can be used to monitor patients for long period with minimal cost. In addition, working at this high level requires less computation, since we do not need to follow/detect precise activities. In our case, we do not need to analyze the details of bathroom visits to trigger the alerts. If we analyze changes in the overall number of bathroom visits, we obtain the same result.

. Methodology
Our methodology is based on three pillars: (1) real-time data collection in the subjects' environments, (2) adapted data analysis based on custom algorithms and visualization tools, and (3) results validation with caregivers.

. . Data collection
The data we used to illustrate our methodology were gathered through an infrastructure that covers all the IoT layers (49). The infrastructure (50) was deployed in the real-life studio residences of 16 older adults for periods ranging from several months to a few years in France (51). The subjects' codes, along with their gender, age class, and the monitoring duration, are presented in Table 1.
Bathroom activity was monitored around the clock using an infrastructure mainly based on motion sensors mounted in the participants' bathrooms. These motion sensors are mounted so that they can capture motion over the sink and the toilet area of  each bathroom. A schematic of the bathroom describing the spatial location of the sensor is presented in Figure 1. In each washroom, we used Wyze Sense motion sensors with a 120 • field of view and a range of approximately 8 meters. These sensors are characterized by an adjustable relaxation time ranging from 5 s to 15 s.
The presence of an older adult inside the bathroom is recorded by the sensor as a logic signal of 1, while the absence is recorded as a logic signal of 0. The corresponding sensor signal values for a snapshot of activity are presented in Figure 2. The details of the deployment experiment can be found in Kaddachi et al. (50,52).

. . Data analysis
The proposed algorithm was first used to calculate overall daily bathroom activities and to define daily living patterns. From the overall daily activity, we thus focus on the whole objective excretory function. In this study, we use conventional mathematical methods to identify the change points across the time series.
A pre-processing algorithm was used to convert the raw logic signal data into an overall daily bathroom activity, while a post-processing algorithm was used to identify the timestamps at which behavior changes occurred. The pre-processing and postprocessing algorithms are presented in Algorithms 1, 2, respectively.
Prior to applying the pre-processing algorithm, we imputed missing data using our novel Bayesian Gaussian Approach (BGaP) (53). The missing data type found in our collected subjects' data was considered to be missing completely at random (MCAR), which assumes that the missingness of the data presents no correlations to any potential variables structuring the time series (53). The imputed subject's activity time series was then normalized to the complete number of hours per day, i.e., the resulting pre-processed bathroom activity time series represents the average number of bathroom visits per hour in a day. This is an essential step to compare the bathroom activity for all subjects together.
The two algorithms were used iteratively to identify and retrieve changes in activities in the overall daily bathroom activity and to identify the associated time at which such changes occur. Specifically, Algorithm 2 defines a Pruned Exact Linear Time (PELT) technique applied to the overall daily bathroom activity data that was used to identify the predicted change points. PELT technique is a method for detecting change points in a time series; it is an efficient and exact algorithm for change point detection, meaning that it provides an exact solution and is computationally efficient, making it well-suited for large datasets. It is also a "pruned" algorithm, which eliminates unnecessary calculations to improve computational efficiency. The PELT technique works by considering a sliding window of the time series and calculating a cost function that measures the difference between the current window and the previous window. If the cost function exceeds a certain threshold, a change point is identified. The process is repeated for each window in the time series, and the change points are identified as the points where the cost function exceeds the threshold. One advantage of the PELT technique is its ability to handle multiple change points in the time series, making it well suited for datasets with complex patterns. Additionally, the algorithm can easily be adapted to different types of cost functions, allowing for the detection of different types of change points.

. . Validation
The validation of our results was based on observations from collaborating medical staff (doctors, caregivers, and nurses), as well as the feedback from our iterative meetings. We have collaborated with two caregivers from a nursing home and one geriatrician for individual participants.
The caregivers recorded all significant observations daily and continuously collected electronic health records. Individual participants have monitored via  In addition, regular review meetings allowed for accurate investigation of possible causes of detected changes and any health problems associated with them. These meetings were planned with older adults, family members, and family doctors (each for 4 months with a nursing home and each for 2 months with individual houses). Medical staff evaluated the medical relevance of investigated change explications by reviewing all past detected changes and correlating them with medical records (e.g., geriatric scales, cognitive diagnosis, and prescribed treatments).

. Results and discussion
Following, we present the results of our algorithms applied to the bathroom activities of the different participants from two different perspectives.
• First, we present the time series of the bathroom activity after imputation for the entire monitoring period for each participant, where we highlight the time of the detected changes as a result of the PELT algorithm by a vertical red line (Figures 3-9 and Supplementary Figures 1-9), each vertical red line along the overall bathroom activity time series represents a change in the participant's bathroom behavior in comparison with the preceding window of calculation, where this change represents either an increase or a decrease in the number of the subject's bathroom visits. We claim that changes caused by an increase in bathroom visits are due to the participant experiencing an UTI. • Second, we presented a heatmap illustrating the entire bathroom activity for each subject day by day. This representation helped the medical staff compare the subject's bathroom activity across different months of the year and, hence, during the entire monitoring period. In addition, with the aid of the heatmap (Figures 10-15 and Supplementary Figures 10-19) the physician can easily pinpoint the day when the highest number of bathroom visits occurred, leading to a feasible identification of the UTI.
It is worth mentioning that the heatmaps are shown without imputation, while the bathroom activity time series are presented after imputing the missing data, in order to prevent misleading visual results by the physicians.

. . Time series representation
For subject A, the bathroom activity of the monitoring period extended from late September 2014 to the beginning of February 2015, where we can notice that the subject has four (4) groups of bathroom activity behavior change, as presented in Figure 3.
• First group is found in the second half of October 2014, when the subject experienced a behavior change as an increase in bathroom visits at the end of the first half of October. After this, the subject had a second behavior change, which presented itself as a decrease in his bathroom visits, followed by a third change presenting an increase in bathroom visits. The fourth change is composed of another increase in bathroom visits, and another change on the first of November was also due to an increase in bathroom visits.  Both the third group and the fourth group form an envelope around a sharp increase in the subject's B bathroom activity located in mid-December 2014.
For Subject C, several groups of bathroom activity changed timestamps across the monitoring period, which extended from October 2015 to January 2018, as presented in Figure 5.  For subject E, bathroom activity was monitored from October 2015 to January 2018, as presented in Figure 7.  For subject G, the monitoring period extended from late December 2015 to January 2018, as presented in Figure 9, where the subject's bathroom activity behavior  follows a cyclic pattern. There are multiple segments of behavior decrease: • First segment was found in late December 2015.
• Second segment spanned from April 2015 to September 2015.
• Third segment was found in late October 2015.   indicates an increase in bathroom activity behavior. • During the period extending from July 2017 to mid-August, the general bathroom behavior of the subject was decreasing except for a few sharp spikes indicating a sudden increase in the behavior; the sharpest spike is at the end of July with a normalized value of 1.5 visits per hour. • Another two decreasing behavior segments were found from late November 2017 to mid-December 2017 and from the beginning of January 2018 to mid-January 2018.
The detected behavior change timestamps along these two segments indicate a sharp and unexpected increase in the subject's bathroom activity behavior.
For subject M, the monitoring period extended from October 2016 to January 2018, as presented in Supplementary Figure 6. There are multiple groups of detected change timestamps, as follows: • The first group extends from mid-October 2016 to November 2016, representing a positive inflection point in the subject's bathroom activity behavior, meaning that there has been a sudden increase followed by a sudden decrease in his activity behavior.  For subject P, the monitoring period extended from late March 2017 to July 2017, as presented in Supplementary Figure 8. The general bathroom activity behavior of the subject shows a decreasing behavior at the beginning of the monitoring period, followed by increasing activity toward the end.  • The third group consists of four detected timestamps indicating both decreasing and increasing bathroom behavior. Whereas the first two timestamps in the third group indicate decreasing behavior, the last two indicate increasing behavior. • The last group of detected timestamps consists of six timestamps. The first indicates the beginning of a sudden increase in activity behavior, and the remaining five indicate decreasing activity.

. . Heatmap representation
We have plotted a heatmap for each subject with the vertical axis as the number of days within a given month and the horizontal axis as the month itself to visualize the normalized bathroom activity for each subject individually to help decision-making by physicians or medical staff.
For subject A (Figure 10), it is clear that the subject had increased bathroom activity on 1st of November and the 11th of December.   when the subject experienced a sudden increase in his bathroom activity behavior.
For subject K (Supplementary Figure 14), the subject, in general, was experiencing an increase in his bathroom activity behavior. However, there were a few days where the bathroom activity was higher, specifically on 15   For subject V (Supplementary Figure 19), the general bathroom activity behavior of the subject was low except for 3 January 2018 where the subject had the highest bathroom activity value.

. . Insight
We implemented our system to help collaborating medical staff (doctors, caregivers, and nursing) better follow the subjects (e.g., to notify the medical staff of possible excretory function disorders experienced by the subject under investigation). To this end, we have compared our detection results with those obtained by medical staff.
According to medical staff reports, two subjects had excretory function disorders, subject I was reported to have a UTI, and subject H was reported to have IBS-related symptoms such as vomiting, diarrhea, and spending longer in the bathroom. • Our system detected increased toilet visits, suggesting urinary infection events a few weeks before they were observed by the medical staff. The change detection results obtained by our approach conformed with those obtained by the medical staff, which means we were able to report bathroom activity behavior change that helped medical staff intervene early to solve the situation. • In addition, the normalized bathroom activity value that complied with the medical staff report was equivalent to 1.2 bathroom visits, meaning that it sums up to approximately 28 bathroom visits per day.
• For subject H, we found one significant decrease that affected the daily evolution of toilet entries; this decrease occurred on 2015-01-01. The nursing home team observed an increase in mobility impairments for subject H in 2015-01-15. By this time, subject H was no longer able to go independently to the toilet, as fecal elimination was observed both on the bed and all over the room.

FIGURE
Bathroom activity heatmap for subject F grouped by monthly periods.
• The medical staff report matched our detection results as to where we were able to report such degradation of bathroom activity behavior.
As for the other subjects, there were no reported issues/disorders by the medical staff. However, our analysis confirmed changes for all subjects. We claim that these detected changes were due to UTI as our proposed algorithm counts the number of bathroom visits per day, or, in other words, accounts for the bathroom visit frequency, which is related to UTI. These changes may be related to situations that can result in more serious problems in future, which is why medical doctors need to be made aware of these behavior changes as soon as they are detected.

. Conclusion
The Internet of Things (IoT) and artificial intelligence (AI)-based monitoring technology provide new objective information on daily living activities that complete classical medical observations. In this study, we proposed an attempt to effectively translate medical staff needs by deploying unobtrusive IoT monitoring technologies (e.g., environmental sensors and sensor-enhanced devices) for early detection of possible changes in health status. We focused on excretory functional disorders in older adults associated with urinary tract infections (UTIs) and irritable bowel syndrome (IBS).
Our IoT and AI-based approach consists of two parts: the first part is to calculate the bathroom visit frequency per day from acquired raw motion sensor data, and the second part detects the activity change based on a window-based calculation of the Pruned Exact Linear Time (PELT). With our approach, we were able to detect bathroom activity disorders by monitoring the bathroom activity of subjects on a daily basis across extended periods of time. In addition, we showed that we could help medical staff follow the health status of two subjects (i.e., H and I) based on our bathroom activity change alerting features to better diagnose and treat possible disorders.
In addition, we were able to establish a primary threshold value for bathroom activity. Specifically, subjects having approximately Frontiers in Public Health frontiersin.org . /fpubh. .
1.2 normalized bathroom visits per day should be assumed to experience UTI, as confirmed by medical staff reports. We have also detected changes that we claim could be associated with UTI but that were not noticed by caregivers. These behavior changes may be related to situations that can result in more serious problems for older adults in future. That is why medical doctors need to be aware of these changes as soon as they are detected. So, our system can alert medical staff in response to these unusual situations.
Our implemented algorithm accounts for the difference between the frequency of bathroom visits in the current time window and the past time window. For better identification of IBS, we are working on another algorithm that accounts for the time spent in the bathroom. We have tested that algorithm in the context of detecting different daily indoor activities using a thermal sensor array (TSA) system (46), and we expect to get promising results for both IBS and UTI.
In this study, we have highlighted how IoT and AI technologies can advance medical evaluations and upgrade medical assessments by offering novel and objective insights into everyday activities, where the use of sensor observations assists medical professionals in identifying situations that require more in-depth examination, supporting their medical assessments, and detecting patterns of decline that may not be obvious during standard office appointments.

Data availability statement
The data analyzed in this study is subject to the following licenses/restrictions: European project. Requests to access these datasets should be directed to HA, hamdi.aloulou@gmail.com.

Ethics statement
The studies involving human participants were reviewed and approved by Comités de Protection des Personnes (CPP) Ile-de-France VI Pitié-Salpêtrière Hospital Group. The patients/participants provided their written informed consent to participate in this study.

Author contributions
BA involved in medical concept proposal, conceptualization, data collection, funding acquisition, methodology, review, editing, writing, and supervision. HM involved in medical background formulation, investigation, data curation, methodology, data analysis conceptualization, formal analysis, visualization, and writing and editing. HA involved in medical concept proposal, conceptualization, data collection, data curation, investigation, methodology, writing, reviewing, and participate in writing and editing. MM involved in data acquisition funding, data collection, data curation, and reviewing. FB involved in data curation, methodology, formal analysis, visualization, review, editing, and supervision.