Chest-Pain Consultation System Based on Fuzzy Semantic Rules

Chest pain is considered to be one of the most important prognoses to diagnose several heart and chest diseases. This domain of knowledge suffers from vague information especially when non specialist people interact with it. This paper presents a consultation system to be used by patients with chest pain or discomfort in order to diagnose the cause of the pain and provide suitable recommendations. The system consists of two subsystems. Determining the caused of the pain is the first stage based on the fuzzy concepts and fuzzy OWL to deal with vague information. Depending on the result of the first stage, the second stage provides recommendations to be accomplished by the patient to save their lives according to SWRL and Ontology engineering. The system has been tested using 55 patients to validate its sensitivity and specificity. The results were compared with the specialists’ opinion and the results emphasized the efficiency and the reliability of the system.


Introduction
According to National Health Services (NHS) in the UK, chest pain (CP) can be caused by several causes, each of which should be treated in different way (NHS, 2015).Since the chest has two significant organs in the human's body, heart and lung, surrounding by other organs, CP with its different levels cannot be negligible because the miss functioning of one of some organs can ends the human's life or lead to dramatic illness.In most cases of CP, the fast and accurate response in diagnosing the cause can save the patient's life, while in other cases the pain can be caused by a non killing matter and can be treated by having some rest.This is a great motivation for us to develop a user friendly, easy to use consultation system that can be used by the patients themselves or their carers to specify the level of CP and to suggest a suitable treatment according to the diagnosing process.An electronic consultation system (e-Consult) can be used to minimize the need for specialist or reduce the time required to wait for an appointment.Most of the existing systems require the direct and continuous interaction between the specialist and the system to answer the patient's questions or to diagnose the illness according to the provided symptoms.This process can be interrupting workflow and time consuming.Since their appearance in 1950s till now almost all the Decision Support Systems (Shortliffe et al., 2006;Olabiyisi et al., 2011;Torshizi et al., 2014), Expert Systems (Su et al., 2001;Shu-Hsien, 2005;Rawte & Roy, 2015), and Consultation Systems (Shortliffe, 1976;Chi et al., 2015) have to interfere directly with the remote or in location specialist.Any medical consultations system should include fuzzy and uncertain information.As an instance, the patient may describe her chest pain as heavy, tight pressing, burning, or sharp pain.Each of these expressions can lead to a different diagnose alongside with other symptoms.Several proposals had been made by researchers to use fuzzy variable in medical area some of these researches used semantic web to describe the knowledge and others used ontology engineering to represent the classes and their relations (Ismail et al., 2003;Parry, 2004;Kaya et al., 2011;Liaw et al., 2012;Orsi et al., 2014).To the best of our knowledge, there is a lack in the literature in determining the cause of CP and propose a treatment rather than the researches that focused on angina or cardiovascular CP.In their work (Parry & MacRae, 2013), Parry and MacRae proposed an approach to detect Cardiovascular disease based on fuzzified ontology.Orsi et al proposed a decision support system to help patients with anginal chest pain and obesity clinical conditions (Orsi et al., 2014).The researchers focused on several fuzzy variables which are frequency and interval of CP, physical activities and Body Mass Index (BMI) and map these variables into 3 fuzzy classes to determine the risk factor.
Since heart failure is a killing disease, Akinyokun et al emphasize the role of using fuzzy logic and MySQL to design an internet-based expert system to diagnose the disease.The knowledge base for their proposed ES contains the quantitative knowledge and its fuzzy data, and qualitative knowledge which represents the patient's attributes.The decision variables of the expert system which is the symptoms and the test results are mapped into 5 fuzzy classes.This paper proposes a fuzzy consultation system (CPFC) to provide the suitable aid to people with CP.CPFC has two subsystems where the first one receives the signs and symptoms entered by the patient herself and the fuzzy inputs are processed to determine the cause of the CP.The output of the first subsystem is entered to the second one which is based on ontology engineering to infer the required recommendations and/or treatments to save the patient's life when necessary.
The rest of the paper is organized as follows.Section 2 introduces a brief description of Ontology modelling and their engineering and focuses on fuzzy ontology modelling.Section 3 provides the architecture of the proposed system, while sections 4 and 5 spot the light on the detailed structure and implementation of the system.The evaluation techniques used to evaluate the system are discussed in section 6.Conclusion points and future work are presented in section 7.

Background
The design of the system was based on two main concepts, Ontology engineering and fuzzy logic.The following sections provide a brief characteristics and features of these concepts.

Ontology Modelling
Ontology modelling is the process of designing classes, relationships, and properties to represent a specific field of knowledge.After it was a philosophical concept to study the kind of existing things, it turns to be a computer-understandable technique to represent knowledge in a specific field (Gruninger & Fox, 1995;Pablo & Adolfo, 2010).
The ontology model consists of a set of concepts that represent the knowledge domain.The classed are related by a set of relations vary from reflexive, symmetric, antisymmetric, inverse and transitive.Object and data properties are other parts of an ontology model.While object properties specify the exact relation between individuals of different classed, object properties define the properties of an instance of a specific class.
Based on descriptive logic, Web Ontology Language (OWL) is the W3c recommendation standard language to represent the ontology parts and to reason about these parts to infer new knowledge.Among its three sub languages, OWL-DL is the most used one since it fill the shortage of OWL-Lite and has more flexibility that OWL-Full (McGuinness & Harmelen, 2004;Roussey et al., 2011).

Fuzzy Ontology
The concept of fuzzy logic was introduced in 1965 (Zadeh, 1965) to represent vague and uncertain data by attaching a fuzzy value ranged between 0 and 1 to represent the amount of certainty of the specific data.In Ontology, fuzzy representation is defined by (Calegari & Ciucci, 2007) where each individual ( ∈ ) is related to a concept ( ∈ ) such that ↦ [0, 1] the set of individuals (I) are related to the set of concepts (C).Even the domain of relations ( ) is the set of entities belong to[0, 1].This research proposed that all concepts and relations in the fuzzy ontology are fuzzy, but crisp concepts still have the ability to be represented as either 0 or 1. Fuzzy variables guarantee the gradual change in state rather than an exact crisp value.
Fuzzy logic is supported with reasoning technique to infer new knowledge from existing ones.They take a conditional structure (IF antecedent(s) THEN consequent) statement, were conditions can be either simple fuzzy (only one condition) or compound fuzzy (more than one condition joint with either AND or OR operators).

The Proposed System
As illustrated in Figure 1 the design of CPFC has two main subsystems, the Fuzzy-Otology Detector and the Crisp-Ontology Advisor.

Fuzzy-Ontology Detector
The aim of designing the Fuzzy-Ontology Detector is to emphasize the fuzzy information entered by the user in order to detect the cause of CP.To detect the cause of CP, there are several factors need to be examined and the interactions between them as well.This feature represents the level of pain while the patient is doing an activity, which indicates a lung or muscles disease.

Pain frequency
Very little

High
Very high The number of times the pain appears in the past 24 hours.While "Very little" represents (frequency= 1 time), "Little" represents (1 times < frequency < 3 times), "High" represents (3 times < frequency < 5 minutes), and "Very long" represents (frequency >5 times).Represent the type of coughing if exist.

Fuzzifier
The fuzzifier part of the detector aims to infer the Membership Function ( ) of the input variables.The most common are triangular and trapezoidal.To infer the for each input variable ( ), the values of upper and lower limits (a and b respectively) should be specified.The triangular is calculated as follows (Zadeh, 1965): Where m is a value such that < < .
While trapezoidal is calculated as follows (Zadeh, 1965):  All the fuzzy variables were decided after several interviews with the specialists in the field.Notice that some of the entries in Table 1 have binary fuzzy values since they are important enough to provide a great support in the diagnosing process and the specialists preferred for these values to be either the patient has the sign or not. Figure 5 shows the membership function of "Sweating" factor as an example of binary fuzzy values.
Figure 5. Membership Function of "Sweating" factor

Fuzzy-OWL Rules
Based on the fuzzy values obtained from the fuzzifier, the OWL rules were built based on the knowledge collected from the specialist in the field and books.The rules are of the structure (IF antecedent(s) THEN consequent) where the antecedents are the symptoms and signs entered by the user and the consequent is the suggested cause of CP. Figure 6 lists part of the rules used in the reasoning process.

Fuzzy Classes and Properties
By using Protégé, the classes (concepts), data properties, object properties, and individuals were designed.FUZZY OWL2 plug-in was used to generate the fuzzy values as shown in Figure 7.
The reasoning process to find the fuzzy output were based on Mamdani inference technique (Mamdani and Assilian, 1975).According to this technique, the strength of the rule ( ) should be calculated first depending on the antecedents connected by AND operator, since SWRL structure does not allow using OR operator.This process is done by finding the minimum among the connected antecedents, as follows: is the strength of rule(i) that has antecedents according to a specific instance .

Defuzzifier
It is the process where crisp output should be obtained.This design of this stage was a continuing of implementing Mamdani inference technique.It was done by finding the aggregation of all the implemented rules according to a given instance ( ) based on finding the centre of gravity (COG) of , as follows: Figure 8 shows an example of two rules (Rulr-1, and Rule-2) with two antecedents for each rule and an instance ( ).

Crisp-Ontology Advisor
The main aim of this stage is to recommend a treatment for the diagnosed disease in the first stage.It consists of two parts:

Crisp Concepts
The classes had been designed using Protégé, each of which has accompanied with the appropriate data properties, object properties, and individuals.The relationships between these classes and their properties were set as well.Figure 9 illustrates he designed cases and emphasises their relations.

Crisp SWRL
The required rules were selected from books and during interviews with specialists in the field.The set of rules has the ability to recommend the required treatment, medicine, surgery, or even changing the patient's life style if necessary.The rules can calculate the optimum patient's weight according to her height, by using swrlb supporting functions, and provide suggestions accordingly.Figure 10

System Evaluation
CPFC were submitted to be run by 55 patients suffering from CP and their conditions were discusses with the specialists in the field to evaluate the performance of the system.Several techniques were used to calculate the performance of the CPFC.The first one was by calculating the area under the curve (AUC) of Receiver Operating Characteristics (ROC) graph (Fawcett, 2004).AUC reflects the percentage of correct classification and its value ranged between 1, indicating optimum classification of all cases, and 0, indicating completely random classifications.Keep in mind that no realistic system should have AUC value less than 0.5 representing 50% random classification (Fawcett, 2004).
ROC graph can be obtained by finding the sensitivity and specificity of the system based on the following equations:

=
(5) Where TP and TN are the correctly identified the tested cases to be either a patient or a healthy person respectively, FP and FN are represent the incorrect identifications of a person to be either a patient or a healthy person respectively.
Depending on the tested data, the AUC value of CPFC was 0.8421.This means that the system is trustable and dependable.The sensitivity is the ability of the system to correctly identify the patient's case and it is equal to 0.941 for the tested cases.On the other had specificity refers to the ability of the system to correctly identify the healthy people and it is equal to 0.75.
Another important factor in evaluating CPFC is the comparison between the performance of the system and the opinion of the specialists.To do so, we choose Cohen's Kappa coefficient (Smeeton, 1985) which measures the agreement between two raters as follows: Recommendations Diagnosed Disease Useful facts

Figure 1 .
Figure 1.The structure of CPFC the level of pain while the patient is not doing any activities,

Figure 4 .
Figure 4. Membership Function of CP cause

Figure 6 .
Figure 6.Sample of Fuzzy-SWRL rules used in the detecting stage

Figure
Figure 7. FUZZY OWL2 plug-in on Protégé

Figure 8 .
Figure 8.An example of two rules aggregation according to Mamdani inference technique lists part of the designed rules.

Figure 10 .
Figure 10.Sample of Crisp-SWRL rules used in the Advisor stage

Figure 11 .
Figure 11.The designed GUI showing the inferred recommendations

Table 1
lists the main factors that are related to CP accompanied with their linguistic and fuzzy values.

Table 1 .
Linguistic values, fuzzy variables, and description of CP factors