Skip to content

A Prolog-based rule-driven expert system that helps small or rural clinics decide whether a patient should be referred to a doctor or given home-care advice based on symptoms using IF–THEN logic for quick triage decisions.

Notifications You must be signed in to change notification settings

RameenMughal/RuleBasedHealthAssistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

🏥 Clinic Expert System

A Rule-Based Expert System developed in Prolog to assist small or rural clinics in determining whether a patient should be referred to a doctor or advised with home remedies based on their symptoms.
The system simulates clinical reasoning using IF–THEN rules, enabling non-medical staff to make quick and informed triage decisions.

Project Overview

This project presents a rule-based expert system designed to support small or rural healthcare clinics where access to doctors or diagnostic equipment may be limited.
It applies rule-based reasoning to mimic basic clinical decision-making by asking a series of yes/no questions about symptoms.

The system:

  • Matches user responses to a knowledge base of rules.
  • Determines possible illnesses, severity, and advice.
  • Provides specialist referral information when necessary.

The Clinic Expert System is intended as a low-cost AI solution that empowers receptionists or community health workers to conduct quick assessments before referring patients to a doctor.

🏥 Assumed Clinic Context

The simulated clinic is a small primary healthcare facility located in an urban residential area of Karachi, Pakistan.
It handles 50–100 patients daily, focusing on common illnesses such as:

  • Cold
  • Flu
  • Allergy
  • Food Poisoning
  • Minor infections

Referrals are made to larger hospitals like Aga Khan University Hospital for specialized care.

🩺 Main Menu

When the program starts, it displays a menu with four options for user interaction where each option serves the following purpose:

  1. Diagnose a patient – Starts an interactive session where the user answers yes/no questions about symptoms.
  2. List available conditions – Displays a list of all illnesses defined in the knowledge base.
  3. List available symptoms – Shows all the symptoms recognized by the system.
  4. Exit – Ends the program gracefully.

🧩 Technologies Used

Component Description
Language Prolog
AI Technique Rule-Based Reasoning
Platform SWI-Prolog

🚀 How to Run the Program

  1. Install SWI-Prolog
  2. Clone the repository
git clone https://github.com/RameenMughal/RuleBasedHealthAssistant.git
cd RuleBasedHealthAssistant
  1. Move the main.pl to the Prolog folder in Documents
  2. Load the program in Prolog Platform
?- [main].
  1. Run the system
?- start.

About

A Prolog-based rule-driven expert system that helps small or rural clinics decide whether a patient should be referred to a doctor or given home-care advice based on symptoms using IF–THEN logic for quick triage decisions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages