management of direct and indirect hernia high yield
"inguinal hernia" AND repair
| Feature | Indirect (Lateral/Oblique) | Direct (Medial) |
|---|---|---|
| Location relative to inferior epigastric vessels | Lateral | Medial |
| Site of origin | Deep (internal) inguinal ring | Hesselbach's triangle |
| Hesselbach's triangle boundaries | - | Medially: rectus abdominis; Laterally: inferior epigastric vessels; Floor: inguinal ligament |
| Type | Congenital (patent processus vaginalis) | Always acquired |
| Can descend to scrotum? | Yes | No |
| Risk of strangulation | Higher (narrow neck) | Lower (broad base) |
| Bladder involvement | Rare | Can be pulled in (sliding) |
| Age group | Young (also elderly) | Elderly |
| Coverings | All 3 layers of spermatic cord | Only external spermatic fascia |
| Type | Description |
|---|---|
| I | Indirect, normal internal ring (pediatric/infant) |
| II | Indirect, enlarged internal ring, floor intact, does NOT extend to scrotum |
| IIIA | Direct hernia (any size) |
| IIIB | Indirect, dilated internal ring encroaching on inguinal floor; includes scrotal and sliding hernias |
| IIIC | Femoral hernia |
| IV | Recurrent hernia (A=direct, B=indirect, C=femoral, D=combination) |
| Repair | Key Feature | Notes |
|---|---|---|
| Bassini | Conjoint tendon sutured to inguinal ligament | Historical; higher recurrence |
| Shouldice | 4-layer running suture of transversalis fascia (tension-free tissue) | Best pure tissue repair; ~1% recurrence at specialized centers; higher in general settings |
| McVay (Cooper's ligament) | Conjoint tendon to Cooper's ligament | Used for femoral hernia repair too |
| Desarda | External oblique aponeurosis autogenous patch | Tension-free tissue repair; promising early data |
| Approach | Description | Best for |
|---|---|---|
| TAPP (TransAbdominal PrePeritoneal) | Enter peritoneal cavity, then dissect preperitoneal space, place mesh, close peritoneum | Bilateral hernias, diagnostic laparoscopy needed, recurrent after open |
| TEP (Totally ExtraPeritoneal) | Enter preperitoneal space directly, never breach peritoneum | Bilateral hernias (no peritoneal closure needed); prior pelvic surgery relative contraindication |
| Robotic TAPP | Preferred robotic platform approach | Increasing adoption, ergonomic advantage |
| Situation | Management |
|---|---|
| Incarcerated hernia (reducible) | Attempt manual reduction (Trendelenburg + gentle pressure from below toward internal ring); if successful, elective repair within 24-48h |
| Strangulated hernia | Emergency surgery; may need bowel resection; use tissue repair if contaminated field |
| Pediatric hernia | High ligation of sac at internal ring; no floor repair needed; contralateral exploration controversial (laparoscopic assessment via hernia sac reasonable) |
| Sliding hernia | Part of sac formed by viscera (sigmoid on left, cecum on right, bladder in direct); extra care during dissection |
| Pantaloon hernia | Combined direct + indirect on same side (straddles inferior epigastric vessels) |
| Recurrent hernia | Use posterior approach (laparoscopic) if initial repair was anterior, and vice versa |
| Female hernia | Higher recurrence rate; occult femoral hernia common - laparoscopic approach preferred |
| Bilateral hernia | Laparoscopic (single access, both sides) preferred |
| Complication | Notes |
|---|---|
| Chronic pain (most common overall) | 11-18%; higher with open/mesh/tack fixation; related to nerve injury |
| Recurrence | Lichtenstein ~0.5-1%; tissue repairs 1-3% (general surgeons) |
| Wound infection / seroma | More common with mesh |
| Ischemic orchitis | Damage to testicular artery during dissection |
| Vas deferens injury | Especially in pediatric repair |
| Bladder injury | In direct hernias (sliding bladder) or preperitoneal dissection |
| Femoral vessel injury | Sutures too deep into inguinal ligament |
surgical approaches available for abdominal[direct/indirect] hernia with their core procedure steps in flowchart
ls -la /home/daytona/workspace/ && mkdir -p /home/daytona/workspace/hernia-flowchart
~/hernia-flowchart/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE"; // 13.3 x 7.5
// ─── PALETTE ───────────────────────────────────────────────────────────────
const C = {
darkBg: "0D1B2A", // deep navy - title/section bg
midBg: "1B2838", // slightly lighter navy
accentA: "00B4D8", // cyan - open mesh
accentB: "06D6A0", // teal-green - tissue
accentC: "FFB703", // amber - laparoscopic
accentD: "FB5607", // orange-red - emergency
accentE: "9B5DE5", // violet - robotic
boxBg: "1E3A5F", // medium blue box bg
boxBg2: "122A40", // darker box
stepBg: "0A2540", // step card bg
white: "FFFFFF",
offWhite: "E0F0FF",
lightGray:"A8C8E8",
arrow: "4FC3F7",
decBg: "1A3A5C",
decText: "FFB703",
};
// ─── HELPER: Flowchart box (rounded rect) ──────────────────────────────────
function fcBox(slide, x, y, w, h, text, color, textColor, fontSize, bold) {
slide.addShape(pres.ShapeType.roundRect, {
x, y, w, h,
fill: { color },
line: { color: "FFFFFF", width: 0.5 },
rectRadius: 0.08,
});
slide.addText(text, {
x, y, w, h,
color: textColor || C.white,
fontSize: fontSize || 11,
bold: bold !== undefined ? bold : true,
align: "center",
valign: "middle",
wrap: true,
margin: 4,
});
}
// ─── HELPER: Diamond decision shape ───────────────────────────────────────
function diamond(slide, x, y, w, h, text, bgColor, textColor, fontSize) {
slide.addShape(pres.ShapeType.diamond, {
x, y, w, h,
fill: { color: bgColor || C.decBg },
line: { color: C.decText, width: 1.2 },
});
slide.addText(text, {
x, y, w, h,
color: textColor || C.decText,
fontSize: fontSize || 9.5,
bold: true,
align: "center",
valign: "middle",
wrap: true,
margin: 4,
});
}
// ─── HELPER: Arrow ────────────────────────────────────────────────────────
function arrow(slide, x1, y1, x2, y2) {
slide.addShape(pres.ShapeType.line, {
x: x1, y: y1, w: x2 - x1, h: y2 - y1,
line: { color: C.arrow, width: 1.5, endArrowType: "triangle" },
});
}
// ─── HELPER: Section header bar ────────────────────────────────────────────
function sectionBar(slide, x, y, w, h, label, color) {
slide.addShape(pres.ShapeType.rect, {
x, y, w, h,
fill: { color },
line: { color: "FFFFFF", width: 0 },
});
slide.addText(label, {
x, y, w, h,
color: C.white,
fontSize: 9,
bold: true,
align: "center",
valign: "middle",
charSpacing: 2,
});
}
// ─── HELPER: numbered step card ────────────────────────────────────────────
function stepCard(slide, x, y, num, text, accentColor) {
const W = 1.95, H = 0.52;
// accent circle
slide.addShape(pres.ShapeType.ellipse, {
x: x, y: y, w: 0.3, h: 0.3,
fill: { color: accentColor },
line: { color: accentColor, width: 0 },
});
slide.addText(String(num), {
x: x, y: y, w: 0.3, h: 0.3,
color: C.darkBg, fontSize: 8, bold: true,
align: "center", valign: "middle",
});
slide.addText(text, {
x: x + 0.33, y: y + 0.03, w: W - 0.36, h: H - 0.06,
color: C.offWhite, fontSize: 7.8, bold: false,
align: "left", valign: "top", wrap: true,
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
// Full-bleed dark bg
s.addShape(pres.ShapeType.rect, { x:0,y:0,w:13.3,h:7.5, fill:{color:C.darkBg}, line:{color:C.darkBg} });
// Accent bars top/bottom
s.addShape(pres.ShapeType.rect, { x:0,y:0,w:13.3,h:0.18, fill:{color:C.accentA}, line:{color:C.accentA} });
s.addShape(pres.ShapeType.rect, { x:0,y:7.32,w:13.3,h:0.18, fill:{color:C.accentC}, line:{color:C.accentC} });
// Left vertical accent
s.addShape(pres.ShapeType.rect, { x:0,y:0.18,w:0.22,h:7.14, fill:{color:C.accentB}, line:{color:C.accentB} });
// Title
s.addText("SURGICAL APPROACHES FOR INGUINAL HERNIA", {
x:0.5, y:1.6, w:12.4, h:1.1,
color: C.accentA, fontSize: 38, bold: true, align: "center",
charSpacing: 3,
});
s.addText("Direct & Indirect — Core Procedure Steps Flowchart", {
x:0.5, y:2.75, w:12.4, h:0.65,
color: C.offWhite, fontSize: 22, bold: false, align: "center",
});
// Divider
s.addShape(pres.ShapeType.line, { x:1.5, y:3.55, w:10.3, h:0, line:{ color:C.accentC, width:1.5 } });
// Legend row
const legendItems = [
{ color: C.accentA, label: "Open Mesh Repair" },
{ color: C.accentB, label: "Tissue (Non-Mesh) Repair" },
{ color: C.accentC, label: "Laparoscopic Repair" },
{ color: C.accentE, label: "Robotic-Assisted" },
{ color: C.accentD, label: "Emergency/Urgent" },
];
legendItems.forEach((item, i) => {
const lx = 1.2 + i * 2.2;
s.addShape(pres.ShapeType.ellipse, { x:lx, y:3.85, w:0.25, h:0.25, fill:{color:item.color}, line:{color:item.color} });
s.addText(item.label, { x:lx+0.3, y:3.83, w:1.85, h:0.28, color:C.lightGray, fontSize:10, bold:false, align:"left", valign:"middle" });
});
// Subtitle note
s.addText("Based on: Schwartz's Principles of Surgery 11e | Mulholland & Greenfield Surgery 7e | Bailey & Love 28e | Current Surgical Therapy 14e", {
x:0.5, y:6.9, w:12.4, h:0.35,
color: "4A6A8A", fontSize: 7.5, align:"center", italic: true,
});
// Type boxes
const typeW = 3.2, typeH = 1.4, typeY = 4.5;
// Direct
s.addShape(pres.ShapeType.roundRect, { x:1.0, y:typeY, w:typeW, h:typeH, fill:{color:C.boxBg}, line:{color:C.accentA, width:1.5}, rectRadius:0.1 });
s.addText("DIRECT HERNIA", { x:1.0, y:typeY+0.08, w:typeW, h:0.28, color:C.accentA, fontSize:11, bold:true, align:"center" });
s.addText([
{ text: "• Medial to inferior epigastric vessels\n", options:{} },
{ text: "• Through Hesselbach's triangle\n", options:{} },
{ text: "• Always acquired\n", options:{} },
{ text: "• Broad base → low strangulation risk", options:{} },
], { x:1.05, y:typeY+0.38, w:typeW-0.1, h:typeH-0.5, color:C.offWhite, fontSize:9.2, align:"left", wrap:true });
// Indirect
s.addShape(pres.ShapeType.roundRect, { x:5.05, y:typeY, w:typeW, h:typeH, fill:{color:C.boxBg}, line:{color:C.accentB, width:1.5}, rectRadius:0.1 });
s.addText("INDIRECT HERNIA", { x:5.05, y:typeY+0.08, w:typeW, h:0.28, color:C.accentB, fontSize:11, bold:true, align:"center" });
s.addText([
{ text: "• Lateral to inferior epigastric vessels\n", options:{} },
{ text: "• Through deep (internal) inguinal ring\n", options:{} },
{ text: "• Congenital or acquired\n", options:{} },
{ text: "• Can descend to scrotum", options:{} },
], { x:5.1, y:typeY+0.38, w:typeW-0.1, h:typeH-0.5, color:C.offWhite, fontSize:9.2, align:"left", wrap:true });
// Shared repairs
s.addShape(pres.ShapeType.roundRect, { x:9.1, y:typeY, w:3.0, h:typeH, fill:{color:"1A3020"}, line:{color:C.accentC, width:1.5}, rectRadius:0.1 });
s.addText("SHARED REPAIRS", { x:9.1, y:typeY+0.08, w:3.0, h:0.28, color:C.accentC, fontSize:11, bold:true, align:"center" });
s.addText([
{ text: "• Lichtenstein (mesh)\n", options:{} },
{ text: "• Shouldice / Bassini (tissue)\n", options:{} },
{ text: "• Laparoscopic TEP / TAPP\n", options:{} },
{ text: "• Robotic TAPP", options:{} },
], { x:9.15, y:typeY+0.38, w:2.9, h:typeH-0.5, color:C.offWhite, fontSize:9.2, align:"left", wrap:true });
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — DECISION FLOWCHART (Master Overview)
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0,y:0,w:13.3,h:7.5, fill:{color:C.darkBg}, line:{color:C.darkBg} });
s.addShape(pres.ShapeType.rect, { x:0,y:0,w:13.3,h:0.42, fill:{color:C.boxBg}, line:{color:C.boxBg} });
s.addText("SURGICAL DECISION FLOWCHART — Inguinal Hernia", {
x:0.2, y:0, w:13, h:0.42, color:C.accentA, fontSize:16, bold:true, align:"center", valign:"middle", charSpacing:1,
});
// Start
fcBox(s, 5.45, 0.55, 2.4, 0.42, "INGUINAL HERNIA DIAGNOSED", C.boxBg, C.accentA, 9, true);
arrow(s, 6.65, 0.97, 6.65, 1.38);
// Acute?
diamond(s, 5.45, 1.38, 2.4, 0.72, "Acute presentation?\n(Incarcerated / Strangulated)", C.decBg, C.decText, 8.5);
// YES branch
arrow(s, 5.45, 1.74, 3.5, 1.74); // left
s.addText("YES", { x:4.0, y:1.55, w:0.5, h:0.25, color:C.accentD, fontSize:8, bold:true, align:"center" });
fcBox(s, 1.9, 1.46, 1.55, 0.56, "Attempt Manual\nReduction", "2D1010", C.accentD, 8.5, true);
arrow(s, 2.68, 2.02, 2.68, 2.42);
diamond(s, 1.82, 2.42, 1.72, 0.7, "Successful?", "2D1010", C.accentD, 8.5);
// yes -> elective
arrow(s, 1.82, 2.77, 1.0, 3.35);
s.addText("YES", { x:0.85, y:2.98, w:0.55, h:0.22, color:C.accentB, fontSize:7.5, bold:true });
fcBox(s, 0.18, 3.35, 1.6, 0.5, "Elective repair\nwithin 24–48 h", "0D2D18", C.accentB, 7.5, false);
// no -> emergency
arrow(s, 3.54, 2.77, 4.1, 3.35);
s.addText("NO", { x:3.6, y:2.98, w:0.55, h:0.22, color:C.accentD, fontSize:7.5, bold:true });
fcBox(s, 3.55, 3.35, 1.85, 0.5, "EMERGENCY\nSURGERY", C.accentD, C.darkBg, 8.5, true);
// emergency note
s.addText("± Bowel resection\n→ Tissue repair (no mesh)", {
x:3.55, y:3.9, w:1.85, h:0.45, color:"FFAA44", fontSize:7.2, align:"center", italic:true,
});
// NO branch → elective
arrow(s, 6.65, 2.1, 6.65, 2.5); // down from diamond
s.addText("NO", { x:6.7, y:2.18, w:0.5, h:0.22, color:C.accentB, fontSize:7.5, bold:true });
diamond(s, 5.42, 2.5, 2.46, 0.72, "Symptomatic?", C.decBg, C.decText, 9);
// Asymptomatic
arrow(s, 7.88, 2.86, 9.4, 2.86);
s.addText("NO (asymptomatic)", { x:7.9, y:2.62, w:1.45, h:0.28, color:C.lightGray, fontSize:7, align:"center" });
fcBox(s, 9.4, 2.62, 1.85, 0.48, "Watchful Waiting\n(acceptable in males)", "1A2A1A", C.accentB, 7.5, false);
// Symptomatic → elective
arrow(s, 6.65, 3.22, 6.65, 3.62);
s.addText("YES", { x:6.7, y:3.3, w:0.5, h:0.22, color:C.accentA, fontSize:7.5, bold:true });
diamond(s, 5.2, 3.62, 2.9, 0.72, "Open vs Laparoscopic?", C.decBg, C.decText, 9);
// ── Open branch ──────────────────────────────────────────────────────────
arrow(s, 5.2, 3.98, 3.3, 4.5);
s.addText("OPEN", { x:3.7, y:4.1, w:0.8, h:0.22, color:C.accentA, fontSize:8, bold:true });
diamond(s, 2.1, 4.5, 2.4, 0.72, "Mesh\nContraindicated?", C.decBg, C.decText, 8.5);
// mesh yes → tissue
arrow(s, 2.1, 4.86, 0.8, 5.5);
s.addText("YES", { x:0.82, y:5.05, w:0.5, h:0.22, color:C.accentB, fontSize:7.5, bold:true });
fcBox(s, 0.12, 5.5, 1.8, 0.5, "TISSUE REPAIR\n(Shouldice / Bassini)", C.accentB, C.darkBg, 7.5, true);
// mesh no → lichtenstein
arrow(s, 4.5, 4.86, 4.9, 5.5);
s.addText("NO", { x:4.55, y:5.05, w:0.4, h:0.22, color:C.accentA, fontSize:7.5, bold:true });
fcBox(s, 3.85, 5.5, 2.1, 0.5, "LICHTENSTEIN\n(Tension-Free Mesh)", C.accentA, C.darkBg, 8, true);
// plug note
s.addText("Alt: Plug & Patch / PHS", {
x:3.85, y:6.05, w:2.1, h:0.3, color:C.lightGray, fontSize:7.2, align:"center", italic:true,
});
// ── Laparoscopic branch ──────────────────────────────────────────────────
arrow(s, 8.1, 3.98, 9.6, 4.5);
s.addText("LAPAROSCOPIC /\nROBOTIC", { x:8.5, y:4.08, w:1.1, h:0.4, color:C.accentC, fontSize:7.5, bold:true, align:"center" });
diamond(s, 8.5, 4.5, 2.3, 0.72, "Approach\nPreference / History?", C.decBg, C.decText, 8.5);
// TAPP
arrow(s, 8.5, 4.86, 7.2, 5.5);
s.addText("TAPP", { x:7.1, y:5.08, w:0.7, h:0.22, color:C.accentC, fontSize:7.5, bold:true });
fcBox(s, 6.1, 5.5, 2.0, 0.5, "TAPP\n(Transabdominal\nPreperitoneal)", C.accentC, C.darkBg, 7.5, true);
// TEP
arrow(s, 10.8, 4.86, 10.8, 5.5);
s.addText("TEP", { x:10.85, y:5.05, w:0.5, h:0.22, color:C.accentC, fontSize:7.5, bold:true });
fcBox(s, 9.85, 5.5, 2.0, 0.5, "TEP\n(Totally\nExtraperitoneal)", C.accentC, C.darkBg, 7.5, true);
// Robotic
arrow(s, 9.65, 4.86, 9.0, 5.5);
fcBox(s, 12.15, 5.5, 1.0, 0.5, "Robotic\nTAPP", C.accentE, C.darkBg, 7.5, true);
arrow(s, 10.8, 4.86, 12.2, 5.5);
// ── Bottom legend ────────────────────────────────────────────────────────
s.addShape(pres.ShapeType.rect, { x:0,y:7.1,w:13.3,h:0.4, fill:{color:C.boxBg2}, line:{color:C.boxBg2} });
s.addText("Preferred for bilateral/recurrent: Laparoscopic | Contaminated field: Tissue repair (no mesh) | Pediatric: High ligation of sac only | Chronic pain risk: Higher with open", {
x:0.2, y:7.1, w:12.9, h:0.4, color:C.lightGray, fontSize:7.5, align:"center", valign:"middle",
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — LICHTENSTEIN (Open Mesh) Flowchart
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0,y:0,w:13.3,h:7.5, fill:{color:C.darkBg}, line:{color:C.darkBg} });
sectionBar(s, 0, 0, 13.3, 0.45, "OPEN MESH REPAIR — LICHTENSTEIN TENSION-FREE HERNIOPLASTY | Gold Standard", C.accentA);
// Sub-header
s.addText("Indications: Symptomatic inguinal hernia (direct or indirect) in adults | Standard first-line open repair", {
x:0.3, y:0.5, w:12.7, h:0.28, color:C.lightGray, fontSize:8.5, align:"center", italic:true,
});
// Steps as a vertical flowchart in 2 columns
const col1 = [
{ n:1, t:"Incision: 6–8 cm oblique\nbelow ASIS to symphysis pubis" },
{ n:2, t:"Divide Scarpa's fascia;\nligate superficial epigastric veins" },
{ n:3, t:"Open external oblique aponeurosis\nalong fiber direction → expose inguinal canal" },
{ n:4, t:"Identify & preserve 3 nerves:\nilioinguinal, iliohypogastric,\ngenital branch of genitofemoral" },
{ n:5, t:"Isolate spermatic cord\n(Penrose drain retraction)" },
{ n:6, t:"Dissect indirect sac\nfrom cord → ligate/reduce at deep ring" },
{ n:7, t:"Assess posterior wall\nfor direct hernia defect" },
];
const col2 = [
{ n:8, t:"Cut polypropylene mesh ~15×7 cm;\nround medial end" },
{ n:9, t:"Fix medial edge to aponeurosis\n2 cm medial to pubic tubercle" },
{ n:10, t:"Running suture: inferior mesh edge\nto inguinal ligament (medial → lateral)" },
{ n:11, t:"Interrupted sutures: superior mesh edge\nto internal oblique aponeurosis" },
{ n:12, t:"Slit lateral mesh → create 2 tails;\nencircle cord → shutter valve stitch\nat lateral inguinal ligament" },
{ n:13, t:"Tuck tails under ext oblique\nto ASIS" },
{ n:14, t:"Close external oblique\n→ reconstruct external ring\n→ Subcuticular skin closure" },
];
const bx1 = 0.25, bx2 = 6.85, startY = 0.9, stepH = 0.74, gap = 0.08;
col1.forEach((item, i) => {
const y = startY + i * (stepH + gap);
s.addShape(pres.ShapeType.roundRect, { x:bx1, y, w:6.35, h:stepH, fill:{color:C.stepBg}, line:{color:C.accentA, width:0.8}, rectRadius:0.07 });
// number badge
s.addShape(pres.ShapeType.ellipse, { x:bx1+0.08, y:y+0.16, w:0.4, h:0.4, fill:{color:C.accentA}, line:{color:C.accentA} });
s.addText(String(item.n), { x:bx1+0.08, y:y+0.16, w:0.4, h:0.4, color:C.darkBg, fontSize:10, bold:true, align:"center", valign:"middle" });
s.addText(item.t, { x:bx1+0.56, y:y+0.07, w:5.72, h:stepH-0.14, color:C.offWhite, fontSize:9.5, align:"left", valign:"middle", wrap:true });
if (i < col1.length - 1) arrow(s, bx1+3.18, y+stepH, bx1+3.18, y+stepH+gap);
});
col2.forEach((item, i) => {
const y = startY + i * (stepH + gap);
s.addShape(pres.ShapeType.roundRect, { x:bx2, y, w:6.35, h:stepH, fill:{color:C.stepBg}, line:{color:C.accentA, width:0.8}, rectRadius:0.07 });
s.addShape(pres.ShapeType.ellipse, { x:bx2+0.08, y:y+0.16, w:0.4, h:0.4, fill:{color:C.accentA}, line:{color:C.accentA} });
s.addText(String(item.n), { x:bx2+0.08, y:y+0.16, w:0.4, h:0.4, color:C.darkBg, fontSize:10, bold:true, align:"center", valign:"middle" });
s.addText(item.t, { x:bx2+0.56, y:y+0.07, w:5.72, h:stepH-0.14, color:C.offWhite, fontSize:9.5, align:"left", valign:"middle", wrap:true });
if (i < col2.length - 1) arrow(s, bx2+3.18, y+stepH, bx2+3.18, y+stepH+gap);
});
// connector: col1 bottom → col2 top
const col1LastY = startY + (col1.length - 1) * (stepH + gap) + stepH;
s.addShape(pres.ShapeType.line, { x:bx1+3.18, y:col1LastY, w:3.67+3.18, h:0, line:{color:C.accentA, width:1.2, dashType:"dash"} });
arrow(s, bx2+3.18, col1LastY, bx2+3.18, startY);
s.addText("Continue →", { x:6.2, y:col1LastY-0.18, w:1.3, h:0.22, color:C.accentA, fontSize:7, align:"center" });
// Recurrence note
s.addShape(pres.ShapeType.rect, { x:0,y:7.1,w:13.3,h:0.4, fill:{color:C.boxBg2}, line:{color:C.boxBg2} });
s.addText("Recurrence: ~0.5–1% | Most common complication: Chronic inguinodynia (11–18%) | Can be done under local/spinal/general anesthesia", {
x:0.2, y:7.1, w:12.9, h:0.4, color:C.lightGray, fontSize:7.5, align:"center", valign:"middle",
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — TISSUE REPAIRS (Shouldice, Bassini, McVay)
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0,y:0,w:13.3,h:7.5, fill:{color:C.darkBg}, line:{color:C.darkBg} });
sectionBar(s, 0, 0, 13.3, 0.45, "TISSUE (NON-MESH) REPAIRS — Shouldice · Bassini · McVay", C.accentB);
s.addText("Use when: Contaminated field | Strangulation with bowel resection | Mesh contraindicated | Patient preference", {
x:0.3, y:0.5, w:12.7, h:0.28, color:C.lightGray, fontSize:8.5, align:"center", italic:true,
});
// ── Shouldice (Best tissue repair) ──────────────────────────────────────
s.addShape(pres.ShapeType.rect, { x:0.2, y:0.88, w:4.15, h:6.15, fill:{color:"0A2210"}, line:{color:C.accentB, width:1.5} });
s.addText("SHOULDICE REPAIR", { x:0.2, y:0.88, w:4.15, h:0.38, color:C.accentB, fontSize:12, bold:true, align:"center", valign:"middle" });
s.addText("Gold standard tissue repair | ~1% recurrence at specialist centers", { x:0.25, y:1.28, w:4.05, h:0.28, color:C.lightGray, fontSize:7.5, align:"center", italic:true });
const shouldiceSteps = [
{ n:1, t:"Incision & dissection identical to Lichtenstein up to cord isolation" },
{ n:2, t:"Divide transversalis fascia from pubic tubercle to deep inguinal ring" },
{ n:3, t:"Develop preperitoneal space; reduce indirect sac; ligate at deep ring" },
{ n:4, t:"LAYER 1: Running suture — deep flap of transversalis fascia to undersurface of superior flap (medial → lateral)" },
{ n:5, t:"LAYER 2: Same suture returns (lateral → medial) approximating superior flap to inguinal ligament" },
{ n:6, t:"LAYER 3: Running suture — internal oblique / conjoined tendon to inguinal ligament" },
{ n:7, t:"LAYER 4: Same suture returns approximating ext oblique aponeurosis over cord" },
{ n:8, t:"Reconstruct external ring; skin closure" },
];
shouldiceSteps.forEach((item, i) => {
const y = 1.6 + i * 0.63;
s.addShape(pres.ShapeType.roundRect, { x:0.28, y, w:4.0, h:0.59, fill:{color:C.stepBg}, line:{color:C.accentB, width:0.6}, rectRadius:0.06 });
s.addShape(pres.ShapeType.ellipse, { x:0.33, y:y+0.12, w:0.33, h:0.33, fill:{color:C.accentB}, line:{color:C.accentB} });
s.addText(String(item.n), { x:0.33, y:y+0.12, w:0.33, h:0.33, color:C.darkBg, fontSize:9, bold:true, align:"center", valign:"middle" });
s.addText(item.t, { x:0.73, y:y+0.04, w:3.48, h:0.52, color:C.offWhite, fontSize:8.2, align:"left", valign:"middle", wrap:true });
if (i < shouldiceSteps.length - 1) arrow(s, 2.28, y+0.59, 2.28, y+0.65);
});
// ── Bassini ──────────────────────────────────────────────────────────────
s.addShape(pres.ShapeType.rect, { x:4.6, y:0.88, w:4.0, h:3.55, fill:{color:"0A1A2A"}, line:{color:"5599CC", width:1.2} });
s.addText("BASSINI REPAIR", { x:4.6, y:0.88, w:4.0, h:0.38, color:"5599CC", fontSize:12, bold:true, align:"center", valign:"middle" });
s.addText("Historical; higher recurrence (10–15% in general practice)", { x:4.65, y:1.28, w:3.9, h:0.28, color:C.lightGray, fontSize:7.2, align:"center", italic:true });
const bassiniSteps = [
{ n:1, t:"Incision, open ext oblique aponeurosis, expose inguinal canal" },
{ n:2, t:"Isolate cord; dissect & reduce indirect hernia sac; high ligation" },
{ n:3, t:"Assess direct defect (posterior wall weakness)" },
{ n:4, t:"Triple layer reconstruction: conjoined tendon (transversus abdominis + internal oblique) sutured to inguinal ligament posterior to cord" },
{ n:5, t:"Recreate external ring; layer closure" },
];
bassiniSteps.forEach((item, i) => {
const y = 1.62 + i * 0.56;
s.addShape(pres.ShapeType.roundRect, { x:4.68, y, w:3.84, h:0.52, fill:{color:C.stepBg}, line:{color:"5599CC", width:0.5}, rectRadius:0.06 });
s.addShape(pres.ShapeType.ellipse, { x:4.73, y:y+0.1, w:0.3, h:0.3, fill:{color:"5599CC"}, line:{color:"5599CC"} });
s.addText(String(item.n), { x:4.73, y:y+0.1, w:0.3, h:0.3, color:C.darkBg, fontSize:8, bold:true, align:"center", valign:"middle" });
s.addText(item.t, { x:5.1, y:y+0.03, w:3.35, h:0.46, color:C.offWhite, fontSize:8, align:"left", valign:"middle", wrap:true });
if (i < bassiniSteps.length - 1) arrow(s, 6.6, y+0.52, 6.6, y+0.6);
});
// ── McVay ────────────────────────────────────────────────────────────────
s.addShape(pres.ShapeType.rect, { x:4.6, y:4.6, w:4.0, h:2.45, fill:{color:"1A0A2A"}, line:{color:"BB88FF", width:1.2} });
s.addText("McVAY (COOPER'S LIGAMENT) REPAIR", { x:4.6, y:4.6, w:4.0, h:0.38, color:"BB88FF", fontSize:10, bold:true, align:"center", valign:"middle" });
s.addText("Use for: Femoral hernia repair | Large direct defects", { x:4.65, y:5.0, w:3.9, h:0.22, color:C.lightGray, fontSize:7.2, align:"center", italic:true });
const mcvaySteps = [
{ n:1, t:"Standard inguinal dissection; open inguinal floor down to Cooper's ligament" },
{ n:2, t:"Suture conjoined tendon to Cooper's ligament (pectineal ligament) medially" },
{ n:3, t:"Transition sutures to inguinal ligament laterally over femoral vessels (transition stitch)" },
{ n:4, t:"Relaxing incision in anterior rectus sheath to relieve tension" },
];
mcvaySteps.forEach((item, i) => {
const y = 5.26 + i * 0.42;
s.addShape(pres.ShapeType.roundRect, { x:4.68, y, w:3.84, h:0.38, fill:{color:C.stepBg}, line:{color:"BB88FF", width:0.5}, rectRadius:0.05 });
s.addShape(pres.ShapeType.ellipse, { x:4.73, y:y+0.04, w:0.28, h:0.28, fill:{color:"BB88FF"}, line:{color:"BB88FF"} });
s.addText(String(item.n), { x:4.73, y:y+0.04, w:0.28, h:0.28, color:C.darkBg, fontSize:7.5, bold:true, align:"center", valign:"middle" });
s.addText(item.t, { x:5.08, y:y+0.02, w:3.37, h:0.34, color:C.offWhite, fontSize:7.8, align:"left", valign:"middle", wrap:true });
});
// ── Comparison box ───────────────────────────────────────────────────────
s.addShape(pres.ShapeType.rect, { x:8.8, y:0.88, w:4.3, h:6.15, fill:{color:C.boxBg2}, line:{color:C.lightGray, width:0.8} });
s.addText("COMPARISON", { x:8.8, y:0.88, w:4.3, h:0.38, color:C.lightGray, fontSize:12, bold:true, align:"center", valign:"middle" });
const compRows = [
["Repair", "Recurrence", "Key Advantage"],
["Shouldice", "~1%*", "Best tissue; 4-layer"],
["Bassini", "10–15%†", "Simple technique"],
["McVay", "Variable", "Covers femoral space"],
["Desarda", "Similar to\nShoulce", "Autogenous, tension-free"],
["Lichtenstein", "0.5–1%", "GOLD STANDARD"],
];
compRows.forEach((row, i) => {
const ry = 1.32 + i * 0.75;
const isHeader = i === 0;
const isGold = i === 5;
const rowColor = isHeader ? C.boxBg : (isGold ? "1A2800" : C.stepBg);
const textColor = isHeader ? C.accentA : (isGold ? C.accentC : C.offWhite);
[0,1,2].forEach((ci) => {
const cx = 8.85 + ci * 1.43;
s.addShape(pres.ShapeType.rect, { x:cx, y:ry, w:1.4, h:0.72, fill:{color:rowColor}, line:{color:"2A4A6A", width:0.5} });
s.addText(row[ci], { x:cx, y:ry, w:1.4, h:0.72, color:textColor, fontSize: isHeader ? 8.5 : 8, bold:isHeader||isGold, align:"center", valign:"middle", wrap:true });
});
});
s.addText("* Shouldice Hospital; †General practice\nDesarda: autogenous ext oblique patch", {
x:8.85, y:5.85, w:4.2, h:0.4, color:"6688AA", fontSize:6.8, align:"center", italic:true,
});
s.addShape(pres.ShapeType.rect, { x:0,y:7.1,w:13.3,h:0.4, fill:{color:C.boxBg2}, line:{color:C.boxBg2} });
s.addText("Shouldice 4-layer: transversalis fascia → internal oblique → external oblique (4 running sutures, same continuous stitch folds back on each pass)", {
x:0.2, y:7.1, w:12.9, h:0.4, color:C.lightGray, fontSize:7.5, align:"center", valign:"middle",
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — LAPAROSCOPIC: TAPP
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0,y:0,w:13.3,h:7.5, fill:{color:C.darkBg}, line:{color:C.darkBg} });
sectionBar(s, 0, 0, 13.3, 0.45, "LAPAROSCOPIC REPAIR — TAPP (TransAbdominal PrePeritoneal)", C.accentC);
s.addText("Indications: Bilateral hernia | Recurrent after open anterior | Diagnostic laparoscopy needed | Prior mesh plug recurrence", {
x:0.3, y:0.5, w:12.7, h:0.28, color:C.lightGray, fontSize:8.5, align:"center", italic:true,
});
const tappSteps = [
{ n:1, t:"Position: Trendelenburg, tilted to contralateral side\n(gravity moves viscera cephalad)" },
{ n:2, t:"Port placement: 10–12 mm umbilical camera port;\ntwo 5 mm working ports (~6 cm lateral to umbilicus)" },
{ n:3, t:"Inspect peritoneal cavity;\nconfirm hernia type & bilaterality" },
{ n:4, t:"Incise peritoneum ≥4 cm above internal ring\n(from ASIS medially to medial umbilical ligament)" },
{ n:5, t:"Develop preperitoneal space in avascular plane\njust deep to transversalis fascia" },
{ n:6, t:"Medial dissection: parietal transversalis fascia\n→ expose retropubic (Retzius) space, Cooper's ligament" },
{ n:7, t:"Lateral dissection: preserve visceral/parietal fascia\nover nerve area to avoid neuropathy\n(Triangle of Pain / Triangle of Doom)" },
{ n:8, t:"Reduce hernia sac completely;\nligate indirect sac at deep ring if cannot reduce" },
{ n:9, t:"Place large polypropylene mesh (≥15×10 cm)\ncovering entire myopectineal orifice (MPO)" },
{ n:10, t:"Tack mesh medially (Cooper's lig, above iliopubic tract)\nAvoid tacks below iliopubic tract (nerve injury risk)" },
{ n:11, t:"Close peritoneum over mesh completely\n(running suture or tacker) to prevent adhesions" },
{ n:12, t:"Deflate pneumoperitoneum; close port sites ≥10 mm" },
];
const col1 = tappSteps.slice(0,6);
const col2 = tappSteps.slice(6,12);
const bx1 = 0.2, bx2 = 6.8, sy = 0.88, sh = 0.97, sg = 0.06;
col1.forEach((item, i) => {
const y = sy + i*(sh+sg);
s.addShape(pres.ShapeType.roundRect, { x:bx1, y, w:6.4, h:sh, fill:{color:C.stepBg}, line:{color:C.accentC, width:0.8}, rectRadius:0.07 });
s.addShape(pres.ShapeType.ellipse, { x:bx1+0.08, y:y+0.28, w:0.38, h:0.38, fill:{color:C.accentC}, line:{color:C.accentC} });
s.addText(String(item.n), { x:bx1+0.08, y:y+0.28, w:0.38, h:0.38, color:C.darkBg, fontSize:9.5, bold:true, align:"center", valign:"middle" });
s.addText(item.t, { x:bx1+0.54, y:y+0.06, w:5.78, h:sh-0.12, color:C.offWhite, fontSize:9, align:"left", valign:"middle", wrap:true });
if (i < col1.length-1) arrow(s, bx1+3.2, y+sh, bx1+3.2, y+sh+sg);
});
col2.forEach((item, i) => {
const y = sy + i*(sh+sg);
s.addShape(pres.ShapeType.roundRect, { x:bx2, y, w:6.4, h:sh, fill:{color:C.stepBg}, line:{color:C.accentC, width:0.8}, rectRadius:0.07 });
s.addShape(pres.ShapeType.ellipse, { x:bx2+0.08, y:y+0.28, w:0.38, h:0.38, fill:{color:C.accentC}, line:{color:C.accentC} });
s.addText(String(item.n), { x:bx2+0.08, y:y+0.28, w:0.38, h:0.38, color:C.darkBg, fontSize:9.5, bold:true, align:"center", valign:"middle" });
s.addText(item.t, { x:bx2+0.54, y:y+0.06, w:5.78, h:sh-0.12, color:C.offWhite, fontSize:9, align:"left", valign:"middle", wrap:true });
if (i < col2.length-1) arrow(s, bx2+3.2, y+sh, bx2+3.2, y+sh+sg);
});
// connector line col1→col2
const joinY = sy + (col1.length-1)*(sh+sg) + sh + 0.03;
s.addShape(pres.ShapeType.line, { x:bx1+3.2, y:joinY, w:3.6+3.2, h:0, line:{color:C.accentC, width:1, dashType:"dash"} });
arrow(s, bx2+3.2, joinY, bx2+3.2, sy);
s.addText("Continue →", { x:6.3, y:joinY-0.18, w:1.3, h:0.2, color:C.accentC, fontSize:7, align:"center" });
s.addShape(pres.ShapeType.rect, { x:0,y:7.1,w:13.3,h:0.4, fill:{color:C.boxBg2}, line:{color:C.boxBg2} });
s.addText("Key danger zones: Triangle of Doom (iliac vessels) & Triangle of Pain (lateral cutaneous + femoral branch genitofemoral nerves) — NO tacks lateral to vas deferens or below iliopubic tract", {
x:0.2, y:7.1, w:12.9, h:0.4, color:"FF8888", fontSize:7.2, align:"center", valign:"middle",
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — TEP Flowchart
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0,y:0,w:13.3,h:7.5, fill:{color:C.darkBg}, line:{color:C.darkBg} });
sectionBar(s, 0, 0, 13.3, 0.45, "LAPAROSCOPIC REPAIR — TEP (Totally ExtraPeritoneal)", C.accentC);
s.addText("Best for: Bilateral hernias (no peritoneal closure needed) | Recurrent after TAPP | Avoid if: prior pelvic surgery (relative CI), scrotal/massive hernia", {
x:0.3, y:0.5, w:12.7, h:0.28, color:C.lightGray, fontSize:8.5, align:"center", italic:true,
});
const tepSteps = [
{ n:1, t:"Infraumbilical incision; open anterior rectus sheath\n(do NOT enter peritoneum)" },
{ n:2, t:"Insert 10–12 mm blunt trocar (balloon or direct)\ninto preperitoneal space beneath rectus abdominis" },
{ n:3, t:"Balloon expansion of preperitoneal space\n(or blunt dissection with laparoscope) under direct vision" },
{ n:4, t:"Place 2 additional 5 mm trocars in midline\n(infraumbilical / suprapubic)" },
{ n:5, t:"CO₂ insufflation of preperitoneal space\n(pressure ~8–12 mmHg)" },
{ n:6, t:"Identify landmarks: pubic symphysis, Cooper's lig,\nepigastric vessels, vas deferens, iliac vessels" },
{ n:7, t:"Dissect direct and/or indirect sac;\nreduce completely into abdomen" },
{ n:8, t:"Ligate indirect sac at deep ring if large;\ncream-pot rule: reduce contents before dividing" },
{ n:9, t:"Place large mesh (≥15×10 cm) covering entire MPO:\ndeep ring, direct space, femoral canal" },
{ n:10, t:"Tack mesh to Cooper's ligament and above iliopubic tract\n(NO tacks in triangle of pain / triangle of doom)" },
{ n:11, t:"No peritoneal closure required\n(key advantage over TAPP)" },
{ n:12, t:"Deflate CO₂ gradually (allows mesh to lie flat);\nclose anterior rectus sheath; skin closure" },
];
const col1 = tepSteps.slice(0,6);
const col2 = tepSteps.slice(6,12);
const bx1 = 0.2, bx2 = 6.8, sy = 0.88, sh = 0.97, sg = 0.06;
col1.forEach((item, i) => {
const y = sy + i*(sh+sg);
s.addShape(pres.ShapeType.roundRect, { x:bx1, y, w:6.4, h:sh, fill:{color:C.stepBg}, line:{color:C.accentC, width:0.8}, rectRadius:0.07 });
s.addShape(pres.ShapeType.ellipse, { x:bx1+0.08, y:y+0.28, w:0.38, h:0.38, fill:{color:C.accentC}, line:{color:C.accentC} });
s.addText(String(item.n), { x:bx1+0.08, y:y+0.28, w:0.38, h:0.38, color:C.darkBg, fontSize:9.5, bold:true, align:"center", valign:"middle" });
s.addText(item.t, { x:bx1+0.54, y:y+0.06, w:5.78, h:sh-0.12, color:C.offWhite, fontSize:9, align:"left", valign:"middle", wrap:true });
if (i < col1.length-1) arrow(s, bx1+3.2, y+sh, bx1+3.2, y+sh+sg);
});
col2.forEach((item, i) => {
const y = sy + i*(sh+sg);
s.addShape(pres.ShapeType.roundRect, { x:bx2, y, w:6.4, h:sh, fill:{color:C.stepBg}, line:{color:C.accentC, width:0.8}, rectRadius:0.07 });
s.addShape(pres.ShapeType.ellipse, { x:bx2+0.08, y:y+0.28, w:0.38, h:0.38, fill:{color:C.accentC}, line:{color:C.accentC} });
s.addText(String(item.n), { x:bx2+0.08, y:y+0.28, w:0.38, h:0.38, color:C.darkBg, fontSize:9.5, bold:true, align:"center", valign:"middle" });
s.addText(item.t, { x:bx2+0.54, y:y+0.06, w:5.78, h:sh-0.12, color:C.offWhite, fontSize:9, align:"left", valign:"middle", wrap:true });
if (i < col2.length-1) arrow(s, bx2+3.2, y+sh, bx2+3.2, y+sh+sg);
});
const joinY = sy + (col1.length-1)*(sh+sg) + sh + 0.03;
s.addShape(pres.ShapeType.line, { x:bx1+3.2, y:joinY, w:3.6+3.2, h:0, line:{color:C.accentC, width:1, dashType:"dash"} });
arrow(s, bx2+3.2, joinY, bx2+3.2, sy);
s.addText("Continue →", { x:6.3, y:joinY-0.18, w:1.3, h:0.2, color:C.accentC, fontSize:7, align:"center" });
s.addShape(pres.ShapeType.rect, { x:0,y:7.1,w:13.3,h:0.4, fill:{color:C.boxBg2}, line:{color:C.boxBg2} });
s.addText("TEP vs TAPP (Cochrane 2024): No significant difference in outcomes — choice based on surgeon experience & patient factors | RIVAL trial: Robotic TAPP ≈ Laparoscopic TAPP outcomes, longer OR time, higher cost", {
x:0.2, y:7.1, w:12.9, h:0.4, color:C.lightGray, fontSize:7.2, align:"center", valign:"middle",
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — COMPARISON TABLE + Special Situations
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0,y:0,w:13.3,h:7.5, fill:{color:C.darkBg}, line:{color:C.darkBg} });
sectionBar(s, 0, 0, 13.3, 0.45, "HEAD-TO-HEAD COMPARISON + SPECIAL CLINICAL SITUATIONS", "2A2A50");
// ── Comparison table ─────────────────────────────────────────────────────
const headers = ["Approach", "Recurrence", "Chronic Pain", "Anesthesia", "Best Indication", "Key Limitation"];
const rows = [
["Lichtenstein\n(Open Mesh)", "0.5–1%", "11–18%\n(highest)", "Local / Spinal\n/ GA", "Standard adult;\nfirst-time repair", "Highest chronic\npain risk"],
["Shouldice\n(Tissue)", "~1%*\n(3× higher†)", "Lower than\nmesh", "Local / Spinal\n/ GA", "Contaminated\nfield; mesh CI", "Requires expert\ntechnique"],
["Bassini\n(Tissue)", "10–15%†", "Low", "Local / GA", "Developing world;\nno mesh available", "High recurrence\nin general practice"],
["Laporoscopic\nTAPP", "~1%", "Lower than\nopen", "GA required", "Bilateral;\nrecurrent after open", "Peritoneal entry;\nrisk of adhesions"],
["Laparoscopic\nTEP", "~1%", "Lower than\nopen", "GA required", "Bilateral;\nno peritoneal entry", "Steep learning curve;\nCO₂ pressurized space"],
["Robotic\nTAPP", "~1%", "Similar to\nlap TAPP", "GA required", "Surgeon preference;\ncomplex anatomy", "Cost ↑↑; OR time ↑↑"],
];
const thY = 0.52, thH = 0.38;
const colW = [1.7, 1.1, 1.1, 1.1, 2.0, 1.9];
let cx = 0.2;
headers.forEach((h, i) => {
s.addShape(pres.ShapeType.rect, { x:cx, y:thY, w:colW[i], h:thH, fill:{color:C.boxBg}, line:{color:C.accentA, width:0.8} });
s.addText(h, { x:cx, y:thY, w:colW[i], h:thH, color:C.accentA, fontSize:9, bold:true, align:"center", valign:"middle", wrap:true });
cx += colW[i];
});
const rowColors = ["0A1A2D", "0A2210", "0A1A2D", "0A1A20", "0A1820", "180A2A"];
const accentBorders = [C.accentA, C.accentB, "5599CC", C.accentC, C.accentC, C.accentE];
rows.forEach((row, ri) => {
let rcx = 0.2;
const ry = thY + thH + ri * 0.83;
row.forEach((cell, ci) => {
s.addShape(pres.ShapeType.rect, { x:rcx, y:ry, w:colW[ci], h:0.8, fill:{color:rowColors[ri]}, line:{color:accentBorders[ri], width:0.5} });
s.addText(cell, { x:rcx, y:ry, w:colW[ci], h:0.8, color:C.offWhite, fontSize:8, align:"center", valign:"middle", wrap:true });
rcx += colW[ci];
});
});
s.addText("* Shouldice Hospital specialty center †General surgical practice GA = General Anesthesia CI = Contraindicated", {
x:0.2, y:5.6, w:9.7, h:0.22, color:"5577AA", fontSize:6.8, italic:true,
});
// ── Special situations ────────────────────────────────────────────────────
s.addShape(pres.ShapeType.rect, { x:10.1, y:0.52, w:3.0, h:6.7, fill:{color:C.boxBg2}, line:{color:C.decText, width:1} });
s.addText("SPECIAL SITUATIONS", { x:10.1, y:0.52, w:3.0, h:0.36, color:C.decText, fontSize:10, bold:true, align:"center", valign:"middle" });
const specials = [
{ icon:"⚠", title:"Incarcerated", body:"Attempt reduction → Elective repair 24–48 h\nFailed → Emergency surgery" },
{ icon:"🚨", title:"Strangulated", body:"Emergency surgery\n± bowel resection\nTissue repair (no mesh in contaminated field)" },
{ icon:"👶", title:"Pediatric", body:"High ligation of sac only\nNo floor repair needed\nAll are indirect type" },
{ icon:"🔄", title:"Recurrent", body:"Use opposite approach:\nOpen anterior → Laparoscopic posterior\nLaparoscopic → Open anterior" },
{ icon:"♀", title:"Female", body:"Higher recurrence;\nOccult femoral hernia common\nLaparoscopic preferred" },
{ icon:"⬅➡", title:"Bilateral", body:"Single laparoscopic\napproach covers both\nsides (TEP/TAPP)" },
{ icon:"🩸", title:"Pantaloon", body:"Both direct + indirect\n(straddles inf. epigastric v.)\nTreat both components" },
];
specials.forEach((sp, i) => {
const sy = 0.93 + i * 0.88;
s.addShape(pres.ShapeType.roundRect, { x:10.15, y:sy, w:2.9, h:0.82, fill:{color:C.stepBg}, line:{color:C.decText, width:0.5}, rectRadius:0.06 });
s.addText(`${sp.icon} ${sp.title}`, { x:10.18, y:sy+0.02, w:2.84, h:0.24, color:C.decText, fontSize:8.5, bold:true });
s.addText(sp.body, { x:10.18, y:sy+0.26, w:2.84, h:0.52, color:C.offWhite, fontSize:7.2, wrap:true });
});
s.addShape(pres.ShapeType.rect, { x:0,y:7.08,w:13.3,h:0.42, fill:{color:C.boxBg2}, line:{color:C.boxBg2} });
s.addText("Sources: Mulholland & Greenfield Surgery 7e · Schwartz's Principles of Surgery 11e · Bailey & Love 28e · Current Surgical Therapy 14e · Cochrane Rev. PMID 38963034 (2024)", {
x:0.2, y:7.08, w:12.9, h:0.42, color:"4A6A8A", fontSize:7, align:"center", valign:"middle", italic:true,
});
}
// ─── Write file ──────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/hernia-flowchart/Inguinal_Hernia_Surgical_Approaches_Flowchart.pptx" })
.then(() => console.log("DONE"))
.catch(e => { console.error(e); process.exit(1); });
cd /home/daytona/workspace/hernia-flowchart && node build.js 2>&1
ls -lh /home/daytona/workspace/hernia-flowchart/
Inguinal Hernia Surgical Approaches Flowchart
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 - Title | Direct vs Indirect hernia type comparison boxes + color-coded legend for all repair categories |
| 2 - Decision Flowchart | Master algorithm: Acute? → Incarcerated/Strangulated → Manual reduction → Emergency vs Elective; Symptomatic? → Watchful waiting vs Open vs Laparoscopic branch |
| 3 - Lichtenstein | 14 numbered step-by-step flowchart cards (2 columns) for the gold standard open mesh repair |
| 4 - Tissue Repairs | Side-by-side flowcharts for Shouldice (8 steps - 4-layer), Bassini (5 steps), McVay/Cooper's ligament (4 steps) + comparison table |
| 5 - TAPP | 12-step laparoscopic TAPP flowchart including Triangle of Doom / Triangle of Pain danger zones |
| 6 - TEP | 12-step TEP flowchart; highlights key difference - no peritoneal entry/closure needed |
| 7 - Comparison + Specials | Head-to-head table (Recurrence / Chronic Pain / Anesthesia / Best indication) + 7 special situation boxes (Incarcerated, Strangulated, Pediatric, Recurrent, Female, Bilateral, Pantaloon) |
cant open...just give me as text
┌─────────────────────────┐
│ INGUINAL HERNIA │
│ DIAGNOSED │
└────────────┬────────────┘
│
┌────────────▼────────────┐
│ Acute presentation? │
│ (Incarcerated / │◄── YES ──► Attempt Manual Reduction
│ Strangulated?) │ │
└────────────┬────────────┘ ┌─────────┴────────┐
│ NO YES NO
│ │ │
┌────────────▼────────────┐ Elective repair EMERGENCY
│ Symptomatic? │ within 24–48 h SURGERY
└────────────┬────────────┘ ± bowel
│ │ resection
YES NO → Tissue
│ │ repair
│ Watchful Waiting (no mesh)
│ (acceptable in
│ asymptomatic males)
│
┌──────────────┴──────────────┐
│ │
OPEN LAPAROSCOPIC /
│ ROBOTIC
│ │
┌──────┴──────┐ ┌────────┼────────┐
Mesh CI? Mesh OK TAPP TEP Robotic
│ │ TAPP
▼ ▼
TISSUE LICHTENSTEIN
REPAIR (Tension-Free)
(Shouldice / Alt: Plug & Patch
Bassini / PHS
McVay)
STEP 1
Incision: 6–8 cm oblique, below ASIS → just lateral to symphysis pubis
│
▼
STEP 2
Divide Scarpa's fascia
Ligate/cauterize superficial epigastric veins
│
▼
STEP 3
Open external oblique aponeurosis along fiber direction
→ Incision extended through external inguinal ring medially
→ Exposes inguinal canal
│
▼
STEP 4
Identify & PRESERVE all 3 nerves:
• Ilioinguinal nerve (anterior surface of cord)
• Iliohypogastric nerve (along internal oblique above canal)
• Genital branch of genitofemoral nerve (within deep cord)
│
▼
STEP 5
Bluntly dissect internal oblique from overlying external oblique flap
Reveal shelving edge of inguinal ligament
│
▼
STEP 6
Isolate spermatic cord with Penrose drain
│
▼
STEP 7
Dissect INDIRECT sac from cord anterolateral surface
Separate from cremasteric fibers
→ Reduce or ligate at deep ring
│
▼
STEP 8
Assess posterior wall for DIRECT hernia defect
(broad weakness of Hesselbach's triangle)
│
▼
STEP 9
Cut polypropylene mesh ~15×7 cm
Round the medial end to fit medial canal corner
│
▼
STEP 10
Fix medial edge: single suture to aponeurotic tissue overlying
pubic tubercle, ~2 cm medial overlap
│
▼
STEP 11
Running suture (baseball stitch):
Inferior mesh edge → inguinal ligament (medial to lateral)
│
▼
STEP 12
Interrupted sutures:
Superior mesh edge → internal oblique aponeurosis
(avoid iliohypogastric nerve)
│
▼
STEP 13
Slit lateral mesh → create 2 tails:
• Wide tail (2/3 width) — superior
• Narrow tail (1/3 width) — inferior
Encircle cord between tails
→ Shutter valve stitch at inguinal ligament lateral to cord
→ Tuck tails under ext oblique to ASIS level
│
▼
STEP 14
Close external oblique aponeurosis
→ Recreate external ring
→ Subcuticular skin closure
Note: For direct hernia - posterior wall weakness does NOT require separate repair; mesh covers and reinforces Hesselbach's triangle automatically.
STEP 1
Incision → Scarpa's fascia → open external oblique aponeurosis
→ Isolate spermatic cord (identical to Lichtenstein up to this point)
│
▼
STEP 2
Dissect indirect sac from cord → reduce → high ligation at deep ring
│
▼
STEP 3
Divide transversalis fascia from pubic tubercle → to deep inguinal ring
→ Develop preperitoneal space
→ Reduce any direct protrusion / lipoma
│
▼
STEP 4 ── LAYER 1 ──
Running suture starts at pubic tubercle
Deep flap of transversalis fascia sutured to
undersurface of superior flap (medial → lateral)
│
▼
STEP 5 ── LAYER 2 ──
Same suture returns (lateral → medial)
Superior flap approximated to inguinal ligament
(Suture tied back at pubic tubercle)
│
▼
STEP 6 ── LAYER 3 ──
New suture: internal oblique / conjoined tendon
approximated to inguinal ligament (medial → lateral)
│
▼
STEP 7 ── LAYER 4 ──
Same suture returns (lateral → medial)
External oblique aponeurosis edges approximated over cord
│
▼
STEP 8
Reconstruct external ring
→ Layer closure → Skin
Memory: 4 layers = 2 sutures, each folding back — transversalis fascia (deep, then returned) + internal oblique/ext oblique (then returned).
STEP 1
Incision → open external oblique aponeurosis
→ Expose inguinal canal
│
▼
STEP 2
Isolate cord
→ Dissect & reduce indirect sac
→ High ligation at internal ring
│
▼
STEP 3
Assess posterior wall for direct defect
│
▼
STEP 4
Triple-layer reconstruction:
Conjoined tendon (transversus abdominis + internal oblique)
sutured POSTERIOR to cord to inguinal ligament
→ Interrupted non-absorbable sutures
│
▼
STEP 5
Reconstruct external ring
→ Layer closure → Skin
STEP 1
Standard inguinal dissection
→ Open inguinal floor down to Cooper's (pectineal) ligament
│
▼
STEP 2
Suture conjoined tendon → Cooper's ligament (medially)
│
▼
STEP 3
Transition stitch: sutures shift from Cooper's ligament
→ inguinal ligament laterally, passing OVER femoral vessels
(this closes the femoral canal)
│
▼
STEP 4
Relaxing incision in anterior rectus sheath
(relieves tension on repair)
→ Close in layers
STEP 1
Position: Trendelenburg, tilted to contralateral side
(gravity moves bowel cephalad)
│
▼
STEP 2
Port placement:
• 10–12 mm umbilical camera port
• Two 5 mm working ports (~6 cm lateral to umbilicus)
Bilateral: both ports at umbilical level
Unilateral: ipsilateral port higher, contralateral lower
│
▼
STEP 3
Enter peritoneal cavity
→ Visual inspection of both inguinal regions
→ Confirm hernia type and bilaterality
│
▼
STEP 4
Incise peritoneum ≥4 cm above internal ring
(from lateral to ASIS → medial umbilical ligament)
│
▼
STEP 5
Develop preperitoneal space in AVASCULAR plane
just deep to transversalis fascia
│
▼
STEP 6
MEDIAL dissection:
→ Parietal transversalis fascia layer
→ Expose retropubic (space of Retzius)
→ Identify Cooper's ligament, pubic symphysis
│
▼
STEP 7
LATERAL dissection:
→ Preserve visceral/parietal fascia over nerve area
→ Avoid Triangle of Pain and Triangle of Doom (see below)
│
▼
STEP 8
Reduce hernia sac completely into abdomen
(Indirect: separate from cord; divide if cannot fully reduce)
(Direct: reduce preperitoneal fat, invert pseudosac)
│
▼
STEP 9
Place large polypropylene mesh (≥15×10 cm)
→ Must cover entire MYOPECTINEAL ORIFICE (MPO):
deep ring + direct space + femoral canal
│
▼
STEP 10
Fix mesh:
• Tacks to Cooper's ligament (medially)
• Tacks ABOVE iliopubic tract (laterally)
⚠ NO tacks below iliopubic tract (nerve injury)
⚠ NO tacks in Triangle of Doom (vascular injury)
│
▼
STEP 11
Close peritoneum COMPLETELY over mesh
(running suture or tacker)
→ Prevents mesh-bowel adhesions
│
▼
STEP 12
Deflate pneumoperitoneum
→ Close port sites ≥10 mm
→ Skin closure
STEP 1
Infraumbilical incision
→ Open anterior rectus sheath
→ DO NOT enter peritoneal cavity
│
▼
STEP 2
Insert 10–12 mm blunt trocar into preperitoneal space
(beneath rectus abdominis, anterior to posterior sheath)
│
▼
STEP 3
Balloon dissector / blunt laparoscope expansion
→ Creates working space in preperitoneal plane
→ Under direct vision to avoid peritoneal breach
│
▼
STEP 4
Place 2 additional 5 mm trocars in midline
(infraumbilical + suprapubic)
│
▼
STEP 5
CO₂ insufflation of preperitoneal space
(~8–12 mmHg)
│
▼
STEP 6
Identify anatomical landmarks:
• Pubic symphysis
• Cooper's ligament
• Inferior epigastric vessels
• Vas deferens
• Iliac vessels
│
▼
STEP 7
Dissect direct and/or indirect sac
→ Reduce completely into abdomen
│
▼
STEP 8
Ligate large indirect sac at deep ring if needed
(Cream-pot rule: reduce contents before dividing)
│
▼
STEP 9
Place large mesh (≥15×10 cm)
→ Covers entire MPO (deep ring + direct space + femoral canal)
│
▼
STEP 10
Fix mesh:
• Cooper's ligament medially
• Above iliopubic tract laterally
⚠ Same danger zones as TAPP apply
│
▼
STEP 11
NO peritoneal closure needed
(key advantage over TAPP)
│
▼
STEP 12
Deflate CO₂ GRADUALLY
(allows mesh to lie flat against abdominal wall)
→ Close anterior rectus sheath → Skin
STEP 1
Resuscitate: IV fluids, NGT, Foley catheter, antibiotics
│
▼
STEP 2
Incision: Inguinal approach ± extend to laparotomy if needed
│
▼
STEP 3
Open hernial sac; assess bowel viability
├── Viable bowel → reduce into abdomen
└── Non-viable → resect + primary anastomosis or stoma
│
▼
STEP 4
Repair hernia defect:
CONTAMINATED / bowel resection → TISSUE REPAIR (no mesh)
CLEAN field → Mesh acceptable
│
▼
STEP 5
Close in layers; consider drain if contaminated
| Approach | Recurrence | Chronic Pain | Anesthesia | Best Indication | Key Limitation |
|---|---|---|---|---|---|
| Lichtenstein | 0.5–1% | 11–18% (highest) | Local/Spinal/GA | Standard adult, first-time | Highest chronic pain |
| Shouldice | ~1% (specialist) / 3× higher† | Lower than mesh | Local/Spinal/GA | Contaminated field, mesh CI | Needs expert technique |
| Bassini | 10–15%† | Low | Local/GA | No mesh available | High recurrence |
| McVay | Variable | Low | Local/GA | Femoral hernia, large direct | Relaxing incision needed |
| Lap TAPP | ~1% | Lower than open | GA required | Bilateral, recurrent after open | Peritoneal entry, adhesion risk |
| Lap TEP | ~1% | Lower than open | GA required | Bilateral, no peritoneal entry | Steep learning curve |
| Robotic TAPP | ~1% | Similar to lap TAPP | GA required | Surgeon preference | Cost ↑↑, OR time ↑↑ |
| Situation | Approach |
|---|---|
| Incarcerated (reducible) | Reduce → Elective repair 24–48 h |
| Strangulated | Emergency surgery; tissue repair if bowel resected |
| Pediatric | High ligation of sac only; no floor repair; all are indirect |
| Recurrent after open | Laparoscopic (posterior approach) |
| Recurrent after laparoscopic | Open anterior approach |
| Bilateral | Single laparoscopic session (TEP/TAPP) |
| Female | Laparoscopic preferred; exclude occult femoral hernia |
| Pantaloon | Direct + indirect combined; treat both components |
| Sliding hernia | Caution: bowel forms part of sac (sigmoid left, cecum right, bladder in direct) |