Wearable IoTs and Geo-Fencing Based Framework for COVID-19 Remote Patient Health Monitoring and Quarantine Management to Control the Pandemic

: The epidemic disease of Severe Acute Respiratory Syndrome (SARS) called COVID-19 has become a more frequently active disease. Managing and monitoring COVID-19 patients is still a challenging issue for advanced technologies. The ﬁrst and foremost critical issue in COVID-19 is to diagnose it timely and cut off the chain of transmission by isolating the susceptible and patients. COVID-19 spreads through close interaction and contact with an infected person. It has affected the entire world, and every country is facing the challenges of having adequate medical facilities along with the availability of medical staff in rural and urban areas that have a high number of patients due to the pandemic. Due to the invasive method of treatment, SARS-COVID is spreading swiftly. In this paper, we propose an intelligent health monitoring framework using wearable Internet of Things (IoT) and Geo-fencing for COVID-19 susceptible and patient monitoring, and isolation and quarantine management to control the pandemic. The proposed system consists of four layers, and each layer has different functionality: a wearable sensors layer, IoT gateway layer, cloud server layer, and client application layer for visualization and analysis. The wearable sensors layer consists of wearable biomedical and GPS sensors for physiological parameters, and GPS and Wi-Fi Received Signal Strength Indicator acquisition for health monitoring and user Geo-fencing. The IoT gateway layer provides a Bluetooth and Wi-Fi based wireless body area network and IoT environment for data transmission anytime and anywhere. Cloud servers use Raspberry Pi and ThingSpeak cloud for data analysis and web-based application layers for remote monitoring based on user consent. The susceptible and patient conditions, real-time sensor’s data, and Geo-fencing enables minimizing the spread through close interaction. The results show the effectiveness of the proposed framework.


Introduction
The novel epidemic disease of the coronavirus (COVID-19) is becoming a pandemic and spreading all over the world. COVID-19 first originated in the city of Wuhan in the Hubei Province of China [1]. COVID-19 is a type of Severe Acute Respiratory Syndrome (SARS) that spreads through the minute droplets of respiration via sneezing, coughing, interaction among normal and susceptible or patients in close proximity. The COVID-19 respiratory droplets can be inhaled or transmission spread through the mouth, eyes, or nose by touching the surface where the droplets land. The disease has affected the whole world with about 106,358,244 COVID confirmed cases and 2,320,798 deaths [2]. SARS-COV is transmitted from person to person through close interaction and contact with an infected person. The drops containing the living virus can spread up to three feet and attack another person's mucous membrane when the patient coughs or sneezes without covering the mouth. People who are in close contact with someone with SARS are at high risk, meaning they live or work with SARS or have direct contact with the person by any means. The SARS-COVID transmission and contamination can be controlled by isolating and remote monitoring of the susceptible and patients. The rapid growth in the use of smart sensors, smart watches, smart phones, and mobile technology in daily life and healthcare sector results in having a significant impact on the world. The healthcare services' providers and experts are taking advantage of a reduction of invasive methods which lead to the cut-off of transmission of viral diseases. In this paper, we propose a Wearable Internet of Things (WIoTs) based platform for Geo-fencing and remote monitoring of SARS-COVID susceptible and patients.
IoTs provide the capability and enable the integration of heterogeneous physical devices and connecting them to the internet [3]. IoT has evolved and has a significant impact on various areas such as sensors and actuators, real time data analysis, machine learning, and embedded systems [3][4][5]. IoT and the cloud can also provide a platform to acquire human physiological data, shares it on the internet for monitoring and decisionmaking, and provides alerts in case of an emergency situation. Fangyu [6] proposed Wi-COVID as the 4th Industrial Revolution that incorporates IoT, Artificial Intelligence, and Big Data enabling telemedicine technologies to equip humans with sensors to extract human physiological, biomedical, and surveillance movements in society. SARS and/or COVID both severely affect a human being's respiratory system, which leads to difficulty in breathing, increase of BPM, fall of SpO 2 level in blood, severe coughing, deviation in ECG signal, and increase in human body temperature [7,8]. In this paper, we propose a body temperature sensor, ECG sensor, GPS Sensor, Wi-Fi Received Signal Strength Indicator, breathing sensor and accelerometer based coughing frequency monitoring, heart rate, and blood oxygen based WIoT platform to Geo-fence the COVID susceptible and patients and monitor their health conditions anytime and anywhere by the physicians, guardians, and other government service provider organizations. Figure 1 shows the overview of the proposed WIoT based platform for COVID susceptible and patient monitoring that involves various steps. It is important for the surveillance movements of COVID patients in the society to be diminished. The surge in transmission of the virus in rural areas is due to less medical facilities and no isolation. Regalado et al. [9] discussed the three ways to stop the spread of SARS-COVID: restrictions on the personnel movement in economic and social sectors; the efficient development of vaccinations; and herd immunity. Geo-fencing allows for tracking the COVID-19 susceptible and patients in order to control the pandemic. For analyzing the surveillance movements of patients and depending on the area of isolation, Global Positioning Systems for outdoor environments [10] and Received Signal Strength Indicator (RSSI) of routers for indoor environments [11] are used. In this paper, we propose a Global Positioning System (GPS) and Wi-Fi Received Signal Strength Indicator to isolate and track the susceptible and patients. Since GPS has limitations in an indoor environment so we proposed the Wi-Fi RSSI level to monitor the isolation in an indoor environment.
However, in surveillance, the main issue arises due to the privacy and security leakage of the personal identifiable information of the patient. Rahman et al. [12] suggested that the immigration and hospitals should be ready to share the important and critical information such as the daily movements going in and out of the country, and number of patients with high fever during COVID-19. Using various countries' case studies, the privacy and security issues associated with SARS-COVID2 prognosis and diagnosis are discussed [13]. Yousaf et al. [14] explained the conflict existing between data access and better service. They suggested the permission (consents) collection for the COVID-19 patients' data collection and disclosure. In this paper, we propose one-time password based user registration, consent based data collection and sharing, and pseudonyms for the user information, but this is not within the scope of this article.

Background and Related Works
In 2003, due to SARS, and currently due to COVID-19, patients died due to uncontrollable transmission of these viruses and unavailability of doctors and physicians' guidelines in remote areas. The system should be implemented which reduces invasive methods [15] and secures doctor's and physician's life. The hype of daily cases and deaths of COVID patients world wide are shown in Figures 2 and 3. In this section, we briefly introduce the literature and related works about SARS-COVID diagnosis, monitoring, and isolation techniques remotely.

SARS and COVID-II Symptoms
SARS (COVID I) and currently COVID-II all have some common symptoms such as difficulty in breathing, fever, high respiration rate, decrease of SpO 2 level in blood, high cough rate, and increase in heartbeat [7,16,17]. Similarly, SARS and COVID-19 directly affect the respiratory system and make clones in the human body that might lead to worse respiratory contact leading to continuous transmission of disease [15]. During the pandemic, the invasive methods [15] cause the transmission of disease among doctors and physicians. Not isolating COVID-19 patients can lead to the continuous spread of the corona virus to family and society members. Due to high fever, respiration rate, etc., the patient can enter into a critical condition. Timely decisions will save the life of COVID-19 patients using remote monitoring [17].

Patient Classification and Remote Monitoring
IoT helps in remote monitoring, treatment, and diagnosis of COVID patients [17], and machine learning algorithms help to classify normal, asthmatic, and COVID patients. The real-time extracted data and storage help to analyze patient health historical data, which is done using big data [15]. The classification of the patient uses physiological parameters which are extracted from the wearable sensors data [18,19]. Furthermore, these algorithms work based on digital signal processing for the ECG and extracted PPG signal [20]. The real-time sensor's data allow for categorizing a patient among normal or infected ones [21] using machine learning algorithms, using previous history data, and performing analysis on this data. The IoT platform enabled sharing of the susceptible and patient conditions to the client i.e., doctors and physicians using web-based client applications [19]. Related work for patient classification and remote monitoring is shown in Table 1.

Sensors and Hardware Platforms for Physiological Parameters' Extraction
COVID-19 patients need real-time monitoring of respiratory level, body temperature, and heartbeat rate. In literature, various sensors are used which include breathing sensor/respiration sensors [18], electrocardiogram (ECG) sensors [8,21], and SpO 2 sensors [20,24]. All of these sensors provide information to extract real-time information such as heart rate, oxygen level in blood, and deviation in respiration rate [21]. Table 2 shows the literature review about sensors used in health monitoring for physiological parameters.

RSSI and GPS Based Geo-Fencing
To enclose a patient within a Geo-fence, many types of techniques are used. The GPS works well for the outside environment, but, in indoor isolation, the GPS does not perform well [11,27]. The GPS National Marine Electronics Association (NMEA) gives information about a position in terms of strings that have coordinates i.e., latitude, longitude, and altitude [28,29]. The Geo-fence for in-door purposes can be implemented by the RSSI level of the communication interface such as Bluetooth [27] and RSSI level of Wi-Fi [11]. In this paper, we integrate both the GPS and RSSI-based Geo-fencing to monitor whether the susceptible and patients is inside the isolation and quarantine place or not. The distance from the access point (Wi-Fi) and the patient can be calculated using RSSI power received by the controller [11]. The drawback for Bluetooth RSSI level is the short-range coverage [27]. Thus, we have used the RSSI level of Wi-Fi for indoor environments with GPS integration for outdoor coordinates. Related work for RSSI and Geo-fencing for COVID patients is shown in Table 3. The contributions of the research can be summarized as: • RSSI level and GPS-based Geo-fencing for isolation of COVID-19 susceptible and patients within a geographical area to restrict his/her movement to minimize the spread maximization; • Wearable sensors, master-slave Bluetooth, and Wi-Fi-based IoT framework for physiological parameters acquisition and transmission to the server and cloud; • Raspberry Pi-based intelligent local server and ThingSpeak for diagnosing and remote monitoring of COVID-19 patients; • Web application for patient condition and isolation activity monitoring; • Web of Things based Application for the real-time patient monitoring and sensor data visualization by doctors and physicians, and patient in isolation activity monitoring. Figure 4 depicts the overview of the proposed architecture to Geo-fence the COVID-19 susceptible and patients and remotely monitoring their health conditions. The proposed system consists of four main modules: (1) Wearable Sensors for physiological data and location information; (2) Bluetooth and Wi-Fi-based wireless transmission of the data;

The Proposed WIoT and Geo-Fencing Based Framework for COVID-19 Susceptible and Patient Remote Monitoring to Control the Pandemic
(3) Flask and ThingSpeak cloud servers for data analytic and processing; (4) Web-based Application for remote data and Geo-fence visualization. The proposed system can help to remotely monitor the COVID-19 susceptible and patients to overcome the transmission due to interaction. The human body is equipped with wearable biomedical sensors and sensors for surveillance detection, which are placed on left, right, and chest positions of patients, as shown in further details in Figure 5. The physiological biomedical parameters of patient are extracted from the sensors such as Electrocardiogram (ECG), Pulse Oximeter (SpO 2 ), body temperature, respiratory sensor, accelerometer, and gyroscope. We interfaced the Google Map so that the administrator can select the Geo-fence area for the susceptible and patients for quarantine allocation and management. The GPS sensor is installed to send the user location to the server for checking and monitoring the isolation, movement, and Geofence of the susceptible and patients. We extract Latitude and Longitude from GPS data. The SpO 2 , gyroscopes, and accelerometer data are transmitted through Bluetooth to the main-controller installed at the belly position using master-slave Bluetooth configuration. The respiratory, GPS, body temperature, and ECG are directly interfaced with the controller. The NodeMCU (Wi-Fi) is used to enable the Web IoT environment. The NodeMCU sends all the information to the Raspberry Pi and ThingSpeak server to store and remotely visualize. Figure 6 shows the overall flow chart of the proposed system. The sensors' initialization is checked to confirm that all sensors output are available. First, the Bluetooth data are sent to the main controller, which sends the data through Wi-Fi to the Raspberry Pi based and ThingSpeak based cloud server. In the server, first the Geo-fence is checked using the GPS and Wi-Fi RSSI to find out whether or not the susceptible/patient crossed the mentioned Geo-fence area. If the Geo-fence area is crossed, the server sends the alert message to the susceptible/patient and the caretaker organizations. After conversion to proper scales and units, the data are visualized in the user web-application.
Since GPS has limitations in an indoor environment, we therefore integrate the Wi-Fi RSSI level with GPS to check the Geo-fence area and actuate alarms in case the Geo-fence is crossed. In an indoor environment, we measured the distance from the Wi-Fi Access Point using the RSSI level. The centralized database i.e., Raspberry Pi is connected to multiple nodemcu for multiple patients' monitoring. The application peripheral interfaces (API) of Raspberry Pi allows for extracting real-time wearable sensors' data. These data are stored corresponding to multiple patients ID, age, etc. Using machine learning algorithms, the patient condition is classified which is stored for maintaining historical records of patients' health. The classified patient condition and real-time sensors data are then sent to a centralized client-based application where doctors and physicians will analyze patients' health and recommend precautionary measures according to his/her health. These precautionary measures can be accessed by patient and patients' guardians. In the following subsections, we explained about the breathing rate estimation, oxygen and heart rate estimation, and cough rate estimation.

Breathing Rate Estimation
For the extraction of breathing rate, we use the peak detection algorithm by estimating the time difference between two peaks and then dividing it by 60 to get breathing rate per minute. These measurements are done using an FSR sensor and half bridge circuit or voltage divider as shown in Algorithm 1 and as shown in Figure 7.  Figure 7 represents the breathing inhale and exhale waveforms. When the person inhales, the pressure or stress is inserted on the FSR sensor, and the voltage is developed across the static resistor of the voltage divider. This voltage is input into the Arduino controller. The voltage varies and increases when the pressure is inserted into the FSR sensor. The gradual increase on the FSR sensor results in the rising of the waveform as shown in Figure 7. Similarly, when the person exhales, the pressure or stress on the FSR sensor decrease results in descending in the waveform. Hence, using the peak detection algorithms, we obtain the breathing rate per minute.

SpO 2 and Heart Rate Estimation
The measuring of SpO 2 level in blood and calculation of heartbeat in the left arm of the patient is done using the MAX30102 pulse oximeter. The extraction of these parameters using Arduino is as shown in Algorithm 2.
Algorithm 2 Extracting SpO 2 and Heart rate. The red light is emitted from the MAX30102 sensor and, when the finger is pressed, the pulse time is calculated when it beats. This pulse time is saved. As the second beat arrives, it calculates the time difference between the previous and this beat, which shows the time difference in milliseconds. After converting it to pulse rate per minute, we get the resultant heart rate of the patient. Similarly, for the extraction of the SpO 2 level, the formula is given in the built-in library of Arduino where we can extract the oxygenation level in blood corresponding to heart rate.

Cough Rate Estimation
Vibration sensor is used at the below neck position for the measurement of cough. Whenever the person coughs, the output becomes high, and we detect the cough for measuring the coughs per minute. Unlike the breathing rate due to periodicity in nature, the cough is unconditional. Therefore, we have to count total coughs per minute, as shown in Algorithm 3 and Figure 8. if Vibrations > 0 ∧ Rise_status == 1 then

Results and Discussion
This section briefly introduces the results of the implemented systems of isolating a COVID patient and analyzing the wearable sensors data. Figure 9 shows the sensors instrumentation, sending the data through Bluetooth and Wi-Fi, and receiving data both at the Flask and ThingSpeak cloud servers. The SpO 2 , accelerometer, and gyroscope are installed at the left arm dorsal. The temperature sensor and ECG sensors are at the chest while the coughing frequency sensor at the check neck position. At right dorsal, the GPS sensor and the NodeMCU based gateway are installed. Figure 10 shows the sensors' interfaces on different parts of the body. The SpO 2 , temperature, accelerometer, and gyroscope sensors (MPU6050) are connected through the serial interface I2C. The breathing sensors and the cough frequency counter sensors (FSR402) are interfaced using the analog input. The GPS sensor and Bluetooth are connected through the RS-232 serial interface. Figure 11 shows the NodeMCU (Wi-Fi module) based Gateway having a Bluetooth master device to get the sensors data and enable the IoT environment to send the data to the Raspberry PI based server as shown in Figure 12 and ThingSpeak also for storage and visualization. The GSM is also interfaced with the Raspberry Pi in order for the SMS because, in most of the regions, internet connectivity may not be possible.    Figure 13 shows the signup page to authorize the concerned authorities for data collection and also the web-based access to patient data. Because internet connectivity is not available in rural areas, the Flask server is used to display the data locally to find the health physiological parameters without directly interacting with the susceptible and patients. All the implemented wearable sensors in the framework are accessible through the URL mentioned in [32]. The Google map API integrated with GPS sensors helps to find and visualize the Geo-fence of susceptible and patient Geo-fencing using ray casting, with which the authority can define the Geo-fence of the patient in real time as shown in Figure 15. The GPS coordinates representing outdoor locations of the patient are sent to the server, which is accessible remotely as shown in Figure 15 with a refreshing rate of 1 H z . The indoor localization is done using the RSSI level of the Wi-Fi router, which is in decibels-milli watts (dBm). The RSSI level is adjusted based on the indoor area of isolation. In Figure 16, the first two graphs show the RSSI and GPS based Geo-fencing. Figure 16 shows variation of RSSI level with allowed enclosed area of RSSI level ≤ −60dB m .
The breathing rate of a normal person varies from 12-24 breaths per minute. However, as the COVID patient faces difficulty in breathing, he/she fights to breathe more rapidly.
The COVID patient's BPM (breath per minute) varies BPM ≥ 25BPM. The COVID patient's breathing rate is shown in Figure 16 sub-figure 4. The coughing frequency for COVID patients varies. Due to continuous angular movements of dorsal hand to mouth, the coughing frequency integrated with the deviation of ECG signal, and the respiratory sensor leads to the detection of coughing. The increase in coughing frequency is shown in Figure 16 sub-figure 5. The normal human body temperature varies from 35 • C to 37 • C. However, due to pneumonia or COVID, the patient suffers from fever. The temperature might increase to 40 • C equivalent to 105 • F. The results attached in Figure 16 sub-figure 3 represents temperature varying from 38 • C to 40 • C.  Figure 13. Flask server for local monitoring for patient condition. (a) sign up page for patients authorized for concern authorities only; (b) index page with patient sign up and patient data integrated tabs. The normal heart rate variation depends on whether one is male to female. Beats per minute (BPM) for males is 72 and for females is 78. However, due to the increase in respiration rate and fever, the heart rate increases. Figure 16 sub-figure 6 represents heart rate variation from 85 to 100 BPM of COVID patients. The SpO 2 level of normal human beings varies from 96-100%. However, for COVID patients, it decreases to 90-95%. Figure 16 sub- figure 7 shows the oxygen level in patients' blood.

Conclusions and Future Works
In this paper, we presented a wearable IoT and Geo-fencing based framework to isolate an individual who is infected with COVID-19 or is exposed to the coronavirus. We proposed a wearable IoT based framework to remotely assess the quarantined person health and provide possible treatment. The traditional quarantine monitoring procedures are monitored locally by the medical staff, which increases the risk of spread. The proposed architecture framework consists of four main layers: (i) wearable sensors layer for person biomedical and geo-location information acquisition; (ii) Bluetooth and Wi-Fi based network layer to pass the data and messages between sensors layer, gateway, and the Flask and ThingSpeak cloud server; (iii) Flask servers and ThingSpeak cloud server layer for data storage and visualization; and (iv) Client Application layer for remote monitoring, health assessment, and providing feedback by the physician. The current proposed work is mainly focusing on making life more convenient for those with health challenges who need to visit the hospital regularly. The proposed system has been developed in order to reduce the number of hospital visits, queues in the hospital, and reduction in the cost of taking care of the sick. It minimizes the risk of spread through close interaction and contamination.
We used wearable sensors temperature, heart rate, breathing rate, coughing rate, and SpO 2 (oxygen blood saturation level), accelerometer, and gyroscope to measure the physiological parameter of the susceptible and patient in remote quarantine. We provided the GPS and Wi-Fi RSSI level based Geo-fencing in order to locate the patient in indoor and outdoor quarantine areas. If the person is outside the specified quarantine area, an alert message will be sent to the person and care taker organizations. The Raspberry Pi based centralized server and ThingSpeak based cloud server provide the remote storage and visualization of the user biomedical physiological parameter and Geo-fencing to monitor and control the social life and manage during the pandemic era.
In the future, we are working to integrate the advanced machine learning algorithm in the proposed system to classify the breathing patterns such as Normal, Ataxic, and Air trapping and also the severity of the susceptible and patient. We also used the accelerometer and gyroscope sensor that will be used in order to precisely measure the breathing and coughing rate considering the hands movement during coughing.  Institutional Review Board Statement: The study was conducted according to the guidelines, and approved by the Graduate and Research Ethic Committee of the Institutes.

Conflicts of Interest:
All authors declare no conflict of interest.