Streaming in-patient BPM data to the cloud with a real-time monitoring system

Monitoring the heart activities for old people or people with medical history (Arrhythmia or CHD) is targeted by most new medical technologies. This paper demonstrated an in-patient real-time monitoring system for heart rate estimation. A ratio of beats per minute (BPM) is continuously recorded, streamed and archived to the cloud via WeMos WiFi development board. This cost effective system is simply based on two sub-systems: BPM data acquisition through pulse sensor and WeMos-based communication systems. The streamed BPM data are saved instantaneously in Google drive as spreadsheets which can only be accessed by authorized persons wherever the internet service is available. Thus, the person in charge can remotely observe the patient’s status and do analytics for the archived data. A pilot study with eight subjects was carried out to validate the developed BPM tele-monitoring system. Encouraging results have been achieved.


Introduction
Real-time continuous monitoring for physiological parameters of patients are very essential to their daily health care [1]. One of these physiological parameters is the heart rate (HR). HR, which is also known as a beat per minute (BPM), is the number of contractions of the heart per minute. Several heart diseases are associated with the change of the HR variability [2][3][4]. For example, low heart rate variability is associated with incidence of Coronary Heart Disease (CHD) which is a common cause of death in the worldwide [2][3][4]. Moreover, arrhythmias (Abnormal heart rhythms) are consequences of underlying heart diseases and comorbidities, they are the most common cause of sudden cardiac deaths (SCD) [5]. Thus, patients with such medical conditions need continuous/periodical monitoring for their heart activities especially the HR. Recording and archiving BPM data for those in-patients or out-patients let physicians do the correct decision in case of health deterioration. Therefore, an efficient solution for continuous real-time monitoring of HR is required, particularly in patients with chronic heart disease that is able to collect and archive the data in order to observe it remotely. For the purpose of keep tracing the health status of patients with chronic disease, the tele-medicine health care system has been applied [6][7][8]. Such systems are implemented in hospital specifically in the Intensive Care Unit (ICU) because its technologies are used to improve efficiency and decrease cost [9].
Recently, tele-medicine systems are one of the most expanding research areas in the field of biomedical engineering [10]. The expanded researches in tele-medicine systems cover the area of the healthcare and monitoring system particularly for the distant patients [11,12]. The tele-medicine system can be used for real-time monitoring of the physiological parameters of hospitalized and/or distant patients with chronic disease and/or disability [13].
Tele-monitoring healthcare system, which is a type of the tele-medicine system, has been used for monitoring the health status of patient at distance, such as home or office. This is done by using various applications of information and communication technology [8,14]. The tele-monitoring healthcare system not only has positive effects on patients' health status and their quality of life but also has positive economic impacts on the patient and the wider society [7,8]. Numerous studies of continuous tele-monitoring healthcare systems are discussed in the literature. However, the majority of the presented systems did not take into  [17]. Message Queuing Telemetry Transport (MQTT) messaging protocol has been used in real-time monitoring [18]. MQTT was used in integration with ESP8266 Wi-Fi module for heart rate monitoring. A commercial Bluetooth UART compatible was also used with a 3-in-1 bio signal-processing chip for Brain-Heart monitoring [19]. In 2016, a system proposed by Aulia et al, used a single ECG lead connected to ARM-Cortex M4 with a Bluetooth Low Energy (BLE) for heart rate monitoring [20].
This paper presents a cost-effective technology for streaming HR to the cloud using WeMos WiFi development board and Google Drive service, which is free of charge. Eight healthy volunteers were participated in this study and their data have been streaming to Google online spreadsheet instantaneously. Moreover, the captured data have been compared with a comerical wearable device as well as state of art systems.

System Overview and Architecture
The proposed monitoring system consists of two sub-systems: BPM data acquisition and communication system based on an open source IoT platform WeMos D1 V2 in addition to the monitoring center. The WeMos development board uses a low cost System-on-Chip (SoC) WiFi module ESP-8266EX. It is used as microcontroller and communication technology in the proposed system. WeMos supports IEEE 802.11 b/g/n and has eleven digital I/O pins and single analog input pin with on-board antenna and 4 MB of flash memory [21,22]. The module is supported by Arduino integrated development environment (IDE). Therefore, this environment was used to program the monitoring part. The technical specifications of the module are shown in Table 1. The pulse rate sensor module basically consists of two parts: light emitting diode (LED) and photo-detector [23]. These components are arranged side by side making the light transition based upon reflective method rather than the transmission method. The LED sends light to the finger and the intensity of the reflected light is measured instantaneously by the photo detector. The output of the photo-detector involves the heart pulsating wave that will be used in the determination of BPM. Thus, the output of the sensor will show a series of peaks synchronized with the heart beats.
Regarding to the cloud service, a cloud storage solution from Google has been used in the proposed system in order to store the BPM values over time. It is a free of charge service provided by Google Inc. and allows users to store files up to 15GB which is adequate for monitoring system with multiple patients. Moreover, it offers services such as spreadsheet to store data and make charts and graphs online with the possibility of using the saved files in offline mode. Each spreadsheet on the Google Drive has a unique key which is necessary in the programming part.

Hardware Configuration
The pulse rate sensor module is connected to the WeMos Wifi development board through ADC pin (A0), while two more pins 3V3 and GND are used for powering the sensor. A micro USB cable is used to supply power to the entire system.

Software Development
A software algorithm has been developed in order to manage the data collecting and hardware communicating. It uses Arduino IDE that can connect the system to the cloud through a WiFi connection. The developed algorithm should contain the Service Set Identifier SSID, password of the WiFi network and the address of the spreadsheet in order to store the BPM data inside. Moreover, the name and key of the spreadsheet were embedded in the Google script before publishing. Furthermore, a permission of data saving is enabled in the script in order to start streaming.
The person who is responsible for monitoring is able to remotely observe the instant BPM and the variation over time of a patient by accessing the spreadsheets on the Google Drive. Data are presented in three columns, ID, time and rate. A simple chart can be produce from the stored rates and the time. Moreover, the BPM can be monitored locally through the serial monitor window on the Arduino IDE. The processing scheme and the overview architecture of the proposed system for monitoring and streaming in-patient BPM data are illustrated in Figures 1 and 2, respectively.

Subjects and Data Acquisition
Eight right handed able bodied subjects (age: 40 ± 6 years; height: 176 ± 6.2 cm; body mass: 73.5 ± 7.6 Kg) took part in the study. Their participation was completely voluntary and every one of them had the right to quit her/his participation whenever s/he wants. All subjects had the chance to be familiarized with the experiment apparatus and procedure with a written consent form. The subject's anonymity will be conserved through data analysis and results publishing. Thus, every subject will be denoted by a specific number and all experiment recordings will be saved in a safe location to be accessed only by authorized persons.
Every subject was seated comfortably and the sensor placed on her/his index finger. The sensor principle based on the fact of differential absorption characteristics of the blood in the finger due to heart beating. The picked signal was directly processed by WeMos board and its data were transferred to Google spreadsheets through a WiFi connection and saved on the Google Drive. The experiment is completely safe and will not affect the participant's health. Therefore, there are no potential risks or discomforts.

Results and Discussion
After design and implementation of the proposed heart rate tele-monitoring system. Eight subjects have been asked to participate in the study in order to validate the implemented system. The proposed system has been compared with comerical system (Sanitas digital wrist blood pressure monitor (SBC22), German) in terms of HR monitoring. Table 2 shows the avarage BPM of the proposed and comerical systems. The difference between the readings of the two system is stated as an error. The maximum difference was 2% which is considerably acceptable. A quantitative analysis study demonstrated a small absulate error of the HR measurement acquired by portable systems comparing to ECG based HR measurement systems [24]. However, this absulate error is acceptable when take into account the cost effective and the simplicity of the portable system.
The proposed system has not only been compared with SBC22 system but also has been compared with state of art systems in terms of type and position of the sensor, experimental protocol, type of communication methodes, and accuracy of the reading. Table 3 shows that the experimental protocol and number of subjects have not been mentioned in most of the literature which are important to validate the system. The type (optical) and the postion (fingertip of the index finger) of the sensor have been chosen because it is easy, safe, non-invasive and validated method. The mean and standard deviation of the result has only been stated by one study which is also necessary to show the accuracy of the results.
Nowadays, switching from the paperwork documentation to the electronic documentation has been widespread particularly in the medical filed [25]. The Google Spreadsheet is one of the most popular ways in electronic documentation due to its free of charge and easily access. Using google spreadsheets allow the physicians to monitor the HR of the patients in real-time and to archive their HR data for later which is very important to monitor the historical health status of the patients [26]. Therefore, the google spreadsheet has been proposed in this system which offers organized, easy to access and secure environment to monitor and store the HR of the patients. Figure 3 depicts the act of heart rate streaming during a period of time for each subject when her/his index finger has been connected to the HR sensor. The system is updating the value of the HR every 15 seconds allowing the person in charge to monitor the HR in a nearly real-time. It can be observed that the HR values of all subjects and for all monitoring times were within the range of resting state HR which is from 60 to 100 bpm [27].

Conclusion
In this study, we developed and evaluated a cost-effective system for streaming physiological data to cloud. The pilot study was conducted to test the hypotheses that the WeMos WiFi development board could be used to stream the heart rate to the cloud for tele-monitoring applications. The results of the study demonstrated that the HR can be streamed to the cloud using the WeMos WiFi development board. Moreover, the data can be archived, observed and analyzed remotely for various purposes when the historical HR readings are needed. The updated data can be accessed by authorized persons wherever the internet service is available while the offline mode also available for the archived data.
Based on these encouraging results, this study suggests that the developed system can be modified to include other physiological parameters such partial pressures of oxygen (PO2), peripheral capillary oxygen saturation (SPO2) and carbon dioxide (PCO2). Moreover, other bio-electrical signals such as electrocardiograph (ECG), electromyography (EMG), and electroencephalograph (EEG) may also be streamed to the cloud using the proposed system for remotely monitoring.