Carcinoma colon risk factors pathogenesis cilincalbfeactute diagnois and treatment

Reading File
Finding Sources
Finding Sources
Searching PubMed

"colorectal cancer"[MeSH Terms] AND "treatment"[MeSH Terms]

Finding Sources
Finding Sources
Searching PubMed

"colorectal neoplasms"[MeSH Terms] AND "risk factors"[MeSH Terms]

Reading File
Reading File
Reading File
Reading File
Reading File
I now have rich content from multiple authoritative textbooks. Let me compile the comprehensive answer.

Carcinoma of the Colon (Colorectal Carcinoma)


1. Epidemiology

Colorectal cancer (CRC) is the second most common cause of cancer death in the UK (~42,000 new cases/year). About two-thirds arise in the colon and one-third in the rectum. It is more common in resource-rich countries and slightly more prevalent in men (56% vs 44%). The global incidence closely tracks dietary patterns, highlighting the dominant role of environmental factors.
  • Bailey and Love's Short Practice of Surgery, 28th Ed.

2. Risk Factors

Non-modifiable

FactorDetails
AgePeak incidence after age 50; risk rises with age
Family history1st-degree relative with CRC doubles risk
FAP (Familial Adenomatous Polyposis)APC gene mutation (chr 5q); lifetime CRC risk approaches 100% by age 50
Lynch syndrome (HNPCC)Mismatch repair (MMR) gene mutations (MLH1, MSH2, etc.); 70-80% lifetime risk
Inflammatory bowel diseaseBoth ulcerative colitis and Crohn's disease increase risk
Prior colorectal polyps or cancerAdenomatous polyps are precursors

Modifiable

FactorDetails
Red/processed meatHaem iron and N-nitroso compounds are carcinogenic
Low dietary fibreLonger mucosal exposure to dietary carcinogens
Obesity and sedentary lifestyleIncreased risk
Smoking and alcoholBoth independently increase risk
CholecystectomyMarginally increases risk of right-sided colon cancer

Protective Factors

  • High fibre intake, calcium and magnesium
  • Aspirin and NSAIDs - substantial epidemiological evidence for protection via prostaglandin inhibition
  • Physical activity
  • Colonic microbiota diversity
Recent 2025 meta-analysis (PMID: 40210826) confirmed red and processed meat consumption is significantly associated with CRC risk in prospective studies. A 2025 systematic review (PMID: 40010692) further confirmed dietary patterns as major modifiable risk factors via the CUP Global programme.

3. Pathogenesis

The Adenoma-Carcinoma Sequence

The dominant model: normal mucosa → hyperproliferative epithelium → adenoma → invasive carcinoma. This sequence is supported by:
  • Similar left-sided distribution of adenomas and cancers (~70%)
  • Adenomas found in one-third of CRC resection specimens
  • Cancer incidence falls in screening programmes using colonoscopy + polypectomy
Bailey and Love's, p. 1380

Three Major Molecular Pathways

PathwayEarly EventsProgressive EventsClinical Notes
APC / Chromosomal InstabilityAPC gene mutation (somatic or inherited)KRAS mutation → P53 mutation → DCC mutationConventional adenoma-to-carcinoma sequence (most common)
MMR / Microsatellite InstabilityMMR gene mutation (inherited in Lynch, sporadic methylation)KRAS, PIK3CA mutationsHNPCC/Lynch syndrome; sporadic right-sided tumours
CpG Island Methylator (CIMP/Serrated)BRAF V600E mutation + MMR promoter methylationEpigenetic silencing of tumour suppressor genesSerrated adenoma-associated carcinoma
Quick Compendium of Clinical Pathology, 5th Ed., p. 403

Key Genetic Events

  • APC gene (chr 5q): mutated in ~67% of colonic adenomas - an early event
  • KRAS: activates cell signalling; found in larger lesions - a later event
  • p53: mutated in carcinomas but not adenomas - marker of invasion
  • MSI (microsatellite instability): feature of Lynch syndrome, also occurs sporadically (especially right-sided)

Consensus Molecular Subtypes (CMS)

International bioinformatic classification of >4000 patients identified four subtypes:
  • CMS1: MSI, immune activation (right-sided)
  • CMS2: WNT/MYC signalling activation
  • CMS3: Metabolic dysregulation
  • CMS4: TGF-beta activation (worst prognosis)

4. Clinical Features

Symptoms (vary by tumour location)

Right-sided colon (caecum, ascending)Left-sided colon (sigmoid, descending)
Occult blood loss → iron-deficiency anaemiaChange in bowel habit (constipation / loose stools)
Vague abdominal discomfortRectal bleeding (bright red or dark)
Palpable right iliac fossa massTenesmus
Constitutional: weight loss, fatigueColicky abdominal pain
Often presents late (large lumen)Bowel obstruction (smaller lumen)

Complications at Presentation

  • Obstruction (more common left-sided)
  • Perforation - peritonitis
  • Fistula formation (colovesical, colovaginal)
  • Haemorrhage

Examination Findings

  • Abdominal mass (right > left)
  • Signs of anaemia (pallor)
  • Hepatomegaly (liver metastases)
  • Digital rectal examination: may detect rectal involvement
  • Virchow's node (left supraclavicular lymphadenopathy) - distant spread

Dukes' Classification (historical but still used)

StageDescription
ALimited to bowel wall
BThrough bowel wall, no nodes
CLymph node involvement
DDistant metastases

5. Diagnosis

Blood Tests

  • FBC: iron-deficiency anaemia (especially right-sided)
  • LFTs: liver metastases
  • CEA (carcinoembryonic antigen): not diagnostic, but used for monitoring response to treatment and detecting recurrence. Elevated CEA pre-op = worse prognosis

Endoscopy

  • Colonoscopy: gold standard - allows visualisation, biopsy, and simultaneous polypectomy. Required for the entire colon
  • Flexible sigmoidoscopy: for left-sided lesions; used in screening
  • CT colonography (virtual colonoscopy): alternative if endoscopy incomplete or contraindicated

Radiology (Staging)

  • CT chest/abdomen/pelvis: primary staging modality - assesses local invasion, lymph nodes, distant metastases (especially liver and lung)
  • MRI: for rectal tumours - assesses mesorectal fascia, CRM (circumferential resection margin)
  • PET-CT: for recurrent or metastatic disease
  • Liver ultrasound/MRI: characterise hepatic lesions

Histopathology

  • Biopsy via colonoscopy: confirms adenocarcinoma
  • Tumour grade: well (G1), moderately (G2), poorly differentiated (G3)
  • Molecular testing: KRAS/NRAS/BRAF/MMR status - mandatory for metastatic disease to guide therapy

TNM Staging (AJCC 8th Edition)

TDescription
TisCarcinoma in situ (intramucosal)
T1Invades submucosa
T2Invades muscularis propria
T3Through muscularis propria into pericolorectal tissues
T4aInvades visceral peritoneum
T4bInvades/adheres to adjacent organs
NDescription
N0No nodes
N11-3 positive regional nodes
N2≥4 positive regional nodes
MDescription
M0No distant metastases
M1aOne distant site/organ
M1bTwo or more distant sites/organs
M1cPeritoneal metastases
Schwartz's Principles of Surgery, 11th Ed.

6. Treatment

Surgery (primary treatment)

  • Right hemicolectomy: caecum, ascending, hepatic flexure tumours
  • Extended right hemicolectomy: transverse colon
  • Left hemicolectomy: descending colon
  • Sigmoid colectomy: sigmoid colon
  • Anterior resection: upper rectum
  • Hartmann's procedure: emergency left-sided obstruction/perforation
  • Total colectomy: FAP, synchronous tumours, UC-associated CRC
Principles: Wide resection with adequate margins + en bloc lymphadenectomy (minimum 12 nodes required for accurate staging). Laparoscopic approach is standard for elective cases - equivalent oncological outcomes, faster recovery.

Adjuvant Chemotherapy

StageRecommendation
Stage ISurgery alone; no adjuvant chemo
Stage II (low risk)Surgery alone (controversial; consider if high-risk features)
Stage II (high risk)Consider FOLFOX or capecitabine (high-risk features: T4, perforation, <12 nodes, PNI, LVI)
Stage IIIFOLFOX (oxaliplatin + 5-FU + leucovorin) or CAPOX x 6 months - standard of care
Stage IVSystemic chemotherapy +/- targeted therapy

Chemotherapy Regimens (Metastatic / Stage IV)

  • FOLFOX: 5-FU + leucovorin + oxaliplatin
  • FOLFIRI: 5-FU + leucovorin + irinotecan
  • CAPOX/XELOX: capecitabine + oxaliplatin

Targeted / Biological Therapy

AgentTargetIndication
Bevacizumab (Avastin)Anti-VEGFMetastatic CRC, with chemo
Cetuximab (Erbitux)Anti-EGFR (monoclonal Ab)Metastatic CRC - RAS wild type only
PanitumumabAnti-EGFR (monoclonal Ab)Metastatic CRC - RAS wild type only
Pembrolizumab / NivolumabAnti-PD-1 (immune checkpoint)MSI-H / dMMR metastatic CRC
Encorafenib + cetuximabBRAF V600E + EGFRBRAF V600E mutant metastatic CRC
Critical: KRAS/NRAS mutation = resistance to anti-EGFR agents; these must be tested before prescribing cetuximab or panitumumab.
Bailey and Love's, p. 217; Quick Compendium of Clinical Pathology, 5th Ed.

Treatment of Hereditary CRC (FAP)

  • Total proctocolectomy with ileal pouch-anal anastomosis (IPAA) - procedure of choice
  • Alternative: total abdominal colectomy with ileorectal anastomosis (requires rectal surveillance)
  • COX-2 inhibitors (celecoxib, sulindac) may slow polyp development

Metastatic Disease

  • Liver metastases: hepatic resection if technically feasible offers potential cure (5-year survival ~35-40%)
  • Peritoneal metastases: cytoreductive surgery + HIPEC in selected patients
  • Lung metastases: metastasectomy in selected cases

Screening (Prevention)

  • Average risk: colonoscopy every 10 years from age 50 (or FIT/gFOBT annually)
  • High risk (FAP family): flexible sigmoidoscopy from age 10-15 years; genetic testing
  • Lynch syndrome family: colonoscopy every 1-2 years from age 25

Summary

AspectKey Points
Commonest typeAdenocarcinoma (>95%)
PrecursorAdenomatous polyp (adenoma-carcinoma sequence)
Key geneAPC (early), KRAS (intermediate), p53 (late)
PresentationRight: anaemia; Left: bleeding/obstruction
StagingTNM / Dukes'
Curative treatmentSurgery (hemicolectomy)
Stage III adjuvantFOLFOX chemotherapy
Metastatic targetedAnti-EGFR only if RAS wild-type; anti-PD1 if MSI-H
Sources: Bailey and Love's Short Practice of Surgery (28th Ed.) | Schwartz's Principles of Surgery (11th Ed.) | Quick Compendium of Clinical Pathology (5th Ed.) | Recent PubMed evidence (PMIDs: 40210826, 40010692)

Make a presentation comparing surgical approaches for different CRC locations

Reading File
Finding Sources
Reading File
Finding Sources
Reading File
Finding Sources
Reading File
Reading File
Loading Image
Running Command

ls /home/daytona/workspace/ 2>/dev/null && echo "---" && ls /home/daytona/skills/pptx/

Running Command

mkdir -p /home/daytona/workspace/crc-surgery-ppt && echo "dir ready"

Writing File

~/crc-surgery-ppt/build.js

const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");

// Fetch the colon diagram image
const images = JSON.parse(execSync(
  `node /home/daytona/skills/shared/scripts/fetch_images.js "https://cdn.orris.care/cdss_images/7de8c917a6f368adeac60eb1b0e87aa3e02dd9d40562d39396aa8bdea122668c.png"`
).toString());
const colonImg = images[0] && !images[0].error ? images[0].base64 : null;

// ─── PALETTE ───────────────────────────────────────────────────────
const DARK_BG   = "0D1F2D";   // deep navy – dominant
const MID_BG    = "152535";   // slightly lighter navy
const ACCENT1   = "E84855";   // surgical red
const ACCENT2   = "3ABEFF";   // clinical blue
const ACCENT3   = "F4A261";   // warm amber
const ACCENT4   = "2EC4B6";   // teal
const WHITE     = "FFFFFF";
const LIGHT     = "D6E4F0";
const GREY      = "8BA5BC";
const CARD_BG   = "1A3045";

const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE";  // 13.3" × 7.5"
pres.title  = "Surgical Approaches for CRC by Location";
pres.author = "Orris Medical";

// ─── HELPER: section label bar ─────────────────────────────────────
function addTopBar(slide, color, label) {
  slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 0.55, fill: { color } });
  slide.addText(label, {
    x: 0.3, y: 0, w: 12.7, h: 0.55,
    fontSize: 13, bold: true, color: WHITE, valign: "middle", margin: 0
  });
}

function addFooter(slide) {
  slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 7.22, w: 13.3, h: 0.28, fill: { color: "0A1620" } });
  slide.addText("Sources: Schwartz's Principles of Surgery 11th Ed. | Bailey & Love 28th Ed. | Yamada's Gastroenterology 7th Ed.", {
    x: 0.3, y: 7.22, w: 12.7, h: 0.28,
    fontSize: 7.5, color: GREY, valign: "middle", margin: 0
  });
}

function addSlideBg(slide) {
  slide.background = { color: DARK_BG };
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 1 – TITLE
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: DARK_BG };

  // Red accent block left
  s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.35, h: 7.5, fill: { color: ACCENT1 } });

  // Title
  s.addText("Surgical Approaches in", {
    x: 0.7, y: 1.5, w: 8.5, h: 0.9,
    fontSize: 36, bold: true, color: WHITE, fontFace: "Calibri"
  });
  s.addText("Colorectal Carcinoma", {
    x: 0.7, y: 2.35, w: 8.5, h: 0.9,
    fontSize: 36, bold: true, color: ACCENT1, fontFace: "Calibri"
  });
  s.addText("by Tumour Location", {
    x: 0.7, y: 3.2, w: 8.5, h: 0.7,
    fontSize: 28, bold: false, color: LIGHT, fontFace: "Calibri"
  });

  // Divider
  s.addShape(pres.shapes.RECTANGLE, { x: 0.7, y: 4.0, w: 5.5, h: 0.05, fill: { color: ACCENT2 } });

  // Subtitle info
  s.addText([
    { text: "Surgical principles  |  Extent of resection  |  Vascular ligation  |  Anastomosis", options: { color: GREY, fontSize: 13 } }
  ], { x: 0.7, y: 4.2, w: 9, h: 0.5 });

  // Colon image on right
  if (colonImg) {
    s.addImage({ data: colonImg, x: 9.2, y: 0.5, w: 3.8, h: 6.0 });
  }

  s.addText("Based on Schwartz's, Bailey & Love, and Yamada's Gastroenterology", {
    x: 0.7, y: 7.1, w: 9, h: 0.3, fontSize: 9, color: GREY
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 2 – OVERVIEW: CRC LOCATIONS AND PROCEDURES (TABLE)
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  addSlideBg(s);
  addTopBar(s, ACCENT1, "OVERVIEW  |  Tumour Location → Surgical Procedure");
  addFooter(s);

  // Table header
  const cols = [
    { label: "Tumour Location", w: 2.8, x: 0.15 },
    { label: "Operation", w: 2.9, x: 3.05 },
    { label: "Vessels Ligated", w: 3.3, x: 6.05 },
    { label: "Anastomosis", w: 3.6, x: 9.45 }
  ];
  const hdrY = 0.65;
  cols.forEach(c => {
    s.addShape(pres.shapes.RECTANGLE, { x: c.x, y: hdrY, w: c.w, h: 0.42, fill: { color: "1D3F5C" } });
    s.addText(c.label, {
      x: c.x + 0.08, y: hdrY, w: c.w - 0.1, h: 0.42,
      fontSize: 11, bold: true, color: ACCENT2, valign: "middle", margin: 0
    });
  });

  const rows = [
    ["Caecum / Terminal ileum",     "Ileocaecectomy",               "Ileocolic artery",                      "Ileum → ascending colon"],
    ["Caecum + Ascending colon",    "Right Hemicolectomy",          "Ileocolic + right colic arteries",      "Ileum → transverse colon"],
    ["Hepatic flexure / proximal transverse", "Extended Right Hemicolectomy", "Above + right branch of middle colic", "Ileum → mid transverse colon"],
    ["Mid/distal transverse colon", "Transverse Colectomy",         "Middle colic artery",                   "Ascending → descending colon"],
    ["Splenic flexure / distal transverse", "Extended Left Hemicolectomy", "Left colic + right br. middle colic", "Transverse → sigmoid colon"],
    ["Descending colon",            "Left Hemicolectomy",           "Left colic artery (IMA branch)",        "Transverse → sigmoid colon"],
    ["Sigmoid colon",               "Sigmoid Colectomy",            "Sigmoid branches of IMA",               "Descending colon → upper rectum"],
    ["Multiple / FAP / IBD",        "Total / Subtotal Colectomy",   "All colic vessels; preserve superior rectal", "Ileum → sigmoid or upper rectum"],
  ];

  rows.forEach((row, i) => {
    const rowY = 1.15 + i * 0.68;
    const bg = i % 2 === 0 ? CARD_BG : MID_BG;
    const rowData = [
      { val: row[0], x: 0.15, w: 2.8, color: WHITE, bold: true },
      { val: row[1], x: 3.05, w: 2.9, color: ACCENT3, bold: false },
      { val: row[2], x: 6.05, w: 3.3, color: LIGHT, bold: false },
      { val: row[3], x: 9.45, w: 3.6, color: ACCENT4, bold: false },
    ];
    rowData.forEach(cell => {
      s.addShape(pres.shapes.RECTANGLE, { x: cell.x, y: rowY, w: cell.w, h: 0.62, fill: { color: bg } });
      s.addText(cell.val, {
        x: cell.x + 0.1, y: rowY + 0.04, w: cell.w - 0.15, h: 0.58,
        fontSize: 10, bold: cell.bold, color: cell.color, valign: "middle", wrap: true, margin: 0
      });
    });
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 3 – RIGHT COLON (with diagram)
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  addSlideBg(s);
  addTopBar(s, ACCENT3, "RIGHT-SIDED CRC  |  Caecum · Ascending Colon · Hepatic Flexure");
  addFooter(s);

  // Colon diagram
  if (colonImg) {
    s.addImage({ data: colonImg, x: 7.3, y: 0.65, w: 5.6, h: 6.25 });
    // Overlay label for right hemicolectomy area
    s.addShape(pres.shapes.RECTANGLE, {
      x: 7.3, y: 6.55, w: 5.6, h: 0.35,
      fill: { color: "0A1620" }
    });
    s.addText("Fig: Resection types A→F (right hemicolectomy outlined)", {
      x: 7.35, y: 6.57, w: 5.5, h: 0.3,
      fontSize: 8, color: GREY, italic: true, margin: 0
    });
  }

  // Operation cards
  const ops = [
    {
      title: "Ileocaecectomy",
      loc: "Caecum / terminal ileum",
      vessels: "Ileocolic artery",
      anastomosis: "Ileum → ascending colon",
      nodes: "Requires ≥12 lymph nodes",
      color: ACCENT3
    },
    {
      title: "Right Hemicolectomy",
      loc: "Caecum + ascending colon",
      vessels: "Ileocolic + right colic arteries",
      anastomosis: "Ileum → transverse colon",
      nodes: "Standard for right colon CRC",
      color: ACCENT1
    },
    {
      title: "Extended Right Hemicolectomy",
      loc: "Hepatic flexure / proximal transverse",
      vessels: "Above + right br. middle colic artery",
      anastomosis: "Ileum → mid-transverse colon",
      nodes: "Splenic flexure mobilisation if needed",
      color: ACCENT2
    }
  ];

  ops.forEach((op, i) => {
    const cardY = 0.65 + i * 2.05;
    s.addShape(pres.shapes.RECTANGLE, { x: 0.15, y: cardY, w: 6.9, h: 1.9, fill: { color: CARD_BG }, shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.2 } });
    // colour accent strip
    s.addShape(pres.shapes.RECTANGLE, { x: 0.15, y: cardY, w: 0.2, h: 1.9, fill: { color: op.color } });
    // title
    s.addText(op.title, { x: 0.5, y: cardY + 0.07, w: 6.5, h: 0.38, fontSize: 14, bold: true, color: op.color, margin: 0 });
    const details = [
      { text: "Location: ", options: { bold: true, color: LIGHT } },
      { text: op.loc + "\n", options: { color: LIGHT } },
      { text: "Vessels: ", options: { bold: true, color: GREY } },
      { text: op.vessels + "\n", options: { color: GREY } },
      { text: "Anastomosis: ", options: { bold: true, color: ACCENT4 } },
      { text: op.anastomosis + "\n", options: { color: ACCENT4 } },
      { text: "Note: ", options: { bold: true, color: ACCENT3 } },
      { text: op.nodes, options: { color: ACCENT3 } },
    ];
    s.addText(details, { x: 0.5, y: cardY + 0.48, w: 6.5, h: 1.32, fontSize: 10.5, valign: "top", margin: 0, wrap: true });
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 4 – LEFT COLON
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  addSlideBg(s);
  addTopBar(s, ACCENT2, "LEFT-SIDED CRC  |  Transverse · Splenic Flexure · Descending · Sigmoid");
  addFooter(s);

  if (colonImg) {
    s.addImage({ data: colonImg, x: 7.3, y: 0.65, w: 5.6, h: 6.25 });
    s.addShape(pres.shapes.RECTANGLE, { x: 7.3, y: 6.55, w: 5.6, h: 0.35, fill: { color: "0A1620" } });
    s.addText("Fig: Resection types G→K (left hemicolectomy, sigmoid)", {
      x: 7.35, y: 6.57, w: 5.5, h: 0.3, fontSize: 8, color: GREY, italic: true, margin: 0
    });
  }

  const ops = [
    {
      title: "Transverse Colectomy",
      loc: "Mid/distal transverse colon",
      vessels: "Middle colic artery",
      anastomosis: "Ascending colon → descending colon",
      note: "Hepatic + splenic flexure mobilisation required",
      color: ACCENT3
    },
    {
      title: "Left Hemicolectomy",
      loc: "Descending colon",
      vessels: "Left colic artery (IMA branch)",
      anastomosis: "Transverse colon → sigmoid colon",
      note: "Splenic flexure mobilised for tension-free anastomosis",
      color: ACCENT2
    },
    {
      title: "Sigmoid Colectomy",
      loc: "Sigmoid colon",
      vessels: "Sigmoid branches of inferior mesenteric artery",
      anastomosis: "Descending colon → upper rectum",
      note: "Full mobilisation of splenic flexure often needed",
      color: ACCENT4
    }
  ];

  ops.forEach((op, i) => {
    const cardY = 0.65 + i * 2.05;
    s.addShape(pres.shapes.RECTANGLE, { x: 0.15, y: cardY, w: 6.9, h: 1.9, fill: { color: CARD_BG }, shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.2 } });
    s.addShape(pres.shapes.RECTANGLE, { x: 0.15, y: cardY, w: 0.2, h: 1.9, fill: { color: op.color } });
    s.addText(op.title, { x: 0.5, y: cardY + 0.07, w: 6.5, h: 0.38, fontSize: 14, bold: true, color: op.color, margin: 0 });
    const details = [
      { text: "Location: ", options: { bold: true, color: LIGHT } },
      { text: op.loc + "\n", options: { color: LIGHT } },
      { text: "Vessels: ", options: { bold: true, color: GREY } },
      { text: op.vessels + "\n", options: { color: GREY } },
      { text: "Anastomosis: ", options: { bold: true, color: ACCENT4 } },
      { text: op.anastomosis + "\n", options: { color: ACCENT4 } },
      { text: "Note: ", options: { bold: true, color: ACCENT3 } },
      { text: op.note, options: { color: ACCENT3 } },
    ];
    s.addText(details, { x: 0.5, y: cardY + 0.48, w: 6.5, h: 1.32, fontSize: 10.5, valign: "top", margin: 0, wrap: true });
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 5 – RECTAL CANCER
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  addSlideBg(s);
  addTopBar(s, ACCENT1, "RECTAL CANCER  |  Upper · Mid · Low Rectum");
  addFooter(s);

  // Key principle banner
  s.addShape(pres.shapes.RECTANGLE, { x: 0.15, y: 0.65, w: 13.0, h: 0.52, fill: { color: "1D3F5C" } });
  s.addText("Total Mesorectal Excision (TME) is the oncological cornerstone for all rectal cancer surgery — ensures complete removal of node-bearing mesorectum", {
    x: 0.3, y: 0.65, w: 12.7, h: 0.52,
    fontSize: 11, bold: true, color: ACCENT3, valign: "middle", margin: 0
  });

  const rops = [
    {
      title: "Local Excision / TEM",
      subtitle: "Transanal Endoscopic Microsurgery",
      loc: "T1 tumours, <3 cm, well-differentiated, no LVI/PNI",
      detail: "Transanal endoscopic approach\nNegative 2 mm margins required\n15% recurrence risk (higher in T2/T3)\nFollow-up colonoscopy at 3 months",
      color: ACCENT4
    },
    {
      title: "Anterior Resection (AR / LAR)",
      subtitle: "Low/Ultra-low Anterior Resection",
      loc: "Upper rectum (>12 cm) and mid rectum (5–12 cm) with sphincter preservation",
      detail: "Sphincter-sparing; maintains anal continence\nTotal mesorectal excision (TME)\nCircumferential resection margin (CRM) assessed by MRI\nColorectal or coloanal anastomosis",
      color: ACCENT2
    },
    {
      title: "Abdominoperineal Resection (APR)",
      subtitle: "Miles' Operation",
      loc: "Low rectum when negative distal margins cannot be achieved",
      detail: "Removes entire rectum, anal canal, and sphincter complex\nPermanent end colostomy\nIndicated when LAR not possible\nHigher morbidity; perineal wound complications",
      color: ACCENT1
    },
    {
      title: "Hartmann's Procedure",
      subtitle: "Emergency / High Risk",
      loc: "Obstructing / perforated left colon or rectal cancer; frail patients",
      detail: "Sigmoid / rectal resection without anastomosis\nEnd colostomy + Hartmann's pouch (rectal stump)\nReversal possible (2nd stage) in fit patients\nReduces anastomotic leak risk in emergency",
      color: ACCENT3
    }
  ];

  rops.forEach((op, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const cx = 0.15 + col * 6.6;
    const cy = 1.3 + row * 2.95;
    s.addShape(pres.shapes.RECTANGLE, { x: cx, y: cy, w: 6.4, h: 2.75, fill: { color: CARD_BG }, shadow: { type: "outer", color: "000000", blur: 5, offset: 2, angle: 135, opacity: 0.2 } });
    s.addShape(pres.shapes.RECTANGLE, { x: cx, y: cy, w: 6.4, h: 0.55, fill: { color: op.color } });
    s.addText(op.title, { x: cx + 0.1, y: cy + 0.04, w: 6.2, h: 0.28, fontSize: 13, bold: true, color: WHITE, margin: 0 });
    s.addText(op.subtitle, { x: cx + 0.1, y: cy + 0.3, w: 6.2, h: 0.22, fontSize: 9, italic: true, color: "rgba(255,255,255,0.8)", margin: 0, color: "E0E0E0" });
    s.addText([
      { text: "Indication: ", options: { bold: true, color: ACCENT3 } },
      { text: op.loc + "\n", options: { color: LIGHT } },
    ], { x: cx + 0.1, y: cy + 0.6, w: 6.2, h: 0.45, fontSize: 10, wrap: true, margin: 0 });
    s.addText(op.detail, {
      x: cx + 0.1, y: cy + 1.05, w: 6.2, h: 1.6,
      fontSize: 10, color: GREY, wrap: true, valign: "top", margin: 0
    });
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 6 – SPECIAL CASES (Total Colectomy, Laparoscopic vs Open)
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  addSlideBg(s);
  addTopBar(s, ACCENT4, "SPECIAL CASES  |  Total Colectomy · Laparoscopic vs Open");
  addFooter(s);

  // LEFT COLUMN: Total / Subtotal Colectomy
  s.addShape(pres.shapes.RECTANGLE, { x: 0.15, y: 0.65, w: 6.3, h: 0.4, fill: { color: ACCENT4 } });
  s.addText("Total / Subtotal Colectomy", { x: 0.25, y: 0.65, w: 6.1, h: 0.4, fontSize: 13, bold: true, color: WHITE, valign: "middle", margin: 0 });

  const totalItems = [
    { head: "Indications", text: "FAP (attenuated or classic)\nLynch syndrome / IBD-related CRC\nSynchronous colon carcinomas\nFulminant colitis" },
    { head: "Vessels ligated", text: "All colic vessels (ileocolic, right colic, middle colic, left colic)\nSuperior rectal vessels preserved" },
    { head: "Anastomosis options", text: "Ileum → sigmoid (subtotal, ileosigmoid)\nIleum → upper rectum (total abdominal colectomy + IRA)\nEnd ileostomy + Hartmann's pouch if anastomosis contraindicated" },
    { head: "IPAA (Restorative Proctocolectomy)", text: "Entire colon + rectum removed; ileal pouch-anal anastomosis\nPreserves anal function\nPreferred for FAP; 50% risk of minor incontinence" },
  ];

  totalItems.forEach((item, i) => {
    const iy = 1.15 + i * 1.45;
    s.addShape(pres.shapes.RECTANGLE, { x: 0.15, y: iy, w: 6.3, h: 1.35, fill: { color: CARD_BG } });
    s.addText(item.head, { x: 0.3, y: iy + 0.04, w: 6.0, h: 0.3, fontSize: 11, bold: true, color: ACCENT4, margin: 0 });
    s.addText(item.text, { x: 0.3, y: iy + 0.35, w: 6.0, h: 0.9, fontSize: 9.5, color: LIGHT, wrap: true, valign: "top", margin: 0 });
  });

  // RIGHT COLUMN: Laparoscopic vs Open
  s.addShape(pres.shapes.RECTANGLE, { x: 6.85, y: 0.65, w: 6.3, h: 0.4, fill: { color: ACCENT2 } });
  s.addText("Laparoscopic vs Open Approach", { x: 6.95, y: 0.65, w: 6.1, h: 0.4, fontSize: 13, bold: true, color: WHITE, valign: "middle", margin: 0 });

  // comparison table
  const compRows = [
    ["Aspect",           "Laparoscopic",             "Open"],
    ["Recovery",         "Faster (shorter LOS)",     "Longer hospital stay"],
    ["Oncological outcome", "Equivalent to open",    "Equivalent"],
    ["Complications",    "Lower wound complications","Higher wound morbidity"],
    ["Conversion rate",  "5–10% (to open)",          "N/A"],
    ["Preferred when",   "Elective, non-perforated", "Adjacent organ invasion, perforation"],
    ["Standard?",        "Yes – elective CRC",       "Emergency / complex cases"],
  ];

  compRows.forEach((row, i) => {
    const ry = 1.15 + i * 0.77;
    const bg = i === 0 ? "1D3F5C" : (i % 2 === 0 ? CARD_BG : MID_BG);
    const textColor = i === 0 ? ACCENT2 : LIGHT;
    const boldFlag = i === 0;
    [row[0], row[1], row[2]].forEach((cell, ci) => {
      const cx2 = 6.85 + ci * 2.1;
      const cw  = ci === 0 ? 2.1 : 2.1;
      s.addShape(pres.shapes.RECTANGLE, { x: cx2, y: ry, w: cw, h: 0.7, fill: { color: bg } });
      s.addText(cell, { x: cx2 + 0.07, y: ry + 0.04, w: cw - 0.1, h: 0.62, fontSize: 9.5, bold: boldFlag, color: i === 0 ? ACCENT2 : (ci === 1 ? ACCENT4 : (ci === 2 ? ACCENT3 : LIGHT)), valign: "middle", wrap: true, margin: 0 });
    });
  });

  // Key quality metric note
  s.addShape(pres.shapes.RECTANGLE, { x: 6.85, y: 6.65, w: 6.3, h: 0.5, fill: { color: "1D3F5C" } });
  s.addText("Quality standard: Minimum 12 lymph nodes must be examined at resection (ACSS / ASCO / NCCN)", {
    x: 6.95, y: 6.65, w: 6.1, h: 0.5, fontSize: 10, bold: true, color: ACCENT3, valign: "middle", wrap: true, margin: 0
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 7 – SURGICAL PRINCIPLES (GENERAL)
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  addSlideBg(s);
  addTopBar(s, ACCENT3, "GENERAL SURGICAL PRINCIPLES  |  Applicable to All CRC Resections");
  addFooter(s);

  const principles = [
    { icon: "01", title: "Adequate Margins", body: "Wide resection of tumour with clear proximal and distal margins. No tumour at cut end ensures R0 resection.", color: ACCENT1 },
    { icon: "02", title: "En Bloc Lymphadenectomy", body: "Minimum 12 regional lymph nodes must be harvested and examined. More nodes = more accurate staging = better treatment selection.", color: ACCENT2 },
    { icon: "03", title: "High Vascular Ligation", body: "Vessels ligated at their origin to maximise lymph node yield along the vascular pedicle (central vascular ligation).", color: ACCENT3 },
    { icon: "04", title: "Total Mesorectal Excision (TME)", body: "Mandatory for rectal cancer. Sharp dissection in avascular plane surrounding the mesorectum. Reduces local recurrence from ~25% to <5%.", color: ACCENT4 },
    { icon: "05", title: "Tension-free Anastomosis", body: "Adequate mobilisation (e.g., splenic flexure) to prevent anastomotic leak. Stapled or hand-sewn depending on location and surgeon preference.", color: ACCENT1 },
    { icon: "06", title: "Endoscopic Options", body: "Carcinoma in polyp (T1, well-diff, no LVI): endoscopic resection ± ESD acceptable. 2 mm negative margins + follow-up colonoscopy at 3 months.", color: ACCENT2 },
  ];

  principles.forEach((p, i) => {
    const col = i % 3;
    const row = Math.floor(i / 3);
    const cx = 0.15 + col * 4.37;
    const cy = 0.65 + row * 3.1;
    s.addShape(pres.shapes.RECTANGLE, { x: cx, y: cy, w: 4.15, h: 2.95, fill: { color: CARD_BG }, shadow: { type: "outer", color: "000000", blur: 5, offset: 2, angle: 135, opacity: 0.18 } });
    // top colour bar
    s.addShape(pres.shapes.RECTANGLE, { x: cx, y: cy, w: 4.15, h: 0.12, fill: { color: p.color } });
    // number badge
    s.addShape(pres.shapes.ELLIPSE, { x: cx + 0.15, y: cy + 0.2, w: 0.48, h: 0.48, fill: { color: p.color } });
    s.addText(p.icon, { x: cx + 0.15, y: cy + 0.2, w: 0.48, h: 0.48, fontSize: 13, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
    // title
    s.addText(p.title, { x: cx + 0.75, y: cy + 0.22, w: 3.3, h: 0.48, fontSize: 13, bold: true, color: p.color, valign: "middle", margin: 0 });
    // body
    s.addText(p.body, { x: cx + 0.15, y: cy + 0.8, w: 3.85, h: 2.0, fontSize: 10.5, color: LIGHT, wrap: true, valign: "top", margin: 0 });
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 8 – SUMMARY QUICK-REFERENCE
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: DARK_BG };

  s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 0.55, fill: { color: ACCENT1 } });
  s.addText("QUICK REFERENCE  |  CRC Location → Operation at a Glance", {
    x: 0.3, y: 0, w: 12.7, h: 0.55, fontSize: 13, bold: true, color: WHITE, valign: "middle", margin: 0
  });

  // Visual horizontal flow
  const zones = [
    { label: "Caecum", op: "Ileocaecectomy", color: ACCENT1 },
    { label: "Ascending", op: "Right Hemi-colectomy", color: ACCENT1 },
    { label: "Hepatic Flexure", op: "Extended Right Hemi-colectomy", color: ACCENT3 },
    { label: "Transverse", op: "Transverse Colectomy", color: ACCENT3 },
    { label: "Splenic Flexure", op: "Extended Left Hemi-colectomy", color: ACCENT2 },
    { label: "Descending", op: "Left Hemi-colectomy", color: ACCENT2 },
    { label: "Sigmoid", op: "Sigmoid Colectomy", color: ACCENT4 },
    { label: "Rectum", op: "AR / APR + TME", color: ACCENT4 },
  ];

  zones.forEach((z, i) => {
    const bx = 0.15 + i * 1.62;
    // top location block
    s.addShape(pres.shapes.RECTANGLE, { x: bx, y: 0.65, w: 1.5, h: 0.52, fill: { color: z.color } });
    s.addText(z.label, { x: bx, y: 0.65, w: 1.5, h: 0.52, fontSize: 9.5, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
    // arrow down
    s.addText("▼", { x: bx, y: 1.2, w: 1.5, h: 0.3, fontSize: 12, color: z.color, align: "center", margin: 0 });
    // operation block
    s.addShape(pres.shapes.RECTANGLE, { x: bx, y: 1.5, w: 1.5, h: 0.95, fill: { color: CARD_BG } });
    s.addShape(pres.shapes.RECTANGLE, { x: bx, y: 1.5, w: 1.5, h: 0.08, fill: { color: z.color } });
    s.addText(z.op, { x: bx + 0.05, y: 1.58, w: 1.4, h: 0.85, fontSize: 9, color: WHITE, align: "center", valign: "middle", wrap: true, margin: 0 });
  });

  // Below: key rules
  s.addShape(pres.shapes.RECTANGLE, { x: 0.15, y: 2.6, w: 13.0, h: 0.05, fill: { color: ACCENT2 } });

  const rules = [
    { col: ACCENT1, title: "Right colon", text: "Typically presents with occult bleeding & anaemia\nRight hemicolectomy: standard approach" },
    { col: ACCENT3, title: "Transverse colon", text: "Less common; both flexures may need mobilisation\nExtended right or left hemicolectomy often preferred" },
    { col: ACCENT2, title: "Left colon", text: "Presents with change in bowel habit / obstruction\nSplenic flexure mobilisation for tension-free anastomosis" },
    { col: ACCENT4, title: "Rectum", text: "TME is mandatory\nT1: local excision; T2/T3: LAR or APR\nNeoadjuvant chemoradiotherapy for T3/T4 or N+" },
  ];

  rules.forEach((r, i) => {
    const rx = 0.15 + i * 3.3;
    s.addShape(pres.shapes.RECTANGLE, { x: rx, y: 2.75, w: 3.15, h: 3.8, fill: { color: CARD_BG } });
    s.addShape(pres.shapes.RECTANGLE, { x: rx, y: 2.75, w: 3.15, h: 0.42, fill: { color: r.col } });
    s.addText(r.title, { x: rx + 0.1, y: 2.75, w: 2.95, h: 0.42, fontSize: 13, bold: true, color: WHITE, valign: "middle", margin: 0 });
    s.addText(r.text, { x: rx + 0.1, y: 3.22, w: 2.95, h: 3.2, fontSize: 11, color: LIGHT, wrap: true, valign: "top", margin: 0 });
  });

  // Footer note
  s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 7.22, w: 13.3, h: 0.28, fill: { color: "0A1620" } });
  s.addText("Sources: Schwartz's Principles of Surgery 11th Ed. | Bailey & Love 28th Ed. | Yamada's Gastroenterology 7th Ed.", {
    x: 0.3, y: 7.22, w: 12.7, h: 0.28, fontSize: 7.5, color: GREY, valign: "middle", margin: 0
  });
}

// ─── WRITE FILE ────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/crc-surgery-ppt/CRC_Surgical_Approaches.pptx" })
  .then(() => console.log("DONE"))
  .catch(e => { console.error(e); process.exit(1); });
Running Command

cd /home/daytona/workspace/crc-surgery-ppt && node build.js 2>&1

Running Command

node -e "const p = require('pptxgenjs'); const pr = new p(); console.log(Object.keys(pr.shapes).filter(k => k.toLowerCase().includes('ell') || k.toLowerCase().includes('circ')))"

Editing File

~/crc-surgery-ppt/build.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/crc-surgery-ppt/build.js'
Running Command

cd /home/daytona/workspace/crc-surgery-ppt && node build.js 2>&1

The presentation is ready. Here's your download link:

CRC Surgical Approaches

Presentation · PPTX


What's inside (8 slides, dark navy + surgical red/blue theme):
SlideContent
1Title slide - with the Schwartz's colon anatomy diagram
2Master overview table - all CRC locations, operations, vessels ligated, and anastomosis type
3Right-sided CRC - Ileocaecectomy, Right Hemicolectomy, Extended Right Hemicolectomy (with anatomy diagram)
4Left-sided CRC - Transverse Colectomy, Left Hemicolectomy, Sigmoid Colectomy (with anatomy diagram)
5Rectal cancer - Local excision/TEM, Anterior Resection, Abdominoperineal Resection, Hartmann's Procedure
6Special cases - Total/Subtotal Colectomy, IPAA for FAP; Laparoscopic vs Open comparison table
7General surgical principles - 6 principles: margins, lymphadenectomy, TME, vascular ligation, tension-free anastomosis, endoscopic options
8Quick-reference summary - visual horizontal flow (caecum → rectum → operation) + 4 regional rule cards
All content sourced from Schwartz's Principles of Surgery (11th Ed.), Bailey & Love (28th Ed.), and Yamada's Gastroenterology (7th Ed.).
This is a shared conversation. Sign in to Orris to start your own chat.