-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdiagnosis.js
237 lines (179 loc) · 13.6 KB
/
diagnosis.js
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
const medicalDatabase = {
"cough": {
description: "Cough is a common reflex action that occurs when mucus or foreign irritants drain down the back of the throat.",
solution: "Stay hydrated, rest, and take over-the-counter cough medicines if needed.",
images: ["cough-image.jpg", "coughingimage.jpg"]
},
"headache": {
description: "Headache is a pain in the head or neck region.",
solution: "Take pain relievers and rest in a quiet, dark room.",
images: ["headache-image.jpg", "headavhe.jpg"]
},
"fever": {
description: `Fever occurs when a person's body temperature becomes too hot, indicating a response to various illnesses. While a fever itself is not a sickness, it serves as a sign of an underlying condition. A high fever (over 39°C or 102°F) can be particularly concerning, especially in young children.`,
solution: `Here are some essential tips for managing fever in children
1. Encourage your child to stay hydrated by drinking plenty of fluids.
2. Dress your child in lightweight clothing to keep them comfortable.
3. Use a light blanket if they feel chilly, until the chills subside.
4. Avoid giving aspirin to children or teenagers.
5. For infants, consult a doctor before giving any pain relievers.
6. If your child is 6 months or older, you can give them acetaminophen (Tylenol) or ibuprofen (Advil, Motrin) following proper dosing instructions.
Seek immediate medical attention in the following situations:
1. Babies under 3 months old with a fever require urgent medical evaluation.
2. If a child of any age displays persistent fussiness or unusual behavior, even after taking medication to reduce the fever.
3. Look for signs of dehydration, such as no wet diapers for over eight to 10 hours, absence of tears while crying, dry mouth, or refusal to drink fluids.
4. Seek medical help if your child experiences a stiff neck or severe headache.
5. Pay attention to other symptoms like abdominal pain, difficulty breathing, rash, joint pain, or swelling.
6. If the fever persists for more than five consecutive days, seek medical advice.
Always prioritize your child's well-being and consult a healthcare professional if you have any concerns about their fever.
Managing Fever in Adults
When treating a fever in adults, especially if it reaches 103°F (39.4°C) or higher, the primary goal is to alleviate discomfort and promote rest.
Follow these home care tips for treating a fever:
1. Stay hydrated by drinking plenty of fluids.
2. Wear lightweight clothing to stay comfortable.
3. Use a light blanket if you feel chilly, until the chills subside.
4. Take acetaminophen (Tylenol) or ibuprofen (Advil, Motrin IB) as directed on the label.
Seek medical advice for an adult with fever if any of the following signs and symptoms are present:
1. Difficulty breathing.
2. Chest pain.
3. Severe headache.
4. Confusion or agitation.
5. Abdominal pain.
6. Repeated vomiting.
7. Dry mouth, decreased or dark urine, or refusal to drink fluids, which could indicate dehydration.
8. Skin rashes.
9. Difficulty swallowing fluids.
10. Pain with urination or pain in the back.
Seek emergency medical care for an adult with fever if they have been exposed to potentially dangerous situations, such as being left in a hot car, and display any of the following warning signs:
1. Fever with no sweating.
2. Severe headache.
3. Seizures.
4. Stiff neck.
5. Confusion.
6. Repeated vomiting or diarrhea.
7. Irritability or significant discomfort.
8. Any worrisome, different, or unusual symptoms.
Always prioritize seeking appropriate medical attention if you or someone else experiences any concerning symptoms during a fever.`,
images: ["fever-image.jpg", "feverimage.jpg"]
},
"headache": {
description: "Headache is a pain in the head or neck region.",
solution: "Take pain relievers and rest in a quiet, dark room.",
images: ["headache-image.jpg", "headavhe.jpg"]
},
"choking": {
description: "When food or something else get stucks in a person’s throat and he cannot breathe well. Choking occurs when an object becomes lodged in the throat or windpipe, obstructing the normal airflow. In adults, food particles are typically responsible for choking incidents, while young children are more prone to choking on small objects. This condition is life-threatening as it deprives the brain of oxygen. It is crucial to administer first aid promptly if you or someone else experiences choking.",
solution: `Signs of Choking to Look For:
1. One or both hands clutching the throat.
2. An expression of panic, shock, or confusion.
3. Inability to speak.
4. Strained or noisy breathing.
5. Squeaky sounds while attempting to breathe.
6. Coughing, which may be weak or forceful.
7. Skin, lips, and nails turning blue or gray.
8. Loss of consciousness.
If the choking person can cough forcefully, allow them to continue coughing, as this might naturally dislodge the obstructing object. However, if the person cannot cough, talk, cry, or laugh forcefully, administer first aid immediately.
First Aid Steps (Recommended by the American Red Cross):
1. Perform five back blows: Stand to the side and slightly behind the choking adult or kneel behind a child. Place one arm across their chest for support and bend them over at the waist, facing the ground. Strike between the shoulder blades five times using the heel of your hand.
2. Give five abdominal thrusts (Heimlich maneuver): If back blows don't clear the blockage, stand or kneel behind the person and wrap your arms around their waist. Position one hand above their navel, make a fist, and grasp it with your other hand. Apply a quick, upward thrust into their abdomen. For a child, use gentle yet firm pressure to avoid injury.
3. Alternate between five back blows and five abdominal thrusts until the blockage is dislodged.
Note: If you're unable to perform back blows, proceed directly with abdominal thrusts. Both methods are acceptable for adults and children older than one year.
If you're the only rescuer, provide back blows and abdominal thrusts first, then call 911 or your local emergency number for assistance. If someone else is present, ask them to call for help while you administer first aid.
If the person becomes unconscious, initiate standard cardiopulmonary resuscitation (CPR) with chest compressions and rescue breaths.
In cases involving pregnant individuals or when you cannot reach around the stomach, use chest thrusts instead:
1. Position your hands at the base of the breastbone, just above where the lowest ribs meet.
2. Apply a firm and quick thrust, pressing into the chest.
3. Repeat the chest thrusts until the airway is cleared.
To clear the airway of an unconscious person:
1. Lay the person on their back with arms by their sides.
2. Clear the airway by carefully sweeping the mouth with your finger if you can see the object. Avoid finger sweeping if the object is not visible, as this could push it deeper into the airway.
3. If the person remains unresponsive, begin CPR, using chest compressions to dislodge the obstruction. Administer only two rescue breaths per cycle, and regularly check the mouth for the object.
To clear the airway of a choking infant (aged younger than 1):
1. Sit down and hold the infant face-down on your forearm, with their head lower than their trunk.
2. Thump the infant gently but firmly five times on their back, using the heel of your hand and keeping your fingers pointed upward to avoid hitting the back of their head. The combination of gravity and the back thumps should release the blockage.
3. If the infant is not breathing, turn them face-up on your forearm with their head lower than their trunk.
4. Give five gentle but firm chest compressions using two fingers just below the nipple line. Let the chest rise between each compression.
5. Repeat the back thumps and chest compressions if breathing does not resume. Call for emergency medical help.
6. If the airway is clear but the infant is still not breathing, initiate infant CPR.
If you find yourself alone and choking:
1. Call 112 or your local emergency number immediately.
2. Perform abdominal thrusts (Heimlich maneuver) on yourself to dislodge the obstruction:
- Place a fist slightly above your navel.
- Grasp your fist with your other hand.
- Bend over a hard surface like a countertop or chair.
- Shove your fist inward and upward.
Remember, it's crucial to act quickly and confidently when dealing with choking to provide effective first aid. Always seek medical help even if you successfully dislodge the obstruction to ensure the person's well-being.
If the person still cannot breathe, call emergecy line, get the person to the nearest hospital.`,
images: ["", ""]
},
"drowning": {
description: "A person who has stopped breathing has only 4 minutes to live! You must act fast!",
solution: `Call 112 If:
Someone is drowning.
A child is having problems breathing or has stopped breathing as a result of being immersed or submerged in liquid. (Remember, children can drown in as little as 1 inch of water.)
A child has had a near-drowning episode
1. Get Help
Notify a lifeguard, if one is close. If not, ask someone to call 911.
If you are alone and you can swim, follow the steps below.
2. Move the Person
Take the person out of the water.
3. Check for Breathing
Place your ear next to the person's mouth and nose. Do you feel air on your cheek?
Look to see if the person's chest is moving.
4. If the Person is Not Breathing, Check Pulse
Check the person's pulse for 10 seconds.
5. If There Is No Pulse, Start CPR
For an adult:
Carefully place the person on their back.
Place the heel of one hand on the center of the chest at the nipple line. You can also push with one hand on top of the other.
Press down at least 2 inches. Make sure not to press on ribs.
Do chest compressions only, at the rate of 100-120 per minute or more. Let the chest rise completely between pushes.
Check to see if the person has started breathing.
For a child, CPR starts with rescue breathing:
Carefully place the child on their back.
Tilt head back and lift the chin. For a baby, be careful not to tilt the head back too far.
With an older child, pinch the nose closed and put your mouth over the child's mouth, forming a tight seal. With an infant, place your mouth over both the baby's nose and mouth.
Blow into the child's mouth for 1 second. You should see their chest rise.
Repeat the breath a second time.
Then begin chest compressions:
For a child, place the heel of one hand on the center of the chest at the nipple line. For an infant, place two fingers on the breastbone.
Press down at least 2 inches for a child, about 1 and 1/2 inches for an infant. Make sure not to press on the ribs or the end of the breastbone.
Do 30 chest compressions, at the rate of 100 per minute. Let the chest rise completely between pushes.
Check to see if the child has started breathing.
If you’re alone, take a break to call 112 after 2 minutes of CPR.
Repeat if Person Is Still Not Breathing
If you've been trained in CPR, you can now add two rescue breaths to the adult CPR cycle. Open the airway by tilting the head back and lifting the chin.
Pinch the nose of the victim closed. Take a normal breath, cover the victim's mouth with yours to create an airtight seal, and then give 2 one-second breaths as you watch for the chest to rise.
Give two breaths followed by 30 chest compressions.
Continue the cycle of 30 compressions and two breaths until the person starts breathing or emergency help arrives.
Note that these instructions are not meant to replace CPR training. Classes are available through the Nigerian Red Cross, local hospitals, you can also watch proper emergencies.`,
images: ["", ""]
},
"nosebleed": {
description: "How to stop nose bleeds.",
solution: `1. Sit quietly and upright.
2. Blow the nose gently to remove mucus and blood.
3. Have the person pinch the nose firmly for 10 minutes or until the bleeding has stopped.If this does not control the bleeding .Pack the nostril with a wad of cotton, leaving part of it outside the nose.
If possible, first wet the cotton with Vaseline or lidocaine, then pinch the nose firmly again. Do not let go for 10 minutes or more. Do not tip the head back.
Leave the cotton in place for a few hours after the bleeding stops; then take it out very carefully.`,
images: ["", ""]
},
// Add more illnesses and their data here...
};
function searchIllness() {
const input = document.getElementById("illness").value.toLowerCase();
const resultDiv = document.getElementById("result");
if (medicalDatabase[input]) {
const result = medicalDatabase[input];
const resultHTML = `
<h2>${input}</h2>
<p>Description: ${result.description}</p>
<p>Solution: ${result.solution}</p>
<h3>Images of ${input}:</h3>
${result.images.map(image => `<img src="${image}" alt="${input}" width="200">`).join("")}
`;
resultDiv.innerHTML = resultHTML;
} else {
resultDiv.innerHTML = `<p>Illness not found in the database. Please try another search term.</p>`;
}
}