Give me exam answers. Refer only SRB manual of surgery 6th edition. I shared the questions, give it accordingly
| Q# | Topic |
|---|---|
| 1 | Acute appendicitis — causes & aetiology |
| 2 | Acute appendicitis — clinical signs & symptoms |
| 3 | Acute appendicitis — complications |
| 4 | Acute appendicitis — diagnosis & treatment |
| 5 | Post-appendicectomy complications |
| 6 | Inguinal hernia — causes, risk factors, diagnosis |
| 7 | Inguinal hernia — clinical features & complications |
| 8 | Inguinal hernia — treatment (Lichtenstein, Shouldice, TEP, TAPP) |
| 9 | Inguinal hernia — post-op complications |
| 10 | Femoral hernia — causes & risk factors |
| 11 | Femoral hernia — clinical features & complications (Richter's) |
| 12 | Femoral hernia — diagnosis & treatment (Lockwood, McEvedy, laparoscopic) |
| 13 | Femoral hernia — post-op complications |
| 14 | Umbilical hernia — causes, risk factors, diagnosis |
| 15 | Umbilical hernia — clinical features & complications |
| 16 | Umbilical hernia — treatment (Mayo's repair, mesh, laparoscopic) |
| 17 | Umbilical hernia — post-op complications |
| 18 | Epigastric hernia — full |
| 19 | Epigastric hernia — post-op complications |
| 20 | Incisional hernia — causes & risk factors |
| 21 | Incisional hernia — symptoms & diagnosis |
| 22 | Incisional hernia — treatment (Rives-Stoppa, CST, IPOM) |
| 23 | Amoebic liver abscess — pathology & clinical features |
| 24 | Amoebic liver abscess — complications & diagnosis |
| 25 | Amoebic liver abscess — treatment |
| 26 | Pyogenic liver abscess — aetiology |
Generate a quick-reference PDF cheat sheet for exam prep
ls -la /home/daytona/workspace/ 2>/dev/null || mkdir -p /home/daytona/workspace …
mkdir -p /home/daytona/workspace/surgical-cheatsheet && python3 -c "from reportl…
~/surgical-cheatsheet/generate_cheatsheet.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm, mm
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, KeepTogether, PageBreak
)
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
from reportlab.platypus import BaseDocTemplate, Frame, PageTemplate
OUTPUT = "/home/daytona/workspace/surgical-cheatsheet/Surgical_Diseases_Cheatsheet.pdf"
# ─── Colour palette ──────────────────────────────────────────────────────────
DARK_BLUE = colors.HexColor("#1A3557")
MED_BLUE = colors.HexColor("#2E6DA4")
LIGHT_BLUE = colors.HexColor("#D6E8F7")
ACCENT = colors.HexColor("#E84545")
YELLOW_BG = colors.HexColor("#FFF8DC")
GREEN_BG = colors.HexColor("#EAF7EA")
ORANGE_BG = colors.HexColor("#FFF3E0")
PURPLE_BG = colors.HexColor("#F3E5F5")
GREY_BG = colors.HexColor("#F5F5F5")
WHITE = colors.white
TEXT_DARK = colors.HexColor("#1C1C1C")
# ─── Styles ──────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()
def make_style(name, parent="Normal", **kwargs):
s = ParagraphStyle(name, parent=styles[parent], **kwargs)
return s
DOC_TITLE = make_style("DocTitle", fontSize=20, textColor=WHITE,
fontName="Helvetica-Bold", alignment=TA_CENTER, spaceAfter=2)
SECTION_HEAD = make_style("SectionHead", fontSize=11, textColor=WHITE,
fontName="Helvetica-Bold", alignment=TA_LEFT, spaceBefore=0, spaceAfter=0,
leftIndent=4)
SUB_HEAD = make_style("SubHead", fontSize=9, textColor=DARK_BLUE,
fontName="Helvetica-Bold", spaceBefore=4, spaceAfter=2)
BODY = make_style("Body", fontSize=7.5, textColor=TEXT_DARK,
fontName="Helvetica", leading=11, spaceBefore=1, spaceAfter=1)
BODY_BOLD = make_style("BodyBold", fontSize=7.5, textColor=TEXT_DARK,
fontName="Helvetica-Bold", leading=11)
BULLET = make_style("Bullet", fontSize=7.2, textColor=TEXT_DARK,
fontName="Helvetica", leading=10.5, leftIndent=8, bulletIndent=0,
spaceBefore=0.5, spaceAfter=0.5)
SMALL = make_style("Small", fontSize=6.8, textColor=colors.HexColor("#555555"),
fontName="Helvetica", leading=9.5, spaceBefore=0, spaceAfter=0)
KEY = make_style("Key", fontSize=7.2, textColor=ACCENT,
fontName="Helvetica-Bold", leading=10)
# ─── Helper builders ─────────────────────────────────────────────────────────
def section_banner(title, bg=DARK_BLUE):
"""Returns a coloured banner paragraph (used as a table cell)."""
p = Paragraph(title, SECTION_HEAD)
tbl = Table([[p]], colWidths=["100%"])
tbl.setStyle(TableStyle([
("BACKGROUND", (0, 0), (-1, -1), bg),
("TOPPADDING", (0, 0), (-1, -1), 4),
("BOTTOMPADDING", (0, 0), (-1, -1), 4),
("LEFTPADDING", (0, 0), (-1, -1), 6),
("RIGHTPADDING", (0, 0), (-1, -1), 6),
("ROUNDEDCORNERS", [3, 3, 3, 3]),
]))
return tbl
def two_col_table(left_items, right_items, bg=GREY_BG):
"""Two-column bullet table."""
def fmt(items):
return "\n".join(f"• {i}" for i in items)
data = [[Paragraph(fmt(left_items), BULLET),
Paragraph(fmt(right_items), BULLET)]]
tbl = Table(data, colWidths=[9*cm, 9*cm])
tbl.setStyle(TableStyle([
("BACKGROUND", (0, 0), (-1, -1), bg),
("VALIGN", (0, 0), (-1, -1), "TOP"),
("TOPPADDING", (0, 0), (-1, -1), 4),
("BOTTOMPADDING", (0, 0), (-1, -1), 4),
("LEFTPADDING", (0, 0), (-1, -1), 5),
("RIGHTPADDING", (0, 0), (-1, -1), 5),
("LINEAFTER", (0, 0), (0, -1), 0.5, colors.HexColor("#CCCCCC")),
]))
return tbl
def info_box(label, content, bg=LIGHT_BLUE):
data = [[Paragraph(f"<b>{label}</b>", BODY_BOLD),
Paragraph(content, BODY)]]
tbl = Table(data, colWidths=[3.5*cm, 14.5*cm])
tbl.setStyle(TableStyle([
("BACKGROUND", (0, 0), (-1, -1), bg),
("VALIGN", (0, 0), (-1, -1), "TOP"),
("TOPPADDING", (0, 0), (-1, -1), 3),
("BOTTOMPADDING", (0, 0), (-1, -1), 3),
("LEFTPADDING", (0, 0), (-1, -1), 5),
("RIGHTPADDING", (0, 0), (-1, -1), 5),
("LINEAFTER", (0, 0), (0, -1), 1, MED_BLUE),
]))
return tbl
def score_table(headers, rows, col_widths=None):
data = [[Paragraph(h, BODY_BOLD) for h in headers]] + \
[[Paragraph(str(c), BODY) for c in row] for row in rows]
if not col_widths:
col_widths = [18*cm / len(headers)] * len(headers)
tbl = Table(data, colWidths=col_widths)
tbl.setStyle(TableStyle([
("BACKGROUND", (0, 0), (-1, 0), DARK_BLUE),
("TEXTCOLOR", (0, 0), (-1, 0), WHITE),
("FONTNAME", (0, 0), (-1, 0), "Helvetica-Bold"),
("FONTSIZE", (0, 0), (-1, -1), 7),
("ROWBACKGROUNDS",(0, 1), (-1, -1), [WHITE, GREY_BG]),
("GRID", (0, 0), (-1, -1), 0.3, colors.HexColor("#CCCCCC")),
("TOPPADDING", (0, 0), (-1, -1), 3),
("BOTTOMPADDING", (0, 0), (-1, -1), 3),
("LEFTPADDING", (0, 0), (-1, -1), 4),
("RIGHTPADDING", (0, 0), (-1, -1), 4),
("VALIGN", (0, 0), (-1, -1), "MIDDLE"),
]))
return tbl
def bullets(items, bg=None):
lines = [Paragraph(f"• {i}", BULLET) for i in items]
if bg:
tbl = Table([[l] for l in lines], colWidths=["100%"])
tbl.setStyle(TableStyle([
("BACKGROUND", (0, 0), (-1, -1), bg),
("TOPPADDING", (0, 0), (-1, -1), 1),
("BOTTOMPADDING", (0, 0), (-1, -1), 1),
("LEFTPADDING", (0, 0), (-1, -1), 5),
("RIGHTPADDING", (0, 0), (-1, -1), 5),
]))
return tbl
return lines
def sp(h=3):
return Spacer(1, h)
def hr():
return HRFlowable(width="100%", thickness=0.5,
color=colors.HexColor("#CCCCCC"), spaceAfter=3, spaceBefore=3)
# ─── Document setup ──────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
rightMargin=1.5*cm, leftMargin=1.5*cm,
topMargin=1.8*cm, bottomMargin=1.5*cm,
title="Surgical Diseases — Exam Cheat Sheet",
author="UTMA 4-Year Exam Prep"
)
story = []
# ═══════════════════════════════════════════════════════════════════════════════
# COVER BANNER
# ═══════════════════════════════════════════════════════════════════════════════
cover = Table(
[[Paragraph("SURGICAL DISEASES", DOC_TITLE)],
[Paragraph("UTMA 4-Year Exam — Quick Reference Cheat Sheet", make_style(
"Sub", fontSize=10, textColor=LIGHT_BLUE,
fontName="Helvetica", alignment=TA_CENTER))]],
colWidths=["100%"]
)
cover.setStyle(TableStyle([
("BACKGROUND", (0, 0), (-1, -1), DARK_BLUE),
("TOPPADDING", (0, 0), (-1, -1), 8),
("BOTTOMPADDING", (0, 0), (-1, -1), 8),
("LEFTPADDING", (0, 0), (-1, -1), 10),
("ROUNDEDCORNERS", [4, 4, 4, 4]),
]))
story += [cover, sp(8)]
# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 1 — ACUTE APPENDICITIS
# ═══════════════════════════════════════════════════════════════════════════════
story += [section_banner("1. ACUTE APPENDICITIS", DARK_BLUE), sp(4)]
story += [Paragraph("Q1 — Causes & Etiologic Factors", SUB_HEAD)]
story += [info_box("Key cause", "Luminal obstruction → bacterial proliferation → inflammation → gangrene → perforation", LIGHT_BLUE), sp(2)]
story += [two_col_table(
["Faecolith (appendicolith) — MOST COMMON",
"Lymphoid hyperplasia (viral infections in children)",
"Stricture / foreign body / worms",
"Carcinoid tumour of appendix"],
["Low dietary fibre / high refined carbohydrates",
"Mixed aerobic + anaerobic bacteria",
"Peak incidence: teens & early twenties",
"M:F = 3:2 at age 25"],
GREY_BG
), sp(4)]
story += [Paragraph("Q2 — Clinical Signs & Symptoms", SUB_HEAD)]
story += [two_col_table(
["Periumbilical colicky pain (visceral — FIRST)",
"Pain SHIFTS to RIF (somatic — parietal peritoneum)",
"Anorexia — constant reliable feature",
"Nausea + 1–2 episodes vomiting (follow pain)",
"Low-grade fever 37.2–37.7°C (after 6 hrs)",
"Constipation / occasional diarrhoea (pelvic)"],
["Tenderness at McBurney's point",
"Guarding & rigidity in RIF",
"Rovsing's sign — LIF pressure → RIF pain",
"Rebound tenderness (Blumberg's sign)",
"Psoas sign — retrocaecal appendix",
"Obturator sign — pelvic appendix"],
GREEN_BG
), sp(2)]
story += [info_box("Classic sequence", "Periumbilical colic → Anorexia → Nausea/vomiting → RIF pain → Fever → Leucocytosis (Murphy's sequence)", YELLOW_BG), sp(4)]
story += [Paragraph("Q3 — Complications", SUB_HEAD)]
story += [two_col_table(
["Perforation (most important — extremes of age)",
"Appendix mass / phlegmon",
"Appendix abscess",
"Generalised peritonitis"],
["Pelvic abscess (dull ache PR, diarrhoea)",
"Subphrenic abscess (shoulder pain, hiccup)",
"Portal pyaemia / pylephlebitis (jaundice, high fever)",
"Adhesive bowel obstruction (late)"],
ORANGE_BG
), sp(4)]
story += [Paragraph("Q4 — Diagnosis & Treatment", SUB_HEAD)]
story += [Paragraph("Alvarado Score (MANTRELS) — Score ≥7 = operate; 5–6 = imaging", BODY_BOLD), sp(2)]
story += [score_table(
["Feature", "Score"],
[["Migration of pain to RIF", "1"],
["Anorexia", "1"],
["Nausea / Vomiting", "1"],
["Tenderness in RIF", "2"],
["Rebound tenderness", "1"],
["Elevated temperature >37.3°C", "1"],
["Leucocytosis", "2"],
["Shift to left (neutrophilia)", "1"],
["TOTAL", "10"]],
[7*cm, 11*cm]
), sp(3)]
story += [two_col_table(
["USS — 1st line (children, thin, gynaecological Δ)",
"CT abdomen/pelvis — gold std, sensitivity 95%",
"MRI — pregnancy",
"FBC (leucocytosis + neutrophilia), CRP, β-hCG"],
["Lichtenstein open mesh appendicectomy (standard)",
"Laparoscopic appendicectomy (preferred in women, obese)",
"IV antibiotics pre-op: cefuroxime + metronidazole",
"Phlegmon: Ochsner-Sherren regimen → interval appendicectomy 6–8 wks"],
GREY_BG
), sp(4)]
story += [Paragraph("Q5 — Post-Appendicectomy Complications", SUB_HEAD)]
story += [two_col_table(
["Wound infection (MOST COMMON early)",
"Intra-abdominal / pelvic abscess",
"Paralytic ileus",
"Faecal fistula (rare — closes spontaneously)",
"Haemorrhage (mesoappendix)"],
["Adhesive small bowel obstruction (MOST COMMON late)",
"Incisional hernia",
"Infertility in women (tubal adhesions)",
"DVT / PE",
"Stump appendicitis (if >1 cm stump left)"],
GREY_BG
), sp(6)]
# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 2 — INGUINAL HERNIA
# ═══════════════════════════════════════════════════════════════════════════════
story += [section_banner("2. INGUINAL HERNIA", MED_BLUE), sp(4)]
story += [Paragraph("Q6 — Causes, Risk Factors & Diagnosis", SUB_HEAD)]
story += [info_box("Types", "INDIRECT: through deep inguinal ring, lateral to inferior epigastric vessels; can reach scrotum; congenital/acquired\nDIRECT: through Hesselbach's triangle (posterior wall), medial to epigastrics; always acquired; broad neck", LIGHT_BLUE), sp(2)]
story += [two_col_table(
["Patent processus vaginalis (indirect — congenital)",
"Posterior wall weakness (direct — acquired)",
"Male sex (10× more common than female)"],
["Raised IAP: cough, constipation, BPH, ascites, obesity",
"Smoking (impairs collagen cross-linking)",
"Collagen disorders; family history; previous repair"],
GREY_BG
), sp(2)]
story += [info_box("Diagnosis", "Lump ABOVE & MEDIAL to pubic tubercle. Cough impulse. Indirect: controlled by pressure at deep ring. Direct: broad-based, disappears with flat-hand pressure over Hesselbach's. USS / CT for occult hernias.", YELLOW_BG), sp(4)]
story += [Paragraph("Q7 — Clinical Features & Complications", SUB_HEAD)]
story += [two_col_table(
["Groin swelling — appears on standing/coughing",
"Reducible on lying",
"Dragging/aching discomfort",
"Indirect: narrow neck, scrotum, cough impulse at deep ring",
"Direct: broad-based, rarely reaches scrotum"],
["Irreducibility → Obstruction → STRANGULATION",
"Strangulation: tense tender irreducible, no cough impulse, systemic toxicity",
"Maydl's hernia (W-hernia): strangulation of middle loop inside abdomen",
"Sliding hernia: viscus (caecum/sigmoid) forms part of sac wall",
"Narrow-necked indirect hernias → highest strangulation risk"],
ORANGE_BG
), sp(4)]
story += [Paragraph("Q8 — Treatment", SUB_HEAD)]
story += [score_table(
["Operation", "Approach", "Key Points"],
[["Lichtenstein", "Open mesh (tension-free)", "Most common worldwide; mesh behind cord; lowest recurrence; chronic pain up to 20%"],
["Shouldice", "Open tissue (4-layer)", "Best tissue repair; recurrence ~1% in specialist centres"],
["Bassini", "Open tissue", "Historical; higher recurrence"],
["TEP", "Laparoscopic", "Extraperitoneal; large mesh; bilateral/recurrent; preferred laparoscopic"],
["TAPP", "Laparoscopic", "Enters peritoneum; useful for recurrent/bilateral"],
["Herniotomy", "Open (paediatric)", "Ligation of sac at deep ring only; no mesh"]],
[3.5*cm, 3.5*cm, 11*cm]
), sp(4)]
story += [Paragraph("Q9 — Postoperative Complications", SUB_HEAD)]
story += [two_col_table(
["Urinary retention (early, esp. elderly males)",
"Haematoma / scrotal oedema",
"Wound infection",
"Ischaemic orchitis → testicular atrophy",
"Vas deferens injury (infertility if bilateral)"],
["Chronic groin pain / inguinodynia (MOST COMMON late) — nerve entrapment / mesh",
"Hernia recurrence (1–5% mesh; higher tissue repair)",
"Seroma (resolves spontaneously)",
"Mesh migration / erosion (rare)",
"Hydrocele (lymphatic damage)"],
GREY_BG
), sp(6)]
# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 3 — FEMORAL HERNIA
# ═══════════════════════════════════════════════════════════════════════════════
story += [section_banner("3. FEMORAL HERNIA", colors.HexColor("#2C7BB6")), sp(4)]
story += [Paragraph("Q10 — Causes & Risk Factors", SUB_HEAD)]
story += [info_box("Boundaries of femoral canal",
"Lateral: femoral vein | Anterior: inguinal ligament | Posterior: Cooper's (iliopectineal) ligament | Medial: lacunar (Gimbernat's) ligament — SHARP, UNYIELDING → causes strangulation",
LIGHT_BLUE), sp(2)]
story += [two_col_table(
["Female sex M:F = 1:4 (wider pelvis → wider canal)",
"Thin elderly women (loss of fat support)",
"Multiparity (stretches abdominal wall)"],
["Raised IAP: chronic cough, constipation, ascites",
"Weight loss (reduces fat in canal)",
"Previous inguinal hernia repair"],
GREY_BG
), sp(4)]
story += [Paragraph("Q11 — Clinical Features & Complications", SUB_HEAD)]
story += [info_box("Key landmark", "Appears BELOW & LATERAL to pubic tubercle (inguinal hernia is above and medial)", YELLOW_BG), sp(2)]
story += [two_col_table(
["Small lump (1–2 cm), often missed / mistaken for lymph node",
"Rapidly becomes irreducible (tight ring)",
"May point SUPERIORLY → mimics inguinal hernia",
"Thin, elderly women; often no prior warning"],
["Strangulation in ~50% at presentation (EMERGENCY)",
"Lacunar ligament → unyielding neck",
"Richter's hernia (partial bowel wall strangulation)",
"Richter's: bowel necrosis WITHOUT full obstruction picture"],
ORANGE_BG
), sp(4)]
story += [Paragraph("Q12 — Diagnosis & Treatment", SUB_HEAD)]
story += [score_table(
["Approach", "Access", "Best For"],
[["Lockwood (low)", "Below inguinal ligament", "Emergency; simple cases; direct access"],
["McEvedy (high)", "Vertical above inguinal ligament", "STRANGULATION — best bowel access for resection"],
["Lothiessen (inguinal)", "Through inguinal canal", "Rarely used; weakens inguinal floor"],
["Laparoscopic TEP/TAPP", "Preperitoneal", "Elective; bilateral repair; large mesh covers femoral + inguinal"]],
[3.5*cm, 5*cm, 9.5*cm]
), sp(2)]
story += [info_box("WARNING", "Dividing lacunar ligament risks corona mortis (aberrant obturator artery) — control haemorrhage before dividing", ORANGE_BG), sp(4)]
story += [Paragraph("Q13 — Postoperative Complications", SUB_HEAD)]
story += [two_col_table(
["Wound infection / lymphocele / lymph fistula",
"Femoral vein or artery injury",
"Femoral nerve injury (anterior thigh numbness)",
"Obturator artery injury (corona mortis)"],
["Recurrence (~1–5%)",
"DVT (elderly patients)",
"Bowel complications if resection: anastomotic leak",
"Urinary retention"],
GREY_BG
), sp(6)]
# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 4 — UMBILICAL HERNIA
# ═══════════════════════════════════════════════════════════════════════════════
story += [section_banner("4. UMBILICAL HERNIA", colors.HexColor("#1B6CA8")), sp(4)]
story += [Paragraph("Q14 — Causes, Risk Factors & Diagnosis", SUB_HEAD)]
story += [score_table(
["Type", "Age", "Cause", "Management"],
[["Congenital / Infantile", "Neonates", "Failure of umbilical ring to contract", "Most resolve by 2–3 yrs; surgery if persists >4–5 yrs"],
["Para-umbilical (adult)", "Adults", "Weakness of linea alba; raised IAP", "Always repair (high strangulation risk)"],
["Exomphalos", "Neonate", "Failure of gut to return to abdomen; contents in umbilical cord", "Surgical emergency"]],
[3*cm, 2.5*cm, 6*cm, 6.5*cm]
), sp(2)]
story += [info_box("Adult risk factors",
"Obesity (MOST IMPORTANT) | Multiparity | Ascites/cirrhosis | Chronic cough | Steroids | Malnutrition",
LIGHT_BLUE), sp(4)]
story += [Paragraph("Q15 — Clinical Features & Complications", SUB_HEAD)]
story += [two_col_table(
["Paediatric: soft reducible umbilical swelling on crying",
"Adult: lump at/near umbilicus, often irreducible",
"Omentum (most common content in adults)",
"Thinned/excoriated overlying skin in large hernias",
"Dragging discomfort"],
["Irreducibility (very common in adults)",
"Obstruction / Strangulation",
"Rupture (cirrhotic with tense ascites — EMERGENCY)",
"Skin breakdown / ulceration",
"Hepatic decompensation (post-op in cirrhosis)"],
ORANGE_BG
), sp(4)]
story += [Paragraph("Q16 — Treatment", SUB_HEAD)]
story += [score_table(
["Technique", "Details", "Recurrence"],
[["Herniotomy (paediatric)", "Periumbilical incision; sac excised; ring sutured", "Low"],
["Mayo's repair (vest-over-pants)", "Double-breasting upper flap over lower flap; no mesh", "10–20%"],
["Sublay mesh (Rives-Stoppa)", "Mesh behind rectus; GOLD STANDARD adults", "<5%"],
["Laparoscopic IPOM", "Intraperitoneal composite mesh; for obese/large defects", "<5%"]],
[4*cm, 10*cm, 4*cm]
), sp(4)]
story += [Paragraph("Q17 — Postoperative Complications", SUB_HEAD)]
story += [two_col_table(
["Seroma (MOST COMMON — usually resolves)",
"Wound infection",
"Haematoma",
"Skin necrosis (if elliptical excision too large)"],
["Recurrence: 10–20% tissue; <5% mesh",
"Mesh complications: infection, migration, bowel fistula",
"Chronic pain (nerve entrapment)",
"Cirrhotic: ascitic leak, hepatic decompensation"],
GREY_BG
), sp(6)]
# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 5 — EPIGASTRIC HERNIA
# ═══════════════════════════════════════════════════════════════════════════════
story += [section_banner("5. EPIGASTRIC HERNIA", colors.HexColor("#5B4A8A")), sp(4)]
story += [Paragraph("Q18 — Causes, Symptoms, Diagnosis & Treatment", SUB_HEAD)]
story += [info_box("Definition", "Pre-peritoneal fat protrusion through defect in linea alba between xiphoid and umbilicus. Usually small (1–2 cm). Multiple defects common.", PURPLE_BG), sp(2)]
story += [two_col_table(
["Defect in decussating fibres of linea alba",
"Raised IAP (obesity, straining)",
"Nerve/vessel perforation sites → inherent weakness",
"Small tender midline epigastric nodule",
"Often NOT reducible (pre-peritoneal fat trapped)",
"Burning epigastric pain → MIMICS peptic ulcer / biliary colic"],
["Diagnosis: USS (identifies fat content, defect); CT confirms",
"EXCLUDE peptic ulcer & gallstones first (endoscopy, USS)",
"Treatment: Elective repair for symptomatic hernias",
"Small defects: direct suture with non-absorbable sutures",
"Larger defects (>1 cm): onlay or sublay mesh",
"Laparoscopic: obese / multiple defects"],
PURPLE_BG
), sp(4)]
story += [Paragraph("Q19 — Postoperative Complications", SUB_HEAD)]
story += [two_col_table(
["Recurrence (if direct suture used for >1 cm defect)",
"Wound infection",
"Haematoma / Seroma"],
["Chronic epigastric pain (nerve entrapment)",
"Mesh complications (rare: seroma, infection)",
"Persistent epigastric symptoms if peptic ulcer/biliary disease not excluded pre-op"],
GREY_BG
), sp(6)]
# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 6 — INCISIONAL HERNIA
# ═══════════════════════════════════════════════════════════════════════════════
story += [section_banner("6. INCISIONAL HERNIA", colors.HexColor("#2E7D32")), sp(4)]
story += [Paragraph("Q20 — Causes & Risk Factors", SUB_HEAD)]
story += [two_col_table(
["Wound infection (MOST IMPORTANT PREVENTABLE)",
"Haematoma / seroma (impairs healing)",
"Suture failure / wrong suture material",
"Excessive tension on closure",
"Midline incisions (higher risk than transverse)",
"Poor closure technique"],
["Obesity (MOST SIGNIFICANT modifiable patient factor)",
"Diabetes mellitus",
"Malnutrition / hypoalbuminaemia",
"Smoking",
"Immunosuppression / corticosteroids",
"Post-op chest infection / paralytic ileus (raises IAP)"],
GREEN_BG
), sp(4)]
story += [Paragraph("Q21 — Symptoms & Diagnosis", SUB_HEAD)]
story += [two_col_table(
["Swelling / bulge at scar — on standing/straining",
"Reduces on lying (if reducible)",
"Dragging discomfort at hernia site",
"Increasing size over time",
"Thinned / excoriated skin over large hernias"],
["CT scan (GOLD STANDARD): defect size/number, contents, muscle quality, loss of domain",
"USS: small/simple hernias",
"Cough impulse through fascial defect on examination",
"Assess reducibility and size of fascial ring"],
GREY_BG
), sp(4)]
story += [Paragraph("Q22 — Treatment", SUB_HEAD)]
story += [score_table(
["Technique", "Mesh Position", "Best For"],
[["Primary suture (no mesh)", "None", "Small defects <2 cm only; high recurrence 30–50% for larger"],
["Onlay mesh", "Anterior to closed fascia", "Simple; higher infection (superficial mesh)"],
["Sublay / Rives-Stoppa", "Retromuscular / preperitoneal", "GOLD STANDARD; lowest recurrence; large defects"],
["Components separation (CST)", "Sublay + CST", "Massive hernias with loss of domain; bilateral external oblique release"],
["Laparoscopic IPOM", "Intraperitoneal", "Moderate defects; obese; reduced wound complications"]],
[4*cm, 4.5*cm, 9.5*cm]
), sp(2)]
story += [info_box("Emergency (obstructed/strangulated)", "Laparotomy; assess bowel viability; resect if needed; AVOID synthetic mesh in contaminated field — use biologic mesh or temporary closure", ORANGE_BG), sp(6)]
# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 7 — AMOEBIC LIVER ABSCESS
# ═══════════════════════════════════════════════════════════════════════════════
story += [section_banner("7. AMOEBIC LIVER ABSCESS", colors.HexColor("#B71C1C")), sp(4)]
story += [Paragraph("Q23 — Pathology & Clinical Features", SUB_HEAD)]
story += [info_box("Organism", "Entamoeba histolytica (trophozoite) | Faeco-oral route → intestinal infection → portal circulation → liver", LIGHT_BLUE), sp(2)]
story += [info_box("Pathology",
"Right lobe 75–80% | Chocolate-brown / anchovy-paste contents (NOT pus — liquefied liver cells + RBCs) | Solitary unilocular | No bacteria | Trophozoites at wall",
YELLOW_BG), sp(2)]
story += [two_col_table(
["Young male in endemic area",
"High intermittent fever with rigors",
"RUQ pain → right shoulder (diaphragmatic referral)",
"Tender hepatomegaly (right lobe)"],
["Weight loss, anorexia",
"Dysentery in ~50% (not always)",
"Intercostal tenderness (right lower chest)",
"Elevated right hemidiaphragm on CXR; right pleural effusion"],
GREY_BG
), sp(4)]
story += [Paragraph("Q24 — Complications & Diagnosis", SUB_HEAD)]
story += [two_col_table(
["Rupture into pleural cavity (MOST COMMON) → empyema; hepatobronchial fistula",
"Coughing chocolate material = PATHOGNOMONIC of hepatobronchial fistula",
"Rupture into pericardium (left lobe abscess) → MOST DANGEROUS → tamponade",
"Rupture into peritoneum → peritonitis"],
["Secondary bacterial infection",
"Rupture into stomach/colon (fistula)",
"Lung abscess (direct diaphragmatic extension)",
"IVC thrombosis (very rare)"],
ORANGE_BG
), sp(2)]
story += [score_table(
["Investigation", "Finding"],
[["Amoebic serology (ELISA/IHA)", "POSITIVE >90% — MOST USEFUL confirmatory test"],
["USS (first-line imaging)", "Well-defined hypoechoic round/oval lesion, right lobe; guides aspiration"],
["CT scan", "Low attenuation mass with peripheral rim enhancement ('rim sign')"],
["FBC", "Leucocytosis, anaemia (chronic)"],
["LFTs", "Elevated ALP (most consistent); ↑ bilirubin if biliary compression"],
["Aspirate appearance", "Chocolate/anchovy-paste; culture negative; trophozoites rarely in fluid"],
["Stool exam", "Cysts/trophozoites in <50% — unreliable"]],
[6*cm, 12*cm]
), sp(4)]
story += [Paragraph("Q25 — Treatment", SUB_HEAD)]
story += [info_box("Drug of choice", "Metronidazole 800 mg TDS × 10 days → >90% respond. FOLLOW with luminal amoebicide: Diloxanide furoate 500 mg TDS × 10 days (eradicate intestinal carriage)", GREEN_BG), sp(2)]
story += [score_table(
["Indication for Aspiration", "Technique"],
[["Abscess >5–10 cm (rupture risk)", "USS-guided percutaneous needle aspiration"],
["No response to metronidazole after 72 hours", "Percutaneous catheter drain if aspiration insufficient"],
["Left lobe abscess (cardiac rupture risk)", ""],
["Threatening/actual rupture into pleura/peritoneum", ""],
["Exclude pyogenic abscess (diagnostic aspiration)", ""]],
[10*cm, 8*cm]
), sp(2)]
story += [info_box("Surgical drainage", "RARELY required. Indications: secondary infection not responding; rupture into peritoneum/pericardium; failure of aspiration + antibiotics", ORANGE_BG), sp(6)]
# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 8 — PYOGENIC LIVER ABSCESS
# ═══════════════════════════════════════════════════════════════════════════════
story += [section_banner("8. PYOGENIC LIVER ABSCESS — AETIOLOGY", colors.HexColor("#E65100")), sp(4)]
story += [Paragraph("Q26 — Aetiology", SUB_HEAD)]
story += [info_box("Organisms",
"Klebsiella pneumoniae (increasingly most common, esp. Asia) | E. coli | Streptococcus milleri | Bacteroides | Staphylococcus aureus (immunocompromised) | POLYMICROBIAL in majority",
LIGHT_BLUE), sp(2)]
story += [score_table(
["Route", "Source / Disease", "%"],
[["Biliary (ascending cholangitis)", "Bile duct stones, biliary strictures, malignancy, stents, ERCP", "35% (MOST COMMON)"],
["Portal vein (pylephlebitis)", "Appendicitis, diverticulitis, Crohn's, IBD, colorectal malignancy", "20%"],
["Hepatic artery (bacteraemia)", "Septicaemia, bacterial endocarditis, IV drug use", "15%"],
["Direct spread", "Subphrenic abscess, empyema gallbladder, perforated DU, trauma", "Uncommon"],
["Post-procedure", "After liver biopsy, ERCP, TACE for HCC, liver surgery", "Uncommon"],
["Cryptogenic", "No identifiable source", "10–15%"]],
[4.5*cm, 9*cm, 4.5*cm]
), sp(2)]
story += [info_box("Risk factors",
"Age >50 | Diabetes mellitus (most important for severe/recurrent) | Immunosuppression | Biliary disease | IBD | Recent abdominal surgery",
YELLOW_BG), sp(2)]
story += [info_box("Key distinction from amoebic abscess",
"Pyogenic: true bacterial pus (creamy yellow), polymicrobial, usually multiple lesions, any age/sex, no serology, often known biliary/GI source\n"
"Amoebic: chocolate/anchovy paste (NOT pus), young male, serology +ve, single right lobe lesion, history of dysentery",
ORANGE_BG), sp(6)]
# ─── Footer note ──────────────────────────────────────────────────────────────
story += [hr()]
story += [Paragraph("Reference: SRB's Manual of Surgery, 6th Edition | Bailey & Love's Short Practice of Surgery, 28th Edition", SMALL)]
story += [Paragraph("UTMA 4-Year Exam — Surgical Diseases Cheat Sheet | Generated for Exam Preparation", SMALL)]
# ─── Build ────────────────────────────────────────────────────────────────────
def add_page_number(canvas, doc):
canvas.saveState()
canvas.setFont("Helvetica", 7)
canvas.setFillColor(colors.HexColor("#888888"))
canvas.drawRightString(A4[0] - 1.5*cm, 1*cm, f"Page {doc.page}")
canvas.restoreState()
doc.build(story, onFirstPage=add_page_number, onLaterPages=add_page_number)
print(f"PDF generated: {OUTPUT}")