A Patient Management System Using an Edge Computing-Based IoT Pulse Oximeter

: Edge computing can provide core functions such as data collection and analysis without connecting to a centralized server. The convergence of edge computing and IoT devices has enabled medical institutions to collect patient data in real time, improving the efficiency of short-and long-term patient management. Medical equipment measures a large amount of biosignal data for analyzing diseases and patient health conditions. However, analyzing and monitoring biosignal data using a centralized server or cloud limit the medical institutions’ ability to analyze patients’ conditions in real time, preventing prompt treatment. Therefore, edge computing can enhance the efficiency of patient biosignal data collection and analysis for patient management systems. Analyzing biosignals using edge computing can eliminate the wait time present in cloud computing. Hence, this study aims to develop an IoT pulse oximeter using edge computing for medical institutions and proposes an architecture for providing a real-time monitoring service. The proposed system utilizes five types of raw (IR AC, IR DC, red AC, red DC, AMB), pulse, and SpO2 data measured using IoT pulse oximeters. Edge nodes are installed in every hospital ward to collect, analyze, and monitor patient biosignal data through a wireless network. The collected biosignal data are transmitted to the cloud for managing and monitoring the data of all patients. This system enables medical institutions to collect and analyze raw biosignal data in real time, by which an integrated management system can be established by connecting various types of IoT-based medical equipment.


Introduction
Technologies concerning the convergence of medical equipment and information technology (IT) are consistently advancing in the era of the Fourth Industrial Revolution.Such convergent technology has been continuously evolving from e-health to u-health and further, to m-health, in a smart mobile environment in which there is a growing interest in "smart healthcare" and related research based on technological advancements [1][2][3].E-health is a medical service that focuses on improving the delivery of health and medical information by connecting medical institutions and computer server systems using IT technology [4].U-health utilizes IT technology in existing medical systems to provide health and medical information, knowledge, services, and products to consumers (individuals, medical institutions, and companies) [5].In addition, it is a medical service that allows consumers to check their health status anytime or anywhere.M-Health is a medical service that utilizes mobile devices in medicine and public health [6].Smart healthcare refers to a comprehensive medical service in which health-related services and IT converge to provide information, equipment, systems, and platforms concerning personal health and healthcare [7].In recent years, the use of the Internet of things (IoT) sensors has been applied in professional healthcare fields, including remote medical treatment, and in everyday life.IoT expands the development of medical systems for patient management and communication.The major advantages of using IoT in medical institutions include reduced costs, improved treatment outcomes, improved disease management, reduced errors, enhanced patient conditions, and improved drug management [8].In particular, the necessity of non-face-to-face medical and healthcare services is increasing, owing to the outbreak of COVID-19 [9,10].
IoT-based patient monitoring enables the real-time monitoring of biosignal data and patient management, regardless of time and space, through connections to hospitals and doctors; patients can also monitor their own health status and receive personalized health management services [11].Accordingly, the demand for a remote monitoring system that enables continuous health management is growing as the healthcare industry advances and the general interest in health management rises [12].Therefore, it is important for medical institutions to operate a biosignal monitoring service for examining patients' conditions and other to provide other services for promptly detecting abnormal disease symptoms, based on biosignal data.For performing biosignal monitoring in medical institutions, biosignals measured by IoT sensors must be monitored in real-time.However, real-time biosignal monitoring requires the collection, storage, and analyses of a considerable amount of biosignal data.Currently, monitoring systems are typically built on platform environments such as distributed systems or clouds.Such platforms are suitable for collecting and analyzing significant amounts of biosignals, but network traffic may occur during collecting, storing, analyzing, and monitoring biosignals in real time.The occurrence of network traffic may delay data collection or lead to a loss of the collected data.Therefore, edge computing technology has been employed for collecting and analyzing vast amounts of data [13][14][15].Edge computing is a decentralized alternative to cloud computing technology, and it minimizes response time and network traffic by performing data collection, storage, and analysis in an edge node close to a terminal [16][17][18].Edge computing is appropriate for real-time biosignal monitoring systems in medical institutions [19] because medical institutions require equipment for measuring biosignals in each ward.Thus, an edge node is configured in every ward to enable real-time biosignal data collection and emergency analysis.In addition, the cloud can analyze the collected biosignals, i.e., detecting abnormal symptoms of diseases, using the data collected from edge nodes.
Therefore, this study aims to develop an IoT pulse oximeter for applying edge computing to medical institutions and to design and develop an architecture for providing a real-time monitoring service.An IoT pulse oximeter measures five types of raw data and two types of analyzed data, including SpO2 and pulse rate (PR) data.The measured data are used for developing IoT-based medical equipment that sends biosignal data through a Wi-Fi network.The data measured by IoT devices are transmitted to edge nodes.Edge nodes store the transmitted data, analyze emergency situations, and visualize raw realtime data using charts.The cloud connected to the nodes consists of a notification-based monitoring system that provides alerts during emergency situations and displays SpO2 and PR data in numerical form from the biosignal data collected from each edge node.

Related Work
Healthcare systems are facing increasing strain owing to a growing population and a surge in the number of patients.Accordingly, creating smart healthcare by incorporating current technological advancements into the healthcare system is crucial.Currently, the healthcare sector is facing numerous problems due to chronic diseases and the exponential growth of the population.In recent years, IoT and edge, fog, and cloud computing technologies have been developed to store, analyze, and monitor data quickly and stably.Research is being actively conducted on various methods for monitoring patient conditions using such technologies [20][21][22].For example, IoT-based smart healthcare systems collect patient information from various sensors and medical equipment to enable medical practitioners to monitor patients' conditions in real time.Furthermore, it is designed to quickly diagnose diseases in real time and notify guardians or medical practitioners of emergency situations.A previous study proposed an e-health system for the health monitoring of the elderly based on IoT and fog computing [23].This system, which was developed using the Mysignals HW V2 platform and an Android application acting as a fog server, can periodically collect physiological parameters of the elderly (pulse, body temperature, electrocardiogram (ECG), SpO2, etc.).Using this Android application, the elderly and their families can track health conditions, communicate with healthcare providers (managers and doctors), and receive recommendations, alerts, and warnings.Another study proposed an IoT-based diabetes device that performs several basic analytical processes and communicates data, with a smartphone or tablet functioning as a portable fog or edge computing device through Bluetooth for fast processing in real time [24].A remote healthcare service system was also suggested in which a user's ECG, temperature, GPS, and weather data are monitored using IoT, mobile edge computing (MEC), and machine learning technologies [25].The use of smartphones and tablets has increased in health monitoring applications, in which they are used as mobile computing devices and as fog servers that process data and send it to the cloud [26][27][28][29].A mobile application was used at to monitor the patient's heart in real time as an application through the pulse rate sensor, which measures the patient's pulse and then sends it to storage in a remote database.This application also sends notifications to the doctor if a problem is discovered in the heartbeat.A mobile application was also used to develop a system for monitoring biosignals at work [30].It monitors the patient's body temperature, heart rate, and blood pressure values obtained from sensors built into the wearable device and notifies doctors or caregivers in real time if there is a discrepancy in normal thresholds [31].HealthFog provides healthcare as a lightweight fog service and efficiently manages the data of heart patients coming from different IoT devices [32].HealthFog provides this service by using the FogBus framework [33] and demonstrates application enablement and engineering simplicity for leveraging fog resources to achieve these goals.
As mentioned in this section, numerous studies have been conducted regarding the monitoring of patients' health conditions based on IoT and edge, fog, and cloud computing.Most health condition monitoring systems that use IoT equipment have been extensively studied recently for pulse, SpO2, ECG, and body temperature data.However, there is a lack of research on real-time health management monitoring systems that incorporate the five types of raw data measured by pulse oximeters, which are the most frequently used by medical institutions.The edge computing-based real-time monitoring system proposed in this study involves installing an IoT pulse oximeter in every hospital ward and managing five types of raw data (i.e., IR AC, IR DC, red AC, red DC, and AMB) and two types of analysis data (i.e., SpO2 and pulses) measured from patients in real time.This system facilitates real-time patient management and prompt emergency response.

Designing the Architecture of an Edge Computing-Based IoT Pulse Oximeter Data Collection, Analysis, and Monitoring System
This study proposes an edge computing-based real-time patient management monitoring system using an IoT pulse oximeter.The proposed architecture is shown in Figure 1.This study designed and developed a system that monitors the health conditions and emergency situations of patients in each hospital ward by having them wear an IoT pulse oximeter.The proposed system continuously monitors patients' health conditions and provides information about their conditions by analyzing the collected health condition data.Furthermore, the proposed system provides nurses and doctors with the health information of patients using wireless communication and a cloud server.Doctors can analyze patients' health conditions from a long-term perspective based on the provided data.The system consists of three layers.Each layer has a defined task and provides services to the other layers.The sensing layer measures the biosignals of a patient in real time using an IoT pulse oximeter and sends the data to an edge node through a wireless network.Biosignal transmission stably and continuously transmits the measured data.This study thus proposes a TCP/IP socket-based transmission system because a TCP/IP socket does not cause data extinction, and the data are received in the order of their transmission.Therefore, it can stably transmit a large amount of data measured by multiple IoT pulse oximeters.
Edge nodes collect, store, analyze, and monitor the data transmitted by IoT pulse oximeters.They also manage network connections to enable the reception of the data measured by the IoT pulse oximeters.The collected data are stored in a time-series database (TSDB) [34] in real time, and emergency situations are analyzed.Biosignals are timeseries data that are continuously measured over time.Hence, such data are stored in a TSDB, which can store a large amount of time-series data in real time.
The cloud converts biosignals saved in edge nodes into big data to be stored, analyzed, and monitored.Further, the cloud analyzes the state of edge nodes to manage IoT pulse oximeters.A NoSQL-based database is used to systematically store a vast amount of biosignals stored in edge nodes [35].Various types of biosignals and patient information are required to manage the health conditions of patients.To manage diverse types of information, expandability and high flexibility are required, in addition to the capability for processing a large amount of data.Morevoer, the cloud consists of a real-time monitoring system to monitor all the wards and an alarm function that provides alerts when the patients at the edge nodes are in an emergency situation.The system consists of three layers.Each layer has a defined task and provides services to the other layers.The sensing layer measures the biosignals of a patient in real time using an IoT pulse oximeter and sends the data to an edge node through a wireless network.Biosignal transmission stably and continuously transmits the measured data.This study thus proposes a TCP/IP socket-based transmission system because a TCP/IP socket does not cause data extinction, and the data are received in the order of their transmission.Therefore, it can stably transmit a large amount of data measured by multiple IoT pulse oximeters.
Edge nodes collect, store, analyze, and monitor the data transmitted by IoT pulse oximeters.They also manage network connections to enable the reception of the data measured by the IoT pulse oximeters.The collected data are stored in a time-series database (TSDB) [34] in real time, and emergency situations are analyzed.Biosignals are time-series data that are continuously measured over time.Hence, such data are stored in a TSDB, which can store a large amount of time-series data in real time.
The cloud converts biosignals saved in edge nodes into big data to be stored, analyzed, and monitored.Further, the cloud analyzes the state of edge nodes to manage IoT pulse oximeters.A NoSQL-based database is used to systematically store a vast amount of biosignals stored in edge nodes [35].Various types of biosignals and patient information are required to manage the health conditions of patients.To manage diverse types of information, expandability and high flexibility are required, in addition to the capability for processing a large amount of data.Morevoer, the cloud consists of a real-time monitoring system to monitor all the wards and an alarm function that provides alerts when the patients at the edge nodes are in an emergency situation.

IoT Pulse Oximeter Design
A pulse oximeter is a noninvasive device that measures the oxygen saturation of arterial blood in the artery blood vessels, such as in fingers or earlobes.It also measure the concentration ratio of the difference in absorption spectrum between hemoglobin containing oxygen and total hemoglobin.This medical equipment is commonly used for emergency and general patients at medical institutions.Thus, this study proposes an IoT-based pulse oximeter.
Figure 2 shows the system configuration of an IoT pulse oximeter [36].The driver adjusts the amount of light and the generation period of red and infrared (IR) LED.The microcontroller unit (MCU), which controls these values, is a digital-analog converter (DAC).Appl.Sci.2024, 14, x FOR PEER REVIEW 5 of 15

IoT Pulse Oximeter Design
A pulse oximeter is a noninvasive device that measures the oxygen saturation of arterial blood in the artery blood vessels, such as in fingers or earlobes.It also measure the concentration ratio of the difference in absorption spectrum between hemoglobin containing oxygen and total hemoglobin.This medical equipment is commonly used for emergency and general patients at medical institutions.Thus, this study proposes an IoT-based pulse oximeter.
Figure 2 shows the system configuration of an IoT pulse oximeter [36].The driver adjusts the amount of light and the generation period of red and infrared (IR) LED.The microcontroller unit (MCU), which controls these values, is a digital-analog converter (DAC).The signals obtained from hardware are used to analyze the SpO2 and PR in the main system using an algorithm.SpO2 and PR are important data used in real-time emergency situation analysis.Therefore, SpO2 and PR analysis algorithms are the most important core technologies in pulse oximeters.Lastly, a Wi-Fi system for managing data communication is built for communicating with edge nodes.
Figure 3 shows the seven steps for analyzing SpO2 and PR.
1.The signal noise is removed in the digital filter step.The digital filter uses a bandpass filter.The sample rate is set to 160 Hz, the cutoff frequency low-pass filter is set to 0.1~0.5 Hz, and the high-pass filter is set to 8~9 Hz. 2. Only the peak values of the signals are extracted in the peak detection step.3.In the standard deviation acquisition step, the peak component values are acquired and filtered using the standard deviation of a probability distribution.4. The obtained values for red and IR light are normalized in the red, IR normalization step. 5.In the pulse period and the SpO2 parameter acquisition step, the amplitude is measured using the component within the range by discerning whether or not it is a peak of the pulse within the measurement range from the acquired peak components, while The signals obtained from hardware are used to analyze the SpO2 and PR in the main system using an algorithm.SpO2 and PR are important data used in real-time emergency situation analysis.Therefore, SpO2 and PR analysis algorithms are the most important core technologies in pulse oximeters.Lastly, a Wi-Fi system for managing data communication is built for communicating with edge nodes.
Figure 3 shows the seven steps for analyzing SpO2 and PR.
Appl.Sci.2024, 14, x FOR PEER REVIEW 6 of 15 red DC, red AC, IR DC, and IR AC, which are the parameters for measuring SpO2, are measured.6.In the pulse rate and SpO2 Calculation step, the measured amplitude is averaged, the PR is calculated using the correlation formula of the sampling rate, and the SpO2 is calculated using the SpO2 parameters.7.In the state distinction step, the state of the final obtained signal is distinguished as stable, moving, or unstable.

Edge Node System Design
Edge nodes are devices that can process and analyze data in real time near the data collection equipment.Using these edge nodes improves the real-time data processing capabilities and response times, while reducing network and server traffic overload.Therefore, it is a suitable method for collecting data from biosignal measurement equipment that generates large amounts of data.

1.
The signal noise is removed in the digital filter step.The digital filter uses a bandpass filter.The sample rate is set to 160 Hz, the cutoff frequency low-pass filter is set to 0.1~0.5 Hz, and the high-pass filter is set to 8~9 Hz.

2.
Only the peak values of the signals are extracted in the peak detection step.

3.
In the standard deviation acquisition step, the peak component values are acquired and filtered using the standard deviation of a probability distribution.

4.
The obtained values for red and IR light are normalized in the red, IR normalization step. 5.
In the pulse period and the SpO2 parameter acquisition step, the amplitude is measured using the component within the range by discerning whether or not it is a peak of the pulse within the measurement range from the acquired peak components, while red DC, red AC, IR DC, and IR AC, which are the parameters for measuring SpO2, are measured.6.
In the pulse rate and SpO2 Calculation step, the measured amplitude is averaged, the PR is calculated using the correlation formula of the sampling rate, and the SpO2 is calculated using the SpO2 parameters.7.
In the state distinction step, the state of the final obtained signal is distinguished as stable, moving, or unstable.

Edge Node System Design
Edge nodes are devices that can process and analyze data in real time near the data collection equipment.Using these edge nodes improves the real-time data processing capabilities and response times, while reducing network and server traffic overload.Therefore, it is a suitable method for collecting data from biosignal measurement equipment that generates large amounts of data.
The edge nodes of the proposed system are network devices placed in each ward that perform server, gateway, router, and storage roles.Edge nodes collect and store the data transmitted by IoT pulse oximeters and further analyze and monitor emergency situations in real time using the stored data.In addition, they send messages and the collected biosignals to the cloud when emergency situations occur.
The data collection technology collects biosignals measured by the IoT pulse oximeters.The IoT pulse oximeters transmit the data, including IR AC, IR DC, red AC, red DC, AMB, SpO2, and PR, through a wireless network.The transmitted data are collected and stored in edge nodes in real time.TCP/IP socket communication technology is used to stably and quickly collect five types of raw data and two types of analytical data measured by multiple IoT pulse oximeters.TCP/IP socket communication is appropriate for transmitting and collecting a large amount of data [37] owing to various advantages, such as revise errors, guaranteed flow control, and assured data transmission order.However, collecting multiple biosignals from one collection system can lead to network traffic in the long term, which might cause various problems, including decreased service speed and service access errors.Therefore, the loads on a server can be reduced by using edge nodes for stably collecting biosignals measured by multiple IoT pulse oximeters.The data transmitted through a wireless network consist of two packets, including a packet transmitting five types of raw data and another packet transmitting SpO2 and PR data.Table 1 presents the basic packet format.In Table 1, ID is the key for distinguishing IoT pulse oximeters, while the message command code (CDM) is an identifier for distinguishing between two packets.The cyclic redundancy check (CRC) determines whether or not there is an error in a packet.DATA represents the basic format for transmitting raw data and the data for transmitting analyzed SpO2 and PR.Data storage technology systematically stores the data measured by IoT pulse oximeters.The biosignals measured by IoT pulse oximeters are measured over time.These data must be processed by a technology capable of quickly and accurately processing a large amount of data acquired in real time.Thus, this study used InfluxDB to store biosignal data in real time, using a time-series database [38,39].Among the currently available time-series databases, InfluxDB is the most suitable for data storage because it is stable and can process data at a high speed.In this study, two tables are created for storing the raw and analyzed data in InfluxDB.Table 2 shows raw data, including measured time, device ID, IR AC, IR DC, red AC, and red DC.Table 3 shows the analyzed data, including measured time, device ID, PR, and SpO2.The emergency analysis and monitoring system analyzes emergencies using SpO2 and PR and sends the relevant data to the cloud, while showing the transmitted data in real time.An SpO2 between 81 and 90 is considered critical, while an SpO2 below 80 is considered an emergency.
Results above 200 and below 50 are considered to indicate an emergency.When emergency situations occur, an emergency message is sent to the cloud in JavaScript object notation (JSON) format.In addition, real-time monitoring in the edge nodes is an important factor for medical institutions.The biosignal monitoring of patients in each ward is needed to observe patients' conditions in real time.The data measured by IoT pulse oximeters are visualized.In particular, IR AC is the most basic data among the raw data, which must be visualized as a chart in real time, while SpO2 and PR are expressed in numbers.

Cloud System Design
The cloud consists of storage for managing the data collected from edge nodes and a monitoring system for managing patients' conditions in real time.For data collection and storage, the cloud offers a collection system to which REST API is applied.REST API can build a web service-based web server using HTTP requests and JSON data models [40].This study built a framework for data collection and storage based on REST API.The cloud collects the data gathered by edge nodes using a JSON format.The collected data are stored using an NoSQL database.An NoSQL database, which is designed based on big data, facilitates collecting and analyzing a large amount of biosignal and health-related data.Therefore, this study configured a relational model, as shown in Figure 4.The frequency refers to the number of biosignals measured in one second.The edge node and device IDs identify the location of a patient.As shown in Figure 2, two documents were configured because the expandability for adding various medical information from patient information documents was considered.

Cloud System Design
The cloud consists of storage for managing the data collected from edge node monitoring system for managing patients' conditions in real time.For data collecti storage, the cloud offers a collection system to which REST API is applied.REST A build a web service-based web server using HTTP requests and JSON data mode This study built a framework for data collection and storage based on REST A cloud collects the data gathered by edge nodes using a JSON format.The collecte are stored using an NoSQL database.An NoSQL database, which is designed ba big data, facilitates collecting and analyzing a large amount of biosignal and healthdata.Therefore, this study configured a relational model, as shown in Figure 4. T quency refers to the number of biosignals measured in one second.The edge no device IDs identify the location of a patient.As shown in Figure 2, two documen configured because the expandability for adding various medical information fr tient information documents was considered.The cloud monitors all the patients on the edge nodes.Monitoring involves m ing real-time emergency messages, as well as visualization.Emergency message m ment shows notifications for the messages sent from the edge nodes.Biosignal vis tion presents the biosignal data of all patients.However, there are limitations in sh all data measured by IoT pulse oximeters because raw data are the signals gener large amount of data, which can cause several problems, such as increased network and network delays during real-time monitoring.Accordingly, the analyzed and and PR data are shown in real time.

Implementation
Pulse oximeters are the most frequently used devices in medical institutions fo aging patients and emergencies.Therefore, managing patients' health condition pulse oximeters is extremely important.In this study, the edge nodes for measur tients' biosignals and efficiently managing and monitoring a large number of bio using an IoT pulse oximeter and a cloud-based patient management system for m ing all patients are developed.

Developing an IoT Pulse Oximeter for Measuring Patients' Biosignals Data
For an IoT pulse oximeter, a board was developed for measuring five types data, SpO2, and PR using Raspberry Pi, as shown in Figure 5a.Furthermore, th The cloud monitors all the patients on the edge nodes.Monitoring involves managing real-time emergency messages, as well as visualization.Emergency message management shows notifications for the messages sent from the edge nodes.Biosignal visualization presents the biosignal data of all patients.However, there are limitations in showing all data measured by IoT pulse oximeters because raw data are the signals generating a large amount of data, which can cause several problems, such as increased network usage and network delays during real-time monitoring.Accordingly, the analyzed and SpO2 and PR data are shown in real time.

Implementation
Pulse oximeters are the most frequently used devices in medical institutions for managing patients and emergencies.Therefore, managing patients' health conditions using pulse oximeters is extremely important.In this study, the edge nodes for measuring patients' biosignals and efficiently managing and monitoring a large number of biosignals using an IoT pulse oximeter and a cloud-based patient management system for monitoring all patients are developed.

Developing an IoT Pulse Oximeter for Measuring Patients' Biosignals Data
For an IoT pulse oximeter, a board was developed for measuring five types of raw data, SpO2, and PR using Raspberry Pi, as shown in Figure 5a.Furthermore, the LCD screen shown in Figure 5b was developed for visualization.The SpO2 sensor is a product used in hospitals and employs the MEDNIS company's WA-100 (B6M114) product.This sensor is CE certified, ensuring calibration and accuracy.screen shown in Figure 5b was developed for visualization.The SpO2 sensor is a product used in hospitals and employs the MEDNIS company's WA-100 (B6M114) product.This sensor is CE certified, ensuring calibration and accuracy.IoT pulse oximeters measure a user's biosignals using a pulse oximeter probe.For biosignal data, fifty raw data samples and one SpO2 and PR data item are measured per second.The measured biosignal data are collected for one second and transmitted to the edge nodes.Moreover, the biosignals are visualized on an LCD screen in real time.The raw data are presented as real-time charts, while SpO2 and PR are shown as numbers.Furthermore, a 6000-mAh lithium polymer battery, which lasted for six hours when data were continuously measured, was used in the IoT pulse oximeters.

Developing Edge Nodes for Collecting and Managing Data by Ward
The edge nodes are developed using the LattePanda Alpha, as shown in Figure 6.The LattePanda Alpha, which is similar to a mini PC, is a board capable of performing computation-intensive tasks or image processing.Therefore, the edge nodes in this study were developed using the LattePanda Alpha board, since a large number of biosignals must be collected, analyzed, and monitored in real time.For developing an edge node-based real-time data collection and management system, a framework must be capable of collecting, storing, and analyzing a vast amount of biosignal data in real time.Thus, this study proposes a node-based framework.Nodes exhibit better computation properties than do other web development technology, such as PHP/Nginx, and are frequently employed in real-time or high-speed applications.
The system for collecting and storing data and analyzing emergency situations is a node-based socket server framework that can access and collect the data measured by IoT medical equipment through a wireless network.Packets transmitted to the TCP socket are IoT pulse oximeters measure a user's biosignals using a pulse oximeter probe.For biosignal data, fifty raw data samples and one SpO2 and PR data item are measured per second.The measured biosignal data are collected for one second and transmitted to the edge nodes.Moreover, the biosignals are visualized on an LCD screen in real time.The raw data are presented as real-time charts, while SpO2 and PR are shown as numbers.Furthermore, a 6000-mAh lithium polymer battery, which lasted for six hours when data were continuously measured, was used in the IoT pulse oximeters.

Developing Edge Nodes for Collecting and Managing Data by Ward
The edge nodes are developed using the LattePanda Alpha, as shown in Figure 6.The LattePanda Alpha, which is similar to a mini PC, is a board capable of performing computation-intensive tasks or image processing.Therefore, the edge nodes in this study were developed using the LattePanda Alpha board, since a large number of biosignals must be collected, analyzed, and monitored in real time.
Appl.Sci.2024, 14, x FOR PEER REVIEW 9 of 15 screen shown in Figure 5b was developed for visualization.The SpO2 sensor is a product used in hospitals and employs the MEDNIS company's WA-100 (B6M114) product.This sensor is CE certified, ensuring calibration and accuracy.IoT pulse oximeters measure a user's biosignals using a pulse oximeter probe.For biosignal data, fifty raw data samples and one SpO2 and PR data item are measured per second.The measured biosignal data are collected for one second and transmitted to the edge nodes.Moreover, the biosignals are visualized on an LCD screen in real time.The raw data are presented as real-time charts, while SpO2 and PR are shown as numbers.Furthermore, a 6000-mAh lithium polymer battery, which lasted for six hours when data were continuously measured, was used in the IoT pulse oximeters.

Developing Edge Nodes for Collecting and Managing Data by Ward
The edge nodes are developed using the LattePanda Alpha, as shown in Figure 6.The LattePanda Alpha, which is similar to a mini PC, is a board capable of performing computation-intensive tasks or image processing.Therefore, the edge nodes in this study were developed using the LattePanda Alpha board, since a large number of biosignals must be collected, analyzed, and monitored in real time.For developing an edge node-based real-time data collection and management system, a framework must be capable of collecting, storing, and analyzing a vast amount of biosignal data in real time.Thus, this study proposes a node-based framework.Nodes exhibit better computation properties than do other web development technology, such as PHP/Nginx, and are frequently employed in real-time or high-speed applications.
The system for collecting and storing data and analyzing emergency situations is a node-based socket server framework that can access and collect the data measured by IoT medical equipment through a wireless network.Packets transmitted to the TCP socket are For developing an edge node-based real-time data collection and management system, a framework must be capable of collecting, storing, and analyzing a vast amount of biosignal data in real time.Thus, this study proposes a node-based framework.Nodes exhibit better computation properties than do other web development technology, such as PHP/Nginx, and are frequently employed in real-time or high-speed applications.
The system for collecting and storing data and analyzing emergency situations is a node-based socket server framework that can access and collect the data measured by IoT medical equipment through a wireless network.Packets transmitted to the TCP socket are analyzed and stored in InfluxDB, which stores time-series data.Furthermore, emergency situations are discerned using SpO2 and PR among the analyzed packets.When emergencies occur, emergency messages are sent in a JSON format to the cloud using WebSocket.A ward monitoring system uses a web-based graphical user interface (GUI).The web-based GUI can be independently executed in an Internet-connected terminal device on which a web browser is installed.Users with access rights to this system can access it from anywhere in the world.The edge computing-based monitoring system presents raw data, SpO2, and PR in real-time, among the data measured by IoT pulse oximeters.Particularly, raw data measured from multiple IoT pulse oximeters must be presented in charts in real time.Therefore, this study developed a hospital room monitoring system and a GUI, as shown in Figure 7.The development framework used Node's Express, which provides an integrated web programming interface based on HTML5, CSS, and JavaScript.
based GUI can be independently executed in an Internet-connected terminal device on which a web browser is installed.Users with access rights to this system can access it from anywhere in the world.The edge computing-based monitoring system presents raw data, SpO2, and PR in real-time, among the data measured by IoT pulse oximeters.Particularly, raw data measured from multiple IoT pulse oximeters must be presented in charts in real time.Therefore, this study developed a hospital room monitoring system and a GUI, as shown in Figure 7.The development framework used Node's Express, which provides an integrated web programming interface based on HTML5, CSS, and JavaScript.
Patients in each ward are registered so that their PR, SpO2, and raw data can be presented in real time.Server-Sent Events (SSE) is used to express real-time data.To show a large amount of data in a monitoring system, the data must be continuously transmitted through one-way communication.Particularly, real-time charts that visualize the raw data must be shown continuously, without interruptions.However, a network delay or a delay between a server and client may occur.Due to such delays, real-time charts may show interruptions when presenting data.In this study, buffering technology is used to maintain the continuity of data.

Developing a Cloud-Based Monitoring System for Patient Management
The monitoring system for patient management stores the patient data measured in all wards, while simultaneously performing notification and monitoring functions.This system was developed based on cloud computing and should be managed in the nurses' station or treatment rooms.We used the Amazon Elastic Compute Cloud (EC2) as our cloud platform.
The data collection and storage system automatically collects and stores the data from the edge nodes.The data are periodically collected from the edge nodes and stored using WebSocket, which is capable of two-way communication.Such data are then stored in mongoDB.Patients in each ward are registered so that their PR, SpO2, and raw data can be presented in real time.Server-Sent Events (SSE) is used to express real-time data.To show a large amount of data in a monitoring system, the data must be continuously transmitted through one-way communication.Particularly, real-time charts that visualize the raw data must be shown continuously, without interruptions.However, a network delay or a delay between a server and client may occur.Due to such delays, real-time charts may show interruptions when presenting data.In this study, buffering technology is used to maintain the continuity of data.

Developing a Cloud-Based Monitoring System for Patient Management
The monitoring system for patient management stores the patient data measured in all wards, while simultaneously performing notification and monitoring functions.This system was developed based on cloud computing and should be managed in the nurses' station or treatment rooms.We used the Amazon Elastic Compute Cloud (EC2) as our cloud platform.
The data collection and storage system automatically collects and stores the data from the edge nodes.The data are periodically collected from the edge nodes and stored using WebSocket, which is capable of two-way communication.Such data are then stored in mongoDB.
Emergency notification messages are sent to the cloud when real-time patient conditions indicate that an emergency has occurred.After emergency messages are sent to the cloud, the ward name of the patient experiencing the emergency is shown.
The patient management monitoring system for managing all patients was developed as shown in Figure 8.The monitoring system shows real-time PR and SpO2 information for all patients as charts and numbers.In addition, when a patient is selected, the raw data of the selected patient are shown as a time series chart.The patient management monitoring system for managing all patients was developed as shown in Figure 8.The monitoring system shows real-time PR and SpO2 information for all patients as charts and numbers.In addition, when a patient is selected, the raw data of the selected patient are shown as a time series chart.

Performance Evaluation
The edge-based real-time patient management system proposed in this paper is intended to evaluate performance from two perspectives.First, the integrity of the transmitted data is measured by the IoT pulse oximeter.Second, the persistence of the real-time chart is also measured.
In IoMT, which transmits a large number of bio signals, it is important that the original data is not damaged.Five IoT pulse oximeters connect to the edge node and measure the loss rate of the transmitted data.The measurement method compares the packets transmitted from the IoT pulse oximeter and the packets received from the edge node.As shown in Table 4, as a result of repeating the analysis for 5 times for 24 h, a loss rate of 0% was confirmed.

Performance Evaluation
The edge-based real-time patient management system proposed in this paper is intended to evaluate performance from two perspectives.First, the integrity of the transmitted data is measured by the IoT pulse oximeter.Second, the persistence of the real-time chart is also measured.
In IoMT, which transmits a large number of bio signals, it is important that the original data is not damaged.Five IoT pulse oximeters connect to the edge node and measure the loss rate of the transmitted data.The measurement method compares the packets transmitted from the IoT pulse oximeter and the packets received from the edge node.As shown in Table 4, as a result of repeating the analysis for 5 times for 24 h, a loss rate of 0% was confirmed.The continuity of the real-time chart means that the biosignal raw data shown in real time on the UI is continuously visualized.In this paper, in order to continuously visualize real-time charts, the monitoring system collects raw data while buffering for 3 s and then displays them sequentially.In order to check the continuity of the five real-time charts, the amount of data collected during buffering used by each chart is analyzed.The analysis method determines that the chart is seamless if there is at least one raw data sample in the buffer.Table 5 shows an average of 126.6 data samples collected under buffering for visualization of the raw data transmitted from the five IoT pulse oximeters.Moreover, the minimum number of buffer data samples was confirmed to be 87.5.The continuity of the real-time chart means that the biosignal raw data shown in real-time on the UI is continuously visualized.In this paper, in order to continuously visualize real-time charts, the monitoring system collects raw data under buffering for 3s and then displays them sequentially.In order to check the continuity of the five real-time charts, the number of data samples collected in the buffer used by each chart is analyzed.The analysis method determines that the chart is seamless if there is at least one raw data sample in the buffer.Table 5 shows that there is an average of 126.6 data samples collected in the buffer for visualization of the raw data transmitted from the five IoT pulse oximeters.Moreover, the minimum number of buffer data samples was confirmed to be 87.5.

Discussion
The system proposed in this paper is differentiated from other edge computing-based healthcare systems proposed in the existing literature.Most smart healthcare systems primarily use sensors and electronic devices connected to the Internet to remotely monitor the patient's health and transmit this information to the doctor.In particular, for remote medical care, the health status is confirmed by transmitting minimal biosignal data, such as those for SpO2, body temperature, and pulse.Such biometric data is also important.However, data such as SpO2 and pulse rate are analyzed from raw data, so the collection of raw data is also important.Therefore, the system proposed in this paper employes an edge computing-type monitoring system that reliably collects, stores, and analyzes all data (raw data and analyzed data) generated from the IoT pulse oximeters.In particular, the goal was to create a system that could be applied to hospital intensive care units or recovery rooms.However, the collection of such raw data possesses potential risks, such as increased data maintenance and management costs.
The important elements of the patient management system proposed in this paper were evaluated.According to the evaluation results, good outcomes were achieved by analyzing the results measured for 24 h using five IoT pulse oximeters and one edge node.However, the evaluation method used in this paper is the result of testing in a limited environment.Therefore, it is necessary to set up various test bed environments for further analyses.

Conclusions
This study proposed a system architecture for managing patients using pulse oximeters, which are often used in medical institutions for monitoring patient conditions.It is particularly crucial for medical systems to be equipped with technology for stably collecting and analyzing patient biosignals.Thus, this study proposed a patient management monitor-ing system that is designed based on IoT, edge, and cloud computing.The proposed system requires an IoT pulse oximeter to be worn by patients in every ward, and the measured data are collected and analyzed in edge nodes and transmitted to the cloud.Accordingly, the web-based monitoring system developed based on the IoT pulse oximeter and edge nodes enables doctors and nurses to monitor patients' conditions in real time.
The proposed monitoring system for identifying patients' health conditions monitors patients' raw IoT pulse oximeter, SpO2, and PR data in real time.There is a growing need for establishing systems appropriate for the medical institution environment and for system architectures that monitor raw data in real time.Such research will enable medical institutions to systematically collect and manage patient data in order to provide personalized diagnoses and treatments.Further, the proposed system can be installed in emergency rooms, general wards, and intensive care units, thus facilitating patient management on a wide scale.
In future studies, a comprehensive patient management monitoring system for utilization in medical institutions will be developed.Edge computing-based monitoring systems will be created by developing IoT-based medical equipment for measuring blood pressure, body temperature, and ECG.Furthermore, security is an important factor in storing, analyzing, and monitoring patients' biosignals.We plan to use blockchain technology to increase the sharing and use of research data, strengthen the protection of personal medical and health information, and ensure the integrity of the medical information.In addition, we seek to strengthen security by preventing system access from unauthorized physical communication ports by using SSL-based network communication with RSA encryption.

Figure 1 .
Figure 1.Architecture of a multiple access-based real-time health management monitoring system.

Figure 1 .
Figure 1.Architecture of a multiple access-based real-time health management monitoring system.
Filter 1 removes the noise of the analog signals obtained from red and IR light in a phototransistor, which is a light sensor.Filter 1 uses a lowpass filter.The cutoff frequency is set to 0~5 Hz.A multiplexer (MUX), which is signal selector 1, separates red, IR, and ambient (AMB) signals.The sample and hold analog circuit fixes the rate of change of the separated signals.Filter 2 is used for separating analog signals by frequency.Filter 2 uses a bandpass filter.The cutoff frequency is set to 0.5~5 Hz.The amplifier amplifies the AC signal.Signal selector 2 separates the DC and AC components from the red and IR signals.The analog to digital converter (ADC) converts analog signals to digital signals.The signals are selected and adjusted using the MCU.Ultimately, the infrared alternating current (IR AC), infrared direct current (IR DC), red AC, red DC, and AMB signals are stored in the MCU.
Filter 1 removes the noise of the analog signals obtained from red and IR light in a phototransistor, which is a light sensor.Filter 1 uses a lowpass filter.The cutoff frequency is set to 0~5 Hz.A multiplexer (MUX), which is signal selector 1, separates red, IR, and ambient (AMB) signals.The sample and hold analog circuit fixes the rate of change of the separated signals.Filter 2 is used for separating analog signals by frequency.Filter2 uses a bandpass filter.The cutoff frequency is set to 0.5~5 Hz.The amplifier amplifies the AC signal.Signal selector 2 separates the DC and AC components from the red and IR signals.The analog to digital converter (ADC) converts analog signals to digital signals.The signals are selected and adjusted using the MCU.Ultimately, the infrared alternating current (IR AC), infrared direct current (IR DC), red AC, red DC, and AMB signals are stored in the MCU.

Figure 2 .
Figure 2. Hardware system configuration of the IoT pulse oximeter.

Figure 2 .
Figure 2. Hardware system configuration of the IoT pulse oximeter.

Figure 4 .
Figure 4. No-SQL relational modeling.(a) The data related to patient information.(b) The d measured by IoT pulse oximeters, which include edge node ID, device ID, start time, elapse and frequency (Hz) information.

Figure 4 .
Figure 4. No-SQL relational modeling.(a) The data related to patient information.(b) The data measured by IoT pulse oximeters, which include edge node ID, device ID, start time, elapsed time, and frequency (Hz) information.

Figure 5 .
Figure 5.The IoT pulse oximeter board and the pulse oximeter measurement.

Figure 5 .
Figure 5.The IoT pulse oximeter board and the pulse oximeter measurement.

Figure 5 .
Figure 5.The IoT pulse oximeter board and the pulse oximeter measurement.

Figure 7 .
Figure 7.This is the Edge node GUI screen that shows IR-AC raw data, PR, and SpO2 measured from the IoT pulse oximeter in real time.

Figure 7 .
Figure 7.This is the Edge node GUI screen that shows IR-AC raw data, PR, and SpO2 measured from the IoT pulse oximeter in real time.
Appl.Sci.2024, 14, x FOR PEER REVIEW 11 of 15 Emergency notification messages are sent to the cloud when real-time patient conditions indicate that an emergency has occurred.After emergency messages are sent to the cloud, the ward name of the patient experiencing the emergency is shown.

Figure 8 .
Figure 8. Cloud GUI screen that shows PR and SpO2 transmitted from the edge node in real time.

Figure 8 .
Figure 8. Cloud GUI screen that shows PR and SpO2 transmitted from the edge node in real time.

Table 2 .
Structure of the edge node raw data time-series DB table.

Table 3 .
Structure of the edge node analyzed data time-series DB table.

Table 4 .
Loss rate of data transmitted from IoT devices over 24 h.

Table 4 .
Loss rate of data transmitted from IoT devices over 24 h.

Table 5 .
Number of data samples under buffering for real-time chart persistence.