wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Simple AI Symptom Diagnosis Using LISP – Rule-Based Expert System

profile
Sejal Jethwa
Jul 16, 2025
1 Like
0 Discussions
0 Reads

(defun diagnosis ()

(format t "%Welcome to AI Symptom Checker!%")

(format t "Please enter your symptoms (e.g., fever, cough, headache).~%")

(format t "Type 'exit' to quit.~%")


(loop

(format t "~%Your Symptoms: ")

(force-output) ;; Force flush to display prompt before input

(let* ((input (read-line))

(symptoms (string-downcase input))) ;; Normalize input to lowercase

(cond

((string= symptoms "exit")

(format t "Goodbye! Take care.~%")

(return))

((and (search "fever" symptoms)

(search "cough" symptoms)

(search "body pain" symptoms))

(format t "Diagnosis: You may have the flu.~%"))


((and (search "fever" symptoms)

(search "headache" symptoms))

(format t "Diagnosis: You may have a viral fever.~%"))


((and (search "cough" symptoms)

(search "sore throat" symptoms))

(format t "Diagnosis: You may have a common cold.~%"))


((and (search "sneezing" symptoms)

(search "itchy eyes" symptoms))

(format t "Diagnosis: You may have an allergy.~%"))

((search "headache" symptoms)

(format t "Diagnosis: You might be dehydrated or stressed.~%"))


((search "fever" symptoms)

(format t "Diagnosis: You may be experiencing a mild fever or infection.~%"))


((search "cough" symptoms)

(format t "Diagnosis: You might have a throat infection or irritation.~%"))


(t

(format t "Diagnosis: Symptoms unclear. Please consult a doctor.~%"))))))


(diagnosis)


Comments ()


Sign in

Read Next

DATA BREACH CAUSES CHALLENGES PREVENTION AND FUTURE DIRECTIONS

Blog banner

DEVELOPMENTS LEADING TO MODERN OPERATING SYSTEMS

Blog banner

Data Science in Healthcare: Predicting Diseases

Blog banner

THE ACTORS LIFE

Blog banner

How Do I Get Rid of My People-Pleasing Behaviour?

Blog banner

Analysis of Digital Evidence In Identity Theft Investigations

Blog banner

"Geographic Information Systems (GIS) and its Applications in Urban Planning"

Blog banner

OLA

Blog banner

Steganography

Blog banner

Virtual memory

Blog banner

The Benefits of Practical Life Activities in Preschool

Blog banner

Culture Of Ladakh

Blog banner

The Khan mehtab transforming the modular switches

Blog banner

Threat management

Blog banner

virtual machine

Blog banner

Race Conditions

Blog banner

Tools to support CSI activities

Blog banner

Deadlock and Starvation

Blog banner

OS Assignment 1

Blog banner

10 Types of Friends in every friend group

Blog banner

Memory Hierarchy

Blog banner

Artical on FreshBooks

Blog banner

COMPUTER FORENSICS AND GRAPHICS

Blog banner

Threads

Blog banner

Building Confidence in Children Through Daily Routines and Play

Blog banner

Zomato's Secret Digital Marketing Techniques!

Blog banner

Music helps reduce stress

Blog banner

SmartData Collective: Data Science aur Analytics ki Duniya

Blog banner

Service Catalogue Management

Blog banner

Virtual Memory

Blog banner

WAKE UP ITS FOOD o'CLOCK...!!!!!

Blog banner

Loneliness

Blog banner

The Joy of Giving: How Festivals Teach Children Empathy and Gratitude

Blog banner

Data Science in Mental Health Prediction

Blog banner

JIRA SOFTWARE

Blog banner

Deadlock

Blog banner

Topic: Sessions in Operating system

Blog banner

Odoo

Blog banner

On-Page SEO

Blog banner

EdTech (Education Technology)

Blog banner

Disk Management

Blog banner

1.1 basic elements

Blog banner