import json

data = {
 "topic": "Cardiac Arrhythmia",
 "slug": "cardiac-arrhythmia",
 "category_id": 15136,
 "summary": "Pediatric cardiac arrhythmias range from benign normal variants like isolated premature beats to life-threatening tachy- or bradyarrhythmias, requiring a systematic ECG-based approach and a search for reversible causes before deciding on treatment.",
 "written_by": "claude-sonnet",
 "references": [
  {"title": "Signs and Symptoms in Pediatrics", "author": "Henry M. Adam,Jane Meschan Foy", "pages": [122, 123]},
  {"title": "2021_Fleisher_&_Ludwig's_Textbook_of_Pediatric_Emergency_Medicine.epub", "author": None, "pages": []},
  {"title": "Pediatric Board Study Guide", "author": None, "pages": [629]},
  {"title": "Kliegman R. Nelson Textbook of Pediatrics 2-Volume Set 22ed 2024", "author": None, "pages": [2865]},
  {"title": "Common Cardiac Issues in Pediatrics", "author": "Jonathan N. Johnson,Deepak M. Kamat", "pages": [36, 167]},
  {"title": "CURRENT Diagnosis and Treatment Pediatrics, Twenty-Fourth Edition", "author": "Hay, William W., Levin, Myron J., Deterding, Robin R., Abzug, Mark J.", "pages": [647]},
  {"title": "Gomella's Neonatology: Management, Procedures, On-Call Problems, Diseases, and Drugs, Eighth Edition", "author": "Tricia Lacy Gomella, Fabien G. Eyal and Fayez Bany-Mohammed", "pages": [1421]},
  {"title": "MedStudy Pediatrics Core 11th Edition 2024-2025", "author": None, "pages": [496]}
 ],
 "short": [
  {"title": "In short", "content": (
   "- Arrhythmia refers to any disturbance of heart rate or rhythm, producing rates that are abnormally fast, slow, or irregular; it can be congenital or acquired, transient or incessant, and clinical implications range from entirely benign to lethal\n"
   "- Cardiac rhythm abnormalities occur in two populations: healthy children with structurally normal hearts who have an intrinsic conduction system abnormality, and children with congenital heart disease (including those with prior surgery/scar tissue), who are at higher risk from altered hemodynamics and surgical suture lines\n"
   "- Premature atrial contractions (PACs) are the most common childhood arrhythmia - about 50% of normal children have at least one per day; premature ventricular contractions (PVCs) are also common, and unifocal PVCs that disappear with exercise in a child with a normal history and exam do not need further workup\n"
   "- A 12-lead ECG should always be obtained when an arrhythmia is suspected, since electrophysiologic changes can be subtle and not visible on a rhythm strip alone; empirical treatment without identifying the specific arrhythmia does not meet the standard of care\n"
   "- A systematic ECG approach answers: is the rhythm fast or slow, regular or irregular, and what is its relationship between P waves and QRS complexes\n"
   "- Bradycardia thresholds vary by age on surface ECG: roughly <100 bpm in neonates/infants (awake) and children to age 3, <60 bpm ages 3-9, <50 bpm ages 9-16, and <40 bpm over 16; ambulatory (Holter) thresholds are lower still and vary further by age and sleep/wake state, with well-trained athletes tolerating rates as low as ~30 bpm\n"
   "- Narrow-complex, irregularly irregular tachycardia is almost always atrial fibrillation (or, less commonly, atrial flutter/IART with variable conduction); synchronized cardioversion (0.5-1 J/kg) or rate-controlling medication can be used, but cardioversion should be avoided if the patient has been in atrial fibrillation for 48+ hours (or duration is unknown) due to stroke risk\n"
   "- For atrial fibrillation rate control, beta-blockers or calcium channel blockers can be used (not in combination); calcium channel blockers are not given to children under 2 years; amiodarone or sotalol are commonly used for chronic control and can convert the rhythm to sinus when used acutely\n"
   "- Key history for any arrhythmia: how tachycardia starts/stops (abrupt onset/termination suggests true arrhythmia; gradual suggests normal sinus variation), associated symptoms (syncope, dizziness, fatigue, dyspnea, chest discomfort), triggers (exercise, startle/loud noise, swimming - concerning for inherited channelopathies), personal cardiac history, medications, and family history of sudden death, pacemaker, deafness, or seizures\n"
   "- The reversible \"H's and T's\" of arrhythmia should always be considered: Hypovolemia, Hypoxia, Hydrogen ion (acidosis), Hypo-/Hyperkalemia, Hypothermia, Hypoglycemia, Tension pneumothorax, cardiac Tamponade, Toxins, pulmonary Thrombosis, coronary Thrombosis"
  )}
 ],
 "long": [
  {"title": "Definition", "content": (
   "Arrhythmia refers to any disturbance in cardiac rate or rhythm, producing heart rates that are abnormally fast (tachyarrhythmia), slow (bradyarrhythmia), or irregular. Arrhythmias may be transient or incessant, congenital or acquired, and may result from infection, toxins, or drugs. They may occur in structurally normal hearts, in association with particular forms of congenital heart disease (CHD), as a complication following surgical repair of CHD, from genetic causes, or as a result of maternal connective tissue disease affecting the fetus."
  )},
  {"title": "Epidemiology", "content": (
   "Arrhythmias in children and young people are common and range from normal rhythm variations and isolated premature beats to atrial or ventricular tachyarrhythmias and conduction defects. Premature atrial contractions (PACs) are the most common arrhythmia of childhood - approximately 50% of normal children experience at least one PAC per day - and premature ventricular contractions (PVCs) also account for many presentations of a perceived irregular heartbeat. Newer ambulatory diagnostic tools, such as extended event recorders, have improved detection of infrequent, paroxysmal arrhythmias that a standard resting ECG would miss."
  )},
  {"title": "Etiology", "content": (
   "Arrhythmias occur in two broad populations: (1) otherwise healthy children with structurally normal hearts who have an intrinsic abnormality of the cardiac electrical conduction system, and (2) children with congenital heart disease, who carry additional arrhythmia risk related to the underlying defect itself, chronic altered cardiac hemodynamics, and, in operated patients, surgical suture lines/scar tissue. Patients who have undergone intra-atrial repairs (such as for D-transposition of the great arteries or atrial septal defect) are at particularly high risk for potentially life-threatening arrhythmias. A recognized set of acutely reversible causes - summarized as the \"H's and T's\" - should always be considered: Hypovolemia, Hypoxia, Hydrogen ion (acidosis), Hypoglycemia, Hypokalemia/Hyperkalemia, Hypothermia, Tension pneumothorax, cardiac Tamponade, Toxins, pulmonary Thrombosis, and coronary Thrombosis."
  )},
  {"title": "Pathophysiology", "content": (
   "On the surface ECG, atrial depolarization corresponds to the P wave, conduction to the AV node corresponds to the PR interval, ventricular depolarization corresponds to the QRS complex, and ventricular repolarization corresponds to the ST segment and T wave - understanding this correlation underlies systematic arrhythmia interpretation. Arrhythmias, whether fast or slow, can acutely reduce cardiac output; if an arrhythmia is incessant, it can lead to arrhythmia-induced cardiomyopathy over time. An initially stable, organized arrhythmia can also degenerate into a more dangerous rhythm such as ventricular fibrillation, and arrhythmias can precipitate syncope or sudden death - so a key clinical task whenever an arrhythmia is identified is judging whether it is likely to cause symptoms or to deteriorate into a life-threatening rhythm."
  )},
  {"title": "Clinical features", "content": (
   "Clinical presentation depends on the type and duration of the rhythm disturbance and the patient's age. Some children are entirely asymptomatic. When symptoms occur, they are typically due to a tachyarrhythmia. In younger children, possible manifestations include irritability, lethargy, poor feeding, diaphoresis, pallor, and signs/symptoms of heart failure. Older children more often report dizziness, palpitations, chest pain, shortness of breath, fatigue, and exercise intolerance. Both bradycardia and tachycardia can present with signs of decreased cardiac output - fatigue, dizziness, syncope, or sudden death. Patients with significant sinus or AV node dysfunction causing an irregular or slow heart rate often have a history of syncope or seizure, a slow heart rate (25-50 bpm) on exam, a pulmonic flow murmur, or signs of congestive heart failure. A history of abrupt onset and termination of a tachycardia is suggestive of a true arrhythmia, whereas gradual onset and offset suggests normal sinus rate variation instead."
  )},
  {"title": "Diagnostics", "content": (
   "A 12-lead ECG should always be obtained whenever an arrhythmia is suspected, since electrophysiologic abnormalities can be subtle and are not always apparent on a simple rhythm strip; empirical therapy without first identifying the specific arrhythmia does not meet the current standard of practice. Because many arrhythmias are paroxysmal, a random resting ECG can be normal even in an affected child, so continuous ambulatory (Holter) ECG monitoring for 24-48 hours, or other extended recording techniques (event recorders), is often necessary to capture and document the rhythm. Systematic ECG interpretation should address, in order: is the rhythm fast or slow, is it regular or irregular, and what is the relationship of the P waves to the QRS complexes. Age-specific bradycardia thresholds on surface ECG are: under 100 bpm (awake) for neonates, infants, and children to age 3; under 60 bpm for children 3-9 years; under 50 bpm for adolescents 9-16 years; and under 40 bpm for adolescents over 16. Ambulatory (Holter) monitoring thresholds are generally lower and vary further with age and sleep/wake state (for example, under 60 bpm sleeping versus under 80 bpm awake-quiet in neonates/infants), with well-conditioned athletes tolerating rates as low as about 30 bpm. A thorough family history focused on sudden or premature death, syncope, seizures, and recurrent arrhythmias is an essential part of the evaluation, given the genetic basis of many inherited arrhythmia syndromes."
  )},
  {"title": "Treatment", "content": (
   "Management is arrhythmia-specific and depends on the underlying rhythm, its hemodynamic impact, and whether the patient has structural heart disease. For a narrow-complex, irregularly irregular tachycardia - almost always atrial fibrillation, or less commonly atrial flutter/intra-atrial reentrant tachycardia (IART) with variable conduction - treatment options include synchronized cardioversion (0.5-1 J/kg) or medication for rate control; cardioversion should be avoided if the patient has been in atrial fibrillation for 48 hours or more, or if the duration of the arrhythmia is unknown, because of the risk of dislodging an atrial thrombus and causing stroke. For acute rate control in these situations, a beta-blocker or calcium channel blocker may be used, but not in combination, until the patient can be fully assessed (e.g., for a left atrial clot); calcium channel blockers should not be given to children younger than 2 years. Amiodarone or sotalol are commonly used for chronic control of atrial fibrillation and can cause conversion to sinus rhythm when used acutely. Cardiac catheter ablation can cure most tachyarrhythmias and is considered safe even in young patients. Implantable pacemakers and defibrillators are now small enough to be used in infants and children when indicated. For bradyarrhythmias such as second-degree AV block, management centers on treating the underlying cause of the conduction disturbance. Whenever an arrhythmia is encountered acutely, the reversible \"H's and T's\" should be sought and corrected as part of management."
  )},
  {"title": "Complications", "content": (
   "An incessant arrhythmia can lead to arrhythmia-induced cardiomyopathy over time. A seemingly stable, organized arrhythmia can degenerate into a more dangerous rhythm such as ventricular fibrillation. Arrhythmias can cause syncope or sudden cardiac death, and genetic markers can now identify many conditions that predispose to sudden cardiac death, enabling primary preventive therapy in some cases."
  )}
 ],
 "clinical": [
  {"title": "Approach at the bedside", "content": (
   "When an arrhythmia is suspected in a child - whether from a caregiver report of an irregular heartbeat, palpitations, syncope, or incidental findings on exam - obtain a 12-lead ECG before starting any empiric treatment, since management is arrhythmia-specific and subtle findings can be missed on a rhythm strip alone. Work through the rhythm systematically: is it fast or slow for the child's age (using age-specific thresholds), is it regular or irregular, and what is the relationship between P waves and QRS complexes. If the presenting complaint is paroxysmal and the resting ECG is normal, arrange ambulatory (Holter) monitoring for 24-48 hours or an event recorder to try to capture the episode.\n\nTake a focused history addressing onset/offset pattern (abrupt suggests true arrhythmia, gradual suggests normal variation), associated symptoms (syncope, dizziness, chest pain, dyspnea), specific triggers (exercise, startle, swimming - raising concern for an inherited channelopathy), and family history of sudden death, pacemaker, deafness, or seizures. In an acutely unstable child with any arrhythmia, systematically search for and correct reversible causes (the H's and T's - hypovolemia, hypoxia, acidosis, hypoglycemia, potassium derangement, hypothermia, tension pneumothorax, tamponade, toxins, or thrombosis) before or alongside arrhythmia-specific treatment. For an irregularly irregular narrow-complex tachycardia, treat as atrial fibrillation/flutter with variable conduction: use synchronized cardioversion (0.5-1 J/kg) or rate control with a beta-blocker or calcium channel blocker (never both together, and avoid calcium channel blockers under age 2), but withhold cardioversion if the arrhythmia has lasted 48 hours or longer or its duration is unknown, given stroke risk from a possible atrial thrombus. Reserve unremarkable, unifocal PVCs that resolve with exercise in an otherwise well child with a normal exam for reassurance without further workup, but pursue full evaluation for any child with syncope, a family history of sudden death, or known/suspected structural heart disease."
  )}
 ]
}

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