Give me a 15 minute microteaching on presentation to the topic is Hemorrhoids

Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
I now have rich, comprehensive content from Bailey and Love's Surgery. Let me compose the full 15-minute microteaching presentation.

πŸ₯ 15-Minute Microteaching: Hemorrhoids (Haemorrhoids)

Target Audience: Medical students / Junior doctors Duration: 15 minutes Source: Bailey and Love's Short Practice of Surgery, 28th Edition

⏱️ MINUTE 0-1: HOOK & OBJECTIVES

Opening (say this):
"About 75% of people will experience hemorrhoids at some point in their lives - yet it remains one of the most underdiagnosed and undertreated conditions. Today in 15 minutes you will be able to define hemorrhoids, classify them, describe their clinical features, and outline their management from conservative to surgical."
Learning Objectives (write on board):
  1. Define and classify hemorrhoids (internal vs. external; 4 degrees)
  2. Describe the pathophysiology
  3. Recognize clinical features and complications
  4. Outline management (conservative β†’ office-based β†’ surgical)

⏱️ MINUTE 1-3: DEFINITION & ANATOMY

What Are Hemorrhoids?

Hemorrhoids are symptomatic enlargements of the internal hemorrhoidal venous plexus (Greek: haima = blood, rhos = flowing; synonym: piles from Latin pila = a ball).

Normal Anatomy First

The anal cushions are normal submucosal vascular structures in the anal canal. They play an important physiological role - they seal the anal canal and contribute up to 15% of resting anal pressure.
  • Internal hemorrhoids arise from the internal hemorrhoidal plexus (above the dentate line)
  • External hemorrhoids arise from the external hemorrhoidal plexus (below the dentate line, deep in perianal skin)

Classic Positions

Internal hemorrhoids classically lie at the 3, 7, and 11 o'clock positions (patient in lithotomy position). Secondary hemorrhoids may develop between these primary positions.
⚠️ Teaching tip: Draw a clock face on the board. Mark 3, 7, 11. Relate to posterior midline, left lateral, and right anterior.

⏱️ MINUTE 3-5: PATHOPHYSIOLOGY

Why Do They Develop?

Four key contributing factors (remember: UPAV):
FactorMechanism
Upright postureGravity increases venous pressure
Portal venous system (no valves)No pressure relief mechanism
Abdominal pressure (raised)Straining, constipation, pregnancy
Venous plexus engorgementPooling β†’ varicosities

The Progressive Cascade

Straining / raised intra-abdominal pressure
         ↓
  Venous plexus engorgement
         ↓
  Shearing forces β†’ mucosal trauma β†’ BLEEDING
         ↓
  Caudal displacement of anal cushions β†’ PROLAPSE
         ↓
  Impaired venous drainage β†’ fluid transudation β†’ PRURITUS
         ↓
  Fragmentation of supporting structures (ageing)
         ↓
  Loss of elasticity β†’ cushions no longer retract

⏱️ MINUTE 5-7: CLASSIFICATION

Internal Hemorrhoids - 4 Degrees

DegreeFeaturesKey Point
1stBleed only, no prolapse"Bleed but stay in"
2ndProlapse but reduce spontaneously"Come out, go back on their own"
3rdProlapse, require manual reduction"Need to push back in"
4thPermanently prolapsed, irreducible"Always out"
πŸ’‘ Memory trick: "1-2-3-4 = Bleed-Spontaneous-Manual-Permanent"

External Hemorrhoids

  • Relate to the external hemorrhoidal plexus deep in the perianal skin
  • Frequently confused with anal skin tags (not true hemorrhoids)
  • Most important presentation: thrombosed external hemorrhoid (perianal hematoma) - sudden onset, olive-shaped, painful blue subcutaneous swelling at the anal margin

"Mixed" Hemorrhoids

  • Significant cutaneous component to the hemorrhoidal prolapse
  • External extensions of internal hemorrhoids from repeated congestion and oedema

⏱️ MINUTE 7-9: CLINICAL FEATURES

Symptoms (in order of progression)

  1. Bleeding - earliest symptom
    • Bright red, separate from the motion
    • Seen on paper on wiping, or a fresh "splash" in the pan
    • Usually painless
    • Rarely enough to cause anaemia
  2. Pruritus - from mucus discharge, skin irritation
  3. Prolapse - lump at the anal orifice
  4. Pain - NOT a typical feature of internal hemorrhoids
    ⚠️ RED FLAG: Pain should alert you to another diagnosis - think anal fissure, perianal abscess, or thrombosed external hemorrhoid

The Summary Box (put on board)

SymptomCharacteristic
BleedingBright red, painless, separate from stool
DischargeMucus - causes pruritus
LumpSoft, reducible (depends on degree)
PainABSENT in uncomplicated internal hemorrhoids

⏱️ MINUTE 9-10: COMPLICATIONS

Complications of Hemorrhoids

  1. Strangulation and thrombosis - circumferential prolapse with impending mucosal necrosis; severe discomfort
  2. Ulceration
  3. Gangrene
  4. Portal pyaemia (rare but serious - septic emboli to liver)
  5. Severe haemorrhage - usually associated with bleeding diathesis or anticoagulation

Thrombosed External Hemorrhoid

  • Presents within hours of straining, coughing, or lifting
  • If within 48 hours β†’ evacuate clot under local anaesthesia
  • If later β†’ conservative management (resolves in 3-4 days)

⏱️ MINUTE 10-13: MANAGEMENT

Step 1 - First Priority: EXCLUDE OTHER CAUSES

Always rule out colorectal malignancy first before attributing rectal bleeding to hemorrhoids.

Conservative (ALL degrees - first line)

  • Dietary advice: high-fibre diet, adequate fluid intake
  • Improve bowel and defecatory habits
  • Stool softeners and bulking agents
  • Proprietary creams and suppositories
  • Phlebotonics (plant-based flavonoid extracts) - reduce capillary permeability, increase lymphatic drainage

Office-Based Procedures (1st & 2nd degree, failed conservative)

ProcedureMechanismNotes
Injection sclerotherapy5% phenol in arachis/almond oil β†’ submucosal fibrosisInject at apex of pedicle (3-5 mL), NOT into hemorrhoid itself. Pain = wrong position
Rubber band ligation (Barron's)Elastic bands cause ischaemic necrosis β†’ sloughing in 10 daysBand must be above dentate line - below causes intense pain
Infrared photocoagulationCoagulates tissueLess commonly used
CryotherapyTissue destruction by freezingNot commonly used
πŸ’‘ Rubber band ligation has largely superseded injection sclerotherapy due to risk of prostatitis/pelvic sepsis with deep injection.

Surgical (3rd, 4th degree; failed office procedures; mixed; bleeding causing anaemia)

Haemorrhoidectomy - open (Milligan-Morgan) or closed (Ferguson) technique
Newer techniques:
  • Haemorrhoidal artery ligation (HAL) - Doppler-guided ligation of feeding arteries
  • Stapled haemorrhoidopexy (PPH - Procedure for Prolapse and Haemorrhoids) - circular stapler repositions prolapsed mucosa; less pain but higher recurrence

Management Algorithm (draw on board)

ALL PATIENTS β†’ Exclude malignancy β†’ Conservative measures
                    ↓ (if fails)
              Grade 1 & 2 β†’ Sclerotherapy / Rubber band ligation
                    ↓ (if fails or Grade 3/4)
              Haemorrhoidectomy / HAL / Stapled haemorrhoidopexy

⏱️ MINUTE 13-14: DIFFERENTIAL DIAGNOSIS

Don't miss these mimics or co-existing conditions:
ConditionDistinguishing Feature
Anal fissurePain (severe, tearing), especially with defecation; fissure visible at 6 or 12 o'clock
Colorectal cancerChange in bowel habit, weight loss, dark blood mixed with stool
Rectal prolapseFull-thickness prolapse, concentric rings
Anal skin tagsNot true hemorrhoids; no vascular component
Perianal abscessThrobbing pain, fever, induration
Inflammatory bowel diseaseMucus, altered bowel habit, systemic features

⏱️ MINUTE 14-15: SUMMARY & MCQ QUIZ

The "Piles" Summary

  • Definition: Symptomatic enlargement of anal cushions
  • Positions: 3, 7, 11 o'clock (lithotomy)
  • Types: Internal (above dentate line) vs. External (below)
  • 4 Degrees: Bleed β†’ Spontaneous reduction β†’ Manual reduction β†’ Permanent prolapse
  • Key symptom: Bright red, painless, per-rectal bleeding
  • Key ABSENT symptom: Pain (flag another diagnosis)
  • Treatment ladder: Conservative β†’ Office procedures β†’ Surgery

🎯 Quick Quiz (Audience Participation)

Q1: A 45-year-old man presents with painless bright red bleeding on the toilet paper. On examination, a prolapse is seen that reduces spontaneously. What degree of hemorrhoid is this?
A: Second degree
Q2: You perform rubber band ligation. The patient screams with pain. What did you do wrong?
A: Placed the band BELOW the dentate line (must be above)
Q3: A 32-year-old woman presents 24 hours after sudden onset severe perianal pain after lifting a heavy box. You see a tense, blue, olive-shaped swelling at the anal margin. Diagnosis and management?
A: Thrombosed external hemorrhoid (perianal hematoma). Within 48 hours β†’ evacuate clot under local anaesthesia
Q4: What is the FIRST priority before treating hemorrhoids?
A: Exclude colorectal malignancy

πŸ“š Take-Home Points

  1. Hemorrhoids are symptomatic, NOT normal - the anatomy becomes pathological when enlarged and symptomatic
  2. Pain is NOT a feature of uncomplicated internal hemorrhoids - always investigate pain
  3. Always exclude colorectal cancer before labelling rectal bleeding as hemorrhoidal
  4. Management is graded: Conservative β†’ Office procedures β†’ Surgery
  5. Band ligation must be above the dentate line - below this line = somatic pain

Source: Bailey and Love's Short Practice of Surgery, 28th Edition, Chapter 80 (Colorectal Surgery)

Create a PowerPoint presentation of this microteaching

Reading File
Reading File
Reading File
Running Command

mkdir -p /tmp/workspace/hemorrhoids-pptx && ls /tmp/workspace/

Writing File

~/hemorrhoids-pptx/build_pptx.py

from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.enum.shapes import MSO_SHAPE
from io import BytesIO

# ── Colour palette ──────────────────────────────────────────────────────────
DARK_BLUE   = RGBColor(0x1A, 0x3A, 0x5C)   # navy
MID_BLUE    = RGBColor(0x25, 0x6D, 0xA8)   # primary blue
LIGHT_BLUE  = RGBColor(0xD6, 0xE8, 0xF7)   # pale blue bg
ACCENT_RED  = RGBColor(0xC0, 0x39, 0x2B)   # alert / red
ACCENT_GREEN= RGBColor(0x1E, 0x8B, 0x4C)   # green
GOLD        = RGBColor(0xF3, 0x9C, 0x12)   # gold / highlight
WHITE       = RGBColor(0xFF, 0xFF, 0xFF)
DARK_GREY   = RGBColor(0x2C, 0x3E, 0x50)
LIGHT_GREY  = RGBColor(0xEC, 0xF0, 0xF1)

prs = Presentation()
prs.slide_width  = Inches(13.333)
prs.slide_height = Inches(7.5)

BLANK = prs.slide_layouts[6]

# ─────────────────────────────────────────────────────────────────────────────
# Helper utilities
# ─────────────────────────────────────────────────────────────────────────────

def bg(slide, color):
    """Fill slide background with a solid colour."""
    bg_shape = slide.shapes.add_shape(MSO_SHAPE.RECTANGLE,
                                      0, 0,
                                      prs.slide_width, prs.slide_height)
    bg_shape.fill.solid()
    bg_shape.fill.fore_color.rgb = color
    bg_shape.line.fill.background()
    bg_shape.shadow.inherit = False
    return bg_shape


def rect(slide, x, y, w, h, fill_color, line_color=None, line_pt=0):
    shp = slide.shapes.add_shape(MSO_SHAPE.RECTANGLE,
                                 Inches(x), Inches(y), Inches(w), Inches(h))
    shp.fill.solid()
    shp.fill.fore_color.rgb = fill_color
    if line_color:
        shp.line.color.rgb = line_color
        shp.line.width = Pt(line_pt)
    else:
        shp.line.fill.background()
    shp.shadow.inherit = False
    return shp


def rounded_rect(slide, x, y, w, h, fill_color, line_color=None, line_pt=1):
    shp = slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,
                                 Inches(x), Inches(y), Inches(w), Inches(h))
    shp.fill.solid()
    shp.fill.fore_color.rgb = fill_color
    if line_color:
        shp.line.color.rgb = line_color
        shp.line.width = Pt(line_pt)
    else:
        shp.line.fill.background()
    shp.shadow.inherit = False
    return shp


def textbox(slide, x, y, w, h, text, font_size, color=DARK_GREY,
            bold=False, italic=False, align=PP_ALIGN.LEFT,
            v_anchor=MSO_ANCHOR.TOP, wrap=True,
            font_name="Calibri", margin_lr=0.05, margin_tb=0.05):
    tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
    tf = tb.text_frame
    tf.word_wrap = wrap
    tf.vertical_anchor = v_anchor
    tf.margin_left  = Inches(margin_lr)
    tf.margin_right = Inches(margin_lr)
    tf.margin_top   = Inches(margin_tb)
    tf.margin_bottom= Inches(margin_tb)
    p = tf.paragraphs[0]
    p.alignment = align
    run = p.add_run()
    run.text = text
    run.font.name  = font_name
    run.font.size  = Pt(font_size)
    run.font.bold  = bold
    run.font.italic = italic
    run.font.color.rgb = color
    return tb, tf


def add_para(tf, text, font_size, color=DARK_GREY, bold=False, italic=False,
             align=PP_ALIGN.LEFT, level=0, font_name="Calibri"):
    p = tf.add_paragraph()
    p.alignment = align
    p.level = level
    run = p.add_run()
    run.text = text
    run.font.name  = font_name
    run.font.size  = Pt(font_size)
    run.font.bold  = bold
    run.font.italic = italic
    run.font.color.rgb = color
    return p


def header_bar(slide, title, subtitle=None):
    """Dark blue top bar with title and optional subtitle."""
    rect(slide, 0, 0, 13.333, 1.15, DARK_BLUE)
    rect(slide, 0, 1.15, 13.333, 0.08, GOLD)
    tb, tf = textbox(slide, 0.35, 0.1, 12.6, 0.75,
                     title, 28, WHITE, bold=True,
                     align=PP_ALIGN.LEFT,
                     v_anchor=MSO_ANCHOR.MIDDLE,
                     margin_lr=0.1, margin_tb=0.05)
    if subtitle:
        textbox(slide, 0.35, 0.75, 12.6, 0.38,
                subtitle, 14, LIGHT_BLUE, italic=True,
                align=PP_ALIGN.LEFT, margin_lr=0.1, margin_tb=0)


def footer(slide, text="Bailey & Love's Short Practice of Surgery, 28th Ed."):
    rect(slide, 0, 7.2, 13.333, 0.3, DARK_BLUE)
    textbox(slide, 0.3, 7.2, 13.0, 0.3, text,
            9, LIGHT_BLUE, align=PP_ALIGN.LEFT,
            v_anchor=MSO_ANCHOR.MIDDLE, margin_lr=0.1, margin_tb=0)


def pill(slide, x, y, w, h, fill, text, text_size=13, text_color=WHITE,
         bold=True):
    shp = slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,
                                 Inches(x), Inches(y), Inches(w), Inches(h))
    shp.fill.solid()
    shp.fill.fore_color.rgb = fill
    shp.line.fill.background()
    shp.shadow.inherit = False
    tf = shp.text_frame
    tf.word_wrap = True
    tf.vertical_anchor = MSO_ANCHOR.MIDDLE
    tf.margin_left = tf.margin_right = Inches(0.08)
    tf.margin_top = tf.margin_bottom = Inches(0.02)
    p = tf.paragraphs[0]
    p.alignment = PP_ALIGN.CENTER
    run = p.add_run()
    run.text = text
    run.font.name = "Calibri"
    run.font.size = Pt(text_size)
    run.font.bold = bold
    run.font.color.rgb = text_color
    return shp


def table_slide(slide, headers, rows, x, y, col_widths, row_h=0.45,
                hdr_fill=MID_BLUE, hdr_text=WHITE,
                alt_fill=LIGHT_BLUE, base_fill=WHITE,
                font_size=13):
    """Draw a manual table using rectangles + textboxes."""
    n_cols = len(headers)
    # header row
    cx = x
    for i, (hdr, cw) in enumerate(zip(headers, col_widths)):
        r = rect(slide, cx, y, cw - 0.02, row_h, hdr_fill)
        tb = slide.shapes.add_textbox(Inches(cx+0.05), Inches(y+0.04),
                                      Inches(cw-0.12), Inches(row_h-0.06))
        tf = tb.text_frame
        tf.word_wrap = True
        tf.vertical_anchor = MSO_ANCHOR.MIDDLE
        tf.margin_left = tf.margin_right = Inches(0.05)
        tf.margin_top = tf.margin_bottom = Inches(0.02)
        p = tf.paragraphs[0]
        p.alignment = PP_ALIGN.CENTER
        run = p.add_run()
        run.text = hdr
        run.font.name = "Calibri"
        run.font.size = Pt(font_size)
        run.font.bold = True
        run.font.color.rgb = hdr_text
        cx += cw
    # data rows
    for ri, row in enumerate(rows):
        ry = y + row_h * (ri + 1)
        fill = alt_fill if ri % 2 == 0 else base_fill
        cx = x
        for ci, (cell, cw) in enumerate(zip(row, col_widths)):
            rect(slide, cx, ry, cw - 0.02, row_h, fill)
            tb = slide.shapes.add_textbox(Inches(cx+0.05), Inches(ry+0.04),
                                          Inches(cw-0.12), Inches(row_h-0.06))
            tf = tb.text_frame
            tf.word_wrap = True
            tf.vertical_anchor = MSO_ANCHOR.MIDDLE
            tf.margin_left = tf.margin_right = Inches(0.05)
            tf.margin_top = tf.margin_bottom = Inches(0.02)
            p = tf.paragraphs[0]
            p.alignment = PP_ALIGN.LEFT
            run = p.add_run()
            run.text = cell
            run.font.name = "Calibri"
            run.font.size = Pt(font_size - 1)
            run.font.bold = False
            run.font.color.rgb = DARK_GREY
            cx += cw


# =============================================================================
# SLIDE 1  –  Title Slide
# =============================================================================
slide = prs.slides.add_slide(BLANK)
bg(slide, DARK_BLUE)
# gold accent stripe
rect(slide, 0, 2.8, 13.333, 0.12, GOLD)
# main title
textbox(slide, 1.0, 1.0, 11.333, 1.6,
        "HEMORRHOIDS", 72, WHITE, bold=True,
        align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE,
        font_name="Calibri Light")
# subtitle box
rounded_rect(slide, 3.5, 3.1, 6.3, 0.65, MID_BLUE)
textbox(slide, 3.5, 3.1, 6.3, 0.65,
        "A 15-Minute Microteaching", 20, WHITE, bold=False, italic=True,
        align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
# details
textbox(slide, 1.0, 4.0, 11.333, 0.45,
        "Bailey & Love's Short Practice of Surgery, 28th Edition",
        16, LIGHT_BLUE, italic=True, align=PP_ALIGN.CENTER)
textbox(slide, 1.0, 4.55, 11.333, 0.45,
        "Colorectal Surgery  |  Chapter 80",
        14, GOLD, bold=False, align=PP_ALIGN.CENTER)
# speaker label
textbox(slide, 1.0, 5.4, 11.333, 0.4,
        "Orris Medical Education", 13, LIGHT_BLUE, align=PP_ALIGN.CENTER)


# =============================================================================
# SLIDE 2  –  Learning Objectives
# =============================================================================
slide = prs.slides.add_slide(BLANK)
bg(slide, WHITE)
rect(slide, 0, 0, 0.18, 7.5, MID_BLUE)
header_bar(slide, "Learning Objectives", "By the end of this session, you will be able to:")
footer(slide)

objs = [
    ("1", "Define hemorrhoids and explain their anatomical basis"),
    ("2", "Classify hemorrhoids (Internal vs. External; 4 degrees)"),
    ("3", "Describe the pathophysiology"),
    ("4", "Recognize clinical features and complications"),
    ("5", "Outline management from conservative to surgical"),
]
for i, (num, text) in enumerate(objs):
    yy = 1.45 + i * 0.96
    pill(slide, 0.5, yy, 0.55, 0.65, MID_BLUE, num, 22, WHITE, True)
    rounded_rect(slide, 1.25, yy, 11.4, 0.65, LIGHT_BLUE)
    textbox(slide, 1.4, yy, 11.1, 0.65, text, 17, DARK_GREY,
            bold=False, align=PP_ALIGN.LEFT,
            v_anchor=MSO_ANCHOR.MIDDLE)


# =============================================================================
# SLIDE 3  –  Definition & Anatomy
# =============================================================================
slide = prs.slides.add_slide(BLANK)
bg(slide, WHITE)
rect(slide, 0, 0, 0.18, 7.5, MID_BLUE)
header_bar(slide, "Definition & Anatomy")
footer(slide)

# Definition box
rounded_rect(slide, 0.4, 1.35, 12.5, 0.82, LIGHT_BLUE, MID_BLUE, 1.5)
textbox(slide, 0.55, 1.35, 12.2, 0.82,
        "Haemorrhoids are symptomatic enlargements of the internal haemorrhoidal "
        "venous plexus (Greek: haima = blood, rhos = flowing; synonym: PILES)",
        15, DARK_GREY, italic=True, v_anchor=MSO_ANCHOR.MIDDLE, wrap=True)

# two columns
# Left: Internal
rounded_rect(slide, 0.4, 2.35, 5.9, 4.35, LIGHT_BLUE)
pill(slide, 0.5, 2.35, 5.7, 0.48, MID_BLUE, "INTERNAL HAEMORRHOIDS", 14)
bullets_int = [
    "Arise from internal haemorrhoidal plexus",
    "Located ABOVE the dentate line",
    "Classically: 3, 7 & 11 o'clock positions (lithotomy)",
    "Covered by mucosa (visceral innervation) β†’ PAINLESS",
    "Secondary haemorrhoids between primary positions",
]
tb, tf = textbox(slide, 0.55, 2.95, 5.6, 3.65, bullets_int[0],
                 14, DARK_GREY, wrap=True)
for b in bullets_int[1:]:
    add_para(tf, b, 14, DARK_GREY)

# Right: External
rounded_rect(slide, 6.65, 2.35, 6.2, 4.35, LIGHT_BLUE)
pill(slide, 6.75, 2.35, 6.0, 0.48, ACCENT_RED, "EXTERNAL HAEMORRHOIDS", 14)
bullets_ext = [
    "Arise from external haemorrhoidal plexus",
    "Located BELOW the dentate line",
    "Deep in perianal skin around anal verge",
    "Covered by skin (somatic innervation) β†’ PAINFUL",
    "Often confused with anal skin tags (not true haemorrhoids)",
]
tb, tf = textbox(slide, 6.8, 2.95, 5.9, 3.65, bullets_ext[0],
                 14, DARK_GREY, wrap=True)
for b in bullets_ext[1:]:
    add_para(tf, b, 14, DARK_GREY)


# =============================================================================
# SLIDE 4  –  Pathophysiology
# =============================================================================
slide = prs.slides.add_slide(BLANK)
bg(slide, WHITE)
rect(slide, 0, 0, 0.18, 7.5, MID_BLUE)
header_bar(slide, "Pathophysiology", "Why do haemorrhoids develop?")
footer(slide)

# UPAV acronym boxes
factors = [
    (DARK_BLUE,   "U", "Upright Posture",        "Gravity increases venous pressure in lower rectum"),
    (MID_BLUE,    "P", "Portal Venous System",   "No valves β†’ no pressure relief mechanism"),
    (ACCENT_RED,  "A", "Abdominal Pressure ↑",   "Straining, constipation, pregnancy, obesity"),
    (ACCENT_GREEN,"V", "Venous Engorgement",      "Pooling of blood β†’ varicosities form"),
]
for i, (col, letter, title, desc) in enumerate(factors):
    xx = 0.4 + i * 3.22
    rounded_rect(slide, xx, 1.35, 3.05, 2.85, LIGHT_BLUE)
    pill(slide, xx + 0.1, 1.35, 0.7, 0.7, col, letter, 26, WHITE, True)
    textbox(slide, xx + 0.05, 2.15, 2.92, 0.5, title,
            14, col, bold=True, wrap=True)
    textbox(slide, xx + 0.05, 2.7, 2.92, 1.3, desc,
            12, DARK_GREY, wrap=True)

# Cascade flow
rect(slide, 0.4, 4.38, 12.5, 0.05, GOLD)
textbox(slide, 0.4, 4.47, 12.5, 0.35,
        "The Progressive Cascade:", 14, DARK_GREY, bold=True)

cascade = [
    ("Straining", MID_BLUE),
    ("Venous Engorgement", MID_BLUE),
    ("Mucosal Trauma", ACCENT_RED),
    ("Prolapse + Pruritus", ACCENT_RED),
    ("Loss of Elasticity", DARK_BLUE),
]
for i, (label, col) in enumerate(cascade):
    xx = 0.4 + i * 2.58
    pill(slide, xx, 4.9, 2.45, 0.58, col, label, 12, WHITE, True)
    if i < 4:
        textbox(slide, xx + 2.45, 5.05, 0.18, 0.3, "β†’", 16, GOLD, bold=True)


# =============================================================================
# SLIDE 5  –  Classification (4 Degrees)
# =============================================================================
slide = prs.slides.add_slide(BLANK)
bg(slide, WHITE)
rect(slide, 0, 0, 0.18, 7.5, MID_BLUE)
header_bar(slide, "Classification of Internal Haemorrhoids",
           "Four Degrees of Severity")
footer(slide)

degrees = [
    ("1st Degree", MID_BLUE, "Bleed Only\nNo Prolapse",
     "Earliest stage. Bright red painless rectal bleeding. "
     "Haemorrhoids remain within the anal canal."),
    ("2nd Degree", ACCENT_GREEN, "Prolapse\nSpontaneous Reduction",
     "Prolapse occurs during defecation but spontaneously returns to canal "
     "on completion."),
    ("3rd Degree", GOLD, "Prolapse\nManual Reduction",
     "Prolapse occurs and MUST be pushed back manually by the patient. "
     "Represents significant disease."),
    ("4th Degree", ACCENT_RED, "Permanently\nProlapsed",
     "Irreducible prolapse. May develop mixed haemorrhoids with external "
     "cutaneous component."),
]

for i, (deg, col, key, desc) in enumerate(degrees):
    xx = 0.38 + i * 3.23
    # card
    rounded_rect(slide, xx, 1.35, 3.08, 5.35, LIGHT_BLUE, col, 2)
    # degree pill
    pill(slide, xx + 0.08, 1.38, 2.9, 0.6, col, deg, 15, WHITE, True)
    # key phrase
    textbox(slide, xx + 0.1, 2.1, 2.88, 1.1, key,
            18, col, bold=True, align=PP_ALIGN.CENTER,
            v_anchor=MSO_ANCHOR.MIDDLE)
    # description
    textbox(slide, xx + 0.1, 3.3, 2.88, 2.8, desc,
            12.5, DARK_GREY, wrap=True)

# memory trick
rounded_rect(slide, 0.38, 6.75, 12.55, 0.35, DARK_BLUE)
textbox(slide, 0.5, 6.75, 12.3, 0.35,
        "Memory: 1=Bleed Only  |  2=Spontaneous  |  3=Manual  |  4=Permanent",
        13, GOLD, bold=True, align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)


# =============================================================================
# SLIDE 6  –  Clinical Features
# =============================================================================
slide = prs.slides.add_slide(BLANK)
bg(slide, WHITE)
rect(slide, 0, 0, 0.18, 7.5, MID_BLUE)
header_bar(slide, "Clinical Features", "Symptoms & Signs")
footer(slide)

# Left column: main symptoms
textbox(slide, 0.4, 1.35, 6.2, 0.4, "Key Symptoms",
        16, MID_BLUE, bold=True)

syms = [
    ("Bleeding", ACCENT_RED,
     "Bright red, painless, SEPARATE from stool. Seen on paper or 'splash' in pan. Rarely causes anaemia."),
    ("Pruritus", GOLD,
     "Mucus discharge causes perianal skin irritation and itching."),
    ("Prolapse", MID_BLUE,
     "Soft lump at anal orifice during defecation (degree-dependent)."),
    ("Discharge", ACCENT_GREEN,
     "Mucus discharge leading to soiling and discomfort."),
]
for i, (name, col, desc) in enumerate(syms):
    yy = 1.85 + i * 1.2
    pill(slide, 0.4, yy, 2.1, 0.45, col, name, 13, WHITE, True)
    textbox(slide, 2.6, yy, 4.1, 0.45, desc, 12, DARK_GREY, wrap=True)

# RED FLAG box
rounded_rect(slide, 0.4, 6.6, 6.2, 0.52, ACCENT_RED)
textbox(slide, 0.55, 6.6, 5.9, 0.52,
        "RED FLAG: Pain is NOT a feature of uncomplicated internal haemorrhoids! "
        "Pain β†’ think fissure, abscess, thrombosis.",
        12, WHITE, bold=True, v_anchor=MSO_ANCHOR.MIDDLE, wrap=True)

# Right column: table
table_slide(slide,
    ["Feature", "Characteristic"],
    [
        ["Onset",       "Gradual, chronic"],
        ["Blood colour","Bright red (not dark)"],
        ["Relation to stool","Separate from motion"],
        ["Pain",        "ABSENT in internal haemorrhoids"],
        ["Associated",  "Mucus, pruritus, prolapse"],
        ["Age",         "Any adult; peak 45-65 yrs"],
    ],
    x=6.75, y=1.35,
    col_widths=[2.6, 3.9],
    row_h=0.76,
    hdr_fill=DARK_BLUE, font_size=13)


# =============================================================================
# SLIDE 7  –  Complications
# =============================================================================
slide = prs.slides.add_slide(BLANK)
bg(slide, WHITE)
rect(slide, 0, 0, 0.18, 7.5, MID_BLUE)
header_bar(slide, "Complications of Haemorrhoids")
footer(slide)

comps = [
    ("Strangulation\n& Thrombosis", ACCENT_RED,
     "Circumferential prolapse. Severe discomfort. Impending mucosal necrosis. Urgent Hx or conservative Rx."),
    ("Ulceration", GOLD,
     "Mucosal ulceration from ischaemia or trauma. May cause persistent bleeding."),
    ("Gangrene", DARK_BLUE,
     "Progressive ischaemia leading to tissue necrosis. Requires urgent surgical intervention."),
    ("Portal Pyaemia", MID_BLUE,
     "Rare but life-threatening. Septic emboli via portal vein to liver. Give systemic antibiotics."),
    ("Haemorrhage", ACCENT_RED,
     "Severe bleeding; usually linked to bleeding diathesis or anticoagulation. May need transfusion or EUA."),
]

for i, (title, col, desc) in enumerate(comps):
    xx = 0.4 + (i % 3) * 4.28
    yy = 1.38 if i < 3 else 4.18
    rounded_rect(slide, xx, yy, 4.1, 2.55, LIGHT_BLUE, col, 2)
    textbox(slide, xx + 0.12, yy + 0.08, 3.86, 0.7,
            title, 15, col, bold=True, v_anchor=MSO_ANCHOR.MIDDLE)
    textbox(slide, xx + 0.12, yy + 0.85, 3.86, 1.55, desc,
            12, DARK_GREY, wrap=True)

# Thrombosed external haemorrhoid note
rounded_rect(slide, 0.4, 6.78, 12.5, 0.38, DARK_BLUE)
textbox(slide, 0.55, 6.78, 12.1, 0.38,
        "Thrombosed External Haemorrhoid (Perianal Haematoma): Sudden, olive-shaped, painful blue swelling at anal margin. "
        "If <48 hrs: evacuate clot under LA. If >48 hrs: conservative management.",
        11, WHITE, v_anchor=MSO_ANCHOR.MIDDLE, wrap=True)


# =============================================================================
# SLIDE 8  –  Management Overview
# =============================================================================
slide = prs.slides.add_slide(BLANK)
bg(slide, WHITE)
rect(slide, 0, 0, 0.18, 7.5, MID_BLUE)
header_bar(slide, "Management", "Step-Up Approach: Conservative β†’ Office β†’ Surgical")
footer(slide)

# Step 0: Exclude malignancy banner
rounded_rect(slide, 0.4, 1.38, 12.5, 0.52, ACCENT_RED)
textbox(slide, 0.6, 1.38, 12.1, 0.52,
        "FIRST PRIORITY: Exclude colorectal malignancy before attributing rectal bleeding to haemorrhoids",
        16, WHITE, bold=True, align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)

steps = [
    ("STEP 1", MID_BLUE, "Conservative (All Grades)",
     [
         "High-fibre diet & adequate fluid intake",
         "Improve defecatory habits, avoid straining",
         "Stool softeners & bulking agents",
         "Topical creams / suppositories",
         "Phlebotonics (flavonoid extracts)",
     ]),
    ("STEP 2", ACCENT_GREEN, "Office-Based Procedures\n(Grades 1 & 2)",
     [
         "Injection sclerotherapy: 5% phenol in arachis oil",
         "Rubber band ligation (Barron's) β€” FIRST LINE",
         "Infrared photocoagulation",
         "Band must be ABOVE dentate line",
     ]),
    ("STEP 3", ACCENT_RED, "Surgical (Grades 3 & 4,\nFailed office Rx)",
     [
         "Haemorrhoidectomy (open or closed)",
         "Stapled haemorrhoidopexy (PPH)",
         "Haemorrhoidal artery ligation (HAL)",
         "Bleeding causing anaemia",
     ]),
]

for i, (step, col, title, bullets) in enumerate(steps):
    xx = 0.4 + i * 4.3
    rounded_rect(slide, xx, 2.1, 4.1, 4.6, LIGHT_BLUE, col, 2)
    pill(slide, xx + 0.1, 2.1, 3.88, 0.55, col, step, 15, WHITE, True)
    textbox(slide, xx + 0.12, 2.75, 3.84, 0.65, title,
            13, col, bold=True, wrap=True)
    tb, tf = textbox(slide, xx + 0.12, 3.5, 3.84, 3.0,
                     bullets[0], 12, DARK_GREY, wrap=True)
    for b in bullets[1:]:
        add_para(tf, b, 12, DARK_GREY)


# =============================================================================
# SLIDE 9  –  Surgical Details
# =============================================================================
slide = prs.slides.add_slide(BLANK)
bg(slide, WHITE)
rect(slide, 0, 0, 0.18, 7.5, MID_BLUE)
header_bar(slide, "Surgical Options in Detail",
           "Indications and Techniques")
footer(slide)

# Indications
rounded_rect(slide, 0.4, 1.38, 5.9, 3.5, LIGHT_BLUE, MID_BLUE, 1.5)
textbox(slide, 0.55, 1.38, 5.6, 0.45,
        "Indications for Haemorrhoidectomy", 14, MID_BLUE, bold=True)
ind = [
    "3rd and 4th degree haemorrhoids",
    "2nd degree failed non-operative treatment",
    "Mixed haemorrhoids with well-defined external component",
    "Bleeding causing anaemia",
    "Uncertainty about diagnosis β†’ EUA Β± endoscopy",
]
tb, tf = textbox(slide, 0.55, 1.88, 5.6, 2.85, ind[0], 13, DARK_GREY, wrap=True)
for item in ind[1:]:
    add_para(tf, item, 13, DARK_GREY)

# Techniques table
table_slide(slide,
    ["Technique", "Principle", "Key Points"],
    [
        ["Open (Milligan-Morgan)", "Excise haemorrhoidal tissue; wound left open", "Most common in UK"],
        ["Closed (Ferguson)", "Excise & close wound primarily", "Common in USA"],
        ["Stapled (PPH)", "Circular stapler repositions prolapsed mucosa", "Less pain; higher recurrence"],
        ["HAL (Haemorrhoidal\nArtery Ligation)", "Doppler-guided ligation of feeding arteries", "Minimal tissue excision"],
    ],
    x=6.6, y=1.38,
    col_widths=[3.0, 3.0, 2.8],
    row_h=0.82,
    font_size=12)

# Post-op care
rounded_rect(slide, 0.4, 5.05, 5.9, 1.72, LIGHT_BLUE, ACCENT_GREEN, 1.5)
textbox(slide, 0.55, 5.05, 5.6, 0.4,
        "Postoperative Care", 14, ACCENT_GREEN, bold=True)
postop = ("Warm baths x2 daily  |  Bulk laxatives  |  Adequate analgesia  |  "
          "Metronidazole 5 days (reduces pain)  |  Follow-up at 3-4 weeks  |  "
          "Beware: pain, retention, reactionary haemorrhage, anal stricture")
textbox(slide, 0.55, 5.5, 5.6, 1.2, postop, 12, DARK_GREY, wrap=True)


# =============================================================================
# SLIDE 10  –  Differential Diagnosis
# =============================================================================
slide = prs.slides.add_slide(BLANK)
bg(slide, WHITE)
rect(slide, 0, 0, 0.18, 7.5, MID_BLUE)
header_bar(slide, "Differential Diagnosis",
           "Conditions that mimic or coexist with haemorrhoids")
footer(slide)

table_slide(slide,
    ["Condition", "Key Distinguishing Feature", "Action"],
    [
        ["Anal Fissure",
         "Severe tearing pain during defecation; fissure at 6 or 12 o'clock",
         "Examination; GTN / botulinum / surgery"],
        ["Colorectal Cancer",
         "Change in bowel habit, weight loss, dark blood mixed with stool",
         "Urgent colonoscopy"],
        ["Rectal Prolapse",
         "Full-thickness prolapse; concentric mucosal rings",
         "Examine fully; surgical repair"],
        ["Anal Skin Tags",
         "Soft, fleshy; no vascular component; not true haemorrhoids",
         "Reassurance; excision if symptomatic"],
        ["Perianal Abscess",
         "Throbbing pain, fever, induration, erythema",
         "Urgent incision & drainage"],
        ["IBD",
         "Mucus, diarrhoea, altered bowel habit, systemic features",
         "Colonoscopy; gastroenterology referral"],
    ],
    x=0.38, y=1.38,
    col_widths=[2.6, 5.5, 4.8],
    row_h=0.72,
    font_size=12)


# =============================================================================
# SLIDE 11  –  Quiz Time
# =============================================================================
slide = prs.slides.add_slide(BLANK)
bg(slide, DARK_BLUE)
rect(slide, 0, 1.2, 13.333, 0.1, GOLD)
textbox(slide, 0.5, 0.15, 12.3, 0.95,
        "Quick Quiz", 40, WHITE, bold=True,
        align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
textbox(slide, 0.5, 0.9, 12.3, 0.35,
        "Test your understanding!", 16, GOLD,
        italic=True, align=PP_ALIGN.CENTER)
footer(slide, "Click to reveal answers")

qs = [
    ("Q1", "A patient has painless PR bleeding and prolapse that reduces spontaneously on its own. What degree?",
     "Answer: 2nd Degree", MID_BLUE),
    ("Q2", "You apply a rubber band and the patient screams in pain. What went wrong?",
     "Answer: Band placed BELOW dentate line (must be ABOVE)", ACCENT_RED),
    ("Q3", "A patient with a tense, blue, olive-shaped swelling at the anal margin β€” 36 hours after lifting a box. Dx?",
     "Answer: Thrombosed external haemorrhoid. Within 48 hrs: evacuate clot under LA.", ACCENT_GREEN),
    ("Q4", "What is the FIRST priority before treating haemorrhoids?",
     "Answer: Exclude colorectal malignancy", GOLD),
]

for i, (qnum, qtext, ans, col) in enumerate(qs):
    xx = 0.35 + (i % 2) * 6.55
    yy = 1.45 if i < 2 else 4.15
    rounded_rect(slide, xx, yy, 6.28, 2.5, RGBColor(0x1E, 0x4A, 0x7A), col, 2)
    pill(slide, xx + 0.1, yy + 0.08, 0.75, 0.48, col, qnum, 13, WHITE, True)
    textbox(slide, xx + 0.12, yy + 0.62, 6.0, 1.05, qtext,
            13, WHITE, wrap=True)
    rounded_rect(slide, xx + 0.12, yy + 1.72, 6.0, 0.58, col)
    textbox(slide, xx + 0.2, yy + 1.72, 5.84, 0.58,
            ans, 12, WHITE, bold=True, v_anchor=MSO_ANCHOR.MIDDLE, wrap=True)


# =============================================================================
# SLIDE 12  –  Summary & Take-Home Points
# =============================================================================
slide = prs.slides.add_slide(BLANK)
bg(slide, WHITE)
rect(slide, 0, 0, 0.18, 7.5, ACCENT_GREEN)
header_bar(slide, "Summary & Take-Home Points", "What you must remember")
footer(slide)

points = [
    (MID_BLUE,    "1",
     "Definition",
     "Haemorrhoids = symptomatic enlargements of anal cushions at 3, 7 & 11 o'clock"),
    (ACCENT_GREEN,"2",
     "Classification",
     "Internal (above dentate) vs External (below dentate). 4 Degrees: Bleed / Spontaneous / Manual / Permanent"),
    (GOLD,        "3",
     "Pathophysiology",
     "Upright posture + no portal valves + raised abdominal pressure β†’ venous engorgement β†’ bleeding + prolapse"),
    (ACCENT_RED,  "4",
     "Key Symptom",
     "Bright red, painless, separate-from-stool rectal bleeding. PAIN = another diagnosis"),
    (MID_BLUE,    "5",
     "Management Ladder",
     "Conservative β†’ Sclerotherapy / Band Ligation β†’ Haemorrhoidectomy / HAL / Stapled"),
    (DARK_BLUE,   "6",
     "First Priority",
     "Always EXCLUDE COLORECTAL MALIGNANCY before attributing rectal bleeding to haemorrhoids"),
]

for i, (col, num, title, desc) in enumerate(points):
    xx = 0.4 + (i % 2) * 6.4
    yy = 1.35 + (i // 2) * 1.82
    rounded_rect(slide, xx, yy, 6.15, 1.65, LIGHT_BLUE, col, 1.5)
    pill(slide, xx + 0.1, yy + 0.1, 0.58, 0.58, col, num, 18, WHITE, True)
    textbox(slide, xx + 0.82, yy + 0.12, 5.2, 0.42,
            title, 14, col, bold=True, v_anchor=MSO_ANCHOR.MIDDLE)
    textbox(slide, xx + 0.82, yy + 0.6, 5.2, 0.9,
            desc, 12, DARK_GREY, wrap=True)


# =============================================================================
# Save
# =============================================================================
out_path = "/tmp/workspace/hemorrhoids-pptx/Hemorrhoids_Microteaching.pptx"
prs.save(out_path)
print(f"Saved: {out_path}")
Running Command

cd /tmp/workspace/hemorrhoids-pptx && python build_pptx.py

Running Command

ls -lh /tmp/workspace/hemorrhoids-pptx/Hemorrhoids_Microteaching.pptx

Running Command

cd /tmp/workspace/hemorrhoids-pptx && python -c " from pptx import Presentation prs = Presentation('Hemorrhoids_Microteaching.pptx') print(f'Total slides: {len(prs.slides)}') for i, slide in enumerate(prs.slides, 1): texts = [s.text_frame.text.strip()[:60] for s in slide.shapes if s.has_text_frame and s.text_frame.text.strip()] print(f' Slide {i}: {texts[0] if texts else \"(no text)\"}') "

Your PowerPoint presentation is ready for download:

Hemorrhoids Microteaching

Presentation Β· PPTX


Here's what's inside the 12-slide deck:
SlideTitleContent
1Title SlideHemorrhoids - A 15-Minute Microteaching
2Learning Objectives5 numbered objectives with pill design
3Definition & AnatomyInternal vs. External comparison cards
4PathophysiologyUPAV acronym cards + progressive cascade flow
5Classification4-degree colour-coded cards with memory trick
6Clinical FeaturesSymptom pills + feature table + red flag banner
7Complications5 complication cards + thrombosed EH note
8Management3-step ladder (Conservative / Office / Surgical)
9Surgical OptionsIndications, techniques table, post-op care
10Differential Diagnosis6-row comparison table
11Quick Quiz4 interactive Q&A cards
12Summary6 take-home point cards
Design: 16:9 widescreen, navy/blue/gold colour scheme, professional medical education style throughout. All content sourced from Bailey and Love's Short Practice of Surgery, 28th Edition.
This is a shared conversation. Sign in to Orris to start your own chat.