ILITIA : telehealth architecture for high-risk gestation classification

Introduction: According to the World Health Organization, about 9.2% of the 28 million newborns worldwide are stillborn. Besides, about 358,000 women died due to complications related to pregnancy in 2015. Part of these deaths could have been avoided with improving prenatal care agility to recognize problems during pregnancy. Based on that, many efforts have been made to provide technologies that can contribute to offer better access to information and assist in decision-making. In this context, this work presents an architecture to automate the classification and referral process of pregnant women between the basic health units and the referral hospital through a Telehealth platform. Methods: The Telehealth architecture was developed in three components: The data acquisition component, responsible for collecting and inserting data; the data processing component, which is the core of the architecture implemented using expert systems to classify gestational risk; and the post-processing component, in charge of the delivery and analysis of cases. Results: Acceptance test, system accuracy test based on rules and performance test were realized. For the tests, 1,380 referral forms of real situations were used. Conclusion: On the results obtained with the analysis of real data, ILITIA, the developed architecture has met the requirements to assist medical specialists on gestational risk classification, which decreases the inconvenience of pregnant women displacement and the resulting costs.


Introduction
Annually, approximately 120 million pregnancies occur worldwide, but half a million results in women death because of complications during pregnancy or childbirth.According to Supriyanti et al. (2015), 60% to 80% of all maternal deaths are caused by hemorrhages during labor, diabetes, hypertension in pregnancy and complications of unsafe abortion.Almost all these deaths occurred in low-resource locations and could have been avoided with proper orientation from health professionals (Aditya et al., 2014).Besides, studies show that more than 50 million women suffer serious illnesses or disabilities related to pregnancy (Say et al., 2014).
A pregnancy that is going well can become risky at any time during pregnancy or during labor (Brasil, 2012).Apart from that, gestational risk factors can be readily identified during prenatal care when health professionals are aware of all stages of the anamnesis, general physical examinations and gynecological-obstetrical examinations.
One of the prenatal care protocols aimed at minimizing morbidity and mortality is called high-risk pregnancy referral.Such a protocol is normally done manually, which makes the control and referral process less efficient which results in high costs and overcrowded hospitals (Araújo, 2015).In other words, the manual procedure favors the depreciation of the service and hampers the care of women with a high-risk pregnancy.As one of the consequences of such depreciation some women are erroneously referred as high-risk pregnant which means they go to the referral hospital and come back to the basic health unit (Araújo, 2015).
Although more than 95% of all pregnant women attend prenatal care in many regions of Brazil, maternal morbidity and mortality rates remain high, which confirms significant deficiencies in the provision of care (Peixoto, 2014).These facts highlight the need for continued engagement of the whole health team and the scientific community to improve prenatal care.In this sense, the development of solutions aimed at supporting health professionals in the fulfillment of prenatal care protocols is really important to help them in the search for better conditions for the mother and the fetus.
As a result, some computational solutions have been developed to optimize the referral process and high-risk pregnancy classification.Many of these solutions use Telehealth platforms which take advantage of information and communication technologies for remote activities related to health at their various levels (primary, secondary and tertiary).They enable interaction between health professionals or between them and their patients, as well as remote access to diagnostic support resources (Brasil, 2013).
Among such systems, we can highlight the work of Jalil et al. (2014), who developed a Telehealth platform for prenatal management called integrated and remote prenatal monitoring.Its objective was to exchange information between midwives in rural areas and medical specialists at long distances to reduce maternal mortality rate in rural areas.Aditya et al. (2014) developed a prenatal kit to assist midwives on high-risk pregnancies triage assessment in rural areas.For that purpose, a Telehealth platform was used to communicate with medical specialists.Supriyanti et al. (2015) developed an intelligent system to aid in high-risk pregnancy triage assessment in rural areas.The Analytic Hierarchy Process (AHP) method was used during the decision-making process in the high-risk pregnancy diagnosis.
The work of Lam et al. (2015) proposed a new system architecture to support the clinical decision of high-risk pregnancy using ontology.Okpor (2015) used fuzzy logic to aid medical diagnosis in gestational diabetes to eliminate the uncertainty and inaccuracy associated to diagnose gestational diabetes.Umoh and Nyoho (2015) developed a framework using computational intelligence to health care diagnostics and monitor risk factors in pregnant women.
About the referral protocol, the work of Ferreira et al. (2006) analyzed the most prevalent causes of pregnant women referral through two sources of information: the diagnosis in the health booklet and the diagnosis made in the high-risk prenatal clinic at the secondary care unit.Silva et al. (2014) and Carvalho and Silva (2014), conducted an exploratory study of referrals from BHU (Basic Health Units) to the Maternity Hospital Januário Cicco (MEJC).The physicians performed a triage assessment in women who presented a high-risk pregnancy associated to cardiovascular diseases, preeclampsia and the Acquired Immune Deficiency Syndrome (AIDS).It was observed that a reference and counter-reference system is needed as well as a competent and qualified interdisciplinary team for early diagnosis and to follow-up women with cardiovascular risk, through health education, during the cycle.
Considering the works presented, we can observe that some of the systems available use a telehealth platform to exchange information among health professionals.From the perspective of diagnosis aid, the papers analyzed developed expert systems applied to aid medical diagnosis using artificial intelligence techniques to perform pre-diagnosis related to gestational risk factors.Some works address the referral protocol by identifying the most prevalent causes and conducting a triage assessment for some specific diagnoses.
Thereby, this work presents the integration of an expert system with telehealth and the referral process to give a quick and easy support to healthcare professionals in prenatal care protocols in the Brazilian government health system.We proposed an expert system based on rules to aid diagnosis with a gestational risk classification, integrated into a telehealth platform to exchange information among health professionals in prenatal care referral protocols.The validation of the architecture was carried out through a case study in the Maternity Hospital Januário Cicco (MEJC).

Methods
To develop the architecture, we interviewed resident physicians of the Medical Residency Program in Obstetrics and Gynecology of the Federal University of Rio Grande do Norte and the Maternity Hospital Januário Cicco.That multi-professional team was distributed as: a medical specialist, a professor of the Tocogynecology department, a nurse, a social worker, a nutritionist and information technology professionals who assisted in the architecture development.
To validate the architecture, we used referral forms of pregnant women sent to the Clinic of High Risk Prenatal (PNAR) at MEJC, from May 2015 to May 2016.A total amount of 1380 referral forms of pregnant women were used.The reasons for the referrals were classified as: i) high risk with referral, ii) high risk without referral and iii) usual risk.These classifications are the ones adopted by the Ministry of Health (Brasil, 2012).

Activity stream overview
A flow of activities of pregnant women referral process adopted by the Brazilian Ministry of Health (Brasil, 2012) was initially defined to develop the architecture (Figure 1).
According to Figure 1, pregnant women need to have regular appointments also known as prenatal care.These appointments are intended to monitor the development of pregnancy and allow the delivery of a healthy newborn with no impact on maternal health (Rodrigues et al., 2011).Prenatal appointments will take place in the Basic Health Units (BHU).In these appointments, if the pregnant woman presents a serious pathological condition or significant changes in the tests the doctor or nurse in charge must fill out a referral form and urgently conduct the mother to the referral hospital (Araújo, 2015).
Once conducted, a Preceptor or Resident at the hospital performs a triage assessment to confirm whether the pregnancy is evaluated as high-risk or not.When a high-risk pregnancy is confirmed the patient is assisted and some procedures will be carried out.Otherwise, the patient will return to the BHU via the counter-referral form.All this referral process can be seen in Figure 1.
The pregnant women are referred from the BHU to the hospital in different ways: i) through prescription sheets; ii) through Unified Health System (Sistema Único de Saúde -SUS, in Portuguese) reference sheets; iii) due to other reasons; iv) several times, the pregnant women referred are not at high-risk.As a result of the last situation, hospitals often operate beyond their capacity of staff and physical structure, which makes it difficult to follow the correct time interval to the medical appointment return, as recommended by the protocols (Cornetta 2015).This fact hampers the quality of healthcare and increases its cost due to the transport of these patients (Simons, 2008).
In the study of Cornetta (2015) we can observe that about 30% of the referrals are not risk pregnancies and 18% of them present illegible handwriting so it was not possible to understand the referral form.Araújo's (2015) work analyzed that 36.5% of patients are erroneously referred as high-risk pregnancies.
The proposed solution to automate the referral process and, consequently, to avoid the displacement of pregnant women can be seen in Figure 2. Thus, health professionals who are in charge of prenatal care at BHU would enter the data of the pregnant woman in the system, such as: personal data, previous pathological history, both family and personal gynecological and obstetrical data, laboratory tests, physical tests and ultrasound examinations.
Then the expert system analyzes and classifies the data that will aid physicians to define the gestational risk.Only when the high-risk pregnancy is confirmed by medical experts, using a telehealth platform, the pregnant woman will be referred.
The classification of referrals cases is categorized as follows: • High risk with referral: the pregnant woman is classified with a high-risk pregnancy that requires specialized care in the high-risk prenatal; • High risk without referral: the pregnant woman is classified with a high-risk pregnancy; however, she has no previous pathological history that justifies specialized care and can be assisted in primary care; • Usual risk: The pregnant woman receives prenatal assistance in primary care by a doctor or nurse.

Proposed architecture
Based on Figure 2, the proposed architecture presented in Figure 3 consists of three components: data acquisition component, data processing component (expert system) and the post-processing component.Each of them interacts collaboratively to consistently perform the referral of the pregnant woman during the prenatal period and to allow the communication between health professionals about detailed information of the pregnant woman's health.
The data acquisition component is used at the Basic Health Units by health professionals.Only registered users can enter the system and access information of pregnant women through an authentication system based on user name and password.The data is inserted in a digital form that receives the following information from patients: medical history (previous pathological history), current data (laboratory tests, physical examination, ultrasound image and observations) and a description of the health status of the mother.Then, the data is sent to a Web server, which can be later accessed by the reference hospital, as shown in Figure 4.
The processing component is the architecture main nucleus and responsible to process the pregnant woman data and classify (pre-diagnosis) the gestational risk (usual risk, high risk without referral, high risk with referral), as shown in Figure 5.This component is flexible and allows to couple varied intelligent mechanisms (expert systems) to analyze the data, providing: acquisition of specialist knowledge, rules database generation, automation of the process and greater precision of the pre-diagnosis (Lakshmi et al, 2015;Pereira et al., 2015).
Afterwards, an index table that shows some clinical criteria, socioeconomic and pathological factors (personal and obstetrical) is created.These factors are identified by a score that has different values according to the meaning of each factor as shown in Table 1.The index table is based on meetings with medical experts, on the High-Risk Pregnancy Handbook (Brasil, 2012) and on the Prenatal Care Handbook (Peixoto, 2014).The interrelated factors are carefully reviewed by the specialist team.
The classifications were defined as gestational risk according to the factors scores to prepare the rules.The score is calculated by the sum of scores, according to equation ( 1), with the information of pregnant women shown in Table 1, as follows: where: fa, fw, fms, ffi, fe, fpa are factors related to age, weight, marital status, family income, education and pathologies, respectively.According to that, the rule base was created with the following structure: • Rule 1: If score> = 10 then High Risk With Referral (HRWR); • Rule 2: If score <10 and score> = 5 then High Risk Without Referral (HRWOR); • Rule 3: If score <= 4 then Usual Risk (UR).For example, some rules for the architecture were defined using three factors and three situations with risk classification.That is, if age corresponds to teenage years and weight is low and pathology is uterine fibroids, then HRWOR.If age corresponds to a young woman and weight is normal and pathology is ABO incompatibility then UR.On the other hand, if age corresponds to an adult woman, weight is high and pathology is hypertension then HRWR.
At this stage, it is important that the defined rules can cover all possible combinations of inputs and outputs of the proposed problem.Based on this, the consistency of these rules was analyzed to avoid contradictions.
The post-processing component provides the results (pre-diagnosis) that are presented to medical specialists and analyzed with the core of specialists (residents) to confirm the diagnosis.Then, the final/partial result of the diagnosis is sent to the BHU via Web server, as shown in Figure 6.Django is a framework for web development that uses the Python programming language (Elman and Lavin, 2015).The Python programming language was chosen because it is classified as high-level, interpreted, imperative, object-oriented with dynamic and strong typing (Ramanho, 2015).Django's architecture, known as MTV, is divided into three layers: Model, Template and View.
In the Model layer the classes that designate the tables in the database are written.These tables are handled through the ORM (object relational mapping) of Django that supports multiple database management systems, such as MySQL, PostgreSQL and SQLite.During the development of the architecture we opted for the PostgreSQL database since it is an open source object-relational database management system and presents native programming interfaces for Python.The View layer contains the business logic and rules to present the system.The Template layer defines the form in which data sent from the View layer is presented (Elman and Lavin, 2015).
The security protocol used in the architecture is the HTTPS (Kurose and Ross, 2006).It allows data to be transmitted over an encrypted connection that is necessary to protect patient's data, and verifies the authenticity of the server and the client by means of digital certificates.
JMeter was used for the architecture performance tests.This tool is developed in Java and is part of the Jakarta project of the Apache Software Foundation (2015).The load that the architecture can support was measured with JMeter, obtaining values such as: number of supported concurrent connections and response time.
Finally, we decided to use expert systems to develop the algorithm based on rules since it brings greater benefits to the architecture such as: acquisition of specialist knowledge, generation of a rule base, process automation and greater precision on pre-diagnosis (Kamat et al., 2015;Mehta et al., 2016;Pereira et al., 2015).

Tests and validation
To validate the architecture, a case study was carried out in the Maternity Hospital Januário Cicco (MEJC).We opted for the MEJC, because it is a SUS reference hospital in Women's Health and monitoring women with high-risk pregnancy.
For data acquisition purposes, we carried out a documentary analysis of the information contained in the pre-consultation forms adopted in High Risk Prenatal (PNAR) sector at MEJC.Thus, all referral forms of pregnant women for PNAR service at MEJC were recorded.
The database was generated between May 2015 and May 2016 with a total of 1380 referrals.The institution allowed the research on patients' data through the institutional authorization term for the use of patient documents.
The data contained in the referral forms passed through a filtering process to remove some inconsistent data such as misspelling and empty fields, as well as some redundant information.
The environment used for validation tests consisted of a server with an Intel Xeon E5-2650L processor, 1,8GHz, 8 cores, 16 GB of RAM, Ubuntu 16.04 LTS, connected to a 1 Gbps network.
Three tests were conducted to measure the feasibility of the proposed architecture: an acceptance test, a system accuracy test based on rules and a performance test.According to Sommerville (2011), the acceptance test is performed on a system before making it available.Thus, its function is to check the system in relation to the original requirements and the current needs of the user.This way, iterations and increments of the architecture were performed during 7 meetings over a period of 12 months and the test results were assessed and validated for each iteration.The purpose of the meetings was to identify problems that interfere in the system development and usability.At the meetings, the following people were present: the information technology professional, who counts with a master's degree applied to health and is responsible for the e-health unit at MEJC; a physician, responsible for the Management of Education and Research at MEJC; a physician responsible for the PNAR at MEJC and a medical resident in gynecology and obstetrics.
During the acceptance tests, a questionnaire was prepared relating the acceptance criteria of the architecture based in ISO9126 (UsabilityNet, 2006).The Likert scale was used to categorize the responses in which values from 1 to 2 determine the answer "strongly disagree"; 2.1 to 3 "disagree"; 3.1 to 4 "agree"; and 4.1 to 5 "totally agree".
Real situations were simulated to verify the precision tests of the rules-based system and validate the architecture.
The goal of the performance test was to analyze the architecture efficiency regarding the access of the system to requests from BHU.For this purpose, we created three user groups: coordinators, physicians and nurses.It should be emphasized that the inclusion criterion for the users was to participate in the entire referral process between the UBS and the MEJC.Each group contained 167 virtual users sending 10 requests for each user and 10 repetitions of access, that is 50,100 requests of access.Among the requests, the users performed the authentication in the system, searches, information recording, data listing, among other actions.The 167 users were chosen due to the capacity of health facilities in Rio Grande do Norte, the state where MEJC is located, according to the National Register of Establishments Health (Cadastro Nacional de Estabelecimento de Saúde , 2016).

Results
In Table 2 we can see the questions applied in the questionnaires and their respective results with values related to the acceptance criteria of the architecture.The mean acceptance value obtained was 4.3.After the tests, evaluative criteria were discussed and it was possible to assess the concrete results for the system improvement that directly impact the acceptance of the system.
In the evaluations of usage, content and interface that make the acceptance criteria, ILITIA obtained overall average of 4.48, 4.21 and 4.37, reaching a value higher than the target average, set as 4 for the study, characterized as "Totally Agree" in the opinion of health professionals.About standard deviation, the evaluation criteria of use, content and interface obtained 0.02, 0.09 and 0.17, respectively.Thus, the results obtained in this study showed that the assessment criteria were met positively by health professionals.
For ILITIA processing, testing and validation a gold standard database was used (data from the PNAR referrals, reviewed and classified by medical experts), i.e. actual data with a diagnosis already confirmed.ILITIA was evaluated and discussed with the medical experts (a doctor responsible for the management of teaching and research of MEJC; a doctor responsible for the MEJC PNAR and a resident in Obstetrics and Gynecology), with a result of 96% with similar referrals ratings and 4% different.After discussing the results, some questions have been conducted and it was found that 4% of different diagnoses occurred due to data entry errors and not because of an incorrect interpretation of the algorithm.
The performance test results showed that 88% of access requests were met, that is, successfully handled.Figure 7 shows the tests (x-axis) during runtime and the average response time (y axis) for each request in milliseconds.This test showed an average response time of 5.38 milliseconds.
Figure 8 shows the time of all requests per second in the (x -axis), and the average response time in milliseconds in the (y -axis).
The experiment showed other information concerning the requests assessed by JMeter (Apache Software Foundation, 2015), as follows: • The average time of all requests (Average): 5377 milliseconds; • The request that occurred in the shortest time (Min) 138 milliseconds; • The request that took the longest amount of time -(Max): 1209 milliseconds; • The standard deviation: 79.98 milliseconds; • The number of requests that were not met (Error %): 12% which are all related to the connection to the server, and not to access or operation of the architecture; • The flow rate, representing the number of requests per minute (flow rate): 4.7.According to the results of the performance tests, it can be observed that the requests time of transmission and the architecture processing were in order of milliseconds.In this way, it assists medical experts in a more quickly and accurately decision, especially in the case of high-risk pregnant women.

Figure 1 .
Figure 1.Referral from BHU to Reference Hospital: traditional way.

Figure 2 .
Figure 2. Referral from BHU to Reference Hospital: proposed architecture.

Figure 3 .
Figure 3. Overview of the architecture.
validate the architecture proposed in this article, the following technologies were used: Python Programming Language, Django framework, HTTPS (Hyper Text Transfer Protocol Secure), JMeter and expert systems.

Figure 7 .
Figure 7. Time response results.X-axis represents running time and Y-axis represents average response time for every request.

Figure 8 .
Figure 8. Global number of requests.

Table 1 .
Scores of risk factors.

Table 2 .
Questions used in the questionnaires and respective values obtained.