import json

data = {
 "topic": "Hepatitis B",
 "slug": "hepatitis-b",
 "category_id": 15090,
 "summary": "Hepatitis B virus is a bloodborne/sexually transmitted hepadnavirus whose chronicity risk after infection is inversely related to age at exposure, making perinatal prevention with vaccine plus HBIG central to pediatric care.",
 "written_by": "claude-sonnet",
 "references": [
  {"title": "Practical Algorithms in Pediatric Gastroenterology (Ron Shaoul)", "author": "meiersa", "pages": [84]},
  {"title": "Pediatric ICD-10-CM 2023", "author": "American Academy of Pediatrics Committee on Coding and Nomenclature;", "pages": [555]},
  {"title": "Update in Pediatrics", "author": None, "pages": [630]},
  {"title": "2021_Fleisher_&_Ludwig's_Textbook_of_Pediatric_Emergency_Medicine.epub", "author": None, "pages": []},
  {"title": "Red Book 2018", "author": "Kimberlin, David W.; Long, Sarah S.; Brady, Michael T.", "pages": [168]},
  {"title": "Red_Book_2021_2024_Report_of_the_Comm_z_library_sk,_1lib_sk,", "author": None, "pages": [160, 434, 446]},
  {"title": "Ghai Essential Pediatrics, 9e (Vinod K Paul, Arvind Bagga)", "author": "CamScanner", "pages": [226]},
  {"title": "Pediatric Clinical Practice Guidelines & Policies, 18th Edition", "author": "American Academy of Pediatrics", "pages": [863]}
 ],
 "short": [
  {"title": "In short", "content": (
   "- Hepatitis B virus (HBV) is a double-stranded DNA hepadnavirus; only serum, semen, vaginal secretions, and saliva are proven contagious - there is no fecal-oral spread\n"
   "- Chronicity risk is inversely related to age at infection: about 90% of infants infected at birth become chronically infected, versus 25-50% of children infected at age 1-5 years, and only about 5% of older children/adults\n"
   "- Chronic infection is defined as HBsAg positivity persisting for at least 6 months\n"
   "- Vertical/perinatal transmission accounts for the majority of pediatric cases; household contact with an HBsAg-positive person accounts for roughly 25-50% of cases in some series\n"
   "- Infants born to HBsAg-positive mothers should get the first vaccine dose within 12 hours of birth plus HBIG at a different injection site - this combination prevents transmission in about 95% of at-risk infants\n"
   "- Standard infant HBIG dose is 0.5 mL IM; for postexposure prophylaxis in an unimmunized person after percutaneous/permucosal exposure, HBIG dosing is 0.06 mL/kg (max 5 mL) IM\n"
   "- Breastfeeding by an HBsAg-positive mother does not meaningfully increase infant infection risk once vaccine/HBIG are given, and breastfeeding need not be delayed until after immunization\n"
   "- Postimmunization anti-HBs testing is not routine after normal vaccination, but is recommended 1-2 months after the final dose for hemodialysis patients, HIV-infected or other immunocompromised people, occupationally exposed workers, sexual partners of HBsAg-positive people, and infants born to HBsAg-positive (or HBsAg-unknown) mothers\n"
   "- HBV infection is strongly associated with polyarteritis nodosa (PAN); HBsAg is found in 20-30% of PAN patients, suggesting an autoimmune mechanism triggered by the virus"
  )}
 ],
 "long": [
  {"title": "Definition", "content": (
   "Hepatitis B is a liver infection caused by hepatitis B virus (HBV), a double-stranded DNA virus of the Hepadnaviridae family. Acute infection can be asymptomatic or produce a spectrum from mild hepatitis to fulminant liver failure; a proportion of infected individuals fail to clear the virus and progress to chronic infection, defined as detectable hepatitis B surface antigen (HBsAg) persisting for at least 6 months."
  )},
  {"title": "Epidemiology", "content": (
   "The likelihood of developing chronic infection after exposure is strongly age-dependent and inversely proportional to age at infection: chronic hepatitis B develops in about 90% of infants infected at birth, in 25-50% of children infected between 1 and 5 years of age, and in only about 5% of older children and adults who acquire the infection. This age-dependence is the epidemiologic rationale for prioritizing perinatal and early-childhood prevention. Universal infant vaccination programs have substantially reduced pediatric incidence in many countries."
  )},
  {"title": "Etiology", "content": (
   "HBV is transmitted through contact with infected blood or blood products, and through close interpersonal or sexual contact. Although HBsAg can be detected in many body secretions - blood and blood products, feces, urine, tears, saliva, semen, human milk, vaginal secretions, cerebrospinal fluid, and synovial fluid - only serum, semen, vaginal secretions, and saliva have been proven to actually transmit infection. There is no fecal-oral transmission. In the pediatric population, vertical/perinatal transmission from an HBsAg-positive mother accounts for the majority of infections, while transmission from HBsAg-positive household contacts (roughly 25-50% risk in exposed contacts) and, less commonly, blood products are other recognized routes."
  )},
  {"title": "Clinical features", "content": (
   "Presentation in pediatric patients may include diffuse abdominal pain; nonspecific symptoms such as fever, malaise, anorexia, nausea, and vomiting; jaundice (which is not present in all cases, particularly in infants and young children); dark urine and light-colored stools; pain or tenderness over the liver; and hepatomegaly. HBV infection is also associated with extrahepatic autoimmune phenomena, notably polyarteritis nodosa (PAN), a necrotizing vasculitis of medium-sized arteries - HBsAg is detectable in 20-30% of PAN patients, suggesting the infection can precipitate an autoimmune vasculitic reaction."
  )},
  {"title": "Diagnostics", "content": (
   "Serologic panels distinguish acute from chronic infection and immunity. IgM anti-HBc (core antibody) indicates acute infection, while a pattern of high ALT with IgG anti-HBc suggests chronic hepatitis B. After resolution of an acute episode, patients should be rechecked several months later for loss of HBsAg and HBV DNA to confirm the infection has not become chronic. Routine postimmunization anti-HBs testing is not necessary after standard vaccination of healthy people, but is recommended 1-2 months after the final vaccine dose in specific higher-risk groups: hemodialysis patients, people with HIV infection, other immunocompromised patients (e.g., hematopoietic stem-cell transplant recipients or those on chemotherapy), people at occupational risk of percutaneous or mucosal exposure, sexual partners of HBsAg-positive individuals, and infants born to HBsAg-positive mothers or mothers of unknown HBsAg status (tested for both HBsAg and anti-HBs)."
  )},
  {"title": "Treatment", "content": (
   "Antiviral therapy for chronic pediatric hepatitis B is age-restricted for several agents, with entecavir and telbivudine approved above age 16 and tenofovir more recently available above age 12. For postexposure prophylaxis after a percutaneous or permucosal exposure in an unimmunized person: if the source is HBsAg-positive, give HBIG (0.06 mL/kg, maximum 5 mL, IM) and begin the hepatitis B vaccine series; if the source is HBsAg-negative, begin the vaccine series alone; if the source is untested or unknown, begin the vaccine series. If the exposed person was previously immunized and responded adequately, no treatment is necessary. If immunized but with an inadequate response (anti-HBs less than 10 mIU/mL) and the source is HBsAg-positive, give HBIG immediately, either repeating HBIG in 1 month or initiating reimmunization."
  )},
  {"title": "Prevention", "content": (
   "Perinatal prevention is the highest-yield intervention given the high chronicity risk in infected neonates. Infants born to known HBsAg-positive mothers should receive the first dose of hepatitis B vaccine within 12 hours of delivery, together with hepatitis B immunoglobulin (HBIG) given concurrently but at a different injection site (infant HBIG dose 0.5 mL IM); the second and third vaccine doses should be completed by 6 months of age. This combined approach prevents transmission in approximately 95% of at-risk infants. Breastfeeding by an HBsAg-positive mother does not need to be delayed until the infant is immunized, and does not meaningfully increase transmission risk once the vaccine/HBIG regimen has been given."
  )}
 ],
 "clinical": [
  {"title": "Perinatal and postexposure management at the bedside", "content": (
   "For every newborn of an HBsAg-positive (or HBsAg-status-unknown) mother: give hepatitis B vaccine within 12 hours of birth AND HBIG 0.5 mL IM at a different anatomic site, then complete the vaccine series with doses 2 and 3 by 6 months of age. Do not delay breastfeeding initiation to wait for immunization. Test the infant for HBsAg and anti-HBs after completion of the series to confirm protection and rule out infection.\n\nFor a needlestick or other percutaneous/permucosal exposure: first establish the exposed person's vaccination/response status and the source's HBsAg status. Unimmunized exposed person with an HBsAg-positive source: give HBIG 0.06 mL/kg (max 5 mL) IM and start the vaccine series. Unimmunized with an HBsAg-negative or untested/unknown source: start the vaccine series alone. Previously immunized and known to have responded: no treatment needed. Previously immunized but a documented inadequate responder (anti-HBs <10 mIU/mL) with an HBsAg-positive source: give HBIG immediately, and either repeat HBIG in 1 month or begin reimmunization. After any acute infection, recheck HBsAg and HBV DNA several months later to confirm resolution rather than progression to chronic infection."
  )}
 ]
}

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