import json

references = [
  {"title": "Pediatric Nutrition Handbook", "author": "Kleinman, Ronald E.", "pages": [98,99]},
  {"title": "Kliegman R. Nelson Textbook of Pediatrics 2-Volume Set 22ed 2024", "author": None, "pages": [458,1122,1123]},
  {"title": "Ghai Essential Pediatrics, 9e (Vinod K Paul, Arvind Bagga)", "author": "CamScanner", "pages": [180,182]},
  {"title": "Update in Pediatrics", "author": None, "pages": [456]},
  {"title": "CURRENT Diagnosis and Treatment Pediatrics, Twenty-Fourth Edition", "author": "Hay, William W., Levin, Myron J., Deterding, Robin R., Abzug, Mark J.", "pages": [325]},
  {"title": "Pediatric Nutrition (Ronald E. Kleinman, Frank R. Greer)", "author": None, "pages": [78]},
  {"title": "Berkowitz's Pediatrics", "author": "Berkowitz, Carol D.;", "pages": [964]},
  {"title": "Gomella's Neonatology: Management, Procedures, On-Call Problems, Diseases, and Drugs, Eighth Edition", "author": "Tricia Lacy Gomella, Fabien G. Eyal and Fayez Bany-Mohammed", "pages": [580]}
]

short = [{"title": "In short", "content": """- Two distinct entities are both associated with breastfeeding: breastfeeding jaundice (also called suboptimal intake, dehydration, or nonbreastfeeding jaundice) and breast milk jaundice (also called breast milk jaundice syndrome) — they differ in timing, mechanism, and management.
- Breastfeeding jaundice is early-onset, occurring in the first week of life, caused by insufficient milk intake leading to dehydration, caloric deprivation, and exaggerated enterohepatic circulation of bilirubin (intestinal glucuronidase deconjugates bilirubin, which is then reabsorbed) — it is essentially an exaggerated physiologic jaundice, analogous to starvation jaundice in adults. It typically peaks day 3–5 of life and is associated with excessive weight loss and decreased stool frequency.
- Breast milk jaundice is late-onset, becoming evident after the first week (often after day 5–7), peaking in the second to third week with unconjugated bilirubin as high as 10–30 mg/dL, and can persist for 3–10 weeks (up to 12 weeks) at lower levels even with continued breastfeeding. It affects an estimated 1–4% of exclusively breastfed term infants (sources vary: ~1%, ~2%, or 2–4%). Proposed mechanisms include breast-milk inhibitors of glucuronyl transferase, intestinal beta-glucuronidase activity, and other factors (e.g., pregnanediol, free fatty acids) that increase enterohepatic bilirubin recirculation; a genetic predisposition is also supported by current literature.
- Breast milk jaundice occurs in an otherwise healthy, well-fed, appropriately weight-gaining, normally developing infant — this clinical context (normal growth/hydration) is what distinguishes it from breastfeeding jaundice.
- In breastfeeding jaundice, severe hyperbilirubinemia (total bilirubin ≥25 mg/dL in severe cases) is the most common reason for hospital readmission of near-term/term infants, and nearly all infants readmitted for severe jaundice in large studies were breastfed; poor breastfeeding management is a major contributing factor, and kernicterus has occurred, predominantly in near-term breastfed infants.
- Management of breastfeeding jaundice: increase nursing frequency, augment with breast pumping, and supplement with expressed maternal milk, donor milk, or formula if intake appears inadequate, weight loss is excessive, or the infant is dehydrated — while trying not to further suppress milk production.
- All infants with presumed breast milk jaundice should have total and conjugated (direct) bilirubin measured after the third week of life to exclude other causes; a direct/conjugated bilirubin greater than 1.5 mg/dL or over 20% of total bilirubin warrants evaluation for liver disease/cholestasis. Jaundice persisting beyond 2 weeks with acholic stools and dark urine suggests biliary atresia and needs immediate evaluation.
- Do not use direct sunlight exposure to treat neonatal hyperbilirubinemia — it is not effective for this purpose. Any newborn discharged before 72 hours of life should be reassessed within 48 hours for adequacy of breastfeeding and jaundice progression."""}]

long = [
 {"title": "Definition", "content": """Jaundice associated with breastfeeding falls into two distinct entities that are frequently conflated but require different management. Breastfeeding jaundice — also called suboptimal intake jaundice, dehydration jaundice, nonbreastfeeding jaundice, or breast-nonfeeding jaundice — is early-onset, appearing within the first week of life, and reflects insufficient fluid and caloric intake rather than any property of breast milk itself. Breast milk jaundice (breast milk jaundice syndrome) is late-onset, becoming evident after the first week of life, and reflects a property of the milk or the infant's handling of bilirubin in the setting of otherwise adequate feeding and growth."""},
 {"title": "Epidemiology", "content": """Severe jaundice is the most common reason for hospital readmission of near-term and term infants after delivery, and in large studies nearly all infants readmitted for severe jaundice were breastfed, reflecting how often suboptimal breastfeeding management contributes. In one general description, jaundice in breastfed infants typically appears between 24 and 72 hours of age, peaks by 5–15 days, and resolves by the third week, though roughly one-third of breastfed infants still show mild clinical jaundice in the third week, occasionally persisting into the second or third month. Breast milk jaundice specifically is estimated to affect approximately 1–4% of exclusively breastfed term infants across different sources (individual estimates include about 1%, about 2%, and 2–4%), with jaundice exceeding 10 mg/dL persisting beyond the third to fourth week in this subgroup."""},
 {"title": "Etiology", "content": """Breastfeeding jaundice results from inadequate milk intake, most often from insufficient maternal milk production and/or poor infant milk transfer (sometimes compounded by a poor latch), leading to dehydration and caloric deprivation. Intestinal milk stasis allows bacterial and intestinal glucuronidase enzymes to deconjugate bilirubin, which is then more readily reabsorbed — an exaggerated enterohepatic circulation directly analogous to starvation jaundice in adults. Other coexisting factors, such as ABO incompatibility or urinary tract infection, can worsen the severity of jaundice in this setting. Breast milk jaundice, by contrast, is not fully understood but has been attributed to inhibitors of glucuronyl transferase present in breast milk, intestinal beta-glucuronidase activity that promotes deconjugation and reabsorption of bilirubin, other milk factors such as pregnanediol and free fatty acids that may interfere with bilirubin conjugation, and immature neonatal gut microflora that further promotes enterohepatic recirculation; current literature also supports a genetic predisposition to breast milk jaundice."""},
 {"title": "Clinical features", "content": """Breastfeeding jaundice presents in the first week of life with rising total serum unconjugated bilirubin alongside evidence of poor intake: decreased stool frequency, excessive weight loss, dehydration, and failure to gain weight, typically peaking around day 3–5 of life; total bilirubin in severe cases can reach 25 mg/dL or higher. Breast milk jaundice, in contrast, appears in an infant who is otherwise healthy, feeding well, gaining weight appropriately, and developing normally; unconjugated bilirubin can reach 10–30 mg/dL, peaking in the second to third week, and if breastfeeding continues, bilirubin gradually declines but can remain detectable for 3–10 weeks (occasionally up to 12 weeks). Although rare, kernicterus can occur with either condition — breastfeeding jaundice is disproportionately represented among near-term breastfed infants who develop severe hyperbilirubinemia or kernicterus, and kernicterus has also, uncommonly, been reported with breast milk jaundice."""},
 {"title": "Diagnostics", "content": """Because both entities can coexist with or mimic other, more serious causes of neonatal jaundice, evaluation should include serial total serum bilirubin (TSB) and conjugated (direct) bilirubin measurements. All infants with a presumptive diagnosis of breast milk jaundice should have total and conjugated bilirubin checked after the third week of life; a conjugated bilirubin above 1.5 mg/dL, or exceeding 20% of the total, should prompt evaluation for liver disease or cholestasis rather than being attributed to breast milk jaundice. Jaundice that persists beyond 2 weeks, especially if accompanied by acholic stools and dark urine, is suggestive of biliary atresia and requires immediate diagnostic workup including direct bilirubin. Other causes — hemolytic disease, infection, and metabolic disorders — should also be actively considered rather than assuming breastfeeding-related jaundice by default, particularly if the clinical picture does not fit cleanly (e.g., jaundice in the first 24 hours of life, or bilirubin rising faster than expected)."""}
]

clinical = [
 {"title": "Management", "content": """For breastfeeding (suboptimal intake) jaundice, the priority is fixing the feeding problem rather than simply treating the bilirubin number in isolation: increase nursing frequency, address any latch problem (severe nipple pain/cracking usually indicates improper latch, and temporary pumping may be needed), and augment infant sucking with regular maternal breast pumping to build supply. If intake still seems inadequate, weight loss is excessive, or the infant appears dehydrated, supplement with expressed maternal milk (preferred), donor milk, or formula — but take care not to further suppress milk production in doing so. Breastfed infants should be evaluated for phototherapy or exchange transfusion using the same AAP bilirubin-level criteria applied to formula-fed infants; breastfeeding can generally continue during treatment. Do not rely on direct sunlight exposure to reduce hyperbilirubinemia — it is not an effective or recommended treatment. Any newborn discharged before 72 hours of age should be reassessed within 48 hours specifically to check adequacy of breastfeeding and jaundice progression, since this is exactly the population at risk for breastfeeding jaundice readmission.

For suspected breast milk jaundice, since the affected infant is thriving, well-hydrated, and gaining weight normally, reassurance is usually appropriate once other causes have been excluded — but confirm this by checking total and conjugated bilirubin after the third week of life, and pursue evaluation for liver disease if the conjugated fraction exceeds 1.5 mg/dL or 20% of the total. Routine cessation of breastfeeding is not required for the diagnosis itself; if bilirubin is persistently very high, phototherapy may help, and if a brief diagnostic or therapeutic interruption of breastfeeding is used, encourage the mother to express and store milk during that time so breastfeeding can resume once the bilirubin level improves. Counsel families proactively that jaundice appearing within the first 24 hours of life, or bilirubin approaching the phototherapy range, or any high-pitched cry, fever, or convulsion, requires prompt medical evaluation rather than watchful waiting at home."""}
]

article = {
 "topic": "Breastfeeding Jaundice",
 "slug": "breastfeeding-jaundice",
 "category_id": 15636,
 "summary": "Distinguishing early-onset breastfeeding (suboptimal intake) jaundice from late-onset breast milk jaundice syndrome, their mechanisms, and how management differs between them.",
 "written_by": "claude-sonnet",
 "references": references,
 "short": short,
 "long": long,
 "clinical": clinical
}
with open("/tmp/claude-0/-home-danvics-docker-quiz/c1e0577a-e42c-4a3d-b1ea-3edd61103a4e/scratchpad/articles/bfjaundice.article.json", "w") as f:
    json.dump(article, f, indent=1)
print("done")
