Expert System of Detection Defisiensi Imun Uses K-Nearest Neighbor Method

−Immune deficiency is a collection of various diseases which, due to having one or more immune system abnormalities and impairing the functioning of the immune system that are decreasing or not functioning properly, with this condition the susceptibility to infection increases. This disease is mostly suffered by children, this is because the immune system changes in children who have not been able to deal with immune attenuation attacks. For now the number of children who do not get early treatment properly, this is due to a lack of public knowledge about this skin inflammatory disease. Looking at the problems that have been raised, it is necessary to build an Expert System that is able to move expert knowledge into a system of consultation services to detect Immunodeficiency Disease based on clinical symptoms experienced by applying the K-Nearest Neighbor method which functions to process knowledge so that can conclude disease probabilities that refer to the state of the previous diagnosis to be used as an initial diagnostic analysis.


INTRODUCTION
Immunodeficiency disease is a disease caused by disruption of the immune system which results in infection of the skin.This disease generally affects children, this can cause disruption to the health of the skin which can later impact on immune attenuation in children, but at this time the lack of public knowledge in identifying skin inflammation, this can cause obstruction of treatment in children suffering from the disease skin inflammation.
Based on the problems that have been raised, it is necessary to develop an Expert System that is able to acquire expert knowledge into the system so as to be able to detect skin inflammatory diseases in children based on clinical symptoms experienced by children who are likely to suffer from skin inflammatory diseases with the development of Expert Systems.
The Expert System is part of an artificial intelligence group that has special abilities in analyzing existing problems [1].In other studies [2], it was explained that expert systems are the development of intelligent application-based systems.Another opinion that shows in [3] that the Expert System is the result of expert knowledge and search techniques.Another definition in [4] which states the Expert System is applied to solve problems and draw conclusions on the basis of expert knowledge.In other references [5], it is argued that the Expert System is a part of artificial intelligence that can be used in diagnosing system damage and as a problem solver.
The use of the Expert System has been widely used in various fields, one of which is the application of an expert system to detect milkfish containing formalin [6].In addition, the application of the Expert System is also used to diagnose damage to CISCO hardware using Forward Chaining inference techniques [7].In another study mentioned [8], that the Expert System was also used to diagnose disease in children under five years using the Forward Chaining method.
Expert System Implementation has been used in diagnosing diseases related to the body's digestive system and natural treatment [9].Then the development of expert systems has also been implemented and used to treat fractures [10], in addition to [11] the Expert System is used to diagnose cat skin diseases by applying the Forward Chaining method.[12] stated that the Expert System can also be used to diagnose Immune Dermatitis, risk based on lifestyle with fuzzy Mamdani [13].
In this Expert System, it will apply the K-Nearest Neighbor method which adopts the Case Base Reasoning analysis approach that has differences with the methods used in previous research using Reasoning Rule Base analysis.
The K-Nearest Neighbor method is a method that generates conclusions and resolves problems by approaching the previous case so that later will produce conclusions that are in accordance with the previous case.
The application of the K-Nearest Neighbor method has been used in [14] to predict the days that often serve dengue fever patients, in addition to [15] the K-Nearest Neighbor method is used for facial recognition systems and in other studies [16] the K-Nearest Neighbor is implemented to classify breast cancer.
With the Expert System to be designed, later it can be used as a consultation service to help diagnose skin inflammatory diseases based on clinical symptoms that exist in pediatric patients, so that it can be known quickly and accurately the skin inflammatory disease experienced by these pediatric patients with apply the K-Nearest Neighbor method.
This system can also be used in early diagnosis conclusions before conducting intensive laboratory examinations and as an early service to patients who are likely to suffer from Immunodeficiency.

Expert System
Expert System is a scientific concept that has often been used in terms of producing accurate diagnostic conclusions [17].Expert systems are explained to be used in generating conclusions, in addition to that [18]describing Expert Systems or ES is a field of science that is able to make predictions and analyzes of uncertainty or likelihood problems.

K-Nearest Neighbor
In [16] explained that K-Nearest Neighbor is a method that produces conclusions and problem solving by approaching the previous case, so that later it will produce conclusions in accordance with the previous case based on the level of similarity of the list of causes experienced by the new case.The following is the equation function of the K-Nearest Neighbor: (1)

Defisiensi Imun
The immune system aims to defend the body against influences and attacks from outside that will disrupt the body's normal balance.Therefore, damage to the immune system will affect the defense function and homeotastic and will cause various diseases, which are called immune deficiency diseases.Immune deficiency disease is a collection of various diseases due to having one or more immune system abnormalities, where the susceptibility to infection increases [19].

RESULT AND DISCUSSION
This study takes diagnostic data on public service websites that detect symptoms of disease with Certainty Factors [16].The disease and symptoms data are obtained through consultation with experts in the field of pediatric medicine.
This study applies a research method in the form of Reserch and Development which aims to produce a new product in the form of software, which can later be applied to diagnose Immune Deficiency through the symptoms traced to patients using K-Nearest Neighbor.
In addition this research has a framework that includes gathering knowledge base, data collection of cases that occur, doing a search using K-Nearest Neighbor case approach techniques, then comparing the results obtained to determine cases that have a better level of closeness among other cases.

Knowladge Base
In building a system that is able to produce information related to detection or diagnosis in the form of consulting services, it is necessary to establish a knowledge base that contains symptom data on types of Immune Deficiency disease and a list of diagnoses that have been made previously.In Immunodeficiency Disease consists of Transient hypogammaglobulinemia of infancy, X-Linked agammaglobulinemia, and Hyper-IgM antibody deficiency.
This knowledge base will be applied to the consultation service system and serves to help diagnose through the process of tracking the conditions and cases that have been acquired.The following is the result of gathering a knowledge base that contains symptom data, disease data, and weight data.

Implementation of K-Nearest Neighbor
After obtaining the data of patients affected by skin inflammatory diseases in children, then the next process is to do a search with a case approach technique using the K-Nearest Neighbor method that the nation will produce conclusions and solve problems by approaching the previous case, so that later will produce the appropriate conclusions with the previous case.
Then test the new case with the old case to get the closeness value that will later be used to find the search conclusion.If the symptoms in the old case with the same eat the weight value of 1 and if not then the value is 0.
For example, there are new cases of patients suffering from food allergies, eczema and asthma with a diagnosis code D098, so it can be tested with the case D026: Furthermore, the D098 case will be tested with the D019 case: Furthermore, the D098 case will be tested with the D012 case: Furthermore, the D098 case will be tested with the D078 case: Based on the calculations that have been made, the next process is to determine the greatest value of closeness among the cases, then for a new case with a diagnosis code D098 diagnosed with Transient Disease Hypogammaglobulinaemia with a level of 0.77 in the D078 case

IMPLEMENTATION
The Expert System in this case is designed to have 2 pages, namely the main page that is generally used by users to access consulting services, then there is an administrator page or expertise that can later be used by experts to manage the knowledge base related to Immune Deficiency.The following is a display of the system that has been provided to detect Immune Deficiency disease using the K-Nearest Neighbor method.

Diagnosis Service
The main page is the beginning page of the Expert System to diagnose Immune Deficiency disease that will be seen when the website is opened, this system can be run through the website page.
Diagnosis process can be done by entering the patient's identity first on the diagnosis menu, the following is the display of patient data.

Figure 1. Display of Patient Data
Patient data pages are used to manage patient data that will be consulted, containing data about the patient's name, date of birth, gender and address.After completing the stages of filling in patient data, the next process is to register to be able to choose the symptoms suffered by the patient.
Furthermore, the process of selecting symptoms is done by selecting (checklist) the symptoms that are in the patient so that later can be diagnosed with these symptoms, here is a display of symptoms selection.After carrying out the process of entering the symptoms that occur in pediatric patients, then the search process is carried out on the symptoms chosen to find the Immune Deficiency disease by applying the K-Nearest Neighbor calculation to determine the value of certain of the type of Immune Deficiency, the following is the appearance of the diagnosis Immune Deficiency

Expertise Page
Expert page is a page that can only be accessed by experts and administrators who already have the authority and rights that function to manage expert knowledge to the computer regarding Immune Deficiency, the following is a page view of expertise data including patient data processing, disease data processing, symptom data processing, processing base rules, and administrator password authorization.Inside the expertise page, there is a patient list page that displays the number and identity of patients who have consulted with the services provided, the following is a page of patient data : In addition to the plaque page, there is a disease data page provided for doctors or experts who function in managing data on types of Immune Deficiency in children, the following is a display of disease data pages : Disease data pages consist of disease codes, disease names and data processing such as additions, data changes and deletion of existing disease data, disease data that has been entered into the system include: Transient hypogammaglobulinemia of infancy, X-Linked agammaglobulinemia, and Hyper-IgM antibodies deficiency.
Furthermore, there is a symptom data page provided for doctors or administrators who function in managing the symptoms that are likely to be indicated by Immunodeficiency Disease in children.The symptom data page consists of symptom codes, names of symptoms and data processing such as additions, data changes and deletion of existing symptom data, symptom data that has been included includes clinical symptoms commonly suffered by children, such as: Asthma, Eczema, Food Allergies , Chronic Diarrhea, Rhinitis, Bronchial Infection, Sinusitis, Sepsis, Pyoderma, Conjunctivitis, Meningitis, Malabsorption, Opportunistic Infections, and Pneumonia.These symptoms are obtained from experts or experts in the health field or who are involved in the pediatric world, here is a display of symptom data : The IJICS | Puji Sari Ramadhan | http://ejurnal.stmik-budidarma.ac.id/index.php/ijicsThen in this system has a bases rule page provided for administrators to manage a rule base that functions to form a rule based on the continuity between symptom data with the possibility of indicated Immune Deficiency along with the level of expert certainty about the disease, the following is the display of data from the rule base The rule base page consists of symptom codes, disease codes and data processing such as additions, data changes and deletion of existing rule bases, so that later can form rules or rules that are contained or possessed in the knowledge that has been obtained from expertise data, so that later this system can be used continuously according to the development of knowledge of Immune Deficiency which generally occurs in children.

CONCLUSION
Based on the application of the K-Nearest Neighbor method that has been carried out in this study for the case of detection of Immune Deficiency, it is concluded that the K-Nearest Neighbor method has been tested and has successfully performed a diagnostic analysis of Immune Deficiency disease by approaching the previous cases so that it will produce a possible value of the similarity of patients with patients suffering from previous Immune Deficiency.With this result, the K-Nearest Neighbor method can be used to optimize the consultation service system using existing methods that have been used to get more accurate.

Figure 2 .
Figure 2. Display of Symptoms Selection

Figure 3 .
Figure 3. Display of Diagnosis Result

Figure 4 .
Figure 4. Display of LoginBefore entering the expertise page, the admin or expert login.After the username and password have been validated, the following page will appear on the expertise page:

Figure 5 .
Figure 5. Display of Expertise

Figure 6 .
Figure 6.Display of Patient Data

Figure 7 .
Figure 7. Display of Disease Data

Figure 8 .
Figure 8. Display of Symptom Data

Figure 9 .
Figure 9. Display of Data From The Rule Base

Table 1 .
List of Knowledge BaseNext, collecting a list of cases containing patient data along with the symptoms experienced and the illness suffered by these patients who have consulted on diagnostic services by taking data samples of 5 patients randomly.