Wearable Sensors Based Remote Patient Monitoring using IoT and Data Analytics

Quality of life is reducing due to numerous reasons such as poor eating habits, tobacco consumption, sedentary lifestyle and stress which all taken together to lead to several and sometimes serious health problems. The scenario becomes worse in rural areas due to the limited availability of clinical facilities. Here, people have to visit hospitals, specialist doctors in cities for proper treatment and this results in waste of time, money and resources. To mitigate such problems, wearable sensors based remote patient monitoring system using IoT and data analytics has been proposed. The proposed system is specifically aimed for cardiovascular diseases and can be used to monitor the health condition of a patient even when he is at home, on the farm or any other place. The system also incorporates data analytics for the monitoring of the historical and current status of the patient’s health. The system is implemented using low-cost and compact components such as Arduino Nano, ESP8266, MAX30100, DSB1820 etc. Author


Introduction
Every year the number of deaths due to cardiovascular diseases are increasing (Benjamin et al. 2018). There are numerous reasons for this situation including obesity, tobacco, alcohol consumption, and/or sedentary lifestyle. The patient who suffers from such a disease may need to go to a hospital for a checkup with a frequency that depends on his health state. Over a certain threshold, this results in wastage of money, time and resources and the picture is worse in rural areas where people may have to travel far distances. In most of the underdeveloped countries, the medical facilities in rural areas are not satisfactory (Deo 2013). People have to travel far in order to get adequate medical treatment in hospitals and healthcare centers situated most of the time in urban areas. Therefore, it is essential to have systems which can analyze the patient health remotely with little intervention of a doctor or other medical professionals. Khoi et al. (2015) stated that it is important to develop for IoT-based remote health monitoring systems that take care of the health of elderly people and provide them home comfort. Their major contribution was to study the network communication requirements of an IoT-based remote health monitoring application and to propose an architecture for evaluating and comparing several network communication protocols. Mohammed et al. (2014) developed an Android platform based mobile application, called 'Electro Cardiogram (ECG) Android App', for the healthcare domain. The application combines Internet of Things (IoT) techniques and cloud computing and provides each end user with a visualization of his ECG waves and data logging functionality in the background. The recorded data can be uploaded to the user's private centralized cloud or to a specific medical cloud, which keeps a record of all the monitored data and can be retrieved for analysis by the medical personnel. Their main emphasis was on designing the system and software architecture which is essential to overall IoT and cloud-based medical applications. Gómez, Oviedo, and Zhuma (2016) developed an architecture based on an ontology capable of monitoring the health of patients with chronic diseases and providing workout recommendations. Authors had implemented the system by designing the context model. Liu (2010) proposed the remote patient monitoring for the general ward in the hospital. In his approach, a sensory system is placed in the general ward bed of the patient so as to measure his vital signs. This system contained a controller for receiving and display data of sensors and then transmit these to the centralized controller using wireless modules. They found ZigBee as the best suited wireless data communication module because of its energy efficiency, security and less interference as compared to Bluetooth. Archip et al. (2016) developed a prototype of remote patient monitoring for patients who undergone a surgery. The overall functionality of the system is done using RESTful based web interface (Singh et al. 2015) and provides flexible mechanism to add new components. Other researchers also proposed alternative solutions for remote patient monitoring (Habib, Torjusen, and Leister 2014;Oleshchuk and Fensli 2011). However, most of the work in the state of the art have not demonstrated or their scalability to real-world use-cases, unfortunately. Archip et al. (2016) work is promising as they demonstrated and evaluated the prototype but their use-case targeted post-surgery patients and the cost and complexity were not taken into consideration. This paper fills the gap by providing a solution that can be both implemented and scalable. In our approach, the remote patient monitoring system should expose the following five features: 1) produce accurate results and affordable, easy to use and comfortable to wear. 2) capable of measuring vital signs of the patient using anywhere and anytime approach. 3) perform data analytics in order to compare the patient health parameters and make a decision if required. 4) provide a simple yet efficient communication mechanism for the doctor to collect the health information of the patient. 5) support a secured GUI platform for the doctor/patient to visualize all the parameters and details of the patient while still maintaining a reasonable level of privacy. With the above considerations in mind, this work develops a wearable sensors based remote patient monitoring using IoT and data analytics. IoT is one of the emerging technologies which has found an important role in a broad range of applications such as industries, smart cities, data mining, assistive systems, wireless sensor network etc. It is integrated into our proposed application to provide communication over the internet for multiple purposes. First, the proposed system will allow the users to monitor their health status at their convenient place and time. Second, it will enable the communication with a cloud platform so that data can be fed in the cloud and read and analyzed by a professional practitioner. Third, it will provide email and SMS alerts in some specific situations. Finally, it may generate early warning signs of critical diseases based on the health status. Note that the system does not give the information about any specific diseases. Rather, it provides the information to the doctor based on special parameters. Specifically, it measures the health parameters such as blood pressure, heartbeat rate, blood oxygen, and body temperature. The system connects to the IoT platform in order to upload/download the patient data from the specific channel. Then, the local GUI displays the parameters to the patient and generates e-mail and SMS alerts in required circumstances. In this paper, we assume an area with internet connectivity of speed above 512Kbps. The data packet can be lost during the transmission of the data so after sending the data to the cloud, the system will check if the data has been uploaded or not. There is a unique channel for every patient so there is no interference with the data of other patients. The advantages of the proposed system are its simplicity and low-cost. The system has been tested in a normal environment condition where the temperature varies from 15 to 30 degree Celsius. The limitations are its requirement for an active internet connection and its eventuality for not being suitable in extreme environmental conditions. Document outline: Section 2 discusses the proposed system including the internals of every system block diagram and architecture adopted; Section 3 demonstrates and evaluates the results of the approach. Finally, Section 4 concludes the paper. Figure 1 illustrates the diagram flow of the proposed system. It consists of various building blocks, each responsible for a specific task. These blocks are sensing block, information control block, data transmission block, data monitoring block, alert generation block, and local display block. Each block is discussed in the subsequent subsections.

Sensing block
The sensing block is responsible for measuring the health parameters of the patient. We have considered four health parameters which are basic and important parameters for cardiovascular diseases (Liu 2010). These parameters are the heart rate, the blood pressure (systolic and diastolic), the body temperature, and the blood oxygen. Each sensor is interfaced with the controller using a specific communication interface. The heart rate sensor is MAX30100 (a pulse oximetry type sensor) which generates pulses based on heart rate. It measures the change of blood volume through any organ of the body (generally finger). This sensor generally make use of one light source and one photodetector such as LED with LDR or Infrared LED and Infrared Photodetector. The electrical output of the detector varies in accordance with the heartbeat. This output is given to the signal conditioning circuit which is generally designed by using an operational amplifier which converts the photodetector output into pulses and measurable by any controller (Arora et al. 2014). Heart rate is measured into BPM (beats per minute) so it is important to measure the number of pulses in 1 minute. This can be done by writing suitable firmware for a microcontroller. Figure 2 shows the sensor section block diagram. In this figure, the blood pressure sensing is important. There are two parameters associated with this sensor, namely the systolic and diastolic. We have used an automatic blood pressure monitor which can be worn on the wrist and which can communicate with any controller using UART on 9600 baud rate. It gives the 15 Bytes output which consists of systolic, diastolic and heartbeat rate. Additionally, it can store up to 60 readings and works on 5V. DS18B20 is suitable for body temperature monitoring in our system. It is a 1-wire protocol based digital thermometer which requires only 1 pin for the communication with the controller. It has an accuracy of ±0.5°C which may not be acceptable in some health applications but can calibrate the resolution as per the standard thermometer. It is available in a plastic package for general applications and metallic packages (waterproof) for the measurement of temperature even in liquid. Metallic package is preferable for our application as the sensor can be inserted in the mouth or placed in the armpit. The MAX30100 is used to detect pulse oximetry and heart-rate signals and it combines two LED: a photodetector, optimized optics, and a low-noise analog signal processing. It can operate from 1.8V to 3.3V power supply and can be powered down through firmware with negligible standby current, allowing the power supply to remain connected at any time.

Controller block
The controller block consists of an application specific microcontroller. It is responsible for controlling all the peripherals and processing of the required information. For our application, we make use of Arduino Nano due to its compact size, power consumption, and the availability of resources. It communicates with different peripherals using communication interface required by the specific peripheral. The program is written by using the Arduino IDE 1.8.7. Figure 3 shows the flowchart of the firmware design.

Data transmission block
This block is mainly responsible for wireless communication between application and IoT platform and it acts as a gateway for the IoT platform. In this block, data can be transmitted to the internet using a Wi-Fi module and a Wi-Fi access point. This block is responsible for the integration of IoT in the proposed approach. It firstly waits for the appropriate data to be received from the controller block. Then, it sends the compatible data to the cloud platform and reads from the cloud when necessary. It also sends the data for E-mail or SMS alert for the purpose of early warning messages or emergency messages. ESP8266 module is used as a wireless data transmission module in the proposed system. This is a highly integrated Wi-Fi SoC solution which can be used as a simple Wi-Fi module for IoT applications. It can also be used as a standalone module in any application because of its GPIO pins and can work as per user requirements by designing suitable firmware. Its firmware can be designed using Arduino IDE and can be transferred using USB to TTL module. ESP8266 module is operated on 3.3V and interfaced with microcontroller using UART communication.

Data monitoring block
The data monitoring block is used to display the current health status of the patient. The doctor can take any action based on the displayed data if required. Online data logging block keeps the history of the health conditions of the patient. It also makes use of data analytics to keep the record of some parameters which would help the doctor to analyze the condition of the patient. It can tell us about the recovery of the patient and the doctor can make changes in medications accordingly. On the other hand, the patient can also view this block for his historical record of health status. A doctor may have a number of patients, so this block will display all the details about the patients such as patient ID, name, age, and gender. It can improve patient monitoring in a number of ways. First, it allows the users to monitor their health status at their convenient place and time. Second, it allows the health report to be uploaded to the cloud, thus helping the doctor in taking decisions accordingly when changes are noticed in the health status of the patient. Data monitoring block is shown in Figure 4.

Local display block
This block allows the patient to check the parameters after the health monitoring. Two types of local display devices have been used. The first type makes use of alphanumeric LCD, whereas the second allows the visualization through a GUI software on a computer. The later approach shows the measured photoplethysmogram (PPG) waveform at runtime.

Alert generation block
This block compares the current health report of a patient against the recent reports. In other words, it takes the average of heartbeat observed in the last predefined time window (e.g. 7 days) with data observed in next equivalent time window. Then, it generates alerts in some critical situations such as abnormal heartbeat rate and/or blood pressure and/or blood oxygen level. If there is any significant improvement in the patient's health, then it conveys the information to the doctor via e-mail. The PPG waveform visualization is sent to the doctor if the patient makes use of GUI application. However, this visualization may not be received by the doctor if a patient does not opt for it. The early warning sign alerts will be sent to the doctor and patient if his health keeps degrading. It will inform about the possibility of any diseases. For example, if the patient keeps having higher heartbeat rates then there may be a possibility of cardiovascular disease. Although, the system does not claim any specific disease, it will inform the doctors if any symptom is found and the final decision can be taken accordingly.

Architecture of the adopted system
Wearable sensors consist of various sensors to sense the health parameters. They communicate with the microcontroller unit (MCU) by using communication protocols like I 2 C, UART, 1-wire, GPIO, etc. The MCU calibrates the data received from the sensors so as to nullify the error of the sensors. This data will be displayed on the alphanumeric LCD and the GUI software named as "Processing". The same data will be sent to the Wi-Fi module by MCU for IoT related tasks. Wi-Fi module will then communicate with the Wi-Fi router available at home, office, hospital or any other place. If the Wi-Fi router is not available, then mobile hotspot can be used as a Wi-Fi router in the proposed system. Figure 5 shows our adopted system architecture. The data is processed after transmitting it over the internet. This data is uploaded to the specific channel of the ThingSpeak IoT platform and there is a different channel for every user so as to differentiate between data (MathWorks, n.d.). The data available on ThingSpeak are monitored on the computer, mobile phone, or tablet using a website or applications. All the channels are made secured so that anyone can only access it after authentication, based on login id and password. Email alerts and SMS are generated in desired conditions through the internet.

Evaluation Results
The system was deployed in a house equipped with a Wi-Fi router and internet connectivity availability of 1 Mbps speed. The system has been running continuously for two weeks in order to collect enough data for our analysis. All the five selected parameters (i.e., the heartbeat rate, systolic, diastolic, blood oxygen saturation, body temperature) were monitored and uploaded to the ThingSpeak channel. The privacy of the ThingSpeak channel can be configured by the users. For our application, the channel was kept private as it contains patient personal information such as Name, ID, age, DOB, etc. Figure 6 shows the ThingSpeak channel created for the proposed application. The data were visualized in the form of a graph and all the variations in the parameters were observed. Heartbeat rate data are stored in field 1, while field 2 contains the average of all the heartbeat readings in a week. The Y-axis represents the health parameter while the X-axis represents the date. Figure 7 shows the time and date of specific data when the cursor is pointed towards that data as well as the field 1 and field 2 values. The systolic and diastolic values were uploaded to field 3 and 4, respectively. Similarly to the heartbeat rate, blood pressure values were recorded and uploaded over the period of two weeks. Figure 8 shows the visualization of blood pressure (systolic and diastolic). The other parameters were the body temperature and blood oxygen saturation. Body temperature of a healthy person should be around 98.4 degrees Fahrenheit, while the blood oxygen saturation level should be always greater than 90% and the range from 95% to 100% is considered as normal. Field 5 is used to store the values of body temperature (in Fahrenheit) and Field 6 contains blood oxygen saturation values. Figure 9 shows the visualization of these data recorded over two weeks of time. In the experimental setup shown in Figure 10, Arduino nano was used as microcontroller due to its low cost, small size, and resources availability. ESP8266 is used as Wi-Fi module due to its low cost, features, and ease of programming. There are few energy efficient Wi-Fi modules available but we selected ESP8266 because of its simple operation and ease of use. In our approach, the power can be provided via USB. The MAX30100 sensor is used for heartbeat rate and blood oxygen saturation measurements. It also supports some low-power options which can be configured using firmware but we did not consider it as a major requirement. Automatic blood pressure monitor, which can be worn on the wrist, is used as shown in Figure  11. It could be turned ON/OFF by using buttons placed on the sensor or via MCU as per firmware. For body temperature measurement, DS18B20 in the waterproof package has been used and calibrated in order to produce accurate values. The tests were conducted in a normal environment such as home, offices and were not tested in any severe environmental conditions. Alert messages can be generated by the system if required. The alerts were generated at compile time by providing pseudo values to the microcontroller. However, there was no such situation found in our tests in which alert messages were required and this is clear from the health parameters seen in ThingSpeak channel. A button known as "Test begin button" is used in order to start monitoring the health parameters. The test lasts for 1 minute and all the parameters can be visualized immediately after taking the test on local display as well as IoT platform. Most of the parameters used are drawn from use-cases given in the state of the art (Archip et al. 2016;Liu 2010).  The software name Processing has been used to visualize the PPG waveform at runtime on the computer. This data can be seen by the patient while taking the test and the screenshot of this operation will be sent to the doctor via email (as the part of daily health report). Figure  12 shows the PPG waveform on processing software. The data has been displayed on alphanumeric LCD of 16 columns, with 2 rows as shown in Figure 13. In the first row, the heartbeat in beats per minute (BPM), Systolic and diastolic are shown. In the second row, we have the body temperature in degree Fahrenheit and blood oxygen saturation in percentage.

Conclusion
In this paper, we demonstrated the performance of an IoT enabled remote patient monitoring which fulfills all the requirements for a typical use case. The proposed system is designed in a cost-effective way and it is suitable for rural areas patient who do not have standard health services nearby and may have financial limitations to visit professional practitioners in downtown. The proposed system has been implemented and operated for the period of two weeks. Various sensors, microcontrollers, and wireless communication technologies were studied and the best-suited components were used. Sensors were calibrated in order to produce clinical accuracy. Alerts were tested while running the application but no alert message was sent in the considered scenario because there were not any such conditions after deployment. Thingspeak IoT platform by MathWorks was used because it is an open source platform which is efficient and easy to use. It provides the options of the private or public channels that can only be accessed by entering authorized login ID and password known by both the doctor and patient. In a nutshell, we strongly believe that the implementation of such a system can be beneficial for the targeted population.