Upload 15 files
Browse files- README.md +16 -13
- Symptom-severity.csv +134 -0
- Training.csv +0 -0
- description.csv +42 -0
- developer.html +37 -0
- diets.csv +42 -0
- img.png +0 -0
- index.html +266 -0
- main.py +120 -0
- medications.csv +42 -0
- medicine_recommendation_system.py +223 -0
- precautions_df.csv +42 -0
- svc.pkl +3 -0
- symtoms_df.csv +0 -0
- workout_df.csv +411 -0
README.md
CHANGED
@@ -1,13 +1,16 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
|
1 |
+
# Personalized-Medical-Recommendation-System-with-Machine-Learning
|
2 |
+
Welcome to our cutting-edge Personalized Medical Recommendation System, a powerful platform designed to assist users in understanding and managing their health. Leveraging the capabilities of machine learning, our system analyzes user-input symptoms to predict potential diseases accurately. Here's what sets our system apart:
|
3 |
+
|
4 |
+
User-Friendly Interface: Our intuitive interface allows users to input their symptoms effortlessly, creating a seamless user experience.
|
5 |
+
|
6 |
+
Advanced Machine Learning Models: We've integrated state-of-the-art machine learning models that accurately predict diseases based on input symptoms, ensuring reliable and precise results.
|
7 |
+
|
8 |
+
Tailored Recommendations: Receive personalized recommendations for the top 5 medicines, prescription details, and even workout routines based on the predicted disease.
|
9 |
+
|
10 |
+
Flask App Integration: The entire system is powered by a Flask web application, making it easily accessible to users. Experience the convenience of accessing healthcare recommendations from anywhere.
|
11 |
+
|
12 |
+
Privacy and Security: We prioritize user privacy and data security. Your health information is handled with the utmost confidentiality, adhering to the highest industry standards.
|
13 |
+
|
14 |
+
Continuous Improvement: Our system is designed for continuous improvement. As we gather more data, the machine learning models evolve, providing increasingly accurate and relevant recommendations.
|
15 |
+
|
16 |
+
Take charge of your health with our Personalized Medical Recommendation System. Your well-being is our priority, and we're dedicated to providing you with the tools and insights you need for a healthier, happier life.
|
Symptom-severity.csv
ADDED
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Symptom,weight
|
2 |
+
itching,1
|
3 |
+
skin_rash,3
|
4 |
+
nodal_skin_eruptions,4
|
5 |
+
continuous_sneezing,4
|
6 |
+
shivering,5
|
7 |
+
chills,3
|
8 |
+
joint_pain,3
|
9 |
+
stomach_pain,5
|
10 |
+
acidity,3
|
11 |
+
ulcers_on_tongue,4
|
12 |
+
muscle_wasting,3
|
13 |
+
vomiting,5
|
14 |
+
burning_micturition,6
|
15 |
+
spotting_urination,6
|
16 |
+
fatigue,4
|
17 |
+
weight_gain,3
|
18 |
+
anxiety,4
|
19 |
+
cold_hands_and_feets,5
|
20 |
+
mood_swings,3
|
21 |
+
weight_loss,3
|
22 |
+
restlessness,5
|
23 |
+
lethargy,2
|
24 |
+
patches_in_throat,6
|
25 |
+
irregular_sugar_level,5
|
26 |
+
cough,4
|
27 |
+
high_fever,7
|
28 |
+
sunken_eyes,3
|
29 |
+
breathlessness,4
|
30 |
+
sweating,3
|
31 |
+
dehydration,4
|
32 |
+
indigestion,5
|
33 |
+
headache,3
|
34 |
+
yellowish_skin,3
|
35 |
+
dark_urine,4
|
36 |
+
nausea,5
|
37 |
+
loss_of_appetite,4
|
38 |
+
pain_behind_the_eyes,4
|
39 |
+
back_pain,3
|
40 |
+
constipation,4
|
41 |
+
abdominal_pain,4
|
42 |
+
diarrhoea,6
|
43 |
+
mild_fever,5
|
44 |
+
yellow_urine,4
|
45 |
+
yellowing_of_eyes,4
|
46 |
+
acute_liver_failure,6
|
47 |
+
fluid_overload,6
|
48 |
+
swelling_of_stomach,7
|
49 |
+
swelled_lymph_nodes,6
|
50 |
+
malaise,6
|
51 |
+
blurred_and_distorted_vision,5
|
52 |
+
phlegm,5
|
53 |
+
throat_irritation,4
|
54 |
+
redness_of_eyes,5
|
55 |
+
sinus_pressure,4
|
56 |
+
runny_nose,5
|
57 |
+
congestion,5
|
58 |
+
chest_pain,7
|
59 |
+
weakness_in_limbs,7
|
60 |
+
fast_heart_rate,5
|
61 |
+
pain_during_bowel_movements,5
|
62 |
+
pain_in_anal_region,6
|
63 |
+
bloody_stool,5
|
64 |
+
irritation_in_anus,6
|
65 |
+
neck_pain,5
|
66 |
+
dizziness,4
|
67 |
+
cramps,4
|
68 |
+
bruising,4
|
69 |
+
obesity,4
|
70 |
+
swollen_legs,5
|
71 |
+
swollen_blood_vessels,5
|
72 |
+
puffy_face_and_eyes,5
|
73 |
+
enlarged_thyroid,6
|
74 |
+
brittle_nails,5
|
75 |
+
swollen_extremeties,5
|
76 |
+
excessive_hunger,4
|
77 |
+
extra_marital_contacts,5
|
78 |
+
drying_and_tingling_lips,4
|
79 |
+
slurred_speech,4
|
80 |
+
knee_pain,3
|
81 |
+
hip_joint_pain,2
|
82 |
+
muscle_weakness,2
|
83 |
+
stiff_neck,4
|
84 |
+
swelling_joints,5
|
85 |
+
movement_stiffness,5
|
86 |
+
spinning_movements,6
|
87 |
+
loss_of_balance,4
|
88 |
+
unsteadiness,4
|
89 |
+
weakness_of_one_body_side,4
|
90 |
+
loss_of_smell,3
|
91 |
+
bladder_discomfort,4
|
92 |
+
foul_smell_ofurine,5
|
93 |
+
continuous_feel_of_urine,6
|
94 |
+
passage_of_gases,5
|
95 |
+
internal_itching,4
|
96 |
+
toxic_look_(typhos),5
|
97 |
+
depression,3
|
98 |
+
irritability,2
|
99 |
+
muscle_pain,2
|
100 |
+
altered_sensorium,2
|
101 |
+
red_spots_over_body,3
|
102 |
+
belly_pain,4
|
103 |
+
abnormal_menstruation,6
|
104 |
+
dischromic_patches,6
|
105 |
+
watering_from_eyes,4
|
106 |
+
increased_appetite,5
|
107 |
+
polyuria,4
|
108 |
+
family_history,5
|
109 |
+
mucoid_sputum,4
|
110 |
+
rusty_sputum,4
|
111 |
+
lack_of_concentration,3
|
112 |
+
visual_disturbances,3
|
113 |
+
receiving_blood_transfusion,5
|
114 |
+
receiving_unsterile_injections,2
|
115 |
+
coma,7
|
116 |
+
stomach_bleeding,6
|
117 |
+
distention_of_abdomen,4
|
118 |
+
history_of_alcohol_consumption,5
|
119 |
+
fluid_overload,4
|
120 |
+
blood_in_sputum,5
|
121 |
+
prominent_veins_on_calf,6
|
122 |
+
palpitations,4
|
123 |
+
painful_walking,2
|
124 |
+
pus_filled_pimples,2
|
125 |
+
blackheads,2
|
126 |
+
scurring,2
|
127 |
+
skin_peeling,3
|
128 |
+
silver_like_dusting,2
|
129 |
+
small_dents_in_nails,2
|
130 |
+
inflammatory_nails,2
|
131 |
+
blister,4
|
132 |
+
red_sore_around_nose,2
|
133 |
+
yellow_crust_ooze,3
|
134 |
+
prognosis,5
|
Training.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
description.csv
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Disease,Description
|
2 |
+
Fungal infection,Fungal infection is a common skin condition caused by fungi.
|
3 |
+
Allergy,Allergy is an immune system reaction to a substance in the environment.
|
4 |
+
GERD,GERD (Gastroesophageal Reflux Disease) is a digestive disorder that affects the lower esophageal sphincter.
|
5 |
+
Chronic cholestasis,Chronic cholestasis is a condition where bile flow from the liver is reduced for a prolonged period.
|
6 |
+
Drug Reaction,Drug Reaction occurs when the body reacts adversely to a medication.
|
7 |
+
Peptic ulcer disease,Peptic ulcer disease involves sores that develop on the inner lining of the stomach and small intestine.
|
8 |
+
AIDS,AIDS (Acquired Immunodeficiency Syndrome) is a disease caused by HIV that weakens the immune system.
|
9 |
+
Diabetes,Diabetes is a chronic condition that affects how the body processes blood sugar.
|
10 |
+
Gastroenteritis,"Gastroenteritis is an inflammation of the stomach and intestines, typically caused by a virus or bacteria."
|
11 |
+
Bronchial Asthma,Bronchial Asthma is a respiratory condition characterized by inflammation of the airways.
|
12 |
+
Hypertension,"Hypertension, or high blood pressure, is a common cardiovascular condition."
|
13 |
+
Migraine,Migraine is a type of headache that often involves severe pain and sensitivity to light and sound.
|
14 |
+
Cervical spondylosis,Cervical spondylosis is a degenerative condition of the cervical spine.
|
15 |
+
Paralysis (brain hemorrhage),Paralysis (brain hemorrhage) refers to the loss of muscle function due to bleeding in the brain.
|
16 |
+
Jaundice,"Jaundice is a yellow discoloration of the skin and eyes, often indicating liver problems."
|
17 |
+
Malaria,Malaria is a mosquito-borne infectious disease affecting humans and other animals.
|
18 |
+
Chicken pox,Chicken pox is a highly contagious viral infection causing an itchy rash.
|
19 |
+
Dengue,Dengue is a mosquito-borne viral infection causing flu-like symptoms.
|
20 |
+
Typhoid,Typhoid is a bacterial infection that can lead to a high fever and gastrointestinal symptoms.
|
21 |
+
hepatitis A,hepatitis A is a viral liver disease.
|
22 |
+
Hepatitis B,Hepatitis B is a viral infection that attacks the liver.
|
23 |
+
Hepatitis C,Hepatitis C is a viral infection that causes liver inflammation.
|
24 |
+
Hepatitis D,Hepatitis D is a serious liver disease caused by the hepatitis D virus.
|
25 |
+
Hepatitis E,Hepatitis E is a viral infection that causes liver inflammation.
|
26 |
+
Alcoholic hepatitis,Alcoholic hepatitis is inflammation of the liver due to alcohol consumption.
|
27 |
+
Tuberculosis,Tuberculosis is a bacterial infection that primarily affects the lungs.
|
28 |
+
Common Cold,Common Cold is a viral infection of the upper respiratory tract.
|
29 |
+
Pneumonia,Pneumonia is an inflammatory condition affecting the air sacs in the lungs.
|
30 |
+
Dimorphic hemmorhoids(piles),Dimorphic hemmorhoids(piles) is a condition characterized by swollen blood vessels in the rectum.
|
31 |
+
Heart attack,Heart attack is a sudden and severe reduction in blood flow to the heart muscle.
|
32 |
+
Varicose veins,"Varicose veins are enlarged, twisted veins that usually appear on the legs."
|
33 |
+
Hypothyroidism,Hypothyroidism is a condition where the thyroid gland doesn't produce enough thyroid hormone.
|
34 |
+
Hyperthyroidism,Hyperthyroidism is a condition where the thyroid gland produces too much thyroid hormone.
|
35 |
+
Hypoglycemia,Hypoglycemia is a condition characterized by abnormally low blood sugar levels.
|
36 |
+
Osteoarthristis,Osteoarthristis is a degenerative joint disease that affects the cartilage in joints.
|
37 |
+
Arthritis,"Arthritis is inflammation of one or more joints, causing pain and stiffness."
|
38 |
+
(vertigo) Paroymsal Positional Vertigo,(Vertigo) Paroxysmal Positional Vertigo is a type of dizziness caused by specific head movements.
|
39 |
+
Acne,Acne is a skin condition that occurs when hair follicles become clogged with oil and dead skin cells.
|
40 |
+
Urinary tract infection,Urinary tract infection is an infection in any part of the urinary system.
|
41 |
+
Psoriasis,"Psoriasis is a chronic skin condition characterized by red, itchy, and scaly patches."
|
42 |
+
Impetigo,Impetigo is a highly contagious skin infection causing red sores that can break open.
|
developer.html
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!doctype html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="utf-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
6 |
+
<title>Bootstrap demo</title>
|
7 |
+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
|
8 |
+
</head>
|
9 |
+
<body>
|
10 |
+
|
11 |
+
<div class="container my-4 mt-4">
|
12 |
+
<h6> About Junaid Khan: Your AI & ML Engineer
|
13 |
+
</h6>
|
14 |
+
<h5>Meet the Developer</h5>
|
15 |
+
|
16 |
+
<p>Hello, I'm Junaid Khan, your AI and Machine Learning Engineer with over 5 years of experience in the field. I am passionate about harnessing the power of technology to make a positive impact on people's lives. Allow me to share a bit about my journey in the world of artificial intelligence and machine learning.
|
17 |
+
</p>
|
18 |
+
<h5>My Expertise
|
19 |
+
</h5>
|
20 |
+
<p>With a strong academic background in computer science and a deep fascination for AI and ML, I embarked on a journey that has taken me across the globe, working on diverse and innovative projects. Over the years, I've had the privilege of collaborating on international projects that have pushed the boundaries of what's possible in AI and ML.
|
21 |
+
</p>
|
22 |
+
<h5>A Commitment to Excellence
|
23 |
+
</h5>
|
24 |
+
<p>My work is driven by a commitment to excellence and a belief that technology should be accessible and beneficial to everyone. Whether it's developing predictive models, creating intelligent algorithms, or designing user-friendly interfaces, I strive for solutions that are both cutting-edge and user-centric.
|
25 |
+
</p>
|
26 |
+
<h5>Passion for Health Tech
|
27 |
+
</h5>
|
28 |
+
<p>The development of [Your Website Name] represents a convergence of my passion for AI and my dedication to improving healthcare accessibility. I believe that AI has the potential to transform the way we approach healthcare, making it more personalized and informative. This platform is a testament to that vision.
|
29 |
+
</p>
|
30 |
+
<h5>Join Me on this Journey
|
31 |
+
</h5>
|
32 |
+
<p>I invite you to explore [Your Website Name] and experience firsthand the fusion of AI and healthcare. Together, we can empower individuals with knowledge, promote well-being, and contribute to a brighter and healthier future.
|
33 |
+
</p>
|
34 |
+
</div>
|
35 |
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm" crossorigin="anonymous"></script>
|
36 |
+
</body>
|
37 |
+
</html>
|
diets.csv
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Disease,Diet
|
2 |
+
Fungal infection,"['Antifungal Diet', 'Probiotics', 'Garlic', 'Coconut oil', 'Turmeric']"
|
3 |
+
Allergy,"['Elimination Diet', 'Omega-3-rich foods', 'Vitamin C-rich foods', 'Quercetin-rich foods', 'Probiotics']"
|
4 |
+
GERD,"['Low-Acid Diet', 'Fiber-rich foods', 'Ginger', 'Licorice', 'Aloe vera juice']"
|
5 |
+
Chronic cholestasis,"['Low-Fat Diet', 'High-Fiber Diet', 'Lean proteins', 'Whole grains', 'Fresh fruits and vegetables']"
|
6 |
+
Drug Reaction,"['Antihistamine Diet', 'Omega-3-rich foods', 'Vitamin C-rich foods', 'Quercetin-rich foods', 'Probiotics']"
|
7 |
+
Peptic ulcer disease,"['Low-Acid Diet', 'Fiber-rich foods', 'Ginger', 'Licorice', 'Aloe vera juice']"
|
8 |
+
AIDS,"['Balanced Diet', 'Protein-rich foods', 'Fruits and vegetables', 'Whole grains', 'Healthy fats']"
|
9 |
+
Diabetes,"['Low-Glycemic Diet', 'Fiber-rich foods', 'Lean proteins', 'Healthy fats', 'Low-fat dairy']"
|
10 |
+
Gastroenteritis,"['Bland Diet', 'Bananas', 'Rice', 'Applesauce', 'Toast']"
|
11 |
+
Bronchial Asthma,"['Anti-Inflammatory Diet', 'Omega-3-rich foods', 'Fruits and vegetables', 'Whole grains', 'Lean proteins']"
|
12 |
+
Hypertension,"['DASH Diet', 'Low-sodium foods', 'Fruits and vegetables', 'Whole grains', 'Lean proteins']"
|
13 |
+
Migraine,"['Migraine Diet', 'Low-Tyramine Diet', 'Caffeine withdrawal', 'Hydration', 'Magnesium-rich foods']"
|
14 |
+
Cervical spondylosis,"['Arthritis Diet', 'Anti-Inflammatory Diet', 'Omega-3-rich foods', 'Fruits and vegetables', 'Whole grains']"
|
15 |
+
Paralysis (brain hemorrhage),"['Heart-Healthy Diet', 'Low-sodium foods', 'Fruits and vegetables', 'Whole grains', 'Lean proteins']"
|
16 |
+
Jaundice,"['Liver-Healthy Diet', 'Low-fat Diet', 'Fruits and vegetables', 'Whole grains', 'Lean proteins']"
|
17 |
+
Malaria,"['Malaria Diet', 'Hydration', 'High-Calorie Diet', 'Soft and bland foods', 'Oral rehydration solutions']"
|
18 |
+
Chicken pox,"['Chicken Pox Diet', 'High-Calorie Diet', 'Soft and bland foods', 'Hydration', 'Protein-rich foods']"
|
19 |
+
Dengue,"['Dengue Diet', 'Hydration', 'High-Calorie Diet', 'Soft and bland foods', 'Protein-rich foods']"
|
20 |
+
Typhoid,"['Typhoid Diet', 'High-Calorie Diet', 'Soft and bland foods', 'Hydration', 'Protein-rich foods']"
|
21 |
+
hepatitis A,"['Hepatitis A Diet', 'High-Calorie Diet', 'Soft and bland foods', 'Hydration', 'Protein-rich foods']"
|
22 |
+
Hepatitis B,"['Hepatitis B Diet', 'High-Calorie Diet', 'Soft and bland foods', 'Hydration', 'Protein-rich foods']"
|
23 |
+
Hepatitis C,"['Hepatitis C Diet', 'High-Calorie Diet', 'Soft and bland foods', 'Hydration', 'Protein-rich foods']"
|
24 |
+
Hepatitis D,"['Hepatitis D Diet', 'High-Calorie Diet', 'Soft and bland foods', 'Hydration', 'Protein-rich foods']"
|
25 |
+
Hepatitis E,"['Hepatitis E Diet', 'High-Calorie Diet', 'Soft and bland foods', 'Hydration', 'Protein-rich foods']"
|
26 |
+
Alcoholic hepatitis,"['Liver-Healthy Diet', 'Low-fat Diet', 'Fruits and vegetables', 'Whole grains', 'Lean proteins']"
|
27 |
+
Tuberculosis,"['TB Diet', 'High-Calorie Diet', 'Soft and bland foods', 'Hydration', 'Protein-rich foods']"
|
28 |
+
Common Cold,"['Cold Diet', 'Hydration', 'Warm fluids', 'Rest', 'Honey and lemon tea']"
|
29 |
+
Pneumonia,"['Pneumonia Diet', 'High-Calorie Diet', 'Soft and bland foods', 'Hydration', 'Protein-rich foods']"
|
30 |
+
Dimorphic hemmorhoids(piles),"['Hemorrhoids Diet', 'High-Fiber Diet', 'Hydration', 'Warm baths', 'Stool softeners']"
|
31 |
+
Heart attack,"['Heart-Healthy Diet', 'Low-sodium foods', 'Fruits and vegetables', 'Whole grains', 'Lean proteins']"
|
32 |
+
Varicose veins,"['Varicose Veins Diet', 'High-Fiber Diet', 'Fruits and vegetables', 'Whole grains', 'Low-sodium foods']"
|
33 |
+
Hypothyroidism,"['Hypothyroidism Diet', 'Iodine-rich foods', 'Selenium-rich foods', 'Fruits and vegetables', 'Whole grains']"
|
34 |
+
Hyperthyroidism,"['Hyperthyroidism Diet', 'Low-Iodine Diet', 'Calcium-rich foods', 'Selenium-rich foods', 'Fruits and vegetables']"
|
35 |
+
Hypoglycemia,"['Hypoglycemia Diet', 'Complex carbohydrates', 'Protein-rich snacks', 'Fiber-rich foods', 'Healthy fats']"
|
36 |
+
Osteoarthristis,"['Arthritis Diet', 'Anti-Inflammatory Diet', 'Omega-3-rich foods', 'Fruits and vegetables', 'Whole grains']"
|
37 |
+
Arthritis,"['Arthritis Diet', 'Anti-Inflammatory Diet', 'Omega-3-rich foods', 'Fruits and vegetables', 'Whole grains']"
|
38 |
+
(vertigo) Paroymsal Positional Vertigo,"['Vertigo Diet', 'Low-Salt Diet', 'Hydration', 'Ginger tea', 'Vitamin D-rich foods']"
|
39 |
+
Acne,"['Acne Diet', 'Low-Glycemic Diet', 'Hydration', 'Fruits and vegetables', 'Probiotics']"
|
40 |
+
Urinary tract infection,"['UTI Diet', 'Hydration', 'Cranberry juice', 'Probiotics', 'Vitamin C-rich foods']"
|
41 |
+
Psoriasis,"['Psoriasis Diet', 'Anti-Inflammatory Diet', 'Omega-3-rich foods', 'Fruits and vegetables', 'Whole grains']"
|
42 |
+
Impetigo,"['Impetigo Diet', 'Antibiotic treatment', 'Fruits and vegetables', 'Hydration', 'Protein-rich foods']"
|
img.png
ADDED
index.html
ADDED
@@ -0,0 +1,266 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!doctype html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="utf-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
6 |
+
<title>Health Care Center</title>
|
7 |
+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
|
8 |
+
</head>
|
9 |
+
|
10 |
+
<style>
|
11 |
+
|
12 |
+
.logo {
|
13 |
+
width: 50px;
|
14 |
+
height: 50px;
|
15 |
+
color: black;
|
16 |
+
margin-top: 0;
|
17 |
+
margin-left: 2px;
|
18 |
+
}
|
19 |
+
|
20 |
+
.myimg {
|
21 |
+
width: 50px;
|
22 |
+
height: 50px;
|
23 |
+
border: 2px solid black;
|
24 |
+
border-radius: 25px;
|
25 |
+
}
|
26 |
+
|
27 |
+
|
28 |
+
|
29 |
+
|
30 |
+
</style>
|
31 |
+
</head>
|
32 |
+
<body>
|
33 |
+
<!-- Navbar -->
|
34 |
+
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
35 |
+
<div class="container-fluid">
|
36 |
+
<!-- Logo at the top-left corner -->
|
37 |
+
<div class="logo">
|
38 |
+
<img class="myimg" src="{{ url_for('static', filename='img.png') }}" alt="">
|
39 |
+
</div>
|
40 |
+
|
41 |
+
<a class="navbar-brand" href="#">Health Center</a>
|
42 |
+
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
43 |
+
<span class="navbar-toggler-icon"></span>
|
44 |
+
</button>
|
45 |
+
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
46 |
+
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
47 |
+
<li class="nav-item">
|
48 |
+
<a class="nav-link active" aria-current="page" href="#">Home</a>
|
49 |
+
</li>
|
50 |
+
<li class="nav-item">
|
51 |
+
<a class="nav-link" href="/about">About</a>
|
52 |
+
</li>
|
53 |
+
<li class="nav-item">
|
54 |
+
<a class="nav-link" href="/contact">Contact</a>
|
55 |
+
</li>
|
56 |
+
<li class="nav-item">
|
57 |
+
<a class="nav-link" href="/developer">Developer</a>
|
58 |
+
</li>
|
59 |
+
<li class="nav-item">
|
60 |
+
<a class="nav-link" href="/blog">Blog</a>
|
61 |
+
</li>
|
62 |
+
</ul>
|
63 |
+
<form class="d-flex" role="search">
|
64 |
+
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
|
65 |
+
<button class="btn btn-outline-success" type="submit">Search</button>
|
66 |
+
</form>
|
67 |
+
</div>
|
68 |
+
</div>
|
69 |
+
</nav>
|
70 |
+
|
71 |
+
|
72 |
+
|
73 |
+
|
74 |
+
<!-- main form of page -->
|
75 |
+
<h1 class="mt-4 my-4 text-center text-green">Health Care Center</h1>
|
76 |
+
<div class="container my-4 mt-4" style="background: black; color: white; border-radius: 15px; padding: 40px;">
|
77 |
+
<form action="/predict" method="post">
|
78 |
+
<div class="form-group">
|
79 |
+
<label for="symptoms">Select Symptoms:</label>
|
80 |
+
<input type="text" class="form-control", id="symptoms" name="symptoms" placeholder="type systems such as itching, sleeping, aching etc">
|
81 |
+
|
82 |
+
</div>
|
83 |
+
<br>
|
84 |
+
<button type="button" id="startSpeechRecognition" class="btn btn-primary" style="margin-left:3px;border:1px solid white; border-radius:20px;">
|
85 |
+
Start Speech Recognition
|
86 |
+
</button>
|
87 |
+
<br>
|
88 |
+
|
89 |
+
<!-- Display the transcribed text here -->
|
90 |
+
<div name="mysysms" id="transcription"></div>
|
91 |
+
|
92 |
+
{% if message %}
|
93 |
+
<p>{{ message }}</p>
|
94 |
+
{% endif %}
|
95 |
+
<br>
|
96 |
+
|
97 |
+
<button type="submit" class="btn btn-danger btn-lg" style="width: 100%; padding: 14px; margin-bottom: 5px;">Predict</button>
|
98 |
+
</form>
|
99 |
+
</div>
|
100 |
+
|
101 |
+
|
102 |
+
|
103 |
+
|
104 |
+
|
105 |
+
|
106 |
+
|
107 |
+
|
108 |
+
{% if predicted_disease %}
|
109 |
+
|
110 |
+
<!-- Results -->
|
111 |
+
<h1 class="text-center my-4 mt-4">Our AI System Results</h1>
|
112 |
+
<div class="container">
|
113 |
+
|
114 |
+
<div class="result-container">
|
115 |
+
<!-- Buttons to toggle display -->
|
116 |
+
<button class="toggle-button" data-bs-toggle="modal" data-bs-target="#diseaseModal" style="padding:4px; margin: 5px 40px 5px 0; font-size:20px;font-weight:bold; width:140px; border-radius:5px; background:#F39334;color:black;">Disease</button>
|
117 |
+
<button class="toggle-button" data-bs-toggle="modal" data-bs-target="#descriptionModal" style="padding:4px; margin: 5px 40px 5px 0; font-size:20px;font-weight:bold; width:140px; border-radius:5px; background:#268AF3 ;color:black;">Description</button>
|
118 |
+
<button class="toggle-button" data-bs-toggle="modal" data-bs-target="#precautionModal" style="padding:4px; margin: 5px 40px 5px 0; font-size:20px;font-weight:bold; width:140px; border-radius:5px; background:#F371F9 ;color:black;">Precaution</button>
|
119 |
+
<button class="toggle-button" data-bs-toggle="modal" data-bs-target="#medicationsModal" style="padding:4px; margin: 5px 40px 5px 0; font-size:20px;font-weight:bold; width:140px;border-radius:5px; background:#F8576F ;color:black;">Medications</button>
|
120 |
+
<button class="toggle-button" data-bs-toggle="modal" data-bs-target="#workoutsModal" style="padding:4px; margin: 5px 40px 5px 0; font-size:20px;font-weight:bold; width:140px; border-radius:5px; background:#99F741 ;color:black;">Workouts</button>
|
121 |
+
<button class="toggle-button" data-bs-toggle="modal" data-bs-target="#dietsModal" style="padding:4px; margin: 5px 40px 5px 0; font-size:20px;font-weight:bold; width:140px; border-radius:5px; background:#E5E23D;color:black;">Diets</button>
|
122 |
+
</div>
|
123 |
+
</div>
|
124 |
+
|
125 |
+
{% endif %}
|
126 |
+
|
127 |
+
<!-- Disease Modal -->
|
128 |
+
<div class="modal fade" id="diseaseModal" tabindex="-1" aria-labelledby="diseaseModalLabel" aria-hidden="true">
|
129 |
+
<div class="modal-dialog">
|
130 |
+
<div class="modal-content">
|
131 |
+
<div class="modal-header" style="background-color: #020606; color:white;"> <!-- Set header background color inline -->
|
132 |
+
<h5 class="modal-title" id="diseaseModalLabel">Predicted Disease</h5>
|
133 |
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
134 |
+
</div>
|
135 |
+
<div class="modal-body" style="background-color: #F7F7F7;"> <!-- Set modal body background color inline -->
|
136 |
+
<p>{{ predicted_disease }}</p>
|
137 |
+
</div>
|
138 |
+
</div>
|
139 |
+
</div>
|
140 |
+
</div>
|
141 |
+
|
142 |
+
|
143 |
+
<!-- Description Modal -->
|
144 |
+
<div class="modal fade" id="descriptionModal" tabindex="-1" aria-labelledby="descriptionModalLabel" aria-hidden="true">
|
145 |
+
<div class="modal-dialog">
|
146 |
+
<div class="modal-content">
|
147 |
+
<div class="modal-header" style="background-color: #020606; color:white;">
|
148 |
+
<h5 class="modal-title" id="descriptionModalLabel">Description</h5>
|
149 |
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
150 |
+
</div>
|
151 |
+
<div class="modal-body">
|
152 |
+
<p>{{ dis_des }}</p>
|
153 |
+
</div>
|
154 |
+
</div>
|
155 |
+
</div>
|
156 |
+
</div>
|
157 |
+
|
158 |
+
<!-- Precaution Modal -->
|
159 |
+
<div class="modal fade" id="precautionModal" tabindex="-1" aria-labelledby="precautionModalLabel" aria-hidden="true">
|
160 |
+
<div class="modal-dialog">
|
161 |
+
<div class="modal-content">
|
162 |
+
<div class="modal-header" style="background-color: #020606; color:white;">
|
163 |
+
<h5 class="modal-title" id="precautionModalLabel">Precaution</h5>
|
164 |
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
165 |
+
</div>
|
166 |
+
<div class="modal-body">
|
167 |
+
<ul>
|
168 |
+
{% for i in my_precautions %}
|
169 |
+
<li>{{ i }}</li>
|
170 |
+
{% endfor %}
|
171 |
+
</ul>
|
172 |
+
</div>
|
173 |
+
</div>
|
174 |
+
</div>
|
175 |
+
</div>
|
176 |
+
|
177 |
+
|
178 |
+
|
179 |
+
|
180 |
+
<!-- Medications Modal -->
|
181 |
+
<div class="modal fade" id="medicationsModal" tabindex="-1" aria-labelledby="medicationsModalLabel" aria-hidden="true">
|
182 |
+
<div class="modal-dialog">
|
183 |
+
<div class="modal-content">
|
184 |
+
<div class="modal-header" style="background-color: #020606; color:white;">
|
185 |
+
<h5 class="modal-title" id="medicationsModalLabel">Medications</h5>
|
186 |
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
187 |
+
</div>
|
188 |
+
<div class="modal-body">
|
189 |
+
<ul>
|
190 |
+
{% for i in medications %}
|
191 |
+
<li>{{ i }}</li>
|
192 |
+
{% endfor %}
|
193 |
+
</ul>
|
194 |
+
</div>
|
195 |
+
</div>
|
196 |
+
</div>
|
197 |
+
</div>
|
198 |
+
|
199 |
+
<!-- Workouts Modal -->
|
200 |
+
<div class="modal fade" id="workoutsModal" tabindex="-1" aria-labelledby="workoutsModalLabel" aria-hidden="true">
|
201 |
+
<div class="modal-dialog" >
|
202 |
+
<div class="modal-content">
|
203 |
+
<div class="modal-header" style="background-color: #020606; color:white;">
|
204 |
+
<h5 class="modal-title" id="workoutsModalLabel">Workouts</h5>
|
205 |
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
206 |
+
</div>
|
207 |
+
<div class="modal-body">
|
208 |
+
<ul>
|
209 |
+
{% for i in workout %}
|
210 |
+
<li>{{ i }}</li>
|
211 |
+
{% endfor %}
|
212 |
+
</ul>
|
213 |
+
</div>
|
214 |
+
</div>
|
215 |
+
</div>
|
216 |
+
</div>
|
217 |
+
|
218 |
+
<!-- Diets Modal -->
|
219 |
+
<div class="modal fade" id="dietsModal" tabindex="-1" aria-labelledby="dietsModalLabel" aria-hidden="true">
|
220 |
+
<div class="modal-dialog">
|
221 |
+
<div class="modal-content">
|
222 |
+
<div class="modal-header" style="background-color: #020606; color:white;">
|
223 |
+
<h5 class="modal-title" id="dietsModalLabel">Diets</h5>
|
224 |
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
225 |
+
</div>
|
226 |
+
<div class="modal-body">
|
227 |
+
<ul>
|
228 |
+
{% for i in my_diet %}
|
229 |
+
<li>{{ i }}</li>
|
230 |
+
{% endfor %}
|
231 |
+
</ul>
|
232 |
+
</div>
|
233 |
+
</div>
|
234 |
+
</div>
|
235 |
+
</div>
|
236 |
+
|
237 |
+
|
238 |
+
|
239 |
+
<script>
|
240 |
+
const startSpeechRecognitionButton = document.getElementById('startSpeechRecognition');
|
241 |
+
const transcriptionDiv = document.getElementById('transcription');
|
242 |
+
|
243 |
+
startSpeechRecognitionButton.addEventListener('click', startSpeechRecognition);
|
244 |
+
|
245 |
+
function startSpeechRecognition() {
|
246 |
+
const recognition = new webkitSpeechRecognition(); // Use webkitSpeechRecognition for compatibility
|
247 |
+
|
248 |
+
recognition.lang = 'en-US'; // Set the language for recognition
|
249 |
+
|
250 |
+
recognition.onresult = function (event) {
|
251 |
+
const result = event.results[0][0].transcript;
|
252 |
+
transcriptionDiv.textContent = result;
|
253 |
+
};
|
254 |
+
|
255 |
+
recognition.onend = function () {
|
256 |
+
console.log('Speech recognition ended.');
|
257 |
+
};
|
258 |
+
|
259 |
+
recognition.start();
|
260 |
+
}
|
261 |
+
</script>
|
262 |
+
|
263 |
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm" crossorigin="anonymous"></script>
|
264 |
+
</body>
|
265 |
+
|
266 |
+
</html>
|
main.py
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from flask import Flask, request, render_template, jsonify # Import jsonify
|
2 |
+
import numpy as np
|
3 |
+
import pandas as pd
|
4 |
+
import pickle
|
5 |
+
|
6 |
+
|
7 |
+
# flask app
|
8 |
+
app = Flask(__name__)
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
# load databasedataset===================================
|
13 |
+
sym_des = pd.read_csv("symtoms_df.csv")
|
14 |
+
precautions = pd.read_csv("precautions_df.csv")
|
15 |
+
workout = pd.read_csv("workout_df.csv")
|
16 |
+
description = pd.read_csv("description.csv")
|
17 |
+
medications = pd.read_csv('medications.csv')
|
18 |
+
diets = pd.read_csv("diets.csv")
|
19 |
+
|
20 |
+
|
21 |
+
# load model===========================================
|
22 |
+
svc = pickle.load(open('svc.pkl','rb'))
|
23 |
+
|
24 |
+
|
25 |
+
#============================================================
|
26 |
+
# custome and helping functions
|
27 |
+
#==========================helper funtions================
|
28 |
+
def helper(dis):
|
29 |
+
desc = description[description['Disease'] == dis]['Description']
|
30 |
+
desc = " ".join([w for w in desc])
|
31 |
+
|
32 |
+
pre = precautions[precautions['Disease'] == dis][['Precaution_1', 'Precaution_2', 'Precaution_3', 'Precaution_4']]
|
33 |
+
pre = [col for col in pre.values]
|
34 |
+
|
35 |
+
med = medications[medications['Disease'] == dis]['Medication']
|
36 |
+
med = [med for med in med.values]
|
37 |
+
|
38 |
+
die = diets[diets['Disease'] == dis]['Diet']
|
39 |
+
die = [die for die in die.values]
|
40 |
+
|
41 |
+
wrkout = workout[workout['disease'] == dis] ['workout']
|
42 |
+
|
43 |
+
|
44 |
+
return desc,pre,med,die,wrkout
|
45 |
+
|
46 |
+
symptoms_dict = {'itching': 0, 'skin_rash': 1, 'nodal_skin_eruptions': 2, 'continuous_sneezing': 3, 'shivering': 4, 'chills': 5, 'joint_pain': 6, 'stomach_pain': 7, 'acidity': 8, 'ulcers_on_tongue': 9, 'muscle_wasting': 10, 'vomiting': 11, 'burning_micturition': 12, 'spotting_ urination': 13, 'fatigue': 14, 'weight_gain': 15, 'anxiety': 16, 'cold_hands_and_feets': 17, 'mood_swings': 18, 'weight_loss': 19, 'restlessness': 20, 'lethargy': 21, 'patches_in_throat': 22, 'irregular_sugar_level': 23, 'cough': 24, 'high_fever': 25, 'sunken_eyes': 26, 'breathlessness': 27, 'sweating': 28, 'dehydration': 29, 'indigestion': 30, 'headache': 31, 'yellowish_skin': 32, 'dark_urine': 33, 'nausea': 34, 'loss_of_appetite': 35, 'pain_behind_the_eyes': 36, 'back_pain': 37, 'constipation': 38, 'abdominal_pain': 39, 'diarrhoea': 40, 'mild_fever': 41, 'yellow_urine': 42, 'yellowing_of_eyes': 43, 'acute_liver_failure': 44, 'fluid_overload': 45, 'swelling_of_stomach': 46, 'swelled_lymph_nodes': 47, 'malaise': 48, 'blurred_and_distorted_vision': 49, 'phlegm': 50, 'throat_irritation': 51, 'redness_of_eyes': 52, 'sinus_pressure': 53, 'runny_nose': 54, 'congestion': 55, 'chest_pain': 56, 'weakness_in_limbs': 57, 'fast_heart_rate': 58, 'pain_during_bowel_movements': 59, 'pain_in_anal_region': 60, 'bloody_stool': 61, 'irritation_in_anus': 62, 'neck_pain': 63, 'dizziness': 64, 'cramps': 65, 'bruising': 66, 'obesity': 67, 'swollen_legs': 68, 'swollen_blood_vessels': 69, 'puffy_face_and_eyes': 70, 'enlarged_thyroid': 71, 'brittle_nails': 72, 'swollen_extremeties': 73, 'excessive_hunger': 74, 'extra_marital_contacts': 75, 'drying_and_tingling_lips': 76, 'slurred_speech': 77, 'knee_pain': 78, 'hip_joint_pain': 79, 'muscle_weakness': 80, 'stiff_neck': 81, 'swelling_joints': 82, 'movement_stiffness': 83, 'spinning_movements': 84, 'loss_of_balance': 85, 'unsteadiness': 86, 'weakness_of_one_body_side': 87, 'loss_of_smell': 88, 'bladder_discomfort': 89, 'foul_smell_of urine': 90, 'continuous_feel_of_urine': 91, 'passage_of_gases': 92, 'internal_itching': 93, 'toxic_look_(typhos)': 94, 'depression': 95, 'irritability': 96, 'muscle_pain': 97, 'altered_sensorium': 98, 'red_spots_over_body': 99, 'belly_pain': 100, 'abnormal_menstruation': 101, 'dischromic _patches': 102, 'watering_from_eyes': 103, 'increased_appetite': 104, 'polyuria': 105, 'family_history': 106, 'mucoid_sputum': 107, 'rusty_sputum': 108, 'lack_of_concentration': 109, 'visual_disturbances': 110, 'receiving_blood_transfusion': 111, 'receiving_unsterile_injections': 112, 'coma': 113, 'stomach_bleeding': 114, 'distention_of_abdomen': 115, 'history_of_alcohol_consumption': 116, 'fluid_overload.1': 117, 'blood_in_sputum': 118, 'prominent_veins_on_calf': 119, 'palpitations': 120, 'painful_walking': 121, 'pus_filled_pimples': 122, 'blackheads': 123, 'scurring': 124, 'skin_peeling': 125, 'silver_like_dusting': 126, 'small_dents_in_nails': 127, 'inflammatory_nails': 128, 'blister': 129, 'red_sore_around_nose': 130, 'yellow_crust_ooze': 131}
|
47 |
+
diseases_list = {15: 'Fungal infection', 4: 'Allergy', 16: 'GERD', 9: 'Chronic cholestasis', 14: 'Drug Reaction', 33: 'Peptic ulcer diseae', 1: 'AIDS', 12: 'Diabetes ', 17: 'Gastroenteritis', 6: 'Bronchial Asthma', 23: 'Hypertension ', 30: 'Migraine', 7: 'Cervical spondylosis', 32: 'Paralysis (brain hemorrhage)', 28: 'Jaundice', 29: 'Malaria', 8: 'Chicken pox', 11: 'Dengue', 37: 'Typhoid', 40: 'hepatitis A', 19: 'Hepatitis B', 20: 'Hepatitis C', 21: 'Hepatitis D', 22: 'Hepatitis E', 3: 'Alcoholic hepatitis', 36: 'Tuberculosis', 10: 'Common Cold', 34: 'Pneumonia', 13: 'Dimorphic hemmorhoids(piles)', 18: 'Heart attack', 39: 'Varicose veins', 26: 'Hypothyroidism', 24: 'Hyperthyroidism', 25: 'Hypoglycemia', 31: 'Osteoarthristis', 5: 'Arthritis', 0: '(vertigo) Paroymsal Positional Vertigo', 2: 'Acne', 38: 'Urinary tract infection', 35: 'Psoriasis', 27: 'Impetigo'}
|
48 |
+
|
49 |
+
# Model Prediction function
|
50 |
+
def get_predicted_value(patient_symptoms):
|
51 |
+
input_vector = np.zeros(len(symptoms_dict))
|
52 |
+
for item in patient_symptoms:
|
53 |
+
input_vector[symptoms_dict[item]] = 1
|
54 |
+
return diseases_list[svc.predict([input_vector])[0]]
|
55 |
+
|
56 |
+
|
57 |
+
|
58 |
+
|
59 |
+
# creating routes========================================
|
60 |
+
|
61 |
+
|
62 |
+
@app.route("/")
|
63 |
+
def index():
|
64 |
+
return render_template("index.html")
|
65 |
+
|
66 |
+
# Define a route for the home page
|
67 |
+
@app.route('/predict', methods=['GET', 'POST'])
|
68 |
+
def home():
|
69 |
+
if request.method == 'POST':
|
70 |
+
symptoms = request.form.get('symptoms')
|
71 |
+
# mysysms = request.form.get('mysysms')
|
72 |
+
# print(mysysms)
|
73 |
+
print(symptoms)
|
74 |
+
if symptoms =="Symptoms":
|
75 |
+
message = "Please either write symptoms or you have written misspelled symptoms"
|
76 |
+
return render_template('index.html', message=message)
|
77 |
+
else:
|
78 |
+
|
79 |
+
# Split the user's input into a list of symptoms (assuming they are comma-separated)
|
80 |
+
user_symptoms = [s.strip() for s in symptoms.split(',')]
|
81 |
+
# Remove any extra characters, if any
|
82 |
+
user_symptoms = [symptom.strip("[]' ") for symptom in user_symptoms]
|
83 |
+
predicted_disease = get_predicted_value(user_symptoms)
|
84 |
+
dis_des, precautions, medications, rec_diet, workout = helper(predicted_disease)
|
85 |
+
|
86 |
+
my_precautions = []
|
87 |
+
for i in precautions[0]:
|
88 |
+
my_precautions.append(i)
|
89 |
+
|
90 |
+
return render_template('index.html', predicted_disease=predicted_disease, dis_des=dis_des,
|
91 |
+
my_precautions=my_precautions, medications=medications, my_diet=rec_diet,
|
92 |
+
workout=workout)
|
93 |
+
|
94 |
+
return render_template('index.html')
|
95 |
+
|
96 |
+
|
97 |
+
|
98 |
+
# about view funtion and path
|
99 |
+
@app.route('/about')
|
100 |
+
def about():
|
101 |
+
return render_template("about.html")
|
102 |
+
# contact view funtion and path
|
103 |
+
@app.route('/contact')
|
104 |
+
def contact():
|
105 |
+
return render_template("contact.html")
|
106 |
+
|
107 |
+
# developer view funtion and path
|
108 |
+
@app.route('/developer')
|
109 |
+
def developer():
|
110 |
+
return render_template("developer.html")
|
111 |
+
|
112 |
+
# about view funtion and path
|
113 |
+
@app.route('/blog')
|
114 |
+
def blog():
|
115 |
+
return render_template("blog.html")
|
116 |
+
|
117 |
+
|
118 |
+
if __name__ == '__main__':
|
119 |
+
|
120 |
+
app.run(debug=True)
|
medications.csv
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Disease,Medication
|
2 |
+
Fungal infection,"['Antifungal Cream', 'Fluconazole', 'Terbinafine', 'Clotrimazole', 'Ketoconazole']"
|
3 |
+
Allergy,"['Antihistamines', 'Decongestants', 'Epinephrine', 'Corticosteroids', 'Immunotherapy']"
|
4 |
+
GERD,"['Proton Pump Inhibitors (PPIs)', 'H2 Blockers', 'Antacids', 'Prokinetics', 'Antibiotics']"
|
5 |
+
Chronic cholestasis,"['Ursodeoxycholic acid', 'Cholestyramine', 'Methotrexate', 'Corticosteroids', 'Liver transplant']"
|
6 |
+
Drug Reaction,"['Antihistamines', 'Epinephrine', 'Corticosteroids', 'Antibiotics', 'Antifungal Cream']"
|
7 |
+
Peptic ulcer disease,"['Antibiotics', 'Proton Pump Inhibitors (PPIs)', 'H2 Blockers', 'Antacids', 'Cytoprotective agents']"
|
8 |
+
AIDS,"['Antiretroviral drugs', 'Protease inhibitors', 'Integrase inhibitors', 'Entry inhibitors', 'Fusion inhibitors']"
|
9 |
+
Diabetes,"['Insulin', 'Metformin', 'Sulfonylureas', 'DPP-4 inhibitors', 'GLP-1 receptor agonists']"
|
10 |
+
Gastroenteritis,"['Antibiotics', 'Antiemetic drugs', 'Antidiarrheal drugs', 'IV fluids', 'Probiotics']"
|
11 |
+
Bronchial Asthma,"['Bronchodilators', 'Inhaled corticosteroids', 'Leukotriene modifiers', 'Mast cell stabilizers', 'Anticholinergics']"
|
12 |
+
Hypertension,"['Antihypertensive medications', 'Diuretics', 'Beta-blockers', 'ACE inhibitors', 'Calcium channel blockers']"
|
13 |
+
Migraine,"['Analgesics', 'Triptans', 'Ergotamine derivatives', 'Preventive medications', 'Biofeedback']"
|
14 |
+
Cervical spondylosis,"['Pain relievers', 'Muscle relaxants', 'Physical therapy', 'Neck braces', 'Corticosteroids']"
|
15 |
+
Paralysis (brain hemorrhage),"['Blood thinners', 'Clot-dissolving medications', 'Anticonvulsants', 'Physical therapy', 'Occupational therapy']"
|
16 |
+
Jaundice,"['IV fluids', 'Blood transfusions', 'Liver transplant', 'Medications for itching', 'Antiviral medications']"
|
17 |
+
Malaria,"['Antimalarial drugs', 'Antipyretics', 'Antiemetic drugs', 'IV fluids', 'Blood transfusions']"
|
18 |
+
Chicken pox,"['Antiviral drugs', 'Pain relievers', 'IV fluids', 'Blood transfusions', 'Platelet transfusions']"
|
19 |
+
Dengue,"['Antibiotics', 'Antipyretics', 'Analgesics', 'IV fluids', 'Corticosteroids']"
|
20 |
+
Typhoid,"['Vaccination', 'Antiviral drugs', 'IV fluids', 'Blood transfusions', 'Liver transplant']"
|
21 |
+
hepatitis A,"['Vaccination', 'Antiviral drugs', 'IV fluids', 'Blood transfusions', 'Liver transplant']"
|
22 |
+
Hepatitis B,"['Antiviral drugs', 'IV fluids', 'Blood transfusions', 'Platelet transfusions', 'Liver transplant']"
|
23 |
+
Hepatitis C,"['Antiviral drugs', 'IV fluids', 'Blood transfusions', 'Platelet transfusions', 'Liver transplant']"
|
24 |
+
Hepatitis D,"['Antiviral drugs', 'IV fluids', 'Blood transfusions', 'Platelet transfusions', 'Liver transplant']"
|
25 |
+
Hepatitis E,"['Alcohol cessation', 'Corticosteroids', 'IV fluids', 'Liver transplant', 'Nutritional support']"
|
26 |
+
Alcoholic hepatitis,"['Antibiotics', 'Isoniazid', 'Rifampin', 'Ethambutol', 'Pyrazinamide']"
|
27 |
+
Tuberculosis,"['Antipyretics', 'Decongestants', 'Cough suppressants', 'Antihistamines', 'Pain relievers']"
|
28 |
+
Common Cold,"['Antibiotics', 'Antiviral drugs', 'Antifungal drugs', 'IV fluids', 'Oxygen therapy']"
|
29 |
+
Pneumonia,"['Laxatives', 'Pain relievers', 'Warm baths', 'Cold compresses', 'High-fiber diet']"
|
30 |
+
Dimorphic hemmorhoids(piles),"['Nitroglycerin', 'Aspirin', 'Beta-blockers', 'Calcium channel blockers', 'Thrombolytic drugs']"
|
31 |
+
Heart attack,"['Compression stockings', 'Exercise', 'Elevating the legs', 'Sclerotherapy', 'Laser treatments']"
|
32 |
+
Varicose veins,"['Levothyroxine', 'Antithyroid medications', 'Beta-blockers', 'Radioactive iodine', 'Thyroid surgery']"
|
33 |
+
Hypothyroidism,"['Antithyroid medications', 'Radioactive iodine', 'Thyroid surgery', 'Beta-blockers', 'Corticosteroids']"
|
34 |
+
Hyperthyroidism,"['Glucose tablets', 'Candy or juice', 'Glucagon injection', 'IV dextrose', 'Diazoxide']"
|
35 |
+
Hypoglycemia,"['Pain relievers', 'Exercise', 'Hot and cold packs', 'Joint protection', 'Physical therapy']"
|
36 |
+
Osteoarthristis,"['NSAIDs', 'Disease-modifying antirheumatic drugs (DMARDs)', 'Biologics', 'Corticosteroids', 'Joint replacement surgery']"
|
37 |
+
Arthritis,"['Vestibular rehabilitation', 'Canalith repositioning', 'Medications for nausea', 'Surgery', 'Home exercises']"
|
38 |
+
(vertigo) Paroymsal Positional Vertigo,"['Topical treatments', 'Antibiotics', 'Oral medications', 'Hormonal treatments', 'Isotretinoin']"
|
39 |
+
Acne,"['Antibiotics', 'Pain relievers', 'Antihistamines', 'Corticosteroids', 'Topical treatments']"
|
40 |
+
Urinary tract infection,"['Antibiotics', 'Urinary analgesics', 'Phenazopyridine', 'Antispasmodics', 'Probiotics']"
|
41 |
+
Psoriasis,"['Topical treatments', 'Phototherapy', 'Systemic medications', 'Biologics', 'Coal tar']"
|
42 |
+
Impetigo,"['Topical antibiotics', 'Oral antibiotics', 'Antiseptics', 'Ointments', 'Warm compresses']"
|
medicine_recommendation_system.py
ADDED
@@ -0,0 +1,223 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# -*- coding: utf-8 -*-
|
2 |
+
"""Medicine Recommendation System.ipynb
|
3 |
+
|
4 |
+
Automatically generated by Colab.
|
5 |
+
|
6 |
+
Original file is located at
|
7 |
+
https://colab.research.google.com/drive/14_xuicBiGfCSaq81L12iVQ2rMCUTxXHC
|
8 |
+
|
9 |
+
# Title: Personalized Medical Recommendation System with Machine Learning
|
10 |
+
|
11 |
+
# Description:
|
12 |
+
|
13 |
+
Welcome to our cutting-edge Personalized Medical Recommendation System, a powerful platform designed to assist users in understanding and managing their health. Leveraging the capabilities of machine learning, our system analyzes user-input symptoms to predict potential diseases accurately.
|
14 |
+
|
15 |
+
# load dataset & tools
|
16 |
+
"""
|
17 |
+
|
18 |
+
import pandas as pd
|
19 |
+
|
20 |
+
dataset = pd.read_csv('Training.csv')
|
21 |
+
|
22 |
+
dataset
|
23 |
+
|
24 |
+
# vals = dataset.values.flatten()
|
25 |
+
|
26 |
+
dataset.shape
|
27 |
+
|
28 |
+
"""# train test split"""
|
29 |
+
|
30 |
+
from sklearn.model_selection import train_test_split
|
31 |
+
from sklearn.preprocessing import LabelEncoder
|
32 |
+
|
33 |
+
X = dataset.drop('prognosis', axis=1)
|
34 |
+
y = dataset['prognosis']
|
35 |
+
|
36 |
+
# ecoding prognonsis
|
37 |
+
le = LabelEncoder()
|
38 |
+
le.fit(y)
|
39 |
+
Y = le.transform(y)
|
40 |
+
|
41 |
+
X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size=0.3, random_state=20)
|
42 |
+
|
43 |
+
"""# Training top models"""
|
44 |
+
|
45 |
+
from sklearn.datasets import make_classification
|
46 |
+
from sklearn.model_selection import train_test_split
|
47 |
+
from sklearn.svm import SVC
|
48 |
+
from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier
|
49 |
+
from sklearn.neighbors import KNeighborsClassifier
|
50 |
+
from sklearn.naive_bayes import MultinomialNB
|
51 |
+
from sklearn.metrics import accuracy_score, confusion_matrix
|
52 |
+
import numpy as np
|
53 |
+
|
54 |
+
|
55 |
+
# Create a dictionary to store models
|
56 |
+
models = {
|
57 |
+
'SVC': SVC(kernel='linear'),
|
58 |
+
'RandomForest': RandomForestClassifier(n_estimators=100, random_state=42),
|
59 |
+
'GradientBoosting': GradientBoostingClassifier(n_estimators=100, random_state=42),
|
60 |
+
'KNeighbors': KNeighborsClassifier(n_neighbors=5),
|
61 |
+
'MultinomialNB': MultinomialNB()
|
62 |
+
}
|
63 |
+
|
64 |
+
# Loop through the models, train, test, and print results
|
65 |
+
for model_name, model in models.items():
|
66 |
+
# Train the model
|
67 |
+
model.fit(X_train, y_train)
|
68 |
+
|
69 |
+
# Test the model
|
70 |
+
predictions = model.predict(X_test)
|
71 |
+
|
72 |
+
# Calculate accuracy
|
73 |
+
accuracy = accuracy_score(y_test, predictions)
|
74 |
+
print(f"{model_name} Accuracy: {accuracy}")
|
75 |
+
|
76 |
+
# Calculate confusion matrix
|
77 |
+
cm = confusion_matrix(y_test, predictions)
|
78 |
+
print(f"{model_name} Confusion Matrix:")
|
79 |
+
print(np.array2string(cm, separator=', '))
|
80 |
+
|
81 |
+
print("\n" + "="*40 + "\n")
|
82 |
+
|
83 |
+
"""# single prediction"""
|
84 |
+
|
85 |
+
# selecting svc
|
86 |
+
svc = SVC(kernel='linear')
|
87 |
+
svc.fit(X_train,y_train)
|
88 |
+
ypred = svc.predict(X_test)
|
89 |
+
accuracy_score(y_test,ypred)
|
90 |
+
|
91 |
+
# save svc
|
92 |
+
import pickle
|
93 |
+
pickle.dump(svc,open('svc.pkl','wb'))
|
94 |
+
|
95 |
+
# load model
|
96 |
+
svc = pickle.load(open('svc.pkl','rb'))
|
97 |
+
|
98 |
+
# test 1:
|
99 |
+
print("predicted disease :",svc.predict(X_test.iloc[0].values.reshape(1,-1)))
|
100 |
+
print("Actual Disease :", y_test[0])
|
101 |
+
|
102 |
+
# test 2:
|
103 |
+
print("predicted disease :",svc.predict(X_test.iloc[100].values.reshape(1,-1)))
|
104 |
+
print("Actual Disease :", y_test[100])
|
105 |
+
|
106 |
+
"""# Recommendation System and Prediction
|
107 |
+
|
108 |
+
# load database and use logic for recommendations
|
109 |
+
"""
|
110 |
+
|
111 |
+
sym_des = pd.read_csv("symtoms_df.csv")
|
112 |
+
precautions = pd.read_csv("precautions_df.csv")
|
113 |
+
workout = pd.read_csv("workout_df.csv")
|
114 |
+
description = pd.read_csv("description.csv")
|
115 |
+
medications = pd.read_csv('medications.csv')
|
116 |
+
diets = pd.read_csv("diets.csv")
|
117 |
+
|
118 |
+
#============================================================
|
119 |
+
# custome and helping functions
|
120 |
+
#==========================helper funtions================
|
121 |
+
def helper(dis):
|
122 |
+
desc = description[description['Disease'] == predicted_disease]['Description']
|
123 |
+
desc = " ".join([w for w in desc])
|
124 |
+
|
125 |
+
pre = precautions[precautions['Disease'] == dis][['Precaution_1', 'Precaution_2', 'Precaution_3', 'Precaution_4']]
|
126 |
+
pre = [col for col in pre.values]
|
127 |
+
|
128 |
+
med = medications[medications['Disease'] == dis]['Medication']
|
129 |
+
med = [med for med in med.values]
|
130 |
+
|
131 |
+
die = diets[diets['Disease'] == dis]['Diet']
|
132 |
+
die = [die for die in die.values]
|
133 |
+
|
134 |
+
wrkout = workout[workout['disease'] == dis] ['workout']
|
135 |
+
|
136 |
+
|
137 |
+
return desc,pre,med,die,wrkout
|
138 |
+
|
139 |
+
symptoms_dict = {'itching': 0, 'skin_rash': 1, 'nodal_skin_eruptions': 2, 'continuous_sneezing': 3, 'shivering': 4, 'chills': 5, 'joint_pain': 6, 'stomach_pain': 7, 'acidity': 8, 'ulcers_on_tongue': 9, 'muscle_wasting': 10, 'vomiting': 11, 'burning_micturition': 12, 'spotting_ urination': 13, 'fatigue': 14, 'weight_gain': 15, 'anxiety': 16, 'cold_hands_and_feets': 17, 'mood_swings': 18, 'weight_loss': 19, 'restlessness': 20, 'lethargy': 21, 'patches_in_throat': 22, 'irregular_sugar_level': 23, 'cough': 24, 'high_fever': 25, 'sunken_eyes': 26, 'breathlessness': 27, 'sweating': 28, 'dehydration': 29, 'indigestion': 30, 'headache': 31, 'yellowish_skin': 32, 'dark_urine': 33, 'nausea': 34, 'loss_of_appetite': 35, 'pain_behind_the_eyes': 36, 'back_pain': 37, 'constipation': 38, 'abdominal_pain': 39, 'diarrhoea': 40, 'mild_fever': 41, 'yellow_urine': 42, 'yellowing_of_eyes': 43, 'acute_liver_failure': 44, 'fluid_overload': 45, 'swelling_of_stomach': 46, 'swelled_lymph_nodes': 47, 'malaise': 48, 'blurred_and_distorted_vision': 49, 'phlegm': 50, 'throat_irritation': 51, 'redness_of_eyes': 52, 'sinus_pressure': 53, 'runny_nose': 54, 'congestion': 55, 'chest_pain': 56, 'weakness_in_limbs': 57, 'fast_heart_rate': 58, 'pain_during_bowel_movements': 59, 'pain_in_anal_region': 60, 'bloody_stool': 61, 'irritation_in_anus': 62, 'neck_pain': 63, 'dizziness': 64, 'cramps': 65, 'bruising': 66, 'obesity': 67, 'swollen_legs': 68, 'swollen_blood_vessels': 69, 'puffy_face_and_eyes': 70, 'enlarged_thyroid': 71, 'brittle_nails': 72, 'swollen_extremeties': 73, 'excessive_hunger': 74, 'extra_marital_contacts': 75, 'drying_and_tingling_lips': 76, 'slurred_speech': 77, 'knee_pain': 78, 'hip_joint_pain': 79, 'muscle_weakness': 80, 'stiff_neck': 81, 'swelling_joints': 82, 'movement_stiffness': 83, 'spinning_movements': 84, 'loss_of_balance': 85, 'unsteadiness': 86, 'weakness_of_one_body_side': 87, 'loss_of_smell': 88, 'bladder_discomfort': 89, 'foul_smell_of urine': 90, 'continuous_feel_of_urine': 91, 'passage_of_gases': 92, 'internal_itching': 93, 'toxic_look_(typhos)': 94, 'depression': 95, 'irritability': 96, 'muscle_pain': 97, 'altered_sensorium': 98, 'red_spots_over_body': 99, 'belly_pain': 100, 'abnormal_menstruation': 101, 'dischromic _patches': 102, 'watering_from_eyes': 103, 'increased_appetite': 104, 'polyuria': 105, 'family_history': 106, 'mucoid_sputum': 107, 'rusty_sputum': 108, 'lack_of_concentration': 109, 'visual_disturbances': 110, 'receiving_blood_transfusion': 111, 'receiving_unsterile_injections': 112, 'coma': 113, 'stomach_bleeding': 114, 'distention_of_abdomen': 115, 'history_of_alcohol_consumption': 116, 'fluid_overload.1': 117, 'blood_in_sputum': 118, 'prominent_veins_on_calf': 119, 'palpitations': 120, 'painful_walking': 121, 'pus_filled_pimples': 122, 'blackheads': 123, 'scurring': 124, 'skin_peeling': 125, 'silver_like_dusting': 126, 'small_dents_in_nails': 127, 'inflammatory_nails': 128, 'blister': 129, 'red_sore_around_nose': 130, 'yellow_crust_ooze': 131}
|
140 |
+
diseases_list = {15: 'Fungal infection', 4: 'Allergy', 16: 'GERD', 9: 'Chronic cholestasis', 14: 'Drug Reaction', 33: 'Peptic ulcer diseae', 1: 'AIDS', 12: 'Diabetes ', 17: 'Gastroenteritis', 6: 'Bronchial Asthma', 23: 'Hypertension ', 30: 'Migraine', 7: 'Cervical spondylosis', 32: 'Paralysis (brain hemorrhage)', 28: 'Jaundice', 29: 'Malaria', 8: 'Chicken pox', 11: 'Dengue', 37: 'Typhoid', 40: 'hepatitis A', 19: 'Hepatitis B', 20: 'Hepatitis C', 21: 'Hepatitis D', 22: 'Hepatitis E', 3: 'Alcoholic hepatitis', 36: 'Tuberculosis', 10: 'Common Cold', 34: 'Pneumonia', 13: 'Dimorphic hemmorhoids(piles)', 18: 'Heart attack', 39: 'Varicose veins', 26: 'Hypothyroidism', 24: 'Hyperthyroidism', 25: 'Hypoglycemia', 31: 'Osteoarthristis', 5: 'Arthritis', 0: '(vertigo) Paroymsal Positional Vertigo', 2: 'Acne', 38: 'Urinary tract infection', 35: 'Psoriasis', 27: 'Impetigo'}
|
141 |
+
|
142 |
+
# Model Prediction function
|
143 |
+
def get_predicted_value(patient_symptoms):
|
144 |
+
input_vector = np.zeros(len(symptoms_dict))
|
145 |
+
for item in patient_symptoms:
|
146 |
+
input_vector[symptoms_dict[item]] = 1
|
147 |
+
return diseases_list[svc.predict([input_vector])[0]]
|
148 |
+
|
149 |
+
# Test 1
|
150 |
+
# Split the user's input into a list of symptoms (assuming they are comma-separated) # itching,skin_rash,nodal_skin_eruptions
|
151 |
+
symptoms = input("Enter your symptoms.......")
|
152 |
+
user_symptoms = [s.strip() for s in symptoms.split(',')]
|
153 |
+
# Remove any extra characters, if any
|
154 |
+
user_symptoms = [symptom.strip("[]' ") for symptom in user_symptoms]
|
155 |
+
predicted_disease = get_predicted_value(user_symptoms)
|
156 |
+
|
157 |
+
desc, pre, med, die, wrkout = helper(predicted_disease)
|
158 |
+
|
159 |
+
print("=================predicted disease============")
|
160 |
+
print(predicted_disease)
|
161 |
+
print("=================description==================")
|
162 |
+
print(desc)
|
163 |
+
print("=================precautions==================")
|
164 |
+
i = 1
|
165 |
+
for p_i in pre[0]:
|
166 |
+
print(i, ": ", p_i)
|
167 |
+
i += 1
|
168 |
+
|
169 |
+
print("=================medications==================")
|
170 |
+
for m_i in med:
|
171 |
+
print(i, ": ", m_i)
|
172 |
+
i += 1
|
173 |
+
|
174 |
+
print("=================workout==================")
|
175 |
+
for w_i in wrkout:
|
176 |
+
print(i, ": ", w_i)
|
177 |
+
i += 1
|
178 |
+
|
179 |
+
print("=================diets==================")
|
180 |
+
for d_i in die:
|
181 |
+
print(i, ": ", d_i)
|
182 |
+
i += 1
|
183 |
+
|
184 |
+
# Test 1
|
185 |
+
# Split the user's input into a list of symptoms (assuming they are comma-separated) # yellow_crust_ooze,red_sore_around_nose,small_dents_in_nails,inflammatory_nails,blister
|
186 |
+
symptoms = input("Enter your symptoms.......")
|
187 |
+
user_symptoms = [s.strip() for s in symptoms.split(',')]
|
188 |
+
# Remove any extra characters, if any
|
189 |
+
user_symptoms = [symptom.strip("[]' ") for symptom in user_symptoms]
|
190 |
+
predicted_disease = get_predicted_value(user_symptoms)
|
191 |
+
|
192 |
+
desc, pre, med, die, wrkout = helper(predicted_disease)
|
193 |
+
|
194 |
+
print("=================predicted disease============")
|
195 |
+
print(predicted_disease)
|
196 |
+
print("=================description==================")
|
197 |
+
print(desc)
|
198 |
+
print("=================precautions==================")
|
199 |
+
i = 1
|
200 |
+
for p_i in pre[0]:
|
201 |
+
print(i, ": ", p_i)
|
202 |
+
i += 1
|
203 |
+
|
204 |
+
print("=================medications==================")
|
205 |
+
for m_i in med:
|
206 |
+
print(i, ": ", m_i)
|
207 |
+
i += 1
|
208 |
+
|
209 |
+
print("=================workout==================")
|
210 |
+
for w_i in wrkout:
|
211 |
+
print(i, ": ", w_i)
|
212 |
+
i += 1
|
213 |
+
|
214 |
+
print("=================diets==================")
|
215 |
+
for d_i in die:
|
216 |
+
print(i, ": ", d_i)
|
217 |
+
i += 1
|
218 |
+
|
219 |
+
# let's use pycharm flask app
|
220 |
+
# but install this version in pycharm
|
221 |
+
import sklearn
|
222 |
+
print(sklearn.__version__)
|
223 |
+
|
precautions_df.csv
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
,Disease,Precaution_1,Precaution_2,Precaution_3,Precaution_4
|
2 |
+
0,Drug Reaction,stop irritation,consult nearest hospital,stop taking drug,follow up
|
3 |
+
1,Malaria,Consult nearest hospital,avoid oily food,avoid non veg food,keep mosquitos out
|
4 |
+
2,Allergy,apply calamine,cover area with bandage,,use ice to compress itching
|
5 |
+
3,Hypothyroidism,reduce stress,exercise,eat healthy,get proper sleep
|
6 |
+
4,Psoriasis,wash hands with warm soapy water,stop bleeding using pressure,consult doctor,salt baths
|
7 |
+
5,GERD,avoid fatty spicy food,avoid lying down after eating,maintain healthy weight,exercise
|
8 |
+
6,Chronic cholestasis,cold baths,anti itch medicine,consult doctor,eat healthy
|
9 |
+
7,hepatitis A,Consult nearest hospital,wash hands through,avoid fatty spicy food,medication
|
10 |
+
8,Osteoarthristis,acetaminophen,consult nearest hospital,follow up,salt baths
|
11 |
+
9,(vertigo) Paroymsal Positional Vertigo,lie down,avoid sudden change in body,avoid abrupt head movment,relax
|
12 |
+
10,Hypoglycemia,lie down on side,check in pulse,drink sugary drinks,consult doctor
|
13 |
+
11,Acne,bath twice,avoid fatty spicy food,drink plenty of water,avoid too many products
|
14 |
+
12,Diabetes ,have balanced diet,exercise,consult doctor,follow up
|
15 |
+
13,Impetigo,soak affected area in warm water,use antibiotics,remove scabs with wet compressed cloth,consult doctor
|
16 |
+
14,Hypertension ,meditation,salt baths,reduce stress,get proper sleep
|
17 |
+
15,Peptic ulcer diseae,avoid fatty spicy food,consume probiotic food,eliminate milk,limit alcohol
|
18 |
+
16,Dimorphic hemmorhoids(piles),avoid fatty spicy food,consume witch hazel,warm bath with epsom salt,consume alovera juice
|
19 |
+
17,Common Cold,drink vitamin c rich drinks,take vapour,avoid cold food,keep fever in check
|
20 |
+
18,Chicken pox,use neem in bathing ,consume neem leaves,take vaccine,avoid public places
|
21 |
+
19,Cervical spondylosis,use heating pad or cold pack,exercise,take otc pain reliver,consult doctor
|
22 |
+
20,Hyperthyroidism,eat healthy,massage,use lemon balm,take radioactive iodine treatment
|
23 |
+
21,Urinary tract infection,drink plenty of water,increase vitamin c intake,drink cranberry juice,take probiotics
|
24 |
+
22,Varicose veins,lie down flat and raise the leg high,use oinments,use vein compression,dont stand still for long
|
25 |
+
23,AIDS,avoid open cuts,wear ppe if possible,consult doctor,follow up
|
26 |
+
24,Paralysis (brain hemorrhage),massage,eat healthy,exercise,consult doctor
|
27 |
+
25,Typhoid,eat high calorie vegitables,antiboitic therapy,consult doctor,medication
|
28 |
+
26,Hepatitis B,consult nearest hospital,vaccination,eat healthy,medication
|
29 |
+
27,Fungal infection,bath twice,use detol or neem in bathing water,keep infected area dry,use clean cloths
|
30 |
+
28,Hepatitis C,Consult nearest hospital,vaccination,eat healthy,medication
|
31 |
+
29,Migraine,meditation,reduce stress,use poloroid glasses in sun,consult doctor
|
32 |
+
30,Bronchial Asthma,switch to loose cloothing,take deep breaths,get away from trigger,seek help
|
33 |
+
31,Alcoholic hepatitis,stop alcohol consumption,consult doctor,medication,follow up
|
34 |
+
32,Jaundice,drink plenty of water,consume milk thistle,eat fruits and high fiberous food,medication
|
35 |
+
33,Hepatitis E,stop alcohol consumption,rest,consult doctor,medication
|
36 |
+
34,Dengue,drink papaya leaf juice,avoid fatty spicy food,keep mosquitos away,keep hydrated
|
37 |
+
35,Hepatitis D,consult doctor,medication,eat healthy,follow up
|
38 |
+
36,Heart attack,call ambulance,chew or swallow asprin,keep calm,
|
39 |
+
37,Pneumonia,consult doctor,medication,rest,follow up
|
40 |
+
38,Arthritis,exercise,use hot and cold therapy,try acupuncture,massage
|
41 |
+
39,Gastroenteritis,stop eating solid food for while,try taking small sips of water,rest,ease back into eating
|
42 |
+
40,Tuberculosis,cover mouth,consult doctor,medication,rest
|
svc.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:44b0c95b18023e87c85f574c6145081bc2ae0ef15945f275731aef7d9b373f85
|
3 |
+
size 389089
|
symtoms_df.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
workout_df.csv
ADDED
@@ -0,0 +1,411 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
,Unnamed: 0,disease,workout
|
2 |
+
0,0,Fungal infection,Avoid sugary foods
|
3 |
+
1,1,Fungal infection,Consume probiotics
|
4 |
+
2,2,Fungal infection,Increase intake of garlic
|
5 |
+
3,3,Fungal infection,Include yogurt in diet
|
6 |
+
4,4,Fungal infection,Limit processed foods
|
7 |
+
5,5,Fungal infection,Stay hydrated
|
8 |
+
6,6,Fungal infection,Consume green tea
|
9 |
+
7,7,Fungal infection,Eat foods rich in zinc
|
10 |
+
8,8,Fungal infection,Include turmeric in diet
|
11 |
+
9,9,Fungal infection,Eat fruits and vegetables
|
12 |
+
10,10,Allergy,Avoid allergenic foods
|
13 |
+
11,11,Allergy,Consume anti-inflammatory foods
|
14 |
+
12,12,Allergy,Include omega-3 fatty acids
|
15 |
+
13,13,Allergy,Stay hydrated
|
16 |
+
14,14,Allergy,Eat foods rich in vitamin C
|
17 |
+
15,15,Allergy,Include quercetin-rich foods
|
18 |
+
16,16,Allergy,Consume local honey
|
19 |
+
17,17,Allergy,Limit processed foods
|
20 |
+
18,18,Allergy,Include ginger in diet
|
21 |
+
19,19,Allergy,Avoid artificial additives
|
22 |
+
20,20,GERD,Consume smaller meals
|
23 |
+
21,21,GERD,"Avoid trigger foods (spicy, fatty)"
|
24 |
+
22,22,GERD,Eat high-fiber foods
|
25 |
+
23,23,GERD,Limit caffeine and alcohol
|
26 |
+
24,24,GERD,Chew food thoroughly
|
27 |
+
25,25,GERD,Avoid late-night eating
|
28 |
+
26,26,GERD,Consume non-citrus fruits
|
29 |
+
27,27,GERD,Include lean proteins
|
30 |
+
28,28,GERD,Stay hydrated
|
31 |
+
29,29,GERD,Avoid carbonated beverages
|
32 |
+
30,30,Chronic cholestasis,Consume a low-fat diet
|
33 |
+
31,31,Chronic cholestasis,Eat high-fiber foods
|
34 |
+
32,32,Chronic cholestasis,Include healthy fats
|
35 |
+
33,33,Chronic cholestasis,Limit alcohol consumption
|
36 |
+
34,34,Chronic cholestasis,Stay hydrated
|
37 |
+
35,35,Chronic cholestasis,Consume antioxidant-rich foods
|
38 |
+
36,36,Chronic cholestasis,Include omega-3 fatty acids
|
39 |
+
37,37,Chronic cholestasis,Include lean proteins
|
40 |
+
38,38,Chronic cholestasis,Limit processed foods
|
41 |
+
39,39,Chronic cholestasis,Avoid fried foods
|
42 |
+
40,40,Drug Reaction,Discontinue offending medication
|
43 |
+
41,41,Drug Reaction,Stay hydrated
|
44 |
+
42,42,Drug Reaction,Include anti-inflammatory foods
|
45 |
+
43,43,Drug Reaction,Consume antioxidants
|
46 |
+
44,44,Drug Reaction,Avoid trigger foods
|
47 |
+
45,45,Drug Reaction,Include omega-3 fatty acids
|
48 |
+
46,46,Drug Reaction,Limit caffeine and alcohol
|
49 |
+
47,47,Drug Reaction,Stay hydrated
|
50 |
+
48,48,Drug Reaction,Eat a balanced diet
|
51 |
+
49,49,Drug Reaction,Consult a healthcare professional
|
52 |
+
50,50,Peptic ulcer disease,"Consume smaller, more frequent meals"
|
53 |
+
51,51,Peptic ulcer disease,"Avoid trigger foods (spicy, acidic)"
|
54 |
+
52,52,Peptic ulcer disease,Include high-fiber foods
|
55 |
+
53,53,Peptic ulcer disease,Limit caffeine and alcohol
|
56 |
+
54,54,Peptic ulcer disease,Stay hydrated
|
57 |
+
55,55,Peptic ulcer disease,Consume probiotics
|
58 |
+
56,56,Peptic ulcer disease,Include lean proteins
|
59 |
+
57,57,Peptic ulcer disease,Include antioxidant-rich foods
|
60 |
+
58,58,Peptic ulcer disease,Limit processed foods
|
61 |
+
59,59,Peptic ulcer disease,Avoid smoking and alcohol
|
62 |
+
60,60,AIDS,Follow a balanced and nutritious diet
|
63 |
+
61,61,AIDS,Include lean proteins
|
64 |
+
62,62,AIDS,Consume nutrient-rich foods
|
65 |
+
63,63,AIDS,Stay hydrated
|
66 |
+
64,64,AIDS,Include healthy fats
|
67 |
+
65,65,AIDS,Avoid raw or undercooked foods
|
68 |
+
66,66,AIDS,Limit sugary foods and beverages
|
69 |
+
67,67,AIDS,Consume immune-boosting foods
|
70 |
+
68,68,AIDS,Take prescribed supplements
|
71 |
+
69,69,AIDS,Consult a healthcare professional
|
72 |
+
70,70,Diabetes,Monitor carbohydrate intake
|
73 |
+
71,71,Diabetes,Eat balanced meals
|
74 |
+
72,72,Diabetes,Include lean proteins
|
75 |
+
73,73,Diabetes,Consume high-fiber foods
|
76 |
+
74,74,Diabetes,Stay hydrated
|
77 |
+
75,75,Diabetes,Limit sugary foods and beverages
|
78 |
+
76,76,Diabetes,Include healthy fats
|
79 |
+
77,77,Diabetes,Monitor blood sugar levels
|
80 |
+
78,78,Diabetes,Consult a registered dietitian
|
81 |
+
79,79,Diabetes,Take prescribed medications as directed
|
82 |
+
80,80,Gastroenteritis,Stay hydrated
|
83 |
+
81,81,Gastroenteritis,Consume clear fluids
|
84 |
+
82,82,Gastroenteritis,"Follow the BRAT diet (bananas, rice, applesauce, toast)"
|
85 |
+
83,83,Gastroenteritis,Include bland foods
|
86 |
+
84,84,Gastroenteritis,Avoid fatty and greasy foods
|
87 |
+
85,85,Gastroenteritis,Limit caffeine and alcohol
|
88 |
+
86,86,Gastroenteritis,Avoid spicy foods
|
89 |
+
87,87,Gastroenteritis,Consult a healthcare professional
|
90 |
+
88,88,Gastroenteritis,Gradually reintroduce solid foods
|
91 |
+
89,89,Gastroenteritis,Avoid dairy products
|
92 |
+
90,90,Bronchial Asthma,Include anti-inflammatory foods
|
93 |
+
91,91,Bronchial Asthma,Consume omega-3 fatty acids
|
94 |
+
92,92,Bronchial Asthma,Limit sodium intake
|
95 |
+
93,93,Bronchial Asthma,Stay hydrated
|
96 |
+
94,94,Bronchial Asthma,Include antioxidant-rich foods
|
97 |
+
95,95,Bronchial Asthma,Avoid sulfite-containing foods
|
98 |
+
96,96,Bronchial Asthma,Limit processed foods
|
99 |
+
97,97,Bronchial Asthma,Consume magnesium-rich foods
|
100 |
+
98,98,Bronchial Asthma,Consult a healthcare professional
|
101 |
+
99,99,Bronchial Asthma,Avoid trigger foods
|
102 |
+
100,100,Hypertension,Follow the DASH diet (Dietary Approaches to Stop Hypertension)
|
103 |
+
101,101,Hypertension,Limit sodium intake
|
104 |
+
102,102,Hypertension,Include potassium-rich foods
|
105 |
+
103,103,Hypertension,Stay hydrated
|
106 |
+
104,104,Hypertension,Consume calcium-rich foods
|
107 |
+
105,105,Hypertension,Limit alcohol consumption
|
108 |
+
106,106,Hypertension,Include magnesium-rich foods
|
109 |
+
107,107,Hypertension,Consume omega-3 fatty acids
|
110 |
+
108,108,Hypertension,Limit processed foods
|
111 |
+
109,109,Hypertension,Consult a healthcare professional
|
112 |
+
110,110,Migraine,Identify and avoid trigger foods
|
113 |
+
111,111,Migraine,Stay hydrated
|
114 |
+
112,112,Migraine,Include magnesium-rich foods
|
115 |
+
113,113,Migraine,Consume omega-3 fatty acids
|
116 |
+
114,114,Migraine,Limit caffeine and alcohol
|
117 |
+
115,115,Migraine,Consume riboflavin-rich foods
|
118 |
+
116,116,Migraine,Limit processed foods
|
119 |
+
117,117,Migraine,Maintain regular meal times
|
120 |
+
118,118,Migraine,Consult a healthcare professional
|
121 |
+
119,119,Migraine,Manage stress
|
122 |
+
120,120,Cervical spondylosis,Include anti-inflammatory foods
|
123 |
+
121,121,Cervical spondylosis,Consume omega-3 fatty acids
|
124 |
+
122,122,Cervical spondylosis,Include vitamin D-rich foods
|
125 |
+
123,123,Cervical spondylosis,Stay hydrated
|
126 |
+
124,124,Cervical spondylosis,Consume antioxidant-rich foods
|
127 |
+
125,125,Cervical spondylosis,Limit processed foods
|
128 |
+
126,126,Cervical spondylosis,Include lean proteins
|
129 |
+
127,127,Cervical spondylosis,Practice good posture
|
130 |
+
128,128,Cervical spondylosis,Consult a healthcare professional
|
131 |
+
129,129,Cervical spondylosis,Engage in regular exercise
|
132 |
+
130,130,Paralysis (brain hemorrhage),Follow a balanced and nutritious diet
|
133 |
+
131,131,Paralysis (brain hemorrhage),Include lean proteins
|
134 |
+
132,132,Paralysis (brain hemorrhage),Consume nutrient-rich foods
|
135 |
+
133,133,Paralysis (brain hemorrhage),Stay hydrated
|
136 |
+
134,134,Paralysis (brain hemorrhage),Include healthy fats
|
137 |
+
135,135,Paralysis (brain hemorrhage),Limit sugary foods and beverages
|
138 |
+
136,136,Paralysis (brain hemorrhage),Include antioxidants
|
139 |
+
137,137,Paralysis (brain hemorrhage),Consume foods rich in vitamin K
|
140 |
+
138,138,Paralysis (brain hemorrhage),Consult a healthcare professional
|
141 |
+
139,139,Paralysis (brain hemorrhage),Manage stress
|
142 |
+
140,140,Jaundice,Stay hydrated
|
143 |
+
141,141,Jaundice,Consume nutrient-rich foods
|
144 |
+
142,142,Jaundice,Include protein-rich foods
|
145 |
+
143,143,Jaundice,Consume easily digestible foods
|
146 |
+
144,144,Jaundice,Limit fatty foods
|
147 |
+
145,145,Jaundice,Avoid alcohol and caffeine
|
148 |
+
146,146,Jaundice,Include vitamin C-rich foods
|
149 |
+
147,147,Jaundice,Consult a healthcare professional
|
150 |
+
148,148,Jaundice,Rest and conserve energy
|
151 |
+
149,149,Jaundice,Gradually resume normal diet
|
152 |
+
150,150,Malaria,Stay hydrated
|
153 |
+
151,151,Malaria,Consume nutrient-rich foods
|
154 |
+
152,152,Malaria,Include protein-rich foods
|
155 |
+
153,153,Malaria,Consume foods rich in antioxidants
|
156 |
+
154,154,Malaria,Limit fatty and greasy foods
|
157 |
+
155,155,Malaria,Avoid alcohol and caffeine
|
158 |
+
156,156,Malaria,Include vitamin C-rich foods
|
159 |
+
157,157,Malaria,Consult a healthcare professional
|
160 |
+
158,158,Malaria,Rest and conserve energy
|
161 |
+
159,159,Malaria,Gradually resume normal diet
|
162 |
+
160,160,Chicken pox,Stay hydrated
|
163 |
+
161,161,Chicken pox,Include easily digestible foods
|
164 |
+
162,162,Chicken pox,Include vitamin C-rich foods
|
165 |
+
163,163,Chicken pox,Consume protein-rich foods
|
166 |
+
164,164,Chicken pox,Include zinc-rich foods
|
167 |
+
165,165,Chicken pox,Avoid spicy and acidic foods
|
168 |
+
166,166,Chicken pox,Consult a healthcare professional
|
169 |
+
167,167,Chicken pox,Practice good hygiene
|
170 |
+
168,168,Chicken pox,Rest and conserve energy
|
171 |
+
169,169,Chicken pox,Gradually resume normal diet
|
172 |
+
170,170,Dengue,Stay hydrated
|
173 |
+
171,171,Dengue,Include nutrient-rich foods
|
174 |
+
172,172,Dengue,Consume foods rich in vitamin C and antioxidants
|
175 |
+
173,173,Dengue,Limit fatty and greasy foods
|
176 |
+
174,174,Dengue,Avoid caffeine and alcohol
|
177 |
+
175,175,Dengue,Include soft and easily digestible foods
|
178 |
+
176,176,Dengue,Consult a healthcare professional
|
179 |
+
177,177,Dengue,Rest and conserve energy
|
180 |
+
178,178,Dengue,Gradually resume normal diet
|
181 |
+
179,179,Dengue,Follow medical recommendations
|
182 |
+
180,180,Typhoid,Consume easily digestible foods
|
183 |
+
181,181,Typhoid,Stay hydrated
|
184 |
+
182,182,Typhoid,Include nutrient-rich foods
|
185 |
+
183,183,Typhoid,Consume foods rich in vitamin C and antioxidants
|
186 |
+
184,184,Typhoid,Include protein-rich foods
|
187 |
+
185,185,Typhoid,Avoid fatty and greasy foods
|
188 |
+
186,186,Typhoid,Consult a healthcare professional
|
189 |
+
187,187,Typhoid,Gradually resume normal diet
|
190 |
+
188,188,Typhoid,Follow medical recommendations
|
191 |
+
189,189,Typhoid,Avoid alcohol and caffeine
|
192 |
+
190,190,hepatitis A,Stay hydrated
|
193 |
+
191,191,hepatitis A,Consume nutrient-rich foods
|
194 |
+
192,192,hepatitis A,Include protein-rich foods
|
195 |
+
193,193,hepatitis A,Consume easily digestible foods
|
196 |
+
194,194,hepatitis A,Limit fatty foods
|
197 |
+
195,195,hepatitis A,Avoid alcohol and caffeine
|
198 |
+
196,196,hepatitis A,Include vitamin C-rich foods
|
199 |
+
197,197,hepatitis A,Consult a healthcare professional
|
200 |
+
198,198,hepatitis A,Rest and conserve energy
|
201 |
+
199,199,hepatitis A,Gradually resume normal diet
|
202 |
+
200,200,Hepatitis B,Follow a balanced and nutritious diet
|
203 |
+
201,201,Hepatitis B,Stay hydrated
|
204 |
+
202,202,Hepatitis B,Include protein-rich foods
|
205 |
+
203,203,Hepatitis B,Consume nutrient-rich foods
|
206 |
+
204,204,Hepatitis B,Limit fatty foods
|
207 |
+
205,205,Hepatitis B,Avoid alcohol and caffeine
|
208 |
+
206,206,Hepatitis B,Include vitamin C-rich foods
|
209 |
+
207,207,Hepatitis B,Consult a healthcare professional
|
210 |
+
208,208,Hepatitis B,Rest and conserve energy
|
211 |
+
209,209,Hepatitis B,Gradually resume normal diet
|
212 |
+
210,210,Hepatitis C,Follow a balanced and nutritious diet
|
213 |
+
211,211,Hepatitis C,Stay hydrated
|
214 |
+
212,212,Hepatitis C,Include protein-rich foods
|
215 |
+
213,213,Hepatitis C,Consume nutrient-rich foods
|
216 |
+
214,214,Hepatitis C,Limit fatty foods
|
217 |
+
215,215,Hepatitis C,Avoid alcohol and caffeine
|
218 |
+
216,216,Hepatitis C,Include vitamin C-rich foods
|
219 |
+
217,217,Hepatitis C,Consult a healthcare professional
|
220 |
+
218,218,Hepatitis C,Rest and conserve energy
|
221 |
+
219,219,Hepatitis C,Gradually resume normal diet
|
222 |
+
220,220,Hepatitis D,Follow a balanced and nutritious diet
|
223 |
+
221,221,Hepatitis D,Stay hydrated
|
224 |
+
222,222,Hepatitis D,Include protein-rich foods
|
225 |
+
223,223,Hepatitis D,Consume nutrient-rich foods
|
226 |
+
224,224,Hepatitis D,Limit fatty foods
|
227 |
+
225,225,Hepatitis D,Avoid alcohol and caffeine
|
228 |
+
226,226,Hepatitis D,Include vitamin C-rich foods
|
229 |
+
227,227,Hepatitis D,Consult a healthcare professional
|
230 |
+
228,228,Hepatitis D,Rest and conserve energy
|
231 |
+
229,229,Hepatitis D,Gradually resume normal diet
|
232 |
+
230,230,Hepatitis E,Stay hydrated
|
233 |
+
231,231,Hepatitis E,Consume nutrient-rich foods
|
234 |
+
232,232,Hepatitis E,Include protein-rich foods
|
235 |
+
233,233,Hepatitis E,Consume easily digestible foods
|
236 |
+
234,234,Hepatitis E,Limit fatty foods
|
237 |
+
235,235,Hepatitis E,Avoid alcohol and caffeine
|
238 |
+
236,236,Hepatitis E,Include vitamin C-rich foods
|
239 |
+
237,237,Hepatitis E,Consult a healthcare professional
|
240 |
+
238,238,Hepatitis E,Rest and conserve energy
|
241 |
+
239,239,Hepatitis E,Gradually resume normal diet
|
242 |
+
240,240,Alcoholic hepatitis,Avoid alcohol consumption
|
243 |
+
241,241,Alcoholic hepatitis,Follow a balanced and nutritious diet
|
244 |
+
242,242,Alcoholic hepatitis,Stay hydrated
|
245 |
+
243,243,Alcoholic hepatitis,Consume nutrient-rich foods
|
246 |
+
244,244,Alcoholic hepatitis,Include protein-rich foods
|
247 |
+
245,245,Alcoholic hepatitis,Limit fatty foods
|
248 |
+
246,246,Alcoholic hepatitis,Include antioxidants
|
249 |
+
247,247,Alcoholic hepatitis,Consult a healthcare professional
|
250 |
+
248,248,Alcoholic hepatitis,Rest and conserve energy
|
251 |
+
249,249,Alcoholic hepatitis,Gradually resume normal diet
|
252 |
+
250,250,Tuberculosis,Consume a high-protein diet
|
253 |
+
251,251,Tuberculosis,Include nutrient-rich foods
|
254 |
+
252,252,Tuberculosis,Stay hydrated
|
255 |
+
253,253,Tuberculosis,Consume foods rich in vitamins A and C
|
256 |
+
254,254,Tuberculosis,Include zinc-rich foods
|
257 |
+
255,255,Tuberculosis,Limit sugary foods and beverages
|
258 |
+
256,256,Tuberculosis,Consult a healthcare professional
|
259 |
+
257,257,Tuberculosis,Rest and conserve energy
|
260 |
+
258,258,Tuberculosis,Gradually resume normal diet
|
261 |
+
259,259,Tuberculosis,Follow medical recommendations
|
262 |
+
260,260,Common Cold,Stay hydrated
|
263 |
+
261,261,Common Cold,Include nutrient-rich foods
|
264 |
+
262,262,Common Cold,Consume foods rich in vitamin C and antioxidants
|
265 |
+
263,263,Common Cold,Include zinc-rich foods
|
266 |
+
264,264,Common Cold,Limit sugary foods and beverages
|
267 |
+
265,265,Common Cold,Consume chicken soup
|
268 |
+
266,266,Common Cold,Consult a healthcare professional
|
269 |
+
267,267,Common Cold,Rest and conserve energy
|
270 |
+
268,268,Common Cold,Gradually resume normal diet
|
271 |
+
269,269,Common Cold,Follow medical recommendations
|
272 |
+
270,270,Pneumonia,Stay hydrated
|
273 |
+
271,271,Pneumonia,Include nutrient-rich foods
|
274 |
+
272,272,Pneumonia,Consume foods rich in vitamin C and antioxidants
|
275 |
+
273,273,Pneumonia,Include zinc-rich foods
|
276 |
+
274,274,Pneumonia,Limit sugary foods and beverages
|
277 |
+
275,275,Pneumonia,Consume chicken soup
|
278 |
+
276,276,Pneumonia,Consult a healthcare professional
|
279 |
+
277,277,Pneumonia,Rest and conserve energy
|
280 |
+
278,278,Pneumonia,Gradually resume normal diet
|
281 |
+
279,279,Pneumonia,Follow medical recommendations
|
282 |
+
280,280,Dimorphic hemmorhoids(piles),Consume high-fiber foods
|
283 |
+
281,281,Dimorphic hemmorhoids(piles),Stay hydrated
|
284 |
+
282,282,Dimorphic hemmorhoids(piles),Include nutrient-rich foods
|
285 |
+
283,283,Dimorphic hemmorhoids(piles),Consume foods rich in flavonoids
|
286 |
+
284,284,Dimorphic hemmorhoids(piles),Limit processed foods
|
287 |
+
285,285,Dimorphic hemmorhoids(piles),Avoid spicy and greasy foods
|
288 |
+
286,286,Dimorphic hemmorhoids(piles),Consult a healthcare professional
|
289 |
+
287,287,Dimorphic hemmorhoids(piles),Practice good hygiene
|
290 |
+
288,288,Dimorphic hemmorhoids(piles),Gradually resume normal diet
|
291 |
+
289,289,Dimorphic hemmorhoids(piles),Follow medical recommendations
|
292 |
+
290,290,Heart attack,Follow a heart-healthy diet
|
293 |
+
291,291,Heart attack,Limit sodium intake
|
294 |
+
292,292,Heart attack,Include fiber-rich foods
|
295 |
+
293,293,Heart attack,Consume healthy fats
|
296 |
+
294,294,Heart attack,Include lean proteins
|
297 |
+
295,295,Heart attack,Limit sugary foods and beverages
|
298 |
+
296,296,Heart attack,Stay hydrated
|
299 |
+
297,297,Heart attack,Consult a healthcare professional
|
300 |
+
298,298,Heart attack,Follow medical recommendations
|
301 |
+
299,299,Heart attack,Engage in regular exercise
|
302 |
+
300,300,Varicose veins,Consume a high-fiber diet
|
303 |
+
301,301,Varicose veins,Stay hydrated
|
304 |
+
302,302,Varicose veins,Include nutrient-rich foods
|
305 |
+
303,303,Varicose veins,Consume foods rich in antioxidants
|
306 |
+
304,304,Varicose veins,Limit sodium intake
|
307 |
+
305,305,Varicose veins,Include flavonoid-rich foods
|
308 |
+
306,306,Varicose veins,Avoid standing or sitting for long periods
|
309 |
+
307,307,Varicose veins,Consult a healthcare professional
|
310 |
+
308,308,Varicose veins,Follow medical recommendations
|
311 |
+
309,309,Varicose veins,Engage in regular exercise
|
312 |
+
310,310,Hypothyroidism,Include iodine-rich foods
|
313 |
+
311,311,Hypothyroidism,Consume selenium-rich foods
|
314 |
+
312,312,Hypothyroidism,Stay hydrated
|
315 |
+
313,313,Hypothyroidism,Include nutrient-rich foods
|
316 |
+
314,314,Hypothyroidism,Limit processed foods
|
317 |
+
315,315,Hypothyroidism,Consume foods rich in vitamins B and D
|
318 |
+
316,316,Hypothyroidism,Consult a healthcare professional
|
319 |
+
317,317,Hypothyroidism,Follow medical recommendations
|
320 |
+
318,318,Hypothyroidism,Maintain a stable weight
|
321 |
+
319,319,Hypothyroidism,Engage in regular exercise
|
322 |
+
320,320,Hyperthyroidism,Limit iodine intake
|
323 |
+
321,321,Hyperthyroidism,Consume cruciferous vegetables in moderation
|
324 |
+
322,322,Hyperthyroidism,Stay hydrated
|
325 |
+
323,323,Hyperthyroidism,Include nutrient-rich foods
|
326 |
+
324,324,Hyperthyroidism,Limit caffeine and alcohol
|
327 |
+
325,325,Hyperthyroidism,Include omega-3 fatty acids
|
328 |
+
326,326,Hyperthyroidism,Consult a healthcare professional
|
329 |
+
327,327,Hyperthyroidism,Follow medical recommendations
|
330 |
+
328,328,Hyperthyroidism,Maintain a stable weight
|
331 |
+
329,329,Hyperthyroidism,Engage in regular exercise
|
332 |
+
330,330,Hypoglycemia,Consume complex carbohydrates
|
333 |
+
331,331,Hypoglycemia,Include protein-rich foods
|
334 |
+
332,332,Hypoglycemia,Stay hydrated
|
335 |
+
333,333,Hypoglycemia,Limit sugary foods and beverages
|
336 |
+
334,334,Hypoglycemia,Consume regular meals and snacks
|
337 |
+
335,335,Hypoglycemia,Consult a healthcare professional
|
338 |
+
336,336,Hypoglycemia,Monitor blood sugar levels
|
339 |
+
337,337,Hypoglycemia,Follow medical recommendations
|
340 |
+
338,338,Hypoglycemia,Engage in regular physical activity
|
341 |
+
339,339,Hypoglycemia,Limit alcohol intake
|
342 |
+
340,340,Osteoarthristis,Consume anti-inflammatory foods
|
343 |
+
341,341,Osteoarthristis,Include omega-3 fatty acids
|
344 |
+
342,342,Osteoarthristis,Consume antioxidant-rich foods
|
345 |
+
343,343,Osteoarthristis,Stay hydrated
|
346 |
+
344,344,Osteoarthristis,Limit processed foods
|
347 |
+
345,345,Osteoarthristis,Include vitamin K-rich foods
|
348 |
+
346,346,Osteoarthristis,Consult a healthcare professional
|
349 |
+
347,347,Osteoarthristis,Follow medical recommendations
|
350 |
+
348,348,Osteoarthristis,Engage in low-impact exercise
|
351 |
+
349,349,Osteoarthristis,Maintain a healthy weight
|
352 |
+
350,350,Arthritis,Consume anti-inflammatory foods
|
353 |
+
351,351,Arthritis,Include omega-3 fatty acids
|
354 |
+
352,352,Arthritis,Consume antioxidant-rich foods
|
355 |
+
353,353,Arthritis,Stay hydrated
|
356 |
+
354,354,Arthritis,Limit processed foods
|
357 |
+
355,355,Arthritis,Include vitamin K-rich foods
|
358 |
+
356,356,Arthritis,Consult a healthcare professional
|
359 |
+
357,357,Arthritis,Follow medical recommendations
|
360 |
+
358,358,Arthritis,Engage in low-impact exercise
|
361 |
+
359,359,Arthritis,Maintain a healthy weight
|
362 |
+
360,360,(vertigo) Paroymsal Positional Vertigo,"Avoid trigger foods (caffeine, alcohol)"
|
363 |
+
361,361,(vertigo) Paroymsal Positional Vertigo,Limit sodium intake
|
364 |
+
362,362,(vertigo) Paroymsal Positional Vertigo,Stay hydrated
|
365 |
+
363,363,(vertigo) Paroymsal Positional Vertigo,Consume ginger and ginkgo biloba
|
366 |
+
364,364,(vertigo) Paroymsal Positional Vertigo,Limit artificial sweeteners
|
367 |
+
365,365,(vertigo) Paroymsal Positional Vertigo,Consult a healthcare professional
|
368 |
+
366,366,(vertigo) Paroymsal Positional Vertigo,Avoid sudden head movements
|
369 |
+
367,367,(vertigo) Paroymsal Positional Vertigo,Follow medical recommendations
|
370 |
+
368,368,(vertigo) Paroymsal Positional Vertigo,Manage stress
|
371 |
+
369,369,(vertigo) Paroymsal Positional Vertigo,Limit caffeine and stimulants
|
372 |
+
370,370,Acne,Consume a balanced diet
|
373 |
+
371,371,Acne,Limit dairy and high-glycemic foods
|
374 |
+
372,372,Acne,Include antioxidants
|
375 |
+
373,373,Acne,Stay hydrated
|
376 |
+
374,374,Acne,Limit processed foods
|
377 |
+
375,375,Acne,Include zinc-rich foods
|
378 |
+
376,376,Acne,Consult a skincare professional
|
379 |
+
377,377,Acne,Practice good skincare hygiene
|
380 |
+
378,378,Acne,Limit sugary foods and beverages
|
381 |
+
379,379,Acne,Follow medical recommendations
|
382 |
+
380,380,Urinary tract infection,Stay hydrated
|
383 |
+
381,381,Urinary tract infection,Consume cranberry products
|
384 |
+
382,382,Urinary tract infection,Include vitamin C-rich foods
|
385 |
+
383,383,Urinary tract infection,Limit caffeine and alcohol
|
386 |
+
384,384,Urinary tract infection,Consume probiotics
|
387 |
+
385,385,Urinary tract infection,Avoid spicy and acidic foods
|
388 |
+
386,386,Urinary tract infection,Consult a healthcare professional
|
389 |
+
387,387,Urinary tract infection,Follow medical recommendations
|
390 |
+
388,388,Urinary tract infection,Maintain good hygiene
|
391 |
+
389,389,Urinary tract infection,Limit sugary foods and beverages
|
392 |
+
390,390,Psoriasis,Consume anti-inflammatory foods
|
393 |
+
391,391,Psoriasis,Include omega-3 fatty acids
|
394 |
+
392,392,Psoriasis,Include vitamin D analogues
|
395 |
+
393,393,Psoriasis,Limit alcohol consumption
|
396 |
+
394,394,Psoriasis,Stay hydrated
|
397 |
+
395,395,Psoriasis,Consult a healthcare professional
|
398 |
+
396,396,Psoriasis,Limit processed foods
|
399 |
+
397,397,Psoriasis,Follow medical recommendations
|
400 |
+
398,398,Psoriasis,Manage stress
|
401 |
+
399,399,Psoriasis,Consider phototherapy under medical guidance
|
402 |
+
400,400,Impetigo,Maintain good hygiene
|
403 |
+
401,401,Impetigo,Stay hydrated
|
404 |
+
402,402,Impetigo,Consume nutrient-rich foods
|
405 |
+
403,403,Impetigo,Limit sugary foods and beverages
|
406 |
+
404,404,Impetigo,Include foods rich in vitamin C
|
407 |
+
405,405,Impetigo,Consult a healthcare professional
|
408 |
+
406,406,Impetigo,Follow medical recommendations
|
409 |
+
407,407,Impetigo,Avoid scratching
|
410 |
+
408,408,Impetigo,Take prescribed antibiotics
|
411 |
+
409,409,Impetigo,Practice wound care
|