const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType,
VerticalAlign, PageNumber, Header, Footer, PageBreak, UnderlineType,
convertInchesToTwip, LevelFormat
} = require('docx');
const fs = require('fs');
// βββ colour palette βββββββββββββββββββββββββββββββββββββββββββββββ
const NAVY = "1F3864"; // dark navy β main headings
const TEAL = "1F5C6B"; // teal β sub-headings
const GOLD = "C09B00"; // gold β exam-tip labels
const LGREY = "F2F2F2"; // light grey β table header fill
const WHITE = "FFFFFF";
const BLACK = "000000";
// βββ helpers ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
const pt = (n) => n * 2; // half-points β points
function heading1(text) {
return new Paragraph({
heading: HeadingLevel.HEADING_1,
spacing: { before: pt(18), after: pt(6) },
children: [new TextRun({
text, bold: true, color: WHITE, size: pt(16),
font: "Calibri",
})],
shading: { type: ShadingType.SOLID, color: NAVY },
indent: { left: 100 },
});
}
function heading2(text) {
return new Paragraph({
heading: HeadingLevel.HEADING_2,
spacing: { before: pt(14), after: pt(4) },
children: [new TextRun({
text, bold: true, color: WHITE, size: pt(14),
font: "Calibri",
})],
shading: { type: ShadingType.SOLID, color: TEAL },
indent: { left: 80 },
});
}
function heading3(text) {
return new Paragraph({
heading: HeadingLevel.HEADING_3,
spacing: { before: pt(10), after: pt(3) },
children: [new TextRun({
text, bold: true, color: NAVY, size: pt(13),
font: "Calibri", underline: { type: UnderlineType.SINGLE },
})],
});
}
function body(text, opts = {}) {
return new Paragraph({
spacing: { before: pt(3), after: pt(3) },
children: [new TextRun({
text,
size: pt(11),
font: "Calibri",
bold: opts.bold || false,
italics: opts.italic || false,
color: opts.color || BLACK,
})],
});
}
function bullet(text, level = 0) {
const parts = [];
// bold if starts with **...**
const boldMatch = text.match(/^\*\*(.+?)\*\*:?\s*(.*)/);
if (boldMatch) {
parts.push(new TextRun({ text: boldMatch[1], bold: true, size: pt(11), font: "Calibri" }));
if (boldMatch[2]) parts.push(new TextRun({ text: ": " + boldMatch[2], size: pt(11), font: "Calibri" }));
} else {
parts.push(new TextRun({ text, size: pt(11), font: "Calibri" }));
}
return new Paragraph({
bullet: { level },
spacing: { before: pt(2), after: pt(2) },
children: parts,
});
}
function examTip(text) {
return new Paragraph({
spacing: { before: pt(6), after: pt(6) },
indent: { left: 300, right: 300 },
shading: { type: ShadingType.SOLID, color: "FFF3CD" },
children: [
new TextRun({ text: "β EXAM TIP: ", bold: true, color: GOLD, size: pt(11), font: "Calibri" }),
new TextRun({ text, size: pt(11), font: "Calibri", color: "5D4037" }),
],
});
}
function pageBreak() {
return new Paragraph({ children: [new PageBreak()] });
}
function spacer() {
return new Paragraph({ spacing: { before: pt(4), after: pt(4) }, children: [new TextRun("")] });
}
// βββ table builders βββββββββββββββββββββββββββββββββββββββββββββββ
function makeTable(headers, rows, colWidths) {
const totalW = colWidths.reduce((a, b) => a + b, 0);
const headerRow = new TableRow({
tableHeader: true,
children: headers.map((h, i) => new TableCell({
width: { size: colWidths[i], type: WidthType.DXA },
shading: { type: ShadingType.SOLID, color: NAVY },
verticalAlign: VerticalAlign.CENTER,
children: [new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({ text: h, bold: true, color: WHITE, size: pt(10), font: "Calibri" })],
})],
}))
});
const bodyRows = rows.map((row, ri) => new TableRow({
children: row.map((cell, ci) => {
const isHeader = ci === 0;
return new TableCell({
width: { size: colWidths[ci], type: WidthType.DXA },
shading: { type: ShadingType.SOLID, color: isHeader ? LGREY : (ri % 2 === 0 ? WHITE : "F9F9F9") },
verticalAlign: VerticalAlign.CENTER,
children: [new Paragraph({
children: parseCell(cell, isHeader),
spacing: { before: pt(2), after: pt(2) },
})],
});
})
}));
return new Table({
width: { size: totalW, type: WidthType.DXA },
rows: [headerRow, ...bodyRows],
margins: { top: 40, bottom: 40, left: 80, right: 80 },
});
}
function parseCell(text, bold = false) {
if (!text) return [new TextRun({ text: "", font: "Calibri", size: pt(10) })];
return [new TextRun({ text: String(text), bold, size: pt(10), font: "Calibri" })];
}
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// DOCUMENT CONTENT
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
const children = [];
// ββ COVER βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
children.push(
new Paragraph({ spacing: { before: pt(80) }, children: [] }),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: pt(20), after: pt(8) },
children: [new TextRun({ text: "FINAL YEAR PEDIATRICS", bold: true, size: pt(28), color: NAVY, font: "Calibri" })],
}),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: pt(4), after: pt(4) },
children: [new TextRun({ text: "DISTINCTION-LEVEL EXAM NOTES", bold: true, size: pt(22), color: TEAL, font: "Calibri" })],
}),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: pt(8), after: pt(8) },
children: [new TextRun({ text: "Neurology | Pulmonology | 25 Marks Each", size: pt(14), color: "555555", font: "Calibri", italics: true })],
}),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: pt(6), after: pt(20) },
children: [new TextRun({ text: "Nelson Textbook of Pediatrics Β· OP Ghai Essential Pediatrics", size: pt(12), color: "888888", font: "Calibri" })],
}),
spacer(),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: pt(6), after: pt(6) },
children: [new TextRun({ text: "TOPICS COVERED", bold: true, size: pt(13), color: NAVY, font: "Calibri" })],
}),
makeTable(
["#", "Topic", "System"],
[
["1","Meningitis","Neurology"],
["2","Febrile Seizures","Neurology"],
["3","Cerebral Palsy","Neurology"],
["4","Duchenne Muscular Dystrophy","Neurology"],
["5","Neural Tube Defects","Neurology"],
["6","Bronchial Asthma","Pulmonology"],
["7","Pneumonia","Pulmonology"],
["8","Acute Bronchiolitis","Pulmonology"],
["9","Acute Epiglottitis","Pulmonology"],
["10","Croup (LTB)","Pulmonology"],
["11","Cystic Fibrosis","Pulmonology"],
],
[500, 4000, 2000]
),
pageBreak(),
);
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// 1. MENINGITIS
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
children.push(heading1("1. BACTERIAL MENINGITIS"));
children.push(heading3("Definition"));
children.push(body("Inflammation of the meninges (pia, arachnoid, dura) caused by bacteria. A medical emergency requiring immediate treatment."));
children.push(heading3("Etiology β Age-Based (HIGH YIELD)"));
children.push(makeTable(
["Age Group","Common Organisms"],
[
["Neonates (<1 month)","Group B Streptococcus Β· E. coli Β· Listeria monocytogenes"],
["1β3 months","GBS Β· E. coli Β· S. pneumoniae Β· N. meningitidis"],
["3 months β 5 years","S. pneumoniae Β· N. meningitidis Β· H. influenzae type b"],
[">5 years / Adults","S. pneumoniae Β· N. meningitidis"],
["Immunocompromised","L. monocytogenes Β· Gram-negative bacilli Β· Cryptococcus"],
],
[2500, 4500]
));
children.push(heading3("Pathophysiology"));
children.push(bullet("Bacteria colonise nasopharyngeal mucosa β bacteraemia β cross blood-brain barrier"));
children.push(bullet("Cell wall products trigger cytokines (TNF-Ξ±, IL-1, IL-6) β cerebral oedema, raised ICP"));
children.push(bullet("Vasculitis β cerebral ischaemia and infarction"));
children.push(heading3("Clinical Features"));
children.push(body("Classic Triad: Fever + Neck stiffness + Altered consciousness/headache", { bold: true }));
children.push(bullet("**Kernig's sign**: inability to extend knee with hip flexed at 90Β°"));
children.push(bullet("**Brudzinski's sign**: passive neck flexion β involuntary hip/knee flexion"));
children.push(bullet("Petechial/purpuric rash (N. meningitidis septicaemia)"));
children.push(bullet("Photophobia, phonophobia, focal deficits, cranial nerve palsies"));
children.push(body("Neonates (EXAM TRAP β atypical!):", { bold: true }));
children.push(bullet("Bulging fontanelle Β· high-pitched cry Β· poor feeding Β· temperature instability Β· seizures"));
children.push(bullet("NO classic meningism in neonates"));
children.push(heading3("CSF Analysis β MUST MEMORISE"));
children.push(makeTable(
["Parameter","Normal","Bacterial","Viral","Tubercular"],
[
["Appearance","Clear","Turbid/purulent","Clear","Fibrin web"],
["Cells","<5 lymph",">1000 PMN","100β500 lymph","100β500 lymph"],
["Protein","0.2β0.4 g/L",">1 g/L","Normal/β","ββ"],
["Glucose",">60% serum","<40% serum","Normal","Very low"],
["Gram stain","Neg","Positive ~80%","Neg","Neg (ZN stain)"],
],
[1500, 1500, 1500, 1500, 1500]
));
children.push(heading3("Management"));
children.push(examTip("Do NOT delay antibiotics waiting for investigations. Give first dose, THEN CT/LP if needed."));
children.push(body("Empirical Antibiotics:", { bold: true }));
children.push(bullet("Neonates: Ampicillin + Cefotaxime (Β± Gentamicin)"));
children.push(bullet("Children >1 month: Ceftriaxone 100 mg/kg/day IV"));
children.push(bullet("Add Vancomycin if resistant pneumococcus suspected"));
children.push(bullet("Add Ampicillin if >50 years / immunocompromised (covers Listeria)"));
children.push(body("Adjunctive Dexamethasone:", { bold: true }));
children.push(bullet("0.15 mg/kg IV 6-hourly Γ 4 days β give 15β20 min BEFORE or WITH first antibiotic"));
children.push(bullet("Reduces hearing loss and neurological sequelae (especially H. influenzae, pneumococcal)"));
children.push(body("Supportive:", { bold: true }));
children.push(bullet("ICU, airway management, careful IV fluids (avoid SIADH)"));
children.push(bullet("Seizures: Benzodiazepines β Phenobarbitone"));
children.push(bullet("Raised ICP: 30Β° head elevation, mannitol, avoid hypotonic fluids"));
children.push(heading3("Complications"));
children.push(bullet("Hearing loss (most common β 10β30%) Β· Subdural empyema Β· Hydrocephalus"));
children.push(bullet("Cerebral venous sinus thrombosis Β· Intellectual disability Β· Cerebral palsy Β· Death"));
children.push(heading3("Prevention"));
children.push(bullet("Hib vaccine Β· Pneumococcal vaccine (PCV13) Β· Meningococcal vaccine (ACWY + MenB)"));
children.push(bullet("Chemoprophylaxis: Rifampicin for close contacts of N. meningitidis / Hib meningitis"));
children.push(pageBreak());
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// 2. FEBRILE SEIZURES
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
children.push(heading1("2. FEBRILE SEIZURES"));
children.push(heading3("Definition"));
children.push(body("A seizure in a child aged 3 months β 6 years, associated with fever >38Β°C, in the ABSENCE of CNS infection, electrolyte disturbance, or prior afebrile seizures. Prevalence: 2β5% of children. Most common seizure disorder of childhood."));
children.push(heading3("Classification β CRITICAL"));
children.push(makeTable(
["Feature","Simple (80%)","Complex (20%)"],
[
["Duration","<15 minutes",">15 minutes (febrile status epilepticus)"],
["Type","Generalised tonic-clonic","Focal features OR lateralised postictal weakness"],
["Frequency","Only 1 in 24 hours",">1 seizure in 24 hours or same illness"],
["Postictal state","Brief","Prolonged"],
],
[2000, 2500, 2500]
));
children.push(heading3("Risk Factors for Recurrence"));
children.push(bullet("Age of onset <1 year (most important)"));
children.push(bullet("Family history of febrile seizures in 1st-degree relatives"));
children.push(bullet("Low-grade fever at time of first seizure"));
children.push(bullet("Daycare attendance (more febrile illnesses)"));
children.push(body("~30β40% will have at least one recurrence."));
children.push(heading3("Risk of Later Epilepsy"));
children.push(bullet("Simple febrile seizure: ~1β2% (barely above background)"));
children.push(bullet("1 complex feature β 6β8% risk; 2 features β 17β22%; All 3 β 49%"));
children.push(bullet("Febrile status epilepticus β hippocampal injury β hippocampal sclerosis β temporal lobe epilepsy"));
children.push(heading3("Management"));
children.push(body("Acute:", { bold: true }));
children.push(bullet("Recovery position, time the seizure, nothing in mouth"));
children.push(bullet("If >5 min: Diazepam 0.3β0.5 mg/kg rectally OR Midazolam 0.2 mg/kg buccal"));
children.push(bullet("Antipyretics for fever β does NOT prevent recurrence"));
children.push(bullet("LP if <12 months or signs of meningism β to exclude meningitis"));
children.push(body("Long-term:", { bold: true }));
children.push(bullet("Simple febrile seizures: No daily prophylactic AED required"));
children.push(bullet("Intermittent diazepam at time of fever for frequent recurrences (side effect: sedation)"));
children.push(bullet("Parent education: reassurance, when to seek help, seizure first aid"));
children.push(examTip("Antipyretics do NOT prevent recurrence. Daily AEDs are NOT indicated for simple febrile seizures. These two negatives are classic exam traps."));
children.push(pageBreak());
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// 3. CEREBRAL PALSY
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
children.push(heading1("3. CEREBRAL PALSY"));
children.push(heading3("Definition"));
children.push(body("A group of permanent, NON-PROGRESSIVE disorders of movement and posture causing activity limitation, attributed to non-progressive disturbances in the developing fetal or infant brain (injury before age 2 years)."));
children.push(heading3("Etiology / Risk Factors"));
children.push(body("Prenatal (80%):", { bold: true }));
children.push(bullet("Intrauterine infections (TORCH) Β· cerebral malformations Β· fetal asphyxia/stroke"));
children.push(bullet("Maternal diabetes, hypertension, thyroid disease"));
children.push(body("Perinatal (10%):", { bold: true }));
children.push(bullet("Hypoxic-ischaemic encephalopathy (HIE) Β· prematurity/low birth weight"));
children.push(bullet("Intraventricular haemorrhage Β· Hyperbilirubinaemia β kernicterus (causes DYSKINETIC CP)"));
children.push(body("Postnatal (10%):", { bold: true }));
children.push(bullet("Meningitis/encephalitis Β· traumatic brain injury Β· hypoglycaemia"));
children.push(body("~20% idiopathic; ~1/3 of idiopathic have de novo copy number variants."));
children.push(heading3("Classification"));
children.push(makeTable(
["Type","Features","Common Cause / Lesion"],
[
["Spastic (70β80%) β most common","UMN signs, exaggerated reflexes, spasticity","Corticospinal tract damage"],
[" β Diplegia","Lower limbs > upper limbs; toe-walking","Periventricular leukomalacia (premature)"],
[" β Hemiplegia","One side affected","Unilateral cortical/subcortical lesion"],
[" β Quadriplegia","All 4 limbs; most severe; intellectual disability","Diffuse cortical damage"],
["Dyskinetic / Athetoid","Involuntary writhing movements","Basal ganglia β kernicterus"],
["Ataxic","Cerebellar signs, poor coordination","Cerebellum"],
["Mixed","Features of multiple types","β"],
],
[2000, 2800, 2200]
));
children.push(heading3("Clinical Features"));
children.push(bullet("Delayed motor milestones Β· abnormal tone (spastic/hypotonic)"));
children.push(bullet("Persistence of primitive reflexes beyond normal age (Moro, ATNR)"));
children.push(bullet("Exaggerated DTRs, clonus, extensor plantar response (UMN signs)"));
children.push(bullet("Scissor gait, tip-toe walking, involuntary movements (dyskinetic type)"));
children.push(body("Associated problems (~50% of patients):", { bold: true }));
children.push(bullet("Intellectual disability Β· Epilepsy Β· Speech/language delay Β· Visual and hearing impairment"));
children.push(bullet("Feeding difficulties Β· Behavioural problems Β· Drooling"));
children.push(heading3("Investigations"));
children.push(bullet("MRI brain: periventricular leukomalacia, cortical atrophy, malformations"));
children.push(bullet("EEG if seizures Β· Hearing/vision testing Β· Developmental assessment"));
children.push(heading3("Management (Multidisciplinary Team)"));
children.push(bullet("**Physiotherapy**: prevent contractures, gait training, improve function"));
children.push(bullet("**Spasticity**: Oral/intrathecal baclofen Β· Botulinum toxin A injections (focal, e.g. equinus foot) Β· Selective dorsal rhizotomy"));
children.push(bullet("**Orthopaedic**: Serial casting Β· splints/orthoses Β· hip surveillance Β· scoliosis management Β· tendon lengthening"));
children.push(bullet("**Epilepsy**: Antiepileptic drugs as per seizure type"));
children.push(bullet("**Nutrition**: Gastrostomy tube for severe feeding difficulties"));
children.push(bullet("Speech therapy Β· occupational therapy Β· special education plan Β· communication aids"));
children.push(examTip("Key phrase: NON-PROGRESSIVE. The child may appear to worsen due to growth increasing spasticity β but the brain lesion is static."));
children.push(pageBreak());
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// 4. DUCHENNE MUSCULAR DYSTROPHY
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
children.push(heading1("4. DUCHENNE MUSCULAR DYSTROPHY (DMD)"));
children.push(heading3("Definition & Genetics"));
children.push(body("Most common inherited muscle disease. X-linked recessive disorder caused by mutations in the dystrophin gene (Xp21.2) β complete absence of dystrophin protein."));
children.push(body("Incidence: 1 in 3,500β5,000 male births. 1/3 are de novo mutations (no family history)."));
children.push(bullet("Frameshift mutations (deletions 65%, duplications 5β10%, point mutations ~25%)"));
children.push(bullet("Dystrophin links actin cytoskeleton to sarcolemma via DGC β absence β CaΒ²βΊ influx β necrosis β fatty/fibrous replacement"));
children.push(bullet("**Becker MD**: In-frame mutation β truncated but functional dystrophin β milder phenotype"));
children.push(heading3("Clinical Features β Timeline"));
children.push(makeTable(
["Age","Features"],
[
["0β2 years","Appears normal; grossly elevated CK detectable at birth"],
["2β5 years","Delayed milestones Β· frequent falls Β· difficulty climbing stairs"],
["","Gower's sign (walks hands up thighs to stand β proximal weakness)"],
["","Pseudohypertrophy of calves (fat + fibrous tissue replacement)"],
["~12 years","Loss of ambulation β wheelchair dependent"],
["Teens","Scoliosis Β· progressive respiratory insufficiency"],
["Late teens","Dilated cardiomyopathy (all patients)"],
["~20 years","Respiratory failure + cardiac failure = main causes of death"],
],
[1500, 5500]
));
children.push(bullet("Cognitive: lower IQ in ~1/3; ADHD; autism β nonprogressive"));
children.push(heading3("Investigations"));
children.push(bullet("**Serum CK: 20β100Γ normal** β elevated from birth"));
children.push(bullet("**Genetic testing (DNA analysis)**: positive in 90β95% β FIRST-LINE test"));
children.push(bullet("Muscle biopsy (if genetic test negative): necrosis, fibrosis, absent dystrophin on immunostaining"));
children.push(bullet("Echo + ECG: 6-monthly (dilated cardiomyopathy surveillance)"));
children.push(bullet("Spirometry/FVC: annual respiratory monitoring"));
children.push(heading3("Management"));
children.push(body("Corticosteroids (Mainstay):", { bold: true }));
children.push(bullet("Prednisolone 0.75 mg/kg/day OR Deflazacort 0.9 mg/kg/day β prolong ambulation 2β3 years"));
children.push(bullet("Deflazacort preferred: less weight gain; both improve respiratory function and slow scoliosis"));
children.push(body("Gene Therapy β Exon-Skipping (FDA Approved):", { bold: true }));
children.push(makeTable(
["Drug","Exon Skipped","Dose"],
[
["Eteplirsen","Exon 51","30 mg/kg IV weekly"],
["Golodirsen","Exon 53","30 mg/kg IV weekly"],
["Viltolarsen","Exon 53","80 mg/kg IV weekly"],
["Casimersen","Exon 45","30 mg/kg IV weekly"],
],
[2000, 2000, 3000]
));
children.push(body("Cardiac:", { bold: true }));
children.push(bullet("ACE inhibitors + Ξ²-blockers β start early (even pre-symptomatic) to slow myocardial fibrosis"));
children.push(body("Respiratory:", { bold: true }));
children.push(bullet("Non-invasive ventilation (BiPAP) Β· physiotherapy Β· assisted cough device"));
children.push(body("MDT includes:", { bold: true }));
children.push(bullet("Neurologist Β· cardiologist Β· pulmonologist Β· orthopaedic surgeon Β· physiotherapist Β· dietitian Β· genetic counsellor"));
children.push(examTip("CK 20β100Γ normal + Gower's sign + pseudohypertrophy of calves = classic DMD triad. Deflazacort causes less weight gain than prednisolone β common MCQ."));
children.push(pageBreak());
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// 5. NEURAL TUBE DEFECTS
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
children.push(heading1("5. NEURAL TUBE DEFECTS (NTDs)"));
children.push(heading3("Definition"));
children.push(body("Congenital malformations resulting from failure of the neural tube to close during the 3rdβ4th week of embryogenesis (days 22β28 of gestation)."));
children.push(body("Incidence: 1β10 per 1000 live births globally; ~0.6 per 1000 in USA. Incidence falling with folic acid fortification."));
children.push(heading3("Etiology / Risk Factors"));
children.push(bullet("**Folic acid deficiency** β most important modifiable risk factor"));
children.push(bullet("Teratogens: Valproic acid (5β10Γ risk) Β· carbamazepine Β· methotrexate"));
children.push(bullet("Maternal diabetes (3β4Γ risk) Β· hyperthermia in 1st trimester"));
children.push(bullet("Chromosomal: Trisomy 13, 18"));
children.push(bullet("Multifactorial genetics; recurrence risk ~2β5% after one affected child"));
children.push(heading3("Types"));
children.push(makeTable(
["Type","Description","Key Features"],
[
["Anencephaly","Failure of rostral neuropore to close β absent cerebral hemispheres","Incompatible with life. Maternal AFP very elevated. US diagnosis possible in T1."],
["Encephalocele","Brain/meninges herniate through skull defect","Occipital most common. Prognosis depends on neural tissue in sac."],
["Spina bifida occulta","Vertebral arch defect only; skin intact","Usually asymptomatic. Hairy patch, sacral dimple, lipoma may mark site."],
["Meningocele","Meninges + CSF herniate; NO neural tissue","Fewer deficits; surgically repairable; good prognosis."],
["Myelomeningocele","Spinal cord + meninges herniate through posterior defect","Most severe; paraplegia, incontinence, Chiari II, hydrocephalus (~80%)."],
["Myelocele","Open midline lesion; neural elements flush with skin","Very severe; highest risk of infection."],
],
[1800, 2500, 2700]
));
children.push(heading3("Myelomeningocele β Key Associations"));
children.push(bullet("Paraplegia/paraparesis (level depends on lesion site)"));
children.push(bullet("Neurogenic bowel and bladder β clean intermittent catheterisation"));
children.push(bullet("**Chiari II malformation** (hindbrain herniation) β stridor, apnoea, swallowing difficulty"));
children.push(bullet("**Hydrocephalus (~80%)** β ventriculoperitoneal (VP) shunt"));
children.push(bullet("Club foot, hip dislocation, scoliosis"));
children.push(bullet("Tethered cord syndrome β progressive neurological deterioration"));
children.push(heading3("Investigations"));
children.push(bullet("Antenatal: Maternal serum AFP (elevated in open NTDs) at 15β18 weeks"));
children.push(bullet("Detailed US at 18β20 weeks Β· Amniocentesis (AFP + acetylcholinesterase in amniotic fluid)"));
children.push(bullet("Postnatal: MRI spine + brain Β· Urodynamic studies Β· Renal US"));
children.push(heading3("Management"));
children.push(body("Prevention β HIGHEST YIELD:", { bold: true }));
children.push(bullet("Folic acid 400 mcg/day for ALL women planning pregnancy (start 3 months before conception)"));
children.push(bullet("Folic acid 5 mg/day (high dose) if previous NTD pregnancy or on anticonvulsants"));
children.push(bullet("Reduces NTD risk by 50β70%"));
children.push(body("Myelomeningocele β Postnatal:", { bold: true }));
children.push(bullet("Surgical closure within 24β72 hours of birth (prevents infection)"));
children.push(bullet("VP shunt for hydrocephalus Β· CIC for neurogenic bladder"));
children.push(bullet("Physiotherapy, orthotics, bowel management programme"));
children.push(body("Fetal Surgery (MOMS Trial):", { bold: true }));
children.push(bullet("In-utero repair at 19β26 weeks gestation"));
children.push(bullet("Reduces need for VP shunt Β· improves motor outcomes Β· risk of premature birth"));
children.push(examTip("Folic acid = PREVENTION. Dose: 400 mcg standard; 5 mg high-risk. Valproic acid = the anticonvulsant most strongly linked to NTDs. VP shunt complication = shunt malfunction/infection."));
children.push(pageBreak());
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// 6. BRONCHIAL ASTHMA
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
children.push(heading1("6. BRONCHIAL ASTHMA"));
children.push(heading3("Definition"));
children.push(body("A chronic inflammatory disorder of the airways characterised by airway hyperresponsiveness (AHR), variable and reversible airflow obstruction, and symptoms of episodic wheeze, breathlessness, chest tightness, and cough (worse at night and early morning)."));
children.push(heading3("Pathophysiology"));
children.push(bullet("Trigger β IgE-mediated mast cell degranulation β histamine, leukotrienes β bronchospasm (early phase, 0β1 h)"));
children.push(bullet("Late phase (2β8 h): Eosinophil/T-cell infiltration β sustained inflammation β remodelling"));
children.push(bullet("Airway remodelling: subepithelial fibrosis Β· smooth muscle hypertrophy Β· goblet cell hyperplasia Β· mucus plugging β fixed obstruction"));
children.push(heading3("Risk Factors / Triggers"));
children.push(bullet("Atopy (eczema, allergic rhinitis), family history of asthma"));
children.push(bullet("Allergens: house dust mite, pet dander, cockroach, mould, pollen"));
children.push(bullet("Viral URTIs (RSV, rhinovirus) Β· exercise Β· cold air Β· tobacco smoke"));
children.push(bullet("GERD, obesity, emotional stress, aspirin/NSAIDs (aspirin-sensitive asthma)"));
children.push(heading3("Acute Severity Assessment"));
children.push(makeTable(
["Feature","Mild","Moderate","Severe","Life-Threatening"],
[
["SpOβ",">95%","92β95%","<92%","<92%"],
["Speech","Sentences","Phrases","Words","Cannot speak"],
["Resp. rate","Normal","β","ββ","βββ"],
["Heart rate","Normal","β","ββ","Bradycardia"],
["Air entry","Normal","Decreased","Markedly β","Silent chest"],
["PEFR",">75%","50β75%","33β50%","<33% (worst)"],
["Consciousness","Normal","Normal","Agitated","Drowsy/coma"],
],
[1700, 1200, 1300, 1300, 1500]
));
children.push(heading3("Investigations"));
children.push(bullet("Spirometry: FEVβ/FVC <0.7; >12% reversibility after bronchodilator"));
children.push(bullet("PEFR measurement and diurnal variability >20%"));
children.push(bullet("CXR: hyperinflation (acute); exclude pneumothorax, consolidation"));
children.push(bullet("Skin prick test / RAST for allergen identification"));
children.push(bullet("FeNO (elevated in eosinophilic asthma) Β· Blood eosinophilia Β· Total IgE"));
children.push(heading3("Management β Step-Up (BTS/GINA)"));
children.push(makeTable(
["Step","Treatment"],
[
["Step 1","SABA as needed (Salbutamol MDI)"],
["Step 2","Add low-dose ICS (Beclometasone / Budesonide)"],
["Step 3","ICS + LABA (Formoterol) OR increase ICS dose"],
["Step 4","Medium-high ICS + LABA + LTRA (Montelukast)"],
["Step 5","Add oral corticosteroid OR biologic: Omalizumab (IgE-mediated) / Mepolizumab (eosinophilic)"],
],
[800, 6200]
));
children.push(body("Acute Severe Attack β Hospital Protocol:", { bold: true }));
children.push(bullet("Oβ to maintain SpOβ >94%"));
children.push(bullet("Nebulised Salbutamol (2.5 mg <5 yrs; 5 mg β₯5 yrs) every 20 min Γ 3"));
children.push(bullet("Add nebulised Ipratropium bromide 0.25 mg"));
children.push(bullet("IV/oral Prednisolone 1β2 mg/kg/day (max 40 mg) Γ 3β5 days"));
children.push(bullet("IV Magnesium sulphate 25β75 mg/kg (max 2 g) over 20 min β if no response"));
children.push(bullet("IV Aminophylline loading then infusion (specialist setting)"));
children.push(body("Devices:", { bold: true }));
children.push(bullet("<2 years: MDI + spacer + face mask Β· 2β5 years: MDI + spacer + mouthpiece Β· >5 years: MDI + spacer or DPI"));
children.push(examTip("Silent chest in asthma = AIR ENTRY SO POOR that wheeze disappears β life-threatening β intubation may be needed. PEFR <33% = severe."));
children.push(pageBreak());
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// 7. PNEUMONIA
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
children.push(heading1("7. PNEUMONIA"));
children.push(heading3("Definition"));
children.push(body("Inflammation of the lung parenchyma (alveoli + interstitium) due to an infectious agent. Classified as typical (bacterial) or atypical (Mycoplasma, Chlamydia, viruses) and as community-acquired (CAP) or hospital-acquired (HAP)."));
children.push(heading3("Etiology by Age β HIGH YIELD"));
children.push(makeTable(
["Age","Common Pathogens"],
[
["Neonates","Group B Streptococcus Β· E. coli Β· Listeria"],
["1β3 months","Chlamydia trachomatis (afebrile pneumonitis) Β· RSV"],
["3 months β 5 years","RSV Β· Parainfluenza Β· Adenovirus (viral most common) Β· S. pneumoniae (bacterial)"],
["5β16 years","Mycoplasma pneumoniae (most common school-age) Β· S. pneumoniae Β· C. pneumoniae"],
["Immunocompromised","PCP (P. jirovecii) Β· CMV Β· Fungi Β· Gram-negative bacilli"],
],
[1800, 5200]
));
children.push(heading3("Clinical Features"));
children.push(bullet("Fever Β· productive cough Β· tachypnoea Β· dyspnoea Β· pleuritic chest pain"));
children.push(bullet("Signs: dullness to percussion Β· bronchial breathing Β· crepitations Β· β vocal resonance Β· pleural rub"));
children.push(body("WHO Tachypnoea Thresholds (tachypnoea = most sensitive sign):", { bold: true }));
children.push(bullet("RR >60/min (<2 months) Β· RR >50/min (2β12 months) Β· RR >40/min (1β5 years)"));
children.push(body("WHO Severity:", { bold: true }));
children.push(bullet("Fast breathing only β Pneumonia (outpatient treatment)"));
children.push(bullet("Chest indrawing β Severe pneumonia (admit)"));
children.push(bullet("Cyanosis / can't drink / altered consciousness / convulsions β Very severe (emergency)"));
children.push(heading3("Investigations"));
children.push(bullet("CXR: lobar consolidation (typical) Β· diffuse interstitial (atypical/viral) Β· pleural effusion"));
children.push(bullet("CBC: leukocytosis + neutrophilia (bacterial) Β· lymphocytosis (viral)"));
children.push(bullet("CRP, procalcitonin Β· Blood culture (positive ~10β15%) Β· Sputum culture"));
children.push(bullet("Nasopharyngeal swab PCR (RSV, influenza, Mycoplasma) Β· Urine antigen (S. pneumoniae, Legionella)"));
children.push(heading3("Management"));
children.push(bullet("**Mild CAP (outpatient)**: Amoxicillin 40β90 mg/kg/day PO Γ 5β7 days"));
children.push(bullet(" + Azithromycin/Clarithromycin if atypical suspected (school-age)"));
children.push(bullet("**Moderate-Severe (inpatient)**: IV Cefuroxime OR IV Ceftriaxone Β± IV Azithromycin"));
children.push(bullet(" Neonates: IV Ampicillin + Gentamicin"));
children.push(bullet("**Empyema/effusion**: IV Ceftriaxone + Clindamycin; chest drain (pH <7.2 or frank pus); VATS for loculated collections"));
children.push(bullet("Supportive: oxygen, IV fluids, fever control, chest physiotherapy"));
children.push(bullet("Prevention: PCV13 vaccine Β· Influenza vaccine Β· Hib vaccine"));
children.push(examTip("Tachypnoea is the SINGLE most sensitive clinical sign of pneumonia in children β use WHO age-specific thresholds. Atypical pneumonia (Mycoplasma) = school-age child with gradual onset, headache, mild fever, bilateral interstitial shadowing."));
children.push(pageBreak());
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// 8. ACUTE BRONCHIOLITIS
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
children.push(heading1("8. ACUTE BRONCHIOLITIS"));
children.push(heading3("Definition"));
children.push(body("A viral inflammatory disease of the bronchioles β the MOST COMMON lower respiratory tract infection (LRTI) in infants under 2 years of age. Characterised by wheeze, crackles, and respiratory distress following a prodrome of URTI."));
children.push(body("RSV is responsible for 70β80% of cases. Other causes: Parainfluenza, Rhinovirus, Adenovirus, Metapneumovirus, Influenza."));
children.push(body("Peak age: 2β6 months. Peak season: winter/autumn. 2β3% of infants hospitalised annually."));
children.push(heading3("Pathophysiology"));
children.push(bullet("Virus infects bronchiolar epithelium β necrosis of ciliated epithelium β inflammation, oedema, mucus plugging"));
children.push(bullet("β Partial airway obstruction β air trapping β V/Q mismatch β hypoxia"));
children.push(heading3("Clinical Features"));
children.push(bullet("Prodrome 2β3 days: coryzal symptoms (runny nose, mild fever, mild cough)"));
children.push(bullet("Progressive: worsening cough, tachypnoea, feeding difficulty"));
children.push(bullet("Expiratory wheeze (low-pitched, polyphonic)"));
children.push(bullet("Hyperinflated chest Β· subcostal/intercostal retractions Β· nasal flaring"));
children.push(bullet("Auscultation: crackles + wheeze (inspiratory and expiratory)"));
children.push(body("Severity:", { bold: true }));
children.push(makeTable(
["Severity","SpOβ","Feeding","Retractions","Apneas"],
[
["Mild",">95%","Normal","None","No"],
["Moderate","92β95%","<50% normal","Mildβmoderate","No"],
["Severe","<92%","Not feeding","Severe","Yes"],
],
[1500, 1500, 1800, 1800, 1400]
));
children.push(heading3("Investigations"));
children.push(bullet("Clinical diagnosis β investigations usually not needed"));
children.push(bullet("NPA for RSV PCR/antigen (confirms diagnosis, guides cohorting)"));
children.push(bullet("CXR: hyperinflation, perihilar infiltrates, atelectasis (NOT routine β risk of overdiagnosis)"));
children.push(bullet("ABG in severe cases: hypoxia, hypercapnia = impending respiratory failure"));
children.push(heading3("Management β Mainly Supportive"));
children.push(examTip("Bronchodilators and corticosteroids are NOT routinely recommended in bronchiolitis. This is the #1 most-tested fact in this topic."));
children.push(bullet("Oβ to maintain SpOβ β₯92β94%"));
children.push(bullet("NG feeds if unable to bottle/breastfeed; IV fluids if severe respiratory distress"));
children.push(bullet("High-Flow Nasal Cannula (HFNC) β increasingly used; reduces work of breathing"));
children.push(bullet("CPAP / mechanical ventilation for respiratory failure"));
children.push(bullet("Salbutamol β NOT routinely recommended (trial once; continue ONLY if clear response)"));
children.push(bullet("Corticosteroids β NOT effective"));
children.push(bullet("Antibiotics β only if secondary bacterial infection suspected"));
children.push(body("Prophylaxis:", { bold: true }));
children.push(bullet("**Palivizumab** (anti-RSV monoclonal Ab): monthly IM OctβMarch for: preterm <29 weeks (<1 yr), haemodynamically significant CHD, chronic lung disease"));
children.push(bullet("**Nirsevimab (Beyfortus)**: new long-acting monoclonal Ab β single dose β for all infants entering their first RSV season"));
children.push(pageBreak());
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// 9. ACUTE EPIGLOTTITIS
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
children.push(heading1("9. ACUTE EPIGLOTTITIS"));
children.push(heading3("Definition"));
children.push(body("Life-threatening bacterial infection of the epiglottis and surrounding supraglottic structures causing rapid, progressive upper airway obstruction. A true pediatric emergency."));
children.push(heading3("Etiology"));
children.push(bullet("Classic: Haemophilus influenzae type b (Hib) β now RARE due to Hib vaccination"));
children.push(bullet("Others: S. pyogenes Β· S. pneumoniae Β· S. aureus Β· Klebsiella"));
children.push(bullet("Post-Hib vaccine: disease predominantly affects adults now"));
children.push(bullet("Classic age in children: 2β6 years"));
children.push(heading3("Clinical Features β The 4 D's"));
children.push(makeTable(
["Sign","Description"],
[
["Drooling","Cannot swallow secretions β pathognomonic"],
["Dysphagia","Severe sore throat, painful swallowing"],
["Dysphonia","Muffled / 'hot potato' voice"],
["Dyspnea","Progressive inspiratory stridor, respiratory distress"],
["Bonus: Toxic appearance","High fever >39Β°C, very unwell, TRIPOD POSITION (sitting forward, neck extended, mouth open)"],
["No barking cough","Distinguishes from croup"],
],
[2000, 5000]
));
children.push(heading3("Epiglottitis vs. Croup β EXAM COMPARISON TABLE"));
children.push(makeTable(
["Feature","Epiglottitis","Croup (LTB)"],
[
["Age","2β6 years","6 months β 3 years"],
["Onset","Sudden (hours)","Gradual (2β3 days)"],
["Causative agent","H. influenzae type b","Parainfluenza virus type 1"],
["Fever","High (>39Β°C), toxic","Low-moderate"],
["Cough","Absent or soft","Barking (seal-like)"],
["Voice","Muffled ('hot potato')","Hoarse"],
["Drooling","Yes","No"],
["Preferred position","Tripod (leaning forward)","Any"],
["X-ray sign","Thumb sign (lateral neck)","Steeple sign (AP neck)"],
["Treatment","Emergency intubation in OR + IV antibiotics","Dexamethasone + nebulised epinephrine"],
],
[2200, 2700, 2100]
));
children.push(heading3("Management β AIRWAY IS PRIORITY"));
children.push(examTip("Do NOT examine the throat of a child with suspected epiglottitis β this can trigger complete obstruction and cardiac arrest."));
children.push(bullet("Do NOT leave child alone Β· do NOT upset child Β· allow tripod position"));
children.push(bullet("Alert senior anaesthesiologist + ENT surgeon IMMEDIATELY"));
children.push(bullet("Inhalational induction (sevoflurane + Oβ) in OR with child sitting upright"));
children.push(bullet("Endotracheal intubation (one size smaller than usual) β have tracheostomy set ready"));
children.push(bullet("After airway secured: Blood cultures β IV Cefotaxime or Ceftriaxone Γ 7β10 days"));
children.push(bullet("Extubate after 24β48 h when swelling resolves (confirmed by direct laryngoscopy)"));
children.push(bullet("Prevention: Hib vaccine (part of routine immunisation schedule)"));
children.push(pageBreak());
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// 10. CROUP
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
children.push(heading1("10. CROUP (Laryngotracheobronchitis β LTB)"));
children.push(heading3("Definition"));
children.push(body("A viral infection of the subglottic airway (larynx, trachea, bronchi) causing the characteristic barking cough, hoarse voice, and inspiratory stridor in young children."));
children.push(body("Age: 6 months β 3 years (peak ~2 years). Most common cause of infectious stridor in children. More common in boys. Peak season: autumn/early winter."));
children.push(body("Cause: Parainfluenza virus type 1 (75%). Also: Parainfluenza 2/3, RSV, Influenza, Adenovirus."));
children.push(heading3("Pathophysiology"));
children.push(bullet("Virus infects laryngotracheal mucosa β subglottic oedema β narrowing at cricoid level (narrowest point of paediatric airway) β turbulent airflow β barking cough + inspiratory stridor"));
children.push(heading3("Clinical Features"));
children.push(bullet("Prodrome 1β3 days: coryzal symptoms + low-grade fever"));
children.push(bullet("**Barking ('seal-like') cough** β pathognomonic"));
children.push(bullet("Inspiratory stridor (at rest in moderate-severe cases)"));
children.push(bullet("Hoarse voice Β· tachypnoea Β· accessory muscle use in moderate-severe"));
children.push(bullet("Worse at night (circadian cortisol variation; horizontal posture increases oedema)"));
children.push(heading3("Westley Croup Score"));
children.push(makeTable(
["Parameter","Scoring"],
[
["Stridor","None=0 Β· With agitation=1 Β· At rest=2"],
["Retractions","None=0 Β· Mild=1 Β· Moderate=2 Β· Severe=3"],
["Air entry","Normal=0 Β· Decreased=1 Β· Markedly decreased=2"],
["Cyanosis","None=0 Β· With agitation=4 Β· At rest=5"],
["Consciousness","Normal=0 Β· Altered=5"],
],
[2500, 4500]
));
children.push(bullet("Mild (<2): Barking cough, no stridor at rest, no/mild retractions"));
children.push(bullet("Moderate (3β7): Stridor at rest, retractions, no agitation"));
children.push(bullet("Severe (β₯8): Marked stridor + severe retractions + agitation / β consciousness"));
children.push(heading3("Investigations"));
children.push(bullet("Mainly clinical diagnosis"));
children.push(bullet("Neck X-ray (AP view) if doubt: STEEPLE SIGN (subglottic narrowing like a church steeple / pencil point)"));
children.push(heading3("Management"));
children.push(body("Mild:", { bold: true }));
children.push(bullet("Single dose oral Dexamethasone 0.15β0.6 mg/kg OR oral Prednisolone 1 mg/kg"));
children.push(bullet("Reassurance Β· keep child calm Β· outpatient"));
children.push(body("Moderate:", { bold: true }));
children.push(bullet("Dexamethasone 0.6 mg/kg IM/oral (single dose)"));
children.push(bullet("Nebulised racemic epinephrine (0.5 ml/kg of 2.25%) OR L-epinephrine (5 ml of 1:1000 in NS)"));
children.push(bullet("Observe 2β4 h post-epinephrine (rebound oedema risk after 2β3 h)"));
children.push(bullet("Humidified Oβ if SpOβ low Β· admit for monitoring"));
children.push(body("Severe:", { bold: true }));
children.push(bullet("Nebulised epinephrine + IV/IM Dexamethasone"));
children.push(bullet("Heliox (He:Oβ 70:30) to reduce airway resistance"));
children.push(bullet("ICU admission Β· intubate if impending respiratory failure (tube 0.5β1 mm smaller than usual)"));
children.push(examTip("Steam/mist therapy = NOT evidence-based despite traditional use. Dexamethasone for ALL grades of croup. Epinephrine provides temporary relief only β must observe for rebound."));
children.push(pageBreak());
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// 11. CYSTIC FIBROSIS
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
children.push(heading1("11. CYSTIC FIBROSIS"));
children.push(heading3("Definition & Genetics"));
children.push(body("Most common lethal autosomal recessive disorder in Caucasian populations. Caused by mutations in the CFTR gene (chromosome 7q31). >1900 mutations known; most common is ΞF508 (deletion of Phe at codon 508) present in ~70% of CF alleles."));
children.push(body("Incidence: 1 in 2,500β3,200 Caucasian live births. Carrier frequency: 1 in 25 Caucasians."));
children.push(heading3("Pathophysiology"));
children.push(bullet("CFTR = Clβ» channel on epithelial cells. Defective CFTR β impaired Clβ» secretion + NaβΊ hyperabsorption β thick, viscous mucus"));
children.push(bullet("**Lungs**: Mucus plugging β chronic infection (S. aureus in childhood β Pseudomonas aeruginosa in older patients) β neutrophilic inflammation β bronchiectasis β respiratory failure"));
children.push(bullet("**Pancreas**: Ductal obstruction β autodigestion β exocrine insufficiency (malabsorption) + endocrine (CFRD)"));
children.push(bullet("**Sweat glands**: Fail to reabsorb Clβ» β excessive NaCl in sweat (salty taste β classic) β sweat test positive"));
children.push(bullet("**Vas deferens**: Congenital bilateral absence β male infertility (azoospermia) in 99%"));
children.push(heading3("Clinical Features by System"));
children.push(makeTable(
["System","Manifestations"],
[
["Respiratory","Chronic productive cough Β· recurrent chest infections (S. aureus β Pseudomonas) Β· wheeze Β· digital clubbing Β· barrel chest Β· nasal polyps Β· sinusitis"],
["GI / Pancreatic","Meconium ileus at birth (10β15% β pathognomonic) Β· failure to thrive Β· steatorrhoea Β· fat-soluble vitamin deficiency (A, D, E, K) Β· rectal prolapse Β· DIOS"],
["Endocrine","CF-related diabetes (CFRD) in ~20β30% adults"],
["Liver","Focal biliary cirrhosis β portal hypertension Β· gallstones"],
["Reproductive","Male infertility (azoospermia β bilateral absent vas deferens in 99%)"],
["Other","Salty sweat Β· osteoporosis Β· arthropathy Β· electrolyte depletion (Bartter-like in infants)"],
],
[1800, 5200]
));
children.push(heading3("Diagnosis"));
children.push(body("Gold Standard: Sweat Test (Gibson-Cooke method):", { bold: true }));
children.push(makeTable(
["Sweat Chloride","Interpretation"],
[
[">60 mmol/L","Positive (diagnostic of CF)"],
["30β60 mmol/L","Borderline (repeat + CFTR mutation analysis)"],
["<30 mmol/L","Negative"],
],
[2500, 4500]
));
children.push(bullet("Newborn screening: Elevated immunoreactive trypsinogen (IRT) β CFTR mutation analysis"));
children.push(bullet("CFTR mutation panel (32-panel detects >90%) Β· Full gene sequencing for rare mutations"));
children.push(bullet("CXR/CT chest: hyperinflation, bronchiectasis, mucus plugging"));
children.push(bullet("Sputum culture (bacteria + sensitivities) Β· Spirometry (FEVβ decline monitors progression)"));
children.push(bullet("OGTT / HbA1c annually from age 10 for CFRD"));
children.push(heading3("Management"));
children.push(body("1. Airway Clearance:", { bold: true }));
children.push(bullet("ACT (Airway Clearance Therapy) twice daily β chest physio, oscillating PEP devices"));
children.push(bullet("Hypertonic saline nebulisation (7%) β improves mucociliary clearance"));
children.push(bullet("Dornase alfa (DNase / Pulmozyme) β breaks down extracellular DNA, improves FEVβ"));
children.push(body("2. Anti-infective:", { bold: true }));
children.push(bullet("Inhaled tobramycin OR aztreonam (alternating months) for chronic Pseudomonas aeruginosa"));
children.push(bullet("IV antibiotics (2β3 week courses) for pulmonary exacerbations"));
children.push(bullet("Prophylactic flucloxacillin in childhood (for S. aureus)"));
children.push(bullet("Azithromycin 3Γ/week β anti-inflammatory + anti-biofilm properties"));
children.push(body("3. CFTR Modulators β GAME-CHANGING THERAPY:", { bold: true }));
children.push(makeTable(
["Drug","Mechanism","Indication"],
[
["Ivacaftor (Kalydeco)","Potentiator β opens defective channel","Class III gating mutations (e.g. G551D)"],
["Lumacaftor/Ivacaftor (Orkambi)","Corrector + potentiator","F508del homozygous"],
["Tezacaftor/Ivacaftor (Symdeko)","Corrector + potentiator","F508del (1 or 2 copies)"],
["Elexacaftor/Tezacaftor/Ivacaftor (Kaftrio/Trikafta)","Triple: correctorΓ2 + potentiator","F508del β₯1 copy β MOST EFFECTIVE; approved β₯2 years old"],
],
[2200, 2200, 2600]
));
children.push(body("4. Nutrition:", { bold: true }));
children.push(bullet("High calorie, high protein diet (120β150% of RDA for age)"));
children.push(bullet("Pancreatic enzyme replacement therapy (PERT) with every meal β Creon"));
children.push(bullet("Fat-soluble vitamins A, D, E, K supplementation"));
children.push(bullet("Salt supplements especially in hot weather and for infants"));
children.push(body("5. Other:", { bold: true }));
children.push(bullet("Bilateral sequential lung transplantation for end-stage disease (FEVβ <30%)"));
children.push(bullet("Insulin therapy for CFRD Β· Ursodeoxycholic acid for liver disease"));
children.push(examTip("ΞF508 = most common mutation (70%). Sweat Clβ» >60 = diagnostic. Kaftrio/Trikafta = triple modulator for ΞF508 β most effective therapy, dramatically improves lung function and survival."));
children.push(pageBreak());
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// QUICK REFERENCE β SUMMARY TABLES
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
children.push(heading1("QUICK REFERENCE β EXAM SUMMARY"));
children.push(heading2("Key Numbers to Memorise"));
children.push(makeTable(
["Topic","Key Number / Fact"],
[
["Febrile seizures β age range","3 months β 6 years"],
["Febrile seizures β prevalence","2β5% of children"],
["Simple febrile seizure duration","<15 minutes"],
["DMD β incidence","1 in 3,500β5,000 male births"],
["DMD β serum CK","20β100Γ normal"],
["CF β incidence (Caucasian)","1 in 2,500β3,200"],
["CF β sweat Clβ» diagnostic cut-off",">60 mmol/L"],
["NTD prevention (standard)","Folic acid 400 mcg/day"],
["NTD prevention (high-risk)","Folic acid 5 mg/day"],
["Myelomeningocele + hydrocephalus","~80% require VP shunt"],
["Croup β age peak","6 months β 3 years (peak 2 yrs)"],
["Epiglottitis β age peak","2β6 years"],
["Meningitis dexamethasone dose","0.15 mg/kg 6-hourly Γ 4 days"],
],
[3500, 3500]
));
children.push(spacer());
children.push(heading2("Causative Organisms β ONE-LINER TABLE"));
children.push(makeTable(
["Condition","Causative Agent"],
[
["Croup","Parainfluenza virus type 1"],
["Epiglottitis","H. influenzae type b (now mainly adults)"],
["Bronchiolitis","RSV (70β80%)"],
["Pneumonia β infant (viral)","RSV, Parainfluenza"],
["Pneumonia β school-age (atypical)","Mycoplasma pneumoniae"],
["Pneumonia β all ages (bacterial)","Streptococcus pneumoniae"],
["Meningitis β children","S. pneumoniae, N. meningitidis"],
["Meningitis β neonates","Group B Streptococcus, E. coli, Listeria"],
],
[3000, 4000]
));
children.push(spacer());
children.push(heading2("X-Ray Signs"));
children.push(makeTable(
["Condition","X-Ray Sign"],
[
["Croup","Steeple sign (AP neck β subglottic narrowing)"],
["Epiglottitis","Thumb sign (lateral neck β enlarged epiglottis)"],
["Bronchiolitis","Hyperinflation, air trapping, perihilar infiltrates"],
["Typical pneumonia","Lobar/segmental consolidation"],
["Atypical pneumonia","Diffuse bilateral interstitial shadowing"],
["Cystic fibrosis","Bronchiectasis, hyperinflation, mucus plugging"],
],
[3000, 4000]
));
children.push(spacer());
children.push(heading2("Treatments NOT to Forget"));
children.push(makeTable(
["Condition","Must-Know Treatment Point"],
[
["Meningitis","Dexamethasone BEFORE/WITH first antibiotic dose"],
["Febrile seizures","No daily AED; no antipyretics to prevent recurrence"],
["Cerebral Palsy","Botulinum toxin A for focal spasticity; non-progressive"],
["DMD","Deflazacort preferred over prednisolone (less weight gain)"],
["NTDs","Folic acid 5 mg pre-conception for high-risk women"],
["Asthma (acute severe)","IV Magnesium sulphate if no response to SABA + steroids"],
["Bronchiolitis","Supportive ONLY β no steroids, no routine bronchodilators"],
["Epiglottitis","NO throat exam; intubate in OR under anaesthesia"],
["Croup","Dexamethasone for ALL grades; epinephrine for moderate-severe"],
["Cystic Fibrosis","Kaftrio (Elexacaftor/Tezacaftor/Ivacaftor) for ΞF508"],
],
[3000, 4000]
));
children.push(spacer());
children.push(new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: pt(20), after: pt(10) },
children: [new TextRun({ text: "Good luck in your examinations!", bold: true, size: pt(14), color: TEAL, font: "Calibri", italics: true })],
}));
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// BUILD DOCUMENT
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
const doc = new Document({
creator: "Orris Medical Notes",
title: "Final Year Pediatrics Exam Notes",
description: "Distinction-level notes covering Neurology and Pulmonology topics",
styles: {
default: {
document: {
run: { font: "Calibri", size: pt(11) },
},
},
},
sections: [{
properties: {
page: {
margin: { top: 720, bottom: 720, left: 900, right: 900 },
},
},
headers: {
default: new Header({
children: [new Paragraph({
alignment: AlignmentType.RIGHT,
children: [new TextRun({ text: "Final Year Pediatrics | Distinction Notes", size: pt(9), color: "888888", font: "Calibri" })],
})],
}),
},
footers: {
default: new Footer({
children: [new Paragraph({
alignment: AlignmentType.CENTER,
children: [
new TextRun({ text: "Page ", size: pt(9), color: "888888", font: "Calibri" }),
new TextRun({ children: [PageNumber.CURRENT], size: pt(9), color: "888888", font: "Calibri" }),
new TextRun({ text: " | Nelson & OP Ghai", size: pt(9), color: "888888", font: "Calibri" }),
],
})],
}),
},
children,
}],
});
Packer.toBuffer(doc).then(buffer => {
fs.writeFileSync("/home/daytona/workspace/paeds-notes/Pediatrics_Exam_Notes.docx", buffer);
console.log("Done. Saved to Pediatrics_Exam_Notes.docx");
}).catch(err => {
console.error("Error:", err);
process.exit(1);
});