Skip to content

Backward-chaining medical expert system that specializes in selected autoimmune diseases and employs MYCIN-style computations to handle uncertainty

Notifications You must be signed in to change notification settings

memgonzales/medical-expert-ehrlich

Repository files navigation

EHRLICH (Medical Expert System)

badge

Enhanced Rule- and Logic-Based Immunological Consultative Hub or EHRLICH — a reverse acronym inspired by the German pioneer of immunology Paul Ehrlich — is a medical expert system specializing in autoimmune diseases, conditions triggered by malfunctions of the immune system that cause it to attack healthy body tissues. In particular, it seeks to automate the diagnosis for 15 such diseases, selected on the basis of their prevalence and the accessibility of symptomatic detection with visual inspection or the patient’s own assessment prior to conclusive laboratory tests.

DISCLAIMER: The goal of this project is to explore the possibility of employing backward chaining in the implementation of medical expert systems that are able to handle uncertainty. Although care has been taken to consult technical sources, this system is ultimately subject to a closed-world assumption and to the limited size of its knowledge base.

Therefore, it is not intended to be used — and should not be used — for real-world or professional diagnosis.

Task

EHRLICH is the major course output in an introduction to intelligent systems class under Dr. Judith J. Azcarraga of the Department of Computer Technology, De La Salle University. The task is to create an expert system that is able to diagnose at least 10 diseases affecting a particular body system. The knowledge base has to be written in the logic programming language Prolog, and the system has to employ backward chaining as its primary inference method. The rules should consist solely of symptoms that can be observed or identified by the patient to a certain degree prior to laboratory analysis.

The 15 autoimmune diseases included in the knowledge base of EHRLICH are as follows: Addison disease, dermatomyositis, Hashimoto thyroiditis, multiple sclerosis, Crohn’s disease, Grave’s disease, myasthenia gravis, pernicious anemia, reactive arthritis, Sjögren syndrome, lupus, rheumatoid arthritis, type I diabetes, celiac disease, and alopecia areata.

The program initially asks for the patient's information to rule out certain age- and sex-specific conditions and to determine the normal thresholds for medical statistics (such as heart rate).

Initialization Screen

For the diagnosis, it adapts MYCIN-style calculations to admit uncertainty to an extent. To reduce the length of probing, a disease is ruled out once the certainty level falls below 0.2. Meanwhile, if a disease registers a certainty level of at least 0.9, a diagnosis is immediately given, thus terminating the inquiry process. The screenshots below show parts of the diagnosis:

Yes-No Question

Open-Ended Question

There are two special cases handled by the system. First, if none of the diseases in the knowledge base satisfy the 0.2 threshold, it refers the patient to a larger medical facility for a more thorough diagnosis. Second, if the patient reports a symptom that is indicative of an emergency, EHRLICH explicitly displays an alert message, and, per the task specifications, a diagnosis is compulsorily given along with the certainty level.

Emergency

The project consists of three folders:

  • api - Javadoc documentation of this project
  • out - .class files
  • src - .java files (source codes)

Besides the Medical Expert System.jar file, it also includes the following documents:

  • Technical Report.pdf - Formal discussion of the knowledge base, underlying algorithm, and behavior of the system
  • Demo File.pdf - Instructions for using EHRLICH and screenshots of the running system

Built Using

The project was built using Java following the Model-View-Controller (MVC) architectural pattern, with the .class files generated via Java SE Development Kit 14. The graphical user interface was created using Swing, a platform-independent toolkit that is part of the Java Foundation Classes.

The knowledge base was written in Prolog (with SWI-Prolog as the particular implementation). The open-source library JPL 7, released under the Simplified BSD License and bundled with a SWI-Prolog installation, provided the classes and functions for the bidirectional interface between Java and Prolog.

Authors

In no event shall the authors and their affiliates be liable to any party for direct, indirect, special, incidental, or consequential damages arising out of the use of this software and its documentation, even if advised of the possibility of such damage.

About

Backward-chaining medical expert system that specializes in selected autoimmune diseases and employs MYCIN-style computations to handle uncertainty

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published