import json

references = [
  {"title": "Pediatric Clinical Practice Guidelines & Policies, 18th Edition", "author": "American Academy of Pediatrics", "pages": [188,197]},
  {"title": "Pediatric Clinical Practice Guidelines and Policies", "author": "American Academy of Pediatrics (AAP);", "pages": [238,247]},
  {"title": "Kliegman R. Nelson Textbook of Pediatrics 2-Volume Set 22ed 2024", "author": None, "pages": [3633]},
  {"title": "Cover", "author": "Vitalsource Download", "pages": [8485,8486]},
  {"title": "Ghai Essential Pediatrics, 9e (Vinod K Paul, Arvind Bagga)", "author": "CamScanner", "pages": [561]},
  {"title": "CURRENT Diagnosis and Treatment Pediatrics, Twenty-Fourth Edition", "author": "Hay, William W., Levin, Myron J., Deterding, Robin R., Abzug, Mark J.", "pages": [805]},
  {"title": "2021_Fleisher_&_Ludwig's_Textbook_of_Pediatric_Emergency_Medicine.epub", "author": None, "pages": []},
  {"title": "Pediatric Board Study Guide", "author": None, "pages": [538]}
]

short = [{"title": "In short", "content": """- Febrile seizure = seizure with fever ≥38°C (100.4°F) in a child roughly 6–60 months old (ranges cited 1 month–6 or 7 years; peak 12–18 months), without CNS infection, metabolic disturbance, or prior afebrile seizure history. About 90% of affected children have their first event before age 3; consider alternate diagnoses if onset is after age 5.
- Overall incidence 2–5% of children — the most common convulsive disorder in young children.
- Simple febrile seizure: generalized (no focal features), lasts under 15 minutes, occurs only once in 24 hours (two seizures within 30 minutes count as one episode) — accounts for about 85% (or per other sources, 70–85%) of febrile seizures.
- Complex febrile seizure: focal features, and/or duration ≥15 minutes, and/or recurrence within 24 hours — accounts for the remaining roughly 15–30%. Meeting just one complex criterion is enough to classify it as complex.
- Febrile status epilepticus is specifically a febrile seizure lasting longer than 30 minutes.
- Todd paralysis (transient postictal hemiparesis on the affected side) occurs rarely, in 0.4–2% of cases.
- More than 90% of febrile seizures are generalized, last under 5 minutes, and occur early in the illness — often before the fever itself has even been noticed.
- Most common association is acute respiratory illness; less commonly gastroenteritis (especially Shigella or Campylobacter) and UTI; roseola infantum (HHV-6/HHV-7) is a classic cause, and HHV-6/HHV-7 together account for about a third of febrile status epilepticus cases; one study found a viral cause in 86% of cases.
- Recurrence risk factors: age under 18 months at first seizure, family history of febrile seizures, multiple seizures in the same illness, and first seizure occurring at a relatively low fever (<40°C/104°F). Family history of febrile seizures is present in 25–40% of cases.
- Risk of later epilepsy after any febrile seizure is about 1–3% (some sources: 3–12% by adolescence), roughly 2–5 times the risk in children without febrile seizures; risk after a simple febrile seizure specifically is about 1.5–2.4%, rising with pre-existing neurodevelopmental abnormality, complex febrile seizure type, or family history of epilepsy. Simple febrile seizures themselves show no evidence of increased mortality, hemiplegia, or intellectual disability.
- Lumbar puncture should be strongly considered in any child under 12 months with a febrile seizure, since signs/symptoms of bacterial meningitis can be minimal or absent at that age; it should be performed at any age if meningitis/encephalitis is clinically suspected (altered mental status, meningeal signs, focal findings). Ask about vaccination history as part of the evaluation."""}]

long = [
 {"title": "Definition", "content": """A febrile seizure is a seizure accompanied by fever (temperature ≥100.4°F/38°C by any method) occurring in a child roughly 6 to 60 months of age (sources vary somewhat, citing ranges from 1 month to 6 or 7 years, with peak incidence around 12–18 months), without evidence of intracranial infection, metabolic disturbance, or a prior history of afebrile seizures. About 90% of children with febrile seizures experience their first event before age 3; onset after age 5 should prompt consideration of alternate diagnoses. The seizure often occurs very early in the course of the febrile illness — sometimes before the fever has even been noticed by caregivers. Febrile seizures are classified into two categories. Simple febrile seizures are generalized (no focal features), last less than 15 minutes, and occur only once in a 24-hour period (two seizures within 30 minutes of each other are considered a single episode) — these account for roughly 85% of febrile seizures. Complex febrile seizures meet at least one of: focal features, duration of 15 minutes or longer, or recurrence within 24 hours — accounting for the remaining 15–30%. Febrile status epilepticus is a specific subtype: a febrile seizure lasting longer than 30 minutes."""},
 {"title": "Epidemiology", "content": """Febrile seizures are the most common convulsive disorder of childhood, affecting 2–5% of children in the susceptible age range. Simple febrile seizures make up the large majority (about 85% in most series). Among children who go on to have complex febrile seizures, most present with a complex seizure as their very first event, rather than progressing from simple to complex over time; children with recurrent febrile seizures can experience either simple or complex episodes on subsequent occasions. A family history of febrile seizures in an immediate relative is present in 25–40% of affected children."""},
 {"title": "Etiology", "content": """Febrile seizures are most commonly associated with acute respiratory illness. Gastroenteritis — particularly when caused by Shigella or Campylobacter — and urinary tract infections are less common associated causes. Roseola infantum is a classic, though comparatively rare, cause; broader viral causes have been implicated in as many as 86% of cases in one study, and human herpesvirus 6 and 7 are common causes specifically of febrile status epilepticus, together accounting for roughly a third of such cases."""},
 {"title": "Clinical features", "content": """Febrile seizures can take any seizure form but are most commonly generalized tonic-clonic events; more than 90% are generalized, last under 5 minutes, and occur early in the illness. Most children have a brief postictal period and return to their baseline behavior and consciousness within minutes. Todd paralysis — transient hemiparesis on the side involved in the seizure, occurring after the event — is uncommon, seen in roughly 0.4–2% of cases. Recurrence of febrile seizures is more likely in children with age under 18 months at the first event, a family history of febrile seizures, multiple seizures during the same febrile illness, or a first seizure triggered at a comparatively low temperature (below 40°C/104°F)."""},
 {"title": "Diagnostics", "content": """Evaluation is guided by clinical presentation rather than routine testing in every case. Ask about vaccination history as part of the workup. Consider meningitis or encephalitis in any child who appears very ill, or who has mental status changes, meningeal signs, or focal neurologic findings, and perform a lumbar puncture at any age if these features are present. Strongly consider lumbar puncture in children younger than 12 months even without overt meningeal signs, because the clinical signs and symptoms of bacterial meningitis can be minimal or absent at this young age. Simple febrile seizures in an otherwise well-appearing, neurologically normal child generally do not require neuroimaging or EEG as part of routine evaluation."""},
 {"title": "Prognosis", "content": """Children with simple febrile seizures show no evidence of increased mortality, hemiplegia, or intellectual disability compared with the general population. The overall risk of developing epilepsy after any febrile seizure is estimated at roughly 1–3% (with some sources citing up to 3–12% by adolescence), representing a two- to fivefold increase relative to children who never have a febrile seizure. The risk specifically after a simple febrile seizure is lower, around 1.5–2.4%, and rises meaningfully in children with a pre-existing neurodevelopmental abnormality, a complex (rather than simple) febrile seizure, or a family history of epilepsy. Febrile seizures very rarely (about 1–3%) evolve into recurrent unprovoked seizures later in childhood or adulthood."""}
]

clinical = [
 {"title": "Evaluation and counseling at the bedside", "content": """When a child presents after a witnessed febrile seizure, first classify it as simple or complex using the specific criteria — generalized, under 15 minutes, single episode in 24 hours defines simple; any focal feature, duration of 15 minutes or more, or recurrence within 24 hours makes it complex — since this classification anchors both the workup and the prognosis discussion with families. Perform a lumbar puncture at any age if there are clinical signs of meningitis or encephalitis (altered mental status, meningeal signs, focal findings), and have a low threshold to perform one in any child under 12 months even without these signs, since bacterial meningitis can present subtly at that age. Ask about vaccination status as part of your risk assessment. For a well-appearing, neurologically normal child with a simple febrile seizure and a clear source of fever, further workup (neuroimaging, EEG, lumbar puncture) is generally not needed.

Counsel families clearly and proactively: reassure them that simple febrile seizures are common (2–5% of children), are not associated with increased mortality, hemiplegia, or intellectual disability, and that the risk of later epilepsy after a simple febrile seizure is low (roughly 1.5–2.4%). Identify children at higher recurrence risk (age under 18 months, family history, multiple seizures in the same illness, or a first seizure at a relatively low temperature) so families know what to expect and are not alarmed by a recurrence. Address antipyretic use and anticonvulsant therapy questions using the framework that neither continuous nor intermittent anticonvulsant therapy is routinely recommended for children with simple febrile seizures, since the treatment decision should weigh the substantial side-effect burden of anticonvulsants against the benign natural history of the condition — this is a shared decision with the family rather than a fixed protocol. If a seizure is prolonged (approaching or exceeding 30 minutes, meeting criteria for febrile status epilepticus), manage it as status epilepticus while continuing to investigate the underlying febrile illness, and consider HHV-6/HHV-7 among the possible viral triggers in this specific scenario."""}
]

article = {
 "topic": "Febrile Seizure",
 "slug": "febrile-seizure",
 "category_id": 14981,
 "summary": "Simple versus complex febrile seizure criteria, recurrence and epilepsy risk factors, and when a lumbar puncture is warranted in the young febrile child with a seizure.",
 "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/febrileseiz.article.json", "w") as f:
    json.dump(article, f, indent=1)
print("done")
