import json

data = {
 "topic": "Lactose Intolerance",
 "slug": "lactose-intolerance",
 "category_id": 14949,
 "summary": "Lactose intolerance is a digestive (not immune) disorder caused by lactase deficiency, producing dose-dependent GI symptoms after dairy intake that are managed with dietary lactose limitation rather than avoidance of all dairy.",
 "written_by": "claude-sonnet",
 "references": [
  {"title": "Your Childs Allergies and Asthma. The American Academy of Pediatrics Guide to Breathing Easy and Bringing up Healthy, Active… (American Academy of Pediatrics.Welch etc.).epub", "author": None, "pages": []},
  {"title": "Pediatrics for Practitioner (Sharad Thora)", "author": None, "pages": [410]},
  {"title": "MedStudy Pediatrics Core 11th Edition 2024-2025", "author": None, "pages": [347]},
  {"title": "The Clinician's Guide to Pediatric Nutrition", "author": "Natalie D. Muth;Mary Tanaka;", "pages": [31, 34, 380]},
  {"title": "Pediatric Clinical Practice Guidelines and Policies", "author": "American Academy of Pediatrics (AAP);", "pages": [1304]},
  {"title": "Pediatric Clinical Practice Guidelines & Policies, 18th Edition", "author": "American Academy of Pediatrics", "pages": [1278]},
  {"title": "Pediatric Nutrition (Ronald E. Kleinman, Frank R. Greer)", "author": None, "pages": [819, 820]},
  {"title": "Pediatric Board Study Guide", "author": None, "pages": [743]}
 ],
 "short": [
  {"title": "In short", "content": (
   "- Lactose intolerance is a digestive problem, not an allergy: it results from low activity of lactase, the brush-border enzyme that splits lactose into glucose and galactose\n"
   "- Undigested lactose is fermented by colonic bacteria, producing hydrogen gas and an osmotic load that cause bloating, cramps, flatulence, diarrhea, and nausea, typically 30 minutes to 2 hours after eating\n"
   "- Primary (adult-type) lactose intolerance, from a postweaning decline in intestinal lactase activity, is the most common cause of carbohydrate malabsorption worldwide and is uncommon before 2-3 years of age\n"
   "- Prevalence varies by ethnicity: about 20% of non-white Hispanic and Black children under 5 have lactase deficiency; white children typically don't become symptomatic until age 4-5, while non-white Hispanic, Asian American, and Black children may become symptomatic by age 2-3\n"
   "- Most children and adolescents can tolerate at least 12 g of lactose in a single dose (about 1 cup of milk or yogurt); most cheeses are low in lactose\n"
   "- Diagnosis is often made clinically by symptom improvement on a lactose-free diet; confirmatory tests include the hydrogen breath test (rise of ≥20 ppm from baseline is positive) or a blood glucose test (rise of <30 mg/dL [1.7 mmol/L] after lactose ingestion suggests intolerance; ≥30 mg/dL is normal digestion)\n"
   "- Fecal pH testing plus stool observation during watery diarrhea is another noninvasive option\n"
   "- Management: reduce rather than fully eliminate lactose - taking small portions with other foods throughout the day, using lactase enzyme supplements (e.g., Lactaid) or lactase-treated dairy, and regular small lactose exposure can increase tolerance over time\n"
   "- Whenever dairy is reduced or eliminated, ensure adequate calcium and vitamin D intake through other foods or supplementation\n"
   "- Milk protein allergy is a distinct, IgE-mediated immune reaction to cow's milk protein, not to be confused with lactose intolerance (an enzyme deficiency)"
  )}
 ],
 "long": [
  {"title": "Definition", "content": (
   "Lactose intolerance is an impaired ability to digest lactose, the disaccharide sugar found in milk, due to a deficiency of lactase - the enzyme normally present on the brush border near the tips of the small intestinal villi that breaks lactose down into glucose and galactose. The deficiency may be partial or complete, producing a spectrum of symptom severity depending on residual lactase activity and the amount of lactose ingested. It is a digestive/enzymatic problem, distinct from milk protein allergy, which is an immune (often IgE-mediated) reaction to cow's milk protein that can occur at any age, has an immediate onset after ingestion, and can range from mild to life-threatening."
  )},
  {"title": "Epidemiology", "content": (
   "Primary (adult-type) lactose intolerance, caused by a normal postweaning decline in intestinal lactase-specific activity, is the most common cause of carbohydrate malabsorption worldwide, and is uncommon before 2-3 years of age in all populations - lactose malabsorption apparent before that age should prompt a search for other etiologies. Prevalence varies substantially by race and ethnicity: about 20% of non-white Hispanic and Black children younger than 5 have lactase deficiency. White children typically do not become symptomatic until at least 4-5 years of age, whereas non-white Hispanic, Asian American, and Black children may become symptomatic as early as 2-3 years of age. Infants are universally able to digest the lactose in breast milk and standard infant formula."
  )},
  {"title": "Etiology", "content": (
   "Lactose intolerance can be primary (the common, genetically-programmed postweaning decline in lactase activity) or secondary, developing transiently during an episode of intestinal injury such as acute gastroenteritis/diarrhea, which reduces lactase production and slows digestion of lactose-containing foods until the mucosa recovers. Congenital and developmental forms of lactase deficiency also exist and are distinguished from the primary and secondary forms."
  )},
  {"title": "Pathophysiology", "content": (
   "When insufficient lactase is available to hydrolyze ingested lactose, the undigested sugar remains in the intestinal lumen and reaches the colon, where bacterial fermentation produces hydrogen gas, causing bloating and pain. The unabsorbed carbohydrate load also raises the osmotic concentration within the intestinal lumen, drawing in water and producing osmotic diarrhea. Symptoms - cramps, bloating, flatulence, diarrhea, and nausea - typically appear 30 minutes to 2 hours after a lactose-containing meal and are never life-threatening, though they can be quite uncomfortable."
  )},
  {"title": "Diagnostics", "content": (
   "Lactose intolerance is frequently diagnosed clinically: symptomatic improvement after dietary lactose elimination, with a gradual reintroduction/challenge to confirm the relationship, is often sufficient, and formal testing is rarely required. When confirmation is needed, options include: the hydrogen breath test, where a rise in breath hydrogen of 20 ppm or more from baseline after ingesting a lactose-containing product indicates lactose intolerance or small intestinal bacterial overgrowth (SIBO), depending on the clinical picture; a blood glucose test, where blood glucose is measured before and after lactose ingestion - a rise of 30 mg/dL (1.7 mmol/L) or more is a normal (reference-range) response, while a rise of less than 30 mg/dL suggests lactose intolerance; and fecal pH testing, typically used in the setting of watery diarrhea."
  )},
  {"title": "Treatment", "content": (
   "The mainstay of management is dietary lactose reduction rather than complete dairy avoidance. Most children and adolescents can tolerate at least 12 g of lactose in a single dose (roughly 1 cup of milk or yogurt); tolerance varies between individuals, and most types of cheese are naturally low in lactose. Tolerance is generally better when lactose-containing foods are eaten in small portions spread throughout the day, alongside other foods, rather than in one large dose. Lactase enzyme supplements (tablets or liquid, e.g., Lactaid) taken with or added to dairy can reduce lactose content by about 70% and help prevent symptoms; lactose-reduced/lactose-free milk products are also widely available. Regular, small, ongoing consumption of lactose-containing products can increase lactose tolerance over time. In children whose symptoms developed during an acute diarrheal illness, one approach is to limit lactose intake to about 2-3 g/kg/day (roughly 30-50 mL/kg/day of whole cow's milk) and mix milk with cereals, or substitute fermented dairy products such as yogurt, buttermilk, paneer, or cottage cheese, which are better tolerated than plain milk. Whenever dairy intake is reduced or eliminated, ensure the child continues to receive adequate calcium and vitamin D from other dietary sources or supplementation, since dairy is an important source of these nutrients for bone health and growth."
  )},
  {"title": "Differential diagnosis", "content": (
   "Milk protein allergy is the key mimic to distinguish from lactose intolerance: it is an immune (often IgE-mediated) response to cow's milk protein rather than an enzyme deficiency, can occur at any age, causes immediate reactions after ingestion, and can involve skin, oropharyngeal, respiratory, gastrointestinal, and/or cardiovascular symptoms ranging from mild to life-threatening, diagnosed with IgE antibody testing rather than a breath or glucose test. Fructose intolerance (fructose malabsorption), from an ineffective intestinal fructose carrier protein, produces a similar symptom picture (bloating, abdominal pain, vomiting, flatulence) after high-fructose foods rather than dairy. Lactose malabsorption presenting before 2-3 years of age should prompt evaluation for other causes, including galactosemia, an inborn error of galactose metabolism (deficient galactose-1-phosphate uridyltransferase) that requires a lactose-free diet starting in the neonatal period."
  )}
 ],
 "clinical": [
  {"title": "Approach at the bedside", "content": (
   "In a child with recurrent bloating, cramps, flatulence, or diarrhea occurring 30 minutes to 2 hours after dairy intake, a trial of dietary lactose elimination followed by gradual reintroduction is usually sufficient for diagnosis - formal testing is rarely needed. If confirmation is required, use the hydrogen breath test (positive if breath hydrogen rises ≥20 ppm from baseline) or a pre-/post-lactose blood glucose test (a rise of <30 mg/dL [1.7 mmol/L] suggests lactose intolerance; ≥30 mg/dL is a normal response). If symptoms appear before age 2-3, do not assume primary lactose intolerance - evaluate for other causes, including galactosemia.\n\nManage with lactose reduction, not full dairy elimination: guide families to keep dairy portions to about 12 g of lactose per sitting (roughly 1 cup of milk or yogurt), spread smaller portions through the day with other foods, favor lower-lactose choices such as cheese, yogurt, buttermilk, paneer, or cottage cheese, and consider lactase enzyme supplementation or lactose-reduced products. If symptoms arise during an acute diarrheal illness, temporarily limit lactose to about 2-3 g/kg/day (approximately 30-50 mL/kg/day of whole cow's milk) and mix milk with cereal until the gut recovers. Whatever approach is chosen, confirm the child's calcium and vitamin D intake remains adequate, substituting other dietary sources or supplements if dairy is significantly restricted."
  )}
 ]
}

with open("/tmp/lactose-intolerance.article.json", "w") as f:
    json.dump(data, f, indent=1)
print("written")
