import json

data = {
 "topic": "Tic Disorder",
 "slug": "tic-disorder",
 "category_id": 15487,
 "summary": "Tics are sudden, rapid, nonrhythmic movements or vocalizations preceded by a premonitory urge and briefly suppressible; most childhood tic disorders are transient and require only reassurance, while Tourette syndrome and chronic tic disorder carry a high burden of psychiatric comorbidity.",
 "written_by": "claude-sonnet",
 "references": [
  {"title": "Signs and Symptoms in Pediatrics", "author": "Henry M. Adam,Jane Meschan Foy", "pages": [960, 961, 964]},
  {"title": "Update in Pediatrics", "author": None, "pages": [582, 583]},
  {"title": "MedStudy Pediatrics Core 11th Edition 2024-2025", "author": None, "pages": [222, 223]},
  {"title": "Kliegman R. Nelson Textbook of Pediatrics 2-Volume Set 22ed 2024", "author": None, "pages": [287, 288]},
  {"title": "Illustrated Textbook of Paediatrics (Tom Lissauer, Will Carroll)", "author": "Lissauer, Tom,Carroll, Will", "pages": [446]},
  {"title": "CURRENT Diagnosis and Treatment Pediatrics, Twenty-Fourth Edition", "author": "Hay, William W., Levin, Myron J., Deterding, Robin R., Abzug, Mark J.", "pages": [831]},
  {"title": "Zitelli and Davis' Atlas of Pediatric Physical Diagnosis: Expert Consult - Online", "author": None, "pages": [639]},
  {"title": "Berkowitz's Pediatrics", "author": "Berkowitz, Carol D.;", "pages": [998]}
 ],
 "short": [
  {"title": "In short", "content": (
   "- A tic is a sudden, rapid, recurrent, nonrhythmic motor movement or vocalization, usually preceded by a premonitory sensory urge and only briefly/partially suppressible\n"
   "- Up to 1 in 10 (some sources cite up to 20-25%) of school-age children develop a tic at some point; boys are affected about 4 times more often than girls\n"
   "- Average age of onset is 6-8 years (range 3-11 years); motor tics tend to appear a few years before vocal tics; tic intensity tends to peak around age 11 and improve thereafter\n"
   "- Simple tics affect a single muscle group (eye blinking, nose twitching, sniffing, throat clearing); complex tics involve more than one muscle group with more elaborate movements (squatting, touching, twirling) or, vocally, can include echolalia\n"
   "- Tics are worsened by stress, anxiety, excitement, or exhaustion, are typically suppressed during sleep, and are most likely to occur (or be noticed) during inactivity such as watching TV, often disappearing during focused concentration\n"
   "- Transient tic disorder is defined as tics lasting at least 4 weeks but resolving before 1 year, and affects roughly 3-25% of school-age children depending on the source; chronic tic disorder requires more than 1 year of motor OR vocal (not both) tics; Tourette syndrome requires both motor and vocal tics for more than 1 year\n"
   "- Common comorbidities: ADHD (present in about 50% of Tourette syndrome patients) and OCD (found in up to 50% of Tourette syndrome patients, with symmetry/evening-up/\"just right\" themes); also anxiety, depression, and learning difficulties - ADHD severity is a better predictor of poor functional/academic outcomes than tic severity itself\n"
   "- Stimulant medication for ADHD can unmask (but does not cause) an underlying tic disorder; the PANDAS hypothesis (post-streptococcal autoimmune attack on the basal ganglia) for acute-onset tics/OCD remains unproven and controversial\n"
   "- Neurologic exam is typically normal aside from the tics themselves, and neuroimaging is not helpful/indicated for a typical presentation\n"
   "- Treatment: reassurance and education are first-line for most cases (no medication needed); when tics cause significant morbidity, first-line pharmacotherapy is an alpha-2 agonist (clonidine or guanfacine), alongside behavioral therapy (e.g., cognitive behavioral therapy) and treatment of comorbidities (ADHD, OCD, anxiety, mood disorders)"
  )}
 ],
 "long": [
  {"title": "Definition", "content": (
   "A tic is a sudden, rapid, recurrent, nonrhythmic motor movement or vocalization. Tics are experienced as purposeless, are usually preceded by a premonitory sensory urge, and can be suppressed for varying periods of time, particularly under external demands, during focused activity, or during sleep, though this suppression comes at the cost of an uncomfortable sensation that is relieved once the tic is finally performed. Tics are classified as simple (affecting a single muscle group - eye blinking, nose twitching, jaw or neck movements, sniffing, grunting, throat clearing, coughing) or complex (involving more than one muscle group, with more elaborate, sometimes seemingly purposeful sequences such as squatting, touching, twirling, or, in vocal tics, echolalia). By duration and pattern, tic disorders are further categorized as transient tic disorder (tics for at least 4 weeks, resolving before 1 year), chronic tic disorder (motor OR vocal tics, but not both, persisting more than 1 year), and Tourette syndrome (both motor AND vocal tics, with no other cause, persisting more than 1 year)."
  )},
  {"title": "Epidemiology", "content": (
   "Tics are common in childhood: estimates suggest up to 1 in 10 children develop a tic at some point, with other sources citing rates as high as 20-25% for transient tic disorder specifically. Boys are affected roughly 4 times more often than girls. The average age of onset is between 6 and 8 years (range 3-11 years), with motor tics typically appearing before vocal tics by a few years. Tic intensity tends to peak around age 11 and generally improves thereafter. Most tic disorders in children are transient and do not interfere with daily activities; approximately 10% of children experience a tic persisting for at least a month."
  )},
  {"title": "Etiology", "content": (
   "Tic disorders are understood as model neuropsychiatric conditions reflecting a complex interplay of genetic, neurobiological, environmental, and psychosocial factors: they have a constitutional, likely genetic, basis; are influenced by perinatal risk and environmental factors; show sexual dimorphism (male predominance); evolve in course over development; and, despite being neurobiologically determined, can be modulated by psychosocial factors such as stress and by cognitive behavioral interventions. The basal ganglia are believed to be involved in the underlying pathophysiology. Stimulant medications used to treat ADHD can unmask, but do not cause, an underlying tic disorder in a predisposed child; other medications, including antipsychotics, can also induce tics. A controversial hypothesis known as PANDAS (pediatric autoimmune neuropsychiatric disorder associated with Streptococcus) proposes that group A beta-hemolytic streptococcal infection can trigger an autoimmune reaction against the basal ganglia, causing acute-onset tics, OCD, or both; while some studies have found increased rates of preceding streptococcal infection in children newly diagnosed with tic disorders, this remains unproven and difficult to distinguish from coincidental co-occurrence of two common childhood conditions."
  )},
  {"title": "Clinical features", "content": (
   "Tics commonly affect the muscle groups of the eyes, mouth, face, and neck, and typically wax and wane over time, with old tics being replaced by new ones and their frequency, type, and severity changing (parents often note increasing frequency toward the end of the day). Tics are worsened by stress, anxiety, excitement, or exhaustion, and are typically suppressed during sleep; they are often most apparent during inactivity (such as watching television or on long car journeys) and may lessen during focused concentration. Many affected children describe a premonitory urge - an uncomfortable, hard-to-describe sensation - relieved by performing the tic. Tourette syndrome typically begins in early childhood with simple motor tics such as eye blinking or facial twitching, evolving over time to more complex motor tics (touching, squatting, twirling) and, often a year or two later, vocal tics that may progress from simple sounds to barks, sniffs, or echolalia (repetition of others' words). Comorbidities are common and clinically significant: ADHD is present in about 50% of Tourette syndrome patients, and children with combined ADHD and tics have the greatest social and academic difficulties - notably, ADHD severity is a better predictor of poor adjustment than tic severity itself. OCD is found in up to 50% of Tourette syndrome patients, with obsessions/compulsions commonly involving symmetry, evening-up, and \"just right\" phenomena. Other associated features include anxiety disorders, depression, fine-motor difficulties, an uneven cognitive profile (performance IQ lower than verbal IQ), and academic difficulties that can occur independent of ADHD."
  )},
  {"title": "Diagnostics", "content": (
   "Diagnosis of a primary tic disorder is based on history and a neurologic examination that is normal aside from the tics themselves; neuroimaging is not helpful and is not indicated for a typical presentation. Distinguishing tics from other movement disorders (stereotypies, chorea, dyskinesia - which are more common in children with autism spectrum disorder, cerebral palsy, or drug-induced psychomotor disorders) relies on the characteristic suppressibility, premonitory urge, and waxing/waning course of true tics."
  )},
  {"title": "Differential diagnosis", "content": (
   "Tics must be differentiated from other childhood movement disorders, including stereotypies, chorea, and dyskinesia, which are more prevalent in children with autism spectrum disorder, cerebral palsy, or drug-induced psychomotor disturbance. Paroxysmal (nonepileptic) movement disorders are another category of episodic, often stereotypic involuntary movement with preserved consciousness that can be confused with tics."
  )},
  {"title": "Treatment", "content": (
   "Most children with mild-to-moderate tics require no medication: reassurance, education, and anticipatory guidance for the family are the mainstay of management, and the majority of tic disorders respond to cognitive behavioral therapy. When tics cause sufficient functional or psychosocial morbidity to warrant pharmacotherapy, first-line agents are the alpha-2 agonists clonidine or guanfacine. Behavioral therapies remain a core component of treatment regardless of medication use. Because comorbidities often drive more of the functional impairment than the tics themselves, active treatment of coexisting ADHD, OCD, anxiety, or mood disorders is an essential part of the overall management plan. Suicidal behavior should be monitored, particularly in patients with persistent tics, a history of suicide attempts, or psychiatric comorbidities, since tic disorders are associated with increased suicide risk."
  )}
 ],
 "clinical": [
  {"title": "Approach at the bedside", "content": (
   "In a school-age child brought in for repetitive blinking, sniffing, throat clearing, or similar movements, take a history focused on onset, waxing/waning course, suppressibility, presence of a premonitory urge, and whether both motor and vocal tics are present and for how long - this determines whether the picture fits transient tic disorder (4 weeks to 1 year), chronic tic disorder (motor or vocal, >1 year), or Tourette syndrome (both motor and vocal, >1 year). Perform a neurologic exam, which should be normal aside from the tics; neuroimaging is not indicated for a typical presentation.\n\nScreen specifically for common comorbidities at the same visit - ADHD and OCD are present in about half of Tourette syndrome patients, and anxiety, depression, and learning difficulties are also common - since these comorbidities, not tic severity itself, are usually the bigger driver of functional impairment and should be actively treated. For most children with mild tics and no significant distress, reassurance and education alone are appropriate; avoid over-medicalizing a transient, self-limited presentation. If tics are causing meaningful distress or impairment, start with an alpha-2 agonist (clonidine or guanfacine) as first-line pharmacotherapy and pair it with behavioral therapy. If a child on stimulant medication for ADHD develops new tics, reassure the family that this reflects unmasking of an underlying predisposition rather than a medication-caused tic disorder - this is a common point of parental concern worth addressing directly."
  )}
 ]
}

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