Appendicitis 3rd bhms long 10 marks question for university exam

Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
I now have all the material I need. Let me write the comprehensive 10-mark university answer tailored for BHMS 3rd year.

APPENDICITIS

(10 Mark Long Answer - 3rd BHMS University Exam)


DEFINITION

Appendicitis is the acute inflammation of the vermiform appendix. It is the most common cause of acute abdomen in young adults and the most frequently performed urgent abdominal operation worldwide.

ANATOMY OF THE APPENDIX

The vermiform ("worm-like") appendix is a blind-ended, narrow, muscular tube arising from the posteromedial wall of the caecum, at the confluence of the three taeniae coli. Key anatomical facts:
  • Length: 6-9 cm (average)
  • Position of base: Constant - at McBurney's point (junction of lateral 1/3 and medial 2/3 of a line drawn from the right anterior superior iliac spine to the umbilicus)
  • Tip position: Variable - retrocaecal (most common, ~65%), pelvic/descending (30%), subcaecal, preileal, or postileal
  • Blood supply: Appendicular artery - a branch of the lower division of the ileocolic artery (an end-artery; thrombosis leads to gangrene)
  • Lymphatics: Drain to ileocolic lymph nodes
  • Nerve supply: T10 visceral afferents (explains referred periumbilical pain initially)
The appendix wall contains lymphoid tissue (submucosal aggregates), which is most prominent between ages 12-20 and declines thereafter, explaining the peak incidence in that age group.

INCIDENCE AND EPIDEMIOLOGY

  • Lifetime risk: ~8.6% males, ~6.7% females
  • Peak incidence: teens and early twenties
  • Male:Female ratio = 3:2 in young adults
  • Relatively rare in infants and after middle age
  • More common in Western populations (low-fibre, high-refined carbohydrate diet)

AETIOLOGY / CAUSES

Appendicitis is caused by luminal obstruction followed by bacterial proliferation. Causes of obstruction include:
  1. Faecolith (appendicolith) - most common; a calcified mass of faecal material
  2. Lymphoid hyperplasia - common in children/young adults following viral illness
  3. Vegetable/fruit material or ingested foreign bodies
  4. Parasites - e.g., Ascaris lumbricoides, Enterobius vermicularis (pin worm)
  5. Stricture or fibrosis
  6. Neoplasms of the appendix (carcinoid, mucoele)
  7. Barium (after barium studies)

PATHOPHYSIOLOGY

The sequence of events is:
  1. Luminal obstruction → continued mucus secretion and gas production by intraluminal bacteria → raised intraluminal pressure
  2. Raised pressure impairs venous drainage → mucosal ischaemia and oedema
  3. Progressive distension leads to arterial occlusion (the appendicular artery is an end-artery) → full-thickness ischaemia
  4. Ischaemic wall allows bacterial translocation and invasion → acute suppurative appendicitis
  5. Further progression leads to gangreneperforation
  6. Perforation leads to either:
    • Localised abscess (periappendiceal / pelvic) - if omentum walls off the infection
    • Generalised peritonitis - if free perforation into the peritoneal cavity
Bacteriology: Infection is polymicrobial - mixed aerobic and anaerobic organisms. Common isolates: Escherichia coli, Bacteroides fragilis, Enterococcus, Pseudomonas aeruginosa, Klebsiella pneumoniae.

PATHOLOGICAL STAGES

StageFeatures
Catarrhal (early)Mucosal congestion and oedema; serosal hyperaemia
Suppurative (acute)Purulent exudate in all layers; neutrophilic infiltration; pus in lumen
GangrenousNecrosis of wall; greenish/black discolouration
PerforatedBreach of wall; release of contents into peritoneum

CLINICAL FEATURES

Symptoms

Classic visceral-somatic pain sequence (present in ~50% of cases):
  1. Stage 1 - Visceral (periumbilical) pain: Dull, colicky pain around the umbilicus (T10 dermatome). Lasts 4-6 hours. Associated with anorexia, nausea, and 1-2 episodes of vomiting (vomiting always follows the pain - important diagnostic point; if vomiting precedes pain, think gastroenteritis).
  2. Stage 2 - Somatic (RIF) pain: Pain shifts to the right iliac fossa as parietal peritoneum becomes irritated. Constant, severe, worsened by movement or coughing.
Other symptoms: Low-grade fever (37.5-38.5°C), constipation or mild diarrhoea, dysuria (if appendix lies near ureter or bladder).

Signs

On inspection: Patient lies still (peritonism), flushed, slight tachycardia.
On palpation:
  • McBurney's point tenderness - maximum tenderness at junction of lateral 1/3 and medial 2/3 of line from ASIS to umbilicus
  • Rebound tenderness (Blumberg's sign) - release of pressure causes greater pain than application; indicates peritoneal irritation
  • Rovsing's sign - pressure in the left iliac fossa causes pain in the right iliac fossa (due to displacement of bowel gas)
  • Psoas sign - pain on extension of right hip (retrocaecal appendix lying on iliopsoas)
  • Obturator sign - pain on internal rotation of flexed right hip (pelvic appendix lying near obturator internus)
  • Guarding and rigidity in the right iliac fossa
  • Cope's sign - hyperaesthesia of right iliac fossa skin
On rectal examination: Tenderness in the right side of the rectovesical/rectouterine pouch (important for pelvic appendix - may be only positive sign).

INVESTIGATIONS

Blood Tests

  • Full blood count (CBC): Leucocytosis (WBC >10,000/mm³) with neutrophilia (shift to left). Normal WBC does NOT exclude appendicitis.
  • C-Reactive Protein (CRP): Elevated (>8 mg/L); more specific when raised alongside leucocytosis. Low WBC + low CRP argues against appendicitis.
  • Urinalysis: To exclude UTI/renal colic. Sterile pyuria may occur with pelvic appendicitis (adjacent ureter irritation).
  • Beta-hCG: Mandatory in females of reproductive age (to exclude ectopic pregnancy).

Imaging

  • Ultrasound (USG abdomen/pelvis): First-line imaging, especially in children and women. Positive if non-compressible appendix >6mm diameter seen with periappendiceal fat stranding. Limited by obesity and gas.
  • CT scan (CECT abdomen/pelvis): Most accurate imaging modality; shows thickened appendix, periappendiceal stranding, faecolith, abscess. Gold standard for complicated/equivocal cases.
  • MRI: Preferred in pregnant patients to avoid radiation.
  • Plain X-ray abdomen: Rarely useful; may show a calcified faecolith (~10%), loss of psoas shadow, or free gas under diaphragm (perforation).

Scoring Systems

  • Alvarado Score (MANTRELS Score): Assigns points to symptoms (migration of pain, anorexia, nausea/vomiting), signs (RIF tenderness, rebound, elevated temperature), and lab findings (leucocytosis, shift to left). Score ≥7 strongly suggests appendicitis.

DIFFERENTIAL DIAGNOSIS

ConditionKey distinguishing feature
Mesenteric adenitisHistory of recent URTI; no localised guarding; lymphadenopathy on USG
Acute gastroenteritisVomiting before pain; diarrhoea; diffuse tenderness
Ovarian cyst (torsion/rupture)Female; USG confirms cyst
Ectopic pregnancyFemale; beta-hCG positive; USG
Meckel's diverticulitisClinically identical; diagnosed at surgery
Renal/ureteric colicColicky, radiates to groin; haematuria on urinalysis; no guarding
Crohn's diseaseChronic history; may mimic; terminal ileal disease on imaging
Pelvic inflammatory disease (PID)Female; bilateral adnexal tenderness; vaginal discharge; cervical excitation

TREATMENT / MANAGEMENT

Pre-operative (Conservative Preparation)

  • Nil by mouth (NBO)
  • IV fluid resuscitation and electrolyte correction
  • IV antibiotics (pre-operatively): Coverage for gram-negatives and anaerobes (e.g., cefuroxime + metronidazole, or piperacillin-tazobactam)
  • Analgesia (opioid analgesia does NOT mask signs)
  • Consent and anaesthetic review

Definitive Treatment: APPENDICECTOMY (Appendectomy)

Surgical approaches:
1. Open Appendicectomy (Lanz/Gridiron incision):
  • Gridiron (McBurney's) incision: oblique, perpendicular to the line from ASIS to umbilicus at McBurney's point; muscle-splitting
  • Lanz incision: transverse, cosmetically preferred
  • The appendix is identified at the confluence of taeniae coli, delivered, its mesoappendix ligated and divided, the base ligated with absorbable suture and divided
2. Laparoscopic Appendicectomy:
  • Now the preferred approach at most centres
  • Advantages: Less post-operative pain, faster recovery, lower wound infection rate, better cosmesis, superior diagnostic ability (especially in women of reproductive age)
  • Three ports (umbilical camera, suprapubic, left iliac fossa)

Management of Complicated Appendicitis (Appendix Mass / Abscess)

  • Appendix mass (phlegmon): Conservative "Oschner-Sherren regimen" - NBM, IV antibiotics, close monitoring. Surgery deferred (interval appendicectomy after 6-8 weeks) unless condition deteriorates.
  • Appendix abscess: USG or CT-guided percutaneous drainage; antibiotics; interval appendicectomy after 6-8 weeks.
  • Perforated appendicitis with peritonitis: Emergency surgery; lavage; drainage.

COMPLICATIONS

Pre-operative

  • Perforation with peritonitis
  • Appendix abscess / periappendiceal phlegmon
  • Portal pyaemia (rare) - pylephlebitis

Post-operative

  • Wound infection (most common post-op complication)
  • Pelvic/intraperitoneal abscess
  • Ileus / intestinal obstruction
  • Faecal fistula
  • Stump appendicitis (inflammation of residual appendiceal stump)
  • Adhesions leading to small bowel obstruction (long term)

SPECIAL POPULATIONS

GroupConsideration
Pregnant womenAppendix displaced upward by gravid uterus; pain may be in right flank/upper abdomen; MRI preferred; perforation risk high due to delayed diagnosis
ElderlyAtypical presentation; pain poorly localised; higher perforation rate; higher mortality
ImmunocompromisedBlunted inflammatory response; may present late; leucocytosis often absent
ChildrenRapid progression to perforation (thin omentum); vomiting and diarrhoea more prominent; high index of suspicion needed

PROGNOSIS

  • Mortality of simple appendicitis: <0.1%
  • Mortality rises with perforation, especially in elderly and immunocompromised
  • Full recovery expected after uncomplicated appendicectomy

HOMOEOPATHIC PERSPECTIVE (Relevant for BHMS)

In homoeopathic practice, acute appendicitis is a surgical emergency and requires immediate referral for surgical management. However, homoeopathic medicines may be considered as supportive/palliative in mild/early catarrhal stage under close monitoring:
  • Bryonia alba - Stitching, sharp pain worse by slightest motion; patient lies absolutely still; right-sided colicky pains
  • Belladonna - Sudden, violent, throbbing pain; red face; hypersensitivity; hot, tender abdomen
  • Iris tenax - Considered a specific for appendicitis with right iliac fossa colic; pain relieved by bending forward
  • Colocynthis - Cramp-like pains, patient doubles up for relief
  • Lachesis - Left-to-right shift; cannot tolerate touch or pressure; worse after sleep
Note: Homoeopathic treatment is NOT a substitute for surgical management in established/advanced appendicitis. Perforation risk mandates surgical referral.

Sources: Bailey & Love's Short Practice of Surgery, 28th ed. | Sabiston Textbook of Surgery | Schwartz's Principles of Surgery, 11th ed. | Maingot's Abdominal Operations

Create a summary presentation for exam revision, make it smallest as you can , must contain imp things only

Reading File
Reading File
Reading File
Running Command

ls /home/daytona/workspace/ 2>/dev/null && mkdir -p /home/daytona/workspace/appe…

Writing File

~/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));
Running Command

cd /home/daytona/workspace/appendicitis-revision && node build.js

File generated successfully (warnings are non-critical - just the "none" line color defaulting to black, which doesn't affect the slide visually since those shapes have fills covering the borders). The file is ready.

Your revision deck is ready to download:

Appendicitis Revision

Presentation · PPTX


What's inside (9 slides, nothing wasted):
SlideContent
1Title slide - bold navy/red design
2Definition + Anatomy at a glance
3Aetiology + Pathophysiology sequence + Stages
4Clinical Features - classic pain sequence + all signs
5Investigations + Full Alvarado (MANTRELS) score
6Differential Diagnosis - 8 conditions with key differentiators
7Treatment - Pre-op, Surgery, Oschner-Sherren regimen
8Complications + Special Populations (pregnant, elderly, children, immunocomp.)
9Homoeopathic remedies + Memory Aids + Exam tips bar
Design uses a deep navy + vivid red palette (fitting for appendicitis), with colour-coded card sections and a gold exam-tips banner on the last slide for quick last-minute review.

Create a PDF quick reference card (two-pager) of this content , like definition, pathophysiology,investigation, clinical features, diagnosis, treatment, homeopathic remedies

Reading File
Writing File

~/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}")
Running Command

cd /home/daytona/workspace/appendicitis-revision && python build_pdf.py

Your PDF is ready:

Appendicitis QuickRef

PDF Document · PDF


What's on each page:
Page 1 — Foundation
  • Definition (highlighted box)
  • Anatomy key facts (key-value table with alternating rows)
  • Appendix tip positions (colour tags)
  • Aetiology - all 6 causes
  • Pathophysiology step-by-step sequence (1→6)
  • Pathological stages (colour-coded tags)
  • Clinical features - pain sequence, symptoms, signs table
Page 2 — Diagnosis & Management
  • Investigations - blood tests + imaging
  • Full Alvarado / MANTRELS score (colour-coded, score pills)
  • Differential diagnosis - 8 conditions with key distinguishing features
  • Treatment - pre-op, appendicectomy (open + laparoscopic), Oschner-Sherren regimen
  • Complications - pre-op and post-op
  • Homoeopathic remedies - 6 remedies with key indications
  • Red warning box: always refer for surgery
  • Gold exam-tips banner at the bottom with 8 must-know exam points

How to download this pdf

Simply click the link that was shared in the previous message:

Appendicitis QuickRef

PDF Document · PDF

Clicking it will either:
  • Open it in your browser — then press Ctrl+S (Windows/Linux) or Cmd+S (Mac) to save it, or click the download icon in the PDF viewer toolbar
  • Download it directly — depending on your browser settings
That's all you need to do - no extra steps required!

I am not able to download, so make it in images form

Running Command

cd /home/daytona/workspace/appendicitis-revision && python -c " from pdf2image i…

Both pages converted! Here they are:

Page 1 — Definition, Anatomy, Aetiology, Pathophysiology, Clinical Features
Appendicitis Quick Reference Page 1

Page 2 — Investigations, Alvarado Score, Differential Diagnosis, Treatment, Complications, Homoeopathy
Appendicitis Quick Reference Page 2

You can long-press (on mobile) or right-click (on desktop) each image and select "Save image" to download them directly to your device. 📱💾

Image also not loading, so give it in writing words

Here is the complete two-page quick reference card in plain text — copy it, screenshot it, or save it however you like!

📄 PAGE 1


APPENDICITIS — QUICK REFERENCE CARD

3rd BHMS | Page 1 of 2 Definition | Anatomy | Aetiology | Pathophysiology | Clinical Features

🔷 DEFINITION

Acute inflammation of the vermiform appendix. Most common cause of ACUTE ABDOMEN in young adults. Most frequently performed urgent abdominal operation worldwide.

🔷 ANATOMY — KEY FACTS

FeatureDetail
Length6–9 cm (average)
Base locationMcBurney's point — 1/3 from ASIS to umbilicus
LandmarkThree taeniae coli of caecum converge at base
Wall layersMucosa → Submucosa → Muscle → Serosa
Lymphoid tissueMaximum between ages 12–20 (submucosal)
Blood supplyAppendicular artery — END-ARTERY (thrombosis = gangrene)
Nerve supplyT10 → periumbilical visceral pain initially
Position of Tip (Variable):
  • 🔵 Retrocaecal — 65% (most common)
  • 🟠 Pelvic/descending — 30%
  • ⚫ Subcaecal, Preileal, Postileal — rare

🔷 AETIOLOGY — CAUSES OF OBSTRUCTION

  1. Faecolith / appendicolith (most common)
  2. Lymphoid hyperplasia (post-viral, children)
  3. Parasites — Ascaris lumbricoides, Enterobius (pinworm)
  4. Vegetable / fruit seeds or foreign body
  5. Neoplasm (carcinoid tumour, mucocoele)
  6. Stricture / fibrosis
Bacteriology (polymicrobial): E. coli • Bacteroides fragilis • Enterococcus • Pseudomonas aeruginosa • Klebsiella

🔷 PATHOPHYSIOLOGY — STEP BY STEP

StepEventResult
1Obstruction↑ intraluminal pressure (mucus + gas)
2Venous occlusionMucosal oedema and ischaemia
3Arterial blockFull-thickness ischaemia / necrosis
4Bacterial invasionSuppurative (pus-filled) appendicitis
5GangreneGreen-black discolouration of wall
6Perforation→ Abscess (localised) OR Peritonitis (free)
Pathological Stages: CatarrhalSuppurativeGangrenousPerforated

🔷 CLINICAL FEATURES

⭐ Classic Pain Sequence (present in ~50% of cases)

  • Stage 1 — Visceral (periumbilical): Dull, colicky pain around the umbilicus (T10 dermatome). Lasts 4–6 hours. Associated with anorexia, nausea, 1–2 vomits.
  • Stage 2 — Somatic (RIF): Pain SHIFTS to right iliac fossa as parietal peritoneum gets irritated. Constant, severe, worse on movement or coughing.
  • 🔴 KEY: Pain ALWAYS comes before vomiting. If vomiting first → think gastroenteritis!

Symptoms:

  • Periumbilical → RIF pain shift
  • Anorexia (constant and most reliable feature)
  • Nausea + 1–2 episodes of vomiting
  • Low-grade fever 37.5–38.5°C
  • Constipation or mild diarrhoea
  • Dysuria (when appendix lies near ureter/bladder)

Signs on Examination:

SignDescription
McBurney's tendernessMax tenderness at 1/3 ASIS→umbilicus
Rebound (Blumberg's)Release of pressure causes more pain than application
Rovsing's signPressure in LIF causes pain in RIF
Psoas signPain on extension of right hip — retrocaecal appendix
Obturator signPain on internal rotation of flexed right hip — pelvic appendix
PR (rectal) tendernessMay be the ONLY sign in pelvic appendix
Guarding + rigidityIn the right iliac fossa
Cope's signHyperaesthesia of RIF skin


📄 PAGE 2


APPENDICITIS — QUICK REFERENCE CARD

3rd BHMS | Page 2 of 2 Investigations | Diagnosis | Treatment | Complications | Homoeopathy

🔷 INVESTIGATIONS

Blood Tests:

TestFinding / Significance
CBCLeucocytosis >10,000 + neutrophilia (shift to left)
CRP>8 mg/L; Low CRP + low WBC argues AGAINST appendicitis
β-hCGMandatory in all females (exclude ectopic pregnancy)
UrinalysisExclude UTI / renal colic; sterile pyuria possible

Imaging:

ModalityDetail
USG abdomen1st line (esp. children, women). Non-compressible appendix >6 mm = positive
CT (CECT)Most accurate. Gold standard for adult/equivocal cases
MRIPreferred in pregnancy (no radiation risk)
X-ray abdomenFaecolith (10%), free gas under diaphragm (perforation)

🔷 ALVARADO SCORE (MANTRELS)

LetterFeatureScore
MMigration of pain to RIF1
AAnorexia1
NNausea / Vomiting1
TTenderness in RIF2
RRebound tenderness1
EElevated temperature1
LLeucocytosis2
SShift to left (neutrophilia)1
TOTAL10
🔴 Score ≥7 = Likely appendicitis → surgery 🟠 Score 5–6 = Equivocal → further investigation 🟢 Score ≤4 = Unlikely appendicitis

🔷 DIFFERENTIAL DIAGNOSIS

  1. Mesenteric adenitis — post-viral; no guarding; lymph nodes on USG
  2. Acute gastroenteritis — vomiting BEFORE pain; diarrhoea; diffuse tenderness
  3. Ectopic pregnancy — +ve β-hCG; haemodynamic instability; USG
  4. Ovarian cyst / torsion — female; USG confirms; pelvic pain
  5. Meckel's diverticulitis — clinically identical; only diagnosed at surgery
  6. Renal / ureteric colic — haematuria; colicky; radiates to groin; no guarding
  7. PID — female; bilateral adnexal tenderness; cervical excitation; vaginal discharge
  8. Crohn's disease — chronic history; terminal ileal involvement on CT

🔷 TREATMENT / MANAGEMENT

Pre-operative:

  • Nil by mouth (NBM)
  • IV fluid resuscitation + electrolyte correction
  • IV antibiotics: Cefuroxime + Metronidazole OR Piperacillin-tazobactam
  • Analgesia — safe, does NOT mask clinical signs
  • β-hCG if female of reproductive age

Appendicectomy (Definitive Surgery):

ApproachDetail
Open — Gridiron incisionMcBurney's point; muscle-splitting; perpendicular to ASIS–umbilicus line
Open — Lanz incisionTransverse; cosmetically preferred
Laparoscopic (preferred)3 ports; faster recovery; less pain; better for women (also diagnostic)
TechniqueLigate mesoappendix → ligate base with absorbable suture → divide

Oschner-Sherren Regimen (for Appendix Mass / Phlegmon):

  • NBM + NG tube
  • IV fluids + electrolytes
  • IV antibiotics (broad-spectrum)
  • Mark mass boundary on skin with marker
  • Monitor vitals 4-hourly; pulse, temp, mass size
  • Operate immediately if patient deteriorates
  • Interval appendicectomy after 6–8 weeks of resolution
  • (Colonoscopy in patients >40 years to exclude malignancy)

Appendix Abscess:

  • CT/USG-guided percutaneous drainage
  • IV antibiotics for 4–7 days
  • Interval appendicectomy after 6–8 weeks

🔷 COMPLICATIONS

Pre-operative:

  • Perforation → generalised peritonitis
  • Periappendiceal abscess
  • Appendix mass (phlegmon)
  • Portal pyaemia / pylephlebitis (rare)

Post-operative:

  • Wound infection (most common)
  • Intraabdominal / pelvic abscess
  • Paralytic ileus
  • Faecal fistula
  • Stump appendicitis
  • Small bowel obstruction from adhesions (long-term)

🔷 HOMOEOPATHIC REMEDIES

RemedyKey Indication
Bryonia albaStitching, sharp pain WORSE ANY motion; patient lies absolutely still
BelladonnaSudden, throbbing, violent pain; hot red tender abdomen; hypersensitive
Iris tenax⭐ SPECIFIC for appendicitis; RIF colic; pain relieved by bending forward
ColocynthisCramp-like, cramping pain; doubles up for relief; better pressure
LachesisLeft-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.

⭐ MUST KNOW FOR EXAM

PointWhat to remember
Pain sequencePain → Vomiting (NEVER vomiting first)
McBurney's point1/3 from ASIS to umbilicus
Key signsRovsing's, Psoas, Obturator, Blumberg's, PR tenderness
Alvarado score≥7 = surgery; total = 10
End-arteryAppendicular artery → thrombosis = gangrene
BHMS remedyIris tenax = specific for appendicitis
Appendix massOschner-Sherren regimen
Interval surgery6–8 weeks after resolution
Most common positionRetrocaecal (65%)
Most common post-op complicationWound infection

Sources: Bailey & Love's Surgery 28e • Sabiston Textbook of Surgery • Schwartz's Principles of Surgery 11e

Make it shorter of one page , must include imp things, in easy way , like definition, etiology, investigation, symptom, diagnosis, treatment, homeopathic medicine

📋 APPENDICITIS — ONE PAGE QUICK REFERENCE

3rd BHMS Exam Revision


1. DEFINITION

Acute inflammation of the vermiform appendix. Most common cause of acute abdomen in young adults (peak age: teens–20s).

2. ETIOLOGY (Causes)

Main cause → Luminal obstruction leading to bacterial infection
  • Faecolith/appendicolith (most common)
  • Lymphoid hyperplasia (children, post-viral)
  • Parasites (Ascaris, Pinworm)
  • Neoplasm, foreign body, stricture

3. SYMPTOMS

🔴 Classic sequence (remember this!):
Periumbilical pain → Nausea/Vomiting → Pain shifts to RIF ⚠️ Pain ALWAYS before vomiting
  • Anorexia (constant feature)
  • Low-grade fever (37.5–38.5°C)
  • Nausea, 1–2 vomits
  • Constipation or mild diarrhoea

4. SIGNS (Examination)

SignMeaning
McBurney's tenderness1/3 from ASIS to umbilicus
Rebound (Blumberg's)Release pain > pressure pain
Rovsing's signLIF pressure → RIF pain
Psoas signRetrocaecal appendix
Obturator signPelvic appendix

5. INVESTIGATIONS

Blood: WBC >10,000 + neutrophilia | CRP raised | β-hCG (females)
Imaging:
  • USG — 1st line, appendix >6 mm
  • CT scan — gold standard
  • MRI — pregnancy
Alvarado Score (MANTRELS) — ≥7 = Surgery needed M-igration of pain | A-norexia | N-ausea | T-enderness (2pts) | R-ebound | E-levated temp | L-eucocytosis (2pts) | S-hift left = Total 10

6. DIAGNOSIS

  • Clinical + Alvarado score
  • USG / CT confirmation
  • Exclude: Ectopic pregnancy, PID, renal colic, Meckel's diverticulitis, gastroenteritis

7. TREATMENT

Pre-op: NBM | IV fluids | IV antibiotics (Cefuroxime + Metronidazole) | Analgesia
Surgery — Appendicectomy:
  • Laparoscopic (preferred) — 3 ports, faster recovery
  • Open — Gridiron/Lanz incision at McBurney's point
Appendix Mass → Oschner-Sherren Regimen: NBM + IV antibiotics + monitor → interval appendicectomy at 6–8 weeks

8. HOMOEOPATHIC MEDICINES

MedicineKey Symptom
Iris tenaxSPECIFIC for appendicitis; RIF pain, relieved bending forward
Bryonia albaSharp pain, worse any movement, lies still
BelladonnaSudden, throbbing, hot tender abdomen
ColocynthisCramps, doubles up, better pressure
LachesisWorse touch and after sleep
⚠️ Appendicitis = Surgical Emergency. Homoeopathy only supportive in early stage. Always refer!

⭐ EXAM MUST-KNOWS

✔ Pain before vomiting | ✔ McBurney's point = 1/3 ASIS→umbilicus | ✔ Alvarado ≥7 = surgery | ✔ Appendicular artery = end-artery (thrombosis = gangrene) | ✔ Iris tenax = BHMS specific | ✔ Oschner-Sherren for appendix mass | ✔ Retrocaecal = most common position (65%)
This is a shared conversation. Sign in to Orris to start your own chat.