Intelligent Software-Aided Contact Tracing Framework: Towards Real-Time Model-Driven Prediction of Covid-19 Cases in Nigeria

– As many countries around the world are trying to live with the deadly coronavirus by adhering to the safety measures put in place by their government as regulated by World Health Organization (WHO), it becomes very vital to continuously trace patients with COVID-19 symptoms for isolation, quarantine and treatment. In this work, an intelligent software-aided contact tracing for real-time model-driven prediction of COVID-19 cases is proposed utilizing COVID-19 dataset from kaggle.com. The dataset is preprocessed using One-Hot encoding and Principal Component Analysis. Isolation Forest algorithm is used to train and predict COVID-19 cases. The performance of the model is evaluated using Accuracy, Precision, Recall and F1-Score. The intelligent software-aided contact tracing framework has four layers: symptoms, modeling/prediction, cloud storage/contact routing and contact tracers. The contact tracing system is an android application that receives symptom values, predict it and automatically send the prediction resu lt together with user’s contact and location details to the closest contact tracer via the Firebase real-time database. The closest contact tracer is determined


INTRODUCTION
Countries of the world that were seriously ravaged by the deadly coronavirus (COVID-19) have reopen their businesses and territories so as to grow back their local and social economies while trying to cope with the existence of the virus in the face of absence of proper vaccination and drugs to combat the spread of the virus. This decision therefore implies that the countries need to adopt a highly effective approach of testing, tracing, isolation of cases and quarantining close contact to cases. Developing an intelligent real-time software aided prediction and contact tracing system is one of the techniques these countries can adopt to curb the spread of the virus.
The present day strategy practiced in Nigeria for epidemic prevention and control, where patients with vital symptoms go to medical institutions for clinical examinations and diagnosis and doctors collect their biomedical data and interview them to identify their close contacts within a stipulated period for subsequent tracing, is obviously ineffective in a contemporary society characterized by high-speed mobility and complex social existence. This approach does not allow for prompt tracing and quarantining of suspected sources of infection and also difficult to cover a wide population space considering the availability of trained personnel.
Traditional Contact Tracing (CT) is a highly demanding process as it involves a lot of interviews, detective work and monitoring. Ideally, manual CT by trained professionals can help identify persons for testing and quarantine to help contain the spread of COVID-19, but a variety of policy experts, technology companies, and public health officials have argued that digital tools may be able to expand the reach of traditional manual contact tracing systems and provide a rapid alert system that enables potentially exposed individuals to seek testing [1]. Up till date, this automatic process of CT has not been demonstrated to prove its reliability though several companies and institutions of higher learning are attempting to develop the infrastructure that will permit automated CT [2].
It has been found that 70% of contacts need to be traced to curtail the spread of the majority of outbreaks [3] like COVID-19, which has a very high rate of transmission. Considering this, the manual approach to contact tracing may not be effective as many contact tracing personnel would be required. Rapid identification and isolation of cases and exposures, made possible by digital technologies remain the most effective approach to reduce contact rate [4].
ABSTRACT-As many countries around the world are trying to live with the deadly coronavirus by adhering to the safety measures put in place by their government as regulated by World Health Organization (WHO), it becomes very vital to continuously trace patients with COVID-19 symptoms for isolation, quarantine and treatment. In this work, an intelligent software-aided contact tracing for real-time model-driven prediction of COVID-19 cases is proposed utilizing COVID-19 dataset from kaggle.com. The dataset is preprocessed using One-Hot encoding and Principal Component Analysis. Isolation Forest algorithm is used to train and predict COVID-19 cases. The performance of the model is evaluated using Accuracy, Precision, Recall and F1-Score. The intelligent software-aided contact tracing framework has four layers: symptoms, modeling/prediction, cloud storage/contact routing and contact tracers. The contact tracing system is an android application that receives symptom values, predict it and automatically send the prediction result together with user's contact and location details to the closest contact tracer via the Firebase real-time database. The closest contact tracer is determined by employing a dynamic routing algorithm (contact routing algorithm) that uses Open Shortest Path First (OSPF) protocol to compute the distance between two geographic locations (user and contact tracer) and chooses a contact tracer with shortest distance to the patient utilizing a unicast routing technique (routing a patient to a contact tracer in a one-to-one relationship). The predictive model along with the android application for software-aided contact tracing is implemented using the python, and Java programming language on Pycharm and Android Studio IDE respectively. This Framework is capable of predicting COVID-19 patients, notifying contact tracers of positive cases for proper follow-up which can subsequently curtail the spread of the virus journal.ump.edu.my/ijsecs ◄ Countries like South Korea and Iceland which successfully responded to COVID-19 made digital CT approach their strong pillar. USA and Germany with high confirmed cases have prioritized CT as a means for breaking the transmission chain of the disease after the lockdown. These countries are relying on models that center around testing and extensive contact tracing [5]. Early tracing and quarantining of close contacts are critical in cutting off the transmission chain and limiting the scale of any epidemic [6].
CT is a decades-old traditional essential public health technique/measure used for combating the spread of infectious disease [5,7,8]. It is a critical component of comprehensive strategies to control the spread of COVID-19. In practice, CT begins with those who test positive for COVID-19; and those who may have been exposed to the patients are identified and followed up daily for 14 days (quarantine) until they develop symptoms, pass the window of risk or are proven not to have been exposed. CT breaks the chains of human-to-human transmission [7]. CT is essential in swiftly identifying cases and their contacts thereby preventing recurrence [9].
[10] has broken the contact tracing task into three basic steps as shown in Figure 1. Speed and capacity are essential requirements for effective CT; there must be enough CT personnel to test suspected cases in a timely manner [8].These requirements are obviously lacking in traditional CT approaches. For this reason, there is a need to design digital tools to assist in CT efforts. These tools are only to enhance and augment the capabilities of the public health officials and not to replace them [5].
Some of the digital tools used in CT efforts are mobile applications and smartphones. Countries like Singapore, South Korea, Israel and USA have included mobile applications (apps) as one of the technologies to facilitate CT of COVID-19 [1]. Smartphones are widely used electronic products that can detect characteristics of users, such as spatiotemporal trajectory and social contacts. They are already used in health care through websites and apps such as WeChat, Twitter, and Facebook, opening up a new field in medical and scientific research known as mobile health [11].
[7] classified digital tools for contact tracing into 3 categories as depicted in Table 1. Specifically useful for initial localized outbreak response, early cluster investigations, and limited populations; optimally designed for field staff and run on smartphones or tablets that can synchronize across mobile and internet networks; they need standardized data formats/data dictionaries and reporting templates to link case-based line lists with contact tracing and laboratory testing data. Proximity Tracing/Tracking Tools Use location-based (GPS) or Bluetooth technology to find and trace the movements of individuals who may have been exposed to an infected person in order to identify them.
Proximity is not a complete assessment of exposure, since exposure may vary independently of proximity; More evidence is needed on the effectiveness of proximity tracing tools for contact tracing; The feasibility and thresholds scale required for implementation is not certain; Overreliance on proximity tracing tools may result in the exclusion of contacts such as children or people who do not have a suitable device.

Symptoms Tracking Tools
Use applications designed to routinely collect self-reported signs and symptoms; Could be used to augment in-person visits by receiving reports from contacts of confirmed cases more than once a day.
It has limited specificity and positive predictive value for respiratory infections; potential for misdiagnosis or nondiagnosis of other illnesses; limited ability to offer differential diagnoses, and as such must be used with caution in order not to increase the risk of adverse clinical outcomes for diseases not encompassed in the tool  Table 1 comprises outbreak response, proximity tracing/tracking and symptoms tracking tools designed for public health officers, location based technology and for routinely collecting self-reported signs/symptoms respectively. Bluetooth signaling use in proximity tracing enables users to know if they have been in close contact with a case without necessarily providing location information. Symptom tracing tools are used to assess disease severity, users therefore need to know how to take follow-up actions in cases of indication of serious illness.

Contact Identification
Our intelligent software-aided CT framework combines the proximity tracing and symptoms tracking approaches for real-time prediction and tracing of COVID-19 cases in Nigeria. This supports the recommendations of the World Health Organization that a proper CT system should identify cases, have a system to feedback data and people to identify and follow-up contacts [9].
The rest of this paper is organized as follows: Section 2 highlights some different technologies used by different countries to trace COVID-19 patients; section 3 explains the proposed framework for intelligent software-aided CT for real-time prediction as well as Firebase, contact routing and the algorithm used; section 4 discusses the modules of the software-aided contact tracing while section 5 concludes the work

RELATED WORK
Many countries around the world have employed different technologies and software applications for mobile phones to trace those with COVID-19 cases. [25] used a mathematical model to investigate the possibility of reducing the spread of COVID-19 with contact tracing and found it to be true but added that CT must be implemented in line with extensive community cases detection; reaching out to as many contacts as possible. China asked their citizens to use the Alipay Health Code Application (App). The government will receive the travel history and current symptoms of their citizens and issue the App users with a colour-based QR-code indicating their health status (red colour -to be quarantined for 14 days; yellow colour -to remain indoors for 7 days; green colourfree to go about normal businesses). Israel is tracking individuals' phones to unveil where a suspected carrier has been and those they had contacts. The contacts will be notified with text messages to self-quarantine. They will be monitored through the location-tracking capabilities of cell phones [12]. Singapore released TraceTogether App that uses Bluetooth to track the proximity of two persons who have activated the App. The App exchanges time-limited tokens between the two persons which are sent to a central server. When any person reports being diagnosed with COVID-19, the Ministry of Health through the central server will determine the person's contact(s) within a particular time. A human contact tracer will alert these contacts and determine appropriate follow up actions [4]. Corona100m app in South Korea collects data from government sources and alerts users of COVID-19 patients who have been diagnosed within a 10 meters radius. The alert contains diagnosis date, nationality, age, gender and prior location. The app also plots the graphs of locations of diagnosed patients to help those who want to avoid these areas.
Other applications of mobile health (mHealth) for COVID-19 include Aarogya Setu or Big Sensor Data from India, Immuni from Italy, CovidSafe from Washington, Care19 from North Dakota and SafePlaces use Bluetooth or SMS to help monitor contact in a different way [13 -16]. In [26] a model for an interactive computer system using mobile phones and the internet was developed for real-time collection and transmission of COVID-19 related events.
The GoData software application (an example of outbreak response tool) developed by WHO in collaboration with Global Outbreak Alert and Response Network was designed specifically for field workers and has been implemented in many countries [17]. In [27], a CT management system integrating traditional contact tracing measures with symptoms tracking and contact management system was developed to assist public health officers in tracing COVID-19 cases. A good CT system requires promptness in reporting and follow-up actions. Therefore the problem with the work of [27] is that it lacks proximity measures as well as the real-time reporting of COVID-19 symptoms. [28] developed a COVID-19 symptoms monitoring and CT web application for people to individually and manually record their details (temperature, symptoms, travel history, suspected and confirmed cases they have come in contact with. What people have recorded in the web application will be sent to their email to be used for potential symptom monitoring and contact tracing if they are sometimes affected. The authors ought to know that for people to individually and daily record their details in the web portal requires some sort of force from the government and also the authenticity of the recorded details may be questionable. [11] proposed a spatiotemporal reporting over network and GPS (STRONG) which is a system integrating GPS and social media via a Smartphone app and GeoAIcombination of Artificial Intelligence and Geographic Information System. They developed a mini-program called Geo-WAS (Geo Wechat Artificial Intelligence System) which was published on January 31, 2020. Geo-WAS is within the Wechat app and collects data from users Wechat activities including time and location labels together with history of phone activities over the previous 14 days. These are used to generate and update space-time quick response code to use for identification. Individual dynamic spatiotemporal risk index to quantify the real time cumulative exposure risk for each user was also created.
The tools, technologies and software applications used by the authors highlighted above make use of Global Positioning System (GPS) and Bluetooth technologies to collect individual's data. Such information is not useful or appropriate because phone location data is not always precise enough to decide the closeness of a particular individual to another to transmit the virus; the accuracy of GPS is questionable as it works well when people are outside; travel paths of individuals may be exposed; noise and false positive identification are the issues associated with GPS data [18,19,11]. Accuracy of Bluetooth technology is quite uncertain [20]. Care19 app combining Bluetooth and GPS journal.ump.edu.my/ijsecs ◄ technologies has been challenged with accuracy issues due to inconsistent recording of GPS data and the insufficient granularity of the data it records [21].
This work therefore proposes a software-aided contact tracing system, which is an android application that receives COVID-19 symptom values, predicts it (positive or negative) and automatically sends the positive prediction result together with user's contact and location details to the closest contact tracer via the Firebase real-time database. The closest contact tracer is determined by employing a dynamic routing algorithm (contact routing algorithm) that uses Open Shortest Path First (OSPF) protocol to compute the distance between two geographic locations (user and contact tracer) and chooses a contact tracer with shortest distance to the patient utilizing a unicast routing technique (routing a patient to a contact tracer in a one-to-one relationship). Figure 2 shows an intelligent software-aided contact tracing framework for real-time model-driven prediction of COVID-19 cases comprising four (4) layers: Layer 1: This is the first layer of the framework called COVID-19 symptoms layer which is responsible for accepting COVID-19 symptoms (features) and their values as input into the system and passing the same to the next layer for modeling and prediction. Layer 2: This is the second layer called COVID-19 modeling and prediction layer which accepts the layer 1 inputs and subjects them into the COVID-19 Predictive model, predicts COVID-19 as either Positive or Negative using Isolation Forest (I-Forest) algorithm and sends the prediction results to the user via an android device while also transmitting the predicted result to Firebase Cloud Database using a Firebase client Application Programming Interface (API) on the android device.

Modelling and prediction
The modeling and prediction layer of the framework for intelligent software-aided contact tracing for real-time model-driven prediction of COVID-19 cases of Figure 2 is decomposed in order to highlight the various activities and algorithms employed to predict COVID-19. The prediction model is depicted in Figure 3 with the following compositions: . . .  [22,23] 4. Model Evaluation -To ascertain the effectiveness of this model, performance evaluation is carried out. The trained I-Forest algorithm is used by the android software application for the prediction of COVID-19 cases in our intelligent software-aided contact tracing system. 70% of the COVID-19 dataset was used for training while 30% was used for testing. The training model used was Isolation Forest. This model was ranked in [24] as the best model for predicting COVID-19 cases. The training and test sets share the same features (fever, chills, fatigue, malaise, weakness, runny-nose, breathing-difficulty and sore-throat) and the output variable represents COVID-19 positive or negative case.

COVID-19 Prediction
The class distribution from the training dataset reveals that 91% of the dataset represents COVID-19 positive cases while 9% represents negative cases. Also from the test dataset, 96% represents positive cases while 4% represents negative cases. Higher percentages of positive cases reflects the imbalanced nature of the dataset for intelligent prediction and that it is only suitable for use in one class classification algorithms such as I-Forest.
The performance of I-Forest on both the training and test datasets using Accuracy, Precision, Recall, and F1-Score is shown in Table 2 indicating a better performance.

Firebase
Firebase was founded in 2011 as an independent company and was later acquired by Google in 2014 and has rapidly evolved and become a platform that provides software developers with many tools and services for creation of mobile and web applications. This work utilizes the Firebase real-time database to facilitate the transmission of COVID-19 patient's geospatial data to Contact Tracers. Firebase real-time database stores and sync data in real-time. Firebase supports the following data types in a JSON (Javascript Object Notation) format: String, Long, Double, Boolean, Map <String, Object> and List <Object>.

Model Evaluation
Model Predictions journal.ump.edu.my/ijsecs ◄ After initializing the Firebase real-time database references, the patient's data and contact routing table are read from, written to, deleted, and updated using the following Java functions: getValue(); setValue(); deleteValue(); updateChildren();

Contact routing
Routing is the process of selecting a path across one or more networks. The principles of routing can apply to any type of network, from telephone networks to public transportation. The type of routing protocol used in this work is similar to the Open Shortest Path First (OSPF) protocol commonly used by network routers to dynamically identify the fastest and shortest available routes for sending packets to their destination.
In this work, a dynamic routing algorithm that delivers patient's COVID-19 prediction information to the contact tracers using the "Unicast" delivery scheme is employed. Patient's COVID-19 alert message is delivered to a single specific node (in this case: Contact Tracer) using a one-to-one association between the patient and the contact tracer. Each destination address that uniquely identifies a single Contact Tracer is managed using a contact routing Table. The flow diagram of the contact routing algorithm used in this work is presented in Figure 4. The contact routing algorithm works by calculating the distance between the COVID-19 Patient and all available contact tracers; the closest contact tracer receives the COVID-19 alert information. While this information transmission is real-time, the contact tracer should also act in a timely fashion in order to isolate the COVID-19 patient.
The contact routing algorithm is formulated mathematically as: = ⋀ ( , ) =0 (1) Where: is the final selected tracer (tracer with the shortest distance) is the loop control variable is the size of the routing table (i.e number of contact tracers in the routing table) RoutingTable = { "contactTracer" : "Matthew James", "tracerID" : "10 Mushin Street, Lagos", "latitude" : "0.237465547", "longitude" : "0.886636734" } is the patient's location is the current tracer from the routing table is the minimum distance function ∧ is distance functionit calculates the distance between two coordinates and is defined as the Haversine distance calculated as: ∧ = .

SOFTWARE-AIDED CONTACT TRACING
An android application using Java programming language on Android Studio Integrated Development Environment (IDE) is developed for the collection, prediction and transmission of a patient's COVID-19 positive status. This application comprises the user registration, input, prediction and the contact tracing modules. Figure 5 shows the transition diagram of the software aided contact tracer  User Registration Module The user registration module is the entry point for the software-aided contact tracing, it collects user's informationname, phone number and residential address; name, address and phone number of next of kin and user's passport photograph. This information will be sent together with location information to the firebase only when the prediction result is positive. The user registration module launches the inputs module when once the save button is clicked (for first time user). For old users, the input module is the entry point. ii.

Input module
The input module accepts COVID-19 symptom values from the user. These symptoms include -Fever, Chills, Fatigue, Malaise, Weakness, Runny-Nose, Sore Throat, Breathing Difficulty and Cough. After supplying the input, clicking the predict button launches the COVID-19 prediction module. iii.

The Prediction Module
The prediction module utilizes the Isolation Forest Algorithm and the symptoms values from the input module to predict cases of COVID-19 as either positive or negative and sends the result to the user and the nearest contact tracer. The current geographical location of the patient is also sent to the nearest contact tracer using the Firebase real-time database.
Clicking the save button on the prediction module closes the android application on the user's device. The transmitted COVID-19 information is routed to the cloud via a contact routing algorithm to the nearest contact tracer iv.

Contact Tracing Module
The contact tracing module is managed by an android application that receives a patient's COVID-19 event from the Firebase and displays this information using a map interface. The contact tracing module helps the Contact Tracer to receive positive COVID-19 cases which are in close proximity to the contact tracer. The contact tracing module, as depicted in Figure 6, is a map interface showing the location and contact details (Name, Address and Phone Number) of COVID-19 positive cases, which are closest to the contact tracer, as predicted by the prediction module of the android application for software-aided contact tracing.  The test result consists of data input or feature values, actual prediction and model prediction. The actual prediction is the ideal output of the given feature value (datapoint) while model prediction is the output of the Isolation Forest algorithm, given the said datapoint. The highlighted cells indicate incorrect prediction while every other cell represents correct prediction. It is observed from the results that Isolation Forest predicted cases of COVID-19 with minimal misclassified points.

CONCLUSION
In this work, an intelligent software-aided contact tracing system for real-time model-driven prediction of COVID-19 was undertaken. Isolation Forest was successfully trained for COVID-19 prediction using a transformed dataset preprocessed with One-Hot encoding and Principal component algorithm. The Isolation Forest was capable of predicting cases of COVID-19 in the dataset with a higher degree of accuracy. An android application was developed using Java programming language on android studio to facilitate the transmission of data between the COVID-19 patient and the closest contact tracer. The closest contact tracer was determined using a contact routing algorithm which routes patients to the closest contact tracer.