A remote patient monitoring based on WBAN implementation with internet of thing and cloud server

Received Oct 1, 2019 Revised Jan 12, 2021 Accepted Mar 25, 2021 A healthcare employment is the mainly domain in emergent technology of WBAN, and an e-health system created of cloud computing in addition to a WSN considers an important part of this field. An implementation of remotely system for monitoring the patient's vital signs require continuous observation to form low-cost networks with the ability of portability and flexibility and may be applied with separate position and long-term intensive care of peoples in the absence of disturbance of their everyday activities. The patient carries body sensor's patches to get transmitted vital signs continuously to the cloud environment, and a website is designed for presenting and analyzing the data based on designed algorithm. A comparison is made every received measurement with a that stored in the algorithm. In remote specialist care, the execution of confidence and confidentiality conservation is critical, as essential restrictions were being communicating with remote locations. To ensure reliability, the implemented system offers real time monitoring and certification to the patient's condition by means of a medical record, with rapid medical data delivery to the medical staff and can also increase the service delivery ratio of hospital capacity and monitoring of large number of patients with concentrated average delay.


INTRODUCTION
In a typical wireless body area network (WBAN) system, the device of sensing can be either implanting or etching inside the human body in order to permanently be monitoring the physiological parameters or animated signs. The changes that happen in technology are so fast that everything is linked to the other over the internet [1]. The term "internet of things" (IoT) refers to everything that is linked to everything else through the Internet [2], which represents objects connected to the network and multiple objects to each other to process information, make decisions and respond to the physical and virtual world [3]. IoT entities such as telephones, engines, sensors and computer devices create a large amount of data in real time [4]. The best solution is to integrate cloud computing with IoT [5], [6]. Cloud computing is the core virtual infrastructure that can be used with resource efficiency and includes multiple services such as servers, networks and storage [7]. Therefore, the blending of cloud computing with IoT has significant benefits and advantages in terms of automated resource management as well as the presence and use of scalable resources and the use of these resources on demand [8]. There are many people in the world suffering from heart disease and diabetes, which lead to heart attack, heart and kidney failure, and stroke [9]. Therefore, real time monitoring is essential for such patients to avoid any abnormal situations that could endanger their health conditions. The system of monitoring patient health was introduced in [10] using heart rate and blood pressure sensors with IoT-based cloud via Wi-Fi communications. However, the system lacks a real electrocardiogram (ECG)-based monitoring system which has been proposed in [11] utilizing an Arduino processor, cloud, ECG sensor and Raspberry Pi. The system is connected to the internet via a Wi-Fi, the cloud server receives data for processing and sends an alert to health care at emergency when necessary. In [12], a low-power healthmonitoring system has been proposed using a sensors system and a heartbeat Fitbit device that is connected to the processor via Bluetooth. A Raspberry Pi can be utilized as a server for storing and process the vital signs for the patient, which in the case of an emergency sends an alert to the doctor. This system does not support cloud computing and the patient has a limited moving area. An intelligent health-care system was designed in [13] for real time monitoring using temperature, heart rate, ECG and fall sensors and a Wi-Fi protocol to send the patient's data from the device to a cloud server.
The system provides good communications between the doctor and the patient and gives freedom for the patients to move due to using a global server. In [14], an effective monitoring system for elderly patients has been proposed to observe their vital data outside the hospital based on a web server. The data are collected utilizing temperature, heart rate, SPO2 and blood pressure (BP) sensors with ZigBee and global system for mobile (GSM) communication protocols. A wearable energy-efficient health-monitoring system has been produced in [15] with IoT technology and fog computing at a low cost. The system provides monitoring for ECG, temperature and heart rate for patients outside the hospital with automatic analysis and alarm. This system lacks accuracy in making decisions with limited moving space to the patients. A smart grid health system that integrates cloud computing with a wireless sensor network (WSN) has been introduced in [16], temperature, heart rate, SPO2 data were acquired using equivalent sensors, with an Arduino, and sent using a Wi-Fi communication protocol.
The system provides real time monitoring and gives a medical decision depending on the patient's real time data and previous data. However, the system lacks precision in making decisions and, in the event of an emergency, notifying medical services [17]. Several challenges are observed in the systems of the literature mentioned above, such as patient coverage area, the accuracy of decision-making, database, alerts, real time monitoring from any location and size of the device. This has interested us for designing with implementing a wearable wireless-based health-monitoring system that reads several vital parameters and makes a decision based on an algorithm that is stored on the cloud to contact the required person in the case of emergency [18]- [20]. The system measures the patient's data using several sensors and sends the real time data to the cloud server utilizing an Arduino controller. The data is stored in the cloud using a specially developed algorithm to monitor the condition of the patients automatically [21], [22]. The system provides flexibility and interaction between the patient and the medical staff through alerts with high accuracy in making decisions. There are many problems facing health institutions and caregivers when providing medical services to a large number of patients [23]- [25].
There are also many problems facing the patient when receiving treatment or medical advice such as limited bed capacity in hospitals as well as the lack of medical staff compared with the number of patients According to that, it is important to establish a health system to avoid these kinds of problems, and real time data presenting and relief from manual data collection, which is exposed to errors in data entry as well as increasing the number of monitored patients with few health-care providers, in addition, increasing bed capacity at hospitals and avoiding delay when a patient's data is delivered to health-care providers.

METHODOLOGY
The proposed system introduces wearable vital signs combined with wireless BAN (WVSBN). It consists of a wearable device in addition to the cloud server. Such devices include a temperature sensor and pulse oximeter sensor, was connected with the microcontroller type AT mega 328P, which sent data from sensors to the cloud server via Wi-Fi (ESP8266) using the HTTP protocol. The server, stores, display and analysis of the data then compares the WVSMS signs to the patient's benchmark signs. Through the process of integrating the variables, the cloud server sends alerts by SMS if the signs do not match normal signs; alerts are sent to multiple destinations: (1) patient helper, (2) the doctor, (3) ambulance, as shown in Figure 1.

WVSBN
The performance of the device is concerned with better comfortable for the patient when the device is wearing, first the minimized size by designing of a two-layered circuit using the program EASY-EDA where the circuit was made of 1.6 mm thick fibreglass with a 4.8 cm length and a 3.8 cm width as shown in Figure 2, which is characterized by low cost and low power. The wearable device comprises of many components that can be considered as a major like a microcontroller and sensors that connected by wires to the microcontroller in additions to a system on a chip with a built-in TCP protocol and OLED which considers as an advanced electronic piece preferable than LCD screens as shown in Figure 3. The Microcontroller type ATmega328p is chosen for controlling processes the received data from the sensors and then sends it to the server via the hypertext transfer protocol (HTTP). Three health parameters as sensors can be monitoring in continuous real-time like a negative temperature coefficient (NTC), heart rate, in addition to SPO2. NTC is used to measure the skin temperature as a type of the temperature sensor. The pulse sensor measures the heart rates number with beats per minute (bpm). The pulse oximeter is a measure of the level of oxygen in the blood. It is through the properties of light absorption of blood that is based on the principle of measurement of oxygen. While SPO2 can be applied for measuring the oxygen rate within the blood with infrared light and a red light. This sensor has infrared and red lamps which light emitting with different wavelengths. Such system on a chip with a built-in TCP protocol represented by ESP8266 is capable of providing access to a programmable Wi-Fi controller. It can organize an application beside uploading Wi-Fi network functionality from another application. Finally, OLED that considers an advanced electronic piece better than LCD screens with a low power consumption, high resolution 128x64 pixels with voltage ranging from 3.3 to 5 V. It has an easy connection with Arduino. Therefore, it can be applied for indicating vital signs like temperature.

Cloud server
Owing to the restricted memory and capacity computation related to sensor nodes, in addition to keep away from the smart phone adoption to be processed unit, the data collection from sensors such as wearable sensors can be sent to the cloud server instantly. With cloud computing technology improvement, the WVSBN data is successfully stored and processed on the cloud. Some functionalities can be cloudy performed: - The storage data and processing. A group of sensor signals are gathered with WVSBN, comprising the blood pressure, temperature of the body, and heartbeats. A considerable feature can be recovered for detecting and identifying possible heart disease; though, noise is frequently existed through the transmitted data, that will affect potential disease diagnostics. So, a technique of data-filtering can be adopted for avoiding the unacceptable data. Also, the accurate diagnostics of a possible diseases often necessitate confirmed size of historical data; thus, an establishment of cloud database within the WVSBN-Cloud for storing the sensor data for any individual users of WVSBN. -Notifications: The variable data is stored in cloud server then a comparison of the normal data with specified algorithm which depends on data combining. IF the data seen abnormal, then alerts signal is sent by the system to the doctor, ambulance, in addition to the patient assistant through SMS messages. -Disease notification and identification. An unexpected heart attack often earnestly threatened life of somebody, who suffered cardiac diseases. WVSBN intents for avoiding patients from these attacks, and from important for the health condition patients to be monitored and realized. Additionally, any abnormal sensor reading or suspicious must be recognized and alarm signals be sent for identifying users, like doctors or family members.

Figure 3. Component of WVSBN
The WVSBN-cloud implementation is depending on a HTTP server as well as storage server which is MySQL database. For example, the interface which presents a temperature body real-time and heartbeat data can be shown in Figure 4. As the power is turned on, the temperature from the thermistor is measured, as well as the heart rate from of the pulse meter sensors. This detail will be automatically uploaded to the Cloud computing server, where they will be shown in real time on the website. At the same time, a similar mechanism can be applied for other sensors and data and the cloud information is essential to employers for self-monitoring their health condition, as well as doctors for diagnosing potential diseases. If there is abnormal condition noticed, then alert signal must be generated for certain stakeholder, that contain text message to their family members or doctors, this alert can be demonstrated on the user's LCD. A cloud computing characteristics cab be represented by storage capacity and speed of performance and flexibility, and hence the cloud was used in providing telehealth services [17].

PROPOSED ALGORITHM
The introduced scheme's first contribution is focused on a built-in trust energy-efficient and reliable communication mechanism for verifying trust by data transmission. The entertaining strategy has been accepted in order to build confidence among bio-sensors in order to create a trustworthy network. Using the trust certificate, the trust is also created at the remote medical server. To our understanding, the cooperative sensing technique has never been used in WBAN before, along with the trust algorithm for trust management. In this section, the proposed model is thoroughly explored. Bio-sensor nodes in WBAN remote patient tracking systems detect a variety of body vital signs. WVSBN, as well as the wireless connection from the node to the server, the mechanism of delivering updates, and the flowchart algorithm, are all included in the implemented scheme.

Wireless sensor node
For improving reliability in WBANs, the device model and network architecture of the proposed wireless sensor nodes contact method are discussed. This device model and architecture are focused on heterogeneous sensor networks, which are connected to the human body and include a heat sensor and a heart rate sensor for SPO2 measurement. The processor which is attached to these sensors (ATmega328p). The sensor node's function represents by collecting data from sensors with a predetermined delay and then show it on a mobile device's computer. Wi-Fi is used to send the data to the computer. Every 30 seconds, the data at the site is updated, as seen in Figure 5(a).

Cloud computing web server
The cloud server collects and processes data as well as providing updates to the patient in the incident of an emergency. As it receives data via Wi-Fi from an HTTP protocol, it also functions as a realtime program, transmitting the data to the server. The analysis of data in a cloud server based on three variables can be combined to control the status of patient's health, which is based on a series of vital signs that includes temperature (extreme, very high, average, low) and five levels heart rate (starting from low to very high degrees). SPO2 can be classifying with three level categories (starting with low, very low, and normal) and has been classified by a medical specialist. A decision is taken depending on the data integration, for example, notifications are sent to parties involved (ambulance, doctor and patient assistant). Taking the average of the last 10 readings, the party to which a message is sent is calculated, As seen in Figure 5(b), this improves the accuracy of making the correct decision.

RESULTS AND DISCUSSION
The patient monitoring system's website displays data obtained from the patient's component in real time, representing both date and time, where the monitoring team can access the website from anywhere in the world because of a global server application, the data were periodically updated on the web page every 30 seconds, where the proposed system is characterized by high speed real-time data display as shown in Figure 6.

Alert notifications
Alerts are one of the basics of the electronic health system as it works to prevent the patient's health from worsening in the proposed system that channels alerts to three groups (ambulance, doctor and patient helper). The decision to submit a notice shall be decided on the basis of the consolidated data and not on the basis of the alteration of the individual data such that the notification is sent to the concerned parties after the process of combining the data and each probability corresponding to a given procedure. The aim of this function is to ensure that the procedure is sent to the party involved according to the patient's condition, for example, when the temperature is normal but the heart rate is elevated and attended by a SPO2 decreasing, in this case, the system sends a notice to the ambulance because the patient's condition is critical and cannot be delayed, as well as the rest of the cases. Table 1 shows each procedure and the condition of the investigation. A message will be sent an advertisement to the ambulance as well as to the doctor and patient assistant at the same time 3 If 50 < Heart rate <60 or 100< Heart rate <120 Send announcement to doctor as well as to the patient assistant The composite of the last 10 readings defines the agency to which messages are sent, making it more reliable in making the correct decision. The program takes one decision of the subsequent levels based on the significance of the patient's illness: a. Ambulance: This technique is used if the incoming tests indicate a critical state such as a temperature rise of more than 41°C, a pulse of more than 100 beats per minute but less than 55 beats over minute, or maybe a low oxygen saturation level less than 80%. With this condition, a message including the patient's contact information is delivered to the ambulance, as well as the doctor is told to monitor the patient in a vital state. The note also incorporates the patient's rate for the next 10 readings. The medical assistant is now told that the ambulance is approaching him to ready the patient for transport to the hospital. b. The doctor: If the received evaluations are irregular but do not indicate a critical condition, represented by a pulse rate exceeding 100 beats per minute or a low pulse of less than 60 beats over minute, this treatment is considered. In this scenario, an SMS containing a series of 10 incoming readings is sent to the doctor, allowing him to assess the condition and take appropriate action. c. Patient assistant: When the patient's condition isn't life-threatening and you don't need to call a doctor or an ambulance, such as when the SPO2 is 80 percent or else the temperature is a little high, a message will be send from the device to the patient's assistant, instructing him to either give oxygen to the patient or warning him for monitoring the temperature patient.

Save patient's historical data
The suggested method requires all patient readings in the form of an Excel file to be accessed. This file includes the readings (heart rate, SPO2, temperature) and the time and date at which each reading is registered, representing a consistent medical record, as seen in Figure 7, showing an average of one patient's historical data over two weeks. In terms of patient data collection, patient mobility and warnings, as well as the size of the system, the proposed system was contrasted with a number of prior studies for comparison. The proposed system gives more suitable conditions for the healthcare monitoring with an addition of SMS messages immediately for all the corresponding cases. A database is added to the system and the unlimited patient mobility can be considered as an addition to the healthcare WBANS.

CONCLUSION
The use of cloud computing in health systems has made major improvements in the healthcare services provided to patients. This paper describes the creation of a cloud-based electronic health system for monitoring and controlling a patient's vital signs in real time. Furthermore, in addition to the convenience of the patient, the proposed system seeks to conserve patient data and reduce the pressure on hospitals, where the device is reduced to the greatest degree possible and is viewed as a low-cost device. Based on the data integration algorithm, the recommended system depends on messaging to send warnings to health care providers. The framework attempts to provide constant tracking of patients at home and elsewhere in the world where the global cloud server can be often used, empowering patients to access and track health care providers from anywhere easily by signing in to the platform, uploading previous data, and accessing the web page data. The purpose of the proposed mobile system is to distribute the devices to all patients in the cities and towns in order to be monitored and preserved by medical staffs.