Implementation of Expert System to Diagnose Pregnancy Disorders using Fuzzy Expert System Method

ABSTRACT

The process of problem analysis can be carried out by a computer system that has included a knowledge base and a set of rules from an expert, known as an expert system. One of the problems that the expert system can solve is to diagnose pregnancy disorders. This study aims to determine how to design an expert system by adopting a doctor's expertise with the fuzzy expert system method. The data used in this study were 46 data obtained from the medical records from Tugurejo Hospital in Semarang City. The variables used were general symptoms and pregnancy disorders. The result of this research is the implementation of the fuzzy expert system to diagnose pregnancy disorders. The level of system accuracy generated from the scenario of 26 data as training data and 20 data as test data is equal to 95%. stands for Personal Home Page, which is the standard language used in the world of websites. PHP is a programming language in the form of a script placed on a web server (Peranginangin, 2006). Building a web-based system would require a database to store the data in the system (Pramesti, Arifudin, & Sugiharti, 2016). Apart from using PHP as a programming language, this pregnancy diagnosis system also utilizes the Laravel framework. Laravel is an MVC (Model-View-Controller) framework with bundles, migration, and Artisan CLI (Command-Line Interface) (Gunawan, Lawi, & Adnan, 2016). Pregnancy is a normal function of the body and part of a woman's life phase (Ashari, 2015).
Based on the description above, this study aims to implement an expert system to diagnose pregnancy disorders using the fuzzy expert system method and determine accuracy in diagnosing pregnancy disorders.

Fuzzy Expert System
A fuzzy expert system is a computer program that provides an expert in providing solutions using a fuzzy logic knowledge base (Prasetiya & Irawan, 2012). The fuzzy expert system has characteristics compared to other expert systems, wherein this fuzzy expert system has a confusion of linguistic assessment (Klir & Yuan, 1995).

Process Design
The steps for designing an expert system process for diagnosing pregnancy disorders are shown in Figure 1.

System Development
The system design is carried out using the Waterfall Model approach. This model is often used by system analysts in general (Roviaji & Muslim, 2017). The waterfall method consists of several stages of the software development process, namely analysis needs, design, implementation, testing, and maintenance (Hardyanto et al., 2017).
1) The requirements analysis phase defines the entire software format, identifies all requirements, and outlines the system being created (Nugroho & Arifudin, 2015). 2) The design stage is application design, including interface design and database structure design (Putra, 2015). Creating an attractive web-based application program must be designed in advance to achieve the results under predetermined goals.
3) The implementation stage is designing software that is realized as a series of programs or program units (Muslim, 2012).
The testing phase is to test whether the system is ready and fit for use. The tester can determine a set of input conditions and perform tests on the functional specifications of the program (Purwinarko & Sukestiyarno, 2015).

Data Collection
The data used in this study are the results of 46 medical records from patients in 2017 who experienced pregnancy disorders at the Tugurejo Regional General Hospital, Semarang. The data used are in the form of symptoms experienced by patients at Tugurejo Hospital and the diagnosis results from the doctor in charge.

Interview
The interview stage was carried out with an obstetrician who was a doctor at the Tugurejo Regional Hospital. The interview data generated from each patient's symptoms with pregnancy disorders, symptoms, and weights are shown in Table 1. Calculation Method

1) Fuzzification
The data testing through fuzzification, based on data presented in Table 1, the weight value based on the variable input and output is divided into one or more sets of fuzzy-like symptoms that can be seen in Figure 3.

Figure 3. Fuzzy set
Data on this fuzzy set can be categorized to describe the level of symptoms experienced by patients, as shown in Table 2. 2) Basic of Rules The basis of the rule is written in the form of if-then (IF-THEN), which can be said to be a two-part implication relationship, namely the premise (if) and the conclusion (then). If the premise part is fulfilled, the decision will also be proper.

3) Rules Component
It is necessary to calculate the fuzzy value based on the symptoms inputted by the patient to determine the type of pregnancy disorder suffered. To find the value of suitability or instance entered by the patient's symptoms are: 1. Rarely abdominal contractions; 2. Sometimes the birth canal bleeds; 3. Occasionally feels pain in the stomach.
Then according to the category values in Table 2, the symptoms entered by patient B= {0,3/a1, 0,6/a2, 0,3/a3}. Then the suitability value is calculated using the following formula: The formula above can be obtained the conformity generated each patient's symptoms inputted to the symptoms that exist in the knowledge-based for each disease that has the symptoms.

4) Defuzzification
After calculating the value of symptoms between symptoms that are inputted with existing knowledge-based symptoms, then the next step is the sum of the pregnancy disorder suitability values, so the fuzzy conditional probability value can be calculated from the data above as follows: From the results obtained from the above calculations, the final results are as follows: P(B, U 1 ) = 0,33 x 100% = 33% For pre-eclampsia pregnancy disorders with low probability. P(B, U 1 ) = 0,33 x 100% = 33% (10) For pregnancy disorders, premature rupture of the membranes and placenta previa with less probability. P(B, U 6 ) = 1 x 100% = 100% (11) For IUFD, pregnancy disorders occur with great possibilities and are accompanied by an explanation or intrauterine fetal death or IUFD is the condition of the fetus died in the womb after 20 weeks gestation. Some cases of IUFD cannot be prevented, but the risk can be reduced by paying attention to the causative factors and taking appropriate preventive steps.

Testing
After testing 46 medical record data from patients at Tugurejo Hospital Semarang, by dividing 26 data as training data and 20 data as test data, the results of the system accuracy were 95%, as can be seen in Table 3. From the test results of 20 test data on 26 training data using the system made, 19 training data is accurate with the diagnosis from the doctor in charge, and one data is inaccurate because the system uses a calculation basis based on strict rules.

Discussion
The system is made using the platform website that dynamically with the framework laravel, making the data in the system can be accessed and modified when there are developments concerning pregnancy interruption following the user's needs. Users can enter symptoms on the website on the diagnosis page. The diagnosis page showed experienced signs that have been selected and will display the diagnosis and calculation results as shown in Figure 4. After the user makes a diagnosis, information on pregnancy disorders will appear based on the symptoms and weights that have been inputted by the user, as can be seen in Figure 5.
https://journal.unnes.ac.id/sju/index.php/jaist jaist@mail.unnes.ac.id Based on testing and implementation of the system, diagnosis of pregnancy disorders using the fuzzy expert system is adequate for diagnosing disorders of pregnancy. The flexibility of a webbased pregnancy disorder diagnosis system can be accessed and operated using a web browser. With the determination of the rule base, the calculation of rule components based on the input of pregnancy disorders symptoms in the medical records of Tugurejo Hospital, and the results of expert diagnosis with an accuracy level of 95%, development still can improve system accuracy. Currently, the system can only diagnose pregnancy disorders, including pre-eclampsia, labor, premature rupture of membranes, placenta previa, blighted ovum, and IUFD (Intrauterine fetal death).

Conclusion
The implementation of the Fuzzy Expert System in diagnosing pregnancy disorders using medical record data from Tugurejo Hospital, Semarang City, has been conducted. The Fuzzy Expert System that has been developed comprises some several stages, namely fuzzification, basis rule, rule component, and defuzzification. After implementing 46 medical record data from Tugurejo Hospital Semarang with a scenario of 26 data as training data and 20 data as test data successfully diagnosed correctly, it can be seen that the system accuracy rate is 95%.