import json, pathlib

sources = json.loads(pathlib.Path("/tmp/claude-0/-home-danvics-docker-quiz/c1e0577a-e42c-4a3d-b1ea-3edd61103a4e/scratchpad/articles/facial-nerve-palsy.sources.json").read_text())

article = {
    "topic": "Facial Nerve Palsy",
    "slug": "facial-nerve-palsy",
    "category_id": 15863,
    "summary": "Weakness of cranial nerve VII in children, from birth-trauma and congenital causes to Bell palsy and Lyme disease, with the key exam findings that separate a peripheral palsy from its mimics.",
    "written_by": "claude-sonnet",
    "references": sources["references"],
    "short": [{
        "title": "In short",
        "content": """- Facial palsies are among the most common mononeuropathies in children, classified as congenital (1.8-7.5 per 1000 births) or acquired (about 90% of pediatric facial palsies).
- Congenital facial palsy can result from prenatal or obstetric compression of the nerve, a congenital neuromuscular disorder, congenital myopathy, or a malformation syndrome such as Möbius syndrome (agenesis/hypoplasia of the facial nucleus, usually with CN VI abducens involvement causing impaired eye abduction) or CHARGE syndrome.
- Traumatic neonatal facial palsy is usually from birth injury (forceps, a large baby, primiparity) with compression as the nerve exits the stylomastoid foramen; it is unilateral, shows facial asymmetry with crying, drooping mouth corner, drooling on the affected side, absent nasolabial fold, and incomplete eye closure, and most cases resolve within the first week of life (occasionally taking months).
- Bell palsy (idiopathic peripheral facial palsy) accounts for up to 50% of acquired pediatric facial neuropathies, is most frequent after age 8, and typically develops suddenly about 2 weeks after a presumed viral infection (HSV and varicella-zoster reactivation are the most common linked viruses); an antecedent upper respiratory infection occurs in about a third of children, followed by ear/periauricular pain and rapid facial weakness over hours to days.
- Bell palsy is a diagnosis of exclusion, is not associated with other cranial neuropathies or brainstem dysfunction, and involves the frontalis, orbicularis oculi, nasalis, and orbicularis oris; associated findings can include hyperacusis (stapedius involvement), impaired tearing, and loss of taste on the anterior two-thirds of the tongue if the lesion is proximal to the chorda tympani junction.
- Steroids and acyclovir have not been shown to improve pediatric Bell palsy recovery, so care is largely symptomatic, with corneal protection (lubrication, eye patch) essential; up to 90% of children recover completely, more likely in younger patients, though 7-15% have recurrent symptoms warranting workup for an intracranial or other cause.
- Facial palsy can be the sole presenting sign of Lyme disease, and — unlike Bell palsy, which is always unilateral — Lyme-associated facial palsy can be bilateral; serologic testing for Lyme should be sought in any child with isolated CN VII palsy in an endemic area, with oral antibiotics for 14-21 days if positive, and repeat titers if initial testing is negative but suspicion remains high.
- Ramsay Hunt syndrome (herpes zoster oticus) causes acute facial palsy with painful vesicles in the external auditory canal or auricle.
- Distinguish true facial nerve palsy from congenital absence of the depressor anguli oris muscle (which spares the forehead, eyelid, and nasolabial fold, and can be associated with cardiac anomalies) — in facial palsy, the drooping side is actually the normal side, since the affected side has lost movement including at rest asymmetry with crying."""
    }],
    "long": [
        {"title": "Definition",
         "content": "Facial nerve (cranial nerve VII) palsy is weakness in the distribution of the facial nerve, producing impaired facial movements such as smiling, raising the eyebrows, or inflating the cheeks. It may arise from central (upper motor neuron) or peripheral (lower motor neuron) dysfunction, with peripheral disease far more common in children, particularly when facial weakness is an isolated finding."},
        {"title": "Epidemiology",
         "content": "Facial palsies are among the most common mononeuropathies seen in children. Congenital facial palsy occurs in about 1.8-7.5 per 1000 births. Acquired facial neuropathies are much more common, accounting for about 90% of pediatric facial palsies, and include idiopathic Bell palsy (up to 50% of acquired cases), Ramsay Hunt syndrome, Lyme disease, otogenic facial palsy, and traumatic causes. Bell palsy can occur at any age from infancy through adolescence but is most frequent after age 8."},
        {"title": "Etiology",
         "content": "Facial nerve palsy may be congenital or acquired. Congenital causes include prenatal or obstetric compression of the nerve, a congenital neuromuscular disorder such as congenital muscular dystrophy, a congenital myopathy, or a malformation syndrome such as Möbius syndrome (agenesis or hypoplasia of the facial nerve nucleus and/or nerve, typically with concurrent CN VI abducens abnormality impairing eye abduction) or CHARGE syndrome. Traumatic neonatal facial palsy most often follows birth injury, with risk factors including forceps use, a large infant, and primiparity, or in-utero compression of the fetal head against the maternal sacrum; peripheral nerve compression occurs as the nerve exits the stylomastoid foramen or branches within the mandibular ramus, and can also result from oblique midforceps application or prolonged pressure from other fetal parts or a uterine fibroid. Rare traumatic central facial nerve injury results from destruction of contralateral brain tissue in the posterior fossa or temporal bone and can affect other cranial nerves. Bell palsy (idiopathic peripheral facial palsy) is believed to be a viral-induced cranial neuritis, or possibly postinfectious immune-mediated demyelination, with herpes simplex virus the most likely cause in most cases, followed by varicella-zoster (herpes zoster); other causes include Lyme disease, trauma, and neoplasm. Facial palsy can also be a presenting sign of Lyme disease, infectious mononucleosis, Guillain-Barré syndrome, otitis media (suggesting mastoid involvement), or, when chronic, a brainstem tumor. Bilateral facial weakness in early life can reflect agenesis of the facial nerve nuclei or muscles (as in Möbius syndrome) or a familial pattern; myasthenia gravis, Miller-Fisher syndrome, facioscapulohumeral muscular dystrophy, and myotonic dystrophy should also be considered for bilateral or atypical presentations."},
        {"title": "Clinical features",
         "content": "Bell palsy typically develops suddenly, about 2 weeks after a presumed viral infection, and is not associated with other cranial neuropathies or brainstem dysfunction. An antecedent upper respiratory infection occurs in about a third of children, followed by ear or periauricular pain and then relatively rapid facial weakness over hours to days, involving the frontalis, orbicularis oculi, nasalis, and orbicularis oris muscles. Associated findings can include hyperacusis (from stapedius muscle involvement) and impaired tearing; if the lesion is proximal to the junction with the chorda tympani, taste on the anterior two-thirds of the tongue is impaired (testable with saline or glucose solution on the extended tongue — normal children identify the substance in under 10 seconds). In Ramsay Hunt syndrome (herpes zoster oticus), acute facial palsy is accompanied by painful vesicles in the external auditory canal or auricle. Congenital/traumatic neonatal facial palsy shows facial asymmetry with crying, a drooping mouth corner, drooling on the affected side, an absent nasolabial fold, and incomplete eye closure (ptosis of closure); notably, on careful observation the side of the mouth that visually appears to droop is actually the normal side, since it is the side still able to move and pull downward, while the paralyzed side stays fixed — a point worth remembering to avoid misidentifying the affected side. Lyme-associated facial palsy is often preceded by fever, malaise, headache, myalgias, or arthralgias — symptoms uncommon in idiopathic Bell palsy — and, unlike Bell palsy (always unilateral), can be bilateral; facial palsy can be the sole presenting symptom of Lyme disease."},
        {"title": "Differential diagnosis",
         "content": "True facial nerve palsy must be distinguished from Möbius syndrome (usually bilateral, with associated ocular abduction impairment) and from congenital absence of the depressor anguli oris muscle, which can mimic a drooping mouth corner but spares the forehead, eyelid, and nasolabial fold and may be associated with cardiac anomalies. In an endemic area, isolated cranial nerve VII palsy should prompt serologic testing for Lyme disease even without other systemic findings, since facial palsy can be its only presenting sign; bilateral involvement favors Lyme over Bell palsy."},
        {"title": "Diagnostics",
         "content": "Diagnosis of Bell palsy is usually made from history and physical examination, since it is a diagnosis of exclusion. In children with isolated facial nerve palsy in a Lyme-endemic area, serologic testing for Lyme disease is recommended regardless of other findings; sensitivity of serology increases with time since infection, so repeat titers are warranted if suspicion remains high despite an initially negative test. Lumbar puncture is indicated if there is evidence of meningoencephalitis (severe headache, nuchal rigidity), though its routine use in a child with isolated facial palsy and Lyme risk alone is controversial."},
        {"title": "Treatment",
         "content": "Treatment of Bell palsy in children is largely symptomatic; steroids and acyclovir have not been shown to improve recovery in this population. Protecting the exposed cornea with lubrication and an eye patch is essential given impaired eye closure. For facial palsy due to Lyme disease, oral antibiotics for 14-21 days are indicated, as for other manifestations of early-disseminated Lyme disease. In the rare child with permanent, cosmetically disfiguring facial weakness, plastic surgical intervention at age 6 or older may help, including newer procedures such as attaching facial muscles to the temporal muscle or transplanting cranial nerve XI; surgery is otherwise reserved for cases where the facial nerve has clearly been severed."},
        {"title": "Complications",
         "content": "Prognosis for facial nerve palsy in children is generally excellent. Complete spontaneous recovery occurs in up to 90% of children with Bell palsy, with younger patients having a more favorable prognosis, and recovery in traumatic neonatal palsy usually occurs within the first month, occasionally taking several months. Between 7% and 15% of Bell palsy patients have recurrent symptoms, which should prompt a workup for an underlying intracranial or other cause. If neonatal palsy persists, absence of the nerve should be considered. Referral is recommended if there is no improvement after 2-3 months."},
    ],
    "clinical": [
        {"title": "Examining the child with facial weakness",
         "content": "Establish first whether the weakness is central or peripheral, and whether it is congenital/neonatal or acquired. Peripheral disease is by far the more common pattern in children, especially when facial weakness is an isolated finding. In a neonate, look for facial asymmetry with crying, a drooping mouth corner, drooling on the affected side, an absent nasolabial fold, and incomplete eye closure — most such traumatic palsies resolve within the first week, though occasionally over months. In an older child with sudden-onset unilateral weakness involving the frontalis, orbicularis oculi, nasalis, and orbicularis oris, consider Bell palsy, especially if preceded by an upper respiratory infection and ear or periauricular pain; check for hyperacusis, impaired tearing, and taste on the anterior two-thirds of the tongue as supporting findings. Distinguish true palsy from Möbius syndrome (bilateral, with impaired eye abduction) and from congenital absence of the depressor anguli oris (spares forehead, eyelid, and nasolabial fold, and can accompany cardiac anomalies)."},
        {"title": "When to test for Lyme and how to manage",
         "content": "In a Lyme-endemic area, obtain Lyme serology for any child with isolated facial nerve palsy, even without other systemic symptoms, since facial palsy can be the only presenting sign; bilateral facial weakness favors Lyme over Bell palsy, and fever, malaise, headache, myalgia, or arthralgia preceding the palsy also favor Lyme. If serology is initially negative but suspicion is high, repeat titers later, since sensitivity increases with time from infection. Reserve lumbar puncture for evidence of meningoencephalitis (severe headache, nuchal rigidity) — its routine use for isolated facial palsy with Lyme risk alone is controversial. Treat confirmed Lyme-associated facial palsy with oral antibiotics for 14-21 days. For Bell palsy without an identified cause, provide symptomatic care and corneal protection (lubricating drops, eye patch) rather than steroids or acyclovir, which have not been shown to improve pediatric outcomes; counsel families that up to 90% of children recover fully, but refer for further workup if recurrence occurs or if there is no improvement after 2-3 months."},
    ],
}

for v in ("short", "long", "clinical"):
    for s in article[v]:
        assert s["title"].strip() and s["content"].strip()

out = pathlib.Path("/tmp/claude-0/-home-danvics-docker-quiz/c1e0577a-e42c-4a3d-b1ea-3edd61103a4e/scratchpad/articles/facial-nerve-palsy.article.json")
out.write_text(json.dumps(article, indent=1))
print(out)
