Give a presentation on case histroy format for a cellulitis case
mkdir -p /home/daytona/workspace/cellulitis-presentation && ls /home/daytona/workspace/
~/cellulitis-presentation/create_pptx.js
const pptxgen = require("pptxgenjs");
let pres = new pptxgen();
pres.layout = 'LAYOUT_16x9';
pres.author = 'Medical Education';
pres.title = 'Cellulitis - Case History Format';
// ─── COLOR PALETTE ───────────────────────────────────────────────────────────
const C = {
darkBg: "0D2137", // deep navy (dominant dark)
midBg: "12344D", // mid navy for section slides
lightBg: "F0F5FA", // near-white for content slides
accent: "E05A2B", // burnt orange accent
accentAlt: "2A7FC9", // steel blue accent alt
white: "FFFFFF",
offWhite: "EDF2F7",
text: "1A2B3C", // dark navy text
subtext: "4A6278", // muted text
tableHead: "0D2137",
tableRow1: "D9E8F5",
tableRow2: "EDF2F7",
};
// ─── HELPER FUNCTIONS ────────────────────────────────────────────────────────
function titleSlide(slide) {
// Dark background gradient-like with shape
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.darkBg } });
// Accent stripe
slide.addShape(pres.ShapeType.rect, { x: 0, y: 4.2, w: 10, h: 0.12, fill: { color: C.accent } });
// Red stripe decoration top
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.5, h: 5.625, fill: { color: C.accent } });
}
function sectionSlide(slide) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.midBg } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.08, h: 5.625, fill: { color: C.accent } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 4.8, w: 10, h: 0.825, fill: { color: "091826" } });
}
function contentSlide(slide) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightBg } });
// Top header bar
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.75, fill: { color: C.darkBg } });
// Left accent line
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.75, w: 0.08, h: 4.875, fill: { color: C.accent } });
}
function addContentHeader(slide, title) {
slide.addText(title, {
x: 0.2, y: 0.08, w: 9.6, h: 0.62,
fontSize: 18, bold: true, color: C.white, align: "left", valign: "middle", margin: 0
});
}
function addSlideNumber(slide, num, total) {
slide.addText(`${num} / ${total}`, {
x: 8.8, y: 5.25, w: 1, h: 0.3,
fontSize: 9, color: C.subtext, align: "right"
});
}
function bullet(text, level) {
return { text, options: { bullet: level === 1 ? { type: "bullet", code: "2022" } : { type: "bullet", code: "25E6" }, indentLevel: level - 1, breakLine: true, fontSize: level === 1 ? 14 : 12.5, color: level === 1 ? C.text : C.subtext, bold: false } };
}
function bulletBold(text) {
return { text, options: { bullet: { type: "bullet", code: "25CF" }, bold: true, breakLine: true, fontSize: 14.5, color: C.accent } };
}
// ─── SLIDE 1: TITLE SLIDE ────────────────────────────────────────────────────
{
let s = pres.addSlide();
titleSlide(s);
s.addText("CELLULITIS", {
x: 0.8, y: 0.8, w: 8.5, h: 0.9,
fontSize: 42, bold: true, color: C.accent, align: "left", charSpacing: 6
});
s.addText("A Complete Case History Presentation", {
x: 0.8, y: 1.65, w: 8, h: 0.55,
fontSize: 20, color: C.white, align: "left", italic: true
});
s.addShape(pres.ShapeType.rect, { x: 0.8, y: 2.32, w: 4, h: 0.05, fill: { color: C.accent } });
s.addText([
{ text: "For Medical Students", options: { bold: true, breakLine: true, color: C.white, fontSize: 14 } },
{ text: "Skin & Soft Tissue Infections | Clinical Case Format", options: { color: "8AAEC8", fontSize: 12 } }
], { x: 0.8, y: 2.5, w: 7, h: 0.9 });
s.addText("Slide Topics: Definition · Etiology · Case History · Clinical Features · Investigations · Differential Diagnosis · Management · Complications", {
x: 0.8, y: 3.6, w: 8.5, h: 0.55,
fontSize: 10, color: "6A8FAA", align: "left", italic: true
});
s.addText("Andrews' Diseases of the Skin · Rosen's Emergency Medicine · Goldman-Cecil Medicine", {
x: 0.8, y: 4.3, w: 8.5, h: 0.35,
fontSize: 9, color: "4A6278"
});
}
// ─── SLIDE 2: WHAT IS CELLULITIS? ─────────────────────────────────────────────
{
let s = pres.addSlide();
contentSlide(s);
addContentHeader(s, "What is Cellulitis?");
s.addText([
bulletBold("Definition"),
bullet("Acute bacterial infection of the skin and subcutaneous tissue", 1),
bullet("Involves dermis and deeper subcutaneous layers (unlike impetigo which is superficial)", 1),
bullet("Characterised by poorly-defined, spreading erythema, warmth, swelling, and tenderness", 1),
{ text: " ", options: { breakLine: true, fontSize: 8 } },
bulletBold("Erysipelas vs Cellulitis"),
bullet("Erysipelas: well-demarcated, raised, palpable border — superficial dermis; caused by S. pyogenes", 1),
bullet("Cellulitis: poorly-defined borders, involves deeper subcutaneous tissue", 1),
{ text: " ", options: { breakLine: true, fontSize: 8 } },
bulletBold("Types"),
bullet("Nonpurulent: no pus or abscess — mainly streptococcal (Group A)", 1),
bullet("Purulent: freely draining pus — mainly staphylococcal, including CA-MRSA", 1),
], { x: 0.25, y: 0.85, w: 6.1, h: 4.6, valign: "top" });
// Info box
s.addShape(pres.ShapeType.rect, { x: 6.5, y: 0.9, w: 3.3, h: 1.5, fill: { color: "D9E8F5" }, line: { color: C.accentAlt, width: 1.5 } });
s.addText("Cellulitis is a\nsuppurative inflammation\nof the subcutaneous tissue", {
x: 6.55, y: 0.9, w: 3.2, h: 1.5, fontSize: 12.5, color: C.text, align: "center", valign: "middle", italic: true
});
s.addShape(pres.ShapeType.rect, { x: 6.5, y: 2.6, w: 3.3, h: 2.5, fill: { color: "FFF0E8" }, line: { color: C.accent, width: 1.5 } });
s.addText("Key Distinguishing Features", { x: 6.6, y: 2.65, w: 3.1, h: 0.4, fontSize: 11, bold: true, color: C.accent });
s.addText([
{ text: "Poorly defined borders", options: { bullet: true, breakLine: true, fontSize: 11, color: C.text } },
{ text: "No clear margin elevation", options: { bullet: true, breakLine: true, fontSize: 11, color: C.text } },
{ text: "Usually unilateral", options: { bullet: true, breakLine: true, fontSize: 11, color: C.text } },
{ text: "Lower extremities common", options: { bullet: true, breakLine: true, fontSize: 11, color: C.text } },
{ text: "May have systemic signs", options: { bullet: true, fontSize: 11, color: C.text } },
], { x: 6.6, y: 3.1, w: 3.1, h: 1.8 });
addSlideNumber(s, 2, 11);
}
// ─── SLIDE 3: ETIOLOGY & RISK FACTORS ────────────────────────────────────────
{
let s = pres.addSlide();
contentSlide(s);
addContentHeader(s, "Etiology & Risk Factors");
// Left column: Organisms
s.addShape(pres.ShapeType.rect, { x: 0.18, y: 0.85, w: 4.5, h: 4.55, fill: { color: C.offWhite }, line: { color: C.accentAlt, width: 1 } });
s.addText("Causative Organisms", { x: 0.3, y: 0.9, w: 4.2, h: 0.45, fontSize: 13, bold: true, color: C.accentAlt });
s.addText([
{ text: "Streptococcus pyogenes (Grp A)", options: { bullet: true, breakLine: true, bold: true, fontSize: 13, color: C.text } },
{ text: "~75% of all cellulitis cases", options: { bullet: false, breakLine: true, fontSize: 11, color: C.subtext, indentLevel: 1 } },
{ text: "Mainly nonpurulent cellulitis", options: { bullet: false, breakLine: true, fontSize: 11, color: C.subtext, indentLevel: 1 } },
{ text: " ", options: { breakLine: true, fontSize: 7 } },
{ text: "Staphylococcus aureus", options: { bullet: true, breakLine: true, bold: true, fontSize: 13, color: C.text } },
{ text: "Most of the remainder", options: { bullet: false, breakLine: true, fontSize: 11, color: C.subtext, indentLevel: 1 } },
{ text: "CA-MRSA leads purulent cases", options: { bullet: false, breakLine: true, fontSize: 11, color: C.subtext, indentLevel: 1 } },
{ text: " ", options: { breakLine: true, fontSize: 7 } },
{ text: "Other organisms (special contexts)", options: { bullet: true, breakLine: true, bold: true, fontSize: 12, color: C.text } },
{ text: "Pasteurella multocida — cat/dog bites", options: { bullet: false, breakLine: true, fontSize: 11, color: C.subtext, indentLevel: 1 } },
{ text: "Haemophilus influenzae — periorbital (children)", options: { bullet: false, breakLine: true, fontSize: 11, color: C.subtext, indentLevel: 1 } },
{ text: "Pneumococcus — immunocompromised", options: { bullet: false, fontSize: 11, color: C.subtext, indentLevel: 1 } },
], { x: 0.3, y: 1.35, w: 4.3, h: 3.8 });
// Right column: Risk factors
s.addShape(pres.ShapeType.rect, { x: 4.85, y: 0.85, w: 4.9, h: 4.55, fill: { color: C.offWhite }, line: { color: C.accent, width: 1 } });
s.addText("Risk Factors", { x: 4.95, y: 0.9, w: 4.6, h: 0.45, fontSize: 13, bold: true, color: C.accent });
s.addText([
{ text: "Portal of Entry / Skin Breach", options: { bullet: true, breakLine: true, bold: true, fontSize: 12.5, color: C.text } },
{ text: "Wounds, abrasions, ulcers", options: { bullet: false, breakLine: true, fontSize: 11, color: C.subtext, indentLevel: 1 } },
{ text: "Tinea pedis (commonest on leg)", options: { bullet: false, breakLine: true, fontSize: 11, color: C.subtext, indentLevel: 1 } },
{ text: "Insect bites, IV drug use", options: { bullet: false, breakLine: true, fontSize: 11, color: C.subtext, indentLevel: 1 } },
{ text: " ", options: { breakLine: true, fontSize: 7 } },
{ text: "Lymphatic / Venous Compromise", options: { bullet: true, breakLine: true, bold: true, fontSize: 12.5, color: C.text } },
{ text: "Venous insufficiency, lymphedema", options: { bullet: false, breakLine: true, fontSize: 11, color: C.subtext, indentLevel: 1 } },
{ text: "Prior saphenous vein surgery / lymph node dissection", options: { bullet: false, breakLine: true, fontSize: 11, color: C.subtext, indentLevel: 1 } },
{ text: " ", options: { breakLine: true, fontSize: 7 } },
{ text: "Systemic Conditions", options: { bullet: true, breakLine: true, bold: true, fontSize: 12.5, color: C.text } },
{ text: "Diabetes mellitus, obesity", options: { bullet: false, breakLine: true, fontSize: 11, color: C.subtext, indentLevel: 1 } },
{ text: "Immunosuppression, alcoholism", options: { bullet: false, breakLine: true, fontSize: 11, color: C.subtext, indentLevel: 1 } },
{ text: "Chronic kidney / liver disease", options: { bullet: false, fontSize: 11, color: C.subtext, indentLevel: 1 } },
], { x: 4.95, y: 1.35, w: 4.6, h: 3.8 });
addSlideNumber(s, 3, 11);
}
// ─── SLIDE 4: CASE PRESENTATION ──────────────────────────────────────────────
{
let s = pres.addSlide();
sectionSlide(s);
s.addText("CASE PRESENTATION", {
x: 0.5, y: 1.5, w: 9, h: 0.9,
fontSize: 36, bold: true, color: C.accent, charSpacing: 4, align: "center"
});
s.addText("Biodata · Chief Complaint · History of Presenting Illness · Past History · Family & Social History · Review of Systems", {
x: 0.5, y: 2.5, w: 9, h: 0.8,
fontSize: 13, color: "8AAEC8", align: "center", italic: true
});
s.addShape(pres.ShapeType.rect, { x: 3, y: 3.45, w: 4, h: 0.06, fill: { color: C.accent } });
s.addText("Slides 5 – 7", { x: 3, y: 3.6, w: 4, h: 0.4, fontSize: 13, color: "8AAEC8", align: "center" });
addSlideNumber(s, 4, 11);
}
// ─── SLIDE 5: BIODATA & CHIEF COMPLAINT ──────────────────────────────────────
{
let s = pres.addSlide();
contentSlide(s);
addContentHeader(s, "Case: Biodata & Chief Complaint");
// Biodata box
s.addShape(pres.ShapeType.rect, { x: 0.18, y: 0.87, w: 9.65, h: 1.55, fill: { color: "EAF1FB" }, line: { color: C.accentAlt, width: 1.2 } });
s.addText("BIODATA", { x: 0.3, y: 0.9, w: 2, h: 0.4, fontSize: 12, bold: true, color: C.accentAlt });
s.addText([
{ text: "Name: ", options: { bold: true, fontSize: 12.5, color: C.text } },
{ text: "Mr. James Adeyemi (fictional) ", options: { fontSize: 12.5, color: C.subtext } },
{ text: "Age: ", options: { bold: true, fontSize: 12.5, color: C.text } },
{ text: "52 years ", options: { fontSize: 12.5, color: C.subtext } },
{ text: "Sex: ", options: { bold: true, fontSize: 12.5, color: C.text } },
{ text: "Male", options: { fontSize: 12.5, color: C.subtext } },
], { x: 0.3, y: 1.3, w: 9.3, h: 0.4 });
s.addText([
{ text: "Occupation: ", options: { bold: true, fontSize: 12.5, color: C.text } },
{ text: "Farmer ", options: { fontSize: 12.5, color: C.subtext } },
{ text: "Address: ", options: { bold: true, fontSize: 12.5, color: C.text } },
{ text: "Rural community ", options: { fontSize: 12.5, color: C.subtext } },
{ text: "Referred from: ", options: { bold: true, fontSize: 12.5, color: C.text } },
{ text: "PHC, Admitted via Emergency", options: { fontSize: 12.5, color: C.subtext } },
], { x: 0.3, y: 1.65, w: 9.3, h: 0.4 });
// Chief complaint box
s.addShape(pres.ShapeType.rect, { x: 0.18, y: 2.55, w: 9.65, h: 1.2, fill: { color: "FFF0E8" }, line: { color: C.accent, width: 1.5 } });
s.addText("CHIEF COMPLAINT", { x: 0.3, y: 2.6, w: 9.3, h: 0.42, fontSize: 12, bold: true, color: C.accent });
s.addText('"Painful swelling and redness of the right leg with fever — 5 days duration"', {
x: 0.3, y: 2.98, w: 9.3, h: 0.65,
fontSize: 13.5, color: C.text, italic: true, align: "center"
});
// Formatting tip
s.addShape(pres.ShapeType.rect, { x: 0.18, y: 3.87, w: 9.65, h: 1.52, fill: { color: C.offWhite }, line: { color: "CCCCCC", width: 0.8 } });
s.addText("FORMAT TIP for Chief Complaint", { x: 0.3, y: 3.93, w: 9.3, h: 0.38, fontSize: 11, bold: true, color: C.subtext });
s.addText([
{ text: "Structure: ", options: { bold: true, fontSize: 11.5, color: C.text } },
{ text: "[Symptom] + [affected part/system] + [duration]", options: { fontSize: 11.5, color: C.subtext } },
{ text: " | ", options: { fontSize: 11.5, color: C.subtext } },
{ text: "In patient's own words when possible", options: { italic: true, fontSize: 11.5, color: C.subtext } },
], { x: 0.3, y: 4.32, w: 9.3, h: 0.4 });
s.addText("List each complaint on a separate line · Use lay terms · Order by severity or chronology", {
x: 0.3, y: 4.68, w: 9.3, h: 0.45,
fontSize: 10.5, color: C.subtext, italic: true
});
addSlideNumber(s, 5, 11);
}
// ─── SLIDE 6: HISTORY OF PRESENTING ILLNESS ──────────────────────────────────
{
let s = pres.addSlide();
contentSlide(s);
addContentHeader(s, "History of Presenting Illness (HPI)");
s.addText([
bulletBold("Onset & Duration"),
bullet("5 days ago — noticed redness and warmth on right lower leg after minor scratch sustained while farming", 1),
bullet("Swelling developed progressively over the next 48 hours", 1),
{ text: " ", options: { breakLine: true, fontSize: 6 } },
bulletBold("Character of Symptoms"),
bullet("Pain: constant, throbbing, worse on walking and with dependent position", 1),
bullet("Redness: intensely red, rapidly spreading proximally; not well-demarcated", 1),
bullet("Swelling: pitting on pressure; skin feels tense and shiny", 1),
{ text: " ", options: { breakLine: true, fontSize: 6 } },
bulletBold("Associated Features (SOCRATES Approach)"),
bullet("Fever: present from day 1, with chills and rigors; Tmax ~39.2 °C at home", 1),
bullet("Malaise, fatigue, loss of appetite since onset", 1),
bullet("Tender inguinal lymph nodes noticed by patient (right side)", 1),
bullet("No skin ulceration, no pus discharge, no discolouration suggesting gangrene", 1),
{ text: " ", options: { breakLine: true, fontSize: 6 } },
bulletBold("Aggravating / Relieving Factors"),
bullet("Worse with dependency (leg hanging down); partially relieved by elevation", 1),
], { x: 0.25, y: 0.85, w: 5.7, h: 4.65, valign: "top" });
// HPI Format Guide (right side)
s.addShape(pres.ShapeType.rect, { x: 6.1, y: 0.87, w: 3.72, h: 4.62, fill: { color: "EAF1FB" }, line: { color: C.accentAlt, width: 1 } });
s.addText("HPI Format Guide", { x: 6.2, y: 0.92, w: 3.5, h: 0.42, fontSize: 12, bold: true, color: C.accentAlt });
s.addText([
{ text: "O", options: { bold: true, color: C.accent, fontSize: 12 } },
{ text: " — Onset (sudden / gradual)", options: { fontSize: 11.5, color: C.text, breakLine: true } },
{ text: "S", options: { bold: true, color: C.accent, fontSize: 12 } },
{ text: " — Site", options: { fontSize: 11.5, color: C.text, breakLine: true } },
{ text: "C", options: { bold: true, color: C.accent, fontSize: 12 } },
{ text: " — Character (quality, nature)", options: { fontSize: 11.5, color: C.text, breakLine: true } },
{ text: "R", options: { bold: true, color: C.accent, fontSize: 12 } },
{ text: " — Radiation / Spread", options: { fontSize: 11.5, color: C.text, breakLine: true } },
{ text: "A", options: { bold: true, color: C.accent, fontSize: 12 } },
{ text: " — Associations (fever, LN)", options: { fontSize: 11.5, color: C.text, breakLine: true } },
{ text: "T", options: { bold: true, color: C.accent, fontSize: 12 } },
{ text: " — Time course (constant/intermittent)", options: { fontSize: 11.5, color: C.text, breakLine: true } },
{ text: "E", options: { bold: true, color: C.accent, fontSize: 12 } },
{ text: " — Exacerbating / Relieving", options: { fontSize: 11.5, color: C.text, breakLine: true } },
{ text: "S", options: { bold: true, color: C.accent, fontSize: 12 } },
{ text: " — Severity (pain score 0-10)", options: { fontSize: 11.5, color: C.text, breakLine: true } },
{ text: " ", options: { breakLine: true, fontSize: 7 } },
{ text: "Also document:", options: { bold: true, fontSize: 11.5, color: C.text, breakLine: true } },
{ text: "• Previous similar episodes", options: { fontSize: 11, color: C.subtext, breakLine: true } },
{ text: "• Treatment sought / medications taken", options: { fontSize: 11, color: C.subtext, breakLine: true } },
{ text: "• Response to prior treatment", options: { fontSize: 11, color: C.subtext } },
], { x: 6.2, y: 1.38, w: 3.5, h: 3.8 });
addSlideNumber(s, 6, 11);
}
// ─── SLIDE 7: PAST, FAMILY, SOCIAL & SYSTEMIC REVIEW ─────────────────────────
{
let s = pres.addSlide();
contentSlide(s);
addContentHeader(s, "Past History · Family & Social History · Review of Systems");
// Past history
s.addShape(pres.ShapeType.rect, { x: 0.18, y: 0.87, w: 4.6, h: 2.2, fill: { color: "FFF0E8" }, line: { color: C.accent, width: 1 } });
s.addText("Past Medical & Surgical History", { x: 0.3, y: 0.92, w: 4.3, h: 0.42, fontSize: 12, bold: true, color: C.accent });
s.addText([
{ text: "Type 2 Diabetes Mellitus", options: { bullet: true, breakLine: true, bold: true, fontSize: 12.5, color: C.text } },
{ text: "Diagnosed 6 years ago; on metformin 500 mg BD (irregular compliance)", options: { bullet: false, breakLine: true, fontSize: 11, color: C.subtext, indentLevel: 1 } },
{ text: "Tinea Pedis (chronic)", options: { bullet: true, breakLine: true, bold: true, fontSize: 12.5, color: C.text } },
{ text: "Persistent interdigital maceration — likely portal of entry", options: { bullet: false, breakLine: true, fontSize: 11, color: C.subtext, indentLevel: 1 } },
{ text: "No prior surgeries; no known drug allergies", options: { bullet: true, fontSize: 11.5, color: C.text } },
], { x: 0.3, y: 1.35, w: 4.35, h: 1.55 });
// Social & Family
s.addShape(pres.ShapeType.rect, { x: 0.18, y: 3.2, w: 4.6, h: 2.22, fill: { color: "EAF1FB" }, line: { color: C.accentAlt, width: 1 } });
s.addText("Social & Family History", { x: 0.3, y: 3.25, w: 4.3, h: 0.42, fontSize: 12, bold: true, color: C.accentAlt });
s.addText([
{ text: "Occupation: Farmer (frequent skin trauma, outdoor exposure)", options: { bullet: true, breakLine: true, fontSize: 12, color: C.text } },
{ text: "Alcohol: moderate (2 drinks/day) — risk factor for recurrence", options: { bullet: true, breakLine: true, fontSize: 12, color: C.text } },
{ text: "Smoking: non-smoker", options: { bullet: true, breakLine: true, fontSize: 12, color: C.text } },
{ text: "No family history of immunodeficiency", options: { bullet: true, fontSize: 12, color: C.text } },
], { x: 0.3, y: 3.68, w: 4.35, h: 1.55 });
// Review of systems
s.addShape(pres.ShapeType.rect, { x: 4.95, y: 0.87, w: 4.85, h: 4.55, fill: { color: C.offWhite }, line: { color: "AACCDD", width: 1 } });
s.addText("Review of Systems", { x: 5.05, y: 0.92, w: 4.6, h: 0.42, fontSize: 12, bold: true, color: C.text });
s.addText([
{ text: "Constitutional", options: { bold: true, breakLine: true, fontSize: 12.5, color: C.text, bullet: { type: "bullet", code: "25CF" } } },
{ text: "Fever, chills, rigors (+)", options: { bullet: true, breakLine: true, fontSize: 11.5, color: C.text } },
{ text: "Malaise, anorexia (+)", options: { bullet: true, breakLine: true, fontSize: 11.5, color: C.text } },
{ text: " ", options: { breakLine: true, fontSize: 6 } },
{ text: "Dermatological", options: { bold: true, breakLine: true, fontSize: 12.5, color: C.text, bullet: { type: "bullet", code: "25CF" } } },
{ text: "Red, swollen right lower leg (+)", options: { bullet: true, breakLine: true, fontSize: 11.5, color: C.text } },
{ text: "No skin ulceration, no skin necrosis (-)", options: { bullet: true, breakLine: true, fontSize: 11.5, color: C.text } },
{ text: " ", options: { breakLine: true, fontSize: 6 } },
{ text: "Lymphatics", options: { bold: true, breakLine: true, fontSize: 12.5, color: C.text, bullet: { type: "bullet", code: "25CF" } } },
{ text: "Tender right inguinal lymphadenopathy (+)", options: { bullet: true, breakLine: true, fontSize: 11.5, color: C.text } },
{ text: " ", options: { breakLine: true, fontSize: 6 } },
{ text: "Cardiovascular / Respiratory / GI / Urinary", options: { bold: true, breakLine: true, fontSize: 12.5, color: C.text, bullet: { type: "bullet", code: "25CF" } } },
{ text: "No cardiac, respiratory, GI, or urinary complaints (-)", options: { bullet: true, breakLine: true, fontSize: 11.5, color: C.text } },
{ text: " ", options: { breakLine: true, fontSize: 6 } },
{ text: "Neurological", options: { bold: true, breakLine: true, fontSize: 12.5, color: C.text, bullet: { type: "bullet", code: "25CF" } } },
{ text: "No numbness / paraesthesia of limb", options: { bullet: true, fontSize: 11.5, color: C.text } },
], { x: 5.05, y: 1.38, w: 4.6, h: 3.8 });
addSlideNumber(s, 7, 11);
}
// ─── SLIDE 8: CLINICAL EXAMINATION & PHOTO ───────────────────────────────────
{
let s = pres.addSlide();
contentSlide(s);
addContentHeader(s, "Physical Examination & Clinical Features");
s.addText([
bulletBold("General Examination"),
bullet("Patient ill-looking, in painful distress, not pale/jaundiced/cyanosed", 1),
bullet("Temp: 38.9 °C | BP: 138/86 mmHg | HR: 102/min (mild tachycardia) | RR: 18/min", 1),
{ text: " ", options: { breakLine: true, fontSize: 6 } },
bulletBold("Local Examination — Right Lower Leg"),
bullet("Erythema: intensely red, spreading, POORLY DEFINED borders", 1),
bullet("Warmth: increased local temperature on palpation", 1),
bullet("Swelling/Oedema: pitting, skin tense and shiny", 1),
bullet("Tenderness: marked on palpation", 1),
bullet("No vesicles, bullae, crepitus, or skin necrosis", 1),
{ text: " ", options: { breakLine: true, fontSize: 6 } },
bulletBold("Regional Lymph Nodes"),
bullet("Right inguinal: tender, 2 × 2 cm enlarged lymph nodes — lymphadenitis", 1),
{ text: " ", options: { breakLine: true, fontSize: 6 } },
bulletBold("Skin Marking Tip"),
bullet("Mark the border of erythema with a surgical skin marker to monitor progression/regression after starting antibiotics", 1),
], { x: 0.25, y: 0.87, w: 5.7, h: 4.65, valign: "top" });
// Clinical image
const imageUrl = "https://cdn.orris.care/cdss_images/fff9ef09cef03699b466dd01995a6b1204cd4f4a6b165a0c9b7278be7bcb661b.png";
const images = JSON.parse(require("child_process").execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js "${imageUrl}"`
).toString());
if (images[0] && images[0].base64) {
s.addImage({ data: images[0].base64, x: 6.1, y: 0.87, w: 3.6, h: 3.8 });
s.addText("Fig. Cellulitis of the lower leg\n(Andrews' Diseases of the Skin)", {
x: 6.1, y: 4.7, w: 3.6, h: 0.7,
fontSize: 9.5, color: C.subtext, align: "center", italic: true
});
}
addSlideNumber(s, 8, 11);
}
// ─── SLIDE 9: INVESTIGATIONS ──────────────────────────────────────────────────
{
let s = pres.addSlide();
contentSlide(s);
addContentHeader(s, "Investigations");
// Table
const rows = [
[
{ text: "Investigation", options: { bold: true, color: C.white, fontSize: 12 } },
{ text: "Expected Finding in Cellulitis", options: { bold: true, color: C.white, fontSize: 12 } },
{ text: "Purpose", options: { bold: true, color: C.white, fontSize: 12 } }
],
["FBC (Full Blood Count)", "Leukocytosis (neutrophilia)", "Confirm infection / severity"],
["ESR / CRP", "Elevated", "Inflammatory markers"],
["Blood Culture (x2)", "Usually negative; positive in severe/bacteraemic cases", "Rule out bacteraemia"],
["RBS / FBS / HbA1c", "Elevated in diabetes", "Identify risk factor, guide management"],
["Wound/Skin Swab Culture", "Positive if open wound present", "Guide antibiotic therapy"],
["Skin Biopsy / Aspirate", "Rarely positive — not routine", "Only for atypical/non-responsive cases"],
["X-ray of Limb", "Usually normal; gas in soft tissue = necrotising fasciitis", "Exclude subcutaneous gas"],
["Ultrasound / MRI", "Exclude deep abscess or necrotising fasciitis", "Complex / treatment-failure cases"],
["Urinalysis", "Glucosuria if uncontrolled DM", "Assess glycaemic control"],
];
s.addTable(rows, {
x: 0.18, y: 0.85, w: 9.65, h: 4.62,
colW: [2.4, 3.8, 3.45],
fill: { color: C.tableRow2 },
border: { color: "B0C8D8", pt: 0.5 },
fontFace: "Calibri",
color: C.text,
fontSize: 11,
rowH: 0.42,
align: "left",
valign: "middle",
autoPage: false,
});
// Override header row color manually through the first row options in the table
addSlideNumber(s, 9, 11);
}
// ─── SLIDE 10: DIAGNOSIS & DIFFERENTIAL DIAGNOSIS ────────────────────────────
{
let s = pres.addSlide();
contentSlide(s);
addContentHeader(s, "Diagnosis & Differential Diagnosis");
// Diagnosis box
s.addShape(pres.ShapeType.rect, { x: 0.18, y: 0.87, w: 9.65, h: 1.3, fill: { color: "FFF0E8" }, line: { color: C.accent, width: 2 } });
s.addText([
{ text: "DIAGNOSIS: ", options: { bold: true, fontSize: 15, color: C.accent } },
{ text: "Acute Nonpurulent Cellulitis of the Right Lower Limb", options: { bold: true, fontSize: 15, color: C.text } },
], { x: 0.3, y: 0.87, w: 9.3, h: 0.55, valign: "middle" });
s.addText([
{ text: "Likely Organism: ", options: { bold: true, fontSize: 12.5, color: C.text } },
{ text: "Streptococcus pyogenes (Group A) ", options: { fontSize: 12.5, color: C.subtext } },
{ text: "Portal of Entry: ", options: { bold: true, fontSize: 12.5, color: C.text } },
{ text: "Tinea pedis / minor farming abrasion ", options: { fontSize: 12.5, color: C.subtext } },
{ text: "Severity: ", options: { bold: true, fontSize: 12.5, color: C.text } },
{ text: "Moderate (systemic signs present; no septic shock)", options: { fontSize: 12.5, color: C.subtext } },
], { x: 0.3, y: 1.42, w: 9.3, h: 0.55, valign: "middle" });
// Differential diagnosis table
s.addText("Differential Diagnosis", { x: 0.18, y: 2.35, w: 9.65, h: 0.42, fontSize: 13, bold: true, color: C.text });
const ddxRows = [
[
{ text: "Condition", options: { bold: true, color: C.white, fontSize: 11.5 } },
{ text: "Key Distinguishing Feature", options: { bold: true, color: C.white, fontSize: 11.5 } },
],
["Erysipelas", "Well-demarcated, raised, palpable border; more superficial; S. pyogenes"],
["Deep Vein Thrombosis (DVT)", "No fever/erythema; positive Homan's sign; Doppler confirms"],
["Stasis Dermatitis", "No fever; bilateral; over medial malleoli; no tenderness"],
["Necrotising Fasciitis", "Pain out of proportion; skin discolouration → necrosis; septic shock"],
["Contact Dermatitis", "Itchy not painful; history of allergen exposure; eosinophilia"],
["Eosinophilic Cellulitis (Wells')", "Insect bite history; eosinophilia (not neutrophilia); less pain"],
["Erythema Migrans (Lyme)", "Less painful; tick bite; bull's-eye rash; serology positive"],
];
s.addTable(ddxRows, {
x: 0.18, y: 2.78, w: 9.65, h: 2.72,
colW: [3.2, 6.45],
fill: { color: C.tableRow2 },
border: { color: "B0C8D8", pt: 0.5 },
color: C.text,
fontSize: 11,
rowH: 0.36,
align: "left",
valign: "middle",
autoPage: false,
});
addSlideNumber(s, 10, 11);
}
// ─── SLIDE 11: MANAGEMENT ────────────────────────────────────────────────────
{
let s = pres.addSlide();
contentSlide(s);
addContentHeader(s, "Management");
// Left: Non-pharmacological
s.addShape(pres.ShapeType.rect, { x: 0.18, y: 0.87, w: 4.6, h: 2.0, fill: { color: "EAF1FB" }, line: { color: C.accentAlt, width: 1 } });
s.addText("Non-Pharmacological", { x: 0.3, y: 0.92, w: 4.3, h: 0.42, fontSize: 12, bold: true, color: C.accentAlt });
s.addText([
{ text: "Limb elevation — reduces oedema and pain", options: { bullet: true, breakLine: true, fontSize: 12, color: C.text } },
{ text: "Compress and immobilise (especially in hand cellulitis)", options: { bullet: true, breakLine: true, fontSize: 12, color: C.text } },
{ text: "Mark erythema border with pen to track response", options: { bullet: true, breakLine: true, fontSize: 12, color: C.text } },
{ text: "Wound care + removal of any foreign body", options: { bullet: true, breakLine: true, fontSize: 12, color: C.text } },
{ text: "Treat underlying tinea pedis", options: { bullet: true, fontSize: 12, color: C.text } },
], { x: 0.3, y: 1.35, w: 4.35, h: 1.38 });
// Right: Antibiotics
s.addShape(pres.ShapeType.rect, { x: 4.95, y: 0.87, w: 4.85, h: 2.0, fill: { color: "FFF0E8" }, line: { color: C.accent, width: 1 } });
s.addText("Antibiotic Therapy", { x: 5.05, y: 0.92, w: 4.6, h: 0.42, fontSize: 12, bold: true, color: C.accent });
s.addText([
{ text: "Mild-Moderate (outpatient oral):", options: { bold: true, breakLine: true, fontSize: 12, color: C.text } },
{ text: "Cephalexin 500 mg QID × 5 days (first-line)", options: { bullet: true, breakLine: true, fontSize: 11.5, color: C.text } },
{ text: "Dicloxacillin or Penicillin VK — equivalent alternatives", options: { bullet: true, breakLine: true, fontSize: 11.5, color: C.text } },
{ text: " ", options: { breakLine: true, fontSize: 6 } },
{ text: "MRSA suspected / purulent (add):", options: { bold: true, breakLine: true, fontSize: 12, color: C.text } },
{ text: "TMP-SMX (Trimethoprim-Sulfamethoxazole) — first-line for CA-MRSA", options: { bullet: true, breakLine: true, fontSize: 11.5, color: C.text } },
{ text: "Clindamycin — if penicillin/cephalosporin allergy", options: { bullet: true, fontSize: 11.5, color: C.text } },
], { x: 5.05, y: 1.35, w: 4.6, h: 1.38 });
// Severity-based table
s.addText("Severity-Based Management", { x: 0.18, y: 2.98, w: 9.65, h: 0.42, fontSize: 13, bold: true, color: C.text });
const mgmtRows = [
[
{ text: "Severity", options: { bold: true, color: C.white, fontSize: 11.5 } },
{ text: "Setting", options: { bold: true, color: C.white, fontSize: 11.5 } },
{ text: "Treatment", options: { bold: true, color: C.white, fontSize: 11.5 } },
],
["Mild (no systemic signs)", "Outpatient", "Oral cephalexin or dicloxacillin × 5 days"],
["Moderate (fever, tachycardia)", "Admit / IV then step-down", "IV cefazolin → oral cephalexin; elevation + NSAIDs"],
["Severe (sepsis/MRSA risk)", "ICU / admit", "IV vancomycin + piperacillin-tazobactam"],
["Necrotising fasciitis", "Emergency surgery", "Urgent surgical debridement + broad-spectrum IV antibiotics"],
];
s.addTable(mgmtRows, {
x: 0.18, y: 3.42, w: 9.65, h: 2.05,
colW: [2.5, 2.5, 4.65],
fill: { color: C.tableRow2 },
border: { color: "B0C8D8", pt: 0.5 },
color: C.text,
fontSize: 11,
rowH: 0.42,
align: "left",
valign: "middle",
autoPage: false,
});
addSlideNumber(s, 11, 11);
}
// ─── WRITE FILE ───────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/cellulitis-presentation/Cellulitis_Case_History.pptx" })
.then(() => console.log("SUCCESS: Cellulitis_Case_History.pptx created"))
.catch(e => { console.error("ERROR:", e); process.exit(1); });
cd /home/daytona/workspace/cellulitis-presentation && node create_pptx.js 2>&1
node /home/daytona/skills/shared/scripts/fetch_images.js "https://cdn.orris.care/cdss_images/fff9ef09cef03699b466dd01995a6b1204cd4f4a6b165a0c9b7278be7bcb661b.png" > /home/daytona/workspace/cellulitis-presentation/image_data.json 2>&1; echo "Exit: $?"
~/cellulitis-presentation/create_pptx.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/cellulitis-presentation/create_pptx.js'
cd /home/daytona/workspace/cellulitis-presentation && node create_pptx.js 2>&1
Cellulitis Case History
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title Slide - Cellulitis: A Complete Case History Presentation |
| 2 | What is Cellulitis? - Definition, erysipelas vs. cellulitis, types (purulent/nonpurulent) |
| 3 | Etiology & Risk Factors - Organisms (Strep, Staph, others) + predisposing conditions |
| 4 | Section Divider - Case Presentation section break |
| 5 | Biodata & Chief Complaint - Full patient biodata + HPI format tip |
| 6 | History of Presenting Illness (HPI) - Using the SOCRATES framework |
| 7 | Past/Family/Social History & Review of Systems |
| 8 | Physical Examination - Vitals, local findings + real clinical photo of cellulitis (leg) |
| 9 | Investigations - Table of labs, culture, imaging and their expected findings |
| 10 | Diagnosis & Differential Diagnosis - DDx table including DVT, erysipelas, necrotising fasciitis, stasis dermatitis |
| 11 | Management - Non-pharmacological + antibiotic table by severity |
Create a pdf of it
libreoffice --headless --convert-to pdf /home/daytona/workspace/cellulitis-presentation/Cellulitis_Case_History.pptx --outdir /home/daytona/workspace/cellulitis-presentation/ 2>&1
mkdir -p /home/daytona/workspace/cellulitis-presentation/pdf_out && HOME=/tmp/lo_home mkdir -p /tmp/lo_home && libreoffice --headless --convert-to pdf "/home/daytona/workspace/cellulitis-presentation/Cellulitis_Case_History.pptx" --outdir "/home/daytona/workspace/cellulitis-presentation/pdf_out/" 2>&1
ls -la /home/daytona/workspace/cellulitis-presentation/pdf_out/ 2>&1; ls -la /home/daytona/workspace/cellulitis-presentation/ 2>&1
cp /home/daytona/workspace/cellulitis-presentation/Cellulitis_Case_History.pptx /tmp/Cellulitis_Case_History.pptx && libreoffice --headless --convert-to pdf /tmp/Cellulitis_Case_History.pptx --outdir /tmp/ 2>&1 && ls -lh /tmp/Cellulitis_Case_History.pdf
cp /tmp/Cellulitis_Case_History.pdf /home/daytona/workspace/cellulitis-presentation/Cellulitis_Case_History.pdf && ls -lh /home/daytona/workspace/cellulitis-presentation/Cellulitis_Case_History.pdf
Cellulitis Case History
PDF Document · PDF
Can't open the pdf showing some error
file /home/daytona/workspace/cellulitis-presentation/Cellulitis_Case_History.pdf && python3 -c "from pypdf import PdfReader; r = PdfReader('/home/daytona/workspace/cellulitis-presentation/Cellulitis_Case_History.pdf'); print(f'Pages: {len(r.pages)}')" 2>&1
gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -sOutputFile=/tmp/Cellulitis_Case_History_v2.pdf /home/daytona/workspace/cellulitis-presentation/Cellulitis_Case_History.pdf 2>&1 && ls -lh /tmp/Cellulitis_Case_History_v2.pdf
python3 -c " from pypdf import PdfReader, PdfWriter reader = PdfReader('/home/daytona/workspace/cellulitis-presentation/Cellulitis_Case_History.pdf') writer = PdfWriter() for page in reader.pages: writer.add_page(page) writer.add_metadata({ '/Title': 'Cellulitis - Case History Presentation', '/Author': 'Medical Education', '/Subject': 'Cellulitis Case History for Medical Students', }) with open('/home/daytona/workspace/cellulitis-presentation/Cellulitis_Case_History_fixed.pdf', 'wb') as f: writer.write(f) print('Done') " 2>&1 && ls -lh /home/daytona/workspace/cellulitis-presentation/Cellulitis_Case_History_fixed.pdf
Cellulitis Case History fixed
PDF Document · PDF
Cellulitis Case History
Presentation · PPTX
Showing like this
cp /home/daytona/workspace/cellulitis-presentation/Cellulitis_Case_History.pptx /tmp/Cellulitis_Case_History.pptx && libreoffice --headless --convert-to pdf /tmp/Cellulitis_Case_History.pptx --outdir /tmp/ 2>&1 && cp /tmp/Cellulitis_Case_History.pdf /home/daytona/workspace/cellulitis-presentation/Cellulitis_Case_History_v2.pdf && ls -lh /home/daytona/workspace/cellulitis-presentation/Cellulitis_Case_History_v2.pdf
Cellulitis Case History v2
PDF Document · PDF
Cellulitis Case History
Presentation · PPTX
Thread not found) is a session expiry issue on the download link - the file itself is fine. A few tips:Same problem what a waste
Give it in typed format
| Organism | Notes |
|---|---|
| Streptococcus pyogenes (Group A) | ~75% of all cases; mainly nonpurulent |
| Staphylococcus aureus | Majority of the remainder; CA-MRSA leads purulent cases |
| Pasteurella multocida | Cat/dog bites |
| Haemophilus influenzae | Periorbital cellulitis in children |
| Pneumococcus | Immunocompromised patients |
"Painful swelling and redness of the right leg with fever - 5 days duration"
| Letter | Stands For |
|---|---|
| O | Onset (sudden / gradual) |
| S | Site |
| C | Character (quality, nature) |
| R | Radiation / Spread |
| A | Associations (fever, lymph nodes) |
| T | Time course (constant / intermittent) |
| E | Exacerbating / Relieving factors |
| S | Severity (pain score 0-10) |
| System | Findings |
|---|---|
| Constitutional | Fever, chills, rigors (+); malaise, anorexia (+) |
| Dermatological | Red swollen right lower leg (+); no ulceration/necrosis (-) |
| Lymphatics | Tender right inguinal lymphadenopathy (+) |
| CVS / Resp / GI / Urinary | No complaints (-) |
| Neurological | No numbness or paraesthesia (-) |
Skin Marking Tip: Mark the border of erythema with a surgical skin marker to monitor progression or regression after starting antibiotics.
| Investigation | Expected Finding | Purpose |
|---|---|---|
| FBC (Full Blood Count) | Leukocytosis (neutrophilia) | Confirm infection / severity |
| ESR / CRP | Elevated | Inflammatory markers |
| Blood Culture (x2) | Usually negative; positive in bacteraemic cases | Rule out bacteraemia |
| RBS / FBS / HbA1c | Elevated in diabetes | Identify risk factor; guide management |
| Wound/Skin Swab Culture | Positive if open wound present | Guide antibiotic therapy |
| Skin Biopsy / Aspirate | Rarely positive - not routine | Only for atypical/non-responsive cases |
| X-ray of Limb | Usually normal; gas = necrotising fasciitis | Exclude subcutaneous gas |
| Ultrasound / MRI | Exclude deep abscess or necrotising fasciitis | Complex/treatment-failure cases |
| Urinalysis | Glucosuria if uncontrolled DM | Assess glycaemic control |
| Condition | Key Distinguishing Feature |
|---|---|
| Erysipelas | Well-demarcated, raised, palpable border; more superficial; S. pyogenes |
| Deep Vein Thrombosis (DVT) | No fever/erythema; positive Homan's sign; confirmed on Doppler |
| Stasis Dermatitis | No fever; bilateral; over medial malleoli; not tender |
| Necrotising Fasciitis | Pain out of proportion; skin discolouration → necrosis; septic shock |
| Contact Dermatitis | Itchy not painful; history of allergen exposure; eosinophilia |
| Eosinophilic Cellulitis (Wells') | Insect bite history; eosinophilia (not neutrophilia); less painful |
| Erythema Migrans (Lyme) | Less painful; tick bite; bull's-eye rash; serology positive |
| Severity | Setting | Treatment |
|---|---|---|
| Mild (no systemic signs) | Outpatient | Oral cephalexin or dicloxacillin × 5 days |
| Moderate (fever, tachycardia) | Admit / IV then step-down | IV cefazolin → oral cephalexin; elevation + NSAIDs |
| Severe (sepsis / MRSA risk) | Admit / ICU | IV vancomycin + piperacillin-tazobactam |
| Necrotising Fasciitis | Emergency surgery | Urgent surgical debridement + broad-spectrum IV antibiotics |
| Complication | Notes |
|---|---|
| Lymphangitis | Streaks spreading proximally toward draining lymph nodes |
| Lymphadenitis | Tender regional lymph node enlargement |
| Bacteraemia / Septicaemia | Especially in immunocompromised; requires IV antibiotics |
| Necrotising Fasciitis | Deep spread to fascia; surgical emergency |
| Metastatic Abscesses | Haematogenous seeding; uncommon in immunocompetent adults |
| Chronic Lymphoedema | End result of recurrent lymphangitis; can progress to elephantiasis nostras |
| Recurrent Cellulitis | Predisposed by lymphoedema, DM, venous stasis, tinea pedis |
| Gangrene | In severe/untreated cases |
Children and immunocompromised adults are at higher risk for all complications.
Beautiful