forked from Eshita-Badhe/QuickAid-First_Aid_Advisor_ChatBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.txt
More file actions
386 lines (358 loc) · 19.1 KB
/
database.txt
File metadata and controls
386 lines (358 loc) · 19.1 KB
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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
CREATE TABLE symptoms (
id INT AUTO_INCREMENT PRIMARY KEY,
keyword VARCHAR(255) NOT NULL,
description TEXT
);
CREATE TABLE symptom_keywords (
id INT AUTO_INCREMENT PRIMARY KEY,
symptom_id INT,
keyword VARCHAR(255),
FOREIGN KEY (symptom_id) REFERENCES symptoms(id) ON DELETE CASCADE
);
CREATE TABLE follow_up_questions (
id INT AUTO_INCREMENT PRIMARY KEY,
symptom_id INT,
question TEXT,
FOREIGN KEY (symptom_id) REFERENCES symptoms(id) ON DELETE CASCADE
);
CREATE TABLE responses (
id INT AUTO_INCREMENT PRIMARY KEY,
symptom_id INT,
severity VARCHAR(50),
advice TEXT,
FOREIGN KEY (symptom_id) REFERENCES symptoms(id) ON DELETE CASCADE
);
CREATE TABLE precautions (
precaution_id INT AUTO_INCREMENT PRIMARY KEY,
symptom_id INT,
precaution_description TEXT,
FOREIGN KEY (symptom_id) REFERENCES symptoms(id) ON DELETE CASCADE
);
INSERT INTO symptoms (id, keyword, description) VALUES
(1, 'cut', 'A cut or injury causing bleeding'),
(2, 'burn', 'A burn injury caused by heat or fire'),
(3, 'pain', 'Pain or ache in any part of the body'),
(4, 'faint', 'Feeling faint or losing consciousness'),
(5, 'fracture', 'A broken bone or fracture'),
(6, 'sprain', 'A twisted or strained joint'),
(7, 'choking', 'Difficulty breathing due to obstruction'),
(8, 'nosebleed', 'Bleeding from the nose'),
(9, 'cough', 'Coughing, cold, or sneezing'),
(10, 'thanks', 'Gratitude'),
(11, 'bye', 'Greeting'),
(12, 'ok', 'msg'),
(13, 'headache', 'Pain or discomfort in the head or neck area'),
(14, 'fever', 'High body temperature, often indicating an infection'),
(15, 'nausea', 'Feeling of sickness with an urge to vomit'),
(16, 'dizziness', 'A feeling of lightheadedness or unsteadiness'),
(17, 'sore throat', 'Pain or irritation in the throat, often from infection'),
(18, 'fatigue', 'Extreme tiredness or lack of energy'),
(19, 'diarrhea', 'Frequent and loose bowel movements'),
(20, 'vomiting', 'The act of forcefully expelling stomach contents'),
(21, 'shortness of breath', 'Difficulty in breathing or feeling of not getting enough air'),
(22, 'chest pain', 'Pain or discomfort in the chest area, often associated with heart issues'),
(23, 'rash', 'Skin irritation, often red or inflamed'),
(24, 'swelling', 'An abnormal enlargement of a body part, usually due to inflammation or injury'),
(25, 'insomnia', 'Difficulty falling or staying asleep'),
(26, 'anxiety', 'Feeling of worry, nervousness, or unease'),
(27, 'dehydration', 'Lack of sufficient fluids in the body'),
(28, 'seizure', 'Sudden and uncontrolled electrical disturbances in the brain'),
(29, 'heart palpitations', 'Rapid or irregular heartbeat'),
(30, 'allergy', 'An immune system reaction to substances like pollen, dust, or food'),
(31, 'high blood pressure', 'Increased pressure in the arteries, potentially leading to heart problems'),
(32, 'coughing up blood', 'Expectoration of blood from the respiratory tract'),
(33, 'severe bruising', 'Discoloration of the skin due to blood pooling under the surface'),
(34, 'muscle cramps', 'Involuntary and painful contractions of muscles'),
(35, 'cold sweat', 'Excessive perspiration due to stress, pain, or illness'),
(36, 'tingling', 'A sensation of pins and needles, often in hands or feet'),
(37, 'shivering', 'Involuntary muscle movements due to cold or fever'),
(38, 'difficulty swallowing', 'Difficulty in moving food or liquids down the throat'),
(39, 'stomach cramps', 'Pain or discomfort in the abdominal region'),
(40, 'bloody urine', 'Presence of blood in the urine, often a sign of urinary tract issues'),
(41, 'urinary urgency', 'A sudden, strong urge to urinate'),
(42, 'joint pain', 'Pain or discomfort in a joint, such as knee, elbow, or wrist'),
(43, 'sweating', 'Excessive secretion of sweat from the sweat glands'),
(44, 'red eyes', 'Inflammation or irritation in the eyes, often due to infection or allergies'),
(45, 'hives', 'Raised, red, and itchy bumps on the skin, often due to allergic reactions'),
(46, 'wheezing', 'High-pitched whistling sound while breathing, typically due to respiratory issues'),
(47, 'bloody stool', 'Presence of blood in the stool, indicating potential digestive tract issues'),
(48, 'fever', 'A rise in body temperature.');
INSERT INTO symptom_keywords (id, symptom_id, keyword) VALUES
(1, 1, 'cut'),
(2, 1, 'bleeding'),
(3, 1, 'scratch'),
(4, 2, 'burn'),
(5, 2, 'fire'),
(6, 2, 'scald'),
(7, 3, 'pain'),
(8, 3, 'ache'),
(9, 3, 'hurt'),
(10, 4, 'faint'),
(11, 4, 'unconscious'),
(12, 4, 'collapse'),
(13, 5, 'fracture'),
(14, 5, 'broken'),
(15, 5, 'bone'),
(16, 6, 'sprain'),
(17, 6, 'twist'),
(18, 6, 'strain'),
(19, 7, 'choke'),
(20, 7, 'choking'),
(21, 7, 'airway'),
(22, 7, 'choking'), -- Duplicate
(23, 8, 'nosebleed'),
(24, 8, 'nose'),
(25, 8, 'bleeding from nose'),
(26, 9, 'cough'),
(27, 9, 'cold'),
(28, 9, 'sneezing'),
(29, 10, 'thanks'),
(30, 11, 'bye'),
(31, 12, 'ok'),
(32, 13, 'headache'),
(33, 13, 'migraine'),
(34, 13, 'head pain'),
(35, 14, 'fever'),
(36, 14, 'high temperature'),
(37, 14, 'infection'),
(38, 15, 'nausea'),
(39, 15, 'sick'),
(40, 15, 'vomiting urge'),
(41, 16, 'dizziness'),
(42, 16, 'lightheaded'),
(43, 16, 'unsteady'),
(44, 17, 'sore throat'),
(45, 17, 'throat pain'),
(46, 17, 'irritation'),
(47, 18, 'fatigue'),
(48, 18, 'tiredness'),
(49, 18, 'lack of energy'),
(50, 19, 'diarrhea'),
(51, 19, 'loose stools'),
(52, 19, 'frequent bowel movement'),
(53, 20, 'vomiting'),
(54, 20, 'throwing up'),
(55, 20, 'expelling contents'),
(56, 21, 'shortness of breath'),
(57, 21, 'difficulty breathing'),
(58, 21, 'not enough air'),
(59, 22, 'chest pain'),
(60, 22, 'heart discomfort'),
(61, 22, 'pressure in chest'),
(62, 23, 'rash'),
(63, 23, 'skin irritation'),
(64, 23, 'red spots'),
(65, 24, 'swelling'),
(66, 24, 'enlargement'),
(67, 24, 'inflammation'),
(68, 25, 'insomnia'),
(69, 25, 'sleeplessness'),
(70, 25, 'restlessness'),
(71, 26, 'anxiety'),
(72, 26, 'nervousness'),
(73, 26, 'worry'),
(74, 27, 'dehydration'),
(75, 27, 'lack of fluids'),
(76, 27, 'thirst'),
(77, 28, 'seizure'),
(78, 28, 'epileptic'),
(79, 28, 'brain disturbance'),
(80, 29, 'heart palpitations'),
(81, 29, 'irregular heartbeat'),
(82, 29, 'racing heart'),
(83, 30, 'allergy'),
(84, 30, 'allergic reaction'),
(85, 30, 'hypersensitivity'),
(86, 31, 'high blood pressure'),
(87, 31, 'hypertension'),
(88, 31, 'raised BP'),
(89, 32, 'coughing up blood'),
(90, 32, 'hemoptysis'),
(91, 32, 'blood in cough'),
(92, 33, 'severe bruising'),
(93, 33, 'large bruise'),
(94, 33, 'discolored skin'),
(95, 34, 'muscle cramps'),
(96, 34, 'painful muscle contraction'),
(97, 34, 'muscle spasms'),
(98, 35, 'cold sweat'),
(99, 35, 'sweating'),
(100, 35, 'excessive perspiration'),
(101, 36, 'tingling'),
(102, 36, 'pins and needles'),
(103, 36, 'numbness'),
(104, 37, 'shivering'),
(105, 37, 'cold chills'),
(106, 37, 'tremors'),
(107, 38, 'difficulty swallowing'),
(108, 38, 'dysphagia'),
(109, 38, 'trouble swallowing'),
(110, 39, 'stomach cramps'),
(111, 39, 'abdominal pain'),
(112, 39, 'belly pain'),
(113, 40, 'bloody urine'),
(114, 40, 'hematuria'),
(115, 40, 'blood in urine'),
(116, 41, 'urinary urgency'),
(117, 41, 'urgent urination'),
(118, 41, 'frequent urge to urinate'),
(119, 42, 'joint pain'),
(120, 42, 'arthritis'),
(121, 42, 'joint inflammation'),
(122, 43, 'sweating'),
(123, 43, 'perspiration'),
(124, 43, 'excessive sweating'),
(125, 44, 'red eyes'),
(126, 44, 'eye irritation'),
(127, 44, 'conjunctivitis'),
(128, 45, 'hives'),
(129, 45, 'skin rash'),
(130, 45, 'allergic rash'),
(131, 46, 'wheezing'),
(132, 46, 'breathing difficulty'),
(133, 46, 'whistling sound'),
(134, 47, 'bloody stool'),
(135, 47, 'hemorrhoids'),
(136, 47, 'digestive bleeding'),
(137, 1, 'high temperature'); -- Duplicate
INSERT INTO follow_up_questions (id, symptom_id, question) VALUES
(1, 1, 'Is the cut bleeding heavily or minor?'),
(2, 2, 'Is the burn severe or mild?'),
(3, 3, 'How severe is the pain?'),
(4, 4, 'Did the person regain consciousness quickly?'),
(5, 5, 'Immobilize the affected area, apply a splint if possible, and seek immediate medical help.'),
(6, 6, 'Is there swelling or difficulty moving the affected joint?'),
(7, 7, 'Is the person able to breathe or talk?'),
(8, 8, 'Is the bleeding heavy or moderate?'),
(9, 9, 'Is the coughing dry or producing mucus?'),
(10, 10, 'You are welcome! Stay safe!'),
(11, 11, 'How can I assist you further?'),
(12, 12, 'Is there anything else you would like to mention?'),
(13, 13, 'Is the headache throbbing or sharp?'),
(14, 14, 'Is the fever high or mild?'),
(15, 15, 'Do you feel nauseous or dizzy?'),
(16, 16, 'Is the dizziness constant or does it come and go?'),
(17, 17, 'Is the sore throat painful or scratchy?'),
(18, 18, 'How long have you been feeling fatigued?'),
(19, 19, 'How frequent are the bowel movements?'),
(20, 20, 'Is the vomiting accompanied by other symptoms like dizziness?'),
(21, 21, 'Is the shortness of breath constant or does it occur intermittently?'),
(22, 22, 'Is the chest pain sharp or dull?'),
(23, 23, 'Is the rash itchy or painful?'),
(24, 24, 'Has the swelling increased over time?'),
(25, 25, 'Have you had trouble falling asleep lately?'),
(26, 26, 'Is the anxiety caused by any specific trigger?'),
(27, 27, 'Have you been drinking enough fluids?'),
(28, 28, 'How long have you been experiencing seizures?'),
(29, 29, 'Are the heart palpitations occurring at rest or with activity?'),
(30, 30, 'Do you have any known allergies?'),
(31, 31, 'Is the blood pressure consistently high or fluctuating?'),
(32, 32, 'How much blood are you coughing up?'),
(33, 33, 'Is the bruising spreading or localized?'),
(34, 34, 'Are the muscle cramps affecting a specific area?'),
(35, 35, 'Is the cold sweat caused by any specific activity?'),
(36, 36, 'Are you experiencing persistent tingling?'),
(37, 37, 'Is the shivering caused by cold or fever?'),
(38, 38, 'Is the difficulty swallowing constant or intermittent?'),
(39, 39, 'Are the stomach cramps accompanied by bloating?'),
(40, 40, 'Is the bloody urine dark red or light?'),
(41, 41, 'Do you feel the urge to urinate frequently?'),
(42, 42, 'Is the joint pain constant or does it come and go?'),
(43, 43, 'Is the sweating excessive or just occasional?'),
(44, 44, 'Are the red eyes itchy or watery?'),
(45, 45, 'Is the hives rash spreading or staying in one area?'),
(46, 46, 'Is the wheezing constant or intermittent?'),
(47, 47, 'Is the bleeding in the stool bright red or dark?'),
(48, 1, 'Is the fever accompanied by chills?'); -- Duplicate symptom_id
INSERT INTO responses (id, symptom_id, severity, advice) VALUES
(1, 1, 'minor', 'Clean the wound with water, apply pressure to stop bleeding, and cover with a clean bandage.'),
(2, 1, 'major', 'Apply firm pressure, elevate the wound, and seek medical help.'),
(3, 2, 'minor', 'Cool the burn with water for 10 minutes and cover with a sterile cloth.'),
(4, 2, 'severe', 'Cover with a clean cloth, avoid ice, and run cold water over burn for 10-15 minutes. Seek emergency medical help.'),
(5, 3, 'minor', 'Rest and use a cold pack. If pain persists, consult a doctor.'),
(6, 3, 'major', 'Rest and use a cold pack. If pain persists, consult a doctor immediately.'),
(7, 4, 'conscious', 'Let them rest, offer water if awake, and monitor their condition.'),
(8, 4, 'unconscious', 'Elevate legs and seek emergency help if consciousness doesn?t return.'),
(9, 5, 'normal', 'Immobilize the affected area, apply a splint if possible, and seek immediate medical help.'),
(10, 6, 'normal', 'Rest the injured area, apply ice, compress with a bandage, and elevate.'),
(11, 7, 'breathing', 'Since you can breathe and talk, try coughing forcefully to clear the obstruction.'),
(12, 7, 'no-breathing', 'If you cannot breathe or talk, please have someone perform the Heimlich maneuver.'),
(13, 8, 'normal', 'Lean forward, pinch the nose, and avoid tilting the head back. Seek help if bleeding persists.'),
(14, 9, 'normal', 'Take steam and gargle with salted hot water a few times.'),
(15, 10, 'neutral', 'Stay safe! Contact a medical professional if needed.'),
(16, 11, 'neutral', 'Take care! Let me know if you need further help.'),
(17, 12, 'neutral', 'Alright! Stay well.'),
(18, 13, 'minor', 'Take rest, hydrate, and use over-the-counter pain relievers.'),
(19, 13, 'severe', 'Seek medical attention immediately for proper diagnosis and treatment.'),
(20, 14, 'minor', 'Take fever-reducing medicine and stay hydrated.'),
(21, 14, 'severe', 'Apply a cool compress to the forehead and hydrate. Seek medical help if fever remains high or persistent.'),
(22, 15, 'minor', 'Sip fluids slowly, avoid strong smells, and rest.'),
(23, 15, 'severe', 'Stay hydrated and rest in a quiet, dark place. Seek medical help if nausea worsens or you can?t keep fluids down.'),
(24, 16, 'minor', 'Rest, hydrate, and avoid sudden head movements.'),
(25, 16, 'severe', 'Sit down, rest, and elevate your head. Seek medical help if dizziness is severe or persistent.'),
(26, 17, 'minor', 'Gargle with warm salt water, drink warm fluids, and rest your voice.'),
(27, 17, 'severe', 'Sip warm tea, gargle with salt water, and rest. Seek medical help if pain or difficulty swallowing worsens.'),
(28, 18, 'minor', 'Rest, hydrate, and take short naps throughout the day.'),
(29, 18, 'severe', 'Rest, hydrate, and avoid overexertion. Seek medical help if fatigue doesn?t improve with rest.'),
(30, 19, 'minor', 'Increase your fluid intake, avoid greasy foods, and rest.'),
(31, 19, 'severe', 'Stay hydrated with oral rehydration solutions. Seek medical help if diarrhea lasts more than 24 hours.'),
(32, 20, 'minor', 'Rest and drink fluids to avoid dehydration.'),
(33, 20, 'severe', 'Hydrate and avoid eating solid foods until vomiting subsides. Seek medical help if vomiting continues or is severe.'),
(34, 21, 'minor', 'Sit up straight, breathe slowly, and try to relax.'),
(35, 21, 'severe', 'Try slow, controlled breathing to help alleviate shortness of breath. Seek medical help if breathing difficulty worsens.'),
(36, 22, 'minor', 'Take rest, use a warm compress, and avoid physical exertion.'),
(37, 22, 'severe', 'Rest, avoid physical exertion, and take deep breaths. Seek immediate medical help for chest pain or discomfort.'),
(38, 23, 'minor', 'Apply soothing creams or lotions and avoid scratching the rash.'),
(39, 23, 'severe', 'Avoid scratching the rash, and apply a cold compress to soothe itching. Seek medical help if rash worsens or spreads rapidly.'),
(40, 24, 'minor', 'Rest and elevate the affected area to reduce swelling.'),
(41, 24, 'severe', 'Elevate the swollen area and apply ice for 20 minutes. Seek medical help if swelling doesn?t subside.');
INSERT INTO precautions (precaution_id, symptom_id, precaution_description)
VALUES
(1, 1, 'Avoid sharp objects and wear protective gear when handling tools or machinery.'),
(2, 2, 'Avoid handling hot objects without gloves and ensure safe handling of flammable materials.'),
(3, 3, 'Maintain a healthy diet, exercise regularly, and manage stress to prevent pain.'),
(4, 4, 'Avoid sudden changes in position; rise slowly from a sitting or lying position.'),
(5, 5, 'Avoid high-risk activities like contact sports without proper protective gear.'),
(6, 6, 'Stretch before physical activities to reduce the risk of spraining a joint.'),
(7, 7, 'Avoid eating too fast and take small bites to prevent choking.'),
(8, 8, 'Avoid picking the nose, and use a humidifier to keep nasal passages moist in dry environments.'),
(9, 9, 'Wash your hands regularly, and avoid exposure to sick individuals to prevent colds.'),
(10, 10, 'Maintain a positive attitude and express gratitude regularly to reduce stress.'),
(11, 11, 'Ensure proper hygiene and vaccinations to avoid infections that may cause fever.'),
(12, 12, 'Rest and hydrate regularly to avoid dehydration.'),
(13, 13, 'Avoid excessive screen time and take regular breaks to reduce eye strain and headaches.'),
(14, 14, 'Dress appropriately for the weather and maintain hydration to avoid heat-related fever.'),
(15, 15, 'Eat smaller meals throughout the day and avoid heavy foods to prevent nausea.'),
(16, 16, 'Get enough sleep, avoid alcohol, and stay hydrated to prevent dizziness.'),
(17, 17, 'Avoid smoking and excessive drinking, and treat throat infections promptly.'),
(18, 18, 'Get regular sleep and practice relaxation techniques to avoid fatigue.'),
(19, 19, 'Maintain a balanced diet and stay hydrated to avoid digestive issues like diarrhea.'),
(20, 20, 'Avoid overeating, and be cautious with food that is too spicy or rich to prevent vomiting.'),
(21, 21, 'Avoid exertion in extreme temperatures and seek medical attention if shortness of breath occurs.'),
(22, 22, 'Maintain a healthy lifestyle with a balanced diet and regular exercise to prevent heart problems.'),
(23, 23, 'Avoid exposure to allergens and harsh chemicals that may cause skin irritation or rash.'),
(24, 24, 'Avoid excessive physical activity that may cause swelling and elevate injured limbs.'),
(25, 25, 'Create a relaxing environment and avoid caffeine to prevent insomnia.'),
(26, 26, 'Practice mindfulness, deep breathing, and meditation to reduce anxiety.'),
(27, 27, 'Drink plenty of fluids, especially water, to avoid dehydration.'),
(28, 28, 'Avoid triggers such as flashing lights or stress to reduce the likelihood of seizures.'),
(29, 29, 'Maintain a balanced diet and exercise regularly to prevent heart palpitations.'),
(30, 30, 'Avoid allergens such as pollen or certain foods to prevent allergic reactions.'),
(31, 31, 'Monitor blood pressure regularly and avoid high-sodium foods to prevent high blood pressure.'),
(32, 32, 'Avoid irritants like smoking and air pollution that may cause respiratory issues.'),
(33, 33, 'Avoid physical stress, and apply ice or compression to reduce bruising.'),
(34, 34, 'Warm up before exercise and hydrate properly to avoid muscle cramps.'),
(35, 35, 'Stay calm and breathe deeply to reduce cold sweat caused by anxiety or stress.'),
(36, 36, 'Wear appropriate footwear and avoid sitting or standing in one position for too long.'),
(37, 37, 'Dress warmly and avoid exposure to cold weather for extended periods.'),
(38, 38, 'Eat slowly and avoid large portions to prevent difficulty swallowing.'),
(39, 39, 'Eat balanced meals and avoid excessive fatty foods to prevent stomach cramps.'),
(40, 40, 'Drink plenty of water and avoid irritation of the urinary tract to avoid bloody urine.'),
(41, 41, 'Avoid delaying urination and drink enough fluids to prevent urinary urgency.'),
(42, 42, 'Maintain flexibility through regular exercise and avoid overexertion of joints.'),
(43, 43, 'Wear light clothing in hot weather to avoid excessive sweating.'),
(44, 44, 'Avoid exposure to irritants, and use appropriate eye protection when necessary.'),
(45, 45, 'Avoid known allergens and take antihistamines as needed to prevent hives.'),
(46, 46, 'Avoid exposure to allergens and pollutants that can trigger wheezing.'),
(47, 47, 'Maintain a healthy digestive system and avoid excessive alcohol to prevent bloody stool.'),
(48, 48, 'Monitor body temperature and seek medical advice if fever persists or becomes severe.');