0% found this document useful (0 votes)
17 views11 pages

Major-Project Report Format - 7TH SEM

The document describes a healthcare expert system that aims to provide guidance to individuals experiencing common symptoms like cough, fever, or headache. It asks the user questions about their symptoms and age, and provides treatment recommendations and advice based on the responses. The system focuses on fever, cough, and headache, collecting additional details for each and giving tailored recommendations accordingly.

Uploaded by

Abhira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views11 pages

Major-Project Report Format - 7TH SEM

The document describes a healthcare expert system that aims to provide guidance to individuals experiencing common symptoms like cough, fever, or headache. It asks the user questions about their symptoms and age, and provides treatment recommendations and advice based on the responses. The system focuses on fever, cough, and headache, collecting additional details for each and giving tailored recommendations accordingly.

Uploaded by

Abhira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

“HEALTH CARE EXPERT

SYSTEM”

A Project

Submission in the partial fulfillment for the award of the degree of


Bachelor of Technology
In
Artificial Intelligence And Machine Learning

Submitted to

RAJIV GANDHI PROUDYOGIKI VISHWAVIDYALAYA,


(State Technological University of M.P.)

Submitted By:
Mayank patel
Roll No – 0133CL221075
Under the Guidance of
Prof (Harshita Jain)

SAGAR INSTITUTE OF RESEARCH & TECHNOLOGY, BHOPAL


(M.P.)
Department Of Artificial Intelligence And Machine Learning &
Engineering
Dec-2023

1
SAGAR INSTITUTE OF RESEARCH & TECHNOLOGY Bhopal
Department of Artificial Intelligence And Machine Learning &
Engineering

“PROBLEM STATEMENT”
“Access to Affordable Healthcare for Minor Health Issues”

Objective :
• The objective is to address the prevalent issue of limited access to affordable
healthcare for individuals facing minor health problems. Many people
encounter minor health concerns that do not necessarily require immediate
medical attention but still necessitate guidance or advice. However , due to
financial constraints , a significant portion of the population cannot afford
regular doctor visits for these minor issues.

Challenges :

1. Financial Constraints :
• Numerous individuals , particularly those from lower-income brackets or
without adequate insurance coverage , struggle to afford healthcare services
for minor health issues.
• The cost associated with frequent doctor visits , even for minor ailments like
coughs, fevers, or headaches, becomes a burden for these individuals and
families.

2. Unnecessary Healthcare Utilization :


• Lack of affordable healthcare options prompts individuals to seek medical
attention for minor issues that could be managed with guidance or over-the-
counter solutions.
• Overutilization of healthcare services for minor concerns places strain on the
healthcare system and often results in unnecessary expenses for patients.

2
SAGAR INSTITUTE OF RESEARCH & TECHNOLOGY Bhopal
Department of Artificial Intelligence And Machine Learning &
Engineering

“MOTIVATION”

• The motivation behind this Healthcare Expert System is offer preliminary


guidance to individuals experiencing common symptoms. It aims to provide
initial recommendations based on the user’s input regarding their symptoms,
age, and specific conditions related to their health issue. The system intends to
offer advice for self-care , medication suggestions, or when to seek immediate
medical attention based on the severity and nature of the symptoms.

3
SAGAR INSTITUTE OF RESEARCH & TECHNOLOGY Bhopal
Department of Artificial Intelligence And Machine Learning & Engineering

“INTRODUCTION”

This Python code constitutes a simple healthcare expert system that interacts with the
user to identify symptoms – such as cough , fever , or headache – and provides basic
recommendations based on the symptoms and the user’s age. The system asks
questions related to the symptoms , user age , and certain conditions associated with
the symptoms. Based on the responses , it gives recommendations for potential
treatments or advises consulting a healthcare professional. Here's a breakdown of the
code:

1)Function ask_question(question, choices):


• This function displays a question along with a list of choices.
• It takes user input to select a choice by entering the corresponding number.
• Validates the user input and returns the selected choice.

2)Function healthcare_expert_system():
• Initiates the healthcare expert system.
• Asks the user for symptoms and age.
• Based on the identified symptoms(s) , further questions are asked to gather
additional information.
• Provides recommendations and advice for treatments based on the symptom(s)
, the user’s age ,and the information gathered.

The code mainly focuses on three symptoms : fever ,cough , and headache , for each
symptom, it collects additional details and provides treatment recommendations
accordingly .It also considers the user’s age to provide age-appropriate
recommendations.

The code structure includes specific recommendations and advice based on the
user’s age range and the severity or duration of the symptoms reported.
The functionally can be extended by adding more symptoms and related questions
along with suitable recommendations and considerations based one the
symptomatology and user’s characteristics(like age).

4
SAGAR INSTITUTE OF RESEARCH & TECHNOLOGY Bhopal
Department of Artificial Intelligence And Machine Learning & Engineering

“PROBLEM SOLUTION CODING”


def ask_question(question, choices):
print(question)
for index, choice in enumerate(choices, start=1):
print(f"{index}. {choice}")

while True:
user_input = input("Enter the number corresponding to your choice: ")
if user_input.isdigit():
choice_index = int(user_input)
if 1 <= choice_index <= len(choices):
return choices[choice_index - 1]

print("Please enter a valid choice number.")

def healthcare_expert_system():
print("Welcome to the Healthcare Expert System.")

print("Please answer the following questions.")

symptom_choices = ["Cough", "Fever", "Headache"]


symptoms = ask_question("What symptoms are you experiencing?",
symptom_choices)

user_age = int(input("Enter your age: "))

if symptoms == "Fever":
fever_temperature = ask_question("Is your body temperature in Fahrenheit
more than 98.6?", ["Yes", "No"])
area_of_discomfort = ask_question("Are there any specific areas of pain
or discomfort along with the fever?", ["Yes", "No"])
contact_sick_one = ask_question("Have you been in contact with someone
who has been sick?", ["Yes", "No"])
fever_progress = ask_question("Are the symptoms consistent, improving, or
worsening over time?", ["Consistent", "Improving", "Worsening"])
fever_duration = ask_question("How long have you been experiencing these
symptoms?", ["1-2 days", "3 or more days"])

# Recommendation for Fever:


print("\nRecommended Solutions:")

if user_age < 7:
print("For ages less than 7:")
if fever_temperature == 'Yes':
print("As your temperature is high and your age is less than 7,
you can take the Pagdol P Syrup.")
else:
5
print("In the case of a fever, consider nonprescription
medication as per the doctor's advice for children.")
else:
print("For ages greater than 7:")
if fever_temperature == "Yes" and area_of_discomfort == "Yes" and
contact_sick_one == "Yes":
print("Monitor your fever closely. Seek medical advice if it
persists or worsens.")
else:
print("In the case of a high fever, consider nonprescription
medication, such as acetaminophen or ibuprofen.")

if fever_temperature == "Yes" and fever_progress == "Improving" and


fever_duration == "3 or more days":
print("If your fever persists for more than three days despite
medication, consult a doctor for further evaluation.")
elif fever_temperature == "Yes" and fever_progress == "Worsening":
print("Seek immediate medical attention if your fever is worsening.")

elif symptoms == "Cough":


cough_nature = ask_question("Is the cough dry or productive?", ["Dry",
"Productive"])
cough_blood = ask_question("Is there any blood in the coughed-up mucus?",
["Yes", "No"])
cough_experience = ask_question("Do you experience any pain or discomfort
when coughing?", ["Yes", "No"])
cough_duration = ask_question("How long have you been experiencing these
symptoms?", ["1-2 weeks", "more than 3 weeks"])

# Recommendations for Cough:


print("\nRecommended Solutions:")

if user_age < 7:
print("For ages less than 7:")
if cough_nature == "productive":
print("For a productive cough in young children, consider
children's cough syrups like delsym, robitussin, or mucinex.")
else:
print("For a dry cough in young children, consider delsym,
robitussin, mucinex, or dimetapp may be recommended and can consulting a
pediatrician for appropriate treatment.")
else:
print("For ages greater than 7:")
if cough_nature == "productive":
if cough_blood == "Yes" and cough_experience == "Yes":
print("For a productive cough with blood or pain, it's
advisable to seek immediate medical attention.")
else:
print("For a productive cough without severe symptoms,
consider medications like Bromhexine, hydrocodone, or pholcodine.")
elif cough_nature == "dry":
if cough_blood == "Yes" and cough_experience == "Yes":
print("For a dry cough with blood or pain, it's advisable to
seek immediate medical attention.")
else:
6
print("For a dry cough without severe symptoms, consider
medications like Vardaman Zecof, Charak kofo SF syrup.")

if cough_duration == "1-2 weeks":


print("if the cough symptoms are between under 1-2 weeks you can
take syrup such as Benadryl DR syrup , Alex cough lozenges , Charak kofol SF
syrup.")
else:
print("It is advisable to consult a doctor for coughs persisting
for longer than 3 weeks.")

if symptoms == "Headache":
scale_severity = ask_question("On a scale of 1-10, how would you rate the
severity of your headache?", ["1-5","6-10"])
pain_constant = ask_question("Is the pain constant or does it come and
go?", ["Constant", "Come & Go"])
head_position = ask_question("Where do you feel the pain?", ["Front of
the head", "Back of the head"])

#Recommendations for headache:


print("\nRecommended Solution:")

if user_age < 11:


print("For ages less than 11:")
if scale_severity == "1-5":
print("Maintain consistent schedules for sleep, eating, exercise
and school work. Ensure children get adequate uninterrupted sleep at night (8-12
hours per night depending on age).Drink lots of water and eat well; discourage
skipping meals. Keeping properly hydrated and fed can help avoid the onset or
continuation of headaches.")
else:
print("For a headache you can take medicines such as
Tylenol(acetaminophen) and Advil(ibuprofen) for pain relievers for young
children.")
else:
print("For ages greater than 11:")
if scale_severity == "1-5":
print("For a headache you can take medicines such as
Aleve(naproxen) for pain reliever for the age greater than 12 years.")
else:
print("For a more pain full headache you can go to the doctor for
better check up.")

if user_age < 11:


print("For ages less than 11:")
if pain_constant == "come & go":
print("Maintain consistant schedules for sleep,eating,exercise
and school work. Ensure children get adequate uninterrupted sleep at night (8-12
hours per night depending on age).Drink lots of water and eat well; discourage
skipping meals. Keeping propery hydrated and fed can help avoid the on set or
continuation of headaches.")
else:
print("For a headache you can take medicines such as
Tylenol(acetaminophen) and Advil(ibuprofen) for pain relievers for young
children.")
7
else:
print("For ages greater than 11:")
if pain_constant == "constant":
print("Maintain consistant schedules for sleep,eating and
exercise.Drink lots of water and eat well; discourage skipping meals. Keeping
propery hydrated and fed can help avoid the on set or continuation of headaches")
else:
print("")

if user_age < 11:


print("For less than 11:")
if head_position == "Front of the head":
print("it is due too tension,eyestrain,or sinus problems.To
prevent forehead headaches,people can try managing stress,maintaining good
posture,and staying hydrated.")
else:
print("Pain in the back of your head may result from various
causes,including migraine or issues with your neck,spine, or posture.It can be
relieve or prevent the pain with lifestyle changes,alternative remedies and
medications.")
else:
print("For grester than 11:")
if head_position == "front of the head":
print("")
else:
print("")
healthcare_expert_system() # Call the function to start the program

8
SAGAR INSTITUTE OF RESEARCH & TECHNOLOGY Bhopal
Department of Artificial intelligence and machine learning Engineering

“RESULT”
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements!


https://aka.ms/PSWindows

PS C:\mayank> &
'C:\Users\Asus\AppData\Local\Microsoft\WindowsApps\python3.11.exe'
'c:\Users\Asus\.vscode\extensions\ms-python.python-
2023.22.1\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher' '50575' '--
' 'C:\mayank\AI'
Welcome to the Healthcare Expert System.
Please answer the following questions.
What symptoms are you experiencing?
1. Cough
2. Fever
3. Headache
Enter the number corresponding to your choice: 2
Enter your age: 14
Is your body temperature in Fahrenheit more than 98.6?
1. Yes
2. No
Enter the number corresponding to your choice: 1
Are there any specific areas of pain or discomfort along with the fever?
1. Yes
2. No
Enter the number corresponding to your choice: 1
Have you been in contact with someone who has been sick?
1. Yes
2. No
Enter the number corresponding to your choice: 2
Are the symptoms consistent, improving, or worsening over time?
1. Consistent
2. Improving
3. Worsening
Enter the number corresponding to your choice: 2
How long have you been experiencing these symptoms?
1. 1-2 days
2. 3 or more days
Enter the number corresponding to your choice: 1
Recommended Solutions:
For ages greater than 7:
In the case of a high fever, consider nonprescription medication, such as
acetaminophen or ibuprofen.
9
SAGAR INSTITUTE OF RESEARCH & TECHNOLOGY Bhopal
Department of Artificial intelligence and machine learning Engineering

“CONCLUSION”

The provided code defines a healthcare expert system that interacts with a user to
gather information about their symptoms and age. Based on the symptoms entered
, the system provides recommendations for potential health issues and suggests
possible treatments or actions.

The system primarily focuses on three symptoms : fever , cough and headache.
For each symptom , it asks related questions to gather more specific details.
Depending on the age of the user and the nature of symptoms , it recommends
over the counter medications ,advises consulting a doctor , or suggests lifestyle
changes to alleviate the symptoms.

The code structure follows a sequential decision tree based on the symptoms
entered by the user , leading to specific recommendations and guidance tailored
to the symptoms and age group.

10

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy