key: cord-0078287-ype2otw6 authors: Alfandi, Omar title: An Intelligent IoT Monitoring and Prediction System for Health Critical Conditions date: 2022-05-18 journal: Mobile Netw Appl DOI: 10.1007/s11036-021-01892-5 sha: 693ec478c477832903efab834e9b39373b8d4fb9 doc_id: 78287 cord_uid: ype2otw6 Diabetes is considered among the major critical health conditions (chronic disease) around the world. This is due the fact that Glucose level could change drastically and lead to critical conditions reaching to death in some advance cases. To prevent this issues, diabetes patient are always advised to monitor their glucose level at least three times a day. Fingertip pricking - as the traditional method for glucose level tracking - leads patients to be distress and it might infect the skin. In some cases, tracking the glucose level might be a hard job especially if the patient is a child, senior, or even have several other health issues. In this paper, an optimum solution to this drawback by adopting the Wireless Sensor Network (WSN)-based non-invasive strategies has been proposed. Near-Infrared (NIR) -as an optical method of the non-invasive technique - has been adopted to help diabetic patients in continuously monitoring their blood without pain. The proposed solution will alert the patients’ parents or guardians of their situation when they about to reach critical conditions specially at night by sending alarms and notifications by Short Messages (SMS) along with the patients current location to up to three people. Moreover, a Machine Learning (ML) model is implemented to predict future events where the patient might have serious issues. This model prediction is best practice in this chronic health domain as it has never been implemented to predicted a future forecast of the patient chart. Multivariate Time-Series data set (i.e. AIM ’94) has been used to train the proposed ML model. The collected data shows a high level of accuracy when predicting serious critical conditions in Glucose levels. The outbreak of Corona virus (i.e. has change the topology of healthcare system on how they should be managed. One of the most additions that we are witnessing that the use of emerging technologies in controlling and stopping such pandemic. From the ICT prospective, these include but most certainly not limited to: the use of Artificial Intelligence (AI) [1, 2] , edge and fog technology [3, 4] , and, Unmanned Aerial Vehicles (namely, Drones) [5, 6] , IoT [7, 8] , as well as Digital Twin technology [9] . There are many serious and critical heath issues that can benefit from these trending technologies. According to WHO, diabetes in it's different stages is one of the major chronic diseases Omar Alfandi Omar.AlFandi@zu.ac.ae 1 College of Technological Innovation, Zayed University, Dubai, United Arab Emirates which could lead to different complication and risk to human life [10] . Even though that some levels of diabetes is not as fatal as other chronic diseases, it could cause the patient with a major other complex disease such as heart disease, stroke, kidney failure and blindness [11] . Critical conditions of healthcare issues require continuous monitoring and proper feedback and followup from more than one authority such as patients, healthcare practitioners, city planners, to name a few. Internet of Things (IoT) networks are no longer simple sensors that collect information, on the contrary, they are now capable of provide learning and train data. Therefore, the use of IoT technology in health critical conditions monitoring is important. Diabetes is mostly comes with birth, and in some instances developed after birth due to in-balanced diet or nutrition life style. It happen when the body either produce insufficient insulin or produce the insulin effectively. For this, the glucose level becomes abnormally high and as a result the patient has to take extra insulin by injection to reduce the glucose level. To control and balance glucose levels in the blood, diabetic patients have to manage their glucose levels throughout the day. Most diabetic patients forced to use the obtrusive technique (prick their finger) at least three times a day to know their glucose level which it always make the patient to be distress and also cause infection of the skin in the pricked area of the body [12] . Thus, this article is proposing a framework based on the use of different technologies (IoT, ML, WSNs) to replace this method by a non-obtrusive methods that more comfortable to measure the blood glucose levels. As blood is not needed in a non-obtrusive method, the patient does not need to cut their fingers every time they want to know their sugar level. It helps a diabetic patient to detect their glucose level, without any pain, distress and being infected with other diseases. Moreover, the proposed system is expected to predict the up-normal levels and alert the patient and their caregivers in order to take the proper precautions when needed. This expected to reduce the emergency situations and save time of healthcare systems in general. Knowing the hardship of diabetic life living with needles, different people have been trying to replace the obtrusive method with a different kind of non-obtrusive technology i.e. Polarization change, Raman Spectroscopy, Fluorescent spectroscopy, Near-infrared spectroscopy (NIRS), Midinfrared spectroscopy, Bio-impedance spectroscopy, spit as analytic liquid and warm discharge spectroscopy [13] . Those non-obtrusive technologies replace blood with spit, sweat, skin, eye, fingertip, ear cartilage and others for glucose level detection. In this paper non-obtrusive prototype utilizing NIRS methodology is proposed. NIRS methodology is one of the most painless and comfortable non-invasive blood glucose measuring technology than the others. None of these method has considered the use of predictive methods to interfere such situations in the future. Most non-invasive blood glucose detecting technology has to be implemented inside the skin and some of them are made as lenses to put in the eyes. Even though they replace the painful finger pricking method of glucose measuring, the patients don't get comfortable to use them every day, not to mention the need for regular maintenance and replacement in case of parts failure. Therefore, as Near-Infrared (NIR) use of intensive light to penetrate the skin and detect glucose level, it will be the most pain-free and promising method of glucose measurement. NIR can penetrate through the skin and detect the glucose level when its range is between 650-1350 nm [14] . It has been used as a sensor that reads the glucose level, by applying them in the thinner part of the body i.e. fingertip, forearm, earlobe etc. NIR gives accurate glucose reading when it applies to the boneless part of our body. NIRS methodology detects the glucose level by placing NIR transmitter radiation of 950nm from one side of the finger. The other side of the finger places NIR receiver (photo-diode) radiation of 900 nm to receive the attenuated light. The change in the intensity of NIR light received BY the photo-detector after passing through the finger used to detect the amount of glucose level in a person. NIR method have also more advantages in sensitivity, complexity, power consumption, cost, and accuracy than the other non-obtrusive glucose detection methodology. In this article, NIR as a biosensor to detect the glucose level in a diabetic patient has been proposed. As NIR is painfree and doesn't cause skin infection, a diabetic patients will be able to wear this device 24/7 hour a day in their wrist as watches. It has no difference than a smart digital watch like the ones sold in the market these days. The device will be able to detect the glucose level of a person every 30 min, configured as a preference when to send the glucose reading, collect data from the patient daily routine and store it in a cloud repository. As this device send the glucose reading every 30 minutes, the patient can detect his glucose before he reaches Hypoglycemia (when blood sugar drops below 4 mmol/L) and Hyperglycemia (when blood sugar is above 11.0 mmol/L two hours after a meal). This device is mostly useful for pediatric age patients because they don't understand when their sugar level starts to drop or go high. Thus, this device will alert the parent by setting the alarm to go off when their child reaches Hypoglycemia or Hyperglycemia, especially at night. Also, this device will help the parents or guardians to monitor the glucose level of their child remotely when he is away from them. It will start to alert them by sending SMS attaching with the current location of their child if the sugar level of their child starts to drop while he away. Last, the predictive Ml model is a futuristic learning model about the expected status of they diabetes level. It can be used as a fore caste of their improving overall conditions. The main contributions of this paper are as follows, -I proposed the use of WSN and NIR as an optical method of the non-invasive technique-based noninvasive strategies to help diabetic patients in continuously monitoring their blood threshold. -Configuration of the system to send SMS alerts in case of up-normality. -a ML model is implemented to predict future events where the patient might have serious issues. -The prediction also draws a future forecast of the patient chart. -Extensive system evaluation and implementation. The organization of this manuscript is as follows: Section 2 outlines the related works of the paper. Section 3 presents the used techniques in this paper as well as the proposed approach, Section 4 proposed the ML model used in this paper, and Section 5 analyzes the performance evaluation of the proposed approach. Finally, we present the conclusion in Section 6. There is a long history of using sensors networks in healthcare systems and medical applications [15] [16] [17] [18] [19] [20] . Sensors Networks can provide patients related vital data and their healthcare providers better understanding into the health states that are crucial to detect and diagnose. Recently, a huge innovations in health information technology have been seem [21, 22] . For instance, the authors in [23] have reviewed the most of these technologies in terms of health sensing, healthcare data analytics, and the use of edge/cloud computing. When it comes to the use of AI, it change the future and perspective of many applications and other technologies. Healthcare systems have been also affected largely in this disruptive technology. The AI has contributed to the fast processing of health information, better understand it, and classify/cluster health data. The authors in [1] have listed the usage of AI in healthcare critical system such as COVID-19. The work in [16] proposed the EPMS which is a WSN-based healthcare monitoring application for epilepsy patients which focused on decreasing the response time for the sudden seizures, protect patients against possible severe consequences and help them become comfortable with the monitoring process. The authors in [24] presented the design and development of a sensor-based system to detect blood glucose non-invasively using NIR radiation using spectroscopic refection analysis. The authors in [25] and [26] implemented noninvasive blood glucose monitoring device using NIR light which is based on optical transmission and radiation respectively. The work in [27] proposed the IR sensor to detect blood glucose level. In [28] , the work proposed a detection system for the glucose level by using infrared light (NIR). In [28] , as in [29] , the authors proposed mechanisms for detecting glucose level by using infrared light (NIR). In their work they used urine samples instead of blood. The works in [30] [31] [32] and [33] adopted the notification properties. In [30] , the authors proposed a home fire alarm system that notify the home owners about the fire detection, while in [33] , the authors proposed an automatic vehicle accident detection and message sending. In summery, the research community is seeing an enabling technologies of IoT in healthcare IoT systems. IoT benefit from their diverse and geographical distribution and the variety of heterogeneous devices is being ubiquitously connected other systems in order to provide collaboratively variable and flexible communication, computation, and availability services. If these capabilities have been integrated with machine learning production features, it can even super-pass all current tradition systems?! To the best of our knowledge, an IoT-based diabetes detection system that use IR sensors, notify the patients guardians and send the current location of the patients, uses a ML model to predict the future problems that might hinder the patient health is still an open research issue. This article is a proof-of-concept to address this issue in a comprehensive manner. There are a lot of non-obtrusive technologies built in order to get over the pain and distress that patients get from the pricking finger method of detecting the glucose level. NIRS techniques are the most pain free and can detect the glucose without harming the skin. In this manuscript, we use the NIRS method to build a bio-sensor for glucose measuring where the sensor clip is made of NIR LED with 950 nm wavelength in one side of the finger, which penetrate through tissue and attenuates the light signal. The attenuates signal will be received by the photo-diode with 900 nm wavelength in the opposite side of the finger clip, the attenuates light will then converted to voltage after received by the photo-diodes. The variation in voltage received by photo-diodes will be received as a result for the glucose concentration in the blood which attenuate the transmitted light. The voltage will be filtered and amplified where the amplified signal will then be changed to analog signal and to digital signal by the micro-controller, in order to be read by the electronic devices. When the result of the glucose level display on the LCD, the micro-controller will differentiate it according to the amount of glucose. When the result is in normal level, it will just show the result with no notifications. Once the results reach certain amount, the buzzer will turn on and the GSM will send SMS message attaching location by the GPS module to the person mobile phone. Figure 1 represents the proposed model. Figure 2 shows the overview of the proposed approach. When the fingertip sample pass between the NIR LED and photo-diode the system will detect the glucose value. It then determine how to react according to the glucose level result. Whether to send an alert message to the registered numbers or not. Figure 2 is only for the diabetic monitoring system. The prediction and forecasting system are being developed in another process, as explained in Section 4.2 (Table 1) . This manuscript worked based on the absorbance of light through different objects. As Beer-Lambert Law is based on absorbance measurement [34] , this low plays a big role Fig. 1 IoT-based diabetic patient monitoring system in this manuscript. Beer-Lambert Law state that absorbance of light through any solution is in proportion with the concentration of the solution and the length path traveled by the light ray [34] . In this project, we try to pass the light through fingertip. When light pass through fingertip it can be observed and scattered by tissue. The amount of glucose level in blood will affect the amount of light either observed or scattered in the tissue. Light attenuation theory [35] describe as represented in Eq. 1: Fig. 2 The flowchart of the proposed IoT-based diabetics monitoring system Where I , I 0 , and L refer to light intensity, incident light intensity, and optical path length inside the tissue respectively. The Attenuation of light inside the tissue depends on the μ coefficient which refer to the effective attenuation coefficient (μ eff ) is given as presented in Eq. 2: Therefore, this equation can tell us based on the scattered light, the glucose concentration in blood. To better assess the patients and make the system stronger, an evaluation using two mechanisms have been applied: one through a proof of concept of implementation of the algorithms proposed in the earlier section, and the second one a simulation that uses Python and the scilkit-learn machine learning library. The first considers the Glucose reading, and the accuracy reading of the Non-Invasive and Invasive. While the ML approach considers the prediction and cost of estimation related tests at different testing samples using real traffic data from the well known AIM '94 dataset [36] . Issues that may arise in real-case scenarios has been explored using the later testing due the acquired predictions values. The systems also looks at how adaptive this scheme and focus mainly on network coverage and data delivery tests. An overall analysis is also considered after considering the results of both evaluations. The system has been trained and run several times. Data has been retrieved from [36] , such that data was captured for an entire set for many samples. This set is specialized in diabetes patient records obtained from: -An automatic electronic recording device. -Data collected from conventional sources, mainly paper work. The data is automatically marked with internal clock to timestamp events. However, the data collected from the papers only provided logical time slots such as time of the food, bedtime, and so on. Fixed times were assigned to breakfast (08:00AM), lunch (12:00PM), dinner (18:00PM), and bedtime (22:00PM). This has no effect on our model as we have diverse data type. For the purpose of implementation and evaluation, we only have done the testing independently on these two categorize to check the variance in output. The features used for the prediction four fields per record. Each field is separated by a tab and each record is separated by a newline. We considered Linear Regression and Decision Tree ML algorithm for approximating the future values. Data training consisted of 30% of the data and the remaining data was used to test the Linear Regression and Decision Tree ML algorithm. Although the paper made use of all the data at the end to train the models, only those two were considered for evaluation with mean and max values. To understand the influence of routine on the overall Glucose consumption, a better understanding of the pattern is needed. Figure 3 represents the mean value of data calculated every hour for two the two different data extracted from the dataset. The data shows that there is a variability of the routine which is important to optimize a hybrid model to optimize the best routine. Finding the best of constant routine calculated based on the maximum well-being of the subject is reference for future treatments. By understanding the data routine and leveraging a machine learning paradigms, an accurate prediction of future patterns at a given time becomes possible. The predicted future values is then used to alert the specialist of possible serious situations. Caregivers also can be engaged and given specific instruction in certain thresholds. The Figs. 3 and 4 represent the average value of routine calculated at different data points for the two diabetes patient records obtained. The results show a data similarity in the case of the decision tree and a bit of variability of the Regression model. This is important to understand at which model the data preforms better. Moreover, we can adjust the number of data points to control the the best variable outcome, which leads to an overall optimize of the used data from both sets. The initial implementation was performed using linear regression and decision tree of the ML techniques. We made use of all the features available in the data-set and mentioned in Section 4.1. The Regular/NPH/UltraLente insulin dose, Unspecified/specified blood glucose measurement, Pre/post-breakfast and Pre/Post-lunch and Pre/Post-supper and Pre/Post-snack blood glucose measurement, and Hypoglycemic symptoms as features to train the algorithm. As shown in Fig. 5a the variance in linear regression model is significantly higher compared to the decision tree model, as shown in Fig. 5b . It's evident that decision tree is given better results taking into account the difference between the points is significantly reduced when the number of the patients increases. This can be also shown by considering the data points as shown in Fig. 5b . The linear regression clearly not feasible model resulting in further deviation between the predicted and true values (fuzzy variations). However, when we considered a 100 patients in Decision tree, as in Fig. 5b , we see the difference between Predicted and True is less than 1%. In the last set of experiments, we have examined the number of patients against the percentage level exceeding the threshold, as shown in Fig. 6 . The figure shows the results collected from the Decision Tree ML model of prediction of the percentage of patients exceeding the normal level of insulin's in their body. The Figure does not show homogeneous data, this is of course due to the fact that we predicting the expected number of patients to exceed the insulin level in their body withing a day period. For example, in the set of 50 patients, we see about 8% of patients that expect to have increase of the level of sugar in their body. This is 4 patients that might be at risk and require immediate attention. Such char is to be review by expert and decide the cause of such values and future change to avoid such problem. In this figure, we are looking at the threshold between 5.7% and 6.4%, which means the sugar in the blood is higher than normal. The simulation settings are presented in Table 2 . This project use one sensor which is the IR Sensor -to measure the glucose level in blood by infrared radiation. The patient 1 350 83 2 361 92 3 372 99 4 384 105 5 401 116 6 416 128 7 435 134 8 457 145 9 466 157 10 472 166 11 499 172 12 506 189 13 514 190 14 528 205 15 536 216 16 549 228 17 568 234 18 577 244 19 583 251 20 591 257 21 608 261 22 619 282 23 634 297 24 649 305 25 668 337 26 679 359 27 833 377 28 868 381 29 934 472 30 1146 501 Fig. 7 Correlation between voltage and glucose readings have to put his fingertip not farther than 0.1 cm from the sensor in order to read the exact measurement of glucose level. The device will take 5 s to display the result on the LCD as well as 7 s to send the SMS attaching with current location of the patient when the reading meet critical condition. The buzzer noise could be heard in a range of 500 × 500 m. The communication range between the device and the SMS message sending, cover every range inside local communication. A sample of 30 diabetic patients have been considered in the test. First we test the glucose reading of the patients by the glucometer (pricking fingertip) method and collect the readings. The proposed model has been used to test the reading of the same patients' sugar level. The glucose reading of the patients have be predicted by the proposed system. Table 3 presents the collected readings. Fig. 8 The relation between the glucose concentration results received from the invasive and non-invasive By considering the data in Table 3 , we use the polynomial regression method in MS Excel to track whether there is correlation between the voltage reading and glucose reading or not as shown in Fig. 7 . All the data collected from the voltage reading in noninvasive method and glucose reading in invasive method shows that there is a correlation between them, as shown in the regression analysis in Fig. 7 . This study help us to predict the glucose concentration by using the polynomial regression analysis and equation applied in the data-set. Thus, the voltage reading received by the photo-diode when the fingertip placed will be sent to the micro-controller to be calculated as glucose reading. When the micro-controller receive analog voltage, it will calculate and display it as glucose reading in the LCD. The relation between the glucose concentration results come from the invasive and non-invasive as shown in Fig. 8 . Table 4 presents the glucose reading between the invasive and non-invasive method. In this project, we have done three testing method to find out the more accurate one. A person in normal condition which is between 4.0 to 5.4 mmol/L (72 to 99 mg/dL) when fasting up to 7.8 mmol/L (140 mg/dL) 2 h after eating. When the person put his finger on the sensor, after 5 s the system will display the result in the LCD. No further action will be taken by the system, when a person is in this condition. 9 151 153 10 85 88 11 182 210 12 198 230 13 208 217 14 211 218 15 197 203 16 94 101 17 123 126 18 134 136 19 142 144 20 153 156 Hyperglycemia when a person above 180 to 200 milligrams per deciliter (mg/dL), or 10 to 11 millimoles per liter (mmol/L). When the system display the glucose level in LCD, after 3 s the alarm will be on. It will continue making noise for about 1 min. Also, immediately after 4 s of the alarm on, the SMS attaching with the current location will be send to the registered numbers of the responsible persons. Hypoglycemia when a person reach a level below 3.9 mmol/L (70 mg/dL). When the person put his finger on the sensor, after 5 s the system will display the result in the LCD. After this, the system will take the same action that taken with the second scenario. For the invasive method to measure the glucose level we use the glucometer. And for the non-invasive method of detecting glucose level the person have to place his finger tip on the sensor. We perform for about 20 times, in both the invasive and non-invasive method of detecting. Figure 9 presents the Bar graph chart that compare the accuracy of the glucose detected by the proposed noninvasive system with the value detected by using the invasive method. To know in which scenario the system give the more accurate value, we try several times with three of them. When a person is in normal condition, the system give the most accurate value. As shown in the chart, we take the average value from all the sample values. For the normal condition, we got average value 115 mg/dL in non-invasive and 112 mg/dL in invasive method. Which The module work the difference between the average values are +3, most accurate value from the other two. Also, as shown in the graph, for hyperglycemia condition we got average value 245 mg/dL in non-invasive and 213 mg/dL in invasive. Which the difference between the two average value is +32, less accurate of all. For the hypoglycemia the average value difference is 92 mg/dL for non-invasive and 85 mg/dL in invasive, which the difference is +7. Thus, in hyperglycemia and hypoglycemia the system difference was a bit greater. Therefore, the system give most accurate value when the person is in normal condition. The last collected results is shown in Fig. 10 . The results show the moving % of threshold and Delay of the system performance. The delay basically shown the endto-end delay from the beginning of the request till the first prediction. As shown in the figure, we notice that we have increased linearly delay when the number of the users increased. We have noticed that there is no much of relationship between the % of threshold and the delay. Figure 11 Shows the developed non-invasive sensing module used for testing. When a person place his finger on the sensor, the result will come as voltage reading in Arduino Uno. When the value is displayed on the LCD, it will show as glucose reading. Figure 12 shows an example in which when a person place his finger on the sensor, the LCD is showing that the glucose level is 76 mg/dl which means that the glucose level of this person is about to reach Hypoglycemia (when a person glucose level reach below 3.9 mmol/L (70 mg/dL). Thus, the device will alert the parents by making noise along with sending alert SMS messages attaching the patient current location to the registered number. The same caution messages will be sent when the person reach hyperglycemia. Diabetic is a simple chronic disease if we know how to manage our glucose level. This manuscript will help diabetic patients, particularly the paediatric age patients, to monitor their glucose level continuously and alert their guardian in critical condition. Most diabetic patients use the traditional technique (pricking finger) to know their glucose level which is painful, stressful and uncomfortable. In this paper the non-invasive method using IR sensor which is pain-free technique has been proposed for continuous glucose monitoring in which the ray emitted by the IR LED has pass through the skin and observe the glucose level by the photo-diode. The glucose level will then be displayed on the LCD as well as it send alert messages when the glucose level meet hypo or hyperglycemia. Finally, SMS by GSM Module along with GPS location will then be sent to the responsible person, when the glucose level reach a certain level. Further, the paper presents a two different ML models namely, Decision Tree and Linear Regression. The ML has been used to predicted the normal surge in the patients body's in the near future. The manuscript prove that the usage of the proposed non-invasive mechanism performs with the highest accuracy along with the shortest response time. Moreover, the ML prediction is a good tool to shows the number of patients at risk, means exceed the normal threshold of healthy surge in the blood. The future work is to use more testing and other ML models. An expert from the medical field is also needed to provide more insight on the process and it's validation. Ai techniques for covid-19 Generalizing ai: challenges and opportunities for plug and play ai solutions An edge computing based smart healthcare framework for resource management Social behaviometrics for personalized devices in the internet of things era How drones can help fight the coronavirus The uses of drones in case of massive epidemics contagious diseases relief humanitarian aid: Wuhancovid-19 crisis An authentic-based privacy preservation protocol for smart ehealthcare systems in iot Iotbsfcan: a smart context-aware system in iot-cloud using mobilefogging Digital twin for intelligent context-aware iot healthcare systems Psychological issues and treatments for people with diabetes The finger-prick sign of diabetes: an observational study including dermatoscopic features Vibrational spectroscopy fingerprinting in medicine: from molecular to clinical practice Non-invasive glucose estimation based on near infrared laser diode spectroscopy Sensors in medicine and health care Sensor medium access control (smac)-based epilepsy patients monitoring system An edge computing based smart healthcare framework for resource management A smart healthcare reward model for resource allocation in smart city Adaptively supervised and intrusion-aware data aggregation for wireless sensor clusters in critical infrastructures Dl-ids: a deep learningbased intrusion detection framework for securing IoT. Transactions on Emerging Telecommunications Technologies Wireless sensors for medical applications: current status and future challenges Recent trends in wireless sensors for medical applications Emerging information technologies for enhanced healthcare Design & development of infrared led based non invasive glucometer Design and implementation of a noninvasive blood glucose monitoring device Smartphone based non-invasive glucose monitoring Infrared-based glucose level measurement Design and development of infrared led based non invasive blood glucometer Measurement of non-invasive blood glucose level based sensor color tcs3200 and arduino Design of an Arduino-based home fire alarm system with GSM module Automatic vehicle accident detection and messaging system using gsm and gps modem A proposed system for automatic vehicle monitoring and accident detection in Bangladesh A novel internet of things-enabled accident detection and reporting system for smart city environments Conference on lasers and electro-optics europe european quantum electronics conference Neural network based light attenuation model for monitoring seagrass health UCI machine learning repository Publisher's Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.