Make presentation on pharyngitis
pharyngitis throat inflammation strep
ls -la /home/daytona/workspace/ 2>/dev/null || mkdir -p /home/daytona/workspace && echo "workspace ready"
mkdir -p /home/daytona/workspace/pharyngitis-pptx && node -e "require('pptxgenjs'); console.log('pptxgenjs OK')"
~/pharyngitis-pptx/pharyngitis.js
const pptxgen = require("pptxgenjs");
// Fetch images helper
const { execSync } = require("child_process");
function getImages(urls) {
try {
const result = execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ${urls.map(u => `"${u}"`).join(" ")}`,
{ timeout: 30000 }
).toString();
return JSON.parse(result);
} catch (e) {
return urls.map(() => ({ base64: null, error: e.message }));
}
}
// Fetch clinical images
const imageUrls = [
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_470e0e562fce5d66e77298905bb7405112ccc7a9c7636f8550c73d48c60e0f48.jpg",
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_cfdd63d3ea83324adb0c3bcfc5500835c9b6c6d65715962f13d8c83bd663edd6.jpg",
"https://cdn.orris.care/cdss_images/88e38964082c0b6bfc7599b333a9481c3321c64d34da8a744121ad901dbb53ce.png"
];
console.log("Fetching images...");
const imgs = getImages(imageUrls);
console.log("Images fetched:", imgs.map(i => i.error ? "FAILED:" + i.error : "OK"));
let pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.author = "Orris Medical";
pres.title = "Pharyngitis: A Clinical Overview";
// ─── Color palette ────────────────────────────────────────────────────────────
const C = {
navy: "0D2137", // dominant dark bg
teal: "1A7B74", // accent/header bars
gold: "F4A225", // accent highlight
white: "FFFFFF",
offwhite:"EDF2F7",
lightTeal:"A8D5D1",
grayText:"B0C4D0",
darkCard:"12304A",
};
// Helper: add slide with dark background + decorative top bar
function addSlide(opts = {}) {
let s = pres.addSlide();
// full background
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.navy }, line: { color: C.navy } });
// top teal bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.07, fill: { color: C.teal }, line: { color: C.teal } });
// bottom accent bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.555, w: "100%", h: 0.07, fill: { color: C.gold }, line: { color: C.gold } });
return s;
}
// ─── SLIDE 1: Title ────────────────────────────────────────────────────────────
{
let s = pres.addSlide();
// gradient-like layered rectangles
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.navy }, line: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 3.5, h: "100%", fill: { color: C.teal }, line: { color: C.teal } });
s.addShape(pres.ShapeType.rect, { x: 3.2, y: 0, w: 0.5, h: "100%", fill: { color: C.gold }, line: { color: C.gold } });
// vertical title text on left bar
s.addText("PHARYNGITIS", {
x: 0, y: 1.2, w: 3.5, h: 3,
fontSize: 40, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle",
rotate: 0,
});
s.addText("A Clinical Overview", {
x: 3.9, y: 1.5, w: 5.8, h: 0.7,
fontSize: 28, bold: false, color: C.gold,
fontFace: "Calibri", align: "left",
});
s.addText("Etiology · Diagnosis · Management · Complications", {
x: 3.9, y: 2.3, w: 5.8, h: 0.5,
fontSize: 14, color: C.lightTeal,
fontFace: "Calibri", align: "left",
});
s.addShape(pres.ShapeType.rect, { x: 3.9, y: 2.95, w: 5.5, h: 0.04, fill: { color: C.teal }, line: { color: C.teal } });
s.addText([
{ text: "Sources: ", options: { bold: true } },
{ text: "Goldman-Cecil Medicine · Rosen's Emergency Medicine · Tintinalli's Emergency Medicine · Lee's Essential Otolaryngology" }
], {
x: 3.9, y: 3.2, w: 5.8, h: 0.8,
fontSize: 10, color: C.grayText,
fontFace: "Calibri", align: "left",
});
}
// ─── SLIDE 2: Definition & Overview ──────────────────────────────────────────
{
let s = addSlide();
// section pill
s.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 0.18, w: 2.2, h: 0.38, fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.1 });
s.addText("OVERVIEW", { x: 0.4, y: 0.18, w: 2.2, h: 0.38, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle" });
s.addText("What is Pharyngitis?", { x: 0.4, y: 0.72, w: 9.2, h: 0.55, fontSize: 26, bold: true, color: C.white });
const defBox = { x: 0.4, y: 1.35, w: 9.2, h: 1.05, fill: { color: C.darkCard }, line: { color: C.teal, pt: 1.5 } };
s.addShape(pres.ShapeType.rect, defBox);
s.addText(
"Tonsillopharyngitis (pharyngitis) is a generally benign, self-limited inflammatory syndrome of the oropharynx. Although most cases are mild, severe cases may lead to airway swelling, dehydration, and suppurative complications including peritonsillar abscess, deep space infection, and hematogenous spread.",
{ x: 0.55, y: 1.42, w: 8.9, h: 0.9, fontSize: 13, color: C.offwhite, fontFace: "Calibri" }
);
// 3 stat cards
const cards = [
{ title: "Pediatric cases", val: "50–80%", sub: "viral etiology" },
{ title: "Adult cases", val: "5–15%", sub: "bacterial (GAS)" },
{ title: "Resolution", val: "85%", sub: "within 1 week (viral)" },
];
cards.forEach((c, i) => {
const x = 0.4 + i * 3.13;
s.addShape(pres.ShapeType.roundRect, { x, y: 2.6, w: 2.9, h: 1.3, fill: { color: C.darkCard }, line: { color: C.gold, pt: 1 }, rectRadius: 0.12 });
s.addText(c.val, { x, y: 2.65, w: 2.9, h: 0.7, fontSize: 30, bold: true, color: C.gold, align: "center" });
s.addText(c.title + "\n" + c.sub, { x, y: 3.3, w: 2.9, h: 0.5, fontSize: 10.5, color: C.lightTeal, align: "center" });
});
s.addText("Transmission: direct contact or aerosolized respiratory secretions. Crowding (schools, military facilities) increases risk.", {
x: 0.4, y: 4.15, w: 9.2, h: 0.5, fontSize: 11.5, color: C.grayText, italic: true
});
}
// ─── SLIDE 3: Etiology ────────────────────────────────────────────────────────
{
let s = addSlide();
s.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 0.18, w: 2.2, h: 0.38, fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.1 });
s.addText("ETIOLOGY", { x: 0.4, y: 0.18, w: 2.2, h: 0.38, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle" });
s.addText("Causes of Pharyngitis", { x: 0.4, y: 0.72, w: 9.2, h: 0.55, fontSize: 26, bold: true, color: C.white });
// Two columns: Viral | Bacterial
// Viral column header
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.38, w: 4.55, h: 0.38, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("🦠 VIRAL (most common)", { x: 0.4, y: 1.38, w: 4.55, h: 0.38, fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle" });
const viralItems = [
"Rhinovirus, Coronavirus (30–60% of cases)",
"Adenovirus — pharyngoconjunctival fever",
"Epstein-Barr Virus — infectious mononucleosis",
"Enterovirus (Coxsackievirus) — herpangina",
"Herpes simplex virus 1 & 2",
"Influenza A & B, Parainfluenza",
"CMV, HIV (acute retroviral syndrome)",
];
s.addText(viralItems.map(t => ({ text: t, options: { bullet: { indent: 15 }, breakLine: true, color: C.offwhite } })),
{ x: 0.4, y: 1.82, w: 4.55, h: 3.3, fontSize: 11.5, fontFace: "Calibri", color: C.offwhite });
// Bacterial column header
s.addShape(pres.ShapeType.rect, { x: 5.1, y: 1.38, w: 4.55, h: 0.38, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("🔬 BACTERIAL", { x: 5.1, y: 1.38, w: 4.55, h: 0.38, fontSize: 12, bold: true, color: C.navy, align: "center", valign: "middle" });
const bacterialItems = [
"Group A β-hemolytic Strep (GAS/GABHS) — most common bacterial cause",
"Non-group A Strep (B, C, G)",
"Fusobacterium — Lemierre syndrome",
"Mixed anaerobes — Vincent angina",
"Corynebacterium diphtheriae — diphtheria",
"Neisseria gonorrhoeae",
"Mycoplasma pneumoniae, Chlamydia pneumoniae",
"Arcanobacterium haemolyticum — scarlatiniform rash",
];
s.addText(bacterialItems.map(t => ({ text: t, options: { bullet: { indent: 15 }, breakLine: true, color: C.offwhite } })),
{ x: 5.1, y: 1.82, w: 4.55, h: 3.3, fontSize: 11, fontFace: "Calibri", color: C.offwhite });
s.addText("Fungal: Candida spp. (immunocompromised patients)", {
x: 0.4, y: 5.05, w: 9.2, h: 0.38, fontSize: 11, color: C.gold, italic: true
});
}
// ─── SLIDE 4: Clinical Features ───────────────────────────────────────────────
{
let s = addSlide();
s.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 0.18, w: 2.8, h: 0.38, fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.1 });
s.addText("CLINICAL FEATURES", { x: 0.4, y: 0.18, w: 2.8, h: 0.38, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle" });
s.addText("Signs & Symptoms", { x: 0.4, y: 0.72, w: 9.2, h: 0.55, fontSize: 26, bold: true, color: C.white });
// Left: symptoms
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.38, w: 4.3, h: 0.38, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("SYMPTOMS", { x: 0.4, y: 1.38, w: 4.3, h: 0.38, fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle" });
const symptoms = [
"Sore throat & odynophagia", "Fever", "Headache",
"Abdominal pain, nausea, vomiting", "Myalgias & arthralgias",
"Malaise & lethargy", "Cough, hoarseness, coryza (suggest viral)"
];
s.addText(symptoms.map(t => ({ text: t, options: { bullet: true, breakLine: true } })),
{ x: 0.4, y: 1.82, w: 4.3, h: 2.3, fontSize: 12, color: C.offwhite });
// Right: exam findings
s.addShape(pres.ShapeType.rect, { x: 4.9, y: 1.38, w: 4.7, h: 0.38, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("EXAM FINDINGS", { x: 4.9, y: 1.38, w: 4.7, h: 0.38, fontSize: 12, bold: true, color: C.navy, align: "center", valign: "middle" });
const examFindings = [
"Tonsillopharyngeal erythema ± exudates",
"Soft palate petechiae",
"Uvulitis / uvular edema",
"Anterior cervical lymphadenitis",
"Tonsillar hypertrophy",
"Scarlatiniform rash (Arcanobacterium)",
"Discrete ulcerative lesions (enterovirus)",
"Conjunctivitis (adenovirus)"
];
s.addText(examFindings.map(t => ({ text: t, options: { bullet: true, breakLine: true } })),
{ x: 4.9, y: 1.82, w: 4.7, h: 2.3, fontSize: 12, color: C.offwhite });
// Warning box
s.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 4.22, w: 9.2, h: 0.55, fill: { color: "2E1A00" }, line: { color: C.gold, pt: 1.5 }, rectRadius: 0.08 });
s.addText("⚠ Tonsillar exudate does NOT imply bacterial etiology — it is often difficult to distinguish viral from bacterial pharyngitis on physical exam alone.", {
x: 0.55, y: 4.22, w: 9.0, h: 0.55, fontSize: 11.5, color: C.gold, valign: "middle"
});
}
// ─── SLIDE 5: Clinical Image ──────────────────────────────────────────────────
{
let s = addSlide();
s.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 0.18, w: 2.6, h: 0.38, fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.1 });
s.addText("CLINICAL PHOTOS", { x: 0.4, y: 0.18, w: 2.6, h: 0.38, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle" });
s.addText("Pharyngitis — Oropharyngeal Findings", { x: 0.4, y: 0.72, w: 9.2, h: 0.55, fontSize: 24, bold: true, color: C.white });
if (imgs[0] && imgs[0].base64) {
s.addImage({ data: imgs[0].base64, x: 0.4, y: 1.38, w: 5.5, h: 3.8 });
}
if (imgs[2] && imgs[2].base64) {
s.addImage({ data: imgs[2].base64, x: 6.1, y: 1.38, w: 3.5, h: 2.5 });
}
s.addText("Comparison of healthy (left) vs. streptococcal pharyngitis (right): erythema, tonsillar hypertrophy, exudates, petechiae on soft palate.", {
x: 0.4, y: 5.1, w: 9.2, h: 0.42, fontSize: 11, color: C.lightTeal, italic: true
});
}
// ─── SLIDE 6: Centor / McIsaac Score ─────────────────────────────────────────
{
let s = addSlide();
s.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 0.18, w: 2.8, h: 0.38, fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.1 });
s.addText("DIAGNOSIS", { x: 0.4, y: 0.18, w: 2.8, h: 0.38, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle" });
s.addText("Modified Centor Score (McIsaac)", { x: 0.4, y: 0.72, w: 9.2, h: 0.55, fontSize: 26, bold: true, color: C.white });
// Table header
const colW = [5.2, 2.0, 2.0];
const colX = [0.4, 5.62, 7.62];
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.38, w: 9.2, h: 0.42, fill: { color: C.teal }, line: { color: C.teal } });
["Criterion", "Points", "Score → Action"].forEach((h, i) => {
s.addText(h, { x: colX[i], y: 1.38, w: colW[i], h: 0.42, fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle" });
});
const rows = [
["Tonsillar exudates present", "+1", "0–1 → No testing, no antibiotics"],
["Tender anterior cervical lymphadenopathy", "+1", "2–3 → Rapid antigen test"],
["Absence of cough", "+1", "≥4 → Consider empiric antibiotics"],
["Fever >38°C (100.4°F)", "+1", ""],
["Age 3–14 years", "+1; Age ≥45: −1", ""],
];
rows.forEach((row, i) => {
const bg = i % 2 === 0 ? C.darkCard : C.navy;
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.82 + i * 0.45, w: 9.2, h: 0.45, fill: { color: bg }, line: { color: "1A3A55", pt: 0.5 } });
row.forEach((cell, j) => {
s.addText(cell, {
x: colX[j], y: 1.82 + i * 0.45, w: colW[j], h: 0.45,
fontSize: 11, color: j === 2 ? C.gold : C.offwhite,
align: j === 0 ? "left" : "center", valign: "middle", margin: 4
});
});
});
s.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 4.2, w: 9.2, h: 0.65, fill: { color: C.darkCard }, line: { color: C.teal, pt: 1 }, rectRadius: 0.08 });
s.addText("Gold standard: throat swab culture for S. pyogenes. Rapid nucleic acid testing (sensitivity 97.5%, specificity 95%) preferred over antigen test (sensitivity ~85%). In adults, backup culture is generally NOT required due to low risk of rheumatic fever.", {
x: 0.55, y: 4.22, w: 8.85, h: 0.6, fontSize: 11, color: C.lightTeal, valign: "middle"
});
}
// ─── SLIDE 7: GAS Pharyngitis Deep Dive ──────────────────────────────────────
{
let s = addSlide();
s.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 0.18, w: 2.8, h: 0.38, fill: { color: C.gold }, line: { color: C.gold }, rectRadius: 0.1 });
s.addText("GAS PHARYNGITIS", { x: 0.4, y: 0.18, w: 2.8, h: 0.38, fontSize: 11, bold: true, color: C.navy, align: "center", valign: "middle" });
s.addText("Group A Streptococcal Pharyngitis", { x: 0.4, y: 0.72, w: 9.2, h: 0.55, fontSize: 24, bold: true, color: C.white });
// Left column
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.38, w: 4.5, h: 0.38, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("CLASSIC PRESENTATION", { x: 0.4, y: 1.38, w: 4.5, h: 0.38, fontSize: 11.5, bold: true, color: C.white, align: "center", valign: "middle" });
const gasPresentation = [
"Peak incidence: children aged 5–15 years",
"Accounts for 20–40% of pediatric pharyngitis",
"5–15% of adult pharyngitis",
"Abrupt onset of fever & sore throat",
"Submandibular adenopathy",
"Edematous uvula, hypertrophied tonsils",
"Palatal petechiae, pharyngeal exudate",
"Cough & hoarseness are RARE (suggest viral)",
];
s.addText(gasPresentation.map(t => ({ text: t, options: { bullet: true, breakLine: true } })),
{ x: 0.4, y: 1.82, w: 4.5, h: 3.25, fontSize: 11, color: C.offwhite });
// Right column
s.addShape(pres.ShapeType.rect, { x: 5.1, y: 1.38, w: 4.55, h: 0.38, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("COMPLICATIONS", { x: 5.1, y: 1.38, w: 4.55, h: 0.38, fontSize: 11.5, bold: true, color: C.navy, align: "center", valign: "middle" });
const gasComplications = [
"Suppurative:", " · Peritonsillar abscess", " · Retropharyngeal abscess",
" · Otitis media", " · Sinusitis", " · Bacteremia",
"Non-suppurative:", " · Acute Rheumatic Fever",
" · Post-streptococcal glomerulonephritis",
" · Streptococcal toxic shock syndrome",
" · Scarlet fever"
];
s.addText(gasComplications.map(t => ({ text: t, options: { breakLine: true, bold: t.endsWith(":") } })),
{ x: 5.1, y: 1.82, w: 4.55, h: 3.25, fontSize: 11, color: C.offwhite });
s.addText("Even without treatment, pain, swelling, and fever usually resolve spontaneously in 3–6 days.", {
x: 0.4, y: 5.1, w: 9.2, h: 0.35, fontSize: 11, color: C.grayText, italic: true
});
}
// ─── SLIDE 8: EBV / Mononucleosis ─────────────────────────────────────────────
{
let s = addSlide();
s.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 0.18, w: 2.8, h: 0.38, fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.1 });
s.addText("VIRAL PHARYNGITIS", { x: 0.4, y: 0.18, w: 2.8, h: 0.38, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle" });
s.addText("EBV — Infectious Mononucleosis", { x: 0.4, y: 0.72, w: 9.2, h: 0.55, fontSize: 26, bold: true, color: C.white });
const ebvPoints = [
{ icon: "📋", title: "Clinical Features", points: ["Malaise, headache, fever as prodrome", "Exudative pharyngitis", "Posterior cervical lymphadenopathy", "Splenomegaly & hepatomegaly", "Atypical lymphocytes on CBC"] },
{ icon: "🧪", title: "Diagnosis", points: ["Monospot (heterophile test) — insensitive in young children (25% at 10–24 months vs 75% at 24–28 months)", "EBV IgM/IgG — sensitive & specific", "Negative monospot does NOT exclude EBV"] },
{ icon: "💊", title: "Treatment", points: ["Largely supportive (IV fluids, analgesia)", "Steroids may reduce tonsillar swelling", "Avoid amoxicillin/ampicillin — causes pruritic maculopapular rash", "Contact sports restriction if splenomegaly"] },
];
ebvPoints.forEach((block, i) => {
const x = 0.3 + i * 3.2;
s.addShape(pres.ShapeType.roundRect, { x, y: 1.38, w: 3.05, h: 3.9, fill: { color: C.darkCard }, line: { color: C.teal, pt: 1 }, rectRadius: 0.1 });
s.addText(block.icon + " " + block.title, { x: x + 0.1, y: 1.44, w: 2.85, h: 0.4, fontSize: 12.5, bold: true, color: C.gold });
s.addText(block.points.map(p => ({ text: p, options: { bullet: true, breakLine: true } })),
{ x: x + 0.1, y: 1.9, w: 2.85, h: 3.3, fontSize: 10.5, color: C.offwhite });
});
}
// ─── SLIDE 9: Treatment ───────────────────────────────────────────────────────
{
let s = addSlide();
s.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 0.18, w: 2.4, h: 0.38, fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.1 });
s.addText("MANAGEMENT", { x: 0.4, y: 0.18, w: 2.4, h: 0.38, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle" });
s.addText("Treatment of Pharyngitis", { x: 0.4, y: 0.72, w: 9.2, h: 0.55, fontSize: 26, bold: true, color: C.white });
// Viral management
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.38, w: 2.5, h: 0.38, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("VIRAL", { x: 0.4, y: 1.38, w: 2.5, h: 0.38, fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle" });
const viralTx = ["Supportive care (analgesics, hydration)", "Antipyretics (paracetamol/ibuprofen)", "Throat lozenges, warm saline gargles", "No antibiotics needed", "Self-limiting — resolves in ~7 days"];
s.addText(viralTx.map(t => ({ text: t, options: { bullet: true, breakLine: true } })),
{ x: 0.4, y: 1.82, w: 2.5, h: 1.8, fontSize: 11, color: C.offwhite });
// GAS antibiotics table
s.addShape(pres.ShapeType.rect, { x: 3.1, y: 1.38, w: 6.5, h: 0.38, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("BACTERIAL (GAS) — ANTIBIOTICS", { x: 3.1, y: 1.38, w: 6.5, h: 0.38, fontSize: 12, bold: true, color: C.navy, align: "center", valign: "middle" });
const txRows = [
["Drug", "Dose", "Duration", "Notes"],
["Penicillin VK", "1000 mg TID or 800 mg QID", "10 days (or 5-day course)", "First-line; narrow spectrum"],
["Benzathine Pen G", "1.2 M units IM", "Single dose", "Ensures compliance"],
["Cephalexin", "500 mg BID", "5–10 days", "Alternative or recurrent infection"],
["Clindamycin", "300 mg TID", "10 days", "Recurrent/persistent infection"],
["Azithromycin", "500 mg Day 1 → 250 mg × 4d", "5 days", "Penicillin allergy"],
];
txRows.forEach((row, i) => {
const isHeader = i === 0;
const bg = isHeader ? "1A4A6A" : (i % 2 === 0 ? C.darkCard : C.navy);
const rowH = 0.38;
const rowY = 1.82 + i * rowH;
const colXs = [3.1, 4.95, 6.9, 8.35];
const colWs = [1.85, 1.95, 1.45, 1.25];
s.addShape(pres.ShapeType.rect, { x: 3.1, y: rowY, w: 6.5, h: rowH, fill: { color: bg }, line: { color: "1A3A55", pt: 0.5 } });
row.forEach((cell, j) => {
s.addText(cell, {
x: colXs[j] + 0.05, y: rowY, w: colWs[j], h: rowH,
fontSize: isHeader ? 10.5 : 10, bold: isHeader, color: isHeader ? C.white : C.offwhite,
align: "left", valign: "middle", margin: 2
});
});
});
s.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 4.25, w: 9.2, h: 0.65, fill: { color: C.darkCard }, line: { color: C.gold, pt: 1 }, rectRadius: 0.08 });
s.addText("Corticosteroids (e.g., dexamethasone 10 mg single dose) reduce symptom severity in GAS pharyngitis. Antibiotics do NOT prevent post-streptococcal glomerulonephritis but DO prevent rheumatic fever.", {
x: 0.55, y: 4.27, w: 8.85, h: 0.6, fontSize: 11, color: C.gold, valign: "middle"
});
}
// ─── SLIDE 10: Complications & Red Flags ─────────────────────────────────────
{
let s = addSlide();
s.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 0.18, w: 2.8, h: 0.38, fill: { color: "8B1A1A" }, line: { color: "8B1A1A" }, rectRadius: 0.1 });
s.addText("COMPLICATIONS", { x: 0.4, y: 0.18, w: 2.8, h: 0.38, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle" });
s.addText("Complications & Red Flags", { x: 0.4, y: 0.72, w: 9.2, h: 0.55, fontSize: 26, bold: true, color: C.white });
// Three complication cards
const compCards = [
{
title: "Peritonsillar Abscess",
color: "8B1A1A",
points: ["Pus between tonsil capsule & superior constrictor muscle", "Deviation of tonsil/uvula toward midline", "Trismus, 'hot potato' voice, dysphagia", "Tx: Surgical drainage + empiric antibiotics", "Can → parapharyngeal abscess, mediastinitis"]
},
{
title: "Lemierre Syndrome",
color: "5A1A8B",
points: ["Fusobacterium necrophorum", "Septic thrombophlebitis of internal jugular vein", "Septic emboli to lungs", "Rare but life-threatening"]
},
{
title: "Airway Emergency",
color: "1A5A8B",
points: ["Neck pain + hoarseness + benign oral exam → rule out epiglottitis / deep space infection", "Contrast CT for retropharyngeal/parapharyngeal abscess", "Airway edema → rare but life-threatening", "Prepare for intubation"]
}
];
compCards.forEach((card, i) => {
const x = 0.4 + i * 3.15;
s.addShape(pres.ShapeType.roundRect, { x, y: 1.38, w: 3.0, h: 3.9, fill: { color: C.darkCard }, line: { color: card.color, pt: 2 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.rect, { x, y: 1.38, w: 3.0, h: 0.45, fill: { color: card.color }, line: { color: card.color } });
s.addText(card.title, { x: x + 0.05, y: 1.38, w: 2.9, h: 0.45, fontSize: 11.5, bold: true, color: C.white, align: "center", valign: "middle" });
s.addText(card.points.map(p => ({ text: p, options: { bullet: true, breakLine: true } })),
{ x: x + 0.1, y: 1.9, w: 2.8, h: 3.25, fontSize: 10.5, color: C.offwhite });
});
s.addText("⚠ Consider deep space infection & epiglottitis in patients who present with neck pain, hoarseness but have a benign oropharyngeal exam.", {
x: 0.4, y: 5.1, w: 9.2, h: 0.38, fontSize: 11, color: C.gold, italic: true
});
}
// ─── SLIDE 11: Special Populations & Tonsillectomy ────────────────────────────
{
let s = addSlide();
s.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 0.18, w: 3.0, h: 0.38, fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.1 });
s.addText("SPECIAL CONSIDERATIONS", { x: 0.4, y: 0.18, w: 3.0, h: 0.38, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle" });
s.addText("Special Populations & Tonsillectomy", { x: 0.4, y: 0.72, w: 9.2, h: 0.55, fontSize: 24, bold: true, color: C.white });
// Left: special pops
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.38, w: 4.5, h: 0.38, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("SPECIAL POPULATIONS", { x: 0.4, y: 1.38, w: 4.5, h: 0.38, fontSize: 11.5, bold: true, color: C.white, align: "center", valign: "middle" });
const specialPops = [
"Children <3 years: strep testing generally NOT required — low rate of suppurative complications",
"Immunocompromised: consider Candida esophagitis, CMV, HSV",
"Sexually active: consider gonococcal pharyngitis",
"HIV-positive: acute retroviral syndrome — seroconversion illness",
"Adolescents + amoxicillin rash: think EBV first",
"Crowded settings (military, schools): GAS transmission risk"
];
s.addText(specialPops.map(t => ({ text: t, options: { bullet: true, breakLine: true } })),
{ x: 0.4, y: 1.82, w: 4.5, h: 3.4, fontSize: 11, color: C.offwhite });
// Right: tonsillectomy indications
s.addShape(pres.ShapeType.rect, { x: 5.1, y: 1.38, w: 4.55, h: 0.38, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("TONSILLECTOMY INDICATIONS", { x: 5.1, y: 1.38, w: 4.55, h: 0.38, fontSize: 11.5, bold: true, color: C.navy, align: "center", valign: "middle" });
const tonsillectomyIndications = [
"Recurrent infections:", " · ≥7 episodes in 1 year", " · ≥5/year for 2 years", " · ≥3/year for 3 years",
" · >2 weeks school/work missed/year",
"Hypertrophy causing:", " · Upper airway obstruction", " · Sleep apnea / disordered breathing",
" · Deglutition problems",
"Peritonsillar abscess",
"Suspicion of malignancy"
];
s.addText(tonsillectomyIndications.map(t => ({ text: t, options: { breakLine: true, bold: t.endsWith(":") } })),
{ x: 5.1, y: 1.82, w: 4.55, h: 3.4, fontSize: 11, color: C.offwhite });
}
// ─── SLIDE 12: Summary ────────────────────────────────────────────────────────
{
let s = addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.navy }, line: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.07, fill: { color: C.teal }, line: { color: C.teal } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.555, w: "100%", h: 0.07, fill: { color: C.gold }, line: { color: C.gold } });
// Gold header bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 0.07, w: "100%", h: 0.65, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("KEY TAKEAWAYS", { x: 0, y: 0.07, w: "100%", h: 0.65, fontSize: 20, bold: true, color: C.white, align: "center", valign: "middle" });
const takeaways = [
{ num: "01", text: "Viruses cause the majority of pharyngitis. Antibiotics should NOT be prescribed based on symptoms and exam alone." },
{ num: "02", text: "Use the Modified Centor Score to guide testing. Scores of 0–1: no testing, no antibiotics. Scores ≥2: rapid antigen test." },
{ num: "03", text: "First-line treatment for GAS pharyngitis: Penicillin VK or IM Benzathine Penicillin G. Penicillin allergy: azithromycin or clindamycin." },
{ num: "04", text: "Antibiotics prevent rheumatic fever but do NOT prevent post-streptococcal glomerulonephritis. A single dose of dexamethasone reduces symptom severity." },
{ num: "05", text: "Neck pain + hoarseness with benign oral exam → think deep space infection or epiglottitis. Order CT. Secure airway early." },
{ num: "06", text: "Amoxicillin/ampicillin in EBV → characteristic pruritic maculopapular rash. Always consider EBV in exudative pharyngitis." },
];
takeaways.forEach((item, i) => {
const col = i < 3 ? 0 : 1;
const row = i % 3;
const x = 0.4 + col * 4.85;
const y = 0.95 + row * 1.52;
s.addShape(pres.ShapeType.roundRect, { x, y, w: 4.6, h: 1.42, fill: { color: C.darkCard }, line: { color: C.teal, pt: 1 }, rectRadius: 0.1 });
s.addText(item.num, { x: x + 0.08, y: y + 0.05, w: 0.5, h: 0.45, fontSize: 18, bold: true, color: C.gold });
s.addText(item.text, { x: x + 0.08, y: y + 0.48, w: 4.45, h: 0.88, fontSize: 10.5, color: C.offwhite, fontFace: "Calibri" });
});
}
// Save
pres.writeFile({ fileName: "/home/daytona/workspace/pharyngitis-pptx/Pharyngitis_Clinical_Overview.pptx" })
.then(() => console.log("Saved: Pharyngitis_Clinical_Overview.pptx"))
.catch(e => { console.error("Error:", e); process.exit(1); });
cd /home/daytona/workspace/pharyngitis-pptx && node pharyngitis.js 2>&1
ls -lh /home/daytona/workspace/pharyngitis-pptx/Pharyngitis_Clinical_Overview.pptx
Pharyngitis Clinical Overview
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title |
| 2 | Overview & Epidemiology (with stat cards) |
| 3 | Etiology — Viral vs Bacterial (two-column) |
| 4 | Signs & Symptoms / Exam Findings |
| 5 | Clinical Photos (healthy vs strep throat, exudates) |
| 6 | Modified Centor Score (McIsaac) — diagnosis table |
| 7 | GAS Pharyngitis deep dive + Complications |
| 8 | EBV / Infectious Mononucleosis (three-card layout) |
| 9 | Treatment — Viral supportive care + Antibiotic table |
| 10 | Complications & Red Flags (peritonsillar abscess, Lemierre, airway emergency) |
| 11 | Special Populations + Tonsillectomy Indications |
| 12 | Key Takeaways (6-card summary) |