Examination of lump or swelling Make ppt according to s das

Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File
Running Command

ls -la /home/daytona/workspace/ && mkdir -p /home/daytona/workspace/lump-swelling-ppt

Writing File

~/lump-swelling-ppt/build.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Examination of Lump or Swelling";
pres.author = "S Das - A Manual on Clinical Surgery";

// ── COLOUR PALETTE ──────────────────────────────────────────────────
const C = {
  navy:   "0A1931",
  blue:   "1A4A8A",
  steel:  "2D6FA3",
  teal:   "1B7B8A",
  gold:   "E8A020",
  white:  "FFFFFF",
  light:  "EAF2FB",
  mid:    "B8D4ED",
  gray:   "4A5568",
  lgray:  "F0F4F8",
  red:    "C0392B",
  green:  "1A7A4A",
};

// helper: slide accent bar (top)
function accentBar(slide, color = C.gold) {
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: "100%", h: 0.08,
    fill: { color },
    line: { color, width: 0 },
  });
}

// helper: section label pill
function pill(slide, text, x, y, w = 2.8, color = C.steel) {
  slide.addShape(pres.ShapeType.roundRect, {
    x, y, w, h: 0.38,
    fill: { color },
    line: { color, width: 0 },
    rectRadius: 0.19,
  });
  slide.addText(text, {
    x, y, w, h: 0.38,
    fontSize: 11, bold: true, color: C.white,
    align: "center", valign: "middle", margin: 0,
  });
}

// helper: numbered card
function numCard(slide, num, label, detail, x, y, w, h, accent = C.steel) {
  slide.addShape(pres.ShapeType.roundRect, {
    x, y, w, h,
    fill: { color: C.white },
    line: { color: accent, width: 1.5 },
    shadow: { type: "outer", color: "888888", blur: 4, offset: 2, angle: 45, opacity: 0.2 },
    rectRadius: 0.1,
  });
  // number badge
  slide.addShape(pres.ShapeType.ellipse, {
    x: x + 0.1, y: y + 0.08, w: 0.45, h: 0.45,
    fill: { color: accent },
    line: { color: accent, width: 0 },
  });
  slide.addText(String(num), {
    x: x + 0.1, y: y + 0.08, w: 0.45, h: 0.45,
    fontSize: 12, bold: true, color: C.white,
    align: "center", valign: "middle", margin: 0,
  });
  slide.addText(label, {
    x: x + 0.63, y: y + 0.08, w: w - 0.75, h: 0.28,
    fontSize: 11, bold: true, color: accent,
    align: "left", valign: "middle", margin: 0,
  });
  slide.addText(detail, {
    x: x + 0.15, y: y + 0.42, w: w - 0.25, h: h - 0.52,
    fontSize: 9.5, color: C.gray,
    align: "left", valign: "top", margin: 0,
    wrap: true,
  });
}

// ════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  // full background gradient-style rectangle
  s.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: "100%", h: "100%",
    fill: { type: "solid", color: C.navy },
    line: { color: C.navy, width: 0 },
  });
  // decorative side strip
  s.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 0.35, h: "100%",
    fill: { color: C.steel },
    line: { color: C.steel, width: 0 },
  });
  s.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 0.12, h: "100%",
    fill: { color: C.gold },
    line: { color: C.gold, width: 0 },
  });

  // Main title
  s.addText("EXAMINATION OF A LUMP", {
    x: 0.6, y: 1.05, w: 9.0, h: 0.85,
    fontSize: 42, bold: true, color: C.white,
    align: "left", valign: "middle", margin: 0,
    charSpacing: 2,
  });
  s.addText("OR SWELLING", {
    x: 0.6, y: 1.85, w: 9.0, h: 0.75,
    fontSize: 36, bold: true, color: C.gold,
    align: "left", valign: "middle", margin: 0,
  });

  // divider
  s.addShape(pres.ShapeType.line, {
    x: 0.6, y: 2.65, w: 8.8, h: 0,
    line: { color: C.steel, width: 1.5 },
  });

  s.addText("Based on S Das — A Manual on Clinical Surgery (13th Edition)", {
    x: 0.6, y: 2.8, w: 9.0, h: 0.4,
    fontSize: 14, color: C.mid,
    align: "left", italic: true,
  });
  s.addText("Systematic Clinical Assessment: History • Inspection • Palpation • Special Tests", {
    x: 0.6, y: 3.35, w: 9.0, h: 0.38,
    fontSize: 12.5, color: C.mid,
    align: "left",
  });
  s.addText("Chapter 3 — Principles of Surgical Diagnosis", {
    x: 0.6, y: 4.9, w: 9.0, h: 0.35,
    fontSize: 11, color: "6688AA",
    align: "left", italic: true,
  });
}

// ════════════════════════════════════════════════════
// SLIDE 2 — OVERVIEW / OVERVIEW OF ASSESSMENT
// ════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.lgray };
  accentBar(s, C.navy);

  s.addText("OVERVIEW OF ASSESSMENT", {
    x: 0.4, y: 0.15, w: 9.2, h: 0.55,
    fontSize: 22, bold: true, color: C.navy,
    align: "left",
  });

  // Three column boxes
  const cols = [
    {
      title: "HISTORY", color: C.navy, x: 0.35,
      items: ["Duration & onset", "Rate of growth — slow vs rapid", "Pain — present or absent", "Change in size", "Past illness / trauma", "Family history"],
    },
    {
      title: "LOCAL EXAMINATION", color: C.steel, x: 3.55,
      items: ["A. Inspection", "B. Palpation", "C. Percussion", "D. Auscultation", "Special tests (fluctuation, translucency, cough impulse…)"],
    },
    {
      title: "GENERAL EXAMINATION", color: C.teal, x: 6.75,
      items: ["General survey (cachexia, attitude)", "Regional lymph nodes", "Systemic examination", "Distant metastasis"],
    },
  ];

  cols.forEach(({ title, color, x, items }) => {
    s.addShape(pres.ShapeType.roundRect, {
      x, y: 0.85, w: 3.05, h: 4.45,
      fill: { color: C.white },
      line: { color, width: 2 },
      shadow: { type: "outer", color: "AAAAAA", blur: 5, offset: 2, angle: 45, opacity: 0.3 },
      rectRadius: 0.12,
    });
    s.addShape(pres.ShapeType.rect, {
      x, y: 0.85, w: 3.05, h: 0.55,
      fill: { color },
      line: { color, width: 0 },
    });
    s.addText(title, {
      x, y: 0.85, w: 3.05, h: 0.55,
      fontSize: 12.5, bold: true, color: C.white,
      align: "center", valign: "middle", margin: 0,
    });
    const bullets = items.map((t, i) => ({
      text: t,
      options: { bullet: { code: "25CF", color }, color: C.gray, fontSize: 10.5, breakLine: i < items.length - 1 },
    }));
    s.addText(bullets, {
      x: x + 0.15, y: 1.5, w: 2.8, h: 3.7,
      align: "left", valign: "top",
    });
  });
}

// ════════════════════════════════════════════════════
// SLIDE 3 — HISTORY TAKING
// ════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.lgray };
  accentBar(s, C.steel);

  s.addText("HISTORY OF A SWELLING", {
    x: 0.4, y: 0.15, w: 9.2, h: 0.55,
    fontSize: 22, bold: true, color: C.navy,
  });
  pill(s, "S Das — Chapter 3", 7.8, 0.12, 1.75, C.steel);

  const cards = [
    { n: 1, lbl: "Duration & Onset", detail: "Congenital swellings are present since birth (haemangioma, meningocele). Some appear later — branchial cyst, thyroglossal cyst, dermoid cyst." },
    { n: 2, lbl: "Rate of Growth", detail: "Rapid growth suggests malignancy or acute inflammation. Slow growth favours benign tumours. Rapid enlargement with pain suggests osteosarcoma." },
    { n: 3, lbl: "Pain", detail: "Pain is conspicuous by its absence in malignant growths — except osteosarcoma where pain precedes the swelling. Present in inflammatory swellings." },
    { n: 4, lbl: "Change in Size", detail: "Swelling that appears and disappears with meals = salivary gland obstruction. Fluctuation with posture = venous or lymphatic swelling." },
    { n: 5, lbl: "Associated Features", detail: "Loss of weight, appetite, night sweats suggest malignancy. Fever, redness, heat — inflammatory. Trauma precedes haematoma or fracture callus." },
    { n: 6, lbl: "Family & Past History", detail: "Multiple neurofibromatosis (von Recklinghausen), familial polyposis, and certain sarcomas run in families. Previous operations / radiotherapy relevant." },
  ];

  const xs = [0.35, 3.45, 6.55];
  const ys = [0.9, 2.95];
  cards.forEach((c, i) => {
    numCard(s, c.n, c.lbl, c.detail, xs[i % 3], ys[Math.floor(i / 3)], 2.9, 1.88, C.steel);
  });
}

// ════════════════════════════════════════════════════
// SLIDE 4 — INSPECTION
// ════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.lgray };
  accentBar(s, C.teal);

  s.addText("A. INSPECTION", {
    x: 0.4, y: 0.15, w: 9.2, h: 0.55,
    fontSize: 22, bold: true, color: C.navy,
  });
  pill(s, "Local Examination", 7.3, 0.12, 2.25, C.teal);

  s.addText("\"A good clinician always spends time in observation — do NOT rush to touch the swelling.\"  — S Das", {
    x: 0.4, y: 0.78, w: 9.2, h: 0.38,
    fontSize: 11, italic: true, color: C.teal,
    align: "center",
  });

  const items = [
    { n: 1, lbl: "Situation", detail: "Note exact anatomical location. Dermoid cysts lie on lines of embryonic fusion (outer canthus of eye, behind ear). Record extent — vertical and horizontal." },
    { n: 2, lbl: "Colour", detail: "Black → naevus / melanoma. Red/purple → haemangioma (arterial vs venous). Blue → ranula. Erythema → acute inflammation. Skin changes are diagnostic clues." },
    { n: 3, lbl: "Shape", detail: "Ovoid, pear-shaped, kidney-shaped, spherical or irregular. Do NOT say 'circular' — a swelling has 3 dimensions. Say 'spherical' for a round swelling." },
    { n: 4, lbl: "Size", detail: "Describe two visible dimensions (vertical × horizontal). The third dimension is assessed on palpation. Record in centimetres on the case note." },
    { n: 5, lbl: "Surface & Edge", detail: "Smooth surface → benign. Irregular / nodular / cauliflower-like → malignant. Definite edge → benign. Ill-defined / fixed margin → malignancy." },
    { n: 6, lbl: "Skin over Swelling", detail: "Freely moveable skin → subcutaneous or deeper. Fixed / peau d'orange → carcinoma. Punctum → sebaceous cyst. Scar → previous surgery / sinuses." },
  ];

  const xs = [0.35, 3.45, 6.55];
  const ys = [1.25, 3.3];
  items.forEach((c, i) => {
    numCard(s, c.n, c.lbl, c.detail, xs[i % 3], ys[Math.floor(i / 3)], 2.9, 1.85, C.teal);
  });
}

// ════════════════════════════════════════════════════
// SLIDE 5 — PALPATION (part 1)
// ════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.lgray };
  accentBar(s, C.blue);

  s.addText("B. PALPATION — Part I", {
    x: 0.4, y: 0.15, w: 9.2, h: 0.55,
    fontSize: 22, bold: true, color: C.navy,
  });
  pill(s, "Always examine opposite normal side first", 5.5, 0.12, 4.05, C.blue);

  const items = [
    { n: 1, lbl: "Temperature", detail: "Use dorsum of hand. Inflammatory swellings are warm/hot. Cold swellings → long-standing or avascular. Compare with opposite side." },
    { n: 2, lbl: "Tenderness", detail: "Degree: mild, moderate or severe. Inflammatory swellings are tender. Benign and malignant tumours are usually non-tender (except on secondary infection)." },
    { n: 3, lbl: "Size (Palpation)", detail: "Measure all three dimensions. Use a measuring tape. Record in cm (e.g. 5×4×3 cm). Compare with original inspection measurement." },
    { n: 4, lbl: "Shape & Surface", detail: "Palpation reveals 3D shape. Smooth surface → cyst, benign tumour. Bosselated / nodular → fibroid, goitre nodule. Irregular → malignant." },
    { n: 5, lbl: "Edge / Margin", detail: "Definite and smooth edge → benign (lipoma, fibroma). Ill-defined, hard, irregular margin → infiltrating malignancy. Expansile → vascular tumour." },
    { n: 6, lbl: "Consistency", detail: "Stony hard → calcification, bone, carcinoma. Hard → fibrous / lymph node malignancy. Firm → most tumours. Soft → lipoma. Cystic / fluctuant → fluid." },
  ];

  const xs = [0.35, 3.45, 6.55];
  const ys = [0.88, 2.9];
  items.forEach((c, i) => {
    numCard(s, c.n, c.lbl, c.detail, xs[i % 3], ys[Math.floor(i / 3)], 2.9, 1.88, C.blue);
  });
}

// ════════════════════════════════════════════════════
// SLIDE 6 — PALPATION (part 2) — Mobility & Attachment
// ════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.lgray };
  accentBar(s, C.blue);

  s.addText("B. PALPATION — Part II: Mobility & Attachment", {
    x: 0.4, y: 0.15, w: 9.2, h: 0.55,
    fontSize: 22, bold: true, color: C.navy,
  });

  const items = [
    { n: 7, lbl: "Mobility", detail: "Test in two planes — first perpendicular to the long axis of adjacent structures, then along it. Free mobility → benign subcutaneous tumour. Fixed → malignant infiltration." },
    { n: 8, lbl: "Relation to Skin", detail: "Pinch skin over swelling: if skin is free, it is not involved. Skin tethering / dimpling → carcinoma. Punctum present → sebaceous cyst." },
    { n: 9, lbl: "Relation to Muscle", detail: "Ask patient to contract muscle. If swelling becomes less mobile → it is in the muscle. If still mobile → it is superficial or deep to muscle." },
    { n: 10, lbl: "Relation to Bone", detail: "Percuss the bone over swelling. If the swelling cannot be separated from bone → it originates from bone (e.g. osteoma, osteosarcoma, exostosis)." },
    { n: 11, lbl: "Relation to Vessels", detail: "Expansile pulsation with transmitted thrill → arterial aneurysm. Compressible swelling that refills from above → venous. Transmitted pulsation only from nearby artery." },
    { n: 12, lbl: "Regional Lymph Nodes", detail: "Always examine draining lymph nodes. Enlarged, hard, matted nodes → malignant metastasis. Tender, soft nodes → reactive lymphadenitis (inflammatory)." },
  ];

  const xs = [0.35, 3.45, 6.55];
  const ys = [0.88, 2.9];
  items.forEach((c, i) => {
    numCard(s, c.n, c.lbl, c.detail, xs[i % 3], ys[Math.floor(i / 3)], 2.9, 1.88, C.blue);
  });
}

// ════════════════════════════════════════════════════
// SLIDE 7 — SPECIAL TESTS IN PALPATION
// ════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.lgray };
  accentBar(s, C.gold);

  s.addText("SPECIAL TESTS", {
    x: 0.4, y: 0.15, w: 9.2, h: 0.55,
    fontSize: 22, bold: true, color: C.navy,
  });
  pill(s, "Palpation — Specific Findings", 6.6, 0.12, 2.95, C.gold.replace("E8A020","B07B10") || "A07010");

  // Fluctuation — big box
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.35, y: 0.85, w: 4.45, h: 2.05,
    fill: { color: C.white }, line: { color: C.gold, width: 2 }, rectRadius: 0.1,
    shadow: { type: "outer", color: "AAAAAA", blur: 4, offset: 2, angle: 45, opacity: 0.25 },
  });
  s.addShape(pres.ShapeType.rect, {
    x: 0.35, y: 0.85, w: 4.45, h: 0.42,
    fill: { color: C.gold }, line: { color: C.gold, width: 0 },
  });
  s.addText("FLUCTUATION TEST", {
    x: 0.35, y: 0.85, w: 4.45, h: 0.42,
    fontSize: 12, bold: true, color: C.navy, align: "center", valign: "middle", margin: 0,
  });
  s.addText([
    { text: "Technique: ", options: { bold: true, color: C.navy } },
    { text: "Two-finger test (small swellings) or displacing finger + watching finger method (large swellings).\n\n", options: { color: C.gray } },
    { text: "Positive: ", options: { bold: true, color: C.navy } },
    { text: "Fluid wave felt at 90° → swelling contains fluid (abscess, cyst, haematoma).\n\n", options: { color: C.gray } },
    { text: "Caution: ", options: { bold: true, color: C.red } },
    { text: "Soft swellings (lipoma, myxoma) may yield false positive — they yield to pressure but do NOT expand elsewhere.", options: { color: C.gray } },
  ], { x: 0.5, y: 1.33, w: 4.15, h: 1.5, fontSize: 9.5, wrap: true });

  // Translucency
  s.addShape(pres.ShapeType.roundRect, {
    x: 4.95, y: 0.85, w: 4.7, h: 2.05,
    fill: { color: C.white }, line: { color: C.teal, width: 2 }, rectRadius: 0.1,
    shadow: { type: "outer", color: "AAAAAA", blur: 4, offset: 2, angle: 45, opacity: 0.25 },
  });
  s.addShape(pres.ShapeType.rect, {
    x: 4.95, y: 0.85, w: 4.7, h: 0.42,
    fill: { color: C.teal }, line: { color: C.teal, width: 0 },
  });
  s.addText("TRANSLUCENCY TEST", {
    x: 4.95, y: 0.85, w: 4.7, h: 0.42,
    fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle", margin: 0,
  });
  s.addText([
    { text: "Positive (translucent): ", options: { bold: true, color: C.teal } },
    { text: "Clear fluid (water, serum, lymph, plasma, highly refractile fat).\n\n", options: { color: C.gray } },
    { text: "Negative: ", options: { bold: true, color: C.red } },
    { text: "Opaque fluid (blood, pultaceous material) — e.g. haematoma, sebaceous cyst.\n\n", options: { color: C.gray } },
    { text: "Method: ", options: { bold: true, color: C.navy } },
    { text: "Torch on one side, roll of paper on the other. Room must be dark. Light should NOT touch the surface directly.", options: { color: C.gray } },
  ], { x: 5.1, y: 1.33, w: 4.4, h: 1.5, fontSize: 9.5, wrap: true });

  // Cough impulse
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.35, y: 3.05, w: 4.45, h: 2.2,
    fill: { color: C.white }, line: { color: C.blue, width: 2 }, rectRadius: 0.1,
    shadow: { type: "outer", color: "AAAAAA", blur: 4, offset: 2, angle: 45, opacity: 0.25 },
  });
  s.addShape(pres.ShapeType.rect, {
    x: 0.35, y: 3.05, w: 4.45, h: 0.42,
    fill: { color: C.blue }, line: { color: C.blue, width: 0 },
  });
  s.addText("IMPULSE ON COUGHING", {
    x: 0.35, y: 3.05, w: 4.45, h: 0.42,
    fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle", margin: 0,
  });
  s.addText([
    { text: "Positive swellings: ", options: { bold: true, color: C.navy } },
    { text: "(i) Connected to abdominal cavity (herniae, ilio-psoas abscess, lumbar abscess). (ii) Connected to pleural cavity (empyema necessitatis, Pott's spine abscess). (iii) Connected to subarachnoid space (meningocele). (iv) Vascular swellings (aneurysm).\n\n", options: { color: C.gray } },
    { text: "Method: ", options: { bold: true, color: C.navy } },
    { text: "Place palm over swelling and ask patient to cough — an expansile impulse is felt.", options: { color: C.gray } },
  ], { x: 0.5, y: 3.53, w: 4.15, h: 1.65, fontSize: 9.5, wrap: true });

  // Fluid thrill
  s.addShape(pres.ShapeType.roundRect, {
    x: 4.95, y: 3.05, w: 4.7, h: 2.2,
    fill: { color: C.white }, line: { color: C.navy, width: 2 }, rectRadius: 0.1,
    shadow: { type: "outer", color: "AAAAAA", blur: 4, offset: 2, angle: 45, opacity: 0.25 },
  });
  s.addShape(pres.ShapeType.rect, {
    x: 4.95, y: 3.05, w: 4.7, h: 0.42,
    fill: { color: C.navy }, line: { color: C.navy, width: 0 },
  });
  s.addText("FLUID THRILL", {
    x: 4.95, y: 3.05, w: 4.7, h: 0.42,
    fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle", margin: 0,
  });
  s.addText([
    { text: "Definition: ", options: { bold: true, color: C.navy } },
    { text: "A percussion wave that is transmitted to the opposite pole when one pole of a fluid-containing swelling is tapped.\n\n", options: { color: C.gray } },
    { text: "Large swellings: ", options: { bold: true, color: C.navy } },
    { text: "Tap one side with two fingers, feel wave on other side with palm.\n\n", options: { color: C.gray } },
    { text: "Small swellings: ", options: { bold: true, color: C.navy } },
    { text: "Three fingers on swelling — tap middle finger, feel wave with the other two on each side (as in chest percussion).", options: { color: C.gray } },
  ], { x: 5.1, y: 3.53, w: 4.4, h: 1.65, fontSize: 9.5, wrap: true });
}

// ════════════════════════════════════════════════════
// SLIDE 8 — PERCUSSION & AUSCULTATION
// ════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.lgray };
  accentBar(s, C.navy);

  s.addText("C. PERCUSSION    D. AUSCULTATION", {
    x: 0.4, y: 0.15, w: 9.2, h: 0.55,
    fontSize: 22, bold: true, color: C.navy,
  });

  // Percussion
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.35, y: 0.88, w: 4.6, h: 4.3,
    fill: { color: C.white }, line: { color: C.navy, width: 2 }, rectRadius: 0.12,
    shadow: { type: "outer", color: "AAAAAA", blur: 5, offset: 2, angle: 45, opacity: 0.3 },
  });
  s.addShape(pres.ShapeType.rect, {
    x: 0.35, y: 0.88, w: 4.6, h: 0.5,
    fill: { color: C.navy }, line: { color: C.navy, width: 0 },
  });
  s.addText("C. PERCUSSION", {
    x: 0.35, y: 0.88, w: 4.6, h: 0.5,
    fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle", margin: 0,
  });
  s.addText([
    { text: "1. Resonance / Tympany: ", options: { bold: true, color: C.navy } },
    { text: "Swelling containing gas (gas-containing hernia, pneumatocele). Gas-containing intestinal loops in hernia give resonant note.\n\n", options: { color: C.gray } },
    { text: "2. Dullness: ", options: { bold: true, color: C.navy } },
    { text: "Solid tumours, fluid-containing cysts (non-resonant content).\n\n", options: { color: C.gray } },
    { text: "3. Bone percussion: ", options: { bold: true, color: C.navy } },
    { text: "Dull note with bone involvement. A swelling continuous with bone will not separate during percussion. Helps identify bony origin.\n\n", options: { color: C.gray } },
    { text: "4. Shifting dullness: ", options: { bold: true, color: C.navy } },
    { text: "In large abdominal cystic swellings to differentiate from ascites. Cystic tumour remains dull centrally; flanks are resonant.", options: { color: C.gray } },
  ], { x: 0.5, y: 1.46, w: 4.25, h: 3.55, fontSize: 10, wrap: true });

  // Auscultation
  s.addShape(pres.ShapeType.roundRect, {
    x: 5.1, y: 0.88, w: 4.55, h: 4.3,
    fill: { color: C.white }, line: { color: C.steel, width: 2 }, rectRadius: 0.12,
    shadow: { type: "outer", color: "AAAAAA", blur: 5, offset: 2, angle: 45, opacity: 0.3 },
  });
  s.addShape(pres.ShapeType.rect, {
    x: 5.1, y: 0.88, w: 4.55, h: 0.5,
    fill: { color: C.steel }, line: { color: C.steel, width: 0 },
  });
  s.addText("D. AUSCULTATION", {
    x: 5.1, y: 0.88, w: 4.55, h: 0.5,
    fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle", margin: 0,
  });
  s.addText([
    { text: "1. Bruit: ", options: { bold: true, color: C.steel } },
    { text: "A systolic bruit (blowing sound) heard over vascular tumours (haemangioma, arteriovenous fistula) or arterial aneurysms.\n\n", options: { color: C.gray } },
    { text: "2. Bowel sounds: ", options: { bold: true, color: C.steel } },
    { text: "Heard over hernial swellings containing intestinal loops. Gurgling bowel sounds confirm intestinal content.\n\n", options: { color: C.steel === C.steel ? C.gray : C.gray } },
    { text: "3. Venous hum: ", options: { bold: true, color: C.steel } },
    { text: "A continuous hum heard over venous malformations or large venous angiomas.\n\n", options: { color: C.gray } },
    { text: "4. Machinery murmur: ", options: { bold: true, color: C.steel } },
    { text: "Characteristic of arteriovenous fistula — continuous systolic and diastolic murmur at the swelling site.", options: { color: C.gray } },
  ], { x: 5.25, y: 1.46, w: 4.25, h: 3.55, fontSize: 10, wrap: true });
}

// ════════════════════════════════════════════════════
// SLIDE 9 — DIAGNOSIS OF SWELLING (Aetiology)
// ════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.lgray };
  accentBar(s, C.red);

  s.addText("DIAGNOSIS OF A SWELLING — AETIOLOGY", {
    x: 0.4, y: 0.15, w: 9.2, h: 0.55,
    fontSize: 22, bold: true, color: C.navy,
  });
  pill(s, "Two Questions: Origin + Cause", 6.2, 0.12, 3.35, C.red);

  const aetiologies = [
    { label: "CONGENITAL", color: C.teal, detail: "Present since birth — haemangioma, cystic hygroma, meningocele. Some appear later — branchial cyst, dermoid, thyroglossal cyst." },
    { label: "TRAUMATIC", color: C.blue, detail: "Develop immediately after trauma — haematoma, fracture with displacement, dislocation, rupture of muscle, false aneurysm." },
    { label: "ACUTE INFLAMMATORY", color: C.red, detail: "Rubor, dolor, calor, tumor, functio laesa. Tenderness, brawny induration and oedema. Fluctuation = pus. Leucocytosis." },
    { label: "CHRONIC INFLAMMATORY", color: "885500", detail: "Same features but subdued. Swelling > other features. Brawny induration absent. Difficult to distinguish from malignancy." },
    { label: "BENIGN NEOPLASTIC", color: C.green, detail: "Slow growth. Usually painless. Freely mobile. Smooth surface. Definite margin. No metastasis. No secondary changes." },
    { label: "MALIGNANT NEOPLASTIC", color: C.navy, detail: "Rapid growth. Pain at late stage (except osteosarcoma: pain first). Hard, irregular, ill-defined. Lymph node and distant metastasis." },
  ];

  const xs = [0.35, 3.45, 6.55];
  const ys = [0.88, 2.95];
  aetiologies.forEach(({ label, color, detail }, i) => {
    const x = xs[i % 3];
    const y = ys[Math.floor(i / 3)];
    s.addShape(pres.ShapeType.roundRect, {
      x, y, w: 2.9, h: 1.9,
      fill: { color: C.white }, line: { color, width: 2 }, rectRadius: 0.1,
      shadow: { type: "outer", color: "AAAAAA", blur: 4, offset: 2, angle: 45, opacity: 0.25 },
    });
    s.addShape(pres.ShapeType.rect, {
      x, y, w: 2.9, h: 0.42,
      fill: { color }, line: { color, width: 0 },
    });
    s.addText(label, {
      x, y, w: 2.9, h: 0.42,
      fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle", margin: 0,
    });
    s.addText(detail, {
      x: x + 0.12, y: y + 0.48, w: 2.68, h: 1.32,
      fontSize: 9.5, color: C.gray, align: "left", valign: "top", wrap: true,
    });
  });
}

// ════════════════════════════════════════════════════
// SLIDE 10 — BENIGN vs MALIGNANT COMPARISON
// ════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.lgray };
  accentBar(s, C.gold);

  s.addText("BENIGN vs MALIGNANT SWELLINGS", {
    x: 0.4, y: 0.15, w: 9.2, h: 0.55,
    fontSize: 22, bold: true, color: C.navy,
  });

  // Header row
  const hY = 0.82;
  s.addShape(pres.ShapeType.rect, {
    x: 0.3, y: hY, w: 2.0, h: 0.4,
    fill: { color: C.navy }, line: { color: C.navy, width: 0 },
  });
  s.addText("FEATURE", {
    x: 0.3, y: hY, w: 2.0, h: 0.4,
    fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle", margin: 0,
  });
  s.addShape(pres.ShapeType.rect, {
    x: 2.35, y: hY, w: 3.45, h: 0.4,
    fill: { color: C.green }, line: { color: C.green, width: 0 },
  });
  s.addText("BENIGN", {
    x: 2.35, y: hY, w: 3.45, h: 0.4,
    fontSize: 13, bold: true, color: C.white, align: "center", valign: "middle", margin: 0,
  });
  s.addShape(pres.ShapeType.rect, {
    x: 5.85, y: hY, w: 3.8, h: 0.4,
    fill: { color: C.red }, line: { color: C.red, width: 0 },
  });
  s.addText("MALIGNANT", {
    x: 5.85, y: hY, w: 3.8, h: 0.4,
    fontSize: 13, bold: true, color: C.white, align: "center", valign: "middle", margin: 0,
  });

  const rows = [
    ["Age", "Younger age group", "Usually > 40 yrs (sarcoma: younger)"],
    ["Growth", "Slow", "Rapid"],
    ["Pain", "Usually absent", "Late stage; early in osteosarcoma"],
    ["Cachexia / wt loss", "Never", "Common feature"],
    ["Mobility", "Freely mobile", "Fixed / infiltrating"],
    ["Surface", "Smooth", "Irregular / nodular"],
    ["Margin", "Definite, smooth", "Ill-defined, hard"],
    ["Consistency", "Firm / soft", "Stony hard / hard"],
    ["Lymph nodes", "Not enlarged", "Enlarged, hard, matted"],
    ["Metastasis", "Almost never", "Common — lymph, blood"],
    ["Recurrence", "Never after excision", "Common after resection"],
    ["Histology", "Well differentiated", "Poorly differentiated / anaplastic"],
  ];

  rows.forEach((row, idx) => {
    const y = 1.3 + idx * 0.33;
    const bg = idx % 2 === 0 ? C.light : C.white;
    s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 9.35, h: 0.33, fill: { color: bg }, line: { color: "CCDDEE", width: 0.5 } });
    s.addText(row[0], { x: 0.35, y, w: 1.9, h: 0.33, fontSize: 9.5, bold: true, color: C.navy, align: "left", valign: "middle" });
    s.addText(row[1], { x: 2.3, y, w: 3.45, h: 0.33, fontSize: 9.5, color: C.green, align: "left", valign: "middle" });
    s.addText(row[2], { x: 5.8, y, w: 3.8, h: 0.33, fontSize: 9.5, color: C.red, align: "left", valign: "middle" });
  });
}

// ════════════════════════════════════════════════════
// SLIDE 11 — TISSUE OF ORIGIN
// ════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.lgray };
  accentBar(s, C.teal);

  s.addText("TISSUE OF ORIGIN — WHERE IS THE SWELLING?", {
    x: 0.4, y: 0.15, w: 9.2, h: 0.55,
    fontSize: 22, bold: true, color: C.navy,
  });
  s.addText("The clinician must first determine the tissue layer from which the swelling arises", {
    x: 0.4, y: 0.76, w: 9.2, h: 0.32,
    fontSize: 11.5, italic: true, color: C.teal,
  });

  const layers = [
    { layer: "SKIN", color: C.gold, examples: "Sebaceous cyst (punctum present), papilloma, melanoma, rodent ulcer, wart, epithelioma. Moves with skin; skin NOT freely moveable over it." },
    { layer: "SUBCUTANEOUS\nTISSUE", color: C.steel, examples: "Lipoma (soft, lobulated), fibroma (firm), neurofibroma (along nerve trunk — pinch test positive), haemangioma, lymph node. Skin free over it." },
    { layer: "MUSCLE / FASCIA", color: C.teal, examples: "Muscle becomes more prominent on contraction but swelling LESS mobile. Rhabdomyosarcoma, myositis ossificans, herniation through fascial defect." },
    { layer: "VESSEL / NERVE", color: C.blue, examples: "Aneurysm (expansile pulsation, bruit), haemangioma (compressible, bluish). Neuroma — moves perpendicular to, not along, nerve axis (pinch test)." },
    { layer: "BONE", color: C.navy, examples: "Cannot be separated from bone. Exostosis, osteoma, osteosarcoma, giant cell tumour, Paget's disease. Bony hard consistency. Percussion dull." },
    { layer: "DEEP STRUCTURES\n(viscera)", color: C.red, examples: "Moves with respiration (liver, spleen, kidney). Bimanual palpable (kidney). Cannot get above it (spleen, liver). Resonant on percussion if bowel." },
  ];

  const xs = [0.35, 3.45, 6.55];
  const ys = [1.17, 3.3];
  layers.forEach(({ layer, color, examples }, i) => {
    const x = xs[i % 3];
    const y = ys[Math.floor(i / 3)];
    s.addShape(pres.ShapeType.roundRect, {
      x, y, w: 2.9, h: 2.0,
      fill: { color: C.white }, line: { color, width: 2 }, rectRadius: 0.1,
      shadow: { type: "outer", color: "AAAAAA", blur: 4, offset: 2, angle: 45, opacity: 0.25 },
    });
    s.addShape(pres.ShapeType.rect, {
      x, y, w: 2.9, h: 0.48,
      fill: { color }, line: { color, width: 0 },
    });
    s.addText(layer, {
      x, y, w: 2.9, h: 0.48,
      fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle", margin: 0,
    });
    s.addText(examples, {
      x: x + 0.1, y: y + 0.54, w: 2.72, h: 1.38,
      fontSize: 9, color: C.gray, align: "left", valign: "top", wrap: true,
    });
  });
}

// ════════════════════════════════════════════════════
// SLIDE 12 — SUMMARY / MNEMONIC
// ════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: C.navy };
  accentBar(s, C.gold);

  s.addText("SYSTEMATIC APPROACH — MNEMONIC", {
    x: 0.4, y: 0.15, w: 9.2, h: 0.55,
    fontSize: 22, bold: true, color: C.white,
  });
  s.addText("S Das — A Manual on Clinical Surgery, 13th Edition", {
    x: 0.4, y: 0.72, w: 9.2, h: 0.3,
    fontSize: 11, italic: true, color: C.mid,
  });

  const letters = [
    { letter: "S", word: "SITE", detail: "Anatomical location (skin, subcutaneous, muscle, bone, vessel)" },
    { letter: "S", word: "SIZE & SHAPE", detail: "Three dimensions in cm; shape (ovoid, spherical, irregular)" },
    { letter: "C", word: "COLOUR & SURFACE", detail: "Overlying skin colour; surface texture (smooth vs nodular)" },
    { letter: "C", word: "CONSISTENCY", detail: "Soft, firm, hard, stony hard, cystic, fluctuant" },
    { letter: "E", word: "EDGE / MARGIN", detail: "Defined (benign) vs ill-defined (malignant)" },
    { letter: "T", word: "TENDERNESS", detail: "Degree: mild / moderate / severe" },
    { letter: "F", word: "FLUCTUATION & FLUID THRILL", detail: "Test for fluid content (two-finger / displacing method)" },
    { letter: "T", word: "TRANSLUCENCY", detail: "Clear fluid → positive; opaque fluid → negative" },
    { letter: "I", word: "IMPULSE ON COUGHING", detail: "Hernia, abscess communicating with body cavity, aneurysm" },
    { letter: "M", word: "MOBILITY", detail: "Relation to skin, muscle, bone; test in two planes" },
    { letter: "L", word: "LYMPH NODES", detail: "Regional draining nodes — size, consistency, matting" },
    { letter: "A", word: "AUSCULTATION & PERCUSSION", detail: "Bruit (vascular), bowel sounds (hernia), resonance (gas)" },
  ];

  const colW = 4.55;
  const colXs = [0.28, 4.9];
  letters.forEach((item, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = colXs[col];
    const y = 1.12 + row * 0.53;

    s.addShape(pres.ShapeType.roundRect, {
      x, y, w: colW, h: 0.46,
      fill: { color: "112244" }, line: { color: C.gold, width: 0.5 }, rectRadius: 0.08,
    });
    // letter badge
    s.addShape(pres.ShapeType.ellipse, {
      x: x + 0.08, y: y + 0.05, w: 0.36, h: 0.36,
      fill: { color: C.gold }, line: { color: C.gold, width: 0 },
    });
    s.addText(item.letter, {
      x: x + 0.08, y: y + 0.05, w: 0.36, h: 0.36,
      fontSize: 12, bold: true, color: C.navy, align: "center", valign: "middle", margin: 0,
    });
    s.addText(item.word, {
      x: x + 0.5, y: y + 0.04, w: 1.55, h: 0.38,
      fontSize: 9.5, bold: true, color: C.gold, align: "left", valign: "middle", margin: 0,
    });
    s.addText(item.detail, {
      x: x + 2.1, y: y + 0.04, w: 2.38, h: 0.38,
      fontSize: 8.5, color: C.mid, align: "left", valign: "middle", margin: 0, wrap: true,
    });
  });
}

// ════════════════════════════════════════════════════
// Write file
// ════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/lump-swelling-ppt/Examination_of_Lump_Swelling_SDas.pptx" })
  .then(() => console.log("✅ PPT created successfully!"))
  .catch(err => console.error("❌ Error:", err));
Running Command

cd /home/daytona/workspace/lump-swelling-ppt && node build.js

Running Command

ls -lh /home/daytona/workspace/lump-swelling-ppt/

Your presentation is ready!

Examination of Lump Swelling SDas

Presentation · PPTX


What's inside (12 slides, navy/steel/gold theme):
SlideContent
1Title slide — Examination of a Lump or Swelling
2Overview — History, Local Examination, General Examination
3History Taking — Duration, growth rate, pain, change in size, associated features, family history
4A. Inspection — Situation, colour, shape, size, surface/edge, skin over swelling
5B. Palpation Part I — Temperature, tenderness, size, shape, edge, consistency
6B. Palpation Part II — Mobility, relation to skin/muscle/bone/vessels, regional lymph nodes
7Special Tests — Fluctuation, translucency, cough impulse, fluid thrill (with method & caveats)
8C. Percussion & D. Auscultation — Resonance/dullness, bruit, bowel sounds, venous hum
9Aetiology — Congenital, traumatic, acute/chronic inflammatory, benign/malignant neoplastic
10Benign vs Malignant comparison table — 12 features compared side by side
11Tissue of origin — Skin, subcutaneous, muscle, vessel/nerve, bone, deep viscera
12Summary Mnemonic — SSCCETFTIMLA covering all key steps
All content is sourced directly from S Das - A Manual on Clinical Surgery, 13th Edition, Chapter 3.
This is a shared conversation. Sign in to Orris to start your own chat.