Make a ppt presentation of chronic Rhinosinusitis definition aetiology pathogenesis investigation radiology management complications with images
chronic rhinosinusitis CT scan coronal view medical image free
mkdir -p /home/daytona/workspace/crs-presentation
~/crs-presentation/build.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
// ─── color palette ────────────────────────────────────────────────────────────
const NAVY = "1A2B5F"; // dominant dark
const TEAL = "0E7C7B"; // accent / header bar
const CREAM = "F5F0E8"; // slide backgrounds
const WHITE = "FFFFFF";
const ORANGE = "E07B39"; // highlight accent
const LIGHT = "D6EAF8"; // pale blue for boxes
const GREY = "6B7280"; // body text
const DARK = "1E293B"; // main body text
// ─── helpers ─────────────────────────────────────────────────────────────────
function titleSlide(pres, title, subtitle) {
const s = pres.addSlide();
// Full-bleed dark background
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: NAVY } });
// accent bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 3.8, w: "100%", h: 0.08, fill: { color: ORANGE } });
s.addText(title, { x: 0.6, y: 1.2, w: 8.8, h: 1.8, fontSize: 38, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle" });
if (subtitle) s.addText(subtitle, { x: 0.6, y: 3.0, w: 8.8, h: 0.7, fontSize: 18, color: "B0C4DE", fontFace: "Calibri", align: "center" });
s.addText("Cummings Otolaryngology | Scott-Brown's ENT | Goldman-Cecil Medicine", { x: 0, y: 5.1, w: "100%", h: 0.35, fontSize: 10, color: "7F8C8D", align: "center" });
return s;
}
function sectionHeader(pres, title, icon) {
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: TEAL } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 4.8, w: "100%", h: 0.825, fill: { color: NAVY } });
s.addText((icon || "") + " " + title, { x: 0.5, y: 1.8, w: 9, h: 1.5, fontSize: 36, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle" });
return s;
}
function contentSlide(pres, heading, bullets, opts = {}) {
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: CREAM } });
// header bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: NAVY } });
s.addText(heading, { x: 0.25, y: 0, w: 9.5, h: 0.75, fontSize: 20, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0 });
const items = bullets.map((b, i) => {
const isNested = b.startsWith(" ");
return {
text: b.replace(/^ /, ""),
options: {
bullet: { indent: isNested ? 30 : 0, characterCode: isNested ? "2013" : "2022" },
fontSize: isNested ? 14 : 16,
color: isNested ? GREY : DARK,
bold: b.startsWith("**"),
breakLine: i < bullets.length - 1
}
};
});
s.addText(items, { x: 0.35, y: 0.88, w: opts.narrow ? 5.2 : 9.3, h: 4.55, fontFace: "Calibri", valign: "top" });
return s;
}
function twoColSlide(pres, heading, leftBullets, rightBullets, leftTitle, rightTitle) {
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: CREAM } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: NAVY } });
s.addText(heading, { x: 0.25, y: 0, w: 9.5, h: 0.75, fontSize: 20, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0 });
// left column label
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.85, w: 4.5, h: 0.38, fill: { color: TEAL }, line: { color: TEAL } });
s.addText(leftTitle, { x: 0.2, y: 0.85, w: 4.5, h: 0.38, fontSize: 13, bold: true, color: WHITE, align: "center", fontFace: "Calibri" });
// right column label
s.addShape(pres.ShapeType.rect, { x: 5.2, y: 0.85, w: 4.5, h: 0.38, fill: { color: ORANGE }, line: { color: ORANGE } });
s.addText(rightTitle, { x: 5.2, y: 0.85, w: 4.5, h: 0.38, fontSize: 13, bold: true, color: WHITE, align: "center", fontFace: "Calibri" });
// bullets
const makeItems = (arr) => arr.map((b, i) => ({
text: b.replace(/^ /, ""),
options: { bullet: { indent: b.startsWith(" ") ? 20 : 0 }, fontSize: b.startsWith(" ") ? 13 : 15, color: DARK, breakLine: i < arr.length - 1 }
}));
s.addText(makeItems(leftBullets), { x: 0.2, y: 1.3, w: 4.5, h: 3.9, fontFace: "Calibri", valign: "top" });
s.addText(makeItems(rightBullets), { x: 5.2, y: 1.3, w: 4.5, h: 3.9, fontFace: "Calibri", valign: "top" });
return s;
}
function imageSlide(pres, heading, imgBase64, caption, bullets) {
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: CREAM } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: NAVY } });
s.addText(heading, { x: 0.25, y: 0, w: 9.5, h: 0.75, fontSize: 20, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0 });
// image on left
s.addImage({ data: imgBase64, x: 0.2, y: 0.88, w: 4.6, h: 3.6 });
s.addText(caption, { x: 0.2, y: 4.5, w: 4.6, h: 0.8, fontSize: 11, color: GREY, italic: true, align: "center", fontFace: "Calibri" });
// bullets right
if (bullets && bullets.length) {
const items = bullets.map((b, i) => ({
text: b,
options: { bullet: true, fontSize: 14, color: DARK, breakLine: i < bullets.length - 1 }
}));
s.addText(items, { x: 5.1, y: 0.95, w: 4.7, h: 4.4, fontFace: "Calibri", valign: "top" });
}
return s;
}
// ─── fetch images ─────────────────────────────────────────────────────────────
const imgUrls = [
"https://cdn.orris.care/cdss_images/c3cf7f2385121f2b50bf9ec956afabefe2637ce1f876a08ede4a4b4090d81a64.png", // 0 aetiology diagram
"https://cdn.orris.care/cdss_images/0265946a95a4d68de5bc4588cd7727821b4ba0f3489ea8ed0ef6a118a1d5c9d8.png", // 1 OMU CT coronal
"https://www.researchgate.net/publication/309606463/figure/fig3/AS:560746891313154@1510703885852/Chronic-rhinosinusitis-without-nasal-polyps-CRSsNP-Coronal-CT-scan-of-CRSsNP-limited.png", // 2 CRS CT coronal
"https://prod-images-static.radiopaedia.org/images/45051961/6353623a2ecf01d0c5913dd20756d978a7f0db348eb60708e6eaea261fe73d71_gallery.jpeg", // 3 radiopaedia CRS
"https://cdn.orris.care/cdss_images/9c2e0cd5a07615c44bd81f318a32e56d76a5633fe91f08f8e27eb247d4d4dd0e.png", // 4 ESS indications box
];
console.log("Fetching images...");
let imgs;
try {
const raw = execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ${imgUrls.map(u => `"${u}"`).join(" ")}`,
{ timeout: 60000 }
).toString();
imgs = JSON.parse(raw);
} catch(e) {
console.error("Image fetch error:", e.message);
imgs = imgUrls.map(() => ({ base64: null, error: "fetch failed" }));
}
imgs.forEach((img, i) => {
if (img.error) console.warn(`Image ${i} failed: ${img.error}`);
else console.log(`Image ${i} OK`);
});
// ─── build presentation ───────────────────────────────────────────────────────
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Chronic Rhinosinusitis";
pres.author = "Medical Education";
// ── Slide 1: Title ────────────────────────────────────────────────────────────
titleSlide(pres,
"Chronic Rhinosinusitis",
"Definition • Aetiology • Pathogenesis • Investigations • Radiology • Management • Complications"
);
// ── Slide 2: Outline ──────────────────────────────────────────────────────────
contentSlide(pres, "Contents", [
"1. Definition & Diagnostic Criteria",
"2. Epidemiology",
"3. Aetiology & Risk Factors",
"4. Pathogenesis",
"5. Clinical Features",
"6. Investigations",
"7. Radiology",
"8. Management — Medical",
"9. Management — Surgical",
"10. Complications",
]);
// ── Slide 3: SECTION ─────────────────────────────────────────────────────────
sectionHeader(pres, "Definition & Epidemiology", "📖");
// ── Slide 4: Definition ───────────────────────────────────────────────────────
contentSlide(pres, "Definition of Chronic Rhinosinusitis (CRS)", [
"Inflammation of the nose and paranasal sinuses characterised by ≥ 2 symptoms:",
" • Nasal blockage / obstruction / congestion",
" • Nasal discharge (anterior or posterior)",
" • Facial pain / pressure",
" • Reduction or loss of smell",
"Duration: symptoms persist for > 12 consecutive weeks",
"Objective confirmation required: positive CT or endoscopy showing mucosal inflammation",
"Two main phenotypes:",
" • CRSsNP — CRS without nasal polyps (TH1-skewed, fibrosis, mononuclear infiltration)",
" • CRSwNP — CRS with nasal polyps (TH2-skewed, eosinophilic, oedematous stroma)",
"Symptom-based diagnosis alone is unreliable: >40% of symptom-positive patients have normal CT and endoscopy",
]);
// ── Slide 5: Epidemiology ─────────────────────────────────────────────────────
contentSlide(pres, "Epidemiology", [
"Prevalence: ~10–12% of the general adult population in Western countries",
"One of the most common chronic conditions seen by ENT surgeons",
"Significant economic burden: billions of dollars annually in healthcare costs",
"Affects quality of life comparably to congestive heart failure or COPD",
"CRSsNP is more common than CRSwNP",
"CRSwNP often associated with:",
" • Asthma (25–70% of patients)",
" • Aspirin-exacerbated respiratory disease (Samter's triad)",
" • Allergic fungal rhinosinusitis (AFRS)",
"Peak age: 45–65 years; male predominance in CRSwNP",
]);
// ── Slide 6: SECTION ──────────────────────────────────────────────────────────
sectionHeader(pres, "Aetiology & Pathogenesis", "🔬");
// ── Slide 7: Aetiology ────────────────────────────────────────────────────────
let s7 = pres.addSlide();
s7.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: CREAM } });
s7.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: NAVY } });
s7.addText("Aetiology — Multifactorial Disease", { x: 0.25, y: 0, w: 9.5, h: 0.75, fontSize: 20, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0 });
const aetiologyData = [
{ label: "Microbial Factors", items: ["Bacterial biofilms (S. aureus, P. aeruginosa)", "Staphylococcal superantigens (IgE sensitisation)", "Fungal colonisation", "Viral triggers (rhinovirus, influenza)"] },
{ label: "Host Immune Factors", items: ["Impaired mucociliary clearance", "Epithelial barrier dysfunction", "Eosinophil activation (CRSwNP)", "TH2 / TH1 immune skewing"] },
{ label: "Anatomical Factors", items: ["Ostiomeatal unit obstruction", "Septal deviation, concha bullosa", "Nasal polyps obstructing drainage", "Adenoid hypertrophy (children)"] },
{ label: "Systemic Conditions", items: ["Asthma / atopy", "Cystic fibrosis, PCD", "Immunodeficiency (CVID, IgA def)", "Granulomatous disease (GPA, sarcoid)"] },
];
const boxW = 2.25, boxH = 1.8, gap = 0.08;
const startX = 0.2, startY = 0.88;
aetiologyData.forEach((box, i) => {
const col = i % 4;
const x = startX + col * (boxW + gap);
const y = startY;
s7.addShape(pres.ShapeType.rect, { x, y, w: boxW, h: boxH, fill: { color: LIGHT }, line: { color: TEAL, pt: 1.5 } });
s7.addShape(pres.ShapeType.rect, { x, y, w: boxW, h: 0.35, fill: { color: TEAL }, line: { color: TEAL } });
s7.addText(box.label, { x, y, w: boxW, h: 0.35, fontSize: 12, bold: true, color: WHITE, align: "center", fontFace: "Calibri" });
const bItems = box.items.map((b, j) => ({
text: b, options: { bullet: true, fontSize: 11, color: DARK, breakLine: j < box.items.length - 1 }
}));
s7.addText(bItems, { x: x + 0.05, y: y + 0.38, w: boxW - 0.1, h: boxH - 0.4, fontFace: "Calibri", valign: "top" });
});
// Row 2: additional aetiology factors
const extra = [
{ label: "Environmental", items: ["Air pollution, smoking", "Occupational allergens", "Damp indoor environments"] },
{ label: "Dental / Odontogenic", items: ["Odontogenic sinusitis: maxillary teeth infections", "Root apex near sinus floor", "Often unilateral maxillary sinus disease"] },
{ label: "Unified Airway", items: ["Nasal polyps linked with lower airway disease", "United airway disease concept", "CRS treatment improves asthma control"] },
{ label: "Osteitis", items: ["Bone remodelling in CRS", "Thickened sclerotic bone", "Indicates chronicity & severity"] },
];
const startY2 = startY + boxH + 0.15;
extra.forEach((box, i) => {
const col = i % 4;
const x = startX + col * (boxW + gap);
const y = startY2;
s7.addShape(pres.ShapeType.rect, { x, y, w: boxW, h: 1.6, fill: { color: "FFF3E0" }, line: { color: ORANGE, pt: 1.5 } });
s7.addShape(pres.ShapeType.rect, { x, y, w: boxW, h: 0.35, fill: { color: ORANGE }, line: { color: ORANGE } });
s7.addText(box.label, { x, y, w: boxW, h: 0.35, fontSize: 12, bold: true, color: WHITE, align: "center", fontFace: "Calibri" });
const bItems = box.items.map((b, j) => ({
text: b, options: { bullet: true, fontSize: 11, color: DARK, breakLine: j < box.items.length - 1 }
}));
s7.addText(bItems, { x: x + 0.05, y: y + 0.38, w: boxW - 0.1, h: 1.2, fontFace: "Calibri", valign: "top" });
});
// ── Slide 8: Aetiology diagram image ──────────────────────────────────────────
if (imgs[0] && !imgs[0].error) {
imageSlide(pres,
"Aetiological Mechanisms in CRS (Scott-Brown's)",
imgs[0].base64,
"Figure 94.2 — Aetiological mechanisms proposed for CRS\n(Scott-Brown's Otorhinolaryngology)",
[
"Staphylococcal superantigens drive IgE production",
"Unified airway disease links sinus and lower airway inflammation",
"Osteitic bone acts as a reservoir for chronic infection",
"Biofilm formation perpetuates mucosal inflammation",
"Epithelial barrier dysfunction allows allergen/pathogen entry",
]
);
}
// ── Slide 9: Pathogenesis ─────────────────────────────────────────────────────
twoColSlide(pres,
"Pathogenesis — CRSsNP vs CRSwNP",
[
"CRSsNP (without polyps)",
"TH1-dominated inflammation",
"IFN-γ elevation, low ECP/MPO",
"Fibrosis, basement membrane thickening",
"Goblet cell hyperplasia",
"Mononuclear cell infiltration",
"Associated with neutrophilic pattern",
"Driven by bacterial colonisation",
"Less responsive to steroids",
],
[
"CRSwNP (with polyps)",
"TH2-dominated inflammation",
"High IL-5 and eosinophil cationic protein",
"Oedematous stroma in sinonasal epithelium",
"Albumin deposition & pseudocyst formation",
"Subepithelial/perivascular eosinophil infiltration",
"IgE-mediated local reactions (superantigens)",
"Strong association with asthma & NSAID sensitivity",
"More responsive to intranasal/systemic steroids",
],
"CRSsNP",
"CRSwNP"
);
// ── Slide 10: SECTION ─────────────────────────────────────────────────────────
sectionHeader(pres, "Clinical Features & Investigations", "🔍");
// ── Slide 11: Clinical Features ───────────────────────────────────────────────
twoColSlide(pres,
"Clinical Features",
[
"Cardinal Symptoms:",
"Nasal obstruction / congestion",
"Nasal discharge (mucopurulent)",
"Facial pain, pressure or fullness",
"Reduced / absent sense of smell",
"",
"Additional Symptoms:",
"Post-nasal drip / throat clearing",
"Cough (especially nocturnal)",
"Headache (frontal, periorbital)",
"Dental pain, ear pressure",
"Fatigue, sleep disturbance",
],
[
"Physical Examination:",
"Anterior rhinoscopy: mucosal erythema, discharge",
"Nasal endoscopy (gold standard exam):",
" - Middle meatal polyps / purulent discharge",
" - Oedematous mucosa, crusting",
"Facial tenderness on palpation",
"Post-nasal drip on oropharyngeal exam",
"",
"EPOS Criteria (Adults):",
"≥ 2 symptoms for > 12 weeks",
"One symptom must be nasal obstruction OR discharge",
"Objective evidence (CT / endoscopy)",
],
"Symptoms",
"Examination & Criteria"
);
// ── Slide 12: Investigations ──────────────────────────────────────────────────
contentSlide(pres, "Investigations", [
"Nasal Endoscopy (Rigid / Flexible):",
" • Visualises middle meatus, ethmoid bulla, sphenoethmoidal recess",
" • Identifies polyps, purulent discharge, mucosal oedema",
" • Gold standard for direct mucosal assessment",
"",
"Laboratory Tests:",
" • FBC: eosinophilia (CRSwNP / AFRS / eosinophilic CRS)",
" • Serum IgE: elevated in allergic / AFRS subtypes",
" • Sweat chloride / CFTR gene analysis (exclude cystic fibrosis)",
" • Serum immunoglobulins (CVID, selective IgA deficiency)",
" • ANCA, ACE level (Granulomatosis with polyangiitis / sarcoid)",
"",
"Allergy Testing: skin-prick tests or specific IgE for aeroallergens",
"Mucociliary Function: saccharin test, ciliary beat frequency, electron microscopy for PCD",
"Microbiology: nasal culture / middle meatal swab for refractory / post-surgical cases",
"Histopathology: biopsy of any unilateral polyp / suspicious lesion",
]);
// ── Slide 13: SECTION ─────────────────────────────────────────────────────────
sectionHeader(pres, "Radiology", "🖥️");
// ── Slide 14: CT imaging ──────────────────────────────────────────────────────
let s14 = pres.addSlide();
s14.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: CREAM } });
s14.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: NAVY } });
s14.addText("CT of Paranasal Sinuses — Gold Standard", { x: 0.25, y: 0, w: 9.5, h: 0.75, fontSize: 20, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0 });
if (imgs[1] && !imgs[1].error) {
s14.addImage({ data: imgs[1].base64, x: 0.2, y: 0.88, w: 4.2, h: 3.5 });
s14.addText("OMU pattern sinusitis: left middle meatal opacification with maxillary, frontal and ethmoid sinus disease\n(Cummings Otolaryngology Fig 38.17)", { x: 0.2, y: 4.4, w: 4.2, h: 0.9, fontSize: 10, italic: true, color: GREY, align: "center", fontFace: "Calibri" });
}
const ctBullets = [
"Indications for CT:",
" - Diagnosis confirmation in CRS",
" - Pre-operative surgical planning (FESS)",
" - Failed medical therapy / recurrent disease",
" - Suspected complications",
"CT Findings in CRS:",
" - Mucosal thickening (diffuse or polypoid)",
" - Partial / complete sinus opacification",
" - Air-fluid levels",
" - Osteitis: bone thickening & sclerosis",
" - OMU obstruction (72% of CRS patients)",
" - Intrasinus calcifications (fungal)",
"CT Attenuation:",
" - Acute: 10–25 HU (watery secretions)",
" - Chronic: 30–60 HU (thickened secretions)",
];
const ctItems = ctBullets.map((b, i) => ({
text: b.replace(/^ /, ""),
options: { bullet: b.startsWith(" ") ? { indent: 20 } : false, fontSize: b.startsWith(" ") ? 13 : 14, bold: !b.startsWith(" ") && b.endsWith(":"), color: b.startsWith(" ") ? GREY : DARK, breakLine: i < ctBullets.length - 1 }
}));
s14.addText(ctItems, { x: 4.65, y: 0.92, w: 5.15, h: 4.55, fontFace: "Calibri", valign: "top" });
// ── Slide 15: Lund-Mackay + CT patterns ──────────────────────────────────────
let s15 = pres.addSlide();
s15.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: CREAM } });
s15.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: NAVY } });
s15.addText("CT Staging: Lund-Mackay Score & Patterns", { x: 0.25, y: 0, w: 9.5, h: 0.75, fontSize: 20, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0 });
// table
const lmData = [
["Subsite", "Score"],
["Anterior ethmoid (each side)", "0 / 1 / 2"],
["Posterior ethmoid (each side)", "0 / 1 / 2"],
["Frontal sinus (each side)", "0 / 1 / 2"],
["Maxillary sinus (each side)", "0 / 1 / 2"],
["Sphenoid sinus (each side)", "0 / 1 / 2"],
["Ostiomeatal complex (each side)", "0 or 2"],
["Maximum total score", "24"],
];
s15.addTable(lmData, {
x: 0.2, y: 0.88, w: 4.5, colW: [3, 1.5],
fill: { color: WHITE }, border: { pt: 1, color: TEAL },
fontFace: "Calibri", fontSize: 13, color: DARK,
firstRowFillColor: TEAL, firstRowFontColor: WHITE, firstRowBold: true,
});
s15.addText("Score: 0 = clear, 1 = partial, 2 = total opacification", { x: 0.2, y: 3.45, w: 4.5, h: 0.4, fontSize: 11, italic: true, color: GREY, fontFace: "Calibri" });
const patternBullets = [
"Babbel's Patterns of Sinusitis:",
"1. Infundibular (26%): focal maxillary & infundibulum obstruction",
"2. Ostiomeatal unit (25%): ipsilateral maxillary + frontal + anterior ethmoid",
"3. Sphenoethmoidal recess (6%): sphenoid ± posterior ethmoid",
"4. Sinonasal polyposis: diffuse pansinusitis with polyps",
"5. Sporadic / unclassified: isolated or patchy disease",
"",
"MRI Indications:",
"Suspected intracranial / orbital complication",
"Soft tissue characterisation (tumour vs polyp)",
"Fungal sinusitis (hypointense on T2 = thick/desiccated secretions)",
"Signal on T1/T2 varies with protein concentration of secretions",
];
const pItems = patternBullets.map((b, i) => ({
text: b,
options: { bullet: !b.endsWith(":") && b.length > 0, fontSize: b.endsWith(":") ? 15 : 13, bold: b.endsWith(":"), color: b.endsWith(":") ? TEAL : DARK, breakLine: i < patternBullets.length - 1 }
}));
s15.addText(pItems, { x: 4.9, y: 0.9, w: 4.9, h: 4.5, fontFace: "Calibri", valign: "top" });
// ── Slide 16: Radiology image ─────────────────────────────────────────────────
if (imgs[2] && !imgs[2].error) {
imageSlide(pres,
"CT Findings — CRS without Nasal Polyps",
imgs[2].base64,
"Coronal CT showing bilateral maxillary mucosal thickening with OMT obstruction (ResearchGate)",
[
"Mucosal thickening in both maxillary sinuses",
"Bilateral ostiomeatal complex obstruction",
"Classic CRSsNP pattern",
"Bone remodelling absent in mild disease",
"Pre-operative assessment for FESS",
"Lund-Mackay score guides surgical extent",
]
);
} else if (imgs[3] && !imgs[3].error) {
imageSlide(pres,
"CT Findings — Chronic Rhinosinusitis (Radiopaedia)",
imgs[3].base64,
"Coronal CT — mucosal thickening and sinus opacification in CRS (Radiopaedia)",
[
"Diffuse mucosal thickening",
"Sinus opacification",
"OMU obstruction pattern",
"Findings guide surgical planning",
]
);
}
// ── Slide 17: SECTION ─────────────────────────────────────────────────────────
sectionHeader(pres, "Management", "💊");
// ── Slide 18: Medical Management ─────────────────────────────────────────────
contentSlide(pres, "Medical Management — Step-Up Approach", [
"1. Saline Nasal Irrigation (High-Volume / Low-Pressure):",
" • First-line for all CRS — promotes mucociliary clearance",
" • Large-volume isotonic or hypertonic saline irrigations",
"",
"2. Intranasal Corticosteroids (INCS):",
" • Cornerstone of medical therapy (Mometasone, Fluticasone, Budesonide)",
" • Reduces mucosal oedema and polyp size",
" • High-dose INCS or budesonide rinses in refractory CRSwNP",
"",
"3. Systemic Corticosteroids:",
" • Short oral prednisolone courses for CRSwNP (polyp debulking)",
" • Not recommended long-term due to systemic side effects",
"",
"4. Antibiotics:",
" • Acute exacerbations: amoxicillin-clavulanate or doxycycline (2–4 weeks)",
" • Long-term low-dose macrolides (azithromycin / clarithromycin): anti-inflammatory properties, 3–6 months",
" • Not for routine CRS; reserved for culture-guided or macrolide protocols",
"",
"5. Antifungals: topical amphotericin — evidence limited; systemic for AFRS or invasive fungal",
]);
// ── Slide 19: Biologics & Adjuncts ───────────────────────────────────────────
contentSlide(pres, "Biologics & Adjunct Therapies", [
"Biological (Monoclonal Antibody) Therapies — CRSwNP:",
" • Dupilumab (anti-IL-4Rα): approved for severe CRSwNP; reduces polyp size, improves smell",
" • Mepolizumab (anti-IL-5): reduces eosinophilic polyps",
" • Omalizumab (anti-IgE): effective in comorbid asthma + CRSwNP",
" • Benralizumab (anti-IL-5Rα): under evaluation",
"",
"Adjunct Treatments:",
" • Aspirin desensitisation (Aspirin-exacerbated respiratory disease / Samter's triad)",
" • Allergen immunotherapy (atopic CRS with allergy)",
" • Anti-leukotrienes (Montelukast) — modest evidence",
" • Mucolytics: limited role",
"",
"Patient Education:",
" • Smoking cessation (smoking worsens mucociliary function and outcomes)",
" • Allergen avoidance",
" • Adherence to nasal irrigation + INCS — daily long-term therapy required",
]);
// ── Slide 20: Surgical Management ────────────────────────────────────────────
let s20 = pres.addSlide();
s20.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: CREAM } });
s20.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: NAVY } });
s20.addText("Surgical Management — Functional Endoscopic Sinus Surgery (FESS)", { x: 0.25, y: 0, w: 9.5, h: 0.75, fontSize: 20, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0 });
if (imgs[4] && !imgs[4].error) {
s20.addImage({ data: imgs[4].base64, x: 0.2, y: 0.88, w: 4.0, h: 2.4 });
s20.addText("Indications for sinonasal surgery (Cummings Otolaryngology Box 44.2)", { x: 0.2, y: 3.3, w: 4.0, h: 0.5, fontSize: 10, italic: true, color: GREY, align: "center", fontFace: "Calibri" });
}
const surgItems = [
"Indications for FESS:",
" - CRS recalcitrant to maximal medical therapy",
" - CRSwNP with functional impairment despite steroids",
" - Complications (mucocele, orbital, intracranial)",
" - Recurrent acute rhinosinusitis",
"Principles of FESS:",
" - Mucosal preservation (Messerklinger technique)",
" - Open OMU and sinus ostia for drainage / ventilation",
" - Complete ethmoidectomy especially for CRSwNP",
" - Wide cavities for topical drug delivery post-operatively",
"Outcomes:",
" - 80–90% report symptom improvement",
" - Reduces healthcare utilisation",
" - CRSwNP: surgery facilitates steroid delivery; polyps may recur",
" - CRSsNP: can be curative (especially odontogenic sinusitis)",
].map((b, i) => ({
text: b.replace(/^ /, ""),
options: { bullet: b.startsWith(" "), fontSize: b.startsWith(" ") ? 12 : 14, bold: b.endsWith(":") && !b.startsWith(" "), color: b.startsWith(" ") ? DARK : TEAL, breakLine: i < 15 }
}));
s20.addText(surgItems, { x: 4.4, y: 0.9, w: 5.4, h: 4.55, fontFace: "Calibri", valign: "top" });
// ── Slide 21: SECTION ─────────────────────────────────────────────────────────
sectionHeader(pres, "Complications", "⚠️");
// ── Slide 22: Complications overview ─────────────────────────────────────────
let s22 = pres.addSlide();
s22.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: CREAM } });
s22.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: NAVY } });
s22.addText("Complications of Rhinosinusitis", { x: 0.25, y: 0, w: 9.5, h: 0.75, fontSize: 20, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0 });
const compBoxes = [
{ label: "Local", color: TEAL, items: ["Mucocele / pyocele formation", "Osteomyelitis", "Pott's puffy tumour (frontal)", "Mucosal polyp formation"] },
{ label: "Orbital (More Common)", color: ORANGE, items: ["Stage 1: Preseptal (periorbital) cellulitis", "Stage 2: Orbital (postseptal) cellulitis", "Stage 3: Subperiosteal abscess", "Stage 4: Orbital abscess", "Stage 5: Cavernous sinus thrombosis"] },
{ label: "Intracranial (Less Common)", color: "C0392B", items: ["Meningitis", "Epidural abscess", "Subdural empyema", "Intracerebral abscess", "Superior sagittal sinus thrombosis"] },
];
compBoxes.forEach((box, i) => {
const x = 0.2 + i * 3.28;
s22.addShape(pres.ShapeType.rect, { x, y: 0.88, w: 3.1, h: 4.5, fill: { color: WHITE }, line: { color: box.color, pt: 2 } });
s22.addShape(pres.ShapeType.rect, { x, y: 0.88, w: 3.1, h: 0.42, fill: { color: box.color }, line: { color: box.color } });
s22.addText(box.label, { x, y: 0.88, w: 3.1, h: 0.42, fontSize: 13, bold: true, color: WHITE, align: "center", fontFace: "Calibri" });
const bItems = box.items.map((b, j) => ({
text: b, options: { bullet: true, fontSize: 13, color: DARK, breakLine: j < box.items.length - 1 }
}));
s22.addText(bItems, { x: x + 0.1, y: 1.35, w: 2.9, h: 3.95, fontFace: "Calibri", valign: "top" });
});
// ── Slide 23: Chandler Classification ────────────────────────────────────────
let s23 = pres.addSlide();
s23.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: CREAM } });
s23.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: NAVY } });
s23.addText("Chandler Classification of Orbital Complications", { x: 0.25, y: 0, w: 9.5, h: 0.75, fontSize: 20, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0 });
const chandlerData = [
["Stage", "Classification", "Description", "Management"],
["I", "Preseptal cellulitis", "Inflammation anterior to orbital septum; no orbital involvement", "IV antibiotics; no surgery usually required"],
["II", "Orbital (postseptal) cellulitis", "Diffuse oedema of orbital fat behind septum; no abscess", "IV antibiotics; CT scan; ophthalmology review"],
["III", "Subperiosteal abscess", "Pus between periorbita and bony orbital wall (usually medial)", "IV antibiotics + surgical drainage (endoscopic)"],
["IV", "Orbital abscess", "Pus within orbital fat; proptosis, ophthalmoplegia, pain", "Urgent surgical drainage; optic nerve at risk"],
["V", "Cavernous sinus thrombosis", "Infection extends to cavernous sinus via ophthalmic veins", "IV antibiotics, anticoagulation; high mortality"],
];
s23.addTable(chandlerData, {
x: 0.15, y: 0.85, w: 9.7, colW: [0.6, 1.8, 3.4, 3.9],
fill: { color: WHITE }, border: { pt: 1, color: TEAL },
fontFace: "Calibri", fontSize: 12, color: DARK,
firstRowFillColor: TEAL, firstRowFontColor: WHITE, firstRowBold: true,
rowH: 0.72,
});
// ── Slide 24: Complications management summary ────────────────────────────────
contentSlide(pres, "Management of Complications", [
"General Principles:",
" • Urgent imaging: CT (first line) — bony anatomy + orbital detail; MRI for intracranial extent",
" • Multidisciplinary team: ENT + Ophthalmology + Neurosurgery as needed",
" • Repeated clinical monitoring (4–6 hourly for orbital complications)",
"",
"Medical Management:",
" • Broad-spectrum IV antibiotics with streptococcal AND anaerobic cover (e.g. co-amoxiclav + metronidazole)",
" • Antifungals: IV voriconazole / amphotericin for invasive fungal complications",
" • IV steroids considered for CRSwNP exacerbations",
"",
"Surgical Management:",
" • Abscess formation = surgical indication (endoscopic or external drainage)",
" • Joint ENT + neurosurgery for intracranial complications",
" • FESS to address underlying sinusitis",
"",
"Chronic Complications:",
" • Mucocele: marsupialisation endoscopically",
" • Osteomyelitis: long-course IV antibiotics + surgical debridement",
]);
// ── Slide 25: Key Points / Summary ────────────────────────────────────────────
let s25 = pres.addSlide();
s25.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: NAVY } });
s25.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: TEAL } });
s25.addText("Key Points — Chronic Rhinosinusitis", { x: 0.25, y: 0, w: 9.5, h: 0.75, fontSize: 20, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0 });
s25.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.85, w: 0.06, h: 4.5, fill: { color: ORANGE } });
const keyPts = [
"CRS = ≥ 2 symptoms for > 12 weeks with objective confirmation (CT or endoscopy)",
"Two key phenotypes: CRSsNP (TH1, fibrosis) and CRSwNP (TH2, eosinophilic, polyps)",
"Multifactorial: biofilms, mucociliary dysfunction, anatomical obstruction, immune dysregulation",
"CT is the gold standard imaging; Lund-Mackay score used for staging",
"Step-up therapy: saline → INCS → oral steroids → long-term macrolides → biologics",
"FESS is effective for medically recalcitrant CRS; wide cavities enhance topical delivery",
"Orbital complications (Chandler staging) are more common than intracranial",
"Multidisciplinary management is essential for complicated disease",
];
const kpItems = keyPts.map((t, i) => ({
text: `${i + 1}. ${t}`,
options: { fontSize: 15, color: WHITE, fontFace: "Calibri", breakLine: i < keyPts.length - 1 }
}));
s25.addText(kpItems, { x: 0.5, y: 0.92, w: 9.3, h: 4.45, valign: "top", lineSpacingMultiple: 1.25 });
// ── Slide 26: References ──────────────────────────────────────────────────────
let s26 = pres.addSlide();
s26.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: CREAM } });
s26.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: NAVY } });
s26.addText("References", { x: 0.25, y: 0, w: 9.5, h: 0.75, fontSize: 20, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0 });
const refs = [
"1. Flint PW et al. Cummings Otolaryngology Head and Neck Surgery, 7th ed. Philadelphia: Elsevier; 2021.",
"2. Gleeson M, Clarke R. Scott-Brown's Otorhinolaryngology Head & Neck Surgery, 8th ed. CRC Press; 2018.",
"3. Murray JF, Nadel JA. Murray & Nadel's Textbook of Respiratory Medicine, 7th ed. Elsevier; 2022.",
"4. Goldman L, Schafer AI. Goldman-Cecil Medicine, 26th ed. Philadelphia: Elsevier; 2020.",
"5. Lee KJ. Essential Otolaryngology: Head and Neck Surgery, 11th ed. New York: McGraw-Hill; 2019.",
"6. EPOS 2020: European Position Paper on Rhinosinusitis and Nasal Polyps. Rhinology 2020;58(Suppl S29):1–464.",
"7. Fokkens WJ et al. European Position Paper on Rhinosinusitis and Nasal Polyps 2020. Rhinology 2020.",
"8. Babbel RW et al. Recurring patterns of inflammatory sinonasal disease on CT. AJNR 1992;13:903–12.",
"9. Chandler JR et al. The pathogenesis of orbital complications in acute sinusitis. Laryngoscope 1970.",
"10. Lund VJ, Mackay IS. Staging in rhinosinusitis. Rhinology 1993;31:183–4.",
];
const refItems = refs.map((r, i) => ({
text: r, options: { fontSize: 12, color: DARK, fontFace: "Calibri", breakLine: i < refs.length - 1 }
}));
s26.addText(refItems, { x: 0.3, y: 0.88, w: 9.4, h: 4.55, valign: "top", lineSpacingMultiple: 1.2 });
// ── Save ──────────────────────────────────────────────────────────────────────
const outPath = "/home/daytona/workspace/crs-presentation/Chronic_Rhinosinusitis.pptx";
pres.writeFile({ fileName: outPath }).then(() => {
console.log("SAVED:", outPath);
}).catch(e => {
console.error("Error saving:", e);
process.exit(1);
});
cd /home/daytona/workspace/crs-presentation && node build.js 2>&1
cd /home/daytona/workspace/crs-presentation && node -e " const {execSync} = requ…
Make a ppt presentation of chronic Rhinosinusitis definition aetiology pathogenesis investigation radiology management complications with images
mkdir -p /home/daytona/workspace/crs-ppt && node -e " const {execSync} = require…