Appendicitis 3rd bhms long 10 marks question for university exam
| Stage | Features |
|---|---|
| Catarrhal (early) | Mucosal congestion and oedema; serosal hyperaemia |
| Suppurative (acute) | Purulent exudate in all layers; neutrophilic infiltration; pus in lumen |
| Gangrenous | Necrosis of wall; greenish/black discolouration |
| Perforated | Breach of wall; release of contents into peritoneum |
| Condition | Key distinguishing feature |
|---|---|
| Mesenteric adenitis | History of recent URTI; no localised guarding; lymphadenopathy on USG |
| Acute gastroenteritis | Vomiting before pain; diarrhoea; diffuse tenderness |
| Ovarian cyst (torsion/rupture) | Female; USG confirms cyst |
| Ectopic pregnancy | Female; beta-hCG positive; USG |
| Meckel's diverticulitis | Clinically identical; diagnosed at surgery |
| Renal/ureteric colic | Colicky, radiates to groin; haematuria on urinalysis; no guarding |
| Crohn's disease | Chronic history; may mimic; terminal ileal disease on imaging |
| Pelvic inflammatory disease (PID) | Female; bilateral adnexal tenderness; vaginal discharge; cervical excitation |
| Group | Consideration |
|---|---|
| Pregnant women | Appendix displaced upward by gravid uterus; pain may be in right flank/upper abdomen; MRI preferred; perforation risk high due to delayed diagnosis |
| Elderly | Atypical presentation; pain poorly localised; higher perforation rate; higher mortality |
| Immunocompromised | Blunted inflammatory response; may present late; leucocytosis often absent |
| Children | Rapid progression to perforation (thin omentum); vomiting and diarrhoea more prominent; high index of suspicion needed |
Note: Homoeopathic treatment is NOT a substitute for surgical management in established/advanced appendicitis. Perforation risk mandates surgical referral.
Create a summary presentation for exam revision, make it smallest as you can , must contain imp things only
ls /home/daytona/workspace/ 2>/dev/null && mkdir -p /home/daytona/workspace/appe…
~/appendicitis-revision/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Appendicitis - Quick Revision";
// ─── Colour palette ───────────────────────────────────────────
const BG_DARK = "0D1B2A"; // deep navy (title / section slides)
const BG_LIGHT = "F4F6F9"; // off-white (content slides)
const ACCENT = "E63946"; // vivid red (appendix colour!)
const ACCENT2 = "457B9D"; // steel blue
const GOLD = "F4A261"; // warm gold (key points)
const TXT_DARK = "1D2D44";
const TXT_LIGHT = "FFFFFF";
const TXT_MUTED = "5A7186";
// ─── Helper: dark slide header bar ───────────────────────────
function darkHeader(slide, title, subtitle) {
// full-width top bar
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 10, h: 1.15,
fill: { color: BG_DARK }, line: { color: BG_DARK }
});
// accent left stripe
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 0.08, h: 1.15,
fill: { color: ACCENT }, line: { color: ACCENT }
});
slide.addText(title, {
x: 0.2, y: 0.08, w: 9.6, h: 0.6,
fontSize: 20, bold: true, color: TXT_LIGHT,
fontFace: "Calibri", margin: 0
});
if (subtitle) {
slide.addText(subtitle, {
x: 0.2, y: 0.68, w: 9.6, h: 0.38,
fontSize: 11, color: "A8C0D6", fontFace: "Calibri", margin: 0
});
}
}
// ─── Helper: content area background ─────────────────────────
function contentBg(slide) {
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 10, h: 5.625,
fill: { color: BG_LIGHT }, line: { color: BG_LIGHT }
});
}
// ─── Helper: section card ─────────────────────────────────────
function card(slide, x, y, w, h, title, titleColor, bgColor, items, itemColor, titleSize, itemSize) {
slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x, y, w, h,
fill: { color: bgColor || "FFFFFF" },
line: { color: "DDE3EC", pt: 1 },
rectRadius: 0.08,
shadow: { type: "outer", color: "000000", blur: 4, offset: 2, angle: 135, opacity: 0.08 }
});
slide.addText(title, {
x: x + 0.12, y: y + 0.06, w: w - 0.24, h: 0.3,
fontSize: titleSize || 10, bold: true,
color: titleColor || BG_DARK, fontFace: "Calibri", margin: 0
});
// divider
slide.addShape(pres.shapes.RECTANGLE, {
x: x + 0.12, y: y + 0.38, w: w - 0.24, h: 0.02,
fill: { color: "DDE3EC" }, line: { color: "DDE3EC" }
});
const textItems = items.map((t, i) => ({
text: t,
options: { bullet: { code: "2022" }, fontSize: itemSize || 9, color: itemColor || TXT_DARK,
fontFace: "Calibri", breakLine: i < items.length - 1 }
}));
slide.addText(textItems, {
x: x + 0.12, y: y + 0.44, w: w - 0.24, h: h - 0.55,
valign: "top"
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 10, h: 5.625,
fill: { color: BG_DARK }, line: { color: BG_DARK }
});
// big accent stripe left
s.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 0.35, h: 5.625,
fill: { color: ACCENT }, line: { color: ACCENT }
});
// decorative circle (appendix motif)
s.addShape(pres.shapes.OVAL, {
x: 7.2, y: 0.5, w: 2.6, h: 2.6,
fill: { color: ACCENT, transparency: 88 }, line: { color: ACCENT, transparency: 70, pt: 1.5 }
});
s.addShape(pres.shapes.OVAL, {
x: 7.6, y: 0.9, w: 1.8, h: 1.8,
fill: { color: ACCENT, transparency: 80 }, line: { color: ACCENT, transparency: 55, pt: 1 }
});
s.addText("APPENDICITIS", {
x: 0.6, y: 1.4, w: 7, h: 1.1,
fontSize: 44, bold: true, color: TXT_LIGHT, fontFace: "Calibri",
charSpacing: 3, margin: 0
});
s.addShape(pres.shapes.RECTANGLE, {
x: 0.6, y: 2.55, w: 2.8, h: 0.05,
fill: { color: ACCENT }, line: { color: ACCENT }
});
s.addText("Quick Revision — 3rd BHMS", {
x: 0.6, y: 2.7, w: 8, h: 0.45,
fontSize: 15, color: GOLD, fontFace: "Calibri", margin: 0
});
s.addText("Definition • Anatomy • Aetiology • Pathophysiology\nClinical Features • Investigations • Treatment • Complications", {
x: 0.6, y: 3.25, w: 7.8, h: 0.85,
fontSize: 10, color: "7FA8C4", fontFace: "Calibri", margin: 0
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 2 – DEFINITION + ANATOMY QUICK FACTS
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentBg(s);
darkHeader(s, "Definition & Anatomy", "Core facts you must know");
// Definition box
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 0.2, y: 1.25, w: 9.6, h: 0.8,
fill: { color: ACCENT, transparency: 88 },
line: { color: ACCENT, pt: 1.2 }, rectRadius: 0.07
});
s.addText([
{ text: "Definition: ", options: { bold: true, color: ACCENT, fontSize: 11 } },
{ text: "Acute inflammation of the vermiform appendix. Most common cause of acute abdomen in young adults.", options: { color: TXT_DARK, fontSize: 11 } }
], { x: 0.35, y: 1.3, w: 9.3, h: 0.7, fontFace: "Calibri", valign: "middle" });
// Two anatomy cards
card(s, 0.2, 2.15, 4.7, 3.0, "📍 Anatomy at a Glance", BG_DARK, "FFFFFF", [
"Blind tube from posteromedial caecum wall",
"Length: 6–9 cm average",
"Base: at McBurney's point (1/3 from ASIS→Umbilicus)",
"Taeniae coli converge at base",
"Wall layers: mucosa → submucosa → muscle → serosa",
"Rich submucosal lymphoid tissue (max age 12–20)"
], TXT_DARK);
card(s, 5.1, 2.15, 4.7, 3.0, "🔀 Position of Tip (Variable)", BG_DARK, "FFFFFF", [
"Retrocaecal — 65% (most common)",
"Pelvic / descending — 30%",
"Subcaecal, preileal, postileal — rare",
"Blood supply: appendicular artery (END-ARTERY)",
" → thrombosis = gangrene",
"Nerve supply: T10 (periumbilical pain initially)"
], TXT_DARK);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 3 – AETIOLOGY + PATHOPHYSIOLOGY
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentBg(s);
darkHeader(s, "Aetiology & Pathophysiology", "Cause → sequence of events → outcome");
// Aetiology card left
card(s, 0.2, 1.25, 4.7, 2.2, "⚠️ Causes of Luminal Obstruction", ACCENT, "FFFFFF", [
"Faecolith / appendicolith (most common)",
"Lymphoid hyperplasia (children — post-viral)",
"Parasites: Ascaris, Enterobius (pinworm)",
"Vegetable / fruit seeds",
"Neoplasm (carcinoid, mucocoele)",
"Stricture / fibrosis"
], TXT_DARK);
// Pathophysiology flow on right
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 5.1, y: 1.25, w: 4.7, h: 2.2,
fill: { color: "FFFFFF" }, line: { color: "DDE3EC", pt: 1 }, rectRadius: 0.08,
shadow: { type: "outer", color: "000000", blur: 4, offset: 2, angle: 135, opacity: 0.08 }
});
s.addText("🔁 Pathophysiology Sequence", {
x: 5.22, y: 1.31, w: 4.46, h: 0.3, fontSize: 10, bold: true,
color: BG_DARK, fontFace: "Calibri", margin: 0
});
s.addShape(pres.shapes.RECTANGLE, {
x: 5.22, y: 1.63, w: 4.46, h: 0.02,
fill: { color: "DDE3EC" }, line: { color: "DDE3EC" }
});
const steps = [
["Obstruction", "↑ intraluminal pressure"],
["Venous occlusion", "Mucosal ischaemia / oedema"],
["Arterial occlusion", "Full-thickness necrosis"],
["Bacterial invasion", "Suppurative appendicitis"],
["Gangrene", "Perforation → peritonitis/abscess"],
];
const colors = [ACCENT2, ACCENT2, ACCENT, ACCENT, ACCENT];
steps.forEach(([a, b], i) => {
const y = 1.69 + i * 0.32;
s.addShape(pres.shapes.RECTANGLE, {
x: 5.22, y: y, w: 0.06, h: 0.22,
fill: { color: colors[i] }, line: { color: colors[i] }
});
s.addText(`${a}: `, {
x: 5.32, y: y, w: 1.5, h: 0.22,
fontSize: 8.5, bold: true, color: colors[i], fontFace: "Calibri", margin: 0, valign: "middle"
});
s.addText(b, {
x: 6.6, y: y, w: 3.1, h: 0.22,
fontSize: 8.5, color: TXT_DARK, fontFace: "Calibri", margin: 0, valign: "middle"
});
});
// Bacteriology
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 0.2, y: 3.55, w: 9.6, h: 0.75,
fill: { color: "EEF4FA" }, line: { color: ACCENT2, pt: 1 }, rectRadius: 0.07
});
s.addText([
{ text: "🦠 Bacteriology (polymicrobial): ", options: { bold: true, color: ACCENT2, fontSize: 10 } },
{ text: "E. coli, Bacteroides fragilis, Enterococcus, Pseudomonas aeruginosa, Klebsiella", options: { color: TXT_DARK, fontSize: 10 } }
], { x: 0.35, y: 3.6, w: 9.3, h: 0.65, fontFace: "Calibri", valign: "middle" });
// Pathological stages
s.addText("Stages: ", {
x: 0.2, y: 4.37, w: 0.75, h: 0.3, fontSize: 9.5, bold: true,
color: BG_DARK, fontFace: "Calibri", margin: 0
});
const stages = ["Catarrhal (early)", "Suppurative (acute)", "Gangrenous", "Perforated"];
const sColors = [ACCENT2, GOLD, "E07B39", ACCENT];
stages.forEach((st, i) => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 0.9 + i * 2.3, y: 4.3, w: 2.1, h: 0.35,
fill: { color: sColors[i] }, line: { color: sColors[i] }, rectRadius: 0.05
});
s.addText(st, {
x: 0.9 + i * 2.3, y: 4.3, w: 2.1, h: 0.35,
fontSize: 9, bold: true, color: TXT_LIGHT, fontFace: "Calibri", align: "center", valign: "middle", margin: 0
});
if (i < 3) {
s.addText("→", {
x: 2.95 + i * 2.3, y: 4.3, w: 0.22, h: 0.35,
fontSize: 11, color: TXT_MUTED, align: "center", valign: "middle", margin: 0
});
}
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 4 – CLINICAL FEATURES
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentBg(s);
darkHeader(s, "Clinical Features", "Symptoms → Signs — know the classic sequence");
// Pain sequence highlight
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 0.2, y: 1.25, w: 9.6, h: 0.9,
fill: { color: "FFF4EC" }, line: { color: GOLD, pt: 1.5 }, rectRadius: 0.08
});
s.addText("⭐ Classic Pain Sequence (in ~50%)", {
x: 0.35, y: 1.3, w: 6, h: 0.28, fontSize: 10, bold: true, color: GOLD, fontFace: "Calibri", margin: 0
});
s.addText([
{ text: "1. Periumbilical colic (visceral, T10) ", options: { bold: true, color: ACCENT, fontSize: 10 } },
{ text: "→ anorexia, nausea, 1-2 vomits ", options: { color: TXT_DARK, fontSize: 10 } },
{ text: "2. Pain shifts to RIF (somatic) ", options: { bold: true, color: ACCENT2, fontSize: 10 } },
{ text: "→ constant, worse on movement ", options: { color: TXT_DARK, fontSize: 10 } },
{ text: "KEY: Pain always before vomiting!", options: { bold: true, color: ACCENT, fontSize: 10 } }
], { x: 0.35, y: 1.58, w: 9.3, h: 0.5, fontFace: "Calibri", valign: "top" });
// Signs 3 columns
card(s, 0.2, 2.25, 3.1, 3.0, "🔍 Signs on Palpation", BG_DARK, "FFFFFF", [
"McBurney's point tenderness",
"Rebound tenderness (Blumberg)",
"Rovsing's sign",
"Guarding & rigidity (RIF)",
"Hyperaesthesia of skin (Cope's)"
], TXT_DARK);
card(s, 3.45, 2.25, 3.1, 3.0, "🦵 Special Signs", BG_DARK, "FFFFFF", [
"Psoas sign — retrocaecal appendix",
"Obturator sign — pelvic appendix",
"Rectal tenderness (PR) — pelvic",
"Low-grade fever 37.5–38.5°C",
"Patient lies still (peritonism)"
], TXT_DARK);
card(s, 6.7, 2.25, 3.1, 3.0, "⚕️ Other Symptoms", BG_DARK, "FFFFFF", [
"Anorexia (constant feature)",
"Nausea / vomiting",
"Constipation or mild diarrhoea",
"Dysuria (near ureter/bladder)",
"Family history in 1/3 of children"
], TXT_DARK);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 5 – INVESTIGATIONS
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentBg(s);
darkHeader(s, "Investigations", "Blood tests → Imaging → Scoring");
// Blood tests
card(s, 0.2, 1.25, 4.6, 2.25, "🩸 Blood Tests", BG_DARK, "FFFFFF", [
"CBC: Leucocytosis >10,000 + neutrophilia",
"CRP >8 mg/L (raised with high WBC = strong)",
"Low WBC + low CRP → argues AGAINST",
"Beta-hCG: mandatory in females (excl. ectopic)",
"Urinalysis: excl. UTI / renal colic"
], TXT_DARK);
// Imaging
card(s, 5.0, 1.25, 4.8, 2.25, "🖥️ Imaging", BG_DARK, "FFFFFF", [
"USG: 1st line (esp. children, women)",
" → non-compressible appendix >6 mm",
"CT (CECT): most accurate; gold standard",
"MRI: preferred in pregnancy (no radiation)",
"X-ray: faecolith (10%), free gas (perf.)"
], TXT_DARK);
// Alvarado score table
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 0.2, y: 3.6, w: 9.6, h: 1.72,
fill: { color: "FFFFFF" }, line: { color: "DDE3EC", pt: 1 }, rectRadius: 0.08
});
s.addText("⭐ Alvarado Score (MANTRELS) — Score ≥7 = Likely Appendicitis", {
x: 0.35, y: 3.65, w: 9, h: 0.28, fontSize: 10, bold: true, color: BG_DARK, fontFace: "Calibri", margin: 0
});
const alv = [
["M — Migration of pain to RIF", "1"],
["A — Anorexia", "1"],
["N — Nausea / Vomiting", "1"],
["T — Tenderness RIF", "2"],
["R — Rebound tenderness", "1"],
["E — Elevated temperature", "1"],
["L — Leucocytosis", "2"],
["S — Shift to left (neutrophilia)", "1"],
];
alv.forEach(([item, score], i) => {
const col = i < 4 ? 0 : 1;
const row = i < 4 ? i : i - 4;
const x = 0.35 + col * 4.8;
const y = 4.0 + row * 0.31;
s.addText(`${item}`, { x, y, w: 4.2, h: 0.27, fontSize: 9, color: TXT_DARK, fontFace: "Calibri", margin: 0 });
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: x + 4.22, y: y + 0.03, w: 0.32, h: 0.22,
fill: { color: score === "2" ? ACCENT : ACCENT2 }, line: { color: "none" }, rectRadius: 0.04
});
s.addText(score, { x: x + 4.22, y: y + 0.03, w: 0.32, h: 0.22, fontSize: 8.5, bold: true, color: TXT_LIGHT, align: "center", valign: "middle", margin: 0 });
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 6 – DIFFERENTIAL DIAGNOSIS
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentBg(s);
darkHeader(s, "Differential Diagnosis", "Conditions that mimic appendicitis");
const diffs = [
["Mesenteric adenitis", "Recent URTI; no guarding; lymph nodes on USG"],
["Acute gastroenteritis", "Vomiting BEFORE pain; diarrhoea; diffuse tenderness"],
["Ovarian cyst / torsion", "Female; USG confirms; unilateral pelvic pain"],
["Ectopic pregnancy", "Female; +ve beta-hCG; USG; haemodynamic instability"],
["Meckel's diverticulitis", "Clinically identical; diagnosed at surgery"],
["Renal / ureteric colic", "Colicky, radiates to groin; haematuria; no guarding"],
["Crohn's disease", "Chronic history; terminal ileal involvement on CT"],
["PID", "Female; bilateral; vaginal discharge; cervical excitation"],
];
diffs.forEach(([cond, diff], i) => {
const col = i < 4 ? 0 : 1;
const row = i < 4 ? i : i - 4;
const x = 0.2 + col * 4.95;
const y = 1.3 + row * 1.05;
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x, y, w: 4.7, h: 0.92,
fill: { color: "FFFFFF" }, line: { color: "DDE3EC", pt: 1 }, rectRadius: 0.07,
shadow: { type: "outer", color: "000000", blur: 3, offset: 1, angle: 135, opacity: 0.07 }
});
s.addShape(pres.shapes.RECTANGLE, {
x, y, w: 0.07, h: 0.92,
fill: { color: i % 2 === 0 ? ACCENT2 : ACCENT }, line: { color: "none" }
});
s.addText(cond, {
x: x + 0.15, y: y + 0.06, w: 4.4, h: 0.3,
fontSize: 10, bold: true, color: BG_DARK, fontFace: "Calibri", margin: 0
});
s.addText(diff, {
x: x + 0.15, y: y + 0.38, w: 4.4, h: 0.48,
fontSize: 9, color: TXT_MUTED, fontFace: "Calibri", margin: 0, valign: "top"
});
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 7 – TREATMENT
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentBg(s);
darkHeader(s, "Treatment / Management", "Pre-op → Surgery → Complicated cases");
// Pre-op card
card(s, 0.2, 1.25, 3.05, 2.45, "🏥 Pre-operative", BG_DARK, "FFFFFF", [
"Nil by mouth (NBM)",
"IV fluid resuscitation",
"IV antibiotics (pre-op):",
" Cefuroxime + Metronidazole",
" OR Piperacillin-tazobactam",
"Analgesia (does NOT mask signs)",
"Beta-hCG if female"
], TXT_DARK);
// Surgery card
card(s, 3.4, 1.25, 3.1, 2.45, "🔪 Appendicectomy", BG_DARK, "FFFFFF", [
"Open (Lanz / Gridiron incision):",
" Gridiron: at McBurney's point",
" Lanz: transverse, cosmetic",
"Laparoscopic (preferred):",
" 3 ports; faster recovery",
" Better for women (diagnostic)",
"Ligate mesoappendix → base"
], TXT_DARK);
// Complicated card
card(s, 6.65, 1.25, 3.15, 2.45, "⚡ Complicated Cases", BG_DARK, "FFFFFF", [
"Phlegmon (mass):",
" Oschner-Sherren regimen",
" IV antibiotics + monitoring",
" Interval appendicectomy 6–8 wk",
"Abscess:",
" Percutaneous drainage (CT/USG)",
" Then interval appendicectomy"
], TXT_DARK);
// Oschner-Sherren box
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 0.2, y: 3.8, w: 9.6, h: 1.52,
fill: { color: "EEF4FA" }, line: { color: ACCENT2, pt: 1.2 }, rectRadius: 0.08
});
s.addText("📋 Oschner-Sherren Regimen (Appendix Mass)", {
x: 0.35, y: 3.86, w: 9, h: 0.28, fontSize: 10, bold: true, color: ACCENT2, fontFace: "Calibri", margin: 0
});
s.addText([
{ text: "NBM + NG tube | ", options: { color: TXT_DARK } },
{ text: "IV fluids + electrolytes | ", options: { color: TXT_DARK } },
{ text: "IV antibiotics | ", options: { color: TXT_DARK } },
{ text: "Vitals 4-hourly | ", options: { color: TXT_DARK } },
{ text: "Mark mass boundary on skin | ", options: { color: TXT_DARK } },
{ text: "Operate if deteriorates!", options: { bold: true, color: ACCENT } }
], { x: 0.35, y: 4.18, w: 9.3, h: 0.35, fontSize: 9.5, fontFace: "Calibri" });
s.addText("Interval appendicectomy 6–8 weeks after resolution. Colonoscopy in patients >40 years to exclude malignancy.", {
x: 0.35, y: 4.58, w: 9.3, h: 0.65,
fontSize: 9, color: TXT_MUTED, fontFace: "Calibri", margin: 0, italic: true
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 8 – COMPLICATIONS + SPECIAL POPULATIONS
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentBg(s);
darkHeader(s, "Complications & Special Populations", "Post-op risks + atypical presentations");
card(s, 0.2, 1.25, 4.65, 2.3, "⚠️ Pre-operative Complications", ACCENT, "FFFFFF", [
"Perforation → generalised peritonitis",
"Appendix abscess",
"Periappendiceal phlegmon",
"Portal pyaemia (pylephlebitis — rare)",
], TXT_DARK);
card(s, 5.05, 1.25, 4.75, 2.3, "🩹 Post-operative Complications", ACCENT2, "FFFFFF", [
"Wound infection (most common)",
"Intraperitoneal / pelvic abscess",
"Paralytic ileus",
"Faecal fistula",
"Stump appendicitis",
"Adhesion → small bowel obstruction (late)"
], TXT_DARK);
// Special populations table
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 0.2, y: 3.65, w: 9.6, h: 1.7,
fill: { color: "FFFFFF" }, line: { color: "DDE3EC", pt: 1 }, rectRadius: 0.08
});
s.addText("👥 Special Populations", {
x: 0.35, y: 3.71, w: 9, h: 0.28, fontSize: 10, bold: true, color: BG_DARK, fontFace: "Calibri", margin: 0
});
const pops = [
["🤰 Pregnant", "Pain in right flank / upper abdomen\n(appendix displaced upward)\nMRI preferred; high perforation risk"],
["👴 Elderly", "Atypical, poorly localised pain\nHigh perforation rate\nHigher mortality"],
["👶 Children", "Rapid perforation (thin omentum)\nVomiting + diarrhoea prominent\nHigh index of suspicion"],
["💊 Immunocomp.", "Blunted response; late presentation\nLeucocytosis often absent\nCT critical for diagnosis"]
];
pops.forEach(([title, txt], i) => {
const x = 0.3 + i * 2.4;
s.addText(title, {
x, y: 4.03, w: 2.2, h: 0.25,
fontSize: 9.5, bold: true, color: ACCENT2, fontFace: "Calibri", margin: 0
});
s.addText(txt, {
x, y: 4.3, w: 2.25, h: 1.0,
fontSize: 8.5, color: TXT_DARK, fontFace: "Calibri", margin: 0
});
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 9 – HOMOEOPATHIC REMEDIES + KEY MNEMONICS
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentBg(s);
darkHeader(s, "Homoeopathic Aspect & Key Mnemonics", "BHMS-specific + Memory aids");
card(s, 0.2, 1.25, 5.8, 3.0, "💊 Homoeopathic Remedies", BG_DARK, "FFFFFF", [
"Bryonia alba — Stitching pain, worse any motion, lies still",
"Belladonna — Sudden, throbbing, violent; hot tender abdomen",
"Iris tenax — Specific for appendicitis; pain relieved bending forward",
"Colocynthis — Cramp-like, doubles up for relief",
"Lachesis — Left-to-right shift; worse touch/sleep",
"⚠️ Acute appendicitis = SURGICAL EMERGENCY",
" Homoeopathy only supportive in early stage",
], TXT_DARK);
// Mnemonics card
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 6.15, y: 1.25, w: 3.65, h: 3.0,
fill: { color: "FFFFFF" }, line: { color: "DDE3EC", pt: 1 }, rectRadius: 0.08,
shadow: { type: "outer", color: "000000", blur: 4, offset: 2, angle: 135, opacity: 0.08 }
});
s.addText("🧠 Memory Aids", {
x: 6.27, y: 1.31, w: 3.41, h: 0.3, fontSize: 10, bold: true,
color: BG_DARK, fontFace: "Calibri", margin: 0
});
s.addShape(pres.shapes.RECTANGLE, {
x: 6.27, y: 1.63, w: 3.41, h: 0.02,
fill: { color: "DDE3EC" }, line: { color: "DDE3EC" }
});
const mnems = [
["MANTRELS", "Alvarado score letters"],
["Pain → Vomit", "Not Vomit → Pain!"],
["End-artery", "= Gangrene risk"],
["T10 dermatome", "= Periumbilical pain"],
["RIF tenderness", "= McBurney's point"],
["6-9 cm", "= Appendix length"],
["6 mm on USG", "= Abnormal width"],
];
mnems.forEach(([key, val], i) => {
const y = 1.7 + i * 0.33;
s.addText(key, {
x: 6.27, y, w: 1.6, h: 0.28,
fontSize: 9, bold: true, color: ACCENT, fontFace: "Calibri", margin: 0
});
s.addText(val, {
x: 7.9, y, w: 1.8, h: 0.28,
fontSize: 9, color: TXT_DARK, fontFace: "Calibri", margin: 0
});
});
// bottom warning
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 0.2, y: 4.35, w: 9.6, h: 0.98,
fill: { color: BG_DARK }, line: { color: BG_DARK }, rectRadius: 0.07
});
s.addText([
{ text: "⭐ EXAM TIPS: ", options: { bold: true, color: GOLD, fontSize: 11 } },
{ text: "Pain before vomiting • McBurney's point • Rovsing's/Psoas/Obturator signs • Alvarado ≥7 • End-artery = gangrene • Oschner-Sherren for mass • Iris tenax (BHMS specific) • Always mention surgical referral", options: { color: TXT_LIGHT, fontSize: 10 } }
], { x: 0.35, y: 4.4, w: 9.3, h: 0.88, fontFace: "Calibri", valign: "middle" });
}
// ─── Write file ───────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/appendicitis-revision/Appendicitis_Revision.pptx" })
.then(() => console.log("✅ Done: Appendicitis_Revision.pptx"))
.catch(err => console.error("❌", err));
cd /home/daytona/workspace/appendicitis-revision && node build.js
Appendicitis Revision
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title slide - bold navy/red design |
| 2 | Definition + Anatomy at a glance |
| 3 | Aetiology + Pathophysiology sequence + Stages |
| 4 | Clinical Features - classic pain sequence + all signs |
| 5 | Investigations + Full Alvarado (MANTRELS) score |
| 6 | Differential Diagnosis - 8 conditions with key differentiators |
| 7 | Treatment - Pre-op, Surgery, Oschner-Sherren regimen |
| 8 | Complications + Special Populations (pregnant, elderly, children, immunocomp.) |
| 9 | Homoeopathic remedies + Memory Aids + Exam tips bar |
Create a PDF quick reference card (two-pager) of this content , like definition, pathophysiology,investigation, clinical features, diagnosis, treatment, homeopathic remedies
~/appendicitis-revision/build_pdf.py
"""
Appendicitis – Two-Page Quick Reference Card
Built with ReportLab
"""
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm
from reportlab.pdfgen import canvas
from reportlab.lib.colors import HexColor
from reportlab.platypus import Paragraph
from reportlab.lib.styles import ParagraphStyle
from reportlab.lib.enums import TA_LEFT, TA_CENTER
import os
OUT = "/home/daytona/workspace/appendicitis-revision/Appendicitis_QuickRef.pdf"
# ── Palette ──────────────────────────────────────────────────────
NAVY = HexColor("#0D1B2A")
RED = HexColor("#E63946")
BLUE = HexColor("#457B9D")
GOLD = HexColor("#F4A261")
BG = HexColor("#F4F6F9")
WHITE = HexColor("#FFFFFF")
LIGHT_BG = HexColor("#EEF4FA")
MUTED = HexColor("#5A7186")
DARK_TXT = HexColor("#1D2D44")
GREEN = HexColor("#2A9D8F")
PW, PH = A4 # 595.27 x 841.89 pt
M = 14 * mm # outer margin
COL_GAP = 5 * mm
COL_W = (PW - 2*M - COL_GAP) / 2 # ~two-column layout
# ── Helpers ───────────────────────────────────────────────────────
def draw_rounded_rect(c, x, y, w, h, r=4, fill=WHITE, stroke=None, stroke_w=0.5):
c.saveState()
if stroke:
c.setStrokeColor(stroke)
c.setLineWidth(stroke_w)
else:
c.setStrokeColor(fill)
c.setFillColor(fill)
p = c.beginPath()
p.roundRect(x, y, w, h, r)
c.drawPath(p, fill=1, stroke=1 if stroke else 0)
c.restoreState()
def section_header(c, x, y, w, title, bg=NAVY, accent=RED, fg=WHITE, font_size=8):
h = 13
draw_rounded_rect(c, x, y, w, h, r=3, fill=bg)
# left accent stripe
c.saveState()
c.setFillColor(accent)
c.rect(x, y, 3, h, fill=1, stroke=0)
c.restoreState()
c.saveState()
c.setFillColor(fg)
c.setFont("Helvetica-Bold", font_size)
c.drawString(x + 7, y + 4, title.upper())
c.restoreState()
return y + h
def bullet_lines(c, x, y, lines, font="Helvetica", size=7, color=DARK_TXT,
leading=10, indent=8, bullet="•", bold_first=False, max_w=None):
c.saveState()
c.setFont(font, size)
c.setFillColor(color)
for i, line in enumerate(lines):
if y < 20:
break
if bullet:
c.setFont("Helvetica-Bold" if bold_first and i == 0 else font, size)
c.drawString(x, y, bullet)
c.setFont(font, size)
c.drawString(x + indent, y, line)
else:
c.drawString(x, y, line)
y -= leading
c.restoreState()
return y
def kv_rows(c, x, y, rows, k_w=55, font_size=7, leading=10, fill_alt=None, box_w=None):
"""Render key: value rows, alternating bg if fill_alt given."""
bw = box_w or (k_w + 120)
for i, (k, v) in enumerate(rows):
if fill_alt and i % 2 == 0:
draw_rounded_rect(c, x - 1, y - 1, bw, leading + 1, r=2, fill=fill_alt)
c.saveState()
c.setFont("Helvetica-Bold", font_size)
c.setFillColor(BLUE)
c.drawString(x, y, k)
c.setFont("Helvetica", font_size)
c.setFillColor(DARK_TXT)
c.drawString(x + k_w, y, v)
c.restoreState()
y -= leading
return y
def tag(c, x, y, text, bg=BLUE, fg=WHITE, font_size=6.5, padding=3):
tw = c.stringWidth(text, "Helvetica-Bold", font_size)
draw_rounded_rect(c, x, y, tw + padding*2, 11, r=2.5, fill=bg)
c.saveState()
c.setFillColor(fg)
c.setFont("Helvetica-Bold", font_size)
c.drawString(x + padding, y + 3, text)
c.restoreState()
return x + tw + padding*2 + 3
def divider(c, x, y, w, color=HexColor("#DDE3EC"), lw=0.5):
c.saveState()
c.setStrokeColor(color)
c.setLineWidth(lw)
c.line(x, y, x + w, y)
c.restoreState()
# ═══════════════════════════════════════════════════════════════
# PAGE 1
# ═══════════════════════════════════════════════════════════════
def page1(c):
# ── Full-page bg ──
c.setFillColor(BG)
c.rect(0, 0, PW, PH, fill=1, stroke=0)
# ── Header banner ──
c.setFillColor(NAVY)
c.rect(0, PH - 38*mm, PW, 38*mm, fill=1, stroke=0)
c.setFillColor(RED)
c.rect(0, PH - 38*mm, 5, 38*mm, fill=1, stroke=0)
# Title
c.setFillColor(WHITE)
c.setFont("Helvetica-Bold", 26)
c.drawString(M, PH - 18*mm, "APPENDICITIS")
c.setFont("Helvetica", 9)
c.setFillColor(HexColor("#A8C0D6"))
c.drawString(M, PH - 24*mm, "Quick Reference Card • 3rd BHMS • Page 1 of 2")
c.setFont("Helvetica", 8)
c.setFillColor(GOLD)
c.drawString(M, PH - 30*mm,
"Definition | Anatomy | Aetiology | Pathophysiology | Clinical Features")
# ── Column starts ──
L = M # left col x
R = M + COL_W + COL_GAP # right col x
top_y = PH - 40*mm - 5
# ────────────────────────────────────────────────────
# LEFT COLUMN
# ────────────────────────────────────────────────────
y = top_y
# -- DEFINITION --
y = section_header(c, L, y, COL_W, "Definition", bg=NAVY, accent=RED) + 4
draw_rounded_rect(c, L, y - 22, COL_W, 28, r=3, fill=HexColor("#FFF4EC"), stroke=GOLD)
c.saveState()
c.setFont("Helvetica", 7.5)
c.setFillColor(DARK_TXT)
c.drawString(L + 5, y - 5, "Acute inflammation of the vermiform appendix.")
c.drawString(L + 5, y - 14, "Most common cause of ACUTE ABDOMEN in young adults.")
c.restoreState()
y -= 28
# -- ANATOMY --
y -= 5
y = section_header(c, L, y, COL_W, "Anatomy — Key Facts", bg=NAVY, accent=BLUE) + 4
rows_anat = [
("Length:", "6–9 cm (avg)"),
("Base:", "McBurney's point — 1/3 from ASIS to umbilicus"),
("Position:", "Taeniae coli of caecum converge at base"),
("Wall:", "Mucosa / Submucosa / Muscle / Serosa"),
("Lymphoid:", "Max at age 12–20 (submucosal aggregates)"),
("Blood supply:", "Appendicular artery (END-ARTERY!)"),
("Nerve supply:", "T10 → periumbilical visceral pain initially"),
]
draw_rounded_rect(c, L, y - len(rows_anat)*11 - 5, COL_W, len(rows_anat)*11 + 8, r=3, fill=WHITE)
y = kv_rows(c, L+4, y-2, rows_anat, k_w=58, font_size=7, leading=11, fill_alt=LIGHT_BG, box_w=COL_W-2)
y -= 4
# Tip positions
y -= 3
y = section_header(c, L, y, COL_W, "Appendix Tip — Positions", bg=HexColor("#1D3557"), accent=BLUE) + 5
tip_x = L + 4
tip_x = tag(c, tip_x, y, "Retrocaecal 65%", bg=BLUE)
tip_x = tag(c, tip_x, y, "Pelvic 30%", bg=HexColor("#E07B39"))
tip_x = tag(c, tip_x, y, "Subcaecal", bg=MUTED)
tip_x = tag(c, tip_x, y, "Preileal", bg=MUTED)
y -= 16
# -- AETIOLOGY --
y -= 3
y = section_header(c, L, y, COL_W, "Aetiology — Causes of Obstruction", bg=NAVY, accent=RED) + 4
aetiologies = [
"Faecolith / appendicolith (most common)",
"Lymphoid hyperplasia (post-viral, children)",
"Parasites: Ascaris, Enterobius (pinworm)",
"Vegetable / fruit seeds or foreign body",
"Neoplasm (carcinoid tumour, mucocoele)",
"Stricture / fibrosis",
]
draw_rounded_rect(c, L, y - len(aetiologies)*10 - 4, COL_W, len(aetiologies)*10 + 8, r=3, fill=WHITE)
y = bullet_lines(c, L+4, y-2, aetiologies, size=7, leading=10)
y -= 6
# -- BACTERIOLOGY BOX --
box_h = 22
draw_rounded_rect(c, L, y - box_h, COL_W, box_h, r=3, fill=LIGHT_BG, stroke=BLUE, stroke_w=0.8)
c.saveState()
c.setFont("Helvetica-Bold", 7)
c.setFillColor(BLUE)
c.drawString(L+4, y - 9, "Bacteriology (polymicrobial):")
c.setFont("Helvetica", 7)
c.setFillColor(DARK_TXT)
c.drawString(L+4, y - 18, "E. coli • Bacteroides fragilis • Enterococcus • Pseudomonas • Klebsiella")
c.restoreState()
y -= box_h + 4
# ────────────────────────────────────────────────────
# RIGHT COLUMN
# ────────────────────────────────────────────────────
y = top_y
# -- PATHOPHYSIOLOGY --
y = section_header(c, R, y, COL_W, "Pathophysiology", bg=NAVY, accent=RED) + 4
steps = [
(RED, "1. Obstruction", "↑ intraluminal pressure from mucus + gas"),
(RED, "2. Venous occlusion","Mucosal oedema and ischaemia"),
(RED, "3. Arterial block", "Full-thickness ischaemia / necrosis"),
(RED, "4. Bacterial invasion","Suppurative (pus-filled) appendicitis"),
(RED, "5. Gangrene", "Green-black discolouration of wall"),
(RED, "6. Perforation", "→ Abscess (localised) or Peritonitis (free)"),
]
box_h_path = len(steps) * 13 + 8
draw_rounded_rect(c, R, y - box_h_path, COL_W, box_h_path, r=3, fill=WHITE)
sy = y - 4
for clr, step, desc in steps:
c.saveState()
c.setFillColor(clr)
c.roundRect(R+3, sy - 1, 3, 10, 1, fill=1, stroke=0)
c.setFont("Helvetica-Bold", 7)
c.setFillColor(RED)
c.drawString(R + 10, sy, step)
c.setFont("Helvetica", 7)
c.setFillColor(DARK_TXT)
c.drawString(R + 10 + c.stringWidth(step, "Helvetica-Bold", 7) + 3, sy, desc)
c.restoreState()
sy -= 13
y -= box_h_path + 5
# Stages row
y = section_header(c, R, y, COL_W, "Pathological Stages", bg=HexColor("#1D3557"), accent=GOLD) + 5
stages = [("Catarrhal", BLUE), ("Suppurative", GOLD), ("Gangrenous", HexColor("#E07B39")), ("Perforated", RED)]
sx = R + 2
for name, clr in stages:
tw = c.stringWidth(name, "Helvetica-Bold", 6.5) + 8
draw_rounded_rect(c, sx, y, tw, 12, r=2.5, fill=clr)
c.saveState()
c.setFont("Helvetica-Bold", 6.5)
c.setFillColor(WHITE)
c.drawCentredString(sx + tw/2, y + 3.5, name)
c.restoreState()
sx += tw + 4
if sx < R + COL_W - 5:
c.saveState()
c.setFont("Helvetica-Bold", 8)
c.setFillColor(MUTED)
c.drawString(sx - 2, y + 2, "→")
c.restoreState()
sx += 6
y -= 18
# -- CLINICAL FEATURES --
y = section_header(c, R, y, COL_W, "Clinical Features", bg=NAVY, accent=RED) + 4
# Pain sequence
draw_rounded_rect(c, R, y - 34, COL_W, 38, r=3, fill=HexColor("#FFF4EC"), stroke=GOLD)
c.saveState()
c.setFont("Helvetica-Bold", 7)
c.setFillColor(GOLD)
c.drawString(R+4, y-4, "★ Classic Pain Sequence (50% of cases):")
c.setFont("Helvetica", 7)
c.setFillColor(DARK_TXT)
c.drawString(R+4, y-13, "Stage 1: Periumbilical colic (visceral, T10) + anorexia + nausea")
c.drawString(R+4, y-22, "Stage 2: Pain SHIFTS to RIF (somatic) — constant, worse on movement")
c.setFont("Helvetica-Bold", 7)
c.setFillColor(RED)
c.drawString(R+4, y-31, "KEY: Pain ALWAYS before vomiting!")
c.restoreState()
y -= 40
# Symptoms
c.saveState(); c.setFont("Helvetica-Bold", 7); c.setFillColor(BLUE); c.drawString(R+2, y, "Symptoms:"); c.restoreState()
y -= 10
syms = ["Periumbilical → RIF pain shift", "Anorexia (constant feature!)", "Nausea + 1-2 episodes vomiting",
"Low-grade fever 37.5–38.5°C", "Constipation / mild diarrhoea", "Dysuria (near ureter/bladder)"]
draw_rounded_rect(c, R, y - len(syms)*10 - 2, COL_W, len(syms)*10 + 6, r=3, fill=WHITE)
y = bullet_lines(c, R+5, y-2, syms, size=7, leading=10)
y -= 8
# Signs
c.saveState(); c.setFont("Helvetica-Bold", 7); c.setFillColor(BLUE); c.drawString(R+2, y, "Signs on examination:"); c.restoreState()
y -= 10
signs = [
("McBurney's tenderness", "Max at 1/3 ASIS→umbilicus"),
("Rebound (Blumberg's)", "Release > application pain"),
("Rovsing's sign", "LIF pressure → RIF pain"),
("Psoas sign", "Retrocaecal appendix"),
("Obturator sign", "Pelvic appendix"),
("PR tenderness", "Pelvic appendix only sign"),
]
sign_h = len(signs)*11 + 6
draw_rounded_rect(c, R, y - sign_h + 2, COL_W, sign_h, r=3, fill=WHITE)
for k, v in signs:
c.saveState()
c.setFillColor(LIGHT_BG)
c.roundRect(R+2, y-2, COL_W-4, 10, 1.5, fill=1, stroke=0)
c.setFont("Helvetica-Bold", 7)
c.setFillColor(DARK_TXT)
c.drawString(R+5, y, k + ":")
c.setFont("Helvetica", 7)
c.setFillColor(MUTED)
c.drawRightString(R + COL_W - 4, y, v)
c.restoreState()
y -= 11
y -= 5
# ── Footer p1 ──
c.saveState()
c.setFillColor(NAVY)
c.rect(0, 0, PW, 10*mm, fill=1, stroke=0)
c.setFillColor(WHITE)
c.setFont("Helvetica", 7)
c.drawCentredString(PW/2, 5*mm, "APPENDICITIS Quick Reference • 3rd BHMS • Compiled from Bailey & Love, Sabiston, Schwartz's Surgery")
c.setFillColor(GOLD)
c.setFont("Helvetica-Bold", 8)
c.drawRightString(PW - M, 5*mm, "1 / 2")
c.restoreState()
# ═══════════════════════════════════════════════════════════════
# PAGE 2
# ═══════════════════════════════════════════════════════════════
def page2(c):
c.setFillColor(BG)
c.rect(0, 0, PW, 38*mm, fill=1, stroke=0)
c.rect(0, 0, PW, PH, fill=1, stroke=0)
# Mini header
c.setFillColor(NAVY)
c.rect(0, PH - 16*mm, PW, 16*mm, fill=1, stroke=0)
c.setFillColor(RED)
c.rect(0, PH - 16*mm, 5, 16*mm, fill=1, stroke=0)
c.setFillColor(WHITE)
c.setFont("Helvetica-Bold", 14)
c.drawString(M, PH - 9*mm, "APPENDICITIS")
c.setFont("Helvetica", 8)
c.setFillColor(HexColor("#A8C0D6"))
c.drawString(M + 96, PH - 9*mm, "Investigations | Diagnosis | Treatment | Complications | Homoeopathy")
c.setFillColor(GOLD)
c.setFont("Helvetica-Bold", 8)
c.drawRightString(PW - M, PH - 9*mm, "Page 2 of 2")
L = M
R = M + COL_W + COL_GAP
y = PH - 18*mm - 6
# ────────────────────────────────────────────────────
# LEFT COLUMN
# ────────────────────────────────────────────────────
# -- INVESTIGATIONS --
y = section_header(c, L, y, COL_W, "Investigations", bg=NAVY, accent=BLUE) + 4
inv = [
("CBC", "Leucocytosis >10,000 + neutrophilia (shift left)"),
("CRP", ">8 mg/L; Low CRP+WBC argues AGAINST appx"),
("β-hCG", "Mandatory in all females (exclude ectopic)"),
("Urinalysis", "Exclude UTI / renal colic (sterile pyuria possible)"),
]
draw_rounded_rect(c, L, y - len(inv)*12 - 4, COL_W, len(inv)*12 + 8, r=3, fill=WHITE)
c.saveState(); c.setFont("Helvetica-Bold",7); c.setFillColor(BLUE); c.drawString(L+3, y-1, "Blood Tests"); c.restoreState()
y -= 10
y = kv_rows(c, L+4, y, inv, k_w=36, font_size=7, leading=12, fill_alt=LIGHT_BG, box_w=COL_W-6)
y -= 5
c.saveState(); c.setFont("Helvetica-Bold",7); c.setFillColor(BLUE); c.drawString(L+3, y, "Imaging"); c.restoreState()
y -= 10
img_rows = [
("USG", "1st line (children/women). Non-compressible >6 mm"),
("CT (CECT)", "Most accurate. Gold standard (adult/equivocal)"),
("MRI", "Pregnancy (no radiation)"),
("X-ray", "Faecolith (10%), free gas under diaphragm (perf)"),
]
draw_rounded_rect(c, L, y - len(img_rows)*12 - 4, COL_W, len(img_rows)*12 + 8, r=3, fill=WHITE)
y = kv_rows(c, L+4, y-2, img_rows, k_w=42, font_size=7, leading=12, fill_alt=LIGHT_BG, box_w=COL_W-6)
y -= 6
# -- ALVARADO --
y = section_header(c, L, y, COL_W, "Alvarado Score (MANTRELS)", bg=HexColor("#1D3557"), accent=GOLD) + 4
alv = [
("M", "Migration of pain to RIF", "1"),
("A", "Anorexia", "1"),
("N", "Nausea / Vomiting", "1"),
("T", "Tenderness in RIF", "2"),
("R", "Rebound tenderness", "1"),
("E", "Elevated temperature", "1"),
("L", "Leucocytosis", "2"),
("S", "Shift to left (neutrophilia)", "1"),
]
draw_rounded_rect(c, L, y - len(alv)*11 - 18, COL_W, len(alv)*11 + 22, r=3, fill=WHITE)
ay = y - 3
for letter, desc, score in alv:
draw_rounded_rect(c, L+3, ay-1, 10, 10, r=2, fill=NAVY)
c.saveState()
c.setFont("Helvetica-Bold", 7)
c.setFillColor(GOLD)
c.drawCentredString(L+8, ay+2, letter)
c.setFont("Helvetica", 7)
c.setFillColor(DARK_TXT)
c.drawString(L+16, ay+2, desc)
draw_rounded_rect(c, L+COL_W-16, ay, 13, 10, r=2,
fill=RED if score == "2" else BLUE)
c.setFont("Helvetica-Bold", 7)
c.setFillColor(WHITE)
c.drawCentredString(L+COL_W-9.5, ay+3, score)
c.restoreState()
ay -= 11
ay -= 4
draw_rounded_rect(c, L+3, ay-2, COL_W-6, 14, r=3, fill=HexColor("#FFF4EC"), stroke=GOLD)
c.saveState()
c.setFont("Helvetica-Bold", 7.5)
c.setFillColor(RED)
c.drawString(L+7, ay+2, "Score ≥7 = Likely Appendicitis | 5-6 = Equivocal | ≤4 = Unlikely")
c.restoreState()
y = ay - 14
# -- DIFFERENTIAL DIAGNOSIS --
y -= 4
y = section_header(c, L, y, COL_W, "Differential Diagnosis", bg=NAVY, accent=RED) + 4
diffs = [
"Mesenteric adenitis — post-viral; no guarding",
"Gastroenteritis — vomiting before pain; diarrhoea",
"Ectopic pregnancy — +ve hCG; haemodynamic instability",
"Ovarian cyst/torsion — female; USG confirms",
"Meckel's diverticulitis — identical; found at surgery",
"Renal colic — haematuria; no guarding; radiates groin",
"PID — bilateral; cervical excitation; discharge",
"Crohn's disease — chronic; terminal ileal involvement",
]
draw_rounded_rect(c, L, y - len(diffs)*9.5 - 4, COL_W, len(diffs)*9.5 + 8, r=3, fill=WHITE)
y = bullet_lines(c, L+5, y-2, diffs, size=6.8, leading=9.5)
# ────────────────────────────────────────────────────
# RIGHT COLUMN
# ────────────────────────────────────────────────────
y = PH - 18*mm - 6
# -- TREATMENT --
y = section_header(c, R, y, COL_W, "Treatment / Management", bg=NAVY, accent=RED) + 4
c.saveState(); c.setFont("Helvetica-Bold",7); c.setFillColor(BLUE); c.drawString(R+3, y, "Pre-operative"); c.restoreState()
y -= 10
preop = ["Nil by mouth (NBM)", "IV fluid resuscitation",
"IV antibiotics: Cefuroxime + Metronidazole", " OR Piperacillin-tazobactam",
"Analgesia (safe — does NOT mask signs)", "β-hCG if female of reproductive age"]
draw_rounded_rect(c, R, y - len(preop)*10 - 2, COL_W, len(preop)*10 + 6, r=3, fill=WHITE)
y = bullet_lines(c, R+5, y-2, preop, size=7, leading=10)
y -= 7
c.saveState(); c.setFont("Helvetica-Bold",7); c.setFillColor(RED); c.drawString(R+3, y, "Appendicectomy (Definitive)"); c.restoreState()
y -= 10
surg = [
("Open (Gridiron)", "McBurney's incision — muscle splitting"),
("Open (Lanz)", "Transverse — cosmetically preferred"),
("Laparoscopic", "Preferred; 3 ports; faster recovery; diagnostic"),
("Technique", "Ligate mesoappendix → ligate base → divide"),
]
draw_rounded_rect(c, R, y - len(surg)*12 - 4, COL_W, len(surg)*12 + 6, r=3, fill=WHITE)
y = kv_rows(c, R+4, y-2, surg, k_w=52, font_size=7, leading=12, fill_alt=LIGHT_BG, box_w=COL_W-4)
y -= 6
# Oschner-Sherren
os_h = 46
draw_rounded_rect(c, R, y - os_h, COL_W, os_h, r=3, fill=LIGHT_BG, stroke=BLUE, stroke_w=0.8)
c.saveState()
c.setFont("Helvetica-Bold", 7)
c.setFillColor(BLUE)
c.drawString(R+4, y-8, "Oschner-Sherren Regimen (Appendix Mass)")
c.setFont("Helvetica", 7)
c.setFillColor(DARK_TXT)
items = ["NBM + NG tube • IV fluids • IV antibiotics",
"Mark mass boundary on skin • Vitals 4-hourly",
"Operate if patient deteriorates",
"Interval appendicectomy after 6–8 weeks"]
for i, txt in enumerate(items):
c.drawString(R+4, y - 18 - i*9, ("→ " if i==2 else "• ") + txt)
c.restoreState()
y -= os_h + 6
# -- COMPLICATIONS --
y = section_header(c, R, y, COL_W, "Complications", bg=NAVY, accent=RED) + 4
draw_rounded_rect(c, R, y - 56, COL_W, 60, r=3, fill=WHITE)
c.saveState()
c.setFont("Helvetica-Bold", 7); c.setFillColor(RED); c.drawString(R+4, y-4, "Pre-operative:")
c.setFont("Helvetica", 7); c.setFillColor(DARK_TXT)
c.drawString(R+4, y-13, "• Perforation → peritonitis • Appendix abscess • Phlegmon • Portal pyaemia")
c.setFont("Helvetica-Bold", 7); c.setFillColor(BLUE); c.drawString(R+4, y-26, "Post-operative:")
c.setFont("Helvetica", 7); c.setFillColor(DARK_TXT)
c.drawString(R+4, y-35, "• Wound infection (most common) • Intraabdominal abscess")
c.drawString(R+4, y-44, "• Ileus • Faecal fistula • Stump appendicitis • SBO (adhesions)")
c.restoreState()
y -= 62
# -- HOMOEOPATHIC REMEDIES --
y = section_header(c, R, y, COL_W, "Homoeopathic Remedies", bg=HexColor("#1D3557"), accent=GREEN) + 4
homeo = [
("Bryonia alba", "Stitching, sharp pain WORSE ANY motion; lies still"),
("Belladonna", "Sudden, throbbing, violent; hot tender abdomen"),
("Iris tenax", "RIF colic — SPECIFIC; pain relieved bending forward"),
("Colocynthis", "Crampy; doubles up for relief; better pressure"),
("Lachesis", "Left-to-right; worse touch and after sleep"),
("Plumbum met.", "Severe colic; retraction of abdomen; constipation"),
]
draw_rounded_rect(c, R, y - len(homeo)*12 - 4, COL_W, len(homeo)*12 + 8, r=3, fill=WHITE)
for i, (rem, desc) in enumerate(homeo):
hy = y - 4 - i * 12
draw_rounded_rect(c, R+3, hy-2, COL_W-6, 11, r=2, fill=LIGHT_BG if i%2==0 else WHITE)
c.saveState()
c.setFont("Helvetica-Bold", 7)
c.setFillColor(GREEN)
c.drawString(R+6, hy+1, rem + ":")
sw = c.stringWidth(rem+":", "Helvetica-Bold", 7)
c.setFont("Helvetica", 7)
c.setFillColor(DARK_TXT)
c.drawString(R + 7 + sw, hy+1, desc)
c.restoreState()
y -= len(homeo)*12 + 10
# Warning box
draw_rounded_rect(c, R, y - 22, COL_W, 26, r=3, fill=HexColor("#FFE8E8"), stroke=RED, stroke_w=1)
c.saveState()
c.setFont("Helvetica-Bold", 7.5)
c.setFillColor(RED)
c.drawString(R+5, y-7, "⚠ IMPORTANT (BHMS Exam):")
c.setFont("Helvetica", 7)
c.setFillColor(DARK_TXT)
c.drawString(R+5, y-17, "Acute appendicitis is a SURGICAL EMERGENCY. Homoeopathy")
c.drawString(R+5, y-25, "is ONLY supportive in early (catarrhal) stage. Always refer.")
c.restoreState()
y -= 28
# -- EXAM TIPS BANNER --
banner_y = 12*mm
c.setFillColor(NAVY)
c.rect(0, banner_y, PW, 18*mm, fill=1, stroke=0)
c.setFillColor(GOLD)
c.setFont("Helvetica-Bold", 8)
c.drawString(M, banner_y + 13*mm - 3, "★ MUST KNOW FOR EXAM:")
tips = [
"Pain → Vomiting (NEVER reverse)",
"McBurney's = 1/3 ASIS→umbilicus",
"Rovsing / Psoas / Obturator signs",
"Alvarado ≥7 = surgery",
"Appendicular artery = END-ARTERY",
"Iris tenax = BHMS specific remedy",
"Oschner-Sherren for mass",
"Interval appendicectomy in 6–8 wks",
]
c.setFont("Helvetica", 7.5)
c.setFillColor(WHITE)
for i, tip in enumerate(tips):
col = i // 2
row = i % 2
c.drawString(M + col * 73, banner_y + (8 if row==0 else 1)*mm, "• " + tip)
# Footer
c.setFillColor(HexColor("#08111C"))
c.rect(0, 0, PW, 10*mm, fill=1, stroke=0)
c.setFillColor(HexColor("#A8C0D6"))
c.setFont("Helvetica", 7)
c.drawCentredString(PW/2, 4*mm, "APPENDICITIS Quick Reference • 3rd BHMS • Sources: Bailey & Love 28e, Sabiston, Schwartz's Surgery 11e")
c.setFillColor(GOLD)
c.setFont("Helvetica-Bold", 8)
c.drawRightString(PW - M, 4*mm, "2 / 2")
# ═══════════════════════════════════════════════════════════════
# BUILD
# ═══════════════════════════════════════════════════════════════
c = canvas.Canvas(OUT, pagesize=A4)
c.setTitle("Appendicitis Quick Reference Card")
c.setAuthor("3rd BHMS Revision")
c.setSubject("Appendicitis — Definition, Pathophysiology, Clinical Features, Investigations, Treatment, Homeopathy")
page1(c)
c.showPage()
page2(c)
c.save()
print(f"✅ PDF created: {OUT}")
cd /home/daytona/workspace/appendicitis-revision && python build_pdf.py
Appendicitis QuickRef
PDF Document · PDF
How to download this pdf
Appendicitis QuickRef
PDF Document · PDF
I am not able to download, so make it in images form
cd /home/daytona/workspace/appendicitis-revision && python -c " from pdf2image i…


Image also not loading, so give it in writing words
Acute inflammation of the vermiform appendix. Most common cause of ACUTE ABDOMEN in young adults. Most frequently performed urgent abdominal operation worldwide.
| Feature | Detail |
|---|---|
| Length | 6–9 cm (average) |
| Base location | McBurney's point — 1/3 from ASIS to umbilicus |
| Landmark | Three taeniae coli of caecum converge at base |
| Wall layers | Mucosa → Submucosa → Muscle → Serosa |
| Lymphoid tissue | Maximum between ages 12–20 (submucosal) |
| Blood supply | Appendicular artery — END-ARTERY (thrombosis = gangrene) |
| Nerve supply | T10 → periumbilical visceral pain initially |
| Step | Event | Result |
|---|---|---|
| 1 | Obstruction | ↑ intraluminal pressure (mucus + gas) |
| 2 | Venous occlusion | Mucosal oedema and ischaemia |
| 3 | Arterial block | Full-thickness ischaemia / necrosis |
| 4 | Bacterial invasion | Suppurative (pus-filled) appendicitis |
| 5 | Gangrene | Green-black discolouration of wall |
| 6 | Perforation | → Abscess (localised) OR Peritonitis (free) |
| Sign | Description |
|---|---|
| McBurney's tenderness | Max tenderness at 1/3 ASIS→umbilicus |
| Rebound (Blumberg's) | Release of pressure causes more pain than application |
| Rovsing's sign | Pressure in LIF causes pain in RIF |
| Psoas sign | Pain on extension of right hip — retrocaecal appendix |
| Obturator sign | Pain on internal rotation of flexed right hip — pelvic appendix |
| PR (rectal) tenderness | May be the ONLY sign in pelvic appendix |
| Guarding + rigidity | In the right iliac fossa |
| Cope's sign | Hyperaesthesia of RIF skin |
| Test | Finding / Significance |
|---|---|
| CBC | Leucocytosis >10,000 + neutrophilia (shift to left) |
| CRP | >8 mg/L; Low CRP + low WBC argues AGAINST appendicitis |
| β-hCG | Mandatory in all females (exclude ectopic pregnancy) |
| Urinalysis | Exclude UTI / renal colic; sterile pyuria possible |
| Modality | Detail |
|---|---|
| USG abdomen | 1st line (esp. children, women). Non-compressible appendix >6 mm = positive |
| CT (CECT) | Most accurate. Gold standard for adult/equivocal cases |
| MRI | Preferred in pregnancy (no radiation risk) |
| X-ray abdomen | Faecolith (10%), free gas under diaphragm (perforation) |
| Letter | Feature | Score |
|---|---|---|
| M | Migration of pain to RIF | 1 |
| A | Anorexia | 1 |
| N | Nausea / Vomiting | 1 |
| T | Tenderness in RIF | 2 |
| R | Rebound tenderness | 1 |
| E | Elevated temperature | 1 |
| L | Leucocytosis | 2 |
| S | Shift to left (neutrophilia) | 1 |
| TOTAL | 10 |
| Approach | Detail |
|---|---|
| Open — Gridiron incision | McBurney's point; muscle-splitting; perpendicular to ASIS–umbilicus line |
| Open — Lanz incision | Transverse; cosmetically preferred |
| Laparoscopic (preferred) | 3 ports; faster recovery; less pain; better for women (also diagnostic) |
| Technique | Ligate mesoappendix → ligate base with absorbable suture → divide |
| Remedy | Key Indication |
|---|---|
| Bryonia alba | Stitching, sharp pain WORSE ANY motion; patient lies absolutely still |
| Belladonna | Sudden, throbbing, violent pain; hot red tender abdomen; hypersensitive |
| Iris tenax | ⭐ SPECIFIC for appendicitis; RIF colic; pain relieved by bending forward |
| Colocynthis | Cramp-like, cramping pain; doubles up for relief; better pressure |
| Lachesis | Left-to-right pain shift; worse touch and after sleep |
| Plumbum met. | Severe colic; retraction of abdomen; constipation |
⚠️ IMPORTANT FOR BHMS EXAM: Acute appendicitis is a SURGICAL EMERGENCY. Homoeopathic medicines are ONLY supportive in the early catarrhal stage under close monitoring. Always refer for surgical opinion. Never delay surgery with homoeopathic treatment alone.
| Point | What to remember |
|---|---|
| Pain sequence | Pain → Vomiting (NEVER vomiting first) |
| McBurney's point | 1/3 from ASIS to umbilicus |
| Key signs | Rovsing's, Psoas, Obturator, Blumberg's, PR tenderness |
| Alvarado score | ≥7 = surgery; total = 10 |
| End-artery | Appendicular artery → thrombosis = gangrene |
| BHMS remedy | Iris tenax = specific for appendicitis |
| Appendix mass | Oschner-Sherren regimen |
| Interval surgery | 6–8 weeks after resolution |
| Most common position | Retrocaecal (65%) |
| Most common post-op complication | Wound infection |
Make it shorter of one page , must include imp things, in easy way , like definition, etiology, investigation, symptom, diagnosis, treatment, homeopathic medicine
Periumbilical pain → Nausea/Vomiting → Pain shifts to RIF ⚠️ Pain ALWAYS before vomiting
| Sign | Meaning |
|---|---|
| McBurney's tenderness | 1/3 from ASIS to umbilicus |
| Rebound (Blumberg's) | Release pain > pressure pain |
| Rovsing's sign | LIF pressure → RIF pain |
| Psoas sign | Retrocaecal appendix |
| Obturator sign | Pelvic appendix |
| Medicine | Key Symptom |
|---|---|
| Iris tenax ⭐ | SPECIFIC for appendicitis; RIF pain, relieved bending forward |
| Bryonia alba | Sharp pain, worse any movement, lies still |
| Belladonna | Sudden, throbbing, hot tender abdomen |
| Colocynthis | Cramps, doubles up, better pressure |
| Lachesis | Worse touch and after sleep |
⚠️ Appendicitis = Surgical Emergency. Homoeopathy only supportive in early stage. Always refer!