key: cord-0946021-17nt3zr2 authors: Atta, Raghied M. title: Cost-effective vital signs monitoring system for COVID-19 patients in smart hospital date: 2021-11-12 journal: Health Technol (Berl) DOI: 10.1007/s12553-021-00621-y sha: 2621df419f6635e9ca9884a81b30629962b54aad doc_id: 946021 cord_uid: 17nt3zr2 The lack of staffing during COVID-19 pandemic drives hospitals to expand their facilities in non-traditional settings to include centralized communication systems to monitor the vital signs of patients and predictive models to identify their health conditions. In this research, we have developed a microcontroller-based wireless vital signs monitoring system, which is able to measure the body temperature, heart rate, blood oxygen level, respiratory rate and Electrocardiogram of the patients. We managed to obtain a reliable but more affordable vital signs monitor with high mobility that can be implemented in large hospitals. The system satisfies the design considerations of medical centers in terms of size, cost, power consumption and simplicity in implementation. The developed system consists of a set of wearable sensor nodes, wireless communications infrastructure with multiple communications techniques to carry vital data from the patients to the management system that handles the patient’s medical data, and a graphical user interface with a control system that enables the hospital staff to observe the status of all the patients and take the appropriate actions. The system was implemented using 40 sensor nodes, 4 distribution points and one gateway covering a hospital area of approximately 2500 m(2). The system was tested and the measured percentage of lost packets is found to be less than 3.3% of those sent. During transmission, the current measured from the sensor node was 10.5 mA with a 3.3 V input voltage, which prolonged the operating time of the battery used. Usual setup of hospitals involves nurses making patient rounds in all wards, checking all equipment and then recording the vital signs of patients on paper, which could take a considerable amount of time. Vital signs are usually referred to body temperature (BT), heart rate (HR), blood pressure (BP), oxygen saturation (SpO2), electrocardiography (ECG) and respiration rate (RR) [1] . Scheduled review and health check means that any potential abnormalities in the vital signs can likely be detected only during each visit. The manual recording of the vital signs also makes the system susceptible to human errors. A potential solution to overcome these issues is to develop electronically health monitoring systems that can perform unobtrusive monitoring of patients in hospitals, particularly for those with chronic diseases [2] . This can also be applied to elder people in nursing homes or at their comfortable home [3] . During the current pandemic of COVID-19 as a newly wide spread virus with high infection rate, isolating the patients is a very important step. Due to the increased number of patients with limited hospital facilities in many parts of the world, patients were forced to incubate themselves at home. This makes it essential to monitor their medical status and detect the main symptoms remotely and wirelessly using advanced sensors integrated with telecommunications techniques, which can thus delay their placement in hospitals. Therefore, employing remotely health monitoring systems for monitoring quarantined patients to obtain full access to a set of their contextual information during treatment and recovery has become essential. It is expected that smart sensor based health monitoring systems will possibly change the future of healthcare by monitoring of patients' health conditions ubiquitously in real time and enabling proactive personal health management [4] . The information collected using these systems can be analyzed for early detection of diseases, which helps to improve the healthcare service while making it more economical at the same time. A smart hospital, in contrast, is a hospital embedded with smart equipment and modern communication technology, which facilitates automatic and remote monitoring of overall health status of the resident patients using the internet of things (IoT) [5] .The IoT can be defined as a network of intelligent objects, which is able to organize and share information and resources, make decision and respond to feedback [6] . This in turn makes healthcare services more reliable by lowering the pressure on the overall health system placed by the dependent and elderly individuals. Many health monitoring systems implement a continuous monitoring approach, which has a negative effect on resource usage and decision making. Such long term continuous monitoring consumes energy provided for multiple sensors, uses large memory size and increases network usage leading to transmission failures. Therefore, to fully realize smart hospitals in order to support people who are in need of them, several key technological challenges should be considered [7] . It is essential to implement low-power, low-cost and efficient communication technologies using public networks with full interconnectivity among the devices. In addition, it is necessary to have high degree of accuracy with privacy and information security. There is also a need to implement effective conditional data filtering mechanisms to improve the reliability of data transmission and the accessibility of important information. Numerous surveys and studies in healthcare applications for patients from various perspectives can be found in literature [8] [9] [10] , while many solutions and devices for health monitoring are available in the market [11] [12] [13] . They generally consist of multi sensors to monitor vital signs connected wirelessly to smart phones or computers, which often facilitate data logging and visualization using a web site or mobile application. Many wearable medical monitoring systems for vital signs, including SpO2, ECG and BP, were developed. A system that was able to measure and monitor the HR of patients was proposed [14] . A small scale device for monitoring ECG, which was built with a HR monitor using an Arduino microcontroller, was developed [15] . Another design for an ECG monitoring device that can also measure photoplethysmogram (PPG) and BT was reported [16] . A remote monitoring system for ECG, which is integrated into a broader IoT infrastructure, was also proposed [5] . An ECG monitoring system using low power BMD101 sensor chip was implemented [17] . Physiological parameters such as the RR [18] , the BP [19] and the SpO2 [20] were used to complement the HR and ECG. Majority of monitoring systems use wireless transmission including general packet radio service (GPRS) and global system for mobile communications (GSM) [21] . Other health monitoring devices are realized using wireless transmission but access to local area only [22] . Based on ZigBee wireless sensor networks, a blood oxygen monitoring system was designed [23] . Another blood oxygen monitoring system using Bluetooth was proposed [24] . This system is able to identify sleep apnea from blood oxygen signals. A different alternative for measuring BT and HR for patients in home care in real-time settings using a combination of wireless sensor network (WSN) and mobile augmented reality (MAR) was conducted [25] . A wireless microcontroller based pulse oximeter used to measure the oxygen supplied to patients via oxygen flowmeters was implemented [26] . IEEE 802.11 wireless standard was used for wireless connectivity, so that it can capture the sensing data and easily connect it to the internet [21] . Recent progress in the remote patient monitoring system Market is reported in [27] . Examples of the available devices are LINQ II and FreeStyle Libre 2 [28]. LINQ II "Medtronic" is a small wireless Insertable Cardiac Monitor (ICM) for patients with abnormal heart rhythms and for those who require long-term monitoring. It enables remote patient monitoring and data transfer through the MyCare-Link Heart mobile app or MyCareLink Relay home communicator by using BlueSync technology. FreeStyle Libre 2 "Abbott " is Integrated Continuous Glucose Monitoring (iCGM) system for patients suffering from diabetes, which measures glucose levels every minute and has an optional real-time alarm. It uses Bluetooth technology that automatically alerts users when their blood glucose levels drop or increase. There are different approaches when it comes to process the collected information. The information can be sent periodically or on demand because of communications limitations, or it can be send only when any irregular behavior is detected in order to save energy [29] . Monitoring systems can also be combined with artificial intelligence (AI) to diagnose and analyze the abnormal health issues. Tracking devices can also be attached to some monitoring systems, while others they don't need to track the patients because either their locations are always known or it is not necessary [30] . This study aims for developing smart wireless vital signs monitoring system to be used for improving the quality of patients' treatment in hospitals as an improvement in the functionality of previous studies [31] to satisfy the design considerations of medical centers in terms of size, cost, power consumption and simplicity in implementation. This is typically the case in the developing countries such as Africa and the Middle East, where the healthcare system does not get a considerable budget directed towards it. The proposed system consists of wearable sensor nodes to acquire vital signs signals, including the HR, BT, SpO2 and RR, from different patients and software to detect abnormal signs of deteriorating health, allowing for earlier responses and treatment. On the sensor nodes, multiple wireless transmission modules using local area network protocols are added in order for the measurement data to be transmitted over a wireless network. In order to accomplish a truly smart hospital, a number of challenges need to be tackled in many phases of the development process. Such challenges include network size, topology and scalability, the used communication technology with reliable real-time data transmission, fault tolerance, power consumption and the application of intelligent processing systems for analysis and relevant decision making [3] . All these constraints predetermine the quality of service as well as the cost of system and pose specific design challenges. The realization of smart hospital systems requires reliable sensing and communication. Wireless communication channels are prone to errors because of path fading and interference. Delayed or inaccurate information transmission can be misleading, causing imprecise diagnosis. The embedded algorithms in the sensor nodes have to be highly efficient in order to allow continuous data collection and long term monitoring. Although energy efficiency is a crucial factor for the data transmission from the sensor nodes, the generation of electromagnetic radiation around the patient body must be minimized by reducing power consumption for both transmission and computing to avoid damage to human cells. Information related to health issues is considered highly privacy sensitive [32] , therefore security vulnerability eventually put user lives at risk. The hospital smart wireless vital signs monitoring system architecture consists of the following subsystems: • Sets of healthcare monitoring wearable vital sensors that form nodes, each of which is connected in real-time with a centralized point using a radio frequency (RF) link. A location algorithm is used to verify accurately the hospital room, where a particular patient is located. • The wireless communications infrastructure system is placed in between the sensors nodes and the management system. Its function is to carry data from the former to the latter and return commands from the latter to the former if applicable. It is composed of a set of non-IPbased devices (so-called distribution points (DPs) [30] ), which transmit the sensors data via LoRa wireless protocol [33] to a gateway. The gateway is connected to a router, which forwards them to the management system using the internet connection. • The management system handles the medical data related to every patient. It is composed of a management server that processes and stores all the patients' data and a graphical user interface (GUI) that enables the hospital staff to observe the status of the patients. The secure access manager grants access to the stored information to authorized users only, according to the instructions enclosed in the user database. This system can also be combined with existing commercial hospital management systems. Sensor node includes a set of sensors that can sample signals taken from the patient, process this information with built in computing resources and transmit the processed information to a centralized DP. Therefore, each node should contain, in addition to the sensors, an embedded microprocessor, which has limited memory and computational ability, short range wireless transceiver unit and power unit, as shown in Fig. 1 . In this study, each sensor node detects the output of three sensors; the BT sensor, SPO2 and HR sensor, although other vital sensors can also be connected upon need. Integrating data from these potentially diverse multiple sensors would Fig. 1 A block diagram of a sensor node connect to patient's body be a fundamental task, which will have an impact on the performance of the system. Sensor nodes typically have strict requirements for memory, computation and power. They should ensure energy efficiency for the embedded microprocessor and transceiver unit in each node to facilitate long term monitoring. A desirable characteristic of the processors in sensor nodes is that they should have several modes of operation; sleep, idle and active [34] . The transceiver units allow the communication between the sensors nodes and the centralized DPs. The memory unit connected to the sensor node can be used to store sensors' data locally, which enables an adaptive scheduling scheme to prolong the battery life. A common challenge for the enhancement of the sensor nodes is to select the best method to transfer sensors' data to the back end servers for processing and analysis. This includes transmission technologies, the transmission frequencies and the amount of transmitted data. In networking, data transmissions are classified into four schemes: broadcast, multicast, unicast, and anycast. Both multicast and broadcast schemes deliver packets simultaneously to multiple receivers. Most of existing health monitoring systems uses these schemes to optimize data transmission and increase reliability [2] . However, recurrent transmissions lead to transmission delay and a high level of network traffic. Therefore, unicast scheme, where packets are delivered only to a single receiver, is used in this study. This scheme has the least traffic overhead but requires additional procedures to resend the packets in case of transmission failure. In order to avoid possible interferences with other widespread communication technologies operating at the same frequency band, different channels are used for communication [35] . Although microcontrollers use less power than the wireless transmitters consume, they generally operate for long time, especially if substantial computations are being performed locally to prevent sending large amount of data wirelessly. Furthermore, the microcontrollers support the configuration of data communications by setting various triggers adapted for each patient and transmitting selected parameters on demand from the management system or when any alarm occurs. Physiological parameters including BP, HR, SpO2 and RR are measured by wearable sensors, which convert them into electrical signals. Sensor output signals may have digital or analogue forms. The analog signals require to be converted into digital using an analog to digital converter (ADC), allowing the connected digital circuitry to process it in order to get the vital biomedical parameters. Desirable characteristics of the wearable sensors are small size, light weight, comfortable and non-invasive with integrated functions [34] . One of the main vital signs that need to be monitored is the BT, which reflects the patient health status. BT may be measured from the armpit, mouth or forehead, however, the forehead is preferred as it keeps a constant temperature level under both cold and hot ambient temperature conditions [36] . The normal temperature of a healthy person is typically around 37 °C, however, it might increase slightly or temporarily in hot weather or during physical activities. There are a number of diseases that affect the BT [37] . Hypothermia, which arises when the temperature of a patient falls below 35 °C, is regarded as a possibly fatal emergency condition. It is possible that cardiac arrest, lethargy or even coma could happen if this condition is not treated immediately. Hyperthermia is an abnormal increase in BT above 38.5 °C due to failed thermoregulation, which might lead to organ damage or even death. There are several means that can be used for measuring the BT including thermoelectric effect, thermistors, optical means, etc. [34] . The conventional technique for noninvasive temperature measurement using wearable sensors is the thermistor. Many analog wearable temperature sensors are available in the market, such as LM35 and NTC-CL80 that can directly be attached to the skin [25] . For digital temperature sensors, such as maxim MAX30205 [38] that is used in this study, the sensor is integrated with digital circuitry with an accuracy of 0.1 °C. MAX30205 has an I2C compatible serial interface, which is used to read the temperature data and organize the open drain over-temperature shutdown output. Another important vital signs of patient health is the HR, which is used in diagnosing many cardiovascular diseases. Any major variation in the physiological or physical state of a person often changes the person's heart rate from normal rate of 60-100 BPM to bradycardia, which is less than 60 BPM or tachycardia, which is greater than 100 BPM [39] . However, during sleeping, the heartbeat for a healthy person might vary between 40 and 50 BPM, which also needs to be considered. To measure the HR precisely, electrical, strain or optical sensors may be used according to the sensing location in the human body. If electrical measurement is selected, skin electrodes are used to collect the depolarization signals from the muscles of the heart. The optical sensing method uses a light emitting diode (LED) to illuminate the arteries, where the reflected or transmitted light intensities from and through the skin and tissue change depending on the blood volume. The reflected or reflected or transmitted signals are then received using a photodiode. During the systolic phase, when the muscles of the heart contract and pump blood from the chambers into the arteries, the high volume of blood causes the light absorption to be at its peak. The duration between two systolic peaks is used to compute the HR. If the BP is to be calculated, the same principle can be applied. The systolic peaks are detected using a pressure sensor positioned on the carotid artery or the radial artery [40] . The pulse Oximeter is a modern technology that effectively monitors the blood's functional oxygen saturation transcutaneous. Oxygenation is the oxygen saturated hemoglobin relative to total hemoglobin in the blood, both unsaturated and saturated [34] . The typical state of blood oxygen level for a healthy person is considered to be between 95 and 100%. If this level drops below 90%, it may cause hypoxemia, and if it falls below 80%, it may cause a major organs failure. Depending on the sensing method and location, oxygenation can be classified into venous oxygenation (SvO2), tissue oxygenation (StO2) and peripheral oxygenation (SpO2) [41] . SpO2 is determined by an optical measurement on the basis of the fact that blood hemoglobin has different absorptivity for light with different wavelengths and whether or not it is bound to oxygen. Therefore, two LEDs working at two different wavelengths; infrared light in the range of 850-1000 nm and red light in the range of 600-750 nm, alternately shine light on or through the sensing location that might be the finger, forehead, earlobe or wrist. At a certain time, the volume of the blood and the concentration of blood oxy-hemoglobin influence the intensity of the reflected or transmitted light from or through the skin and tissues. Oxygenated hemoglobin permits more red light waves to pass through while absorbing more infrared light waves. Meanwhile, deoxygenated or reduced hemoglobin permits more infrared light waves to pass through while absorbing more red light waves. The reflected or transmitted optical signals are then received by a photodetector (PD). The PD in the transmission mode is positioned at the opposite side of the skin or tissues to receive the transmitted light. On the other hand, the PD in the reflection mode is positioned at the same side as the LED to receive the reflected light. This unique properties of hemoglobin with regard to infrared and red light waves allow oxygen saturation level to be measured noninvasively using pulse oximetry [42] . However, even in pulse oximeters available commercially, ambient light interference and motion artifacts are known problems that reduce the accuracy of the measurement. By placing the sensor close to the skin and letting it move and flex with the skin, the impact of motion artifacts as well as the noise from ambient light could be reduced [42] . The MAX30100, integrated heart rate monitor sensor and pulse oximetry [43] , is used in this study. This sensor has a combination of two LEDs, a photodetector, optimized optics and low-noise analog signal processing to detect heart-rate signals as well as pulse oximetry. An ECG is a bioelectric signal that records the electrical activities of the heart versus time. The ECG is obtained by detecting electrical potential between two points of the body using an analog front end circuit. Since the ECG is a periodical signal, the HR can also be extracted from the R to R wave (R-R) interval of the ECG signal. Besides being useful in health monitoring, ECG is an essential diagnostic technique for evaluating the cardiovascular system. Although conventional ECG uses 12 leads, the signals can be picked up by using a minimum of two electrodes positioned on the chest [44] , which facilitates designing the sensor in a wearable form. However, signal intensity will drop as the distance between the electrodes is reduced. In this study, the ADS1293 [45] Front End chip with 3-Channel, 24-Bit ADC is used. This chip contains all the features that are commonly required in portable medical ECG applications including reduced size, low power and overall cost with high levels of integration with exceptional performance [46] . RR is another crucial vital sign as the patient is at risk of permanent injury or even death if there is not enough inflow of oxygen and removal of carbon dioxide. Moreover, irregular RR is a symptom of many disorders such as asthma, sleep apnea, anemia, and chronic obstructive pulmonary disease. Covied-19 patients often have difficulties in breathing normally as the rates of lungs contraction and expansion decreases. The RR of a healthy person at rest ranges from 12 to 20 breaths per minute and the volume of inhaled air with each breath is nearly 0.5 L. Among the conditions that can change the normal RR are asthma, anxiety, pneumonia, lung disease, congestive heart failure or drug overdose. To measure the RR, one can directly detect the airflow during breathing or indirectly respond to the movements of the chest. For direct respiration measurements, the sensor is positioned near the mouth or nose and react to the alternations in the concentration of carbon dioxide, the temperature, the pressure or the humidity of the air [47, 48] . The indirect respiration measurements monitor physical parameters, such as the abdomen or chest contraction and expansion during breathing, and transduce these changes in the lungs volume into electrical signals. For example, indirect respiration measurements can be performed using electrodes positioned onto the body where the variations in the impedance between them express the changes in lung volume during breathing in and out [49] . Alternatively, a single piece of solid material, acts as a strain gauge by exploiting the Poisson effect, can be used for respiration measurements. The change in inductance of a loop of a conductive material formed around the body can also be used indirectly to measure respiration as the body circumference changes [50] . Finally, a looped optical fiber whose transmittance changes as the loops are stretched can be used for respiration measurements [51] . The sensing element of these sensors is required to be in close contact with the body to acquire a signal of sufficient quality in order for the contraction and expansion of the chest during breathing is adequately transferred to the sensors. There is also a non-contact way to measure the RR of the patient by detecting the change of the person's ribcage volume using accurate radar-based Doppler Effect [52] . However, the radar sensor is positioned within several meters of the patient, which requires the patients to stay in their places during the time of measurements. Acoustic sensors are also being used for measuring RR. When placed on the neck, these sensors can detect the vibration in the air that surrounds the patient's nose by using highly sensitive microphones [53] . They can be more accurate than chest based sensors in detecting certain conditions, respiratory obstructions, where air cease to flow into the lungs despite the chest continue moving, [47] . Unlike strain sensors, acoustic sensors on the throat and nose are not sensitive to motion artifacts such as walking [54] . However, acoustic noise might interfere with the respiration signals if not filtered. The INMP441 low power, high-performance, digitaloutput, omni-directional MEMS microphone [55] is used in this study. The INMP441 is composed of a MEMS sensor, signal conditioning, an ADC, anti-aliasing filters, power management and a 24-bit I2S interface. The I2S interface enables the INMP441 to be connected directly to the ESP32 microcontroller, without the need to have an audio codec in the system. The INMP441 has a high SNR with a flat wideband frequency response, making it an excellent choice for near field applications with high intelligibility. Several wireless communication technologies are adopted in integrating health applications for transferring medical data across sensors, distribution points and gateways in local area networks [2] . Many wireless vital sign monitoring systems have been developed using various transmission protocols [16] . The accurate selection and the right integration of communication technologies is still an outstanding issue, which needs to be dealt with as part of smart health applications. The used communications technologies firmly depend on the specified requirements for each communications segment. The main required aspects are communication rate and distance, interoperability, reliability, energy consumption and low cost. The most popular technologies used in small scale wireless networks and monitoring systems are short range wireless protocols, in particular Bluetooth, Zigbee, Bluetooth low energy (BLE), WiFi and LoRa [16, 56] . These can provide coverage for indoor locations such as hospitals and enable the communications with a potential back end system through a gateway. Despite the fact that full scale wireless protocols such as ZigBee are preferred choices for wireless communications, a smaller size modem protocol enables 2.4 GHz RF solution to fulfill wireless communications requirements to be used with small, power-efficient and cheap microcontrollers. One of the main advantages in using non-ZigBee systems is the simplification of the protocol design that facilitates reducing the stack size, which is quite important in lowering the cost of powering the system. An example of the transceiver that can be used in medical monitoring systems is the low-power 2.4 GHz NRF24L01 [57] . NRF24L01 is a single radio transceiver chip operating at 2.4-2.5 GHz ISM band. The transceiver is composed of a frequency synthesizer, crystal oscillator, power amplifier, modulator, demodulator and enhanced shock burst™ protocol engine. This chip consumes only 9.0 mA of current in transmission mode at an output power of -6 dBm and 12.3 mA in the receiving mode. Built in standby and power down modes make power saving feasible. The NRF24L01 is capable of transmitting data packets with 32 bytes, as a maximum payload length, so that each data report is sent via a single packet structure using enhanced shock burst protocol. Microcontroller commands are sent via the serial peripheral interface (SPI) to program the protocol setup, frequency channels and output power of the NRF24L01. WiFi is a widespread wireless data transfer and communication technology based upon the IEEE 802.11 series of standards used in a local area network (LAN) with high transmission speed [2] . This network supports point to point and star topologies, where WiFi coverage includes multiple electronic devices. These are able to connect to the local network or internet through a wireless network access point (AP) with a coverage distance of about 100 m. The disadvantage of this technology is the consumption of fairly large power; however, WiFi represents a promising competitor for devices that are deployed in health monitoring systems to establish continuous monitoring. Lora is a wireless data communication technology, which uses a radio modulation technique fabricated by Semtech [58] . It is derived from spread spectrum modulation techniques based on chirp spread spectrum (CSS) modulation technology, which uses license-free, sub-gigahertz RF bands from 433 to 915 MHz [33, 56] . LoRa is designed to connect sensors, distribution points, gateways and devices wirelessly and to the cloud [59] . Unlike BLE or Wi-Fi, which only offer short range communication, LoRa devices connected with a proper antenna has been developed for the IoT application for long range and low power with multi-hop network. It can reach a distance of more than 10 km in open areas with high-security protocol, which is considered one of the most reliable data communications techniques [60] . However, the time to transmit one packet in LoRa is much longer than the traditional wireless sensor technologies. Therefore, for lowdata rate applications, longer range can be obtained when using LoRa instead of similarly priced radio technologies [61] . Energy consumption is a critical issue in designing sensor nodes, which can be negatively influenced by limited battery life. Lithium-ion rechargeable battery is considered especially promising for sensors nodes because of its long lifetime and high power density [62] . Energy consumption can be divided into three categories; sampling, data analysis and data transmission. However, most of the power consumption in sensor nodes is mainly due to the radio link. Normally, transmission range, duty cycle and the way in which communication channels are operated affect the life of the battery for any communication system. Data can be transmitted based on three event types; constant events, which assure continuous transmission of the data, instant events, which transmit the acquired data instantly only when a particular event arises and interval events, when the data is transmitted frequently based upon a constant time interval. The duty cycle of the components can often be modified to allow reduction in the power consumption, either by reducing the component operating time during each cycle or by increasing the interval between successive operations of the components without compromising the reliability of the system. In order to save energy, sensor nodes can regularly switch off their radio interface with a centrally specified time slot. It could also be integrated with cognitive radio technology in order for the sensor's radio to be switched on or off by itself based upon certain context. There is a tendency in medical sensor networking to use the new low power standard using BLE and loRa. Such systems allow sensors and devices to be used for over a year without changing or recharging the batteries. All the sensor nodes in the proposed monitoring system for smart hospitals are connected via RF transceivers to provide data communication and form a LAN inside the hospital. One suggested approach to handle the data transmitted by the sensor nodes is to use a platform of centralized hubs [63] , or DPs. They are used to collect information originating from several sensors with different standards and modalities or send feedback to perform necessary actions, if required. These DPs integrate this information all together and merge it in a message then send it via LoRa transceivers to the gateway, as shown in Fig. 2. The gateway is an essential component for monitoring systems of smart hospitals as it is responsible for the network interconnection and network management between the miscellaneous sensors and the wide area network (WAN) [2] . The gateway in the proposed system collects data from all the DPs and encapsulates the raw data of the sensors in a secured TCP/IP packet then forwards it using WiFi to the management system. Unlike some reported systems that use Fig. 2 A block diagram of the distribution point one gateway per sensor [11] , the proposed system has the minimal total cost of gateways for a specific number of sensors, and hence at little additional cost, extra sensor nodes can be added to the system. The aim is also to take advantage of the hardware and the software capabilities of the gateway for advanced data processing and analysis. Smart algorithms may be used for merging data and controlling the transmission of the sensors' data. The gateway incorporates a LoRa wireless interface and a WiFi connection with an IEEE 802.3 Ethernet interface. The Internet is favored as a feasible solution for secured remote communication that enables access to data at anytime from anywhere. Integrating ad-hoc networks with different telecommunication technologies complements the sensor and communication architectures. Usually, the gateway is established through a fixed device such as a local homebox. However, the gateway can be a local smart sensor node placed in the environment or mounted on a computer server [64] . The gateway can also be a microcontroller system such as a MSP430 based board [11] , a Cortex M3/4 based board [65] or ESP32 as the one used in this study, as shown in Fig. 3 . Both the distribution points and the gateway are transparent at the logical communication level between IoT server and the sensors. The IoT server transforms the raw payload received from gateway into a universal format that contains object type, object identifier, geographical position and timestamp. The proposed system architecture is developed with the intention of enabling the integration of different sensor networks protocols (WiFi, LoRa and RF). The ESP32 is able to exchange hyper text transfer protocol (HTTP) messages through the TCP/IP protocol using a Wi-Fi connection [66] . The HTTP application layer is in control of message formatting and publication. All sensor data were published using Ubidots website [67] , which uses HTTP and MQTT protocols to publish and subscribe data. The management system is designed based on client server architecture where the management server is the server and the GUIs are the clients. The GUI manages patients' profiles, continuously monitors all their medical parameters in real time, processes and analyzes the measured data and locates any patient within the hospital. It also runs prediction algorithms to detect patient's anomalous conditions based on one or more vital sign [68] . If required, the management system will give a warning and send electronic notifications such as text messages, emails and phone calls to the secondary service provider. Those include emergency department personnel and medical specialists at distant facilities [69] . The entire system can be configured and controlled through a web interface device connected to the internet. ESP32 Lora module used in this research is a low-cost, small size board that contains a microcontroller having embedded Wifi and SX1276 LoRa chip, which can be used in real-time monitoring systems [59] . ESP32 is a dual-core microcontroller with two CPUs with a clock as high as 160 MHz for both CPU cores. It also supports v4.2 BLE which is capable of operating at a speed up to 4 Mbps. It contains ultra low noise analog pre-amplifier, four timers, general purpose I/Os and two 12-bit ADCs and two 8-bit DACs converter. Moreover, ESP32 provides several interfaces; an Ethernet MAC interface, two I2C bus interfaces with both fast and standard modes, three UART interfaces with a transfer rate up to 5Mbps, three SPIs that can be used in master or slave modes with a clock up to 80 MHz, one SD/SDIO/ MMC host controller, an 8-channel pulse counter and an 8-channel infrared remote controller [70] . The WiFi in the board operates at 2.4 GHz with data transfer rate up to 150 Mbps. ESP32 can operate under two different power modes; active mode, where the chip radio is working and modemsleep mode, where the CPU is fully functional while the Wi-Fi and BLE is powered off. These features, in addition to the attached LoRa module, make this board suitable for IoT applications. Proper functionality of any medical device is essential, particularly in life critical situations. Medical device is defined as any instrument, apparatus, appliance, software, or material used, alone or in combination, in diagnosis, monitoring, prevention and treatment of diseases [71] . The necessary performance and Medical Electrical Equipment ISO 60601 [72] and Safety Testing of Medical Devices ISO 62353 [73] , are described by the world health organization (WHO) and international managing standards for medical devices [74] . Every medical device is considered as a legal metrology which needs to be calibrated for deviations of output values [75] . These deviations must not exceed the defined limits in order for medical device to be safe for use on patients. Reliability of medical devices in terms of health and life risks for patients is also an important factor [76] . The objective of verification for the device measurement error is to ensure that the measurement error is smaller than a specified maximum permissible error. Any uncertainty of these tests, such as false-negative test results, can have devastating effects [77] . The integrated sensors used in building the proposed monitoring system are all medical grade devices with digital outputs and no mechanical or moving parts. They are widely used in medical instrumentations with high accuracy and reliability [38, 43, 45] . Their manufactures ensure that they can be used under reference conditions and they define strict measurements output error ranges. In addition, we added smart software alarm that is raised when the data analysis indicates that the measured values are not within the standard limits or when any failure of the measuring sensors or the communication system happens to eliminate any risk to patient's life. On the other hand, safety of medical devices must be regularly checked. Any electrical medical device that comes into contact with patient's body imposes risk of electrical shock [78] . Therefore, the electrical safety inspection should be performed, which involves testing of patient leakage currents, chassis leakage, ground wire resistance, etc. Electrical safety analyzers such as the Fluke Biomedical ESA615, ESA615 or ESA620 are used to verify the electrical safety of medical devices according to international (IEC 60,601-1, EN62353, AN/NZS 3551, IEC61010, VDE 751) and domestic (ANSI/ AAMI ES1, NFPA 99) electrical safety standards [79] . Various tests have been performed in order to evaluate the quality of the sensors output signals, the maximum transmission range and the maximum data rate with respect to the maximum number of sensor nodes and distribution points that can be connected to a single gateway at the same time. During the validation of the system, each part was first tested separately for debugging and tuning purposes, and then the overall system was tested in a real scenario by utilizing a pilot study. Figure 4 illustrates the network infrastructure and the coverage area for the hospital that was employed for this study. The purpose of the first subset of tests is to ensure that the sensors collect real data and the sensors nodes process and transmit these data correctly. The radio link between the sensors nodes and the distribution point is a key part of this test. The radio protocol network configuration is a star type, where each sensor node reports back to the specified DP. For NRF24L01 chips, the difference between the transmitter output power and receiver sensitivity was found to be about 60 dB when a 10 cm high sensitivity duck antenna is used at the receiver side. The radio system has an operating frequency in the ranges between 2.4 GHz and 2.525 GHz with 125 different channels. Each channel has up to 6 pipes, each of which has a unique address from 0 to 5, which allows each channel to communicate with up to 6 other devices simultaneously. This makes it possible to have network with a total of 900 independently working sensor nodes in one place. This unique feature of the NRF24L01 makes it easy to add new sensor nodes to the already existing system. In this research, channels 100 to 110 were chosen as a means to alleviate potential interference issues in the 2.4 GHz band [35] . At the transmitter side, the data payloads are stored into the TX FIFO register of the NRF24L01chip, then the radio gets out of the low power standby-I mode into the TX active mode in order to transmit the packet. The chip has a built in auto-acknowledgement for successful transmitted packets and built in auto retransmit for unsuccessful transmitted packets. Therefore, the transmitter directly deals with the auto-acknowledge and auto-resend procedures. As the maximum number of allowed automatic transmitter resends is 15, each packet is transmitted up to 16 times or till it goes through. If a packet fails to be transmitted after all the autoresend trials, the radio drops the packet, clears the TX FIFO register and returns to low-power standby-I mode waiting to send the next packet of data, hence duty cycle of the radio transmitter is very low, emphasizing power conservation. The protocol function of each sensor node is shown in Fig. 5 . At the receiver side, the radio gets into the RX active mode then waits for a valid packet. When a valid packet is received, the radio retrieves the data from the RX FIFO register then sends an auto acknowledge signal to the transmitter in the sensor node. By implementing the auto acknowledge and auto resend features, the reliability of NRF24L01 the wireless connection is considerably improved. Because the DPs are powered from the mains, the receiver can operate at almost 100% of its duty cycle. The second test was performed to specify the topology that better fits the network of DPs and a gateway. For the purpose of covering approximately 2500 m 2 with up to 40 sensor nodes, 4 DPs and one gateway were operated for 24 h. The key measure for the system to function properly is that the percentage of lost packets should not exceed 3% of those sent. This arrangement suits applications that involve low traffic load, but demand high coverage. Figures 6 and 7 illustrate the protocol functions of both a DP and gateway, respectively. The percentage of measured packets lost was between 0.65% and 3.3% when 10 patients sent monitoring information to one DP at the same time. During transmission, the current measured from the sensor node was 10.5 mA with a 3.3 V input, consuming less power than those wearable monitoring systems mentioned in [66] , which used different communication techniques. High capacity lithium-ion batteries can easily have a capacity of 5500 mAh. The battery life of this type is about 550 h before it needs recharging. It is a good clinical feature if a battery lasts longer than three weeks continuously running, as nurses would be able to charge batteries on a simple Fig. 9 GUI display for data from one sensor node representing all vital signs for one patient schedule. However, the battery operating time is much longer when instant or interval transmission is used. Figure 8 shows the protocol function for the hospital management system based on client server architecture. A sample of the results from one sensor node displayed on the GUI is shown Fig. 9 . The displayed numerical data represents the patient vital signs together with a graph for both the respiration sound and the ECG signal. Similar data for all other patients in the same study is also available. Due to COVID-19 pandemic, the number of patients in need to be admitted to hospitals was increased. Therefore, hospitals in many parts of the world faced challenges due to extra workloads with limited facilities. Therefore, a successful design and implementation of full scale smart monitoring system may bring about fully fledged smart hospitals or intelligent residential care homes for elderly. In this study, we have developed a simple, reliable and cost-effective microcontroller-based wireless vital signs monitoring system with high mobility and low power consumption that is able to measure the BT, HR, SpO2, RR and ECG of patients for large hospitals. The proposed system architecture consists of a set of sensor nodes that contains wearable vital sensors, wireless communications infrastructure system to carry data from the sensor nodes to the management system that handles the patient's medical data and a GUI that enables the hospital staff to observe the status of all the patients. A combination of different communication technologies, i.e. RF, LoRa and WiFi, were used to support automatic and remote monitoring of patients' health conditions in the hospital. 40 sensor nodes, 4 DPs and one gateway were operated to cover a hospital area of approximately 2500 m 2 . The system was tested and the measured percentage of lost packets did not exceed 3.3% of those sent. Using standard components such as RF transceivers and microcontrollers reduced the cost and improved design compatibility and simplicity. Furthermore, all system components were operated at similar voltage to eliminate the usage of any unnecessary voltage regulation circuitry. Used voltage sources are typically in the 3.3 V range, which is compatible with CMOS circuits and lithium ion batteries [42] . The battery life for the implemented sensor nodes is about 550 continuous working hours with one charge. The sensor nodes have both low power consumption and high signal quality, featuring a good figure of merit. The system applied in this study uses anycast communication mode, which is a relatively new routing approach, where data packets are sent to the nearest DP. The system can simultaneously monitor multiple patients using the same wireless infrastructure, which can reduce cost of the system per patient, minimize complexity and decrease the marginal cost of adding additional patients. The system can also be integrated with other existing biomedical monitoring systems. This study can be further extended to include more sensor data and detect abnormalities by examining the deviations from the standard patterns in the physiological data and activities. The prediction algorithms can benefit from AI and utilize machine learning techniques to develop models for the smart hospital environment as well as for physiological patterns of the patients with automatic methodologies that help in the diagnosis. This would mean that less number of devices is needed for efficient data transmission of patient's vital signs. Further research is also needed to examine the impact of using the proposed system on improving outcomes such as reducing hospital stay or in-hospital mortality. Vital signs in hospital patients: a systematic review A survey on health monitoring systems for health smart homes Smart homes for elderly healthcare-recent advances and research challenges A Survey on wearable sensorbased systems for health monitoring and prognosis IoT: Electrocardiogram (ECG) monitoring system Internet of Things (IoT): A Literature Review Mobile healthcare applications: system design review, critical issues and challenges Literature review on monitoring technologies and their outcomes in independently living elderly people A survey on ambient-assisted living tools for older adults Framing the evidence for health smart homes and homebased consumer health technologies as a public health intervention for independent aging: a systematic review Wireless Sensor Networks for Monitoring Physiological Signals of Multiple Patients An ECG-on-Chip with 535 nW/channel integrated lossless data compressor for wireless sensors The advanced health and disaster aid network: A light-weight wireless medical system for triage Real-time heart pulse monitoring technique using wireless sensor network and mobile application Ubiquitous WBAN-based electrocardiogram monitoring system Development of wireless patient's vital sign monitor using wireless LAN (IEEE.802.11.b/g) protocol Low-power wireless wearable ECG monitoring system based on BMD101 A wearable health care system based on knitted integrated sensors WSN based mobile u-healthcare system with ECG, blood pressure measurement function Development of wearable pulse oximeter based on internet of things and signal processing techniques A wireless emergency telemedicine system for patients monitoring and diagnosis. International journal of telemedicine and applications Zigbee based wearable remote healthcare monitoring system for elderly patients Wireless wearable pulse oximeter for health monitoring using Zigbee wireless sensor network Design of noninvasive pulse oximeter based on Bluetooth 4.0 BLE Smart multi-level tool for remote patient monitoring based on a wireless sensor network and mobile augmented reality. Sensors Pulse oximeter manufacturing and wireless telemetry for ventilation oxygen support Temperature Monitoring, MCOT, ECG, ICP, ILRs, Blood Glucose Monitoring AMON: A Wearable multiparameter medical monitoring and alert system A Review on architectures and communications technologies for wearable healthmonitoring systems Medical devices for developing countries: Design constraints and approaches SAGE: A strong privacy-preserving scheme against global eavesdropping for e-health systems LoRa Technology -An Overview Healthcare sensing and monitoring Coexistence of IEEE 802.15.4 with other systems in the 2.4 GHz ISM-band Hospital-wide physiological surveillance -A new approach to the early identification and management of the sick patient Effects of hypothermia and shivering on standard pacu monitoring of patients Maxim integrated MAX30205 The Supraventricular Tachycardias: Proposal of a diagnostic algorithm for the narrow complex tachycardias Flexible polymer transistors with high pressure sensitivity for application in electronic skin and health monitoring Monitoring of vital signs with flexible and wearable medical devices All-organic optoelectronic sensor for pulse oximetry Maxim integrated MAX30100 A wireless wearable ECG sensor for long-term applications 93? keyMa tch= ads12 93& tisea rch= Search-EN-Every thing Three-lead ECG detection system based on an analog front-end circuit ADS1293 Critical review of non-invasive respiratory monitoring in medical care An excellent impedance-type humidity sensor based on halide perovskite CsPbBr 3 nanoparticles for human respiration monitoring Respiration rate and volume measurements using wearable strain sensors Inductive fiber-meshed strain and displacement transducers for respiratory measuring systems and motion capturing systems Fabrication and evaluation of a notched polymer optical fiber fabric strain sensor and its application in human respiration monitoring Radar-Based detection of respiration rate with adaptive harmonic frequency selection Breathing detection: towards a miniaturized, wearable, battery-operated monitoring system Comparison of impedance and inductance ventilation sensors on adults during breathing, motion, and simulated airway obstruction Invent sense INMP441 Long-short range communication network leveraging LoRa TM and wake-up Receiver Nordic semiconductor NRF24L01 LoRa Communication as a Solution for Real-Time Monitoring of IoT Devices Implementation of LoRa end-device in sensor network system for indoor application Design and implementation of open LoRa for IoT Recent progress on flexible lithium rechargeable batteries Context-aware middleware for pervasive elderly homecare Using Heterogeneous Wireless Sensor Networks in a Telemonitoring System for Healthcare Low-Power Wearable ECG Monitoring System for Multiple-Patient Remote Monitoring Cloud based WiFi multi-sensor network Prospective evaluation of a modified Early Warning Score to aid earlier detection of patients developing critical illness on a general surgical ward The patient-at-risk team: identifying and managing seriously ill ward patients Esp32 series datasheet, Espressif Systems Medical electrical equipment. General requirements for basic safety and essential performance Available: www. iso. org 75. Badnjevic A, Gurbeta L, Boskovic D, Dzemic Z. Measurement in medicine -Past, present, future Testing of Anesthesia Machines and Defibrillators in Healthcare Institutions Testing of mechanical ventilators and infant incubators in healthcare institutions. Technol Health Care Risks of emergency use authorizations for medical products during outbreak situations: a COVID-19 case study Electrical Safety Analyzers The author extendshis appreciation to the Dean-