Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,12 +21,159 @@ patients_db = []
|
|
21 |
|
22 |
# Disease details for medical report analyzer
|
23 |
disease_details = {
|
24 |
-
"anemia": {
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
}
|
29 |
|
|
|
30 |
# Passwords
|
31 |
doctor_password = "doctor123"
|
32 |
|
|
|
21 |
|
22 |
# Disease details for medical report analyzer
|
23 |
disease_details = {
|
24 |
+
"anemia": {
|
25 |
+
"medication": (
|
26 |
+
"Iron supplements (e.g., ferrous sulfate), "
|
27 |
+
"Vitamin B12 injections (for pernicious anemia), "
|
28 |
+
"Folic acid supplements."
|
29 |
+
),
|
30 |
+
"precaution": (
|
31 |
+
"Consume iron-rich foods like spinach, red meat, and lentils. "
|
32 |
+
"Pair iron-rich foods with vitamin C to enhance absorption. "
|
33 |
+
"Avoid tea or coffee with meals as they inhibit iron absorption."
|
34 |
+
),
|
35 |
+
"doctor": "Hematologist",
|
36 |
+
},
|
37 |
+
"viral infection": {
|
38 |
+
"medication": (
|
39 |
+
"Antiviral drugs (e.g., oseltamivir for flu, acyclovir for herpes). "
|
40 |
+
"Over-the-counter medications for symptom relief, such as ibuprofen for fever and body aches."
|
41 |
+
),
|
42 |
+
"precaution": (
|
43 |
+
"Stay hydrated by drinking plenty of fluids. "
|
44 |
+
"Isolate to prevent spreading the infection. "
|
45 |
+
"Rest adequately to support recovery. Maintain proper hygiene."
|
46 |
+
),
|
47 |
+
"doctor": "Infectious Disease Specialist",
|
48 |
+
},
|
49 |
+
"liver disease": {
|
50 |
+
"medication": (
|
51 |
+
"Hepatoprotective drugs (e.g., ursodeoxycholic acid, silymarin). "
|
52 |
+
"Antiviral therapy for viral hepatitis. "
|
53 |
+
"Diuretics for managing fluid retention (e.g., spironolactone)."
|
54 |
+
),
|
55 |
+
"precaution": (
|
56 |
+
"Avoid alcohol and hepatotoxic drugs. "
|
57 |
+
"Follow a low-fat diet and avoid processed foods. "
|
58 |
+
"Regularly monitor liver function tests."
|
59 |
+
),
|
60 |
+
"doctor": "Hepatologist",
|
61 |
+
},
|
62 |
+
"diabetes": {
|
63 |
+
"medication": (
|
64 |
+
"Oral hypoglycemics (e.g., metformin). "
|
65 |
+
"Insulin therapy for Type 1 diabetes or advanced Type 2 diabetes. "
|
66 |
+
"GLP-1 receptor agonists (e.g., liraglutide) for improving blood sugar control."
|
67 |
+
),
|
68 |
+
"precaution": (
|
69 |
+
"Monitor blood glucose levels daily. "
|
70 |
+
"Follow a low-carb, high-fiber diet. "
|
71 |
+
"Engage in regular physical activity. "
|
72 |
+
"Avoid sugary foods and beverages."
|
73 |
+
),
|
74 |
+
"doctor": "Endocrinologist",
|
75 |
+
},
|
76 |
+
"hypertension": {
|
77 |
+
"medication": (
|
78 |
+
"ACE inhibitors (e.g., lisinopril). "
|
79 |
+
"Beta-blockers (e.g., metoprolol). "
|
80 |
+
"Calcium channel blockers (e.g., amlodipine). "
|
81 |
+
"Diuretics (e.g., hydrochlorothiazide)."
|
82 |
+
),
|
83 |
+
"precaution": (
|
84 |
+
"Reduce salt intake to less than 2g per day. "
|
85 |
+
"Engage in at least 150 minutes of moderate exercise weekly. "
|
86 |
+
"Avoid smoking and excessive alcohol consumption. "
|
87 |
+
"Manage stress through relaxation techniques like yoga or meditation."
|
88 |
+
),
|
89 |
+
"doctor": "Cardiologist",
|
90 |
+
},
|
91 |
+
"pneumonia": {
|
92 |
+
"medication": (
|
93 |
+
"Antibiotics (e.g., amoxicillin or azithromycin for bacterial pneumonia). "
|
94 |
+
"Antiviral therapy if caused by viruses like influenza. "
|
95 |
+
"Supplemental oxygen in severe cases."
|
96 |
+
),
|
97 |
+
"precaution": (
|
98 |
+
"Get plenty of rest and stay hydrated. "
|
99 |
+
"Use a humidifier to ease breathing. "
|
100 |
+
"Avoid smoking or exposure to pollutants. "
|
101 |
+
"Ensure vaccination against influenza and pneumococcus."
|
102 |
+
),
|
103 |
+
"doctor": "Pulmonologist",
|
104 |
+
},
|
105 |
+
"asthma": {
|
106 |
+
"medication": (
|
107 |
+
"Short-acting bronchodilators (e.g., albuterol) for quick relief. "
|
108 |
+
"Inhaled corticosteroids (e.g., fluticasone) for long-term control. "
|
109 |
+
"Leukotriene receptor antagonists (e.g., montelukast) for reducing inflammation."
|
110 |
+
),
|
111 |
+
"precaution": (
|
112 |
+
"Avoid known allergens like pollen, dust, and pet dander. "
|
113 |
+
"Carry a rescue inhaler at all times. "
|
114 |
+
"Practice breathing exercises to strengthen lungs. "
|
115 |
+
"Avoid cold air or strenuous exercise without a warm-up."
|
116 |
+
),
|
117 |
+
"doctor": "Pulmonologist",
|
118 |
+
},
|
119 |
+
"kidney disease": {
|
120 |
+
"medication": (
|
121 |
+
"ACE inhibitors or ARBs (e.g., losartan) for controlling blood pressure. "
|
122 |
+
"Erythropoietin-stimulating agents for anemia management. "
|
123 |
+
"Phosphate binders (e.g., sevelamer) to manage high phosphate levels."
|
124 |
+
),
|
125 |
+
"precaution": (
|
126 |
+
"Limit salt, potassium, and phosphorus in the diet. "
|
127 |
+
"Stay hydrated but avoid overhydration. "
|
128 |
+
"Avoid NSAIDs and other nephrotoxic drugs. "
|
129 |
+
"Monitor kidney function and blood pressure regularly."
|
130 |
+
),
|
131 |
+
"doctor": "Nephrologist",
|
132 |
+
},
|
133 |
+
"thyroid disorder": {
|
134 |
+
"medication": (
|
135 |
+
"Levothyroxine for hypothyroidism. "
|
136 |
+
"Antithyroid medications (e.g., methimazole) for hyperthyroidism. "
|
137 |
+
"Beta-blockers for symptomatic relief in hyperthyroidism."
|
138 |
+
),
|
139 |
+
"precaution": (
|
140 |
+
"Ensure regular thyroid function tests. "
|
141 |
+
"Avoid foods that interfere with thyroid hormone absorption (e.g., soy, certain vegetables). "
|
142 |
+
"Follow medication schedules precisely without skipping doses."
|
143 |
+
),
|
144 |
+
"doctor": "Endocrinologist",
|
145 |
+
},
|
146 |
+
"arthritis": {
|
147 |
+
"medication": (
|
148 |
+
"Nonsteroidal anti-inflammatory drugs (NSAIDs) for pain relief. "
|
149 |
+
"Disease-modifying antirheumatic drugs (DMARDs) for rheumatoid arthritis. "
|
150 |
+
"Biologics (e.g., adalimumab) in severe cases."
|
151 |
+
),
|
152 |
+
"precaution": (
|
153 |
+
"Engage in low-impact exercises like swimming or yoga. "
|
154 |
+
"Use ergonomic furniture to reduce joint strain. "
|
155 |
+
"Maintain a healthy weight to reduce joint stress. "
|
156 |
+
"Apply heat or cold therapy for symptom relief."
|
157 |
+
),
|
158 |
+
"doctor": "Rheumatologist",
|
159 |
+
},
|
160 |
+
"depression": {
|
161 |
+
"medication": (
|
162 |
+
"Selective serotonin reuptake inhibitors (SSRIs, e.g., sertraline). "
|
163 |
+
"Serotonin-norepinephrine reuptake inhibitors (SNRIs, e.g., venlafaxine). "
|
164 |
+
"Tricyclic antidepressants (e.g., amitriptyline) in specific cases."
|
165 |
+
),
|
166 |
+
"precaution": (
|
167 |
+
"Engage in regular physical exercise. "
|
168 |
+
"Maintain a routine and avoid isolation. "
|
169 |
+
"Consider therapy (e.g., CBT or psychotherapy). "
|
170 |
+
"Avoid alcohol and recreational drugs."
|
171 |
+
),
|
172 |
+
"doctor": "Psychiatrist",
|
173 |
+
},
|
174 |
}
|
175 |
|
176 |
+
|
177 |
# Passwords
|
178 |
doctor_password = "doctor123"
|
179 |
|