The Development of Integrated Medical Expert System for Diabetes Mellitus Patient

– Diabetes Mellitus (DM) is a degenerative disease that has many causative factors. DM patients cannot recover completely but they can maintain the stability of their glucose level by following a healthy lifestyle. The goal of this research is to make an integrated system for people to promote a healthy lifestyle. This system also allows people to monitor the changes in their daily health conditions regularly. Main features in this system diagnose, treatment, guidelines for a healthy lifestyle, including a feature for counting and saving daily calorie consumption and physical activity. The system using the backward inference method to get the conclusion from a set of rules in the knowledge base. The verification using a query, validation with using recall and precision, and usability testing using a questionnaire, was conducted to test the performance of the system. The result of the testing shows that the system gives a good response to all queries given and the user also satisfied with the system. The recall value is 1 with the precision is 0.658. This precision value also promotes the inference process used in the system, which every user will suspect has DM when they start to use the diagnose feature.


INTRODUCTION
Diabetes mellitus is a metabolism disorder that marked by body disabilities to control glucose level in the blood. It is a chronic disease known as silent killer disease. At the earlier stage, the disease is almost unnoticeable. Over time, it is difficult to control and may lead to death [1]- [5]. The number of diabetes mellitus patient gradually increases in the worldwide, especially in developing country including Indonesia. Indonesia was predicted to be the forth country with the largest number of diabetes mellitus patients in the world. There would be an enhancement of 8.4 million patients in 2000 to 21.3 million in 2030 [3].
Diabetes care is complex. It needs continuity of care characterized by a consistent approach to the clinical management that is used to make current care appropriate for each patient. The patients should receive regular basis treatment to reduce risk of serious even life-threatening complications. The clinical management should be responsive to the changing of patient needs and informational continuity including diet pattern, physical exercise, medicine, and lifestyle [6]- [8]. Due to its complexity, an integrated effort is needed to prevent as well as to give advice about proper treatment for patients with diabetes mellitus or for patients that potentially have diabetes mellitus.
The growing case of diabetes mellitus in the world, including in Indonesia encourages many parties to use technology in the form of computer application. Computer application for diabetes mellitus patients often called as intelligent system or expert system. Expert system facilitates acquired knowledge and information from many experts in diabetes mellitus domain which is expected to help suppress the number of diabetes mellitus patients through the establishment of self-awareness in their community [3] [9] [10]. As the result, the patients may have early accurate detection and receive proper treatment guidelines to prevent complications [11] [12]. In addition, an expert system allows to support online and offline patients [3] [10] [13]- [15].
The utilization of expert system in diabetes mellitus domain offers several advantages either for patient or for doctor/professional health care. Simplicity, low cost, and availability are the advantages for patients. On the doctor/professional health care's side, it helps in organizing patient's data and accelerate in searching patient's data. In addition, the application also helps the communication process between doctor and outpatients. The ease of communication also enables doctor to monitor outpatient's condition [9] [10] [14]- [16].
Expert system for diabetic patients must provide main features which offer diagnose, prevention, and treatment. Most research results showed that diabetes mellitus patient tend to use the feature of diet, physical exercise, tracking glucose, medical advice, and Graphical User Interface (GUI). Those main features cover the guidance and monitor diet, physical activity, medicine, glucose level, therapeutic, and emergency service [1] [7] [13] [17]- [19]. The need for main features in one integrated system for diabetes mellitus become a very serious aspect to help overcome the increasing number of diabetes mellitus patients. Unfortunately, to the best of our knowledge, none of expert system provide those main features needed by the patients based on their preferences [2] [3] [20]. This condition become a problem that will be solved through this study. The goal of this study is to proposes a prototype of integrated medical expert system to promote a healthy lifestyle. The originality of the study is on the development process of the integrated medical expert system which covers five main features and the relationship among features to support the inference mechanism in the diagnostic feature. The availability of five main features in one integrated system that covers diet, physical exercise, primary or secondary metrics, and other factors for diagnosing the possibility of diabetes mellitus become the novelty of this study. The contribution of this study relies on the possibility to facilitate the community with an accessible integrated medical expert system that can support a healthy lifestyle.

METHODOLOGY
The proposed integrated computer application offered features for diagnose, prevention, and treatment. The integrated expert system was developed in 5 stages i.e. Problem Identification, Source of Knowledge Exploration, Knowledge Acquisition, Knowledge Representation, and Implementation as visualized in Figure 1

Problem Identification
The main objective is to identify what issue(s) the user supposes the system to deal with them and what their real demands are including the entire parameter and acceptable final solutions for the issues by investigating the inadequacy of the current systems and specify how to make enhancement. Those problems must be relevant for expert system to figure out them.

Source of Knowledge Exploration
The identified problems lead to the exploration of knowledge sources from experts, field data, algorithm and literature. Finding a human expert (persuading him/her to cooperate) is crucial as the knowledge might use in solving problems in a given issue domain. The knowledge is a consolidation of a theoretical intellidence in the given domain and the effective accumulation of heuristic problem-solving rules. The field data, algorithm and literature is also important to discover the development needs of the current expert system. Furthermore, to ensure the developed system is acceptable in term of user response time, solution, representation of the knowledge base.

Knowledge Acquisition
This phase involved sources of knowledge exploration. This study using tacit and explicit knowledge. The tacit knowledge was obtained from doctors in a private hospital in Jakarta. The explicit knowledge is broadly shared and it can be generally obtained from books, articles, and journals. We gathered the explicit knowledge from books which were published by American Diabetes Association and by Perhimpunan Dokter Spesialis Penyakit Dalam Indonesia (PAPDI).
The method to obtain tacit knowledge was direct interview. The interview was conducted several times to get a clear insight into diabetic. Intensive study of scientific materials including articles and textbooks were performed to be familiar with the current technology in use for diabetes mellitus. The truth of the knowledge was then verified by involving the doctor as a tester. The acquired knowledge was then formulated into a deep and comprehensive knowledge to represent knowledgebased.

Knowledge Representation
There are two stages to represent the knowledge; Knowledge Base and Inference Engine.

Knowledge Base
The acquired knowledge from a participating expert was used to develop a model for representing the knowledge. A set amount of techniques for handling information in the knowledge-base are available; however, our study utilizes rule-based approaches. The knowledge can be formulated as shown in the following simple statements:

Inference Engine
Inference engine manipulates the stored information in the knowledge base in order to form a line of reasoning using a search pattern technique. This engine is built into program modules according to the problem-solving designed method.
The system uses backward chaining inference methods since the goal of the system should seem to behave like a human expert who ask focused and logical sequence of questions to the user. The process starts with the goal or conclusion (user positively has diabetes mellitus type) then the system ask for the user the sequence of questions to collect facts about their real condition. The system then checks those facts to prove if the goal is proven or not.

Implementation
The phase of implementation comprised two stages; development and evaluation

System Development
The system is developed using PHP and MySQL for programming language and database respectively. The system was developed to give selfmanagement for diabetic patients [2] [5] [7] [8] [15]. The diagram of the proposed system is visualized in Figure 2 System provided main features for diagnose, treatment, and prevention which is able to be used either for non-diabetic or for diabetic user such as daily calorie intake calculator, scheme of healthy eating, total calories in during the day, types of physical activity, and glycemic control as described below.

Daily Calorie Intake Calculator
This feature presents the recommended daily calorie intake for users which works based on the age, height, weight, gender, type of daily physical activity, and current condition (pregnancy and diabetic/nondiabetic) of the user. The feature benefits the user to control ideal body weight. If the body weight is ideal, non-diabetic user has less potential to have diabetes mellitus disease in the future than one who has non-ideal body weight. The diabetic user must control the body weight in order to drop the chance of getting worse. In addition, the system provides food calories list and user is able to count easily the calories in during the day. It benefits the user to keep on the track of the needed daily calorie.

Guidance of Healthy Eating Style
The feature gives assistance to the user about rules of thumb for everyday eating such as the portion of carbs, fat, and protein. In addition, eating schedule is also supplied by the feature to limit the complications of diabetes.

Types of Physical Activity
Feature gives appraisal for the type and duration of activity entered by the user. It helps to keep the user healthy and preventing the long-term complication of diabetes.

Glycemic Control
User have to enter the result of lab test to know whether the glycemic is under control unless user have done. The input consists of A1C, Postprandial, FPG, triglyceride, blood pressure, and cholesterol. Then, the feature gives appraisal the grade of them. If the user considers in danger, then the feature supplies the prevention. For user who does not have the result of the lab test, feature provides the recommended hospital to do the test.
We present the block diagram to provide explanation about diabetes mellitus domain as shown in Figure 3.

System Evaluation
This phase comprised of verification and validation. The evaluation is important to guarantee the quality of the testing result. We assumed that the more quality the result the loyal the user will be. The long-term effect is the sustainable of the core business of the system [23].
Verification testing involved two types i.e. query entered and usability testing [24]. The prior type is selected to check the logic and syntax error within the code. The system developer will conduct the correction process immediately unless the error found. The latter is considered to collect an assessment from the real user by distributing questionnaire. The task is performed to know how much the system is understood and learned by the user.
Validation is crucial part as confirmation that the performance of the system is close to human expert levels [25]. For that reason, Turing test technique was accomplished to formalize the expert system validation process. Turing test refers to a third-party expert comparing results from an expert system those Both TP/FP and TN/FN refer to the number of Predicted Positives and of Predicted Negatives that were correct/incorrect respectively. Conversely, rp, rn, pp, pn, and fn, tn, tp, fp indicate the marginal and joint probabilities. The amount of each two pairs of marginal probabilities and the four contingency units equal to 1 [28].
Recall reveals only to the +R column and Precision only to the +P row. Neither of these takes into account the number of True Negatives. Those values from contingency table were used to calculate precision and recall using Equations (1) and (2)

RESULTS AND DISCUSSION
We have developed an integrated expert system that combines features for diagnose, prevention, and treatment for diabetes mellitus patients. The function of this features is to control and calculate calories and physical activity, along with diagnosing based on physical symptoms and laboratory result. The features were developed based on research that revealed about the patient preference of existing diabetes mellitus applications, such as food, physical activity, tracking glucose, and some of the important features in diabetes mellitus self-management like saving patient's record and calculating calories based on weight and height [2] [5] [7] [8] [15] [26].
There are three levels of users in this expert system registered user, guest, and administrator. Registered user can input their recent data of laboratory result and physical activity, calculate their calories, and save their diagnose result. Meanwhile, guest only can use diagnose feature without being able to save and input their laboratory result or physical activity. An Administrator is a user that has the responsibility to maintain the system, including to handle the knowledge-based and arrange the questions along with the system's interface. The activity of each user in the system can be shown in Figure 4.
The proposed system has several characteristics for medical expert system, such as applicable to numerous symptoms, the whole symptoms can be used to produce a conclusion or to suggest different diagnosis based on unknown patient's information [27]. There are 36 questions in this system that can be classified into three groups that are: 1. Base questions; Belongs to primary symptoms of diabetes mellitus including polyuria, polydipsia, and polyphagy. Those questions should be answered by the user. 2. Follow Up questions; Follow up the answer of primary symptoms 3. Confirmation questions; State a confirmation about the answers of the user. The input of the system consists of clinical and demographic data [8] [10]. Demographic data including age, gender, and occupation. Clinical data including primary symptoms, the laboratory result, family history, and lifestyle. The output of the system covers the status of the patient (diabetic or nondiabetic), ideal calories needed by the patient, diet plan based on the diagnosis result, obesity level, suggestion to changing lifestyle of the patient, and calculation result of daily calories as well as physical activity. The interfaces of the system shown in Figure  5 and Figure 6. The interfaces of the system shown in Figure 5 and Figure 6.

The Result of Verification
The query-entered testing was performed along with developing process by the system developer. The aim of the testing is to encounter bugs and restore in the system so that the developer can fix the bug before it is used by the patient.
We also have performed the usability testing to obtain opinion of user concerning proposed expert system. The usability testing was operated in December 2016 and June 2017 with 86 participants in total. They should complete the questionnaire straightforwardly after having an opportunity to use the system. Figure 7 shows the summary of the usability testing. The x-axis means the level of contentment of the system with number 1 and 5 implies user is not satisfied and very satisfied with the system respectively.
The system evaluation was conducted through the comparison of output of the system and opinion of the expert. By employing 10 cases for testing and found that output of the system is perfectly similar with the opinion of expert.

The Result of Validation
The system was developed by classifying the cases into two classes, healthy and unhealthy which specify diabetic and non-diabetic patient. Unexpectedly, the third-party was analyzed them into four cases; healthy, potential, at risk, and unhealthy. The adjustment worked as follows: First, the symptoms of the cases belongs to unhealthy class were analyzed. For example, case 1 labeled as unhealthy patient as extreme hunger, frequent urination especially at night, increased thirst, slow-healing sores and paraesthesia (medical term). The user (case 2) had only the first four of the symptoms in case 1 except paraesthesia. As evaluated, there are 12 most common symptoms in 4 states. List of symptom and number according to it displays in table 2. Slow-healing sores 7 paraesthesia 8 Itching at genital areas 9 Don't have control to sweet food 10 history of diabetes 11 Family history of diabetes 12 Family history of hyperthension Next, we calculated the total cases for each symptoms in each diabetes state. Total cases for healthy, unhealthy, potential, and at risk class are described in table 3 -6. Table 3. Healthy Class  As described in table there are 5 over 12 most common symptoms have been considering to judge whether a patient is healthy and each symptom has same level of case. For that reason, we perform same deal with entire signs and consider them as healthy class. Table 4: Overall, there are 17 cases which stated that extreme hunger as the common sign of diabetes, followed by increased thirst and slow-healing sores with the equal number at 15. Fourteen cases have sign of frequent urination at night. In addition, there are 3 signs with six cases i.e. paraesthesia, category of body weight and having history of diabetes. The provided table shows the least case (3 cases) indicated that itching at genital areas are unpopular sign for diabetic patients. We manage top 3 symptoms to criticize unhealthy or diabetes cases.
It is clear from the table 5 that the most frequent sign is increased thirst with 18 cases, with extreme hunger and frequent urination second and third respectively. The least number with body weight and itching at genital areas as potential state syndrome has 2 cases. We analyze first to third rank symptom for potential class is similar as symptom of people with diabetes mellitus as shown in table 4. Accordingly, we categorize them as unhealthy class. Table 6 states that two dominant symptoms namely 'increased thirst' and 'paraesthesia' have equal number of case at 2. The second rank is body weight and the remaining signs have equivalent level. We consider to take top 3 number of case (3, 5 and 7) to evaluate whether problems at risk class should be labelled as unhealthy or healthy class.

No
Total Case  3  1  4  1  6  1  11  1  12 1 Third, recalculate total case after adjusting case in each diabetes state. The result of calculation is represented in Table 7. As observed in Table 7, total case of True Positive, False Negative, False Positive, True Negative is 27, 0, 14 and 4 cases, respectively. The validation result is constructed on Precision and Recall with 0.658 and 1 respectively. Recall is going up just because you have less false negatives. According table 7, our developed system classified as "diabetes", many of them was in the set of actual "diabetes", however a lot of them were also "not diabetes".

Conclusion
In this study, an integrated expert system for diabetes mellitus patient is established. The system focused on self-management for diabetes mellitus patient which can be accessed either in browser or in communication media. The system comprised features for diagnose, prevention, and treatment of diabetes mellitus such as daily calorie intake calculator, scheme of healthy eating, total calories in during the day, types of physical activity, and glycemic control. User is able to monitor the health status continuously since the system saved the previous results. The testing result showed that the output of the system is perfectly similar to the opinion of the expert. The user also satisfied with the system in terms of interface and functionality. The Recall and Precision value are 1 and 0.658, shows in line with the backward inference method where each user is suspected has diabetes mellitus.
The limitation of this work is related to the number of experts used in the validation result. The user also cannot change the menu choice and the types of physical activity provided in the recording feature. For future work is suggested to conduct more complex validation testing not just depend on the recall and precision only. Addition of the complex learning algorithm also can be used to get better performance.