What is management in acute or chronic tonsillitis by heading of investigation under which blood urine and special investigation then medical line of treatment with drugs its dose route and frequency and then surgical line of treatment by name of sx and in detail steps of surgery in flow chart fashion starting from consent to end of procedure and what post op instructions you will give to the patient in both english and local marathi language, make ppt of it with lots of diagrams, endoscopic and schematic and colourful chats
tonsillectomy surgical steps dissection technique endoscopic images diagram
Continue
mkdir -p /home/daytona/workspace/tonsillitis-ppt && ls /home/daytona/workspace/tonsillitis-ppt/
node /home/daytona/skills/shared/scripts/fetch_images.js \ "https://cdn.orris.care/cdss_images/e5d95d010eac00a3803aa0f491577c763fb05e202845b5a9e4d8c54b612aa35b.png" \ "https://cdn.orris.care/cdss_images/af6f7b3533646e23ef403d80b7505fe8756d42a526a892cfaf584ccfdc587a4b.png" \ "https://cdn.orris.care/cdss_images/6f36370460050800bc93d09a6f235ba1cd70a429c556a683ca882c7ce67f65da.png" \ "https://www.entlecture.com/wp-content/uploads/2025/07/Tonsillectomy-Dr-Rahul-Bagla-ENT-Textbook-1024x621.jpg" \ 2>/dev/null | node -e "const d=require('fs').readFileSync('/dev/stdin','utf8'); const arr=JSON.parse(d); arr.forEach((x,i)=>{ if(!x.error) console.log('IMG'+i+': OK len='+x.base64.length); else console.log('IMG'+i+': ERR '+x.error); });"
~/tonsillitis-ppt/build.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
// Fetch all images as base64
const imgs = JSON.parse(execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ` +
`"https://cdn.orris.care/cdss_images/e5d95d010eac00a3803aa0f491577c763fb05e202845b5a9e4d8c54b612aa35b.png" ` +
`"https://cdn.orris.care/cdss_images/af6f7b3533646e23ef403d80b7505fe8756d42a526a892cfaf584ccfdc587a4b.png" ` +
`"https://cdn.orris.care/cdss_images/6f36370460050800bc93d09a6f235ba1cd70a429c556a683ca882c7ce67f65da.png" ` +
`"https://www.entlecture.com/wp-content/uploads/2025/07/Tonsillectomy-Dr-Rahul-Bagla-ENT-Textbook-1024x621.jpg"`,
{ timeout: 60000 }
).toString());
const imgTonsillectomyDissection = imgs[0].base64; // dissection technique
const imgIncision = imgs[1].base64; // incision site for peritonsillar
const imgPosition = imgs[2].base64; // post-op positioning
const imgInstruments = imgs[3].base64; // tonsil forceps/snare
let pres = new pptxgen();
pres.layout = "LAYOUT_WIDE"; // 13.3 x 7.5
pres.title = "Tonsillitis: Management";
pres.author = "ENT Department";
// ─── COLOUR PALETTE ───────────────────────────────────────────────────────────
const C = {
navy: "1A3A5C",
blue: "1E6FA5",
sky: "3BABD1",
teal: "0E9E8F",
orange: "E8722A",
red: "C0392B",
amber: "F39C12",
green: "27AE60",
purple: "6C3483",
white: "FFFFFF",
offwhite:"F4F8FB",
lt: "D6EAF8",
gray: "7F8C8D",
dark: "17202A",
};
// ─── HELPERS ──────────────────────────────────────────────────────────────────
function addSlideBg(slide, color){ slide.background = { color }; }
function hdr(slide, text, y=0.18, color=C.white, size=28){
slide.addText(text, { x:0.3, y, w:12.7, h:0.55, fontSize:size, bold:true,
color, fontFace:"Calibri", margin:0 });
}
function subhdr(slide, text, y=0.7, color=C.sky, size=17){
slide.addText(text, { x:0.3, y, w:12.7, h:0.35, fontSize:size, bold:true,
color, fontFace:"Calibri", margin:0 });
}
function divider(slide, y=0.62, color=C.sky){
slide.addShape(pres.ShapeType.rect, { x:0.3, y, w:12.7, h:0.04, fill:{color} });
}
function box(slide, title, bullets, x, y, w, h, bgColor, titleColor, bulletColor){
slide.addShape(pres.ShapeType.rect, { x, y, w, h, fill:{color:bgColor}, line:{color:C.sky, width:1.5}, shadow:{type:"outer",color:"000000",opacity:0.18,blur:4,offset:2,angle:45} });
slide.addText(title, { x:x+0.12, y:y+0.08, w:w-0.24, h:0.38, fontSize:13, bold:true, color:titleColor, fontFace:"Calibri", margin:0 });
const items = bullets.map((b,i) => ({ text: b, options:{ bullet:{code:"25B6"}, color:bulletColor, fontSize:11.5, fontFace:"Calibri", breakLine: i<bullets.length-1 }}));
slide.addText(items, { x:x+0.12, y:y+0.46, w:w-0.24, h:h-0.54, fontFace:"Calibri", valign:"top" });
}
function flowBox(slide, text, x, y, w, h, fill, textColor, fontSize=12){
slide.addShape(pres.ShapeType.roundRect, { x, y, w, h, fill:{color:fill}, line:{color:C.navy, width:1.5}, rectRadius:0.12 });
slide.addText(text, { x, y, w, h, fontSize, bold:true, color:textColor, fontFace:"Calibri", align:"center", valign:"middle", margin:4 });
}
function arrow(slide, x1, y1, x2, y2){
slide.addShape(pres.ShapeType.line, { x:x1, y:y1, w:x2-x1, h:y2-y1,
line:{color:C.amber, width:2.5, endArrowType:"arrow"} });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s, C.navy);
// Decorative gradient bar top
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:0.18, fill:{color:C.sky} });
// Side accent
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.18, h:7.5, fill:{color:C.sky} });
// Bottom bar
s.addShape(pres.ShapeType.rect, { x:0, y:7.32, w:13.3, h:0.18, fill:{color:C.orange} });
// Left column text
s.addText("TONSILLITIS", { x:0.5, y:1.1, w:7.5, h:1.2, fontSize:56, bold:true,
color:C.white, fontFace:"Calibri", charSpacing:6 });
s.addText("Acute & Chronic", { x:0.5, y:2.3, w:7.5, h:0.6, fontSize:28, italic:true,
color:C.sky, fontFace:"Calibri" });
s.addShape(pres.ShapeType.rect, { x:0.5, y:2.95, w:4.5, h:0.06, fill:{color:C.orange} });
s.addText([
{ text:"Investigations | ", options:{ bold:true, color:C.amber } },
{ text:"Medical Management | ", options:{ bold:true, color:C.sky } },
{ text:"Surgical Tonsillectomy", options:{ bold:true, color:C.green } },
], { x:0.5, y:3.15, w:9, h:0.45, fontSize:14, fontFace:"Calibri" });
s.addText([
{ text:"Post-Op Instructions: ", options:{ bold:true, color:C.white } },
{ text:"English & मराठी", options:{ bold:true, color:C.amber } },
], { x:0.5, y:3.7, w:9, h:0.4, fontSize:14, fontFace:"Calibri" });
// Right image panel
if(imgInstruments){
s.addImage({ data:imgInstruments, x:8.6, y:1.0, w:4.4, h:3.0, sizing:{type:"contain",w:4.4,h:3.0} });
}
s.addText("ENT Department | June 2026", { x:0.5, y:6.9, w:12, h:0.35, fontSize:12,
color:C.gray, fontFace:"Calibri" });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — OVERVIEW / CONTENTS
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s, C.offwhite);
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:0.85, fill:{color:C.navy} });
hdr(s, "📋 Presentation Overview", 0.17, C.white, 26);
const topics = [
{ n:"01", title:"Tonsillitis — Types & Pathogens", color:C.blue },
{ n:"02", title:"Investigations (Blood · Urine · Special)", color:C.teal },
{ n:"03", title:"Medical Line of Treatment (Drugs, Doses, Routes)", color:C.green },
{ n:"04", title:"Surgical Line — Tonsillectomy Indications", color:C.orange },
{ n:"05", title:"Surgical Steps Flowchart — Consent to Closure", color:C.red },
{ n:"06", title:"Post-Op Care & Complications", color:C.purple },
{ n:"07", title:"Post-Op Instructions in English", color:C.blue },
{ n:"08", title:"Post-Op Instructions in मराठी (Marathi)", color:C.amber },
];
topics.forEach((t, i) => {
const col = i < 4 ? 0 : 1;
const row = i % 4;
const x = 0.4 + col * 6.5;
const y = 1.05 + row * 1.5;
s.addShape(pres.ShapeType.rect, { x, y, w:6.2, h:1.32,
fill:{color:C.white}, line:{color:t.color, width:3},
shadow:{type:"outer",color:"888888",opacity:0.15,blur:4,offset:2,angle:45} });
s.addShape(pres.ShapeType.rect, { x, y, w:0.6, h:1.32, fill:{color:t.color} });
s.addText(t.n, { x, y, w:0.6, h:1.32, fontSize:22, bold:true, color:C.white,
fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
s.addText(t.title, { x:x+0.7, y:y+0.22, w:5.4, h:0.88, fontSize:13.5,
bold:true, color:C.navy, fontFace:"Calibri", valign:"middle" });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — TYPES & PATHOLOGY
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s, C.offwhite);
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:0.85, fill:{color:C.blue} });
hdr(s, "🦠 Tonsillitis — Types & Causative Organisms", 0.17, C.white, 24);
// Acute box
s.addShape(pres.ShapeType.rect, { x:0.3, y:1.0, w:6.0, h:5.9,
fill:{color:"E8F4FD"}, line:{color:C.blue, width:2} });
s.addShape(pres.ShapeType.rect, { x:0.3, y:1.0, w:6.0, h:0.5, fill:{color:C.blue} });
s.addText("🔴 ACUTE TONSILLITIS", { x:0.3, y:1.0, w:6.0, h:0.5, fontSize:15,
bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
const acuteBullets = [
{ text:"Definition: ", options:{bold:true,color:C.navy,fontSize:12,fontFace:"Calibri"} },
{ text:"Acute inflammatory episode of palatine tonsils\n", options:{color:C.dark,fontSize:12,fontFace:"Calibri"} },
{ text:"Pathogens:\n", options:{bold:true,color:C.blue,fontSize:12,fontFace:"Calibri"} },
{ text:"• BACTERIAL (50%): Group A β-hemolytic Streptococcus (GABHS) — most common\n Staphylococcus, H. influenzae, anaerobes\n", options:{color:C.dark,fontSize:11.5,fontFace:"Calibri"} },
{ text:"• VIRAL (50%): Adenovirus, Rhinovirus, Coxsackie, RSV, Influenza,\n EBV (Infectious Mononucleosis — glandular fever)\n", options:{color:C.dark,fontSize:11.5,fontFace:"Calibri"} },
{ text:"Symptoms:\n", options:{bold:true,color:C.blue,fontSize:12,fontFace:"Calibri"} },
{ text:"• Sore throat, high fever, dysphagia\n• General malaise, referred otalgia\n• Tender upper cervical lymphadenopathy\n", options:{color:C.dark,fontSize:11.5,fontFace:"Calibri"} },
{ text:"Signs:\n", options:{bold:true,color:C.blue,fontSize:12,fontFace:"Calibri"} },
{ text:"• Swollen, erythematous tonsils\n• Yellow/white follicles (follicular tonsillitis)\n• Exudate on tonsillar surface", options:{color:C.dark,fontSize:11.5,fontFace:"Calibri"} },
];
s.addText(acuteBullets, { x:0.45, y:1.55, w:5.7, h:5.2, valign:"top", fontFace:"Calibri" });
// Chronic box
s.addShape(pres.ShapeType.rect, { x:6.6, y:1.0, w:6.4, h:5.9,
fill:{color:"FDFEFE"}, line:{color:C.teal, width:2} });
s.addShape(pres.ShapeType.rect, { x:6.6, y:1.0, w:6.4, h:0.5, fill:{color:C.teal} });
s.addText("🟡 CHRONIC TONSILLITIS", { x:6.6, y:1.0, w:6.4, h:0.5, fontSize:15,
bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
const chronicBullets = [
{ text:"Definition: ", options:{bold:true,color:C.navy,fontSize:12,fontFace:"Calibri"} },
{ text:"Persistent tonsillar infection with repeated acute episodes or persistent symptoms >3 months\n", options:{color:C.dark,fontSize:12,fontFace:"Calibri"} },
{ text:"Pathology:\n", options:{bold:true,color:C.teal,fontSize:12,fontFace:"Calibri"} },
{ text:"• Repeated GABHS infections → chronic inflammation\n• Crypts filled with debris, caseous tonsilloliths\n• Fibrosis and scarring of tonsillar tissue\n• Persistent biofilm within crypts\n", options:{color:C.dark,fontSize:11.5,fontFace:"Calibri"} },
{ text:"Symptoms:\n", options:{bold:true,color:C.teal,fontSize:12,fontFace:"Calibri"} },
{ text:"• Recurrent/persistent sore throat\n• Bad breath (halitosis), foreign body sensation\n• Tonsillar enlargement with debris in crypts\n• Cervical lymphadenopathy\n", options:{color:C.dark,fontSize:11.5,fontFace:"Calibri"} },
{ text:"Paradise Criteria for Surgery:\n", options:{bold:true,color:C.orange,fontSize:12,fontFace:"Calibri"} },
{ text:"• ≥7 episodes/year, OR\n• ≥5 episodes/year × 2 consecutive years, OR\n• ≥3 episodes/year × 3 consecutive years", options:{color:C.dark,fontSize:11.5,fontFace:"Calibri"} },
];
s.addText(chronicBullets, { x:6.75, y:1.55, w:6.1, h:5.2, valign:"top", fontFace:"Calibri" });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — INVESTIGATIONS
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s, C.offwhite);
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:0.85, fill:{color:C.teal} });
hdr(s, "🔬 Investigations in Tonsillitis", 0.17, C.white, 24);
// BLOOD column
s.addShape(pres.ShapeType.rect, { x:0.25, y:0.95, w:4.1, h:6.3,
fill:{color:"EBF5FB"}, line:{color:C.blue, width:2} });
s.addShape(pres.ShapeType.rect, { x:0.25, y:0.95, w:4.1, h:0.5, fill:{color:C.blue} });
s.addText("🩸 BLOOD INVESTIGATIONS", { x:0.25, y:0.95, w:4.1, h:0.5, fontSize:13,
bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
const bloodItems = [
["CBC", "↑ TLC (bacterial)\nLymphocytosis (viral/EBV)\nNeutrophilia (bacterial)\n↓ Platelets (EBV)"],
["ESR", "Elevated in bacterial > viral infection"],
["CRP", "Elevated — marker of acute inflammation"],
["Blood Culture", "If septicaemia suspected; identifies bacteraemia"],
["Monospot Test", "Heterophile antibody test for EBV\n85% sensitive, 100% specific\nRepeat weekly × 6 wks if initially negative"],
["EBV Serology", "VCA-IgM, VCA-IgG, EA, EBNA\nIf monospot negative after 6 weeks"],
["ASO Titre", "Antistreptolysin-O\nIndicates PRIOR GABHS infection\nNot for acute diagnosis"],
["Blood glucose", "Pre-anaesthetic baseline if surgery planned"],
];
let by = 1.55;
bloodItems.forEach(([name, val]) => {
s.addText([
{ text:name+": ", options:{bold:true, color:C.blue, fontSize:11} },
{ text:val, options:{color:C.dark, fontSize:10.5} }
], { x:0.4, y:by, w:3.8, h:0.7, fontFace:"Calibri", valign:"top" });
by += 0.72;
});
// URINE column
s.addShape(pres.ShapeType.rect, { x:4.6, y:0.95, w:3.8, h:6.3,
fill:{color:"EAFAF1"}, line:{color:C.green, width:2} });
s.addShape(pres.ShapeType.rect, { x:4.6, y:0.95, w:3.8, h:0.5, fill:{color:C.green} });
s.addText("🧪 URINE INVESTIGATIONS", { x:4.6, y:0.95, w:3.8, h:0.5, fontSize:13,
bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
const urineItems = [
["Routine Urine\nExamination (RUE)", "Rule out glomerulonephritis\n(post-streptococcal complication)\n• Haematuria, proteinuria,\n casts = nephritis"],
["Urine Culture\n& Sensitivity", "If urinary tract infection\ncoexists (especially in\npediatric patients)"],
["24-hr Urine\nProtein", "If nephrotic syndrome\nsuspected as complication\nof streptococcal disease"],
["Pre-op Urine\nRoutine", "Mandatory before GA:\n• Rule out infection\n• Detect diabetes (glycosuria)\n• Assess renal function"],
];
let uy = 1.55;
urineItems.forEach(([name, val]) => {
s.addText([
{ text:name+"\n", options:{bold:true, color:C.green, fontSize:11} },
{ text:val, options:{color:C.dark, fontSize:10.5} }
], { x:4.75, y:uy, w:3.5, h:1.5, fontFace:"Calibri", valign:"top" });
uy += 1.52;
});
// SPECIAL column
s.addShape(pres.ShapeType.rect, { x:8.6, y:0.95, w:4.45, h:6.3,
fill:{color:"FEF9E7"}, line:{color:C.amber, width:2} });
s.addShape(pres.ShapeType.rect, { x:8.6, y:0.95, w:4.45, h:0.5, fill:{color:C.amber} });
s.addText("⭐ SPECIAL INVESTIGATIONS", { x:8.6, y:0.95, w:4.45, h:0.5, fontSize:13,
bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
const specItems = [
["Throat Swab\nC&S", "Swab from tonsillar surface\nIdentifies pathogen & sensitivities\nDone BEFORE antibiotics"],
["Rapid Antigen\nDetection Test\n(RADT)", "Rapid Strep A test\nResult in 5-10 min\nIf negative → throat culture\nSensitivity 85-90%"],
["X-ray Soft\nTissue Neck\n(lateral)", "Rule out retropharyngeal\nabscess, adenoid hypertrophy\nAirway assessment"],
["Sleep Study\n(PSG)", "Polysomnography\nIf obstructive sleep apnoea\nsuspected (tonsillar hypertrophy)"],
["Bleeding Time\n& Clotting Time\n(BT/CT)", "Pre-operative mandatory\nABNORMAL = contraindication\nto surgery"],
["PT / INR\naPTT", "Pre-op coagulation screen\nEspecially if anticoagulants\nor bleeding history"],
["ECG / Chest X-ray", "Pre-anaesthetic workup\n(adults >40 yr or comorbidities)"],
];
let sy = 1.55;
specItems.forEach(([name, val]) => {
s.addText([
{ text:name+"\n", options:{bold:true, color:C.amber, fontSize:11} },
{ text:val, options:{color:C.dark, fontSize:10.5} }
], { x:8.75, y:sy, w:4.15, h:0.87, fontFace:"Calibri", valign:"top" });
sy += 0.88;
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — MEDICAL TREATMENT (ACUTE)
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s, C.offwhite);
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:0.85, fill:{color:C.green} });
hdr(s, "💊 Medical Management — Acute Tonsillitis", 0.17, C.white, 24);
// Table header
const cols = [1.8, 2.2, 2.0, 1.6, 2.2, 2.2];
const headers = ["Drug", "Dose", "Route", "Frequency", "Duration", "Notes"];
const hcolors = [C.navy, C.blue, C.teal, C.green, C.orange, C.purple];
let hx = 0.22;
cols.forEach((w, i) => {
s.addShape(pres.ShapeType.rect, { x:hx, y:0.92, w, h:0.42, fill:{color:hcolors[i]} });
s.addText(headers[i], { x:hx, y:0.92, w, h:0.42, fontSize:12, bold:true,
color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
hx += w;
});
const rows = [
// Antibiotics
["Phenoxymethyl-\npenicillin (Pen V)", "250-500 mg (adult)\n125 mg (child <5)", "Oral", "4× daily\n(6-hrly)", "10 days", "DRUG OF CHOICE\nAvoid ampicillin\n(EBV rash risk)"],
["Benzylpenicillin\n(Pen G)", "600 mg–1.2g (adult)\n300-600 mg (child)", "IV / IM", "4–6 hrly", "5-7 days\n→ oral", "Severe disease;\nswitch to oral\nwhen improving"],
["Amoxicillin-\nClavulanate", "625 mg (adult)\n30 mg/kg/day (child)", "Oral", "3× daily\n(8-hrly)", "7-10 days", "2nd line; mixed\nor resistant cases"],
["Azithromycin", "500 mg day1;\n250 mg days 2-5", "Oral", "OD", "5 days", "Penicillin allergy;\nZ-pack regimen"],
["Clindamycin", "300-450 mg (adult)\n10-13 mg/kg/day", "Oral / IV", "3× daily\n(8-hrly)", "10 days", "Pen allergy +\nGABHS carrier"],
// Analgesics
["Paracetamol", "500 mg–1g (adult)\n15 mg/kg (child)", "Oral / PR / IV", "4–6 hrly\n(max 4g/day)", "As needed", "First-line analgesia;\nantipyretic"],
["Ibuprofen", "400 mg (adult)\n5-10 mg/kg (child)", "Oral", "8 hrly\n(with food)", "3-5 days", "Anti-inflammatory;\navoid in EBV\n(splenomegaly risk)"],
// Corticosteroids
["Dexamethasone", "0.6 mg/kg (max 10 mg)", "IM / IV / Oral", "Single dose", "Once", "Rapid pain relief;\nreduces edema;\nuse with antibiotics"],
["Prednisolone", "1 mg/kg/day (max 60 mg)", "Oral", "OD morning", "3-5 days", "Oral steroid course;\nsevere tonsillitis"],
// Saline gargle
["Normal Saline\nGargle + Betadine", "Warm saline\n0.9%", "Topical\n(gargle)", "4–6× daily", "Until recovery", "Soothing; reduces\nbacterial load;\ndo not swallow"],
];
const rowBg = ["F0F8FF","FDFEFE","F0F8FF","FDFEFE","F0F8FF","FFF9E6","FFF9E6","E9F7EF","E9F7EF","FFF5F5"];
const catLabels = { 0:"ANTIBIOTICS", 5:"ANALGESICS", 7:"CORTICOSTEROIDS", 9:"ADJUNCTS" };
let ry = 1.38;
rows.forEach((row, ri) => {
if(catLabels[ri]){
s.addShape(pres.ShapeType.rect, { x:0.22, y:ry, w:12.88, h:0.25,
fill:{color: ri===0?C.blue:ri===5?C.orange:ri===7?C.teal:C.red} });
s.addText(catLabels[ri], { x:0.22, y:ry, w:12.88, h:0.25,
fontSize:10.5, bold:true, color:C.white, fontFace:"Calibri", align:"left", valign:"middle", margin:6 });
ry += 0.25;
}
s.addShape(pres.ShapeType.rect, { x:0.22, y:ry, w:12.88, h:0.56, fill:{color:rowBg[ri]}, line:{color:"CCCCCC",width:0.5} });
let cx = 0.22;
row.forEach((cell, ci) => {
s.addText(cell, { x:cx+0.05, y:ry+0.02, w:cols[ci]-0.1, h:0.52,
fontSize:9.5, color:C.dark, fontFace:"Calibri", valign:"middle", wrap:true });
cx += cols[ci];
});
ry += 0.56;
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — MEDICAL TREATMENT (CHRONIC + SPECIAL SITUATIONS)
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s, C.offwhite);
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:0.85, fill:{color:"2980B9"} });
hdr(s, "💊 Medical Management — Chronic Tonsillitis & Special Situations", 0.17, C.white, 22);
// Chronic tonsillitis box
s.addShape(pres.ShapeType.rect, { x:0.25, y:0.95, w:6.0, h:3.0, fill:{color:"EBF5FB"}, line:{color:C.blue,width:2} });
s.addShape(pres.ShapeType.rect, { x:0.25, y:0.95, w:6.0, h:0.42, fill:{color:C.blue} });
s.addText("CHRONIC TONSILLITIS — Medical", { x:0.25, y:0.95, w:6.0, h:0.42,
fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
s.addText([
{ text:"• Long-course antibiotics (Amoxicillin-Clavulanate or Clindamycin) × 4-6 weeks\n", options:{color:C.dark, fontSize:11.5, fontFace:"Calibri"} },
{ text:"• Probiotics ", options:{bold:true, color:C.blue, fontSize:11.5, fontFace:"Calibri"} },
{ text:"to restore oropharyngeal flora\n", options:{color:C.dark, fontSize:11.5, fontFace:"Calibri"} },
{ text:"• Mucolytics ", options:{bold:true, color:C.blue, fontSize:11.5, fontFace:"Calibri"} },
{ text:"(Carbocisteine, Bromhexine) for cryptic debris\n", options:{color:C.dark, fontSize:11.5, fontFace:"Calibri"} },
{ text:"• Antiseptic gargles ", options:{bold:true, color:C.blue, fontSize:11.5, fontFace:"Calibri"} },
{ text:"(Chlorhexidine, Betadine) twice daily\n", options:{color:C.dark, fontSize:11.5, fontFace:"Calibri"} },
{ text:"• NSAIDs + Analgesics ", options:{bold:true, color:C.blue, fontSize:11.5, fontFace:"Calibri"} },
{ text:"during acute exacerbations\n", options:{color:C.dark, fontSize:11.5, fontFace:"Calibri"} },
{ text:"• Medical therapy is DEFINITIVE only if surgical criteria NOT met", options:{bold:true, color:C.red, fontSize:11.5, fontFace:"Calibri"} },
], { x:0.4, y:1.42, w:5.7, h:2.45, valign:"top" });
// Quinsy box
s.addShape(pres.ShapeType.rect, { x:6.5, y:0.95, w:6.55, h:3.0, fill:{color:"FEF9E7"}, line:{color:C.amber,width:2} });
s.addShape(pres.ShapeType.rect, { x:6.5, y:0.95, w:6.55, h:0.42, fill:{color:C.amber} });
s.addText("PERITONSILLAR ABSCESS (QUINSY) — Treatment", { x:6.5, y:0.95, w:6.55, h:0.42,
fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
s.addText([
{ text:"1. IV High-dose Penicillin G ", options:{bold:true, color:C.amber, fontSize:11.5, fontFace:"Calibri"} },
{ text:"or Cephalosporin\n (Ceftriaxone 1-2g IV 12-hrly)\n", options:{color:C.dark, fontSize:11.5, fontFace:"Calibri"} },
{ text:"2. Needle Aspiration ", options:{bold:true, color:C.amber, fontSize:11.5, fontFace:"Calibri"} },
{ text:"(preferred) — wide bore needle at point of maximal fluctuation\n", options:{color:C.dark, fontSize:11.5, fontFace:"Calibri"} },
{ text:"3. Incision & Drainage (I&D) ", options:{bold:true, color:C.amber, fontSize:11.5, fontFace:"Calibri"} },
{ text:"under LA if aspiration fails\n Incision midpoint: base of uvula ↔ upper 3rd molar\n", options:{color:C.dark, fontSize:11.5, fontFace:"Calibri"} },
{ text:"4. Steroids + Analgesics ", options:{bold:true, color:C.amber, fontSize:11.5, fontFace:"Calibri"} },
{ text:"for symptomatic relief\n", options:{color:C.dark, fontSize:11.5, fontFace:"Calibri"} },
{ text:"5. Interval Tonsillectomy ", options:{bold:true, color:C.red, fontSize:11.5, fontFace:"Calibri"} },
{ text:"after 4-6 weeks if ≥2 episodes quinsy or background tonsillitis", options:{color:C.dark, fontSize:11.5, fontFace:"Calibri"} },
], { x:6.65, y:1.42, w:6.25, h:2.45, valign:"top" });
// Complications box
s.addShape(pres.ShapeType.rect, { x:0.25, y:4.1, w:6.0, h:3.1, fill:{color:"FDEDEC"}, line:{color:C.red,width:2} });
s.addShape(pres.ShapeType.rect, { x:0.25, y:4.1, w:6.0, h:0.42, fill:{color:C.red} });
s.addText("⚠️ COMPLICATIONS of Tonsillitis", { x:0.25, y:4.1, w:6.0, h:0.42,
fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
s.addText([
{ text:"LOCAL:\n", options:{bold:true, color:C.red, fontSize:11.5, fontFace:"Calibri"} },
{ text:"• Peritonsillar abscess (Quinsy)\n• Parapharyngeal abscess\n• Retropharyngeal abscess\n• Ludwig's angina\n", options:{color:C.dark, fontSize:11.5, fontFace:"Calibri"} },
{ text:"NON-INFECTIVE (GABHS):\n", options:{bold:true, color:C.red, fontSize:11.5, fontFace:"Calibri"} },
{ text:"• Rheumatic fever (carditis)\n• Post-streptococcal glomerulonephritis\n• PANDAS syndrome", options:{color:C.dark, fontSize:11.5, fontFace:"Calibri"} },
], { x:0.4, y:4.57, w:5.7, h:2.55, valign:"top" });
// EBV specific box
s.addShape(pres.ShapeType.rect, { x:6.5, y:4.1, w:6.55, h:3.1, fill:{color:"EAF2FF"}, line:{color:C.purple,width:2} });
s.addShape(pres.ShapeType.rect, { x:6.5, y:4.1, w:6.55, h:0.42, fill:{color:C.purple} });
s.addText("EBV / Glandular Fever — Special Notes", { x:6.5, y:4.1, w:6.55, h:0.42,
fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
s.addText([
{ text:"• DO NOT give Ampicillin/Amoxicillin\n", options:{bold:true, color:C.red, fontSize:12, fontFace:"Calibri"} },
{ text:" → causes widespread maculopapular rash in EBV\n", options:{color:C.dark, fontSize:11.5, fontFace:"Calibri"} },
{ text:"• Avoid contact sports/strenuous activity\n", options:{color:C.dark, fontSize:12, fontFace:"Calibri"} },
{ text:" → Risk of splenic rupture (hepatosplenomegaly)\n", options:{color:C.dark, fontSize:11.5, fontFace:"Calibri"} },
{ text:"• Prednisolone ", options:{bold:true, color:C.purple, fontSize:12, fontFace:"Calibri"} },
{ text:"for severe airway oedema (1 mg/kg/day × 5 days)\n", options:{color:C.dark, fontSize:11.5, fontFace:"Calibri"} },
{ text:"• Supportive care: rest, fluids, analgesics\n", options:{color:C.dark, fontSize:11.5, fontFace:"Calibri"} },
{ text:"• Tonsillectomy CONTRAINDICATED ", options:{bold:true, color:C.red, fontSize:12, fontFace:"Calibri"} },
{ text:"in acute phase", options:{color:C.dark, fontSize:11.5, fontFace:"Calibri"} },
], { x:6.65, y:4.57, w:6.25, h:2.55, valign:"top" });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — SURGICAL INDICATIONS
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s, C.offwhite);
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:0.85, fill:{color:C.red} });
hdr(s, "🔪 Surgical Management — Tonsillectomy Indications", 0.17, C.white, 24);
// Absolute indications
s.addShape(pres.ShapeType.rect, { x:0.25, y:0.95, w:6.2, h:2.9,
fill:{color:"FDEDEC"}, line:{color:C.red, width:2.5} });
s.addShape(pres.ShapeType.rect, { x:0.25, y:0.95, w:6.2, h:0.45, fill:{color:C.red} });
s.addText("🔴 ABSOLUTE INDICATIONS", { x:0.25, y:0.95, w:6.2, h:0.45,
fontSize:14, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
const absItems = [
"Obstructive sleep apnoea (OSA) with tonsillar hypertrophy",
"Chronic respiratory tract obstruction causing cor pulmonale",
"Suspected tonsillar malignancy (unilateral enlargement, ulceration)",
"Tonsillar enlargement causing dysphagia / failure to thrive (children)",
"Recurrent febrile convulsions due to tonsillitis",
];
absItems.forEach((item, i) => {
s.addShape(pres.ShapeType.rect, { x:0.35, y:1.47+i*0.44, w:0.28, h:0.28, fill:{color:C.red}, roundedCorners:true });
s.addText(item, { x:0.72, y:1.47+i*0.44, w:5.55, h:0.38, fontSize:11, color:C.dark, fontFace:"Calibri", valign:"middle" });
});
// Relative indications
s.addShape(pres.ShapeType.rect, { x:6.7, y:0.95, w:6.35, h:2.9,
fill:{color:"FEF9E7"}, line:{color:C.amber, width:2.5} });
s.addShape(pres.ShapeType.rect, { x:6.7, y:0.95, w:6.35, h:0.45, fill:{color:C.amber} });
s.addText("🟡 RELATIVE INDICATIONS", { x:6.7, y:0.95, w:6.35, h:0.45,
fontSize:14, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
const relItems = [
"Recurrent acute tonsillitis (Paradise criteria met)",
"Chronic tonsillitis unresponsive to antibiotics",
"Peritonsillar abscess — ≥2 episodes or 1st episode + tonsillitis history",
"Tonsillar asymmetry (rule out malignancy)",
"Diphtheria carrier",
"Systemic disease by β-haemolytic Strep (nephritis, rheumatic fever)",
];
relItems.forEach((item, i) => {
s.addShape(pres.ShapeType.rect, { x:6.8, y:1.47+i*0.44, w:0.28, h:0.28, fill:{color:C.amber}, roundedCorners:true });
s.addText(item, { x:7.17, y:1.47+i*0.44, w:5.75, h:0.38, fontSize:11, color:C.dark, fontFace:"Calibri", valign:"middle" });
});
// Contraindications
s.addShape(pres.ShapeType.rect, { x:0.25, y:3.98, w:6.2, h:2.9,
fill:{color:"F0F0F0"}, line:{color:C.gray, width:2} });
s.addShape(pres.ShapeType.rect, { x:0.25, y:3.98, w:6.2, h:0.45, fill:{color:C.gray} });
s.addText("⛔ CONTRAINDICATIONS", { x:0.25, y:3.98, w:6.2, h:0.45,
fontSize:14, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
const ciItems = [
"Acute infection / active tonsillitis (wait 4-6 weeks)",
"Bleeding disorders (haemophilia, ITP, thrombocytopenia)",
"Uncontrolled systemic disease (DM, hypertension, cardiac)",
"Cleft palate / submucous cleft (risk VPI)",
"Acute EBV (Infectious Mononucleosis)",
"Age <1 year (risk of airway compromise)",
];
ciItems.forEach((item, i) => {
s.addShape(pres.ShapeType.rect, { x:0.35, y:4.5+i*0.44, w:0.28, h:0.28, fill:{color:C.gray}, roundedCorners:true });
s.addText(item, { x:0.72, y:4.5+i*0.44, w:5.55, h:0.38, fontSize:11, color:C.dark, fontFace:"Calibri", valign:"middle" });
});
// Image
if(imgInstruments){
s.addImage({ data:imgInstruments, x:6.85, y:4.05, w:6.1, h:3.2,
sizing:{type:"contain",w:6.1,h:3.2} });
}
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 — SURGICAL FLOWCHART (Part 1: Consent → Anaesthesia → Positioning)
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s, "0D1B2A");
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:0.85, fill:{color:C.orange} });
hdr(s, "⚙️ Tonsillectomy — Surgical Flowchart (Part 1: Pre-op to Anaesthesia)", 0.17, C.navy, 22);
const steps = [
{ n:"01", title:"INFORMED CONSENT", color:"E74C3C", details:"• Explain procedure, risks, benefits\n• Haemorrhage risk (1-5%)\n• Pain, infection, rare VPI\n• Written consent signed by patient/guardian\n• Blood group & cross-match consent" },
{ n:"02", title:"PRE-OPERATIVE WORKUP", color:"8E44AD", details:"• CBC, BT/CT, PT/INR, Blood group\n• RUE, Blood glucose, Urine R&M\n• Chest X-ray + ECG (if indicated)\n• Throat swab C&S\n• Nil by mouth ≥6 hrs (solids) / 2 hrs (clear fluids)" },
{ n:"03", title:"ANAESTHETIC ASSESSMENT", color:"2471A3", details:"• ENT + Anaesthesia fitness\n• ASA classification\n• Airway assessment (Mallampati)\n• Pre-medication: Midazolam 0.1 mg/kg IM or oral\n• Pre-op Dexamethasone 0.1 mg/kg IV" },
{ n:"04", title:"GENERAL ANAESTHESIA (GA)", color:"117A65", details:"• Inhalational induction: Sevoflurane in O₂/N₂O\n• IV access → Propofol / Thiopentone\n• Endotracheal intubation (oral RAE tube)\n• Maintenance: Sevoflurane + O₂\n• Throat pack INSERTED — document in notes!" },
{ n:"05", title:"PATIENT POSITIONING", color:"B7950B", details:"• Supine position\n• Neck extended with sandbag/shoulder roll\n• Rose position (hyperextended neck)\n• Head-ring or horseshoe headrest\n• Table tilted 10° Trendelenburg\n• Eyes taped/padded — protect corneas" },
{ n:"06", title:"DRAPING & EXPOSURE", color:"6E2F2F", details:"• Mouth gag inserted (Boyle-Davis gag)\n• Gag suspended on Draffin bipod / Crowe-Davis\n• Adequate mouth opening verified\n• Tongue depressor blade checked\n• Suction available — Yankauer catheter\n• Headlight / OR microscope ready" },
];
steps.forEach((step, i) => {
const col = i % 3;
const row = Math.floor(i / 3);
const x = 0.22 + col * 4.35;
const y = 0.98 + row * 3.1;
s.addShape(pres.ShapeType.rect, { x, y, w:4.15, h:2.85,
fill:{color:"1A2E3E"}, line:{color:step.color, width:2.5} });
s.addShape(pres.ShapeType.rect, { x, y, w:4.15, h:0.5, fill:{color:step.color} });
s.addText("STEP " + step.n + " | " + step.title, { x, y, w:4.15, h:0.5,
fontSize:11.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
s.addText(step.details, { x:x+0.12, y:y+0.55, w:3.91, h:2.22,
fontSize:10.5, color:"D5E8F8", fontFace:"Calibri", valign:"top", wrap:true });
// Arrow down between rows
if(row === 0 && col === 2){
arrow(s, x+2.07, y+2.85, x+2.07, y+3.1);
}
// Arrow right within row (except last in row)
if(col < 2){
arrow(s, x+4.15, y+1.42, x+4.35, y+1.42);
}
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 — SURGICAL FLOWCHART (Part 2: Dissection to Closure)
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s, "0D1B2A");
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:0.85, fill:{color:C.sky} });
hdr(s, "⚙️ Tonsillectomy — Surgical Flowchart (Part 2: Dissection to Closure)", 0.17, C.navy, 22);
const steps = [
{ n:"07", title:"TONSIL GRASPING", color:"1F618D", details:"• Tonsil grasped with Allis / tonsil-holding forceps\n• Tonsil retracted medially\n• Upper pole identified\n• COLD STEEL technique preferred\n (lowest secondary bleed rate)" },
{ n:"08", title:"MUCOSAL INCISION", color:"117A65", details:"• Incision in mucosa of anterior faucial pillar\n• Curved scissors (Eve's or Gwynne-Evans)\n• Incision from upper pole → lower pole\n• Identify tonsil capsule clearly\n• Stay in the avascular areolar plane" },
{ n:"09", title:"CAPSULAR DISSECTION", color:"6C3483", details:"• Blunt dissection between capsule & superior constrictor\n• Use dissector or gauze swab\n• Free tonsil from its bed — upper → lower pole\n• Small inferior pedicle preserved last\n• Avoid injury to superior constrictor muscle" },
{ n:"10", title:"PEDICLE DIVISION", color:"B7950B", details:"• Inferior pedicle divided using\n tonsillar snare (wire snare) OR scissors\n• Tonsil removed completely with capsule\n• Specimen to histology if malignancy suspected\n• Repeat on contralateral side" },
{ n:"11", title:"HAEMOSTASIS", color:"C0392B", details:"• Tonsillar fossa packed with hot moist swab 3-5 min\n• Inspect fossa under good light\n• Bleeding vessels: Bipolar diathermy (preferred)\n OR suture ligation (Vicryl 3-0)\n• Count swabs — THROAT PACK REMOVED (document!)" },
{ n:"12", title:"REVERSAL & RECOVERY", color:"117864", details:"• Verify throat pack removed BEFORE extubation\n• Anaesthesia reversed: Neostigmine + Glycopyrrolate\n• Extubation awake (to protect airway)\n• LEFT LATERAL (tonsil) POSITION post-extubation\n• Transfer to recovery — continuous monitoring" },
];
steps.forEach((step, i) => {
const col = i % 3;
const row = Math.floor(i / 3);
const x = 0.22 + col * 4.35;
const y = 0.98 + row * 3.1;
s.addShape(pres.ShapeType.rect, { x, y, w:4.15, h:2.85,
fill:{color:"0F2233"}, line:{color:step.color, width:2.5} });
s.addShape(pres.ShapeType.rect, { x, y, w:4.15, h:0.5, fill:{color:step.color} });
s.addText("STEP " + step.n + " | " + step.title, { x, y, w:4.15, h:0.5,
fontSize:11.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
s.addText(step.details, { x:x+0.12, y:y+0.55, w:3.91, h:2.22,
fontSize:10.5, color:"D5E8F8", fontFace:"Calibri", valign:"top", wrap:true });
if(col < 2){
arrow(s, x+4.15, y+1.42, x+4.35, y+1.42);
}
if(row === 0 && col === 2){
arrow(s, x+2.07, y+2.85, x+2.07, y+3.1);
}
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 — SURGICAL IMAGES + TECHNIQUES COMPARISON
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s, C.offwhite);
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:0.85, fill:{color:C.purple} });
hdr(s, "🔭 Tonsillectomy — Surgical Techniques & Illustrations", 0.17, C.white, 24);
// Technique comparison table
const techs = [
{ name:"Cold Steel\n+ Ties", bleed1:"0.8%", bleed2:"1.0%", pain:"Low", notes:"Gold standard\nLowest secondary bleed" },
{ name:"Bipolar\nDiathermy", bleed1:"0.4%", bleed2:"4.3%", pain:"Moderate", notes:"Less primary bleed\nHigher secondary" },
{ name:"Coblation®", bleed1:"1.0%", bleed2:"3.6%", pain:"Low–Mod", notes:"Plasma ablation\n37-40°C tissue temp" },
{ name:"Laser\n(CO₂/KTP)", bleed1:"0.8%", bleed2:"2.5%", pain:"Moderate", notes:"Expensive; less\nused routinely" },
{ name:"Harmonic\nScalpel", bleed1:"0.7%", bleed2:"2.8%", pain:"Low–Mod", notes:"Ultrasonic vibration\nminimal thermal spread" },
];
const thdr = ["Technique","Primary\nBleed %","Secondary\nBleed %","Pain","Notes"];
const twid = [2.0, 1.5, 1.6, 1.4, 2.3];
let tx = 0.25;
thdr.forEach((h, i) => {
s.addShape(pres.ShapeType.rect, { x:tx, y:0.93, w:twid[i], h:0.45, fill:{color:C.purple} });
s.addText(h, { x:tx, y:0.93, w:twid[i], h:0.45, fontSize:11.5, bold:true,
color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
tx += twid[i];
});
techs.forEach((t, ri) => {
const row = [t.name, t.bleed1, t.bleed2, t.pain, t.notes];
let cx = 0.25;
const bg = ri%2===0 ? "EAF2FF" : "FFFFFF";
row.forEach((cell, ci) => {
s.addShape(pres.ShapeType.rect, { x:cx, y:1.38+ri*0.72, w:twid[ci], h:0.72,
fill:{color:bg}, line:{color:"CCCCCC", width:0.5} });
s.addText(cell, { x:cx+0.05, y:1.38+ri*0.72, w:twid[ci]-0.1, h:0.72,
fontSize:10.5, color:C.dark, fontFace:"Calibri", valign:"middle", align:"center" });
cx += twid[ci];
});
});
// Dissection technique image
if(imgTonsillectomyDissection){
s.addShape(pres.ShapeType.rect, { x:9.0, y:0.93, w:4.1, h:3.65,
fill:{color:"F0F0F0"}, line:{color:C.purple, width:2} });
s.addImage({ data:imgTonsillectomyDissection, x:9.05, y:0.98, w:4.0, h:3.55,
sizing:{type:"contain", w:4.0, h:3.55} });
}
// Instruments image
if(imgInstruments){
s.addShape(pres.ShapeType.rect, { x:0.25, y:5.0, w:8.6, h:2.3,
fill:{color:"F5EFF7"}, line:{color:C.purple, width:1.5} });
s.addImage({ data:imgInstruments, x:0.3, y:5.05, w:8.5, h:2.2,
sizing:{type:"contain", w:8.5, h:2.2} });
}
if(imgIncision){
s.addShape(pres.ShapeType.rect, { x:9.0, y:4.7, w:4.1, h:2.6,
fill:{color:"F5EFF7"}, line:{color:C.purple, width:1.5} });
s.addImage({ data:imgIncision, x:9.05, y:4.75, w:4.0, h:2.5,
sizing:{type:"contain", w:4.0, h:2.5} });
s.addText("Quinsy Incision Site", { x:9.0, y:7.22, w:4.1, h:0.22,
fontSize:10, italic:true, color:C.gray, fontFace:"Calibri", align:"center" });
}
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 — POST-OP CARE & COMPLICATIONS
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s, C.offwhite);
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:0.85, fill:{color:"17202A"} });
hdr(s, "🏥 Post-Operative Care & Complications of Tonsillectomy", 0.17, C.white, 24);
// Immediate post-op
s.addShape(pres.ShapeType.rect, { x:0.25, y:0.93, w:6.2, h:3.1, fill:{color:"EBF5FB"}, line:{color:C.blue,width:2} });
s.addShape(pres.ShapeType.rect, { x:0.25, y:0.93, w:6.2, h:0.42, fill:{color:C.blue} });
s.addText("IMMEDIATE POST-OP (0-24 hrs)", { x:0.25, y:0.93, w:6.2, h:0.42,
fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
s.addText([
{ text:"Monitoring:\n", options:{bold:true, color:C.blue, fontSize:12, fontFace:"Calibri"} },
{ text:"• Pulse, BP every 15 min × 2 hrs, then hourly\n• Watch for excessive swallowing (signs of bleed)\n• SpO₂ continuous monitoring\n• Nausea/vomiting management: Ondansetron 4-8 mg IV\n\n", options:{color:C.dark, fontSize:11.5, fontFace:"Calibri"} },
{ text:"Position:\n", options:{bold:true, color:C.blue, fontSize:12, fontFace:"Calibri"} },
{ text:"• LEFT LATERAL (tonsil) position until awake\n• Semi-recumbent once alert\n\n", options:{color:C.dark, fontSize:11.5, fontFace:"Calibri"} },
{ text:"Analgesia:\n", options:{bold:true, color:C.blue, fontSize:12, fontFace:"Calibri"} },
{ text:"• Paracetamol IV 15 mg/kg 6-hrly + Diclofenac PR\n• Patient-controlled analgesia (PCA) if adult\n• Ice packs to neck", options:{color:C.dark, fontSize:11.5, fontFace:"Calibri"} },
], { x:0.4, y:1.4, w:5.9, h:2.55, valign:"top" });
// Discharge criteria
s.addShape(pres.ShapeType.rect, { x:6.7, y:0.93, w:6.35, h:3.1, fill:{color:"EAFAF1"}, line:{color:C.green,width:2} });
s.addShape(pres.ShapeType.rect, { x:6.7, y:0.93, w:6.35, h:0.42, fill:{color:C.green} });
s.addText("DISCHARGE CRITERIA (Day 0 / Day 1)", { x:6.7, y:0.93, w:6.35, h:0.42,
fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
s.addText([
{ text:"• Tolerating oral fluids\n• Adequate pain control on oral analgesics\n• No active bleeding\n• Afebrile or low-grade fever only\n• SpO₂ ≥95% on room air\n• Responsible adult caregiver at home\n• Written post-op instructions given (English + Marathi)\n• Emergency contact number provided\n• Follow-up appointment scheduled: 2 weeks", options:{color:C.dark, fontSize:12, fontFace:"Calibri"} },
], { x:6.85, y:1.4, w:6.05, h:2.55, valign:"top" });
// Complications
s.addShape(pres.ShapeType.rect, { x:0.25, y:4.15, w:12.8, h:3.15, fill:{color:"FDEDEC"}, line:{color:C.red,width:2} });
s.addShape(pres.ShapeType.rect, { x:0.25, y:4.15, w:12.8, h:0.42, fill:{color:C.red} });
s.addText("⚠️ COMPLICATIONS", { x:0.25, y:4.15, w:12.8, h:0.42,
fontSize:14, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
const compCols = [
{ title:"PRIMARY HAEMORRHAGE\n(Within 24 hrs)", color:C.red, content:"Reactionary bleed from vessels\n• Mild: local pressure, ice, topical adrenaline\n• Severe: return to OT under GA\n Suture ligation / diathermy\n Blood transfusion if needed" },
{ title:"SECONDARY HAEMORRHAGE\n(Day 5-10)", color:"C0392B", content:"Infection-related slough separation\n• Commonest complication\n• IV antibiotics (broad-spectrum)\n• H₂O₂ gargle dilute\n• OT if persistent: undersuture fossa" },
{ title:"INFECTION", color:C.orange, content:"White fibrinous slough = normal healing\nPurulent discharge = infection\n• Co-Amoxiclav 625 mg TDS × 7 days\n• Anaerobic cover: Metronidazole" },
{ title:"OTHER COMPLICATIONS", color:C.purple, content:"• Pain + referred otalgia (Arnold's nerve)\n• Velopharyngeal insufficiency (VPI) — rare\n (avoid if submucous cleft)\n• Airway obstruction: tongue oedema, laryngospasm\n• Dental injury from gag\n• Aspiration of blood/debris" },
];
compCols.forEach((c, i) => {
const x = 0.35 + i * 3.2;
s.addShape(pres.ShapeType.rect, { x, y:4.6, w:3.1, h:0.35, fill:{color:c.color} });
s.addText(c.title, { x, y:4.6, w:3.1, h:0.35, fontSize:9.5, bold:true,
color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
s.addText(c.content, { x:x+0.05, y:5.0, w:3.0, h:2.2,
fontSize:10, color:C.dark, fontFace:"Calibri", valign:"top", wrap:true });
});
// Post-op position image
if(imgPosition){
s.addImage({ data:imgPosition, x:0.25, y:4.6, w:0, h:0 }); // hidden — already used as reference
}
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 — POST-OP INSTRUCTIONS (ENGLISH)
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s, "F0F9FF");
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:0.85, fill:{color:C.navy} });
hdr(s, "📋 Post-Operative Instructions — English", 0.17, C.white, 26);
const sections = [
{
icon:"🍽️", title:"DIET & FLUIDS", color:C.green,
items:[
"Start with cool fluids (water, juice, cold milk) immediately after surgery",
"Progress to soft, cool foods: ice cream, yoghurt, custard, mashed potato, soup (cool)",
"Avoid hot, spicy, hard, crunchy foods for 2 weeks (e.g. chips, toast, biscuits)",
"Eat and swallow regularly — chewing and swallowing helps healing",
"Drink at least 8-10 glasses of water per day — stay well hydrated",
]
},
{
icon:"💊", title:"PAIN MANAGEMENT", color:C.blue,
items:[
"Take Paracetamol 500-1000 mg every 6 hours regularly (not just when hurting)",
"Ibuprofen 400 mg every 8 hours with food — take as prescribed",
"Pain is worst on Days 3-7; white patches in throat are NORMAL healing tissue",
"Throat pain may be felt in one or both ears — this is referred pain, not ear infection",
"Do NOT take Aspirin — it increases bleeding risk",
]
},
{
icon:"🏠", title:"REST & ACTIVITY", color:C.teal,
items:[
"Rest at home for 10-14 days — avoid school, work, crowded places",
"No vigorous physical activity, running or sports for 2 weeks",
"Avoid swimming pools for 3 weeks (risk of infection)",
"Sleep with head slightly elevated (extra pillow) for the first week",
"Adults: avoid driving for 24 hours after GA",
]
},
{
icon:"🚨", title:"WHEN TO SEEK EMERGENCY CARE", color:C.red,
items:[
"BLEEDING from the mouth or spitting blood — go to A&E IMMEDIATELY",
"Difficulty breathing or noisy breathing",
"Inability to swallow any fluids for more than 24 hours",
"High fever > 38.5°C not settling with paracetamol",
"Foul-smelling discharge with worsening throat pain after Day 7",
]
},
];
sections.forEach((sec, si) => {
const col = si % 2;
const row = Math.floor(si / 2);
const x = 0.25 + col * 6.6;
const y = 0.95 + row * 3.3;
s.addShape(pres.ShapeType.rect, { x, y, w:6.3, h:3.1,
fill:{color:C.white}, line:{color:sec.color, width:2.5},
shadow:{type:"outer",color:"888888",opacity:0.12,blur:4,offset:2,angle:45} });
s.addShape(pres.ShapeType.rect, { x, y, w:6.3, h:0.48, fill:{color:sec.color} });
s.addText(sec.icon + " " + sec.title, { x, y, w:6.3, h:0.48, fontSize:13,
bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
const bulletItems = sec.items.map((item, ii) => ({
text: item,
options:{ bullet:{code:"25B6"}, color:C.dark, fontSize:11, fontFace:"Calibri",
breakLine: ii < sec.items.length-1 }
}));
s.addText(bulletItems, { x:x+0.15, y:y+0.54, w:5.98, h:2.48, valign:"top" });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 13 — POST-OP INSTRUCTIONS (MARATHI)
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s, "FFF8E1");
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:0.85, fill:{color:"7D6608"} });
s.addText("📋 शस्त्रक्रियेनंतरच्या सूचना — मराठी", { x:0.3, y:0.17, w:12.7, h:0.55,
fontSize:26, bold:true, color:C.white, fontFace:"Noto Sans Devanagari", margin:0 });
s.addText("(Post-Operative Instructions in Marathi)", { x:0.3, y:0.6, w:12.7, h:0.28,
fontSize:12, italic:true, color:"F5D76E", fontFace:"Calibri", margin:0 });
const mSections = [
{
icon:"🍽️", title:"आहार व पाणी", color:C.green,
items:[
"शस्त्रक्रियेनंतर थंड पाणी, फळांचा रस, थंड दूध पिणे सुरू करा",
"मऊ थंड अन्न खा — आइस्क्रीम, दही, मसला भात, सूप (थंड)",
"तीखट, गरम, कडक, खुसखुशीत पदार्थ २ आठवडे टाळा",
"दर ६-८ तासांनी थोडे थोडे खाण्याचा प्रयत्न करा — जेवण गिळण्याने बरे होते",
"दिवसभरात कमीत कमी ८-१० ग्लास पाणी प्या",
]
},
{
icon:"💊", title:"वेदना व्यवस्थापन", color:C.blue,
items:[
"पॅरासिटामॉल ५०० mg दर ६ तासांनी नियमित घ्या",
"आयबुप्रोफेन ४०० mg जेवणानंतर दर ८ तासांनी घ्या",
"३ ते ७ दिवसांत घसा सर्वात जास्त दुखतो — हे सामान्य आहे",
"घशातील पांढरे डाग सामान्य बरे होण्याचे चिन्ह आहे — घाबरू नका",
"कान दुखत असल्यास काळजी करू नका — हे कधीकधी घशाचे दुखणे कानात जाते",
]
},
{
icon:"🏠", title:"विश्रांती व हालचाल", color:C.teal,
items:[
"१०-१४ दिवस घरी विश्रांती घ्या — शाळा, काम, गर्दीची ठिकाणे टाळा",
"२ आठवडे जोरदार व्यायाम, धावणे, खेळ टाळा",
"३ आठवडे जलतरण तलावात जाऊ नका",
"पहिल्या आठवड्यात उशीचा आधार घेऊन डोके थोडे उंच ठेवून झोपा",
"झोपेत तोंडातून रक्त आले तर ताबडतोब डॉक्टरांना सांगा",
]
},
{
icon:"🚨", title:"तातडीने दवाखान्यात जा जर...", color:C.red,
items:[
"तोंडातून रक्त येणे किंवा खोकताना रक्त पडणे — ताबडतोब जवळच्या रुग्णालयात जा",
"श्वास घेण्यास त्रास होणे किंवा श्वास घेताना आवाज येणे",
"२४ तास कोणताही द्रव पिता येत नसल्यास",
"ताप ३८.५°C पेक्षा जास्त राहत असल्यास",
"७ दिवसांनंतर घशात खूप जास्त दुखणे व दुर्गंध येत असल्यास",
]
},
];
mSections.forEach((sec, si) => {
const col = si % 2;
const row = Math.floor(si / 2);
const x = 0.25 + col * 6.6;
const y = 0.95 + row * 3.3;
s.addShape(pres.ShapeType.rect, { x, y, w:6.3, h:3.1,
fill:{color:C.white}, line:{color:sec.color, width:2.5},
shadow:{type:"outer",color:"888888",opacity:0.12,blur:4,offset:2,angle:45} });
s.addShape(pres.ShapeType.rect, { x, y, w:6.3, h:0.48, fill:{color:sec.color} });
s.addText(sec.icon + " " + sec.title, { x, y, w:6.3, h:0.48, fontSize:14,
bold:true, color:C.white, fontFace:"Noto Sans Devanagari", align:"center", valign:"middle", margin:0 });
const bulletItems = sec.items.map((item, ii) => ({
text: item,
options:{ bullet:{code:"25B6"}, color:C.dark, fontSize:10.5,
fontFace:"Noto Sans Devanagari", breakLine: ii < sec.items.length-1 }
}));
s.addText(bulletItems, { x:x+0.15, y:y+0.54, w:5.98, h:2.48, valign:"top" });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 14 — COMPLETE SURGICAL MASTER FLOWCHART
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s, "0A0E1A");
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:0.7, fill:{color:C.amber} });
s.addText("🗺️ COMPLETE TONSILLECTOMY — MASTER FLOWCHART (Consent → End)", {
x:0.3, y:0.1, w:12.7, h:0.5, fontSize:20, bold:true,
color:C.navy, fontFace:"Calibri", margin:0, align:"center" });
const chain = [
{ label:"INFORMED\nCONSENT", fill:"C0392B" },
{ label:"PRE-OP\nWORKUP", fill:"8E44AD" },
{ label:"ANAESTHETIC\nASSESSMENT", fill:"2471A3" },
{ label:"GA +\nINTUBATION", fill:"117A65" },
{ label:"THROAT PACK\nINSERTED", fill:"B7950B" },
{ label:"POSITIONING\n(Rose)", fill:"6E2F2F" },
{ label:"BOYLE-DAVIS\nGAG", fill:"1A5276" },
{ label:"TONSIL\nGRASPED", fill:"1F618D" },
{ label:"MUCOSAL\nINCISION", fill:"117A65" },
{ label:"CAPSULAR\nDISSECTION", fill:"6C3483" },
{ label:"PEDICLE\nSECTION", fill:"B7950B" },
{ label:"HAEMOSTASIS\n(Bipolar/Ties)", fill:"C0392B" },
{ label:"THROAT PACK\nREMOVED✓", fill:"D35400" },
{ label:"REVERSAL +\nEXTUBATION", fill:"117864" },
{ label:"LATERAL\nPOSITION", fill:"1A5276" },
{ label:"RECOVERY\nROOM", fill:"196F3D" },
];
// 2 rows of 8
chain.forEach((step, i) => {
const col = i % 8;
const row = Math.floor(i / 8);
const x = 0.2 + col * 1.62;
const y = 0.82 + row * 3.2;
s.addShape(pres.ShapeType.roundRect, { x, y, w:1.4, h:0.9,
fill:{color:step.fill}, line:{color:"FFFFFF", width:1}, rectRadius:0.08 });
s.addText(step.label, { x, y, w:1.4, h:0.9, fontSize:9, bold:true,
color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:2 });
// horizontal arrow within row
if(col < 7){
arrow(s, x+1.4, y+0.45, x+1.62, y+0.45);
}
// down arrow end of row 0
if(row === 0 && col === 7){
arrow(s, x+0.7, y+0.9, x+0.7, y+3.2);
}
});
// Discharge flowchart below
const dischargeSteps = [
{ label:"WARD\nOBSERVATION", fill:"1A5276" },
{ label:"IV → ORAL\nFLUIDS", fill:"117A65" },
{ label:"PAIN\nCONTROL", fill:"8E44AD" },
{ label:"NO\nBLEEDING", fill:"C0392B" },
{ label:"DISCHARGE\nCRITERIA MET", fill:"196F3D" },
{ label:"WRITTEN\nINSTRUCTIONS", fill:"2471A3" },
{ label:"FOLLOW-UP\n@ 2 WEEKS", fill:"D35400" },
];
dischargeSteps.forEach((step, i) => {
const x = 0.2 + i * 1.9;
const y = 6.1;
s.addShape(pres.ShapeType.roundRect, { x, y, w:1.7, h:0.9,
fill:{color:step.fill}, line:{color:"FFFFFF", width:1}, rectRadius:0.08 });
s.addText(step.label, { x, y, w:1.7, h:0.9, fontSize:9, bold:true,
color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:2 });
if(i < dischargeSteps.length-1){
arrow(s, x+1.7, y+0.45, x+1.9, y+0.45);
}
});
s.addText("POST-OPERATIVE PATHWAY", { x:0.2, y:5.82, w:13.5, h:0.28,
fontSize:12, bold:true, color:C.amber, fontFace:"Calibri" });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 15 — CLOSING / SUMMARY
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s, C.navy);
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.18, h:7.5, fill:{color:C.sky} });
s.addShape(pres.ShapeType.rect, { x:0, y:7.32, w:13.3, h:0.18, fill:{color:C.orange} });
s.addText("KEY TAKEAWAYS", { x:0.5, y:0.6, w:12, h:0.6, fontSize:32, bold:true,
color:C.white, fontFace:"Calibri", charSpacing:4 });
s.addShape(pres.ShapeType.rect, { x:0.5, y:1.22, w:5.0, h:0.06, fill:{color:C.orange} });
const points = [
{ icon:"🔬", text:"Throat swab C&S, CBC, ESR, CRP, Monospot/EBV serology, BT/CT are the cornerstones of investigation" },
{ icon:"💊", text:"Penicillin V is first-line antibiotic; never give Ampicillin if EBV suspected; add steroids (Dexamethasone) for rapid symptom relief" },
{ icon:"🔪", text:"Cold steel dissection with ligatures has the lowest secondary haemorrhage rate (1%)" },
{ icon:"⚙️", text:"Throat pack documentation and removal before extubation is non-negotiable — a critical safety step" },
{ icon:"🩸", text:"Secondary haemorrhage (Day 5-10) is the most common complication; patients must return immediately if any oral bleeding" },
{ icon:"🏥", text:"Post-op instructions in the patient's language (Marathi) improve compliance and reduce emergency re-admissions" },
];
points.forEach((p, i) => {
s.addText(p.icon + " " + p.text, {
x:0.5, y:1.4 + i*0.95, w:12.2, h:0.82,
fontSize:14, color:i%2===0?C.white:"A9D8F0",
fontFace:"Calibri", valign:"middle",
bullet:false
});
if(i < points.length-1){
s.addShape(pres.ShapeType.line, { x:0.5, y:2.18+i*0.95, w:12.2, h:0,
line:{color:"334455", width:0.75} });
}
});
s.addText("Source: Bailey & Love 28e | Scott-Brown's ORL Vol 2 | KJ Lee's Essential Otolaryngology | Cummings ORL", {
x:0.5, y:7.05, w:12, h:0.3, fontSize:10, color:C.gray, fontFace:"Calibri" });
}
// ─── WRITE FILE ───────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/tonsillitis-ppt/Tonsillitis_Management.pptx" })
.then(() => console.log("✅ DONE: Tonsillitis_Management.pptx"))
.catch(e => { console.error("ERROR:", e); process.exit(1); });
Complete the ppt
cd /home/daytona/workspace/tonsillitis-ppt && node build.js 2>&1
ls -lh /home/daytona/workspace/tonsillitis-ppt/Tonsillitis_Management.pptx
Continue
Tonsillitis Management
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title Slide - Bold navy/sky theme with tonsillectomy instrument image |
| 2 | Presentation Overview - Colour-coded 8-topic index |
| 3 | Types & Pathology - Acute vs Chronic side-by-side with pathogens, symptoms, signs, Paradise criteria |
| 4 | Investigations - 3-column layout: Blood / Urine / Special investigations with all tests, interpretation notes |
| 5 | Medical Treatment (Acute) - Full drug table: Drug, Dose, Route, Frequency, Duration, Notes - covering antibiotics, analgesics, corticosteroids, adjuncts |
| 6 | Medical Treatment (Chronic + Special) - Chronic tonsillitis regimen, Quinsy I&D treatment, EBV special precautions, Complications |
| 7 | Surgical Indications - Absolute vs Relative vs Contraindications with colour-coded boxes |
| 8 | Surgical Flowchart Part 1 - Steps 01-06: Consent → Pre-op workup → Anaesthesia → GA → Positioning → Draping (dark theme with arrows) |
| 9 | Surgical Flowchart Part 2 - Steps 07-12: Grasping → Incision → Capsular dissection → Pedicle division → Haemostasis → Reversal |
| 10 | Techniques & Illustrations - Comparison table (Cold Steel/Bipolar/Coblation/Laser/Harmonic) with textbook surgical diagram images |
| 11 | Post-Op Care & Complications - Immediate monitoring, discharge criteria, haemorrhage management |
| 12 | Post-Op Instructions - English - 4 colour boxes: Diet, Pain, Rest, Emergency signs |
| 13 | Post-Op Instructions - मराठी - Same 4 boxes fully translated in Devanagari script |
| 14 | Master Flowchart - Full procedure in 2 rows of 16 connected boxes (Consent → Follow-up) on dark background |
| 15 | Key Takeaways - 6 evidence-based summary points with sources cited |