Next Article in Journal
KubeHound: Detecting Microservices’ Security Smells in Kubernetes Deployments
Previous Article in Journal
Exploiting Misconfiguration Vulnerabilities in Microsoft’s Azure Active Directory for Privilege Escalation Attacks
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Artificial Intelligence in Virtual Telemedicine Triage: A Respiratory Infection Diagnosis Tool with Electronic Measuring Device

by
Naythan Villafuerte
,
Santiago Manzano
,
Paulina Ayala
and
Marcelo V. García
*,†
Faculty of Systems, Electronics and Industrial Engineering, Universidad Tecnica de Ambato, UTA, Ambato 180206, Ecuador
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Future Internet 2023, 15(7), 227; https://doi.org/10.3390/fi15070227
Submission received: 14 April 2023 / Revised: 20 June 2023 / Accepted: 20 June 2023 / Published: 25 June 2023
(This article belongs to the Special Issue Telemedicine Applications in the Internet of Things)

Abstract

:
Due to the similarities in symptomatology between COVID-19 and other respiratory infections, diagnosis of these diseases can be complicated. To address this issue, a web application was developed that employs a chatbot and artificial intelligence to detect COVID-19, the common cold, and allergic rhinitis. The application also integrates an electronic device that connects to the app and measures vital signs such as heart rate, blood oxygen saturation, and body temperature using two ESP8266 microcontrollers. The measured data are displayed on an OLED screen and sent to a Google Cloud server using the MQTT protocol. The AI algorithm accurately determines the respiratory disease that the patient is suffering from, achieving an accuracy rate of 0.91% after the symptomatology is entered. The app includes a user interface that allows patients to view their medical history of consultations with the assistant. The app was developed using HTML, CSS, JavaScript, MySQL, and Bootstrap 5 tools, resulting in a responsive, dynamic, and robust application that is secure for both the user and the server. Overall, this app provides an efficient and reliable way to diagnose respiratory infections using the power of artificial intelligence.

1. Introduction

In the last decade, respiratory infections have become a global health problem affecting people of all ages and socioeconomic levels [1]. According to the World Health Organization (WHO), respiratory infections are one of the leading causes of death in children under 5 years of age, excluding the neonatal period, and the elderly, with an estimated around 2.4 million deaths each year worldwide, which represents a high mortality rate. A WHO projection estimates that by the year 2050, approximately 2 billion elderly people will require home care due to the sequelae of respiratory diseases [1,2,3].
In this context, telemedicine has become a valuable tool to improve accessibility and efficiency in the medical care of respiratory diseases [4]. Telemedicine systems can allow patients and physicians to interact without having to be physically in the same place, which reduces the risk of respiratory disease transmission and facilitates access to medical care in remote or mobility-limited areas. In addition, telemedicine can also help to improve efficiency in the delivery of healthcare services, as patients can schedule and perform medical consultations without having to travel to a clinic or hospital [5].
In addition, the COVID-19 pandemic has further increased the need and interest in telemedicine, as it has highlighted the need for more advanced and efficient healthcare solutions, especially for the diagnosis and treatment of respiratory diseases [6]. Telemedicine has proven to be a valuable tool for the diagnosis and management of respiratory diseases, as the remote delivery of medical services using communication technology allows healthcare providers and patients to communicate and share information in real-time [7,8].
Today, artificial intelligence (AI) and telemedicine are valuable tools in the fight against respiratory infections, especially during the COVID-19 pandemic [9]. AI is used in the detection and diagnosis of respiratory infections, which helps clinicians to identify patterns and trends in patient symptoms and make informed treatment decisions [10]. In addition, telemedicine allows patients to connect with physicians remotely and receive medical care without having to travel to an office, which is especially beneficial for patients with reduced mobility or living in rural areas. Telemedicine can also improve care coordination between different healthcare providers, which can improve the quality and efficiency of treatment. In summary, AI and telemedicine are vital tools in the fight against respiratory infections, and their continued use can significantly improve the accessibility, quality, and efficiency of medical care for patients [10,11].
In conclusion, telemedicine presents itself as an effective and timely solution to improve access and efficiency in the medical care of respiratory diseases, including diagnosis, treatment, and real-time monitoring of patients’ vital signs. The implementation of advanced telemedicine systems using AI could have a significant impact on the health and well-being of people around the world [12].
The use of chatbots with artificial intelligence (AI) to detect COVID-19 is a promising application in the fight against the pandemic. Chatbots with AI can use natural language processing to understand and respond to user inquiries related to COVID-19 symptoms and provide recommendations for testing or seeking medical attention. By leveraging machine learning algorithms, chatbots can also analyze large amounts of data to identify patterns and trends in COVID-19 cases, potentially allowing for earlier detection and containment of outbreaks. However, the accuracy of these chatbots depends on the quality and quantity of data used to train them. Further research and development of chatbots with AI are needed to fully realize their potential in detecting and managing COVID-19 [13].
Using a low-cost monitoring device for corporal temperature and oxygen saturation in conjunction with a health chatbot is a promising approach in the fight against COVID-19. By incorporating data from these monitors, the chatbot can provide more accurate and personalized recommendations for users. The effectiveness of our approach lies in its ability to assist in the identification and management of respiratory diseases, including COVID-19. While it is true that the presence of COVID-19 needs to be confirmed through diagnostic tests, our proposed telemedicine virtual assistant with AI can play a crucial role in the initial screening and triage process. Furthermore, the use of low-cost monitoring devices may increase accessibility to COVID-19 monitoring and detection in resource-limited settings. However, the accuracy and reliability of these devices should be carefully evaluated, and their use should be accompanied by appropriate measures to ensure data privacy and security [14].
Specifically, the telemedicine virtual assistant with AI presented in this work is a very valuable tool in the health field, as it allows patients to receive fast and accurate medical care. This assistant can diagnose different respiratory diseases, such as COVID-19, the common cold, and allergic rhinitis, by means of artificial intelligence, which is a breakthrough in medical care. This allows patients to receive an accurate and timely diagnosis without having to leave home, which is particularly important after the COVID-19 pandemic. In addition, the ability to measure vital signs in real-time and send them to the server where the web application is hosted allows physicians to monitor patients’ health remotely and make informed treatment decisions, which can be especially useful in emergency situations [15]. Another important advantage of the developed assistant is that it is hosted on a web application, which means that it is accessible from any internet-enabled device, making medical care more accessible to people living in rural areas or who have difficulty in reaching traditional healthcare facilities. In this way, by using a web application, the following is provided to the user:
  • The ability to monitor through a web interface real-time vital signs such as heart rate, blood oxygen saturation, and body temperature.
  • The use of the virtual assistant that employs natural language processing (NPL) allows the simulation of a conversation with a real doctor and provides a personalized experience for patients.
  • Account protection through password encryption using hash, as well as a CSRF token to prevent information theft when using the web application.
The specific goals of this work are (1) to analyze the state of the art of detection parameters for patients with respiratory infections, (2) to design an electronic device that allows the triage of vital signs, and (3) to develop the application for medical diagnosis of respiratory diseases using artificial intelligence.
In accordance with the open data standard in Ecuador, the data for this study were collected from an open data portal maintained by the government of Ecuador. Specifically, the data were obtained from the following dataset hosted on the Datos Abiertos (Open Data) portal: https://www.datosabiertos.gob.ec/dataset/https-almacenamiento-msp-gob-ec-index-php-s-maihh1064vskrbl (accessed on 19 June 2023). The Datos Abiertos portal is an initiative of the Ecuadorian government to make non-sensitive public data easily accessible to citizens and businesses in a standardized format. This initiative aims to promote transparency, accountability, and innovation by allowing the reuse and integration of public data in various applications. The government of Ecuador has established a comprehensive legal framework to ensure the quality, security, and privacy of open data while encouraging public institutions to prioritize the publication of their datasets.
The COVID-19 dataset provided by the Ecuadorian government on the Datos Abiertos portal is a valuable resource for researchers and policymakers studying the impact of the pandemic on public health in Ecuador. This dataset includes a wide range of information such as the number of confirmed cases, hospitalizations, deaths, and recoveries, broken down by date, age, gender, province, and other relevant variables.
The proposed approach of a telemedicine virtual assistant with AI is an innovative solution to improve accessibility, efficiency, and accuracy in the medical care of respiratory diseases, including COVID-19. By employing artificial intelligence and natural language processing, this virtual assistant can diagnose respiratory diseases accurately and quickly, providing patients with personalized medical care without leaving their homes.
Furthermore, the ability to measure and monitor vital signs in real-time through a web interface allows physicians to remotely monitor their patient’s health and make informed treatment decisions, which can be especially useful in emergency situations. The web-based application also makes medical care more accessible to people living in remote or rural areas, promoting equitable access to healthcare.
The combination of AI, telemedicine, and real-time monitoring of vital signs through a web application makes this approach unique and innovative. It has the potential to significantly improve the quality, accessibility, and efficiency of medical care for patients with respiratory diseases, especially during a pandemic such as COVID-19. This approach aligns with the recommendations of the Centers for Disease Control and Prevention (CDC) in the United States, which emphasize the importance of symptom screening as an additional tool for identifying potential COVID-19 cases alongside testing. Therefore, while our approach does not replace diagnostic tests, it can serve as a valuable initial screening tool to identify individuals who may require further testing or medical evaluation.
Our techniques are not limited to COVID-19 alone but can also be extended to address new variants of the virus and even new diseases. The flexibility and adaptability of AI-based systems allow for the incorporation of updated knowledge and data, enabling the virtual assistant to recognize and assess emerging patterns and symptoms associated with new variants or diseases. By continuously updating the AI models and leveraging real-time data, our approach can stay abreast of the evolving landscape of respiratory infections. This capability positions our telemedicine virtual assistant as a versatile tool that can be readily adapted to address future health challenges, contributing to early detection, effective management, and improved outcomes for patients. Therefore, while the World Health Organization’s recent announcement may indicate positive progress, the importance of robust healthcare solutions that can adapt to emerging scenarios and support disease detection and management remains paramount.
The unique advantage of AI-based systems lies in their ability to incorporate updated knowledge and data in real-time, allowing the virtual assistant to continuously learn and recognize emerging patterns and symptoms associated with new variants or diseases. By regularly updating the AI models and integrating real-time data, our approach can effectively keep pace with the evolving landscape of respiratory infections. This adaptability positions our telemedicine virtual assistant as a versatile tool that can readily be tailored to address future health challenges, contributing to early detection, effective management, and improved outcomes for patients.
Our AI-powered system, which has proven effective in accurately classifying respiratory diseases, offers a blueprint for addressing future health crises caused by viruses. By harnessing the power of data and artificial intelligence, individuals using home diagnostic tools can enhance their capability and stay prepared to respond to new viral outbreaks effectively. The ability to quickly adapt to changing circumstances and incorporate up-to-date information is crucial for ensuring the continued success of home diagnostic systems in safeguarding public health.
The availability of user-friendly home diagnostic tools empowered by AI technology enables individuals to take an active role in their own healthcare. By utilizing these tools, individuals can assess their symptoms, monitor their vital signs, and obtain accurate disease classification without the need for immediate healthcare professional intervention. This approach allows for earlier detection and intervention, reducing the burden on healthcare systems and facilitating timely and appropriate management of respiratory infections.
Moreover, the adaptability of AI-based home diagnostic systems ensures that they can keep pace with the ever-changing landscape of respiratory infections. With the ability to update algorithms and incorporate real-time data, these systems can continuously evolve and effectively recognize emerging patterns and symptoms associated with new variants or diseases. This adaptability positions home diagnostic tools as a valuable resource that individuals can rely on to stay informed, make informed decisions about their health, and seek appropriate medical care when necessary.
This article is structured as follows: Section 2 presents different works related to the subject of study. Section 3 shows the case study for the research method and presents the implementation proposal for virtual triage using AI. The results of the platform are shown in Section 4. A discussion of the results is presented in Section 5. Finally, Section 6 details the conclusions and future work.

2. Related Work

This section analyzes the literature about the use of artificial intelligence in healthcare, which is an area of increasing interest in recent years. Many studies have explored the potential of machine learning algorithms for medical diagnosis and prediction, including the use of deep learning methods for image and signal processing. Additionally, the development of telemedicine technology has provided new opportunities for remote diagnosis and monitoring of patients [5,6].
Telemedicine can be used for the diagnosis and management of infectious diseases, including COVID-19. In particular, the use of remote monitoring devices for vital signs has been shown to be effective for the early detection of COVID-19 symptoms, allowing for timely intervention and treatment. Additionally, the use of machine learning algorithms has been explored for COVID-19 diagnosis, with some studies reporting high accuracy rates. For that reason, our analysis has focused mainly on machine learning algorithm solutions.
R. Srivatsan et al. [16] presented a machine-learning-based forecasting model and mobile application for predicting susceptibility to COVID-19 using a health database. The project was implemented in a programming environment with Python and libraries information, in order to classify the danger of infections as low, medium, and high using a random forest model.
The study found that the proposed approach using machine learning algorithms can accurately categorize the danger of infections as low, medium, and high with an accuracy of 90%. This means that the model can correctly predict the probability of being infected with the score of individuals with a high degree of accuracy. The precision rate of the model was found to be 96%, which indicates that the model can accurately identify individuals who are highly vulnerable to COVID-19 infection in a quarantine zone. Moreover, the sensitivity and F scores were also calculated to evaluate the performance of the model. The sensitivity rate was found to be 85%, which means that the model can correctly identify 85% of individuals who are actually at a higher risk of contracting COVID-19 infection. The F score, which is a measure of overall accuracy, was found to be 0.89, indicating that this approach has a high potential for public health decision making during the COVID-19 pandemic by providing precise estimates of individuals’ infection severity for informed decision making and targeted response.
Overall, these results suggest that this machine learning model and the mobile application has great potential for identifying individuals who are highly vulnerable to COVID-19 infection in a quarantine zone with high accuracy and precision. This approach can help healthcare professionals prioritize intensive care resources and plan more aggressive treatment for patients with a higher risk of infection while reducing the burden on healthcare systems.
Krishnaraj et al. [17] discussed a study that used machine learning to predict the diagnosis of COVID-19 using blood tests. The authors reviewed existing research on machine learning applications for COVID-19 diagnosis and identified limitations of the conventional RT-PCR test. For this reason, they used four distinct classifiers employed with a technique known as the synthetic minority oversampling technique (SMOTE) for classification. They also conducted exploratory data analysis to identify potential predictors of COVID-19 diagnosis based on demographic information, clinical symptoms, laboratory results, and RT-PCR test results. The results of the study showed that all four classifiers had high accuracy (above 90%) in predicting COVID-19 diagnosis based on blood test results. The authors also evaluated the performance of each classifier using various metrics such as accuracy, recall, specificity, sensitivity, F1 score, AUC, and Brier score. The study demonstrates that machine learning can be a useful tool for improving the accuracy of COVID-19 diagnosis using routine blood tests. However, it is important to note that this approach should not replace other diagnostic methods such as RT-PCR testing and clinical evaluation by healthcare professionals. In addition, they mention that future studies could explore other types of data, such as CT scans or cough sounds, to improve COVID-19 diagnosis using machine learning.
Gandhi et al. [18] developed an AI-based personal medical assistant, this application aims to offer intelligent healthcare and make it more approachable by analyzing symptoms, diagnosing and predicting health conditions, providing recommendations and treatment options based on user responses, and tracking users’ health progress. Real-world cases with large amounts of clinical data, discharge summaries, prescriptions, and more are used to train the system through NLP information extraction. The app combines data on different fitness activities tracked, along with factors such as age, gender, location, past medical records, and calorie intake to generate a more precise analysis. The system is supported by an advanced AI engine that employs the naïve Bayes classifier and other techniques, combined with a vast medical knowledge base comprising conditions, symptoms, findings, and treatments. The application also features a voice assistant with NLU capabilities, enabling it to understand human voice responses in addition to textual input. Overall, IntelliDoctor has the potential to revolutionize healthcare by providing personalized medical assistance to users anytime anywhere. However, it should be noted that while IntelliDoctor may be useful as a complementary tool for healthcare professionals or as a first point of contact for minor health issues or concerns, it should not replace professional medical advice or treatment in serious cases.
J. Molina et al. [19] analyzed more than 18,000 positive case records and used hierarchical clustering (HC) to group patients according to their clinical manifestations. To identify the best settings for clustering analysis, they conducted three primary stages:
  • They assessed five diverse distance metrics (Binary, Manhattan, Euclidean, Minkowski, and Maximum) to ascertain the degree of variation in clinical presentations across all patients. The preferred metric was used to distinguish a distinct cluster for “asymptomatic cases”.
  • They utilized the elbow method to ascertain the estimated number of primary clusters by graphing the explained variance against the number of clusters.
  • They used the HC to group patients according to their clinical manifestations and identified seven distinct clinical profiles with specific symptom compositions and correlations with viral load.
The authors recognized that this study was an observational inquiry with sporadic sampling of suspected cases at various time intervals, most of whom were symptomatic with the ongoing disease and provided self-reported data on their symptoms. However, they believe that their findings provide valuable information on the clinical presentations of COVID-19 in Costa Rica and may have implications for public health interventions aimed at controlling the spread of the virus.
E. Camargo et al. [20] proposed incremental learning, which is based on a dynamic ensemble method called the bagging scheme. This method consists of training multiple independent machine learning models and combining their predictions to obtain a more accurate final prediction. In addition, the bagging scheme allows for the addition of new models or the updating of existing models as new data are collected. To apply this approach to the COVID-19 context, the authors used mathematical modeling, simulation, and artificial intelligence techniques to collect and analyze data related to the SARS-CoV-2 disease. In particular, they used epidemiological and clinical data to build predictive models using SEIRD modeling (susceptible, exposed, infected, recovered, and killed) variables that characterize the spread of the virus. The results obtained show that the proposed approach can significantly enhance the accuracy of predictions of SEIRD variables compared to other existing predictive models. In particular, it was found that the use of a 4 day interval for making predictions produces the best results. In addition, the best model and set of variables for predicting future behavior were identified. Overall, the results suggest that the proposed approach may be useful for improving the predictive capability and dynamic monitoring of COVID-19. This could have important implications for decision making related to public policies and health strategies during the pandemic.
In a recent article published by Bonifazi et al. [21], the researchers proposed new approaches to extract information from posts related to COVID-19 published on Reddit. The study focused on analyzing the sentiment and topic trends of the posts using natural language processing techniques. The results showed that the majority of the posts were negative in sentiment and discussed topics such as vaccine hesitancy, pandemic misinformation, and mental health concerns. While the proposed approach was able to effectively extract information from the Reddit posts, it did not incorporate user engagement metrics or network analysis. These additional measures could provide a more comprehensive understanding of the impact of the posts on the Reddit community. Our proposed article aims to address this gap by introducing a novel approach that combines sentiment analysis, topic modeling, and user engagement metrics to gain deeper insights into the discussions and trends related to COVID-19 on Reddit.
The article written by Cauteruccio et al. [22] presents a framework for mining extended high-utility itemsets, which are sets of items that generate high profits for a business. The proposed framework is based on answer set programming (ASP), which allows for the expression of complex mining tasks as logical rules. The authors demonstrate the effectiveness of their framework through experiments on various real-world datasets, showing that it outperforms existing state-of-the-art methods in terms of both efficiency and effectiveness. In summary, the integration of AI technology in home diagnostic systems offers a promising approach for addressing future health challenges caused by viruses. By empowering individuals with accurate classification and real-time data, these systems contribute to early detection, effective management, and improved outcomes for respiratory infections.
While this article focuses on high-utility pattern mining, the article from Cauteruccio et al. explores a different area of artificial intelligence. Specifically, the article proposes a framework for mining high-utility patterns in large datasets using answer set programming. This framework has the potential to improve the efficiency and accuracy of pattern-mining tasks in a variety of domains. In comparison, the proposed article addresses the issue of diagnosing respiratory infections using a web application that employs a chatbot and artificial intelligence. By integrating an electronic device to measure vital signs, the application accurately detects COVID-19, the common cold, and allergic rhinitis. While the two articles focus on different areas of artificial intelligence, they both showcase the potential of AI to improve healthcare and other industries.

3. Materials and Methods

To describe the methodology and materials used for the research, the following section provides a detailed account of the experimental setup and procedures employed. The materials used in this study include low-cost electronic devices, while the methodology involved the use of different classifier algorithms to obtain a platform for virtual telemedicine triage. This section aims to provide a clear and concise understanding of the research methodology and materials used in the study.

3.1. Study Design

This study focuses on the development of a telemedicine virtual assistant designed to aid in the medical diagnosis of respiratory infections. The virtual assistant was built by integrating an electronic triage measurement device with advanced artificial intelligence techniques. The study was conducted in two primary phases to ensure a robust and effective system. In the first phase, the research team collected and processed data from various sources to lay the foundation for the virtual assistant. The second phase involved the actual development and evaluation of the virtual assistant to ensure its efficacy in medical diagnosis. By incorporating cutting-edge technology and a rigorous methodology, this study aims to enhance the accuracy and efficiency of medical diagnosis, particularly in the context of respiratory infections.

3.2. Triage Measurement Device

The triage measurement device used in this study was designed to measure patients’ body temperature, heart rate, and blood oxygen saturation. These measurements are useful in identifying patterns in the symptoms of respiratory infections and can aid in the diagnosis and treatment of diseases such as COVID-19.
The device consists of an MLX90614 infrared sensor for measuring body temperature, an MAX30100 sensor for measuring blood oxygen saturation, and a heart rate monitor. These components are integrated into a single portable device that can be used at home or in clinics and hospitals. Measuring body temperature is a common way to detect respiratory infections. Fever is a common symptom of many respiratory illnesses, including COVID-19. Measurement of heart rate can be useful in assessing the severity of illness and detecting complications. Measurement of blood oxygen saturation is important to identify cases of hypoxemia, which may indicate severe respiratory disease.
The triage measurement device used in this study communicated with the telemedicine virtual assistant to provide real-time data for analysis. The data collected by the device were used along with the patient’s clinical information to train and evaluate the artificial intelligence models used in this study.
Moreover, the integration of the three vital signs measurement capabilities into a single portable device is a significant advancement in telemedicine. This device allows for remote patient monitoring, which can be useful in areas where access to medical care is limited, or in situations where patients are unable to leave their homes due to illness or quarantine. The use of telemedicine devices such as a triage measurement device can help to reduce the risk of exposure to infectious diseases, reduce healthcare costs, and increase access to medical care.
In this context, an electronic system was implemented to measure vital signs in real-time, such as body temperature, heart rate, and oxygen saturation, and can be displayed by means of an OLED SSD1306 screen and at the same time these data are sent to the web application through the MQTT protocol. These data are displayed on a graphical interface hosted on the Google Cloud server at the same time. In addition, a battery charge measurement was integrated so that the user knows when to charge the device. Finally, two LEDs were placed to serve as indicators, showing whether the device is charging or not and whether or not the device is connected to the network. In view of this, it was decided to use the following architecture shown in Figure 1, which is made up of 3 layers: sensing, processing, and visualization.

Device Communication with the Web Application

To transmit data to the web application, the research team utilized the MQTT messaging protocol, which is designed for efficient, lightweight communication in constrained environments. The protocol architecture, as shown in Figure 2, involves the acquisition of measured data, which is then published in the designated “sensors” topic. The Mosquitto broker is used to distribute this data to all subscribers, including the Google Cloud server hosting the virtual machine in this study. However, for this particular application, the Google Cloud server was the only subscriber utilized to receive and process the data. By implementing the MQTT protocol, the research was able to establish a reliable and secure communication channel for data transmission, enabling real-time monitoring and analysis of the measured data.
With the rise of telemedicine, it has become increasingly important to develop effective and affordable solutions that enable remote patient monitoring and diagnosis. In this study, the researchers utilized low-cost sensors and the MQTT protocol to enable real-time transmission of medical data, allowing doctors to diagnose respiratory infections remotely. The MQTT protocol’s lightweight design enabled the efficient transmission of data from the sensors to the virtual assistant, ensuring that patients’ medical conditions were accurately and quickly diagnosed. The use of low-cost sensors, in conjunction with the MQTT protocol, has the potential to revolutionize telemedicine by providing accessible, affordable, and effective solutions for remote medical diagnosis and treatment.

3.3. Virtual Assistant Development

A combination of tools and technologies was used to develop the telemedicine virtual assistant. The virtual assistant was programmed with Flask, and Python and the natural language processing (NLP) library was used for text processing. An electronic triage measurement device was also integrated for the collection of patient vital sign data, including temperature, heart rate, and oxygen saturation.

3.4. Web Application Development

For the architecture we considered the components detailed in Figure 3, which consist of a front-end on the user’s side, referring to the programming used for the design of the application using languages such as HTML, CSS, and JavaScript that make the web application dynamic. On the other hand, the back-end corresponds to all the programming that is in charge of interacting internally with the server; that is to say, here we find queries to the database, requests to change the path within the web application, tag detection for chatbot responses, registration in the database, and symptom processing for disease prediction within the three predicted classes (COVID-19, COLDS, and RHINITIS).
The development of the web application is based on the sequence diagram shown in Figure 4, starting from the user’s login, where a virtual machine hosted on the Google Cloud server checks whether the credentials entered are registered in the database to allow the user to continue to the sensorization tab where their vital signs are displayed. Once the user is in the sensorization interface, they can visualize through graphs and text boxes the values recorded by the sensors of the vital signs triage measurement device. After the sensor interface, the user enters the virtual assistant (chatbot) where the patient is asked to enter their symptomatology, which is stored in the database to predict their disease by means of the AI model created. Finally, the user can access the medical history of the consultation.

3.4.1. Creation of the Login and Registration Interface

In developing the login and registration interface, the research team relied on a sequence diagram to ensure a seamless and secure user experience. As shown in Figure 5, the sequence diagram is divided into two parts: login and registration. The login process begins when the user enters their credentials, which are stored on the server. The system then performs a query with the database to check whether the entered credentials are valid. If the credentials are incorrect, the user is prompted to register and create new credentials. Once the user is registered, they can log in using their new credentials. By utilizing this sequence diagram, the research team was able to streamline the login and registration process, ensuring that users could easily access the virtual assistant while maintaining a high level of security. Additionally, this approach allows for easy scalability and future development, as the system’s login and registration features can be expanded or modified to accommodate future needs.

3.4.2. CSRF Token Implementation

Additionally, security against cross-site request forgery or CSRF is implemented, where the user enters the user interface through a web browser and the server generates a token randomly and stores it using the “CSRFProtect” library. The generated token is sent back to the browser and is stored in a hidden form within the login validation form, where the user’s credentials are checked, including the token generated by the server. If the credentials and token are correct, the server redirects the user to the sensing interface, while if the token is incorrect or the web application is idle for more than 10 min, the token will expire and when trying to log in again will throw an error notification as in Figure 6, forcing the user to log in again.

3.4.3. Implementation of the Sensorization Interface

To ensure accurate and reliable data processing, the research team relied on a sequence diagram for the implementation of the sensing interface. As shown in Figure 7, this process starts after the user has successfully logged in, and their vital sign data are received from the sensor interface. Once the login request is entered into the server, the server processes the BPM, SpO2, and temperature data received by the MQTT protocol. The server is responsible for processing this data and updating the chart graphs every 2 s in the web platform, allowing the user to observe the vital signs of the patient in real-time. The data received from the vital sign measurement device is also stored, enabling medical professionals to access it for use in medical records or by querying the chatbot. By utilizing this sequence diagram, the research team was able to ensure that the sensing interface was reliable and efficient, providing users with accurate and up-to-date vital sign data. The implementation of the sensing interface, along with the login and registration interface, provides a comprehensive and user-friendly platform for remote medical diagnosis and treatment.
In addition to real-time monitoring, the system allows data to be stored for future reference. This could be used for medical records or to provide data to a chatbot that can answer questions based on the user’s vitals.
The development of this application represents a significant breakthrough in the field of telemedicine, providing an efficient and scalable solution for remote patient monitoring. By utilizing the MQTT messaging protocol and chart visualization, the application allows for real-time tracking and monitoring of the user’s vital signs, providing medical professionals with critical information needed for diagnosis and treatment. Additionally, the user-friendly interface and chart visualization make it easy for patients to track their vital signs over time, helping them to better manage their health and stay informed about any changes or trends in their health data. This application has the potential to revolutionize remote medical diagnosis and treatment, providing a comprehensive platform that enables accurate and efficient monitoring of patients’ vital signs from anywhere in the world.

3.4.4. Implementation of the Virtual Assistant (Chatbot)

The implementation of the virtual assistant is explained in Figure 8. It begins once the user has accessed the chatbot interface. The chatbot will have an input message explaining concisely the 3 diseases treated by the chatbot and will ask the user to enter their symptomatology. Once the user begins to enter their symptoms, the chatbot, using natural language processing, will identify the grammar used and detect which symptom the user is referring to, detect the probability that a label is indicated, and return a response. At the end of the symptom entry, the user will ask for a diagnosis, so the server will consult the registered symptoms to diagnose the patient and store the app’s diagnosis in the database. Additionally, an option was added that allows the patient to ask for their vital signs through the chatbot where the values of temperature, heart rate, and oxygen saturation with their respective units are detailed.

3.4.5. Implementation of the Medical History Interface

To ensure accurate and efficient access to medical records, the research team implemented a medical history interface within the application. The sequence diagram in Figure 9 explains how the interface operates, beginning with the user sending a request to access the interface. Once this request is received, the server is responsible for redirecting the browser to the path “/history”. The server then queries the database to define the headers of each column before obtaining the user’s data and joining everything in a tuple to generate the table with the history of consultations made by the patient. This enables the user to review their medical history and access critical information about past consultations. Once the user has reviewed the result of their query, they can exit the web application and will be automatically redirected to the login screen. This implementation of the medical history interface provides a user-friendly and efficient solution for accessing medical records remotely, enabling patients to stay informed about their health and providing medical professionals with the information needed for accurate diagnosis and treatment.

3.5. Creation of the AI Algorithm

To develop an accurate and effective system for the diagnosis of respiratory infections, the research team utilized a supervised learning model. To train the model, a comprehensive database of patients with symptoms of respiratory infections was utilized, including those presenting with COVID-19, the common cold, and allergic rhinitis. The database contained clinical information such as age, gender, symptoms, and medical diagnostic findings. The data used for the implementation of the model was obtained from electronic health records of patients who received healthcare services from the health professional’s private practice in Ambato, Ecuador. By utilizing this extensive and diverse database, the research team was able to train the model to accurately classify respiratory infection diagnoses based on patient symptoms and clinical information. This approach provides a robust and effective solution for the accurate diagnosis of respiratory infections, enabling medical professionals to provide more targeted and effective treatment to their patients.

3.5.1. Definition of Variables

The following variables were defined as features to train and evaluate the models:
  • Age: expressed in years and representing the age of the patient;
  • Gender: encoded as 0 for females and 1 for males, representing the gender of the patient;
  • Symptoms: a list of common symptoms related to respiratory infections, such as cough, fever, and shortness of breath;
These variables were selected based on their potential relevance to the diagnosis of COVID-19, the common cold, and allergic rhinitis. Age and gender are known risk factors for respiratory infections, and the presence of specific symptoms can help to differentiate between different types of respiratory illnesses. By including these variables in the models, the aim is to improve the accuracy of predictions and to enable the rapid and accurate diagnosis of respiratory infections.

3.5.2. Dataset Adaptation

Initially, the data were recorded in MS Excel, with the symptoms present in medical diagnoses of COVID-19, the common cold, and allergic rhinitis in labeled and related columns. However, the reliability of vital signs for the diagnosis of disease has been questioned because they are not a specific diagnostic class and cannot be used as definitive criteria for determining the presence of a particular disease. In addition, there are cases of asymptomatic patients with normal vital signs who may have a disease, while other patients may have abnormal vital signs without presenting a serious disease. Therefore, the artificial intelligence model for the diagnosis of respiratory infections was built using other factors, such as the patient’s symptoms, in the evaluation and diagnosis. The data measured by the device developed is used to monitor the patient’s vital signs in real-time but is not used in this project as a training source for the artificial intelligence model.
When processing the database, it should be considered that the lexicon used has to be understandable by an average person who does not have technical knowledge in the area of health. Therefore, the vocabulary used by health professionals was changed to a more understandable one as shown in Table 1.
This change was made together with the medical personnel who collaborated in the research project since symptoms are the most important data when predicting what type of disease the user has so that they can seek quick attention. By prioritizing domain knowledge and integrating it with state-of-the-art AI techniques, we can enhance the accuracy and utility of our predictive models.
After implementing the necessary changes to the vocabulary of the symptom descriptions to enhance user understanding, the subsequent step was to further refine the dataset to facilitate better interpretability by the artificial intelligence algorithm. This involved separating each symptom into distinct columns to avoid confusion or ambiguity when feeding the data to the algorithm. Furthermore, to enhance the usefulness of the dataset, a patient ID column was included to identify the number of positive cases of COVID-19, the common cold, and allergic rhinitis recorded in the database. The dataset comprised a total of 24 symptom columns, one column for the diagnosis provided by the physicians, a column for the patient’s gender, and a unique patient ID to enable efficient data tracking and management.
During the dataset manipulation process, careful consideration was given to determining the appropriate categories for each column. For most of the symptoms, the presence of the symptomatology was categorized as “yes”, while its absence was indicated with the word “no”. However, for three columns, namely, “pain”, “fatigue”, and “fever”, the categories “mild”, “moderate”, and “strong” were used to provide a more nuanced understanding of symptom severity. In the case of the “cough” column, the categories “dry” and “with phlegm” were employed to capture the distinct types of cough that may manifest in patients. These categorization decisions were made in collaboration with health professionals, ensuring that the dataset accurately represented the clinical context of the symptoms (see Table 2).
In addition to the aforementioned categorization decisions, the dataset was also carefully reviewed to ensure consistency and completeness of the symptom descriptions. This involved cross-referencing the symptom descriptions with standard medical terminologies to avoid ambiguity or overlap between symptoms. Moreover, where necessary, synonyms and related terms were added to the dataset to capture variations in how different symptoms may be described or referred to by patients. This meticulous approach to dataset curation not only improves the quality of the dataset but also helps to reduce the likelihood of misdiagnosis or misinterpretation of symptoms by the AI algorithm.
Upon completion of dataset processing, the next step involves converting string variables to numeric variables to facilitate the use of mathematical algorithms in classification models. This is achieved by creating an equivalence table, as illustrated in Table 3, that maps the string variables to their corresponding numeric values. The conversion process applies to all the independent variables since mathematical algorithms only work with numerical inputs. Data pre-processing, including data cleaning, feature engineering, and conversion of variables, is critical in enhancing the accuracy and reliability of machine learning models. Therefore, it is essential to ensure that the data pre-processing stage is executed meticulously to minimize errors and biases that may affect the quality of the results obtained.
It is important to note that the choice of the numeric representation of string variables can have a significant impact on the performance of the machine learning models. The selection of the most appropriate numeric representation requires careful consideration of the specific problem being addressed and the characteristics of the dataset. For instance, in some cases, one-hot encoding may be preferred over label encoding to avoid introducing ordinality or implying the magnitude of differences between the encoded variables. Furthermore, the choice of numeric representation can also affect the interpretability of the results obtained from the machine learning models.

3.5.3. Machine Learning Algorithms

To ensure the accuracy and reliability of the respiratory infection diagnosis system, the research team employed a range of machine learning algorithms for classification. Specifically, seven different algorithms were utilized, including decision tree, k-nearest neighbor, logistic regression, gradient boosting, random forest, naïve Bayes, and support vector machine (SVM). These algorithms are well-established and widely used in the field of machine learning for binary and multiclass classification problems, and have demonstrated high levels of accuracy and efficiency in a variety of applications. By utilizing a range of algorithms, the research team was able to evaluate and compare their performance, ultimately selecting the most effective algorithm for the accurate classification of respiratory infections.
All these algorithms were implemented using the Scikit-learn library in Python, which is a widely used machine learning toolkit when working with supervised and well-documented models.

3.5.4. Validation Methodology

Stratified k-part (k = 5) cross-validation is a technique commonly used to assess the predictive ability of machine learning models. Stratification involves dividing the dataset into homogeneous parts in terms of the target variable (in this case, the diagnosis of COVID-19, the common cold, and allergic rhinitis), so that each part contains a similar proportion of each diagnostic class.
In each iteration of the cross-validation, a different part of the dataset is used as the test set and the remaining parts are used as the training set. In this way, multiple models can be evaluated on different subsets of the data and a more robust and generalizable measure of model performance can be obtained.
By using k-part stratified cross-validation, one seeks to avoid the overfitting problem that occurs when the model fits the training data too well and, thus, does not generalize well to new, unseen data. Cross-validation also helps to estimate the variability in model performance and provides a more accurate measure of overall model performance.

3.5.5. Evaluation Criteria

Accuracy is a common metric used in classification problems. It is defined as the proportion of correctly classified samples. That is, the number of correctly classified samples divided by the total number of samples. Accuracy is a measure that is easy to interpret and understand, and is frequently used in binary and multiclass classification problems.
Other common evaluation metrics in classification problems include precision, sensitivity, and specificity. Accuracy refers to the ratio of true positives (samples correctly classified as positive) to the total number of samples classified as positive (true positives and false positives). This can be expressed as:
P r e = V P / ( V P + F P )
Sensitivity refers to the ratio of true positives to the total number of positive samples (true positives and false negatives). This can be expressed as:
R = V P / ( V P + F N )
The F1 score of each model for each class (COVID-19, the common cold, and allergic rhinitis) is used to obtain a more detailed understanding of their performance. This can be expressed as:
F 1 ( s c o r e ) = 2 ( 1 / ( 1 / P ) + ( 1 / R ) )
In this work, it was decided to use accuracy as the main evaluation criterion, due to its ease of interpretation and application to multiclass problems. However, depending on the context and the application in question, it may be more appropriate to use other evaluation metrics. It is important to note that the selection of the evaluation criteria should be made carefully and according to the specific needs and objectives of the application in question.

3.5.6. Analysis Procedure

After defining the variables and machine learning algorithms in the previous section, exploratory data analysis was performed on the patient database to identify patterns and relationships between the variables. The exploratory data analysis allowed the investigators to better understand the distribution of the data and to detect any potential problems or inconsistencies in the data.
The dataset was then divided into two parts: a training set and a test set. The training set was used to train the machine learning models, while the test set was used to evaluate model performance.
Accuracy was used as the primary evaluation criterion to compare model performance. Accuracy was defined as the proportion of correctly classified samples. In addition to accuracy, other evaluation criteria, such as precision, sensitivity, and F1 score, were considered to evaluate model performance in different aspects.
Finally, the performance of the seven models (decision tree, k-nearest neighbor, logistic regression, gradient boosting, random forest, naïve Bayes, and support vector machine) was compared and the best model was selected to predict the diagnosis of COVID-19, the common cold, and allergic rhinitis based on symptoms. The researchers were able to use the selected model to predict the diagnosis of respiratory infections in patients and provide faster and more efficient medical care.

3.5.7. Ethical Considerations

The study was conducted in accordance with the ethical principles set forth in the Declaration of Helsinki and informed consent was obtained from all participants prior to their inclusion in the study [23]. In addition, the privacy of the participants was protected and the confidentiality of the data was maintained by anonymizing the medical records. In any research involving human subjects, it is essential to take into account ethical considerations to protect the rights and welfare of the participants. In the case of our study, ethical and legal standards were rigorously followed in data collection and analysis [24,25].
Informed consent was obtained from all participants before including them in the study. In addition, data confidentiality was ensured and appropriate security measures were used to protect the privacy of the participants. The data were used exclusively for research purposes and were not shared with third parties without the express consent of the participants. In addition, potential discrimination was taken into account in the selection of participants and in the interpretation of the results. It was ensured that all participants were treated fairly and equally, regardless of their gender, age, ethnicity, or any other personal characteristics.
Finally, the participants were informed of the potential risks and benefits of participating in the study. The participants were free to withdraw at any time without negative consequences to themselves.

4. Results

4.1. Characteristics of Participants

In total, 6000 patient data presenting symptoms of respiratory infections were included for training the artificial intelligence algorithms. Of these patients, 52% were female and 48% were male. The mean age of the participants was 38 years, with an age range of 18 to 85 years; see Figure 10.
In terms of the symptoms reported by the participants, the most common were fever (present in 72% of patients), cough (in 65% of patients), and fatigue (in 54% of patients). Other less common symptoms included sore throat (in 33% of patients), nasal congestion (in 28% of patients), and shortness of breath (in 15% of patients).
In terms of diagnosis, 40% of participants were found to have COVID-19, 35% had a common cold, and 25% had allergic rhinitis. Notably, most patients with COVID-19 had diarrhea and vomiting, while most patients with the common cold had nasal congestion and sore throat. Patients with allergic rhinitis presented mainly with nasal congestion and sneezing.

4.2. Performance of the Triage Measurement Device

To verify the accuracy of the device 3 quality metrics must be calculated, which are absolute error, relative error, and reliability. In the case of absolute error, one must work with the value measured by the device, while the real value is the measurement of the commercial pulse oximeter, the same happens with body temperature where the real value is the one measured by the commercial digital thermometer. The calculation of the absolute error is obtained using Equation (4). The second quality metric is the relative error, which determines the percentage of erroneous measurements that the device yields compared to the commercial one; this is calculated using Equation (5). Finally, the reliability of the device is calculated which determines the percentage of adequate measurements compared to the commercial device, the way to obtain this metric is by means of Equation (6).
A b s o l u t e e r r o r = | V m e a s u r e d V r e a l |
R e l a t i v e e r r o r = 100 % ( A b s o l u t e e r r o r / V m e a s u r e d )
R e l i a b i l i t y = 100 % R e l a t i v e e r r o r

4.2.1. BPM (Heart Rate) Measurement

In order to determine if the heart rate measurement is correct, a comparison of the measurements of the device built with respect to a commercially available device was carried out. We worked with a total of 20 people who attended the office of the doctor who assisted in the project. The results of the “BPM” measurements had a variation of 3.1 BPM with respect to a commercially available pulse oximeter, resulting in an average measurement error of 4.52%. This percentage error yields a reliability of 95.48%, which makes it functional when dealing with a patient as the healthcare professional emphasized that the vital sign status is checked for an abnormality.
Figure 11 shows the behavior of the BPM measurements, where there is a trend of greater precision as the frequency range increases. There is a tendency for greater precision as long as the heart rate range is between 60 bpm and 65 bpm, since when the actual value is higher than 70 bpm the device presents a certain degree of difficulty when measuring. It is also important to mention that the MAX30100 sensor used is very sensitive to the position of the finger on the LEDs, so a bad positioning of the finger on the sensor will cause an erroneous measurement.

4.2.2. SpO2 (Blood Oxygen Saturation) Measurement

In order to establish the reliability of the measurement of blood oxygen saturation, the device was compared with a commercially available device. The sample used was 20 people who showed a variation of 2.25% in SpO2 with respect to a commercially available pulse oximeter. The average measurement error recorded was 2.45%, resulting in a reliability of 97.55%. This result is within the guidelines of the physician with whom we consulted since it allows the patient to know if there is an anomaly in the amount of oxygenated hemoglobins in their body.
As shown in Figure 12, the behavior of the SpO2 measurements can be visualized, where there is a tendency for greater precision when the saturation level range is between 90% and 93%. When the real value is higher than 97%, the device begins to have a slight increase in measurement error. It should be noted that the accuracy of the measurement will depend on how the user positions their finger on the device, since a wrong positioning of the finger on the sensor will cause an erroneous measurement.

4.2.3. Body Temperature Measurement

After the implementation of the temperature measurement device, it was crucial to assess its accuracy by comparing the temperature readings with those of a digital infrared thermometer. To this end, 20 individuals were selected as test subjects. The tests revealed that the temperature measurements obtained by the device had an average error rate of only 1.07%, making them highly accurate and reliable. Moreover, the device was able to detect even slight temperature changes, with a variation of only 0.39 °C observed when compared to the infrared thermometer. The resulting reliability of the device was found to be 98.93%, which ensures that any thermal rise (fever) would be accurately detected and registered in the database, allowing for appropriate diagnosis using the artificial intelligence algorithm.
Figure 13 shows the behavior of the temperature measurements, which tend to be more accurate when the saturation level range is between 36.0 °C and 36.4 °C. When the real value is higher than 37 °C the device begins to show a small increase in measurement error. The accuracy of the temperature measurement will depend on the area to which the device is pointed, for this reason it was chosen to place the sensor near the palm of the user.

4.3. Performance of Artificial Intelligence Models

The seven supervised machine learning models were developed to predict the diagnosis of COVID-19, the common cold, and allergic rhinitis. The models were trained using age, gender, and symptoms as features. Stratified k-part cross-validation (k = 5) was used to evaluate the performance of the models.
As shown in Table 4, the average accuracy of the seven models for the classification of respiratory infections was 89.63%. For COVID-19 the accuracy was 94.57%, this means that the models correctly identified 94.57% of the COVID-19 cases in the dataset. The average accuracy for common cold classification was 94.57%, indicating that the models correctly classified 94.57% of the common cold cases in the dataset. The average accuracy for classification of participants with allergic rhinitis was 97.84%.

AI Algorithm Selection

Based on the analysis of the metrics of each evaluated model presented in Table 1, it was determined that the best medical diagnostic algorithm for COVID-19, the common cold, and allergic rhinitis is the support vector machine model. It has the most balanced metrics among the models, having a recall of 0.76 and 0.96 of precision for the “COVID-19” class, for the “COLD” class it has a recall of 0.81 and a precision of 0.97, and the “RHINITIS” class it has a recall of 1 with a precision of 1. This gives an overall average recall of 0.914 and a test precision of 0.913. The SVM results are the highest and most stable with respect to each other, this is positive because if the training accuracy is considerably higher than the testing accuracy, the AI model is not learning but memorizing, which leads to errors when the model is tested with new data that the AI has never seen before. These features set the support vector machine algorithm apart from the rest and it was chosen to be included in the web application.

4.4. Telemedicine Virtual Assistant Performance

Once the operation of the electronic device had been verified in accordance with the doctor’s guidelines, the telemedicine virtual assistant was tested for the medical diagnosis of COVID-19, the common cold, and allergic rhinitis. The identity of the persons is reserved to respect the privacy of the patients with whom the doctor works, the results obtained from the 20 patients treated obtained only two misdiagnoses, the first misdiagnosis was a case of the common cold and COVID-19 that was confused with the common cold.
In Figure 14, it is observed that the allergic rhinitis class shows three hits with no errors, the common cold class obtained nine hits with one error, and the COVID-19 class had six hits with one error.
The telemedicine virtual assistant developed in this study combines the information collected by the triage measurement device and the artificial intelligence SVM model to classify patients according to their final diagnosis. The results indicate that the virtual assistant performs well in classifying patients with an average accuracy of 91.3413% in classifying patients with COVID-19, the common cold, and allergic rhinitis.
The accuracy of the virtual assistant is superior to that of each of the artificial intelligence models separately, suggesting that the combination of information from the triage measurement device and the artificial intelligence model allows for better patient classification. This demonstrates the importance of incorporating the information from the artificial intelligence models into the patient classification process.
The high performance of the telemedicine virtual assistant has important implications for online healthcare and telemedicine. The ability to accurately classify patients according to their final diagnosis can improve the efficiency of telemedicine services and help patients receive the right care at the right time. In addition, the virtual assistant’s ability to accurately detect patients with COVID-19 may be particularly valuable in the early detection and control of the spread of the disease in the community.

5. Discussion

The use of low-cost devices, artificial intelligence (AI), and chatbots to detect COVID-19 has been identified as a promising approach in the fight against the pandemic. This approach was highlighted in the article written by Parviainen et al. [26]. By incorporating data from low-cost monitor devices for corporal temperature and oxygen saturation, the chatbot can provide more accurate and personalized recommendations for users. Furthermore, the use of AI algorithms allows chatbots to analyze large amounts of data and identify patterns and trends in COVID-19 cases, potentially allowing for earlier detection and containment of outbreaks. The article raises important ethical concerns related to the use of chatbots in healthcare. The authors argue that the use of chatbots in healthcare should be guided by ethical principles such as autonomy, beneficence, non-maleficence, and justice. They emphasize the need for transparency, accountability, and user privacy in the development and deployment of chatbots.
Therefore, while the use of low-cost devices, AI, and chatbots to detect COVID-19 is a promising approach, it is essential to ensure that ethical principles guide their development and deployment. This requires careful consideration of the potential benefits and harms associated with their use and a commitment to transparency, accountability, and user privacy. By prioritizing ethical considerations in the development and deployment of chatbots, we can maximize their potential to improve healthcare outcomes and contribute to the fight against COVID-19.
While [27] focuses on a chatbot-based telehealth service designed for post-COVID-19 care. This chatbot, named Medbot, uses conversational artificial intelligence to provide patients with a variety of services, including health consultations, medication reminders, and symptom tracking. Medbot also has the ability to refer patients to a human doctor if necessary. Unlike our approach, Medbot does not use a low-cost monitor device to measure vital signs. However, the article highlights the potential of chatbots and AI to provide post-COVID-19 care remotely, increasing healthcare access and reducing the burden on healthcare systems. Both the platform presented in this article and Medbot demonstrate the potential of artificial intelligence to improve healthcare delivery, but they focus on different aspects of healthcare and use different approaches.
In [28], the authors explore how digital triage can be used to manage population health during the COVID-19 pandemic, particularly in terms of preventing unnecessary visits to healthcare facilities and reducing the burden on healthcare providers. The authors discuss various digital triage tools that have been developed and implemented during the pandemic, such as online symptom checkers, chatbots, and telemedicine platforms. They also highlight the benefits of digital triage, such as increased efficiency, improved patient satisfaction, and better allocation of healthcare resources. The article provides valuable insights into the potential of digital technologies to transform healthcare delivery and improve population health management, especially in the context of a global pandemic. This research is in line with the recommendations made in the article, which emphasizes the importance of digital solutions, such as telemedicine and remote monitoring, to manage population health during the COVID-19 pandemic. Both the article and the previous answer suggest that the use of technology, specifically artificial intelligence, can play a crucial role in screening and triaging patients, thus reducing the burden on healthcare systems and minimizing exposure to infectious diseases.
Ref. [29] discusses various technologies, including IoT, AI, robotics, and blockchain, that can be used to combat the COVID-19 pandemic. The web application and low-cost device for monitoring vital signs described are examples of how IoT and AI can be used to detect and diagnose COVID-19 and other respiratory infections. By leveraging these technologies, healthcare providers can remotely monitor patients’ vital signs and symptoms, detect early warning signs of illness, and take proactive measures to prevent the spread of disease. The article emphasizes the importance of leveraging these technologies to build a more resilient and responsive healthcare system that can quickly adapt to new and emerging threats, such as the COVID-19 pandemic.
The study demonstrated promising results in the development of a telemedicine virtual assistant that accurately classifies patients based on their final diagnosis. This is especially relevant in the context of the COVID-19 pandemic, where timely diagnosis and medical care are crucial for patient outcomes and public health. The use of artificial intelligence, in combination with a low-cost triage measurement device, can improve the accuracy of patient classification, which can ultimately improve the quality and efficiency of medical care. However, it is important to note that the telemedicine virtual assistant requires clinical and regulatory validation before implementation in clinical practice. Additionally, ethical and privacy issues must be considered in the collection and use of patient data.
The combination of various technologies, such as AI, IoT, robotics, and blockchain, can revolutionize the healthcare industry by improving patient outcomes, reducing healthcare costs, and increasing access to healthcare services. The study’s results show the potential of this approach in developing a telemedicine virtual assistant that can improve the accuracy of patient classification. However, to fully harness the power of smart and connected health technologies, it is essential to address technical, ethical, and regulatory challenges. The integration of these technologies into healthcare systems must be carefully planned and implemented, with a focus on maintaining patient privacy and security while improving the quality and accessibility of healthcare services.
This paper shows a novel approach to respiratory infection diagnosis using a combination of AI and electronic device measurements, achieving a high accuracy rate. The findings of this research can potentially contribute to the development of more efficient and reliable ways of diagnosing respiratory infections, including COVID-19.
In addition to the advancements made in respiratory infection diagnosis, it is important to consider the broader context of healthcare systems and their response to the COVID-19 pandemic. The pandemic has highlighted the need for innovative and adaptable solutions that can effectively address emerging health challenges. The integration of AI, IoT, and other technologies in healthcare holds great promise in this regard.
By leveraging AI algorithms and IoT devices, healthcare providers can not only improve the accuracy of diagnosis but also enhance the efficiency and accessibility of healthcare services. The combination of these technologies enables remote monitoring of patients’ vital signs and symptoms, facilitating early detection, timely intervention, and optimized allocation of healthcare resources. Furthermore, the integration of blockchain technology can enhance data security and interoperability, ensuring the privacy and integrity of sensitive health information.
However, it is crucial to address the technical, ethical, and regulatory challenges associated with implementing these technologies. The development and deployment of AI-based systems should be guided by ethical principles, ensuring transparency, accountability, and user privacy. Additionally, comprehensive validation and regulatory compliance processes are essential to establish the reliability and safety of these systems in clinical practice.
In conclusion, the study’s innovative approach, combining AI, IoT, and electronic device measurements presents a significant advancement in respiratory infection diagnosis. This development aligns with the broader trend of leveraging technology to enhance healthcare delivery and response to public health crises such as the COVID-19 pandemic. By continuously improving and integrating these technologies, healthcare systems can be better prepared to address emerging health challenges and improve patient outcomes.

Limitations of the Study

While the study presents a novel approach to respiratory infection diagnosis using AI and electronic device measurements, it is essential to consider the limitations inherent in the research. Firstly, the study’s accuracy rate of 0.91% may indicate a high level of precision, but it is important to note that this value alone does not provide a comprehensive understanding of the diagnostic performance. Metrics such as sensitivity, specificity, and positive and negative predictive values are crucial in evaluating the true effectiveness of the AI algorithm. Further validation studies with larger and diverse patient populations are necessary to assess the generalizability and reliability of the system.
Secondly, the study’s reliance on symptomatology entered by the user raises potential challenges in the accuracy of disease classification. Self-reported symptoms can be subjective and prone to errors or omissions, which may impact the algorithm’s ability to accurately identify the respiratory disease. Additionally, the study does not address potential confounding factors that may influence symptom presentation, such as comorbidities or individual variations in symptom expression. Further research and refinement of the AI algorithm are necessary to improve its robustness and accuracy in real-world scenarios.
There are other factors that should be taken into account when interpreting the findings of the study. One important consideration is the potential bias in the data used to train the AI algorithm. The accuracy and effectiveness of AI models heavily depend on the quality and representativeness of the training data. If the data used for training is not diverse or fails to capture the full spectrum of respiratory infections, it may limit the algorithm’s ability to accurately classify different diseases. Therefore, efforts should be made to ensure that the training data encompass a wide range of respiratory infections, including variations in symptoms and disease severity.
Another limitation is the reliance on the low-cost monitor device for measuring vital signs. While such devices can provide valuable data for diagnosis, their accuracy and reliability may vary. Factors such as device calibration, user error, and technical limitations can affect the precision of the measurements. Therefore, it is crucial to validate the accuracy and consistency of the device readings against established medical standards. Additionally, the usability and accessibility of the device for individuals with limited technical knowledge or physical impairments should be considered to ensure equitable access to the diagnostic tool.
Furthermore, the study’s focus on respiratory infections, including COVID-19, the common cold, and allergic rhinitis, may limit the generalizability of the findings to other types of diseases or conditions. The AI algorithm’s performance in distinguishing respiratory infections from non-respiratory conditions was not addressed in the study. Therefore, the applicability of the developed system to a broader range of medical conditions remains uncertain and would require further investigation.
Overall, while the study presents a promising development in respiratory infection diagnosis, it is important to recognize its limitations. Additional research is required to validate the system’s diagnostic performance, consider the impact of confounding factors, and assess its applicability in diverse populations. Addressing these limitations will enhance the reliability and clinical utility of the AI-based diagnostic tool, ultimately supporting healthcare providers in making informed decisions and improving patient care.

6. Conclusions and Future Recommendation

The performance tests confirmed the compliance of the artificial intelligence algorithm. The support vector machine model was the best option as it adequately handled the classes “COVID-19”, “COLD”, and “RHINITIS” with accuracies of 0.85, 0.88, and 1, respectively, where the best-performing class in the model was the class “RHINITIS”. This results in an overall average accuracy of 0.91, making the model suitable for medical use within the guidelines established by the collaborating doctor.
The web application called “Baymax” used to diagnose patients with COVID-19, the common cold, and allergic rhinitis, was hosted on the Google Cloud server so that users can access it from any device with an internet connection without requiring any prior installation. By using the Flask framework together with Bootstrap 5 we achieved a responsive, dynamic, and robust application, as it has security for both the user and the web application. In addition, the tools of HTML, CSS, JavaScript, Python, and MySQL used in the development of the project allow the web application to be scalable depending on the needs of the patients.
One of the potential benefits of the application of artificial intelligence in telemedicine is the ability to broaden the scope of medical care through increased diagnostic capability. In this regard, one possible strategy to improve the performance of the telemedicine virtual assistant developed in this study is the incorporation of data from other diseases and symptoms.
The inclusion of more data would allow the artificial intelligence algorithm to learn more complex patterns and expand its diagnostic capability, which could improve the accuracy and scope of patient classification. For example, if additional respiratory disease data were incorporated, the telemedicine virtual assistant could improve its ability to distinguish between different types of respiratory infections, such as pneumonia, bronchitis, or sinusitis. In addition, incorporating more data could also enable greater customization of the telemedicine virtual assistant for different clinical settings and patient populations. For example, if data from chronic diseases such as diabetes or hypertension were incorporated, the algorithm could be tailored to perform more precise monitoring of patients with these conditions.
Overall, broadening the scope of the research project through the incorporation of more data from other diseases and symptoms could improve the accuracy and scope of the telemedicine virtual assistant developed in the study, allowing for greater diagnostic capabilities and more personalized medical care. However, it is important to keep in mind that the inclusion of additional data also requires careful assessment of the quality and relevance of the data, as well as the implementation of security and privacy measures to protect patient information.

Author Contributions

Conceptualization, N.V. and M.V.G.; methodology, N.V.; software, N.V., S.M. and P.A.; validation, M.V.G.; investigation, N.V., P.A. and M.V.G.; writing—original draft preparation, N.V. and M.V.G.; writing—review and editing, P.A. and M.V.G.; visualization, S.M.; supervision, M.V.G.; funding acquisition, S.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Informed Consent Statement

Informed consent was obtained from all subjects involved in the study.

Data Availability Statement

Acknowledgments

The authors would like to acknowledge the support received from the Universidad Tecnica de Ambato (UTA) and their Research and Development Department (DIDE) under project PFISEI32. This support was instrumental in conducting the research and developing the proposed telemedicine virtual assistant with AI. Additionally, the authors would like to express their gratitude to the research network INTELIA, supported by REDU, for their valuable assistance throughout the course of this work. Their collaboration and expertise contributed significantly to the success of the project.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. World Health Statistics 2022: Monitoring Health for the SDGs, Sustainable Development Goals. Available online: https://www.who.int/publications/i/item/9789240051157 (accessed on 10 April 2022).
  2. Yang, I.A.; Brown, J.L.; George, J.; Jenkins, S.; McDonald, C.F.; McDonald, V.M.; Phillips, K.; Smith, B.J.; Zwar, N.A.; Dabscheck, E. COPD-X Australian and New Zealand guidelines for the diagnosis and management of chronic obstructive pulmonary disease: 2017 update. Med. J. Aust. 2017, 207, 436–442. [Google Scholar] [CrossRef] [Green Version]
  3. World Health Organization. Training on SARS-CoV-2 sequencing and molecular phylogenetics for national influenza centres in the Eastern Mediterranean Region. East. Mediterr. Health J. 2023, 29, 162. [Google Scholar] [CrossRef]
  4. Currell, R.; Urquhart, C.; Wainwright, P.; Lewis, R. Telemedicine versus face to face patient care: Effects on professional practice and health care outcomes. Cochrane Database Syst. Rev. 2000, 9, CD002098. [Google Scholar]
  5. Lundell, S.; Holmner, Å.; Rehn, B.; Nyberg, A.; Wadell, K. Telehealthcare in COPD: A systematic review and meta-analysis on physical outcomes and dyspnea. Respir. Med. 2015, 109, 11–26. [Google Scholar] [CrossRef] [Green Version]
  6. Goyal, J.P.; Kumar, P. Telemedicine during the COVID-19 pandemic: Moving from physical to virtual outpatient care. Indian J. Pediatr. 2021, 88, 959–960. [Google Scholar] [CrossRef]
  7. Ford, J.H., 2nd; Jolles, S.A.; Heller, D.; Langenstroer, M.; Crnich, C. There and back again: The shape of telemedicine in U.S. nursing homes following COVID-19. BMC Geriatr. 2022, 22, 337. [Google Scholar] [CrossRef]
  8. Liu, S.; Xie, M.; Ye, Z. Combating COVID-19-how can AR telemedicine help doctors more effectively implement clinical work. J. Med. Syst. 2020, 44, 141. [Google Scholar] [CrossRef] [PubMed]
  9. Dasari Naga, V.; Prabaharan, S.R.S. COVID-19-the role of Artificial Intelligence, Machine Learning, and Deep Learning: A newfangled. Arch. Comput. Methods Eng. 2023, 30, 2667–2682. [Google Scholar]
  10. Swayamsiddha, S.; Prashant, K.; Shaw, D.; Mohanty, C. The prospective of Artificial Intelligence in COVID-19 Pandemic. Health Technol. 2021, 11, 1311–1320. [Google Scholar] [CrossRef]
  11. Bokolo, A.J. Application of telemedicine and eHealth technology for clinical services in response to COVID-19 pandemic. Health Technol. 2021, 11, 359–366. [Google Scholar] [CrossRef]
  12. Ben Hassen, D. Mobile-aided diagnosis systems are the future of health care. East. Mediterr. Health J. 2020, 26, 1135–1140. [Google Scholar] [CrossRef] [PubMed]
  13. Almalki, M.; Azeez, F. Health chatbots for fighting COVID-19: A scoping review. Acta Inform. Medica 2020, 28, 241–247. [Google Scholar] [CrossRef] [PubMed]
  14. Martin, A.; Nateqi, J.; Gruarin, S.; Munsch, N.; Abdarahmane, I.; Zobel, M.; Knapp, B. An artificial intelligence-based first-line defence against COVID-19: Digitally screening citizens for risks via a chatbot. Sci. Rep. 2020, 10, 19012. [Google Scholar] [CrossRef]
  15. Halwani, J.; Mouawad, D. Implementation of e-health innovative technologies in North Lebanon hospitals. East. Mediterr. Health J. 2021, 27, 892–898. [Google Scholar] [CrossRef]
  16. Srivatsan, R.; Indi, P.N.; Agrahari, S.; Menon, S.; Ashok, S.D. Machine learning based prognostic model and mobile application software platform for predicting infection susceptibility of COVID-19 using healthcare data. Res. Biomed. Eng. 2020, 38, 59–70. [Google Scholar] [CrossRef]
  17. Khanna, V.V.; Chadaga, K.; Sampathila, N.; Prabhu, S.; Chadaga, R.; Umakanth, S. Diagnosing COVID-19 using artificial intelligence: A comprehensive review. Netw. Model. Anal. Health Inform. Bioinform. 2022, 11, 25. [Google Scholar] [CrossRef]
  18. Gandhi, M.; Singh, V.K.; Kumar, V. IntelliDoctor—AI based Medical Assistant. In Proceedings of the 2019 Fifth International Conference on Science Technology Engineering and Mathematics (ICONSTEM), Chennai, India, 14–15 March 2019; Volume 1, pp. 162–168. [Google Scholar]
  19. Molina-Mora, J.A.; González, A.; Jiménez-Morgan, S.; Cordero-Laurent, E.; Brenes, H.; Soto-Garita, C.; Sequeira-Soto, J.; Duarte-Martínez, F. Clinical profiles at the time of diagnosis of SARS-CoV-2 infection in Costa Rica during the pre-vaccination period using a machine learning approach. Phenomics 2022, 2, 312–322. [Google Scholar] [CrossRef]
  20. Camargo, E.; Aguilar, J.; Quintero, Y.; Rivas, F.; Ardila, D. An incremental learning approach to prediction models of SEIRD variables in the context of the COVID-19 pandemic. Health Technol. 2022, 12, 867–877. [Google Scholar] [CrossRef]
  21. Bonifazi, G.; Corradini, E.; Ursino, D.; Virgili, L. New Approaches to Extract Information From Posts on COVID-19 Published on Reddit. Int. J. Inf. Technol. Decis. Mak. 2022, 21, 1385–1431. [Google Scholar] [CrossRef]
  22. Cauteruccio, F.; Terracina, G. Extended High Utility Pattern Mining: An Answer Set Programming Based Framework and Applications. arXiv 2023, arXiv:cs.AI/2303.13191. [Google Scholar] [CrossRef]
  23. Mirbabaie, M.; Hofeditz, L.; Frick, N.R.J.; Stieglitz, S. Artificial intelligence in hospitals: Providing a status quo of ethical considerations in academia to guide future research. AI Soc. 2022, 37, 1361–1382. [Google Scholar] [CrossRef] [PubMed]
  24. Hindocha, S.; Badea, C. Moral exemplars for the virtuous machine: The clinician’s role in ethical artificial intelligence for healthcare. AI Ethics 2021, 2, 167–175. [Google Scholar] [CrossRef]
  25. Karimian, G.; Petelos, E.; Evers, S.M.A.A. The ethical issues of the application of artificial intelligence in healthcare: A systematic scoping review. AI Ethics 2022, 2, 539–551. [Google Scholar] [CrossRef]
  26. Parviainen, J.; Rantala, J. Chatbot breakthrough in the 2020s? An ethical reflection on the trend of automated consultations in health care. Med. Health Care Philos. 2022, 25, 61–71. [Google Scholar] [CrossRef] [PubMed]
  27. Bharti, U.; Bajaj, D.; Batra, H.; Lalit, S.; Lalit, S.; Gangwani, A. Medbot: Conversational artificial intelligence powered chatbot for delivering tele-health after covid-19. In Proceedings of the 2020 5th International Conference on Communication and Electronics Systems (ICCES), Coimbatore, India, 10–12 June 2020; pp. 870–875. [Google Scholar] [CrossRef]
  28. Lai, L.; Wittbold, K.A.; Dadabhoy, F.Z.; Sato, R.; Landman, A.B.; Schwamm, L.H.; He, S.; Patel, R.; Wei, N.; Zuccotti, G.; et al. Digital triage: Novel strategies for population health management in response to the COVID-19 pandemic. Healthcare 2020, 8, 100493. [Google Scholar] [CrossRef] [PubMed]
  29. Firouzi, F.; Farahani, B.; Daneshmand, M.; Grise, K.; Song, J.; Saracco, R.; Wang, L.L.; Lo, K.; Angelov, P.; Soares, E.; et al. Harnessing the Power of Smart and Connected Health to Tackle COVID-19: IoT, AI, Robotics, and Blockchain for a Better World. IEEE Internet Things J. 2021, 8, 12826–12846. [Google Scholar] [CrossRef]
Figure 1. Architecture of the electronic vital signs measurement system.
Figure 1. Architecture of the electronic vital signs measurement system.
Futureinternet 15 00227 g001
Figure 2. MQTT protocol architecture used.
Figure 2. MQTT protocol architecture used.
Futureinternet 15 00227 g002
Figure 3. Web application architecture.
Figure 3. Web application architecture.
Futureinternet 15 00227 g003
Figure 4. Sequence diagram of the web application.
Figure 4. Sequence diagram of the web application.
Futureinternet 15 00227 g004
Figure 5. Sequence diagram of login and user registration.
Figure 5. Sequence diagram of login and user registration.
Futureinternet 15 00227 g005
Figure 6. Sequence diagram to prevent CSRF attacks.
Figure 6. Sequence diagram to prevent CSRF attacks.
Futureinternet 15 00227 g006
Figure 7. Sequence diagram of sensorization interface.
Figure 7. Sequence diagram of sensorization interface.
Futureinternet 15 00227 g007
Figure 8. Sequence diagram of telemedicine Assistant.
Figure 8. Sequence diagram of telemedicine Assistant.
Futureinternet 15 00227 g008
Figure 9. Sequence diagram of the medical history interface.
Figure 9. Sequence diagram of the medical history interface.
Futureinternet 15 00227 g009
Figure 10. Testing of telemedicine virtual assistant on patients in the doctor’s office.
Figure 10. Testing of telemedicine virtual assistant on patients in the doctor’s office.
Futureinternet 15 00227 g010
Figure 11. Behavior of the BPM measurement.
Figure 11. Behavior of the BPM measurement.
Futureinternet 15 00227 g011
Figure 12. Behavior of the SpO2 measurement.
Figure 12. Behavior of the SpO2 measurement.
Futureinternet 15 00227 g012
Figure 13. Behavior of the corporal temperature measurement.
Figure 13. Behavior of the corporal temperature measurement.
Futureinternet 15 00227 g013
Figure 14. Telemedicine virtual assistant performance. (a) Rhinitis performance results, (b) common cold performance results, (c) COVID-19 performance results.
Figure 14. Telemedicine virtual assistant performance. (a) Rhinitis performance results, (b) common cold performance results, (c) COVID-19 performance results.
Futureinternet 15 00227 g014
Table 1. Changes from technical medical vocabulary to common vocabulary.
Table 1. Changes from technical medical vocabulary to common vocabulary.
Technical Medical VocabularyCommon Vocabulary
RhinorrheaNasal congestion
OdynophagiaSore throat
TirednessGeneral fatigue
DizzinessHeadache, slight
Rib painChest pain
AnorexiaLoss of appetite
Throat drynessSore throat, strong
EpigastralgiaBelly pain
ArthralgiaJoint pain
MigraineHeadache, severe
Cough that does not move secretionsDry cough
Cough that moves secretionsCough with phlegm
Hyaline rhinorrheaNasal congestion
Heat spikeFever
Unquantified thermal riseFever
CephalalgiaHeadache
Dryness of mucous membrane of throatSore throat, strong
AstheniaGeneral fatigue
Headache Frontal headacheHeadache, moderate
RhinopharyngitisCold
Table 2. Symptoms with the categories considered.
Table 2. Symptoms with the categories considered.
SymptomsCategories
Nasal dischargeyes and no
Nasal congestionyes and no
Sore throatmild, moderate, and severe
Tearingyes and no
Coughdry and phlegmy
Sneezingyes and no
Choking sensationyes and no
Feveryes and no
Joint painmild, moderate, and severe
Headachemild, moderate, and severe
Nasal itchingyes and no
Swelling of the eyesyes and no
Snoringyes and no
Muscle painyes and no
Voice requestyes and no
Eye painyes and no
Diarrheayes and no
Nauseayes and no
Belly painyes and no
Chest painyes and no
Loss of appetiteyes and no
Chillsyes and no
Table 3. Equivalence to transform string data to integer data.
Table 3. Equivalence to transform string data to integer data.
Variable in String (String)Variable in Int. (Integer)
female1
male0
yes1
no0
mild1
moderate2
severe3
dry1
phlegmy0
Table 4. Performance of artificial intelligence algorithms.
Table 4. Performance of artificial intelligence algorithms.
AI ModelTraining AccuracyTesting Accuracy
Decision tree85.9891%86.2223%
k-nearest neighbor85.3021%82.8365%
Logistic regression91.0124%90.7090%
Gradient boosting92.2094%90.8006%
Random forest91.5029%90.7088%
Naïve Bayes89.9725%90.2513%
Support vector machine (SVM)91.4246%91.2579%
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Villafuerte, N.; Manzano, S.; Ayala, P.; García, M.V. Artificial Intelligence in Virtual Telemedicine Triage: A Respiratory Infection Diagnosis Tool with Electronic Measuring Device. Future Internet 2023, 15, 227. https://doi.org/10.3390/fi15070227

AMA Style

Villafuerte N, Manzano S, Ayala P, García MV. Artificial Intelligence in Virtual Telemedicine Triage: A Respiratory Infection Diagnosis Tool with Electronic Measuring Device. Future Internet. 2023; 15(7):227. https://doi.org/10.3390/fi15070227

Chicago/Turabian Style

Villafuerte, Naythan, Santiago Manzano, Paulina Ayala, and Marcelo V. García. 2023. "Artificial Intelligence in Virtual Telemedicine Triage: A Respiratory Infection Diagnosis Tool with Electronic Measuring Device" Future Internet 15, no. 7: 227. https://doi.org/10.3390/fi15070227

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop