Enhancing Healthcare through Detection and Prevention of COVID-19 Using Internet of Things and Mobile Application

*e main symptoms of COVID-19 are high temperature, throat infection, and irregular heartbeat. An integrated wearable device has been presented in this paper for the measurement of temperature and heartbeat in real time using different sensors and NodeMCUESP8266. For temperature, the DHT11 sensor is used and, for heartbeat, the pulse sensor is used. After reading the data from the sensors processed by NodeMCU ESP8266, it is sent to the firebase database using wireless connection (Wi-Fi module). From the database, the data are displayed in an android application. On the basis of certain conditions of the data, the user as well as the administrator is notified regarding the user’s current health. For the social distancing, an ultrasonic sensor is used. *e sensor will warn the user, if he/she is in close contact with someone within a specified distance. *e user’s current location is also tracked using the location services of android. A module named COVID-meter, based on the disease.sh-Open Disease Data API, was also included in the research for reading of real-time data of different countries related to COVID-19 like total cases, total deaths, total recovered patients, and so on.*e proposed device can be used in both populated and rural areas, but in rural areas it will be much more important because people are unable to reach a doctor on time; thus, they can check their health conditions remotely using the proposed device.


Introduction
e outbreak of COVID-19 has started in the city of Wuhan, China in 2019. Severe acute respiratory disease coronavirus 2 (SARS-CoV-2), the seventh human coronavirus, caused the pandemic. Due to the massive spread and infection, the World Health Organization (WHO) on March 12, 2020, has acknowledged the novel coronavirus (COVID-19) outbreak as a universal pandemic [1]. e infection started spreading all over the world, and by May 20, 2020, it has infected 4,806,299 people and caused 318,599 deaths [1]. To date, the world has suffered a lot in this pandemic in terms of human lives, education, economy, and amplified poverty. At the start of the pandemic, temperature was considered as the main symptom of COVID-19 infection and the people were screened out on the basis of their body's temperature by using a noncontact device. But there were some challenges while using that device. People were unable to follow the social distancing as directed by WHO due to the use of the device. Some people especially in illiterate regions were unaware of the correct usage of that meter. In order to check one person at a time, there were crowds of people waiting for their turn and hence caused to speed up the spread of COVID-19. ere was a risk of infection to the person, who was screening out the people.
We are residing in contemporary and computational advanced world. e revolution in the field of computerbased technology has made the world a global village, and access to the information is now easier and faster. Humans are directly or indirectly dependent on computers in their everyday lives. Computers and smartphones have become a necessary household items and an important part of health, education, and businesses. Different fields like artificial intelligence, Internet of things (IoT), intelligent sensors, and portable devices have made our lives very easy and secure. By the advancement in the field of IT and IoT, the health sector has changed a lot and diverse extraordinary solutions were supplied. ere is no need for face-to-face consultation and checking of patients in hospital. By using different wearable devices and online services, the doctors can now monitor and diagnose the patients remotely. With the development of online applications in healthcare, it can help, manage and analyze data, make decisions, and conduct conversations by using different artificial intelligence algorithms and IoT solutions. ese systems can even prescribe medicines to the patient based on their current health condition.
According to the instructions of WHO [1], a person with temperature or irregular heart beat should stay at home and away from the people. e device can help the person wearing the mask to find out the temperature and heartbeat. In case of emergency, a patient and the medical staff along with a doctor can know about the health condition of that patient. People will be able to keep social distancing from that patient and hence can minimize the spread of the virus. Some people do not know about their health conditions and do not go for a checkup in early stage. e device will warn them to see the doctor. We proposed a wearable device consisting of hardware and android application. e system is very effective to be used for the detection and prevention of COVID-19.
e proposed system has the following contributions in brief: (i) Bring advancement in the remote health monitoring system and measurement of temperature and heart beat remotely through sensors. (ii) Use firebase database instead of server to increase the processing of data in real time and the user can check the health data through the android application. (iii) Buzzer along with LEDs is used to keep the people aware of the health condition and ultrasonic sensor is used for social distancing to keep the spread of virus limited. (iv) Real-time location tracking is implemented with the android location services and information about COVID-19 statistics can be seen by the users on country basis.

Related Work
Various approaches have been devised for facilitating healthcare through detecting and preventing COVID-19. e study presents a system consisting of different sensors for facilitating healthcare. e heartbeat sensor is used to read the data of heartbeats and the temperature sensor is used to read the temperature data of a patient and send it to the microcontroller ATmega328 (Arduino Uno) for transmission to display it on receiving end and the data are then shown on LCD. e patient can be monitored in real-time basis and can also use a wireless scheme to communicate data from distant locality [2]. A system is proposed based on IoT which can combine data with different rapid decisions and actions and send these data to the associated doctor through a mobile or server. e system constantly monitors the temperature of a patient using CC3200 microcontroller with built-in Wi-Fi and data are stored in a database. is data are sent to the doctor in the form of an application (Android) through web server. e proposed design system collects the data and communicates it to the cloud where it is managed and examined [3]. e study presents the development of a microcontroller grounded on heartbeat and body temperature using fingertip and temperature sensor.
is system can measure heartbeat using optical heartbeat sensor and temperature by means of temperature sensor. e readings from both sensors are sort out and sent through GSM module to the receiving end using wireless technology where it can be displayed on a mobile phone for additional processing and patient caring [4]. e authors presented a study for familiarizing a system to monitor the patient health and proposed an android application to examine the health of a patient so the doctor can check the patient properly. is system involves a temperature sensor and pulse sensor which can read patient body temperature and heartbeat. e read data are sent to the server via an android application of the nurse, where all processing will be performed. is data will also be accessible to the doctor with this android application [5]. Research introduces a system which is able to give information about user health condition by measuring heartbeat through fingertip sensor and body temperature using LM35 sensor. e fingertip sensor takes data from the blood flow on the index finger for 60 seconds; after this it will be displayed on LCD. Variation in sensor heat would be transformed into electricity, interpreted into digital form through a 10-bit ADC, processed by the ATmega16 microcontroller, and shown on LCD [6]. e research has developed a system which consists of Arduino Uno, transmission system and android application. e device gives information of heartbeat and temperature consecutively assimilated on the portable system in real time and display it on connected android application immediately [7]. e research scheme consists of a wireless heartbeat and temperature observing system built on a microcontroller. e arrangement comprises sensors measuring the heartbeat and temperature of a patient which is organized by a microcontroller. Both readings are lastly displayed on screen. A wireless means is used to communicate the recorded data to a faraway position [8].
e core objective of the research was to develop a consistent patient monitoring arrangement by means of IoT to monitor the patient, either the being hospitalized or at home. is system contains sensors, data acquisition unit, Arduino, and software application.
is mobile centered wireless healthcare monitoring scheme provides real-time data like heartbeat rate, temperature, and EEG information of a patient checked, presented, deposited by the system, and directed to the doctor's mobile having the application [9]. A system was designed with the main work to develop an application for monitoring heartbeat and temperature of a user of the device and guide them for the treatment continuously; each individual health condition can be checked with 24-hours service. e system can be unpremeditated, by integrating ECG, EMG, EEG systems, dental sensors, and annunciation systems, thus making it valuable in hospitals as a right, efficient, and dedicated patient care system [10]. e research study involves the design of an android application and pulse sensor. Pulse sensors are used to sense heart rate of the patient. e proposed device is based on android healthcare management system. is development of designing an android application and pulse sensor is linked with Arduino Uno. e microcontroller Arduino Uno reads the sensor indications and refers it to the Bluetooth shield of the circuit. Furthermore, this shield guides the sensor signals to the android application by linking with the Bluetooth of a cell phone and sends the heart rate to software user interface. After this, the application sends the particulars of heart rate and present locality of consumer by means of GPS of the mobile phone and all the constraints to the cardiac doctor directly [11]. e research has suggested a healthcare monitoring method established on Arduino Uno, heart rate sensor and temperature sensor to monitor and sustain the patient health condition in steady intermissions. Both sensors are analyzing patient body temperature and heart rate. If a high change occurs in regular intervals, then the buzzer will run to alert the hospital staff and doctor. e detail will be stored in cloud " ingSpeak" and the doctor can note the patient health situation on Virtuino Simulator to reduce the health risk by tracing the patient medical condition [12]. e study presented a comprehensive review of the idea to solve health issues using IoT. is system architecture will measure the body parameters on real-time basis. It is based on different sensors to collect patient data and transfer data to Arduino Uno which can further handover to the cloud by Wi-Fi module. e data are kept in MYSQL database server which manages and provides approachability to data. User can view data through the android application installed on his/ her smart phone. If user data are anomalous, then the patient gets a notification and care takers get an e-mail. With the help of different verdict-making algorithms, deduction can be made and people will have the permission to access the database. A patient can also check his/her health record [13]. A system consisting of MAX30205 sensor, SEN11574 sensor, NodeMCU ESP8266 was proposed in a research study. e MAX30205 sensor is used to measure temperature and the SEN11574 sensor is used to measure heart rate. e composed data from both sensors are directed through NodeMCU ESP8266 microcontroller associated to mobile application through internet. e data are displayed on a mobile application and then noticed by the guardian. e patient can remotely send his/her heart rate and temperature information from home to the hospital or clinic [14].
A system was introduced consisting of wearable devices including different sensors like temperature sensor, pulse sensor, and ATMEGA 32-bit AVR microcontroller. e device sends measured data from both sensors to the server through the patient android application and these data are accessible on the doctor desktop computer. is prototype of an automated electronic system includes a Bluetooth module and ATMEGA 32-bit AVR microcontroller which are able to measure the heart rate and body temperature no matter where the patient is and sends a wireless request in case of any emergency for the rescue help. e proposed system gives benefit when equated to wired system with the observation that the doctor can get remotely the information of the parameters as well as the location of patient for tracking such that instant medication can be provided in case of any emergency [15]. A complete healthcare system was developed in order to check and analyze the health condition of a patient remotely and send it to the medical worker using IoMT. is system allows doctors to check the patients at a distance. Health parameters are identified like pulse rate, temperature, ECG, and blood pressure through wearable sensors. e sensors are coupled to an Intel Edison Board. Just once the Intel Edison board is connected to internet, it collects data from sensors and sends them to the server. e important constraints are monitored on any smart device connected under the same network. e proposed system enables users to boost monitoring of health-related risks [16]. A research study was presented with the objective of developing an IoT-based health observing arrangement which measures temperature, heart rate, and blood pressure of a patient distantly by means of different sensors and sends data to the doctor for checkup the patient condition. e optical light sensor is used to check light condition in the patient room, on the basis of which light can be controlled (ON/OFF). e system is instigated using BeagleBone Black development board and GSM module, and the patient data are sent to the cloud over which the doctor can screen the parameters anywhere using a web page or smart phone application [17]. e study proposed a method using different sensors like temperature and heartbeat oxygen level sensor to monitor patient body temperature and heart rate by connecting to the ARM controller. Further, the controller is connected to the ESP8266 built-in Wi-Fi module, to trace the patient health microcontroller perfectly interfaced to LCD digital exhibition and Wi-Fi association to send the data to the android application using web server. In case of irregular changes in patient heart rate or dynamic signal, an alert is sent to the patient using IoT which is mostly based on an android application. is application furthermore displays the patients' temperature and heartbeat traced live information with timestamps over the Internetwork [18]. A system comprising different sensors to measure health parameters like temperature and heart rate as input has been proposed [19]. Responses taken from sensors are managed in raspberry pi and presented on LCD.
e device in the proposed system sends data over internet through a sever by creating entrance on raspberry pi so that the doctor uninterruptedly monitor the health condition of the patient, and also at patient side a camera is set to check the live status of the patient on the internet by the doctor. An android application and a web application were planned to access the sensor data any time they need so. A research work was presented for the implementation of health monitoring device using LilyPad Arduino microcontroller, pulse sensor and ESP8266 built-in Wi-Fi module [20]. e system is developed for checking the temperature and heart rate of a Mobile Information Systems 3 patient. e LilyPad temperature sensor measures the body temperature and pulse sensor measures the heart rate of a patient. e data measured by LilyPad are shifted to the Wi-Fi module; furthermore, it transfers the taken data wirelessly to the android smart phone. e study describes a system which monitors the person health through different sensors like temperature and heartbeat sensors [21]. is wearable device measures the main health parameters like temperature and heart rate of a person using different sensors like temperature and heartbeat sensors. Whenever there is any change found in the health parameters like temperature and heart rate, the proposed system sends an SMS containing health information including person location and health parameters in the message. A research work was presented with the focus of building an android-based application using the concept of IoT [22]. e system monitors temperature and pulse rate and generates ECG using different sensors. Sensors takes data from the user body and sends it to the application of android smart phone.
e system also sends a message to the guardian of the patient in case of an emergency, and an appointment is obtained for patient at the hospital. e important purpose of the study is to improve a health and protection system for dementia-affected patients with sensors like heartbeat sensor and temperature sensor. To get the patient's medical attributes at night and remote locality, a healthcare communication by means of GPS and Real Time Clock (RTC) for alarm for suppository technique is renewed.
e main aim of this device is to send the affected person's health details via unguided media, and in case of unavailability of network, the data are stored into SD card. Moreover, given data are kept in cloud server or into memory card and transported to the PC and mobile for health care workers and clinicians [23]. e study presents a cell-phone-based wireless healthcare monitoring system that can give real-time information about patient health [24]. e suggested system is considered to measure and monitor important parameters like heartbeat, temperature, muscles, blood pressure, blood glucose level, and ECG data of a patient to correctly define his/her health status and fitness.
is system consists of different sensors, data acquirement, and microcontroller (Arduino). Furthermore, the planned system sends a message about the patient's critical health data through text message or e-mail report. With the assistance of the enclosed statistics, healthcare qualified staff offers essential medicinal counseling. e calculated data are checked, displayed, and stored by the system. A system was designed with different sensors applied on a patient body, and composed data from sensors are sent to the smart phone [25]. Mobile application is used to show parameters like heart rate, temperature, and blood pressure. e smart phone is connected to the server to update the complete data in the server. By using GSM module, a message is sent to the doctor and if the patient is in serious condition, then the doctor can react instantly and visit the patient. With the help of this system, all the patients in the hospital are monitored and proceedings of patients are stored in the database which are easily accessible. A smart mask incorporated with a remote, noncontact multiplexed sensor device is designed for monitoring respiration sicknesses, which includes COVID-19 [26]. e system has used different sensors to screen the coronary heart rate, blood oxygen inundation, blood pressure, and body temperature related with symptoms of pneumonia created by coronaviruses in real time. Due to this remote tracking device, frontline healthcare workforce can reduce the contact they have from being in touch with the patients condensing the threats of being infected. In this research, authors presented a mobile-based method to widely as well as automatically trace the interactions of COVID-19 confirmed cases [27]. e goal of this analysis is to make a proficient dataset of X-ray and CT scan images from several sources and provide convenient but efficient COVID-19 finding procedure based on deep learning and transfer learning algorithm. e experimental outcomes indicate that the utilized models are accurate up to 98 percent through pretrained network. It was also found that it provides accuracy up to 94.1 percent by using modified convolution neural network. A novel framework is presented in this study to diagnose COVID-19 on the basis of different available built-in sensors in mobile phones [28]. e proposed device is economical and affordable. e device is based on the smart phones because of increased usage by healthcare workers as well as by general public. With the help of AI-based techniques, the data from the sensors are recorded in order to check the level of pneumonia along with forecasting the consequences of the disease.

The Proposed System
In the proposed system, a portable device has been presented in order to help people fight against the COVID-19 pandemic.
e system consists of NodeMCU ESP8266 with built-in Wi-Fi module and an android application both for user and an admin (Doctor). e main COVID-19 symptoms like temperature and heartbeat are measured using DHT11 and pulse sensor, respectively. After reading the data, it is processed in the NodeMCU and sent to the firebase database. By applying different conditions on the user's data, the system will notify the user from time to time. In case of an emergency, the user will be warned by using red LED and a buzzer, while the admin will be notified by an email containing the user's temperature, heartbeat, and current location. For normal conditions, a green LED is used as an indicator. As we know that social distancing plays a vital role in controlling the COVID-19 pandemic. So, we used an ultrasonic sensor in order to enable the user to keep him/her away from other people. If the distance between the user and other person is less than a certain condition, the user will be notified by using red LED and a buzzer, also for alerting the user while touching his/her face. In order to keep the people aware of real-time data related to COVID-19 about different countries, the COVID-meter is used in the system. It is based on the disease.sh-Open Disease Data API. e proposed device can be used both in populated and rural areas, but in rural areas it will be much more important because people are unable to reach doctor on time; thus, they can check their health conditions remotely using the proposed device. Figure 1 shows the cases of COVID-19 infected patient around the globe [29]. Figure 2 represents the new cases statistics of Pakistan. Figure 3 shows the death statistics of Pakistan. Figure 4 represents the flowchart of the proposed system which shows the working of separate activities in a sequential order. e figure represents the working of hardware and android application of the proposed system. First of all, the user will need to connect the hardware with the available internet network. After that, the device will start sending data recorded from sensors to the firebase database. e user has to login to the android application in order to check the temperature and heartbeat data read from the firebase. Different conditions are applied on the data in order to keep the user along with the doctor aware of the health status of the user.

System for Monitoring the Temperature.
Temperature represents an indication if a body is hot or cold. It shows the average kinetic energy of particles presented in an object. e normal human body's temperature ranges from 36.5-37.5°C, and fever is greater than 37.5°C or 38.3°C. For the measurement of temperature, we have used DHT11 sensor in our device. It is an inexpensive digital sensor for  Mobile Information Systems 5 sensing temperature as well as humidity. For measuring temperature, this sensor makes use of a negative temperature coefficient thermistor, which reasons a reduction in its resistance value with boom in temperature. To get greater resistance value even for the smallest alternate in temperature, this sensor is normally crafted from semiconductor ceramics. e temperature range of DHT11 is from zero to fifty degree Celsius using a two-degree accuracy [30].
Algorithm 1 shows the procedure of reading temperature from the DHT11 sensor.

Monitoring Heartbeat.
Heart is a muscular organ that pumps oxygen-rich blood to the overall body. Normal heart rate for a resting person is 70 bpm for male adults and 75 bpm for female adults. e heart rate shows the  soundness of the heart and overall cardiovascular system. For measurement of heartbeat, a pulse sensor is used. It is a plug-and-play sensor for the measurement of heartbeat placed on the top of a vein at fingertip or earlobe. e light in the pulse sensor helps in the measurement of heartbeat by using the reflection of light. e light reflected from the body will reveal any alteration grounded on the volume of blood inside the capillary blood vessels. e variation of blood in the capillary vessels will cause changes in the reflection of light, which is used for the calculation of heartbeat.
Algorithm 2 represents the procedure of reading heartbeat from pulse sensor.

Social Distancing to Prevent COVID-19. As COVID-19
pandemic is an infectious disease and can spread from one person to another very speedily. So social distancing can play a very important role in order to keep people safe from the infected patients of COVID-19. To help the people in following the social distancing, an ultrasonic sensor is used in Step 1: start.
Step Get data from DHT11 sensor.
Step 4: send the temperature data to firebase real-time database.
Step 5: display the data in user and admin android application.
Step 6: check the data with applied conditions. Step Notify the user and admin. } else { Green LED � ON. } Step 8: repeat steps 3 to 7.
ALGORITHM 1: Procedure to read temperature from DHT11 Sensor.
Step Get data from pulse sensor.
Step 4: send the heartbeat data to firebase real-time database.
Step 5: display the data in user and admin android application.
Step 6: check the data with applied conditions.
Step 9: end. ALGORITHM 2: Procedure to read heartbeat from pulse sensor.
Mobile Information Systems 7 Figure 5: Procedure to calculate the distance from ultrasonic sensor.
Step 7: end.   Mobile Information Systems the device as part of the proposed system. e ultrasonic sensor is used in order to find the distance of a target object with the use of ultrasonic sound waves, transforming the reflected waves to an electrical signal. A single transducer is used in the sensor in order to send the pulse towards the target and receive the echo back. e distance is measured by calculating the time lapses among the sending and receiving ultrasonic pulse. Figure 5 depicts the procedure to calculate the distance from ultrasonic sensor. Algorithm 3 depicts the work of an ultrasonic sensor in order to find out the distance between the person and the target.

Firebase Database.
All the data of the proposed system were stored on the firebase real-time database which is a cloud-hosted NoSQL database and allows the developers to store and sync data among the users in real time. e data are stored in the form of JSON object and updated in real time with every connected client. Google Analytics allows to check how the end users interact with your product. Although firebase is not more secure than MySQL, it is faster and allows the user authentication, reset of password, and verification e-mail services without connecting to the server. Figure 6 shows the health data stored in firebase database.

System
Configuration.
e proposed system presents a wearable, cheap, and easy-to-use device in order to easily and effectively detect and prevent COVID-19 and enhance the healthcare system. Figure 7 shows the system configuration of the proposed system. In the figure, on the left side, the configuration of wearable devices for the proposed system is used, while on the right side the software application is shown where the temperature and heart beat score is shown.

Results and Discussions
e key goal of the proposed system is to improve the remote health monitoring system against the COVID-19 pandemic by measuring the main symptoms of COVID-19 like temperature and heartbeat by using the DHT11 and pulse sensor, respectively, integrated with NodeMCU ESP8266 built-in Wi-Fi module and an android application both for end user and an admin (Doctor). For keeping the social distancing, an ultrasonic sensor is used and for current location tracking android location services are used. e last two decades have seen growing interest in development of health care system using android and IoT-based platforms for the remote monitoring of patients. Our analysis on this project shows that there have been very few automated and portable devices for the prevention and detection of COVID-19 symptoms. We can also get the data of COVID-19 related to different countries by using disease.sh-Open Disease Data API. e proposed architecture has been enclosed in a mask and tested on a several specimens as shown in Table 1. e results show that the device is very effective to be used in the COVID-19 pandemic. Technology has now directly or indirectly affected our lives and the bond between people and technology is becoming strong day by day. With the proposed system, people will take full advantage and will keep themselves safe from COVID-19 along with other diseases. Table 1 shows the data recorded from the volunteers by using this wearable device. In order to check the working and performance of the proposed device, it was tested on several volunteers. e recorded data were very impressive in terms of accuracy and precision. Table 1 shows that read data of the experiment. Figure 8 briefly shows the pictorial representation of the recorded heartbeat data via chart. Figure 9 depicts the pictorial representation of recorded temperature via chart.

Conclusions
e developed device steadfastly records the temperature and heartbeat of the patient and sends it to both the patient and admin inside the android application and help in remote monitoring of the patient. e device can be used in normal conditions as well, but it is more suitable for the situations like COVID-19 pandemic where going to the clinic or hospital is a great risk to the health of patients as well as other people. By tracing the current location of the patient, it helps the doctor find the infected person as well as make statistics about the COVID-19 cases in that particular area. e device will help the frontline workers against COVID-19 to perform their duties without any worries. e proposed device is very cheap and affordable. It can be used very efficiently in the detection and prevention of COVID-19.

Data Availability
No data were used to support this study.