DESIGN AND IMPLEMENTATION OF AN ARTIFICIAL INTELLIGENCE-BASED HEART DISEASE DIAGNOSIS SYSTEM

As one of the deadliest diseases in the world, heart disease requires serious treatment. The weaknesses of providing services for heart disease in Bali Province are that there is no online diagnostic system to make it easier for people to check their health conditions to find out whether they have heart disease. Based on this research, the design and implementation of a web-based online heart disease diagnosis system are carried out. The diagnostic system uses Artificial Intelligence and inputs data from the user based on several questions posed by the system. This research uses Case-Based Reasoning (CBR) algorithm with Design Science Research Methodology (DSRM) and a case study qualitative research method. The test results show that the system designed and implemented can run well and perform accurate diagnostics according to the design and user needs.


INTRODUCTION
Heart disease is one of the degenerative diseases or non-communicable diseases (NCD) that ranks first in developed industrial countries and developing countries, as a disease that causes the highest death globally. Data from the Sanglah Central General Hospital (Rumah Sakit Umum Pusat Sanglah) in Bali shows that data on visits from heart disease patients increased from 2011 to 2020, with an average patient age of 30 to 75 years and the majority being male [1]. Meanwhile, data from the Bali Provincial Health Office (Dinas Kesehatan Provinsi Bali) shows that only around 0.4% of people diagnosed with heart disease have detected heart disease, and the rest are not detected diagnosed by doctors [2]. From this, it can be seen that there are still many people with the potential to experience heart disease that has not been diagnosed, either by doctors through examinations or by self-examination and diagnosis using assistive devices.
The development of Information Technology (IT) allows the creation of a system that can help people diagnose independently and online, so they can find out whether they have potential heart disease or not, along with the level of heart disease experienced. With online self-diagnosis, prevention and treatment can be done earlier. For this reason, in this research, a web-based heart disease diagnosis system using Artificial Intelligence (AI) is proposed. The system was developed using Design Science Research Methodology (DSRM) with AI-based Case-Based Reasoning (CBR) method and case study qualitative research method. The system is also powered by Cloud Computing technology for reliability and availability support. Two research questions are the formulation of the problem in this study, namely: 1.) How to design an online heart disease diagnosis system according to the methodology and method used? 2.) How is the implementation of the system following the design done?
Research on several applications and systems related to Information Technology (IT)based diagnostics has been carried out previously by several researchers using various methods. The system for diagnosing heart disease using the web-based Forward Chaining method has been carried out by [3]- [5]. Then there is also research on a web-based heart disease diagnosis system using the Backward Chaining method [6]. Another method that has also been used related to research on heart disease diagnosis systems is the Certainty Factor method carried out by [7], [8]. Finally, there is the Case-Based Reasoning (CBR) method used by [9]- [11].
Although in the same case study and with the same method, these researches have not used Design Science Research Methodology (DSRM). For this reason, in this research, there is added value and research contribution in the form of using DSRM and Cloud Computing, which are expected to realize better system design, development, and reliability and availability in computer networks.

Design Science Research Methodology (DSRM)
This research uses Design Science Research Methodology (DSRM) introduced by Peffers, Tuunanen, Rothenberger, and Chatterjee, which includes 7 research steps: literature study, research motivation, problem identification, solution design, prototyping, demo, documentation and publication [12]. The literature study was carried out by collecting literature related to the heart disease case in Bali, Indonesia and several uses of the CBR method and Artificial Intelligence (AI) as state of the art. The research motivation is determined through efforts to create a web-based system that can simulate the tracing of the spread of Covid-19 in Indonesia and provide disaster mitigation education. Problem identification is formulated into research questions using the 5W+1H formulation. The seven research steps at DSRM are shown in Fig. 1:  Application prototyping is carried out based on the solution design that has been created, using Ubuntu Linux 20.04, Apache, PHP, MySQL, JavaScript, P5.js, HMTL5, HTML5 canvas, Mappa, Leaflet, and Google Firebase. The application prototype demo was carried out in testing on the developer side using the Black Box Testing method. Documentation is thorough in recording data and recording test results. Publications are presented in the form of papers in scientific journals.

Case-Based Reasoning (CBR) Method
The Case-Based Reasoning (CBR) Method is an Artificial Intelligence (AI) based algorithm for diagnosis with a reasoning system that uses old knowledge to solve the new problem [9]. CBR provides solutions to new cases by looking at an old case closest to the new one. CBR will be beneficial because it eliminates the need to extract the model as the rulebased systems require. The Diagram of CBR shown in Fig. 4:

Heart Disease Category
The CBR method utilizes heart disease category data along with definitions, symptoms, and medical actions taken to draw the relationship between the data. The symptom input from the user is then adjusted by the application against the rules of the existing relationship and then displayed in the form of online diagnostic results. The heart disease category, definition, and medical treatment, shown in Table 1: Heart failure is a condition in which the heart cannot supply blood flow to meet the body's needs and is potentially deadly.
Limiting activities, living a lifestyle, limiting salt consumption, maintaining ideal body weight, exercising regularly, not smoking, not drinking alcohol.

Heart valve disease
Heart valve disease is a condition in which one or more heart valves do not work properly. In some cases, people are born with problems with the heart valves, while others get abnormalities in the valves in their lifetime. There are three types of heart valve disease, namely leakage, narrowing, and valves without holes. There is no cure for abnormalities in the heart valves except for surgery. But for those of you who don't have this disease from birth, maintaining a diet and lifestyle is the key to being free from this disease.
Limiting activities, leading a sedentary lifestyle, limiting salt consumption, maintaining ideal body weight, exercising regularly, not smoking, not drinking alcohol, giving medication, surgery Pratama https://doi.org/10.51630/ijes.v3i1.33 Arrhythmias Arrhythmias are disorders that occur in the rhythm of the heart. People with arrhythmias may feel their heart rhythm is too fast, too slow, or irregular. If it occurs continuously or repeatedly, arrhythmias can indicate a problem with the heart organ.
Limiting activities, leading a sedentary lifestyle, limiting salt consumption, maintaining ideal body weight, exercising regularly, not smoking, not drinking alcohol, giving drugs, surgery, catheter insertion, pacemaker Pericarditis Pericarditis is irritation and inflammation of the thin, pouch-shaped lining that lines the heart (pericardium). The pericardium functions to keep the heart from moving and protects the heart from friction or the spread of infection from other tissues. Diseases that cause symptoms in the form of chest pain can occur at any age. However, most cases of pericarditis occur at the age of 20 to 50 years, especially in men.
Limiting activities, leading a sedentary lifestyle, limiting salt consumption, maintaining ideal body weight, exercising regularly, not smoking, not drinking alcohol, giving drugs, surgery, catheter insertion, pacemaker, EKG, MRI, CT Scan

Coronary heart
Coronary heart disease is when the main blood vessels that supply blood, oxygen, and nutrients to the heart become damaged. Usually, this condition is caused by cholesterol plaque and inflammatory processes Limiting activities, leading a sedentary lifestyle, limiting salt consumption, maintaining ideal body weight, exercising regularly, not smoking, not drinking alcohol, giving drugs, surgery, catheter insertion, pacemaker

Implementation and Testing
The development of an online self-diagnosis heart disease application prototype has been done at localhost. The face-to-face web-based application can be accessed at the URL http://127.0.0.1/diagnosajantung. The application interface is shown in Fig. 5:

Fig. 5. The application interface
After accessing the application URL, the user will be treated to a face-to-face application. Users can get information about heart disease and can make diagnoses online. To perform an online diagnosis, the user logs into the system and fills in the user's data. The process of filling in personal data by the user, shown in Fig. 6:  Fig. 6. The process of filling in personal data by the user Users can select the symptoms experienced by the options given by the application; then, the application will process the inputs using the CBR method to become the results of online diagnosis. The process of selecting the symptoms experienced by the options given by the application shown in Fig. 7: Based on the diagnostic results displayed by the application to the user (Fig. 8), clarification can be obtained by medical experts that the diagnosis results are correct. This is due to the symptom data and the relationship between symptoms for each type of heart disease, derived from medical, scientific literature, and the results of interviews with several cardiologists. This data is then managed by the application to be processed into information on the diagnosis results based on the complaint input provided by the user through the application interface.

CONCLUSION
Based on the tests carried out in this study, it can be concluded that the design and implementation of web-based online self-diagnosis of heart disease follow user needs, and the system can run well. The diagnostic results indicate this according to the user's symptom input. The application prototype can relate the categories of heart disease to symptoms and then conclude in online diagnostic results. The online diagnosis results can help users find out whether they have heart disease or not, so that early detection, prevention, and treatment can be done quickly.