1. Medical Diagnosis Expert System Report
This Project is a simple expert system for diagnosing diseases based on a set of symptoms using the
experta library. It defines a Greetings class, which inherits from the KnowledgeEngine class, and takes
four arguments during initialization - symptom_map, if_not_matched, get_treatments, and get_details.
The class defines a set of rules for each symptom using the @Rule decorator, which checks whether the
symptom is present or not and stores the user input in a Fact object. The rules are executed in order of
their salience value, with lower values being executed first. If no disease matches the symptoms, the
if_not_matched function is executed, which is passed as an argument during initialization.
The system uses a forward chaining inference engine, which means that the rules are executed in the
order in which they are defined until a conclusion is reached. Once a disease is diagnosed based on the
symptoms, the corresponding disease_X rule is executed, which adds the disease name as a Fact object.
The system then calls the get_treatments and get_details functions, which are passed as arguments
during initialization, to retrieve the treatment and details of the diagnosed disease.