import json # Sample dataset with cardiology and pediatrics questions dataset = { "data": [ { "question": "What are the warning signs of a heart attack?", "answer": "Warning signs include chest pain, shortness of breath, nausea, lightheadedness, and pain in the arm or jaw." }, { "question": "How is congestive heart failure treated?", "answer": "Treatment includes lifestyle changes, medications like ACE inhibitors or beta-blockers, and sometimes surgery." }, { "question": "What is atrial fibrillation?", "answer": "Atrial fibrillation is an irregular and often rapid heart rate that can lead to stroke and other heart complications." }, { "question": "What is a normal resting heart rate?", "answer": "A normal resting heart rate for adults is between 60 and 100 beats per minute." }, { "question": "What lifestyle changes help reduce the risk of heart disease?", "answer": "Healthy diet, regular exercise, quitting smoking, managing stress, and controlling blood pressure and cholesterol." }, { "question": "What vaccines are recommended for infants?", "answer": "Vaccines include Hepatitis B, DTaP, Hib, Polio, Pneumococcal, and Rotavirus, given at specific ages." }, { "question": "How much sleep does a toddler need?", "answer": "Toddlers typically need 11 to 14 hours of sleep in a 24-hour period, including naps." }, { "question": "What are common symptoms of ear infections in children?", "answer": "Symptoms include ear pain, fever, trouble sleeping, irritability, and tugging at the ear." }, { "question": "What is the normal temperature for a child?", "answer": "A normal body temperature for a child is around 98.6°F (37°C), but it can vary slightly." }, { "question": "When should a child start solid foods?", "answer": "Solid foods can be introduced around 6 months of age, starting with iron-fortified cereals and pureed vegetables." } ] } # Save to JSON filename = "medicalchatbot_sample_dataset.json" with open(filename, "w") as f: json.dump(dataset, f, indent=2) print(f"✅ Dataset saved as {filename}")