Major-Project Report Format - 7TH SEM
Major-Project Report Format - 7TH SEM
SYSTEM”
A Project
Submitted to
Submitted By:
Mayank patel
Roll No – 0133CL221075
Under the Guidance of
Prof (Harshita Jain)
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
SAGAR INSTITUTE OF RESEARCH & TECHNOLOGY Bhopal
Department of Artificial Intelligence And Machine Learning &
Engineering
“MOTIVATION”
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:
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
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]
def healthcare_expert_system():
print("Welcome to the Healthcare Expert System.")
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"])
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 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 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"])
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.
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