Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

AI Mini Project Report

Title: Development of an Expert System for Hospitals and Medical Facilities


Group Members: Tushar Pawar(57)
Pravin Pawar(56)
Yash Pawar (58)

Problem Statement:
Developing a disease diagnosis system for hospitals and medical facilities using
PROLOG programming language.

Introduction:
The healthcare industry is increasingly turning to artificial intelligence (AI) and
expert systems to enhance decision-making processes, improve patient
outcomes, and streamline operations. This project focuses on the development
of an expert system for hospitals and medical facilities using Prolog, a logic
programming language well-suited for rule-based systems.

Objectives:
● To design and implement an expert system capable of diagnosing
medical conditions based on symptoms and patient data.
● To provide recommendations for treatment plans and interventions
based on established medical guidelines and expert knowledge.
● To create a user-friendly interface for medical practitioners to interact
with the system effectively.

System Architecture:
The expert system architecture consists of the following components:

● Knowledge Base: Contains rules, facts, and medical knowledge encoded


in Prolog.
● Inference Engine: Processes user queries and applies logical reasoning to
derive conclusions and recommendations.
● User Interface: Provides a console-based interface for medical
practitioners to input patient data, view diagnostic results, and receive
treatment recommendations.

Knowledge Representation:
In Prolog, medical knowledge is represented using rules and facts.

For example:

% Rule for diagnosing a medical condition based on symptoms


diagnose_condition(Symptom1, Symptom2, ..., Condition) :-
symptom_present(Symptom1),
symptom_present(Symptom2),
...
condition(Condition).

% Rule for recommending treatment for a diagnosed condition


recommend_treatment(Condition, Treatment) :-
condition(Condition),
treatment_for_condition(Condition, Treatment).

User Interface:
The user interface provides the following functionalities:

● Input Through Console: Allows medical practitioners to enter patient


symptoms and data.
● Diagnosis Results: Displays the diagnosed medical condition based on
the input data.
● Treatment Recommendations: Provides recommendations for treatment
plans and interventions.

Testing and Evaluation:


The expert system underwent rigorous testing to ensure accuracy, robustness,
and usability. Test cases were designed to cover a wide range of medical
conditions and scenarios. Evaluation criteria included precision, recall, and user
satisfaction.

Results:
The expert system demonstrated promising results in diagnosing medical
conditions and providing treatment recommendations. Feedback from medical
practitioners indicated high levels of accuracy and usefulness in clinical
decision-making.

C:\Users\ASHISH\Desktop\LP2_Submission>C:\Progra~1\swipl\bin\swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 9.2.3)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit https://www.swi-prolog.org


For built-in help, use ?- help(Topic). or ?- apropos(Word).

1 ?- [expert].
true.

2 ?- input.
Does the patient have Flu? no.
Does the patient have Yellowish eyes and skin? |: no.
Does the patient have Dark color urine? |: no.
Does the patient have Pale bowel movement? |: no.
Does the patient have Fatigue? |: no.
Does the patient have Vomitting? |: no.
Does the patient have Fever? |: no.
Does the patient have Pain in joints? |: no.
Does the patient have Weakness? |: no.
Does the patient have Stomach Pain? |: no.
Does the patient have Red eyes? |: yes.
Does the patient have Rashes? |: yes.
Does the patient have Itching in skin? |: yes.
Does the patient have Sneezing? |: no.
Does the patient have Swollen eyes? |: no.
Does the patient have Wheezing? |: yes.
Does the patient have Runny nose? |: no.
Does the patient have Stuffy nose? |: no.

The patient may suffer from allergy

Put eye drops, have healthy sleep, do not strain your eyes.
Clean your skin and keep drinking water.
Put eye drops, have healthy sleep, do not strain your eyes.
Drink warm water. Do gargles with salt water.
true .

3 ?- input.
Does the patient have Flu? no.
Does the patient have Yellowish eyes and skin? |: yes.
Does the patient have Dark color urine? |: yes.
Does the patient have Pale bowel movement? |: yes.
Does the patient have Fatigue? |: no.
Does the patient have Vomitting? |: no.
Does the patient have Fever? |: no.
Does the patient have Pain in joints? |: no.
Does the patient have Weakness? |: no.
Does the patient have Stomach Pain? |: no.
Does the patient have Red eyes? |: yes.
Does the patient have Rashes? |: no.
Does the patient have Itching in skin? |: no.
Does the patient have Sneezing? |: no.
Does the patient have Swollen eyes? |: no.
Does the patient have Wheezing? |: no.
Does the patient have Runny nose? |: no.
Does the patient have Stuffy nose? |: no.

The patient may suffer from hepatitis_b

Put eye drops, have healthy sleep, do not strain your eyes.
Drink lots of water, juices and eat fruits. Avoid alcohol consumption.
Drink lots of water and exercise regularly.
Put eye drops, have healthy sleep, do not strain your eyes.
Put eye drops, have healthy sleep, do not strain your eyes.
Clean your skin and keep drinking water.
Put eye drops, have healthy sleep, do not strain your eyes.
Drink warm water. Do gargles with salt water.
true .

Conclusion:
In conclusion, the development of an expert system for hospitals and medical
facilities using Prolog holds immense potential in augmenting healthcare
delivery and improving patient care. Further enhancements and refinements
can be made based on ongoing feedback and advancements in AI technologies.

10. Future Work


Future work may include:
● Integration with electronic health record (EHR) systems for seamless
data exchange.
● Incorporation of machine learning algorithms to enhance diagnostic
accuracy and personalized treatment recommendations.
● Expansion of the knowledge base to cover a wider range of medical
specialties and conditions.

You might also like