import json

references = [
  {"title": "Kliegman R. Nelson Textbook of Pediatrics 2-Volume Set 22ed 2024", "author": None, "pages": [274,3454]},
  {"title": "Zitelli and Davis' Atlas of Pediatric Physical Diagnosis: Expert Consult - Online", "author": None, "pages": [404]},
  {"title": "Cover", "author": "Vitalsource Download", "pages": [8015,8297]},
  {"title": "Caring for the Hospitalized Child", "author": "Section on Hospital Medicine, American Academy of Pediatrics;Jeffrey C. Gershel;Daniel A. Rauch;", "pages": [234]},
  {"title": "The Harriet Lane Handbook (The Johns Hopkins Hospital)", "author": None, "pages": [327]},
  {"title": "The Harriet Lane Handbook 22nd Edition (2020) (The Johns Hopkins Hospital)", "author": None, "pages": [327]},
  {"title": "Update in Pediatrics", "author": None, "pages": [353]},
  {"title": "Netters Pediatrics (Florin Т., Ludwig St.)", "author": None, "pages": [449]}
]

short = [{"title": "In short", "content": """- Hyperthyroidism = excess thyroid hormone synthesized and secreted by the thyroid gland itself; thyrotoxicosis is the broader term for excess circulating thyroid hormone from any source — the mechanism matters because treatment differs.
- Graves disease (autoimmune, TSH-receptor-stimulating antibody/TSI) causes about 95% of pediatric hyperthyroidism and mainly affects female adolescents.
- Other causes: hashitoxicosis (transient hyperthyroid phase of Hashimoto thyroiditis from release of preformed hormone), autonomously functioning ("hot") nodules, toxic multinodular goiter, activating TSH-receptor mutations, subacute/suppurative thyroiditis, and exogenous thyroid hormone.
- Labs: suppressed TSH with elevated free T4 and/or T3; in Graves disease, TSH-receptor antibodies (TRAb) or thyroid-stimulating immunoglobulin (TSI) are positive, and antiperoxidase antibodies may be present.
- Subclinical hyperthyroidism = normal free T4/T3 with suppressed TSH; overt hyperthyroidism = elevated free T4 and/or T3 with suppressed TSH.
- Classic features: tachycardia, palpitations, widened pulse pressure, tremor, heat intolerance, weight loss (though paradoxical weight gain can occur from increased appetite), increased linear growth, warm moist skin, and emotional lability/poor school performance.
- First-line pediatric treatment for Graves disease is methimazole; radioactive iodine (131I) or surgical thyroidectomy are options for initial or refractory treatment. Propranolol is used for symptomatic control during the hyperthyroid phase of Hashimoto thyroiditis.
- Graves disease clusters with other autoimmune conditions: type 1 diabetes, celiac disease, autoimmune adrenal insufficiency, vitiligo, psoriasis, pernicious anemia, alopecia areata, myasthenia gravis, rheumatoid arthritis, trisomy 21, and Turner syndrome.
- Hyperthyroidism occurs in about 0.5% of patients with type 1 diabetes and can worsen glucose control."""}]

long = [
 {"title": "Definition", "content": """Hyperthyroidism refers specifically to excess synthesis and secretion of thyroid hormone by the thyroid gland itself, whereas thyrotoxicosis is the broader term for any state of excess circulating thyroid hormone and its clinical effects, regardless of source. The distinction matters clinically because different mechanisms call for different therapies. Biochemically, subclinical hyperthyroidism is defined as normal free T4 and T3 with a suppressed TSH, while overt hyperthyroidism is an elevated free T4, T3, or both with a suppressed TSH; both are laboratory definitions because symptoms alone are nonspecific."""},
 {"title": "Etiology", "content": """Hyperthyroidism is rare in children, but the most common cause by far (about 95%) is Graves disease, autoimmune hyperthyroidism driven by a stimulating antibody against the TSH receptor (TRAb/TSI) that increases endogenous thyroid hormone production; it primarily affects female adolescents and has a strong genetic predisposition with clustering of other autoimmune disease in the patient or family (type 1 diabetes, celiac disease, autoimmune adrenal insufficiency, vitiligo, psoriasis, pernicious anemia, alopecia areata, myasthenia gravis, rheumatoid arthritis, trisomy 21, Turner syndrome). Other causes include hashitoxicosis — a transient hyperthyroid phase of Hashimoto thyroiditis from release of preformed hormone as the gland is disrupted by lymphocytic infiltration — pituitary or thyroid adenomas, autonomously functioning ("hot") nodules (rarely harboring thyroid cancer), toxic multinodular goiter, activating TSH-receptor mutations, selective pituitary T3 resistance, suppurative or subacute viral thyroiditis, exogenous thyroid hormone intake, and drug-induced thyrotoxicosis (amiodarone, iodine). Hyperthyroidism also occurs in about 0.5% of patients with type 1 diabetes, where it worsens glucose metabolism and metabolic control."""},
 {"title": "Clinical features", "content": """Children tolerate thyrotoxic symptoms somewhat better than adults but show the same core findings: tachycardia, palpitations, occasionally syncope, widened pulse pressure, tremor, heat intolerance, diaphoresis, increased bowel frequency, warm moist skin, fine friable hair, and Plummer nails (distal nail bed separation). Weight loss is typical, but a paradoxical weight gain can occur when increased appetite outpaces the higher metabolic rate. Children often show increased linear growth. Behavioral and cognitive effects are prominent: hyperactivity alternating with fatigue, poor sleep, emotional lability, short attention span, restlessness, and a marked drop in school performance. Graves disease adds a diffuse goiter, eye symptoms (exophthalmos, usually milder in children than adults and more likely to resolve with treatment), localized dermopathy, and lymphoid hyperplasia (thymic, splenic enlargement)."""},
 {"title": "Diagnostics", "content": """Laboratory evaluation shows suppressed TSH with elevated free T4, free T3, or both. In Graves disease, TSH-receptor antibodies (TRAb) or thyroid-stimulating immunoglobulin (TSI) are elevated, and antiperoxidase antibodies may also be present. A thyroid scan is not usually needed for Graves disease but, if performed, shows rapid, diffuse radioiodine uptake; increased technetium-99m pertechnetate uptake is also seen. In hashitoxicosis, TSH is often low but detectable with a less pronounced T4 rise, and technetium uptake is decreased rather than increased, with significant elevation of thyroglobulin and/or thyroid antibodies — a pattern that helps distinguish it from Graves disease on the same table of findings."""},
 {"title": "Differential diagnosis", "content": """The two dominant differentials to distinguish are Graves disease (elevated uptake, positive TRAb/TSI, undetectable TSH) versus the hyperthyroid phase of Hashimoto thyroiditis/hashitoxicosis (decreased uptake, detectable but low TSH, usually self-limited course toward eventual hypothyroidism). Less common causes to consider include autonomously functioning thyroid nodules, toxic multinodular goiter, subacute or suppurative thyroiditis, drug-induced thyrotoxicosis (amiodarone, iodine), exogenous thyroid hormone ingestion, and, rarely, McCune-Albright syndrome or hyperfunctioning thyroid carcinoma."""}
]

clinical = [
 {"title": "Management", "content": """First-line treatment for pediatric Graves disease is methimazole. Radioactive iodine (131I) or surgical thyroidectomy are reasonable options for initial treatment or for refractory disease. Once treatment is started, follow the patient's symptoms along with T4 and TSH levels over time. For the hyperthyroid phase of Hashimoto thyroiditis (hashitoxicosis), the hyperthyroid phase is usually self-limited, so definitive antithyroid therapy is generally not needed; propranolol can be used for symptomatic relief (e.g., palpitations, tremor) during this phase, and these patients may eventually need thyroid hormone replacement once the gland burns out into hypothyroidism. Across etiologies, ophthalmopathy in children is less dramatic than in adults and more likely to improve with treatment. Because hyperthyroidism is rare but potentially fatal if unrecognized, prompt diagnosis and treatment initiation are important once suppressed TSH with elevated free T4/T3 is confirmed."""}
]

article = {
 "topic": "Hyperthyroidism",
 "slug": "hyperthyroidism",
 "category_id": 15140,
 "summary": "Causes, clinical features, and treatment of pediatric hyperthyroidism, dominated by Graves disease, with the lab pattern that distinguishes it from hashitoxicosis.",
 "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/hyperthyroidism.article.json", "w") as f:
    json.dump(article, f, indent=1)
print("done")
