Expert System Diagnosis of Urinary System Diseases using Forward Chaining and Dempster Shafer

Expert system is a computer system that can adopt human knowledge into a computer. Expert system can be used to solve problems commonly performed by experts, one of them is the diagnosis of urinary system diseases. Expert system for the diagnosis of the urinary system disease especially for the inflammation of the bladder and these pyelonephritis using the forward chaining and the dempster shafer method. Forward chaining is used to diagnose disease based on the rules and the dempster shafer is used to determine the value of confidence. The goal is to build an expert system using forward chaining and dempster shafer methods to diagnose early urinary system diseases and to determine the level of accuracy. The data used is the secondary data obtained from the UCI Machine Learning Repository as much as 120 data and 6 attributes. The result of the implementation of the forward chaining and the dempster shafer methods on this expert system of diagnosis of urinary system diseases generates an accuracy value of 87.5%.


INTRODUCTION
The rapid development of information technology has influenced various aspects of human life, even to areas outside of computer science. All aspects of human activity can't be separated from the computers. Expert system is a branch of computer science that can help human performance. This expert system is a sub-field of artificial intelligence. Artificial intelligence is part of computer science that makes the machine (computer) can do the job like and as well as the human being [1].
The expert system itself is a system that seeks to adopt human knowledge into a computer designed to solve problems such as an expert [2]. An expert system can help a layman or unskilled person in a particular field to be able to answer questions, solve problems and make decisions made by an expert [3]. The purpose of the expert system is not to replace the human role, but as the material of human knowledge presented in the form of a system to be used by many people [4].
Health is very important for people, but there are many diseases that are delayed because there is no proper diagnosis. The human body consists of several organ systems, one of which is the Urinary system. This Urinary system is a system where the blood screening process is free from substances that are not fertilized by the body and absorb substances needed by the body. Substances that are not needed by this body are dissolved in water and secreted in the form of urine [5]. Because it has an important role in the body, it is necessary to maintain the health of the organs in the urinary system and recognize the symptoms of the urinary system disease, so that if there is a problem can be addressed immediately. Urinary system diseases such as cystitis and pyelonephritis are included in this type of inflammation.
The methods that can be used to build expert systems are forward chaining and dempster shafer. The forward chaining method works by processing the fact that the user has inputted and matched all of the facts with the IF section of the IF-THEN rule, if there is a true value fact then it is executed [6]. While the theory of dempster shafer is a mathematical theory to prove belief function and plausible reasoning used to combine separate pieces of information and calculate the possibility of an event [7].
Based on the explanation above, the aim of this research is to implement forward chaining and dempster shafer methods on the expert system for diagnosis of urinary system diseases and to know their accuracy in diagnosing urinary system diseases.

Forward Chaining
Forward chaining is a chain that is sought or crossed from a matter to obtain a solution with reasoning from the fact to the conclusion that there is a fact. Forward chaining is a method of withdrawal of conclusions based on the data or facts that go to the conclusion, the search starts from the fact that is moving forward through the premises to the conclusion [8]. Forward chaining is one of the most commonly used inference techniques. In this technique the data is used as a deciding or which rule to run, then the rule is executed [9].
Forward chaining basically has 3 stages of working way, the first step is to select the rules to be examined and then the rules are evaluated by matching the condition part of the first rule, if the conditions in the first rule are appropriate, then the rule added to the conflict set. Add a rule if there are rules that match the facts in the condition section. The second step is to select one or more rules from all the rules that have been added in the conflict set to be executed, which is usually called a conflict resolution. The last step is the execution of the selected rule. Rules that are executed are rules that originate from conflict resolution results. The rules that have been executed become the result/final conclusion of the existing facts that have been matched by the rules in the condition section [10]. Flowchart of forward chaining method shown in Figure 1.

Dempster Shafer
The theory of the dempster shafer can be interpreted as a common form of probability theory, where the probability of being used for a set of data is not for a single data [11]. The theory of dempster shafer is the representation, combination and propagation of uncertainty which have some characteristic intuitive in accordance with thinking an expert, but a strong mathematical basis [12]. There is a wide range of reasoning with a complete and very consistent model, but in fact many problems can't be solved in a complete and consistent manner. These inconsistencies resulted from the addition of new facts. To overcome such inconsistencies can use reasoning with the theory of dempster shafer. In general the theory of the dempster shafer is written in an interval of Belief, Plausibility [13]. Belief (Bel) is a measure of the power of evidence in favor of a set of propositions. If a value of 0 (zero) indicates that there is no evidence, and if a value of 1 indicates a certainty or plausibility (Pls). The belief function is shown in Equation 1.
While the Plausibility is narrated in Equation 2 as follows.
Plausibility is also worth 0 to 1, if we are sure X ' then it says Bel (X ') = 1, so from the formula above the value Pls (X) = 0.
In an expert system for one disease, there is some evidence that will be used in the uncertainty factor in decision-making for the diagnosis of an illness. To overcome some of these evidence in the dempster shafer theory used a rule known as the dempster's rule of combination. In general, the formulation for the dempster's rule of combination is narrated in Equation 3 So it can be formulated in Equation 5.
Flowchart of dempster shafer method shown in Figure 2.

Data Collection
In this study, data was obtained from the UCI Machine Learning Repository. This data contains data on urinary diseases including inflammation and variables already described in the dataset. This dataset consists of 120 records and 6 attributes.

Interviews
Interview is needed to find related data from a trusted resource in this case is an internal medicine specialist, as an expert in the health sector. From interviews with experts obtained weights from each symptom. The weight data of each symptom is shown in Table 1. The weight value of each symptom is used to perform calculations using dempster shafer method. From the results of interviews and data retrieval, the knowledge base is determined in the form of relationship or relation between symptoms and disease, shown in Table 2. The existing knowledge base is then compiled to form a rule base. The rule base is shown in Table 3. In Table 3, the rule base between symptoms and diagnosis there are 2 diagnosis of diseases and 6 symptoms. In R1 there are 3 symptoms as a symptom of P01, namely G04, G05, G06. In R2 there are 3 symptoms as a symptom of P02, i.e. G01, G02, G03. 1). Search using forward chaining method Description of patients with symptoms of body temperature 37.8 ° C (no fever), continuous urination, micturition pains and feeling burned at the time of urination, itching, swelling of the urethra. The patient's data is matched with G04, G05, G06 conditions. The forward chaining search process is shown in Table 4. Based on the search in Table 4, there is a conclusion to the diagnosis of the disease suffered by the patient is inflammation of the bladder (cystitis) (P01).

Calculation Method
2). Calculation using dempster shafer method After the forward chaining search, further calculation of the dempster shafer is based on the symptoms and weights. The process of calculation of the dempster shafer based on the searches done above is: a. Continuous urination with a probability value of 0.9 (Table 1). These symptoms are inflammation of the bladder (cystitis) (P01).
When the micturition pains appears, so it should be done counting new density to determine the combination (M3). To facilitate calculation, the set of formed parts is inserted in the table. The first column is populated with the first symptom (M1), while the first line is populated with the second symptom (m2). So the M3 is obtained as a result of a combination of M1 and M2, which can be seen in Table 5.  The emergence of the third symptom of a burning sensation at the time of urination, itching, swelling of the urethra, it should be performed a new density calculation for the combination (M5). So that the M5 value is obtained as a result of the M3 and M4 combinations, the process can be seen in Table 6.  Based on the three symptoms, the possible diagnosis of the disease is inflammation of the bladder (cystitis) (P01) with a conviction rate of 0.997 or 99%.

Testing
Testing the system's accuracy value is done by comparing the accuracy of the final result of the possible types of urinary system diseases generated by the system with the data obtained from the dataset. The calculation of accuracy is as follows.

CONCLUSION
The expert system of diagnosis of urinary system diseases with forward chaining and dempster shafer method is built using the PHP programming language Laravel Framework and MySQL database. The construction of this expert system uses waterfall model method. The first step of the need analysis, namely by analyzing what the user can exploit from the system. The next stage is design, by designing ERD, interface, database table structure and database schema. The third stage is implementation, starting coding by realizing the results of needs analysis and system design. The final step is testing, by conducting the function of the system as whether it is expected or not. The level of system accuracy is determined by implementing 72 data into the system. From the experiment, obtained as much as 63 data is expressed accordingly between the results of t he dataset with the results of system diagnosis and 9 data is declared inappropriate so that the system's accuracy level is 87.5%.