import json

data = {
 "topic": "Tetralogy Of Fallot",
 "slug": "tetralogy-of-fallot",
 "category_id": 15751,
 "summary": "Tetralogy of Fallot is the most common cyanotic congenital heart defect, arising from anterior deviation of the infundibular septum, producing pulmonary stenosis, a malalignment VSD, an overriding aorta, and right ventricular hypertrophy, with hypercyanotic \"tet spells\" as a hallmark emergency.",
 "written_by": "claude-sonnet",
 "references": [
  {"title": "Signs and Symptoms in Pediatrics", "author": "Henry M. Adam,Jane Meschan Foy", "pages": [1051]},
  {"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": [525, 899]},
  {"title": "Nelson Pediatrics Board Review - Certification And Recertification-", "author": None, "pages": [48]},
  {"title": "Zitelli and Davis' Atlas of Pediatric Physical Diagnosis: Expert Consult - Online", "author": None, "pages": [177, 191, 1107]},
  {"title": "Kliegman R. Nelson Textbook of Pediatrics 2-Volume Set 22ed 2024", "author": None, "pages": [2821, 2825, 2862]},
  {"title": "Netters Pediatrics (Florin Т., Ludwig St.)", "author": None, "pages": [294]},
  {"title": "Cover", "author": "Vitalsource Download", "pages": [7145]},
  {"title": "Pediatric Board Study Guide", "author": None, "pages": [1093]}
 ],
 "short": [
  {"title": "In short", "content": (
   "- Tetralogy of Fallot (TOF) results from a single developmental problem - anterior deviation of the infundibular (outflow tract) septum - producing four findings: pulmonary stenosis, a malalignment ventricular septal defect (VSD), an overriding aorta, and right ventricular hypertrophy\n"
   "- There is a slight male predominance\n"
   "- The degree of right ventricular outflow obstruction is directly proportional to the degree of cyanosis and inversely proportional to pulmonary blood flow\n"
   "- \"Pink tet\" (normal saturations at birth, presenting later like a large VSD with heart failure and poor growth by 4-6 weeks) occurs with milder obstruction; \"blue tet\" (cyanosis from diminished pulmonary flow and right-to-left VSD shunting) occurs with severe obstruction\n"
   "- With very severe pulmonary stenosis or atresia, the lesion becomes ductal-dependent for pulmonary blood flow, and the systolic ejection murmur (from pulmonary stenosis, not the VSD) may be very soft or absent\n"
   "- Classic exam: normal first heart sound, loud systolic ejection murmur at the left upper sternal border radiating to the back; classic chest x-ray shows a boot-shaped heart (coeur en sabot) with diminished pulmonary vascularity\n"
   "- About one-third of untreated patients develop hypoxic (\"tet\") spells by 4-5 months of age - paroxysmal hyperpnea, worsening cyanosis, and irritability, sometimes misdiagnosed as colic, that can progress to obtundation, convulsions, or rarely death\n"
   "- First-line treatment of a tet spell: knee-chest positioning (increases systemic vascular resistance, decreases right-to-left shunting), blow-by oxygen, and comforting/feeding; if cyanosis persists, give propranolol 0.05 mg/kg to slow heart rate and reduce contractility, with IV phenylephrine, ketamine, intubation and sedation as further escalation options\n"
   "- If cyanosis appears in the first 2 weeks of life, give prostaglandin E1 (PGE1) to maintain ductal patency until surgery; a Blalock-Taussig shunt is a palliative option if definitive surgery cannot be done\n"
   "- Definitive repair involves VSD closure, resection of hypertrophied infundibular muscle bundles, and pulmonary valvotomy/valvuloplasty (often with a transannular patch); without surgery, only about 11% of patients survive to age 20, and 3% to age 40"
  )}
 ],
 "long": [
  {"title": "Definition", "content": (
   "Tetralogy of Fallot (TOF) is a conotruncal congenital heart defect in which the primary abnormality is anterior deviation of the infundibular septum - the muscular septum that normally separates the aortic and pulmonary outflow tracts during division of the embryonic truncus arteriosus. This single developmental error produces the four classic components originally described by Fallot: (1) obstruction to right ventricular outflow (pulmonary stenosis), (2) a malalignment-type ventricular septal defect (VSD), (3) dextroposition of the aorta so that it overrides the ventricular septum, and (4) right ventricular hypertrophy (RVH), which develops secondary to the outflow obstruction. In its more severe form, TOF may occur with pulmonary atresia rather than stenosis."
  )},
  {"title": "Epidemiology", "content": (
   "TOF is one of the most common cyanotic congenital heart lesions, with a slight male predominance. In the developed world, unoperated adults with TOF are now rare because the great majority of patients undergo palliation or, more commonly, complete repair in childhood. Without surgical intervention, natural history data indicate only about 11% of patients survive to age 20 and only about 3% survive to age 40."
  )},
  {"title": "Pathophysiology", "content": (
   "The degree of right ventricular outflow tract obstruction determines the hemodynamic and clinical picture: obstruction severity is directly proportional to the degree of cyanosis and inversely proportional to pulmonary blood flow. With milder obstruction, infants may have normal oxygen saturations at birth (\"pink tet\") and instead behave clinically like a large, unrestricted VSD with heart failure and poor growth becoming apparent by 4-6 weeks of age. With more severe obstruction, diminished pulmonary blood flow forces increased right-to-left shunting across the VSD, producing cyanosis from birth (\"blue tet\"). In the most severe cases - very tight pulmonic stenosis or frank pulmonary atresia - pulmonary blood flow becomes entirely ductal-dependent, meaning the patent ductus arteriosus is the sole source of flow to the lungs. Hypercyanotic (\"tet\") spells - paroxysmal episodes of hyperpnea, worsening cyanosis, and irritability - occur because a further, acute increase in right-to-left shunting (triggered by factors like crying, feeding, or dehydration that lower systemic vascular resistance or raise infundibular muscular obstruction) acutely worsens pulmonary underperfusion; this is why maneuvers that raise systemic vascular resistance (like knee-chest positioning) terminate spells."
  )},
  {"title": "Clinical features", "content": (
   "Cyanosis may not be present at birth in less severe cases, as long as the ductus remains patent and can supplement pulmonary flow, or if the outflow obstruction is not yet severe; few infants with TOF remain asymptomatic or acyanotic indefinitely, however. Hypercyanotic (\"tet\") spells characteristically occur spontaneously or after early-morning feeding or prolonged crying, with paroxysmal hyperpnea; episodes may last only moments with no sequelae, or may progress to obtundation, limpness, deep exhaustion or sleep, and rarely to unconsciousness, convulsions, or death. Approximately one-third of untreated patients begin having hypoxic spells by 4-5 months of age; minor spells with inconsolable crying but little increase in observed cyanosis are sometimes misdiagnosed as colic. On examination, the first heart sound (S1) is typically normal, and a loud systolic ejection murmur is heard best at the left upper sternal border, radiating to the back - this murmur arises from flow across the stenotic pulmonary valve, not from the VSD itself; with very severe pulmonary stenosis, the murmur may become very soft or even absent because of minimal antegrade flow. In TOF with pulmonary atresia specifically, the prominent systolic murmur typical of TOF is usually absent, and cyanosis typically appears within the first hours to days of life; an ejection click may follow S1. TOF with an absent pulmonary valve is a distinct variant that can present with respiratory distress or poor feeding due to compression of the esophagus or bronchi by markedly dilated pulmonary arteries. Classic chest radiograph findings include a \"boot-shaped\" heart (coeur en sabot) with diminished pulmonary vascular markings and reduced prominence of the pulmonary arteries; TOF with pulmonary atresia can show an \"egg on its side\" cardiac silhouette."
  )},
  {"title": "Diagnostics", "content": (
   "Echocardiography is the key diagnostic tool, identifying the malalignment VSD, overriding aorta, right ventricular outflow obstruction, and RVH. Chest radiography supports the diagnosis with the boot-shaped heart and decreased pulmonary vascularity described above; a right aortic arch may also be present. Cardiac catheterization and surgical planning imaging may follow in preparation for repair."
  )},
  {"title": "Treatment", "content": (
   "If cyanosis develops within the first 2 weeks of life, prostaglandin E1 (PGE1) infusion is given to maintain ductal patency and preserve pulmonary blood flow until surgery can be performed. For an acute hypercyanotic (\"tet\") spell, initial management includes knee-chest positioning (which decreases right-to-left shunting and increases systemic vascular resistance), blow-by oxygen, and comforting/feeding the infant. If cyanosis persists despite these measures, propranolol 0.05 mg/kg can be given to decrease heart rate and myocardial contractility, thereby reducing dynamic infundibular obstruction. Further escalation options for refractory spells include intravenous phenylephrine, ketamine, and, as a last resort, intubation and sedation. If definitive surgery is not immediately possible, a Blalock-Taussig shunt can be created as a palliative procedure to augment pulmonary blood flow. Definitive surgical repair, typically performed within the first months of life, consists of closure of the VSD, resection of the hypertrophied infundibular (subvalvular) muscle bundles to relieve right ventricular outflow obstruction, and pulmonary valvotomy/valvuloplasty, frequently including a transannular patch across the pulmonary valve annulus."
  )},
  {"title": "Complications", "content": (
   "Without surgical correction, mortality is high - only about 11% of patients survive to age 20 and 3% to age 40 - which is why nearly all patients in the developed world now undergo childhood palliation or repair. After complete surgical repair, pulmonary regurgitation is a well-recognized long-term sequela, particularly when a transannular patch was used, and can require reintervention later in life. Hypercyanotic spells themselves carry risk of significant morbidity (obtundation, convulsions) and, rarely, death if not promptly recognized and treated."
  )}
 ],
 "clinical": [
  {"title": "Managing a hypercyanotic (tet) spell at the bedside", "content": (
   "Recognize a tet spell in a known or suspected TOF patient (often an infant, but can occur in an older, unrepaired toddler) presenting with progressive agitation, increasing cyanosis, and increasing fussiness, often triggered by crying, feeding, or a stressor that lowers systemic vascular resistance. Act in this order: (1) place the infant/child in the knee-chest position immediately - this increases systemic vascular resistance and reduces right-to-left shunting across the VSD; (2) give blow-by oxygen; (3) calm and comfort the child, and attempt feeding if appropriate, since agitation worsens the spell. If cyanosis persists despite these first-line measures, give propranolol 0.05 mg/kg IV to reduce heart rate and myocardial contractility and interrupt the dynamic infundibular obstruction driving the shunt. For a spell refractory to propranolol, escalate to IV phenylephrine (raises systemic vascular resistance pharmacologically) or ketamine, with intubation and sedation reserved as a last resort.\n\nIf a neonate presents with cyanosis in the first 2 weeks of life and TOF (or another duct-dependent lesion) is suspected, start a prostaglandin E1 infusion promptly to maintain ductal patency and preserve pulmonary blood flow while arranging definitive evaluation and surgical planning - do not wait for a spell to develop before addressing duct-dependent physiology."
  )}
 ]
}

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