File size: 6,721 Bytes
163b4b3
95309d0
80ffae0
 
978364c
80ffae0
 
 
978364c
80ffae0
 
 
978364c
80ffae0
99032ef
 
978364c
99032ef
 
 
978364c
163b4b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80ffae0
 
95309d0
 
 
 
 
 
 
 
 
 
be9ce02
95309d0
80ffae0
95309d0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80ffae0
95309d0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80ffae0
95309d0
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# Disease Information Dictionary (extended with more diseases)
diseases = {
    "flu": {
        "symptoms": ["fever", "cough", "sore throat", "body aches", "fatigue"],
        "treatment": "Rest, fluids, pain relievers, and anti-viral medications if prescribed."
    },
    "headache": {
        "symptoms": ["head pain", "nausea", "sensitivity to light"],
        "treatment": "Rest, hydration, over-the-counter painkillers, and avoid triggers."
    },
    "diabetes": {
        "symptoms": ["increased thirst", "frequent urination", "fatigue", "blurred vision"],
        "treatment": "Insulin therapy, lifestyle changes, and dietary management."
    },
    "asthma": {
        "symptoms": ["shortness of breath", "wheezing", "chest tightness", "coughing"],
        "treatment": "Inhalers, bronchodilators, corticosteroids, and avoiding triggers."
    },
    "pneumonia": {
        "symptoms": ["cough with mucus", "fever", "shortness of breath", "chest pain"],
        "treatment": "Antibiotics for bacterial pneumonia, rest, fluids, and pain relievers."
    },
    "diabetes type 1": {
        "symptoms": ["frequent urination", "increased thirst", "fatigue", "unexplained weight loss"],
        "treatment": "Insulin injections, blood sugar monitoring, and a healthy diet."
    },
    "diabetes type 2": {
        "symptoms": ["increased thirst", "frequent urination", "fatigue", "blurred vision"],
        "treatment": "Lifestyle changes, oral medications, and insulin therapy if needed."
    },
    "hypertension": {
        "symptoms": ["headaches", "dizziness", "shortness of breath", "nosebleeds"],
        "treatment": "Medications like beta-blockers, ACE inhibitors, lifestyle changes including exercise and diet."
    },
    "arthritis": {
        "symptoms": ["joint pain", "swelling", "stiffness", "reduced range of motion"],
        "treatment": "Pain relievers, anti-inflammatory drugs, physical therapy, and joint protection."
    },
    "cancer": {
        "symptoms": ["unexplained weight loss", "fatigue", "pain", "skin changes"],
        "treatment": "Chemotherapy, radiation, surgery, and immunotherapy."
    },
    "alzheimer's disease": {
        "symptoms": ["memory loss", "confusion", "difficulty performing familiar tasks"],
        "treatment": "Cognitive therapy, medications to slow progression, and support for caregivers."
    },
    "migraine": {
        "symptoms": ["severe headache", "nausea", "sensitivity to light and sound"],
        "treatment": "Pain relievers, anti-nausea medications, and lifestyle adjustments."
    },
    "stroke": {
        "symptoms": ["sudden numbness", "weakness", "confusion", "difficulty speaking or understanding speech"],
        "treatment": "Emergency care, rehabilitation, and medications to prevent further strokes."
    },
    # Add additional diseases here...
    "abdominal aortic aneurysm": {
        "symptoms": ["pulsating feeling near the navel", "severe back or abdominal pain"],
        "treatment": "Surgery or endovascular aneurysm repair (EVAR)."
    },
    "acute lymphoblastic leukemia": {
        "symptoms": ["fatigue", "fever", "bone pain", "paleness"],
        "treatment": "Chemotherapy, radiation, stem cell transplant."
    },
    "acute myeloid leukemia": {
        "symptoms": ["fever", "fatigue", "easy bruising", "shortness of breath"],
        "treatment": "Chemotherapy, stem cell transplant, and targeted therapy."
    },
    "acromegaly": {
        "symptoms": ["enlarged hands and feet", "facial changes", "joint pain"],
        "treatment": "Surgery, radiation therapy, and medications to control growth hormone."
    },
    "actinomycosis": {
        "symptoms": ["painful lumps", "fever", "abscesses"],
        "treatment": "Antibiotics, typically penicillin."
    },
    "addison's disease": {
        "symptoms": ["fatigue", "low blood pressure", "weight loss", "skin darkening"],
        "treatment": "Hormone replacement therapy, particularly corticosteroids."
    },
    "adhd": {
        "symptoms": ["difficulty focusing", "impulsiveness", "hyperactivity"],
        "treatment": "Medications (stimulants), behavior therapy, and lifestyle changes."
    },
    "aids": {
        "symptoms": ["rapid weight loss", "fever", "night sweats", "fatigue"],
        "treatment": "Antiretroviral therapy (ART), supportive care."
    },
    "albinism": {
        "symptoms": ["very light skin", "white or very light hair", "vision problems"],
        "treatment": "No cure, but management includes sun protection and corrective lenses."
    },
    # You can continue adding diseases similarly from the list.
}

# Function to display disease information
def display_disease_info(disease_name):
    disease_name = disease_name.lower()
    if disease_name in diseases:
        disease = diseases[disease_name]
        print(f"\nDisease: {disease_name.title()}")
        print("Symptoms:")
        for symptom in disease["symptoms"]:
            print(f"  - {symptom}")
        print(f"\nTreatment: {disease['treatment']}")
    else:
        print("Disease not found. Please check the name and try again.")

# Function to handle chat feature
def chat_bot():
    print("\nChat Bot is active. Type 'exit' to quit.\n")
    while True:
        user_input = input("You: ").strip().lower()
        
        # Responding to the "cha hal aa?" query with "khair aa"
        if user_input == "cha hal aa?":
            print("Bot: khair aa")
        
        # Check if the user wants to know about a disease
        elif user_input in diseases:
            display_disease_info(user_input)
        
        # Exit the chat bot if the user types 'exit'
        elif user_input == "exit":
            print("Exiting chat...")
            break
        
        # If the input is unrecognized
        else:
            print("Bot: Sorry, I didn't understand that. Please ask about a disease or type 'exit' to quit.")

# Main menu to choose between disease info or chat
def main():
    print("Welcome to the Disease Information and Chat Bot!\n")
    
    while True:
        print("\nChoose an option:")
        print("1. Disease Information")
        print("2. Chat with Bot")
        print("3. Exit")
        
        option = input("Enter your choice (1/2/3): ").strip()
        
        if option == "1":
            disease_name = input("Enter the name of the disease: ").strip().lower()
            display_disease_info(disease_name)
        
        elif option == "2":
            chat_bot()
        
        elif option == "3":
            print("Exiting the program...")
            break
        
        else:
            print("Invalid choice. Please try again.")

# Run the program
if __name__ == "__main__":
    main()