IoT System in Diagnosis of Covid-19 Patients

.


Introduction
As technological infrastructure continues to evolve, the world around us has become more connected than ever before, and everything that can be connected, will be connected.Smart cities, smart homes, smart retail, connected cars, and wearables bear testimony to how the connected devices are disrupting the status quo leading to the creation of an efficient, automated planet.The Internet of Things (IoT) concatenates all things to the Internet with the purpose to interchange information in order to achieve smart recognitions, positioning, tracing, monitoring, and administration, using stipulated protocols through information sensing equipment to conduct information exchange and communications.

IoT features
The most important features of the IoT are:  Interconnectivity & Connectivityanything can be interconnected with the global information and communication infrastructure.Connectivity enables network accessibility and compatibility.Accessibility is getting on a network while compatibility provides the common ability to consume and produce data. Heterogeneity -The devices in the IoT are heterogeneous as based on different hardware platforms and networks.They can interact with other devices or service platforms through different networks. Safety -This includes the safety of our personal data and the safety of our physical well-being and must be enforced prevents system hacking and compromises by unauthorized personnel, thus reducing the possibility of risks.Securing the endpoints, the networks, and the data moving across all of it means creating a security paradigm that will scale. Dynamic changes -The state of devices and the number of devices can change dynamically. Big scale -The number of devices that need to be managed and that communicate with each other will be at a very large scale and even more critical will be the management of the data generated and their interpretation for efficient data handling.

IoT architecture
IoT architecture consists of different layers of supporting technologies that rely on each other for the scalability, modularity and configuration of IoT deployment in different scenarios.The functionality of each layer is briefly described below: A. smart device / sensor layer: The lowest layer is made up of smart objects integrated with sensors.These devices consist of a variety of modules such as energy modules, power management modules, RF modules, and sensing modules.Most sensors require connectivity to the sensor gateways.This can be in the form of a Local Area Network (Ethernet and Wi-Fi connections) or Personal Area Network (ZigBee, Bluetooth and Ultra Wideband).For sensors that do not require connectivity to sensor aggregators, their connectivity to backend servers/applications can be provided using Wide Area Network such as (GSM, GPRS and LTE).Sensors that use low power and low data rate connectivity, they typically form networks commonly known as wireless sensor networks.The WSNs are gaining popularity due to the fact that they are able to accommodate far more sensor nodes while retaining battery life and covering extended areas.

B. Gateways and Networks
Due to the large amount of data that is being produced by the sensors, a robust and high performance wired / wireless network infrastructure for efficient transport is required.Current networks, often tied with very different protocols, have been used to support machine-to-machine networks and their respective applications, but a wider range of IoT services and applications needs to be served such as high speed transactional services, context-aware applications.Multiple networks with various technologies and access protocols need to work with each other in a very heterogeneous configuration.These networks can be in the form of a private, public or hybrid models and are built to support the communication requirements for latency, bandwidth or security.

C. Management Service Layer
The management service renders the processing of information possible through analytics, security controls, process modeling and management of devices.One of the important features of the management service layer is the business and process rule engines.IoT is providing information in the form of events or contextual data (e.g.temperature of goods, current location, traffic data).Some of these events require response to the immediate situations (e.g.reacting to emergencies on patient's health conditions) while others require filtering or routing to post-processing systems (e.g.capturing of periodic sensory data).The rule engines support the formulation of decision logics and trigger interactive and automated processes to enable a more responsive IOT system.Various analytics tools are used to extract relevant information from massive amount of raw data and to be processed at a much faster rate.With data management in the management service layer, information can be accessed, integrated and controlled.Higher layer applications can be shielded from the need to process unnecessary data and reduce the risk of privacy disclosure of the data source.

D. Application Layer
The IoT application covers "smart" environments/spaces in domains such as: Healthcare, Agriculture, Transportation, Building, City, Lifestyle, Retail, Factory, Supply chain, Emergency, User interaction, Culture and tourism, Environment and Energy.The layers of the IoT architecture are of course based on the 2 basic components: hardware and software.

IoT hardware
IoT Hardware includes a wide range of devices such as devices for routing, bridges, sensors etc.These IoT devices manage key tasks and functions such as system activation, security, action specifications, communication, and detection of supportspecific goals and actions.IoT Hardware components can vary from low to high power boards.An example for a single-board processors is Arduino which can be used to develop standalone interactive objects or can be connected to software on your computer.Is basically smaller boards that are plugged into mainboards to improve and increase its functionality by bringing out specific functions or features.Another mention is Raspberry Pi -a series of small single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote teaching of basic computer science in schools and in developing countries, Due to the fact that is a very affordable and tiny computer that can incorporate an entire web server, the original model became far more popular than anticipated, selling outside its target market for uses such as robotics.Currently, it has enough processing power and memory to run Windows 10 on it as well as IoT Core.RasPi exhibits great processing capabilities, especially when using the Python programming language.BeagleBoard is a single-board computer with a Linux-based OS produced by Texas Instruments in association with Digi-Key and Newark element14 that uses an ARM processor, capable of more powerful processing than RasPi.The BeagleBoard was also designed with open source software development in min Tech giant Intel's boards are other options great for larger scale production, and Qualcomm has manufactured an array of enterprise-level IoT technology for cars and cameras to healthcare.

Building blocks
The IoT Hardware has 4 main building blocks:  Subjectthe IoT asset that needs to be controlled / monitored / measured  Data Acquisition Modulethe hardware component of the IoT system that converts physical signals from the monitored subject into digital signals that can be processed by a machine.This module includes sensors (e.g. for might, temperature, pressure, motion) and other required hardware for conversion (e.g.removing noise, analog to digital conversion)  Data Processing Modulethe actual machine / computer that is processing the data from the previous block: analytics, storing, computing  Communication Moduleenables communication with various 3 rd party systems and with cloud platforms.

IoT Sensors
The most important IoT hardware might be its sensors.The sensors enable the interconnection of the physical and digital worlds allowing real-time information to be collected and processed.There are various types of sensors for different purposes.The sensors have the capacity to take measurements such as temperature, air quality, speed, humidity, pressure, flow, movement and electricity etc.In some cases, they may also have a degree of memory, enabling them to record a certain number of measurements.A sensor can measure the physical property and convert it into signal that can be understood by an instrument.Sensors are grouped according to their unique purpose such as environmental sensors, body sensors, home appliance sensors and vehicle telematics sensors, etc.

Basic Devices
The day to day devices that we use such as desktop, cellphones, and tablets remain integral parts of IoT system.The desktop provides the user with a very high level of control over the system and its settings.The tablet acts as a remote and provides access to the key features of the system.Cellphone allows remote functionality and some essential settings modification.Other key connected devices include standard network devices like routers and switches.Other devices that must be mentioned are the wearable electronic devices.They are small devices that can be worn on the head, neck, arms, torso, feet and head

IoT Software
The most popular operating systems used in IoT are Linux or UNIX-like OSs like Ubuntu Core or Android.The programming languages on which IoT works uses very common programming languages like C++ or Java, but IoT software encompasses a wide range of software and programming languages.Keeping up with the development of big data related technologies, Python is one of the newer contenders to the role of most used programming language in IoT.Python is an advanced programming language that is interpreted, object-oriented and built on flexible and robust semantics.It's used in Web and Internet development (frameworks, micro-frameworks and advanced content management systems); scientific and numeric computing; desktop graphical user interfaces.It's used in the Raspberry Pi processor and it's a powerhouse for serving data-heavy applications.

IoT System in the Diagnosis of Covid 19 Patients
In the midst of the Corona Virus pandemic, we designed the specifications of a system capable of detecting Corona Virus patients using an IoT system (Figure 1).

Fig. 1. IoT System in Corona Virus Pandemic Situation
The IoT system has multiple benefits in telemedicine: prevention and first aid for people who are susceptible to heart attacks, monitoring for epileptic seizures, monitoring for people suffering from alcoholism, screening for Covid patients 19 to name a few of the worst situations.

IoT hardware of the system
The most visible hardware part of the system consists of a bracelet that the person wears (figure 2).It has a built-in temperature sensor, heart rate monitor and location sensors (GPS).The information received from the sensors via the bracelet is sent to the Arduino Board which translates the signals into digital information.This information is not stored on the Arduino hard drive because the storage space is insufficient for the large amount of data needed to monitor the person wearing the bracelet.

Fig. 2. Monitoring Device
To accurately predict people with Covid 19 disease, the software needs a consistent database that will be collected from people and stored in the cloud.From the cloud they will go both to the doctors to whom the respective persons are assigned and to the National Health System to be analyzed in view of the future reforms of the health system as well as for macroeconomic statistics.Prototype design of the continuous health monitoring device.This device is similar with the smart watches that are currently populating the market, but it's focused on health indicators instead of multimedia.It's also very similar with the fitness bracelets, but the way the data collected from the sensors is being processed and used is very different and it will detailed in the following chapters.Below are presented the key hardware components, focusing on sensors.

Key hardware components
There are also other mandatory hardware items such as battery, led, LCD display etc. (Figure 3).

Data processing and software specifications
The IoT system (Figure 4) has real benefits both in terms of the speed with which data is acquired from sensors, then transmitted to cloud databases, processed by cloud software and transformed into valuable information and knowledge to doctors and the health system .

Fig. 4. IoT HealthCare System
In the case of people susceptible to illness with the new Corona Virus, the scenario is as follows: some people wear bracelets with sensors.Sensor information is sent to Oracle Cloud.Here we implement an application that predicts with the help of machine learning algorithms the people suffering from Covid 19. .

Figure 5 -Data Modelling
The input data comes both from the people who wear bracelets with sensors and from their doctors who The results (Figure 5) are information and knowledge in the form of high quality predictions that are sent to the attending physician and to the national health house.In the case of a person "confirmed" by the software, the doctor who receives the information contacts the health authorities for testing the person with the tests authorized by the health authority.However, a compromise must be made between avoiding system crashes due to the extremely large volume of data and the detection of patients as early as possible, it was decided to take the data at an interval of three hours.This time interval is chosen arbitrarily, even if the system is overloaded due to the large volume of data as well as the numerous processing.If it is found that the effectiveness of prevention does not decrease if the interval is increased, this will be done in small steps of maximum one hour.

Fig. 6. Data Table
The data does not need to be cleaned because it comes from similar sources, respectively from sensors as well as from the standard medical files of individuals.In exceptional cases certain sensors do not send certain data, the boxes destined for that data will be completed with the expression N / A. The data flow (figure 4) is based on SOAP (request-response) web services.The application requires row data from sensors and from doctors, doctors and the national health agency requesting information and knowledge from the cloud application.The cloud application processes and models the row data received from the two previously mentioned sources and sends them to doctors and the agency.We are interested in what algorithm can accurately predict which subjects are infected.The data is obtained from the devices they carry.The characteristics that we analyze and that can be conclusive for our study are: location to determine if the individual is in the focus of infection, male or female, pulse, if the subject suffers from cardiovascular disease, diabetes or chronic respiratory disease, hypertension, temperature and age.The data is cleaned and prepared so that we do not have empty fields in the database (Figure 7).8).To get an idea of how sick (orange dots) or healthy (blue dots) subjects are scattered depending on temperature and heart rate.We notice that the patients have a normal blood pressure (90), and the temperature is high (37.5 o -38 o ).

Fig. 9. Correlation Matrix
The modeling algorithms fit him in our case.We have 9 independent variables (Outbreak, Gender, Heart Rate, Cardiovascular Disease, Diabetes, Chronic Respiratory Disease, Hypertension, Temperature, Age) and we want to find out in which category the addictive variable belongs (Covid 19 Suspect), meaning we want to see for each subject is suspected of Covid (value 1) or not (value 0).We start the study with the following algorithms: Logistic Regression, KNN and Random Forest.At a simple evaluation, the accuracy analysis indicates for each: 72%, 67%, 73% (Figure 10).On Logistic Regression if we increase test size at 25% we got a higher predictability rate at 82% -83% having only 1 error on Confusion Matrix.Modest enough to be taken seriously for the prediction of Covid suspects.From the total data we choose 20% of them for testing, and the remaining 80% for training our model.For Random Forest Classifier Model we have 72% and for Logistic Regression the score on the test sample is 81%.Another try: Decision Tree which gives us a predictability score of only 74%.Even if we increase the number of tested data to 25%, the percentage remains at 74-75%.Confusion Matrix in Decision Tree Model displays 10 errors out of 51 on testing data and 5 errors out of 9 on predicting data.

Fig. 10. Accuracy Rate
We get a good result with the Support Vector Machine (SVM) algorithm which gives us a predictability rate of 80%, and for Kernel SVM we got 80% having 0 errors on Confusion Matrix.On Naïve Bayes -78%.If we try, for Naïve Bayes different kernels like rbf, sigmoid or poly the results are: 80%, 74% and 79% respectively, of the three rbf kernels is better.If we increase test size at 25% we got 82% -83% predictability rate having only 1 error on Confusion Matrix.In the case of KNN, the score for the training sample is 80%, and from the test sample about 70%.If we do a Confusion Matrix (Figure 11) it gives us 2 errors out of 46 on testing data and 1 error out of 11 on training data.So hardly we got 78% predictability rate.What about Neural Networks?We use Keras to set up a neural network with 1 binary output neuron and for training the model we may use a large number of epochs.The result is about 80% predictability rate.

Telemedicine system
The emergence of new ways of collecting patient data is allowing telemedicine 1 to fulfill its potential.Although the term of telemedicine has been first used in the 1950's, until recent years this domain of technology services did not produce remarkable changes in the traditional medical system.However, after blending digital platforms for healthcare services delivery with smartphones, big data and smart devices, telemedicine becomes much more useful for patients.Real time monitoring of critical patients remotely and regulating the treatment through distance has become truly efficient by integrating IoT into health.Not only the vital signs of the patient can be directly captured and quickly analyzed, but the administration of medication can be done remotely as well.The example of insulin pumps2 that may be configured remotely by a physician based on the insulin readings or even controlled by a program is one of the innovative ways in which IoT has been used to upgrade the way in which we may receive medical care.Telemedicine is an important tool for doctors as well, as the software interface offers them easy access to a patient's history and to relevant medical advice from the community.Another important aspect of telemedicine is that it offers patients the possibility to ask for medical advice online, without having to visit a clinic or a hospital when it is not absolutely necessary.Although we position the relationship between doctor and patient in the center of the medical system, for their interaction to be beneficial, first the infrastructure must be put into place.In this case, we propose a national infrastructure approach that would be beneficial for the long term development of the national health system.As the healthcare crisis generated by the spread of the novel coronavirus COVID-19 has shown the 1 Telemedicine is the remote delivery of healthcare services, according to a definition from SearchHealthIT : https://searchhealthit.techtarget.com/definition/telemedicine vulnerabilities of the current way of organizing medical care activities, we must reassess the entire medical structure.Even in the most developed countries, the medical system has been on the verge of collapsing when facing the need of providing intensive care for a large number of infectious patients, all while making sure that the medical staff is protected.Adapting fast to these changes has been crucial and the developed countries have indeed the resources to quickly implement new ways of distributing medical services.As telemedicine infrastructure is already present, now is the time for a centralized approach to be put into place by the state, the administrator of the main medical infrastructure.Until now, private companies have looked into implementing telemedicine, but it is easy to see how their technology could be scaled up in order to become the new ordinary.In order to build a sustainable national telemedicine system, capable of scaling up to millions of users, states may choose to collaborate with software companies that have previously developed telemedicine applications, but a centralized solution for creating and managing the largest set of electronic health records we have seen thus far is needed as well.A national telemedicine system should encompass three key aspects: creating a safe and efficient link between patient and physician, applying big data in order to create and manage electronic health records and provide the necessary infrastructure for scaling up a system for the entire population.The first aspect implies creating new communication channels for patients and doctors.Until now, when developing a sort of illness, the first action a person would take was to visit a doctors office.This way of dealing with illness has been automatically applied by many at the beginning of the COVID-19 crisis.Many people who developed the hallmark symptoms of the disease (fever, cough, shortness of breath) would physically visit a primary-care doctor, a health care provider at an urgent-care center or an emergency room.But that's the last thing people potentially infected with a highly contagious disease should do.People have been urged to use special phone lines created for managing the possible cases or other apps where they can communicate their symptoms with a doctor remotely.However, the telephonic lines would easily be overwhelmed and the medical professionals are not supposed to spend their entire working day answering phone calls.An efficient way to handle the patients through telemedicine would be to include all the general physicians in a national network that would allow them to communicate with their regular patients using the internet.In this case, when a person presents mild illness signs, whatever illness we might be referring to, the first step would be to hold a video with their general physician, as each person is already assigned to one.Having this way of communicating, not only we would greatly reduce the risk of transmitting the infection, but we would also have a much better management of the medical resources, as each individual will be able to call their physician and have a more personalized experience.In this way, central hospitals can focus on treating critical patients and not be burdened with treating minor health issues during a time of crisis.The second point that needs to be addressed by a reliable national telemedicine system is managing the health records of millions.Health data are a perfect example of big data, presenting characteristics such as volume, velocity and variety, characteristics that define big data.As it encompasses data about the entire population, we can see how the volume of health data is a primary concern when designing a national system.Velocity refers to the speed at which data is being generated.
As we need a telemedicine system that will be accurate in reporting real time data that the physicians can access immediately, the data must be processed without delays, structuring the data in a manner that would be easily manipulated.Variety refers to the different provenience sources of medical data.A telemedicine system should keep records of the observations following each medical encounter, weather in real life or through telecommunication methods.It would also be very useful, especially in the context of quickly examining signs of COVID-19 infection, to keep track of data received by the IoT devices used for measuring temperature, in order to observe in a simple interface how the temperature of a patient evolved.Along with this data, crucial for the current pandemic crisis, a telemedicine system could very well integrate medical imaging data and other measurements.
The third point we need to take into consideration is the need for a reliable and scalable infrastructure for a telemedicine system to work properly.In the past, in Romania, large technological infrastructure developed by government organizations has been shown to be flawed, not scaled to the great number of users and unreliable because of the frequent crashes.In a medical application, these problems would be intolerable, as the very health of the users could be put to risk by a late or a wrong diagnostic caused by technical difficulties in the application.For a better overview over implement a large scale telemedicine application, the government should be willing to reach out to the business area, where large companies may already have expertise in building a reliable large scale system.

Conclusions
Often time, the development of revolutionary systems is pushed forward by unexpected crisis situations.That may very well be the case in our society in the time of the COVID19 pandemics.As with any crisis, a quick response to the immediate danger is crucial, therefor we must take advantage of the most suitable technologies available at the current moment and try to implement them in viable systems.We believe that that the potential of Internet of Things has not been explored enough in vital areas, such as healthcare.We may use IoT devices in order to live more comfortable lives, in order to increase the degree of connectivity worldwide, but IoT is seen more of a niche technology by people that do not have the possibility to experiment the direct benefits of connecting high tech devices to powerful processing systems.To bring IoT in the current use of the masses, it is the responsibility of governments to support research in this area and most importantly to implement IoT solutions on large scale.Therefore, we propose that an IoT system for diagnosis of COVID19 patients and for managing their medical records would be effective if implemented in a centralized manner, by governments.As the necessary hardware is already present in the market, the effort could be directed towards implementing the software system able to manage efficiently a very large data pool.The fact that the accuracy of sensor readings from wearable devices has already been tested saves much of the time needed for the design phase.This aspect is essential now, as the pandemics crisis looks to be a prolonged one and a system should be implemented as quickly as possible.Development of the software needed would indeed imply a great deal of attention to small details, as the implementation of machine learning algorithms must be very well thought for each case.The health data collected through devices from the system we propose is ideal for a machine learning based application that may identify infection clusters and easily map potentially dangerous areas.Integrating the benefits of telemedicine into an IoT system, such as the possibility of accessing health records through a software and supporting electronic communication channels between doctor and patient, would upgrade our system to one that is suited not just for our current crisis, but for long term use in the medical system.

Fig. 8 .
Fig. 8. Scatter plot of disease and non-disease suspects