import json

data = {
 "topic": "Inflammatory Bowel Disease",
 "slug": "inflammatory-bowel-disease",
 "category_id": 15399,
 "summary": "Pediatric inflammatory bowel disease - Crohn disease and ulcerative colitis - is a chronic, relapsing-remitting immune-mediated bowel inflammation with growing incidence in children, diagnosed by endoscopy and managed toward mucosal healing and normal growth.",
 "written_by": "claude-sonnet",
 "references": [
  {"title": "Pediatric Dentistry: Infancy through Adolescence - Arthur J. Nowak, John R. Christensen, Tad R. Mabry, Janice A. Townsend, Martha H. Wells - 6th Edition (2018) 656 pp., ISBN: 978-0-323-60826-8", "author": "Arthur J. Nowak, John R. Christensen, Tad R. Mabry, Janice A. Townsend, Martha H. Wells", "pages": [98]},
  {"title": "Update in Pediatrics", "author": None, "pages": [372]},
  {"title": "Netters Pediatrics (Florin Т., Ludwig St.)", "author": None, "pages": [721, 722]},
  {"title": "Textbook of Pediatric Gastroenterology, Hepatology and Nutrition (Stefano Guandalini, Anil Dhawan)", "author": None, "pages": [404, 716]},
  {"title": "Caring for the Hospitalized Child", "author": "Section on Hospital Medicine, American Academy of Pediatrics;Jeffrey C. Gershel;Daniel A. Rauch;", "pages": [322]},
  {"title": "Practical Algorithms in Pediatric Gastroenterology (Ron Shaoul)", "author": "meiersa", "pages": [66, 67]},
  {"title": "Kliegman R. Nelson Textbook of Pediatrics 2-Volume Set 22ed 2024", "author": None, "pages": [2325, 2489, 2490]},
  {"title": "CURRENT Diagnosis and Treatment Pediatrics, Twenty-Fourth Edition", "author": "Hay, William W., Levin, Myron J., Deterding, Robin R., Abzug, Mark J.", "pages": [698]}
 ],
 "short": [
  {"title": "In short", "content": (
   "- IBD comprises two main disorders - Crohn disease (can affect any part of the GI tract, from mouth to anus) and ulcerative colitis (limited to the colon and rectum)\n"
   "- In pediatric patients, Crohn disease is more common than ulcerative colitis, and most children are diagnosed in adolescence, though onset can be much earlier\n"
   "- Very early-onset IBD (before age 2) is more likely to be monogenic and severe; disease onset in the first 2 years of life is termed infantile-onset IBD, and onset between 2-6 years is very early-onset IBD\n"
   "- 5-30% of patients have a family member with IBD, and siblings have a 10-20x relative risk of developing IBD, indicating a genetic contribution alongside environmental and immune factors\n"
   "- IBD incidence is highest in developed nations (Europe, North America) and higher in urban than rural populations\n"
   "- Endoscopic evaluation (upper endoscopy and colonoscopy with biopsies) is the diagnostic gold standard\n"
   "- Up to 30% of IBD patients have elevated liver enzymes and about 5% develop chronic hepatobiliary disease (e.g., primary sclerosing cholangitis, autoimmune hepatitis)\n"
   "- Growth failure and osteoporosis can result from malnutrition due to suboptimal intake, increased GI losses, or malabsorption, particularly in Crohn disease\n"
   "- Extraintestinal manifestations span joints (peripheral arthritis, sacroiliitis, ankylosing spondylitis), skin/mucosa (aphthous stomatitis, orofacial granulomatosis), and bone (osteoporosis, osteomalacia, chronic recurrent multifocal osteomyelitis)\n"
   "- There is no cure for IBD; the therapeutic goal is mucosal healing and durable remission while maintaining normal growth and nutrition"
  )}
 ],
 "long": [
  {"title": "Definition", "content": (
   "Inflammatory bowel disease (IBD) refers to two distinct chronic inflammatory disorders of the gastrointestinal tract: Crohn disease, which can involve the large intestine, small intestine, or both (and, more broadly, any part of the GI tract), and ulcerative colitis, which is confined to inflammation of the colon and rectum. Both are idiopathic, likely immune-mediated diseases marked by a relapsing and remitting course. They are often discussed together because they share overlapping epidemiology, immunologic and genetic features, and diagnostic approach, but they differ in treatment strategy and prognosis. Onset before age 2 is called infantile-onset IBD, and onset between 2 and 6 years is termed very early-onset IBD; these younger-onset forms are more likely to reflect an underlying monogenic cause and tend to run a more severe course."
  )},
  {"title": "Epidemiology", "content": (
   "IBD incidence in children is rising. Worldwide, disease rates are unevenly distributed, with the highest rates in developed nations such as those in Europe and North America. People living in urban areas have higher rates of IBD than those in rural areas. In the pediatric population, Crohn disease is more common than ulcerative colitis overall, and most children are diagnosed during adolescence, though some present at a much younger age."
  )},
  {"title": "Etiology", "content": (
   "The etiology of IBD is multifactorial, reflecting a complex interaction of genetic susceptibility, host immune responses, and environmental triggers that together produce a maladaptive immune reaction to the normal gut flora. A genetic contribution is evident: 5-30% of patients have an affected family member, and siblings of an affected child carry a 10-20-fold relative risk of developing IBD themselves. Very early onset IBD (before age 2) is more likely to be monogenic in origin and tends to be more severe. Differences in gut bacterial abundance have been reported between IBD patients and controls, suggesting the microbiome contributes to initiating and sustaining inflammation, although findings across studies have been inconsistent."
  )},
  {"title": "Clinical features", "content": (
   "Diarrhea and abdominal pain are the most common presenting features in both children and adults, but some children have no laboratory abnormalities (such as anemia, iron deficiency, or elevated inflammatory markers) despite active disease. Malnutrition can occur, particularly in Crohn disease, due to suboptimal dietary intake, increased gastrointestinal losses, or malabsorption, and can result in growth failure and osteoporosis. Extraintestinal manifestations are common and wide-ranging: musculoskeletal (peripheral arthritis, sacroiliitis, ankylosing spondylitis, digital clubbing, periostitis, osteoporosis/osteomalacia, chronic recurrent multifocal osteomyelitis), and mucocutaneous (oral aphthous stomatitis, orofacial granulomatosis, cheilitis, glossitis, cobblestone oral mucosa). Hepatobiliary involvement is relatively common - up to 30% of patients have elevated liver enzymes, and about 5% develop chronic hepatobiliary disease such as primary sclerosing cholangitis, autoimmune hepatitis, or IgG4 sclerosing cholangitis."
  )},
  {"title": "Diagnostics", "content": (
   "Evaluation begins with a full medical and family history, documentation of nutritional status, and physical examination, followed by first-line laboratory studies: stool microscopy and culture, complete blood count, ESR, CRP, and albumin, with consideration of fecal calprotectin as a noninvasive inflammatory marker. Upper GI endoscopy and colonoscopy with biopsy are the gold-standard diagnostic tools and are used to distinguish Crohn disease from ulcerative colitis when histology and endoscopic findings are suggestive of IBD. When clinical suspicion remains high but endoscopy/histology is inconclusive, further evaluation of the small bowel may include IBD serology, MRI with a small bowel protocol, or ultrasound."
  )},
  {"title": "Differential diagnosis", "content": (
   "IBD must be distinguished from other causes of chronic abdominal pain, diarrhea, hematochezia, obstruction, or growth failure in children. Functional abdominal pain, constipation, irritable bowel syndrome, and GERD can mimic IBD's pain pattern. Infectious causes (bacterial, parasitic, protozoal, C. difficile), carbohydrate intolerance, celiac disease, and allergic colitis can mimic the diarrhea of IBD. Polyps, Meckel diverticulum, intestinal AV malformation, and anal fissure can cause hematochezia resembling IBD. Growth failure or weight loss in a child should also prompt consideration of endocrinopathy, anorexia, constitutional growth delay, parasitic infection, and neoplasms as alternative or coexisting explanations."
  )},
  {"title": "Treatment", "content": (
   "There is no cure for IBD; the therapeutic goals in children are mucosal healing, long-lasting remission, and preservation of normal growth and nutritional status. Induction and maintenance regimens draw on drug classes including 5-aminosalicylates, thiopurines, methotrexate, and biologic agents, all of which carry a recognized risk of drug-induced liver injury that must be monitored alongside disease activity. Evidence for probiotics remains weak: a Cochrane review found low-certainty evidence that probiotics may help induce remission in active ulcerative colitis, without identifying a specific effective strain, while evidence for probiotics in Crohn disease remission induction was considered too vague to support their use."
  )},
  {"title": "Complications", "content": (
   "Beyond growth failure, osteoporosis, and hepatobiliary disease, IBD-related malnutrition can lead to hepatic steatosis and cholelithiasis. Poor intestinal barrier health increases the risk of hepatic abscess formation via bacterial translocation and systemic infection. IBD is also associated with a hypercoagulable state, which can predispose to vascular complications including infarction, Budd-Chiari syndrome, and portal venous thrombosis."
  )}
 ],
 "clinical": [
  {"title": "Diagnostic and initial management approach", "content": (
   "When IBD is suspected in a child with chronic diarrhea, abdominal pain, or growth faltering, start with a thorough history (including family history), nutritional assessment, and exam, then send first-line labs: stool microscopy/culture, CBC, ESR, CRP, albumin, and consider fecal calprotectin as a noninvasive screen for mucosal inflammation. A finding pattern suggestive of IBD should prompt referral for upper endoscopy and colonoscopy with biopsies, which remain the gold standard for diagnosis and for distinguishing Crohn disease from ulcerative colitis. If clinical suspicion stays high despite inconclusive endoscopy/histology, pursue small bowel imaging (MRI small bowel protocol or ultrasound) and IBD serology.\n\nOnce IBD is confirmed, baseline assessment should include liver enzymes given that up to 30% of patients have hepatobiliary abnormalities, and growth parameters should be tracked closely since growth failure is a marker of disease control. Any patient started on thiopurines, methotrexate, 5-ASA agents, or biologics needs monitoring for drug-induced liver injury in addition to disease-activity monitoring. Because the goal of therapy is mucosal healing and durable remission with normal growth - not just symptom control - reassess growth trajectory and nutritional status, not only stool frequency and pain, at follow-up."
  )}
 ]
}

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