Local anaesthesia ppt

Asking for Preferences
Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Running Command

mkdir -p /tmp/workspace/local-anaesthesia-ppt && ls /tmp/workspace/

Writing File

~/local-anaesthesia-ppt/build_ppt.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.util import Inches, Pt
from io import BytesIO

# ── Colour palette ────────────────────────────────────────────────────────────
C_DARK_BLUE   = RGBColor(0x0D, 0x2B, 0x5A)   # title background / headers
C_MID_BLUE    = RGBColor(0x1A, 0x54, 0x9A)   # accent bar
C_LIGHT_BLUE  = RGBColor(0xD6, 0xE8, 0xF7)   # body background
C_ACCENT      = RGBColor(0xF0, 0x7D, 0x00)   # orange accent
C_WHITE       = RGBColor(0xFF, 0xFF, 0xFF)
C_TEXT_DARK   = RGBColor(0x1A, 0x1A, 0x2E)
C_TEXT_LIGHT  = RGBColor(0xF0, 0xF4, 0xFF)
C_GREY_LINE   = RGBColor(0xCC, 0xCC, 0xCC)
C_BOX_BG      = RGBColor(0xE8, 0xF3, 0xFD)
C_BOX_BG2     = RGBColor(0xFF, 0xF3, 0xE0)   # warm box
C_RED_WARN    = RGBColor(0xCC, 0x00, 0x00)
C_GREEN       = RGBColor(0x1B, 0x7A, 0x3E)
C_YELLOW_BG   = RGBColor(0xFF, 0xF9, 0xC4)

W = Inches(13.333)
H = Inches(7.5)

prs = Presentation()
prs.slide_width  = W
prs.slide_height = H
blank = prs.slide_layouts[6]   # fully blank

# ── helpers ───────────────────────────────────────────────────────────────────

def add_rect(slide, x, y, w, h, fill_rgb=None, line_rgb=None, line_width_pt=0):
    from pptx.util import Pt as Pt2
    shape = slide.shapes.add_shape(1, x, y, w, h)   # MSO_SHAPE_TYPE.RECTANGLE = 1
    fill = shape.fill
    if fill_rgb:
        fill.solid()
        fill.fore_color.rgb = fill_rgb
    else:
        fill.background()
    line = shape.line
    if line_rgb:
        line.color.rgb = line_rgb
        line.width = Pt2(line_width_pt) if line_width_pt else Pt2(0.75)
    else:
        line.fill.background()
    return shape

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

def add_title_slide_bg(slide):
    add_rect(slide, 0, 0, W, H, fill_rgb=C_DARK_BLUE)

def add_content_bg(slide):
    add_rect(slide, 0, 0, W, H, fill_rgb=C_LIGHT_BLUE)

def add_header_bar(slide, title_text, subtitle_text=""):
    add_rect(slide, 0, 0, W, Inches(1.1), fill_rgb=C_DARK_BLUE)
    add_textbox(slide, Inches(0.3), Inches(0.12), Inches(12.5), Inches(0.7),
                title_text, font_size=26, bold=True, color=C_WHITE,
                v_anchor=MSO_ANCHOR.MIDDLE)
    if subtitle_text:
        add_textbox(slide, Inches(0.3), Inches(0.8), Inches(12.5), Inches(0.3),
                    subtitle_text, font_size=13, color=C_TEXT_LIGHT,
                    v_anchor=MSO_ANCHOR.MIDDLE)
    # accent line
    add_rect(slide, 0, Inches(1.1), W, Inches(0.06), fill_rgb=C_ACCENT)

def add_bullet_box(slide, x, y, w, h, items, title=None,
                   bg=C_BOX_BG, font_size=16, title_color=C_MID_BLUE,
                   bullet_color=C_TEXT_DARK):
    add_rect(slide, x, y, w, h, fill_rgb=bg, line_rgb=C_MID_BLUE, line_width_pt=1)
    tb = slide.shapes.add_textbox(x + Inches(0.15), y + Inches(0.1),
                                  w - Inches(0.25), h - Inches(0.15))
    tf = tb.text_frame
    tf.word_wrap = True
    tf.margin_left  = Inches(0.05)
    tf.margin_right = Inches(0.05)
    tf.margin_top   = Inches(0.04)
    start = True
    if title:
        p = tf.paragraphs[0] if start else tf.add_paragraph()
        start = False
        p.alignment = PP_ALIGN.LEFT
        r = p.add_run()
        r.text = title
        r.font.bold = True
        r.font.size = Pt(font_size + 1)
        r.font.color.rgb = title_color
        r.font.name = "Calibri"
    for item in items:
        p = tf.paragraphs[0] if (start and not title) else tf.add_paragraph()
        start = False
        p.alignment = PP_ALIGN.LEFT
        p.level = 0
        r = p.add_run()
        r.text = "• " + item
        r.font.size = Pt(font_size)
        r.font.color.rgb = bullet_color
        r.font.name = "Calibri"

def footer(slide, text="Local Anaesthesia | For Clinical Reference Only"):
    add_textbox(slide, Inches(0.3), Inches(7.15), Inches(12.7), Inches(0.3),
                text, font_size=9, color=C_GREY_LINE, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 1 – Title
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_rect(s, 0, 0, W, H, fill_rgb=C_DARK_BLUE)
add_rect(s, 0, Inches(2.9), W, Inches(2.5), fill_rgb=C_MID_BLUE)
add_rect(s, 0, Inches(5.35), W, Inches(0.06), fill_rgb=C_ACCENT)
add_textbox(s, Inches(1), Inches(1.0), Inches(11.3), Inches(1.2),
            "LOCAL ANAESTHESIA", font_size=52, bold=True, color=C_WHITE,
            align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox(s, Inches(1), Inches(2.2), Inches(11.3), Inches(0.6),
            "Pharmacology  •  Mechanisms  •  Clinical Techniques  •  Toxicity Management",
            font_size=18, color=C_TEXT_LIGHT, align=PP_ALIGN.CENTER)
add_textbox(s, Inches(1), Inches(3.1), Inches(11.3), Inches(1.8),
            "A Clinician's Reference Guide\nIntermediate Level  |  July 2026",
            font_size=22, color=C_WHITE, align=PP_ALIGN.CENTER,
            v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox(s, Inches(1), Inches(5.5), Inches(11.3), Inches(0.5),
            "Sources: Bailey & Love's Surgery 28e  •  Miller's Anesthesia 10e  •  Barash Clinical Anesthesia 9e  •  Sabiston Surgery",
            font_size=11, color=C_GREY_LINE, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 2 – Overview / Contents
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "Presentation Overview")
add_textbox(s, Inches(0.4), Inches(1.3), Inches(12.5), Inches(0.4),
            "This presentation covers local anaesthesia from basic science through to emergency management of complications.",
            font_size=15, color=C_TEXT_DARK)
cols = [
    ("1. Definition & History", ["First clinical use: cocaine 1884 (Koller)", "Synthetic agents from 1900s onward", "Now indispensable in every clinical setting"]),
    ("2. Classification", ["Amino-esters vs Amino-amides", "Key physicochemical properties", "Structural basis of activity"]),
    ("3. Mechanism of Action", ["Sodium channel blockade", "Charged vs uncharged form", "Differential nerve fibre block"]),
    ("4. Pharmacokinetics", ["Absorption, distribution", "Metabolism (liver/plasma)", "Factors influencing onset/duration"]),
]
for i, (ttl, pts) in enumerate(cols):
    x = Inches(0.25) + i * Inches(3.25)
    add_bullet_box(s, x, Inches(1.8), Inches(3.1), Inches(2.0), pts, title=ttl, font_size=13)
cols2 = [
    ("5. Drugs & Doses", ["Lidocaine, Bupivacaine, Ropivacaine", "Prilocaine, Levobupivacaine", "Max doses + adrenaline use"]),
    ("6. Techniques", ["Topical, infiltration", "Peripheral nerve blocks", "Neuraxial & fascial planes"]),
    ("7. Adjuvants", ["Adrenaline, clonidine", "Dexamethasone", "Sodium bicarbonate"]),
    ("8. Toxicity (LAST)", ["Early warning signs", "CNS & cardiac progression", "Lipid emulsion rescue"]),
]
for i, (ttl, pts) in enumerate(cols2):
    x = Inches(0.25) + i * Inches(3.25)
    add_bullet_box(s, x, Inches(4.0), Inches(3.1), Inches(2.2), pts, title=ttl, font_size=13)
footer(s)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 3 – Definition & Historical Background
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "Definition & Historical Context")
add_bullet_box(s, Inches(0.3), Inches(1.3), Inches(8.5), Inches(2.8),
    ["Local anaesthetics are drugs that reversibly block nerve impulse conduction when applied locally to nerve tissue",
     "Produce anaesthesia and analgesia without loss of consciousness",
     "Can be used as sole agents or as adjuncts to general anaesthesia",
     "Available for topical, infiltration, regional, and neuraxial use"],
    title="Definition", font_size=16)
add_bullet_box(s, Inches(0.3), Inches(4.3), Inches(8.5), Inches(2.8),
    ["1884 – Carl Koller uses cocaine for ophthalmic surgery (first clinical LA)",
     "1898 – Bier introduces spinal anaesthesia",
     "1905 – Einhorn synthesises procaine (Novocain) — first synthetic LA",
     "1943 – Löfgren synthesises lidocaine — still the gold standard",
     "1950s–1990s – Bupivacaine, ropivacaine, levobupivacaine developed",
     "2000s – Ultrasound guidance revolutionises regional anaesthesia"],
    title="Historical Milestones", font_size=15)
add_rect(s, Inches(9.1), Inches(1.3), Inches(3.9), Inches(5.8), fill_rgb=C_BOX_BG2, line_rgb=C_ACCENT, line_width_pt=1.5)
add_textbox(s, Inches(9.2), Inches(1.4), Inches(3.7), Inches(0.4),
            "Key Concept", font_size=14, bold=True, color=C_ACCENT)
add_textbox(s, Inches(9.2), Inches(1.8), Inches(3.7), Inches(5.0),
            "Local anaesthetics allow surgical, diagnostic, and therapeutic procedures with preserved consciousness and airway reflexes — a major safety advantage in high-risk patients (cardiorespiratory disease, obstetrics, day-case surgery).",
            font_size=14, color=C_TEXT_DARK, wrap=True)
footer(s)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 4 – Classification
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "Classification of Local Anaesthetics", "Amino-esters vs Amino-amides")
add_textbox(s, Inches(0.3), Inches(1.25), Inches(12.7), Inches(0.4),
            "All local anaesthetics share the same basic structure: aromatic ring (lipophilic) — intermediate chain — tertiary amine (hydrophilic). The intermediate chain defines the class.",
            font_size=14, color=C_TEXT_DARK)
add_bullet_box(s, Inches(0.3), Inches(1.8), Inches(6.2), Inches(5.3),
    ["Intermediate chain contains an ESTER linkage (–C–O–)",
     "Metabolised by plasma pseudocholinesterase",
     "Short duration; higher allergy potential (PABA metabolite)",
     "Cocaine — topical use in ENT (also a vasoconstrictor)",
     "Procaine — historical; rarely used clinically today",
     "Chloroprocaine — fast onset; obstetric epidural use",
     "Tetracaine — topical ophthalmology; spinal anaesthesia"],
    title="ESTERS", font_size=15, bg=RGBColor(0xFF,0xF0,0xE0), title_color=C_ACCENT)
add_bullet_box(s, Inches(6.8), Inches(1.8), Inches(6.2), Inches(5.3),
    ["Intermediate chain contains an AMIDE linkage (–NHC–)",
     "Metabolised by hepatic microsomal enzymes (CYP450)",
     "Longer duration; rare true allergy (no PABA metabolite)",
     "Lidocaine — most versatile; gold standard",
     "Bupivacaine — long-acting; high cardiotoxicity risk",
     "Ropivacaine — less cardiotoxic; better sensory/motor separation",
     "Prilocaine — least systemic toxicity; causes methaemoglobinaemia",
     "Levobupivacaine — L-isomer of bupivacaine; reduced cardiotoxicity"],
    title="AMIDES", font_size=15, bg=RGBColor(0xE0,0xF0,0xFF), title_color=C_MID_BLUE)
add_textbox(s, Inches(3.0), Inches(7.05), Inches(7.3), Inches(0.35),
            "Memory tip:  Amides have TWO letter 'i's in their name (lidoca-i-ne, bup-i-vaca-i-ne, rop-i-vaca-i-ne...)",
            font_size=12, color=C_MID_BLUE, bold=True, align=PP_ALIGN.CENTER)
footer(s)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 5 – Molecular Structure & Physicochemical Properties
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "Physicochemical Properties", "The key determinants of onset, potency, and duration")
props = [
    ("pKa", "Onset of action", "Agents closer to physiologic pH (7.4) have more uncharged (lipid-soluble) form → faster onset. Lidocaine pKa 7.9 = faster than bupivacaine pKa 8.1. All LAs are less effective in acidic (inflamed) tissue because more drug is ionised and cannot penetrate the nerve membrane."),
    ("Lipophilicity\n(Hydrophobicity)", "Potency", "More lipophilic agents partition more readily into nerve membranes. Higher lipid solubility = greater intrinsic potency. Bupivacaine and ropivacaine are highly lipophilic (potency ~4x lidocaine). Procaine is relatively hydrophilic (lower potency)."),
    ("Protein Binding", "Duration of action", "Highly protein-bound agents (bupivacaine 95%, ropivacaine 94%) dissociate slowly from tissue proteins and sodium channel receptors, producing longer duration blocks. Lidocaine is 65% protein bound → shorter duration."),
    ("Molecular Weight\n& Ionisation", "Spread & diffusion", "Degree of ionisation (cationic vs neutral form) determines membrane penetration. Uncharged base crosses lipid membranes; once inside the axoplasm, the charged cationic form enters and blocks the sodium channel (specific receptor theory)."),
]
for i, (prop, det, desc) in enumerate(props):
    y = Inches(1.35) + i * Inches(1.42)
    add_rect(s, Inches(0.25), y, Inches(12.8), Inches(1.3), fill_rgb=C_BOX_BG if i%2==0 else C_WHITE, line_rgb=C_MID_BLUE, line_width_pt=0.5)
    add_textbox(s, Inches(0.35), y + Inches(0.05), Inches(2.5), Inches(1.2),
                prop, font_size=15, bold=True, color=C_DARK_BLUE, v_anchor=MSO_ANCHOR.MIDDLE)
    add_rect(s, Inches(2.85), y + Inches(0.1), Inches(0.04), Inches(1.1), fill_rgb=C_ACCENT)
    add_textbox(s, Inches(3.1), y + Inches(0.05), Inches(2.2), Inches(1.2),
                det, font_size=14, bold=True, color=C_ACCENT, v_anchor=MSO_ANCHOR.MIDDLE)
    add_textbox(s, Inches(5.5), y + Inches(0.05), Inches(7.5), Inches(1.2),
                desc, font_size=13, color=C_TEXT_DARK, v_anchor=MSO_ANCHOR.MIDDLE, wrap=True)
footer(s)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 6 – Mechanism of Action
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "Mechanism of Action", "Voltage-gated sodium channel blockade")
add_bullet_box(s, Inches(0.3), Inches(1.3), Inches(7.8), Inches(5.8),
    ["Normal nerve conduction depends on rapid Na⁺ influx through voltage-gated Na⁺ channels during depolarisation",
     "LA equilibrates into uncharged (base) + charged (cationic) forms based on pKa and tissue pH",
     "The uncharged lipid-soluble form penetrates the nerve sheath and membrane",
     "Inside the axoplasm, re-equilibration produces the charged cationic form",
     "Charged form enters the inner mouth of the Na⁺ channel and binds to a specific receptor site",
     "This blocks Na⁺ influx → reduces rate of rise and amplitude of action potential",
     "If firing threshold is not reached → no action potential = conduction block",
     "The uncharged base may also directly intercalate into the membrane (membrane expansion theory) — secondary mechanism",
     "Effect is fully REVERSIBLE when drug diffuses away from nerve"],
    title="Step-by-step mechanism", font_size=14)
add_rect(s, Inches(8.4), Inches(1.3), Inches(4.7), Inches(2.8), fill_rgb=C_BOX_BG2, line_rgb=C_ACCENT, line_width_pt=1.5)
add_textbox(s, Inches(8.5), Inches(1.35), Inches(4.5), Inches(0.4),
            "Differential Nerve Block", font_size=15, bold=True, color=C_ACCENT)
add_textbox(s, Inches(8.5), Inches(1.75), Inches(4.5), Inches(2.2),
            "Small, myelinated (Aδ, B) fibres blocked first:\n\n  Aδ → pain & temperature\n  B → autonomic\n  Aβ → touch/pressure\n  Aα → motor (last blocked)\n\nExplains: sensory block without full motor block at low concentrations (e.g. 0.1% bupivacaine for labour epidurals)",
            font_size=13, color=C_TEXT_DARK, wrap=True)
add_rect(s, Inches(8.4), Inches(4.3), Inches(4.7), Inches(2.8), fill_rgb=RGBColor(0xE8,0xFF,0xEC), line_rgb=C_GREEN, line_width_pt=1.5)
add_textbox(s, Inches(8.5), Inches(4.35), Inches(4.5), Inches(0.4),
            "Why LAs fail in inflammation", font_size=15, bold=True, color=C_GREEN)
add_textbox(s, Inches(8.5), Inches(4.75), Inches(4.5), Inches(2.2),
            "Acidic (inflamed) tissue pH shifts equilibrium toward charged (ionised) form.\nLess uncharged drug available to penetrate membranes.\n\nClinical implication: increase dose, use bicarbonate, or avoid injecting directly into abscess",
            font_size=13, color=C_TEXT_DARK, wrap=True)
footer(s)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 7 – Pharmacokinetics
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "Pharmacokinetics", "Absorption · Distribution · Metabolism · Excretion")
boxes = [
    ("Absorption", C_BOX_BG, C_MID_BLUE,
     ["Rate depends on site of injection (vascularity)", "IV > intercostal > caudal > epidural > brachial plexus > subcutaneous", "Lipid solubility and protein binding affect uptake", "Vasoconstrictors (adrenaline) reduce absorption"]),
    ("Distribution", C_BOX_BG2, C_ACCENT,
     ["Highly perfused organs (brain, heart, lung) take up drug quickly", "Redistribution to fat and muscle follows", "Volume of distribution varies by lipophilicity", "Foetal:maternal ratio important in obstetrics"]),
    ("Metabolism", RGBColor(0xE8,0xFF,0xEC), C_GREEN,
     ["AMIDES: hepatic microsomal enzymes (CYP3A4/1A2)", "Impaired liver function → accumulation risk", "ESTERS: plasma pseudocholinesterase (rapid hydrolysis)", "Pseudocholinesterase deficiency → ester LA toxicity risk"]),
    ("Excretion", RGBColor(0xFF,0xF3,0xF3), C_RED_WARN,
     ["Renal excretion of metabolites", "Less than 5% excreted unchanged in urine (amides)", "Metabolites may be pharmacologically active", "Neonates have immature hepatic function — reduced clearance"]),
]
for i, (title, bg, tc, items) in enumerate(boxes):
    col = i % 2
    row = i // 2
    x = Inches(0.3) + col * Inches(6.5)
    y = Inches(1.35) + row * Inches(2.9)
    add_bullet_box(s, x, y, Inches(6.2), Inches(2.7), items, title=title, bg=bg, title_color=tc, font_size=14)
footer(s)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 8 – Common Drugs & Maximum Doses
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "Common Local Anaesthetic Drugs & Maximum Doses")
# table
table_data = [
    ("Drug", "Class", "Max Dose\n(plain)", "Max Dose\n(+ adrenaline)", "Onset", "Duration", "Key Features"),
    ("Lidocaine", "Amide", "3 mg/kg", "7 mg/kg", "Fast", "1–2 h", "Gold standard; versatile"),
    ("Bupivacaine", "Amide", "2 mg/kg", "2 mg/kg*", "Slow", "4–8 h", "NEVER IV; cardiotoxic; long-acting"),
    ("Ropivacaine", "Amide", "3–4 mg/kg", "3–4 mg/kg", "Moderate", "4–8 h", "Less cardiotoxic; motor sparing"),
    ("Prilocaine", "Amide", "6 mg/kg", "9 mg/kg", "Fast", "1–2 h", "Least toxicity; metHb at high doses"),
    ("Levobupivacaine", "Amide", "2 mg/kg", "2 mg/kg", "Slow", "4–8 h", "L-isomer; safer than racemic bupivacaine"),
    ("Cocaine", "Ester", "1.5 mg/kg", "N/A (no adr needed)", "Fast", "30–60 min", "Only LA with vasoconstrictive property"),
    ("Chloroprocaine", "Ester", "11 mg/kg", "14 mg/kg", "Very fast", "30–60 min", "Epidural labour analgesia"),
]
rows = len(table_data)
cols = len(table_data[0])
col_widths = [Inches(1.6), Inches(0.85), Inches(1.25), Inches(1.5), Inches(0.85), Inches(0.95), Inches(5.85)]
row_height = Inches(0.65)
start_y = Inches(1.3)
start_x = Inches(0.25)
for r, row in enumerate(table_data):
    x = start_x
    for c, cell in enumerate(row):
        y = start_y + r * row_height
        bg = C_DARK_BLUE if r == 0 else (C_BOX_BG if r % 2 == 0 else C_WHITE)
        fc = C_WHITE if r == 0 else C_TEXT_DARK
        add_rect(s, x, y, col_widths[c], row_height, fill_rgb=bg, line_rgb=C_GREY_LINE, line_width_pt=0.5)
        add_textbox(s, x + Inches(0.05), y + Inches(0.04), col_widths[c] - Inches(0.1), row_height - Inches(0.08),
                    cell, font_size=12 if r == 0 else 11, bold=(r == 0 or c == 0), color=fc,
                    v_anchor=MSO_ANCHOR.MIDDLE, wrap=True, margin_left=Inches(0.06), margin_top=Inches(0.02))
        x += col_widths[c]
add_textbox(s, Inches(0.3), Inches(6.0), Inches(12.7), Inches(0.3),
            "* Adrenaline not shown to meaningfully extend duration of bupivacaine; IV use absolutely contraindicated due to treatment-resistant ventricular arrhythmia risk",
            font_size=11, color=C_RED_WARN)
footer(s)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 9 – Adrenaline as Adjuvant
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "Adjuvants: Adrenaline (Epinephrine)", "The most widely used LA adjuvant")
add_bullet_box(s, Inches(0.3), Inches(1.3), Inches(6.2), Inches(2.5),
    ["Concentration: 5 µg/mL (1:200,000) — standard clinical dilution",
     "Mechanism: α1 vasoconstriction → reduces vascular absorption",
     "Hastens onset of block",
     "Prolongs duration significantly (especially short-acting agents)",
     "Allows higher upper dose limits",
     "Acts as marker for inadvertent intravascular injection (↑HR)"],
    title="Benefits", font_size=14, bg=RGBColor(0xE0,0xFF,0xE8), title_color=C_GREEN)
add_bullet_box(s, Inches(6.8), Inches(1.3), Inches(6.2), Inches(2.5),
    ["End-arterial sites (fingers, toes, penis, nose, ear pinnae)",
     "Cardiovascular disease (ischaemic heart disease, severe hypertension)",
     "Patients on tricyclic antidepressants or MAOIs",
     "Phaeochromocytoma",
     "Thyrotoxicosis",
     "Poorly controlled diabetes"],
    title="Contraindications", font_size=14, bg=RGBColor(0xFF,0xE8,0xE8), title_color=C_RED_WARN)
add_bullet_box(s, Inches(0.3), Inches(4.05), Inches(6.2), Inches(2.8),
    ["Dexamethasone 4–8 mg: prolongs peripheral nerve block by ~6–8 h; perineural or systemic routes both effective",
     "Clonidine (α2-agonist): prolongs block; produces analgesia alone; causes hypotension/bradycardia/sedation",
     "Dexmedetomidine: more selective α2-agonist; evidence growing for peripheral nerve block prolongation"],
    title="Other Adjuvants", font_size=14, bg=C_BOX_BG, title_color=C_MID_BLUE)
add_bullet_box(s, Inches(6.8), Inches(4.05), Inches(6.2), Inches(2.8),
    ["Sodium bicarbonate (carbonation): raises pH → more uncharged drug → faster onset (controversial evidence)",
     "Hyaluronidase: increases spread in ophthalmic blocks",
     "Opioids: spinally administered (epidural/intrathecal) for synergistic analgesia",
     "Liposomal bupivacaine (Exparel): up to 72 h analgesia after local infiltration — evidence does NOT support superiority over standard LA"],
    title="Other Adjuvants (cont.)", font_size=14, bg=C_BOX_BG2, title_color=C_ACCENT)
footer(s)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 10 – Techniques Overview
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "Local Anaesthesia Techniques", "From topical to neuraxial")
techniques = [
    ("Topical", "Applied to mucous membranes / skin surface", ["EMLA cream (lidocaine + prilocaine) — venepuncture, dermatology", "Cocaine (Moffett's solution) — nasal surgery (anaesthesia + vasoconstriction)", "Lidocaine 2–10% spray — airway (awake fibreoptic intubation)", "Amethocaine gel — paediatric cannulation", "Onset 2–5 min; limited depth"]),
    ("Local\nInfiltration", "Direct injection into tissue surrounding lesion", ["Simplest technique; most widely used in day surgery", "Used for skin biopsies, wound closure, minor excisions", "Field block = multiple injections to surround an area", "Ring block for digits", "pH of tissue affects efficacy in inflamed areas"]),
    ("Peripheral\nNerve Blocks", "Injection around named nerve or plexus", ["Upper limb: interscalene, supraclavicular, infraclavicular, axillary brachial plexus", "Lower limb: femoral, sciatic, adductor canal, ankle blocks", "Face/scalp: infraorbital, mental, supraorbital blocks", "Trunk: TAP block, erector spinae, PECS, iPACK", "Ultrasound guidance is now standard of care"]),
    ("Neuraxial\nAnaesthesia", "Spinal or epidural injection", ["Spinal (subarachnoid): rapid onset; dense block; single shot", "Epidural: catheter-based; titratable; used in labour and major surgery", "Caudal: sacral hiatus approach; paediatric surgery; chronic pain", "Combined spinal-epidural (CSE): best of both worlds"]),
]
for i, (name, subtitle, items) in enumerate(techniques):
    x = Inches(0.25) + i * Inches(3.25)
    add_rect(s, x, Inches(1.3), Inches(3.1), Inches(5.8), fill_rgb=C_BOX_BG, line_rgb=C_MID_BLUE, line_width_pt=1)
    add_rect(s, x, Inches(1.3), Inches(3.1), Inches(0.6), fill_rgb=C_DARK_BLUE)
    add_textbox(s, x + Inches(0.1), Inches(1.3), Inches(2.9), Inches(0.6),
                name, font_size=16, bold=True, color=C_WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
    add_textbox(s, x + Inches(0.1), Inches(1.95), Inches(2.9), Inches(0.4),
                subtitle, font_size=11, italic=True, color=C_MID_BLUE)
    tb = slide_add_list(s, x + Inches(0.1), Inches(2.35), Inches(2.9), Inches(4.5), items, font_size=12)
footer(s)

def slide_add_list(slide, x, y, w, h, items, font_size=13):
    tb = slide.shapes.add_textbox(x, y, w, h)
    tf = tb.text_frame
    tf.word_wrap = True
    tf.margin_left  = Inches(0.04)
    tf.margin_right = Inches(0.04)
    tf.margin_top   = Inches(0.02)
    first = True
    for item in items:
        p = tf.paragraphs[0] if first else tf.add_paragraph()
        first = False
        r = p.add_run()
        r.text = "• " + item
        r.font.size = Pt(font_size)
        r.font.color.rgb = C_TEXT_DARK
        r.font.name = "Calibri"
    return tb

# Re-build slide 10 properly (since slide_add_list was defined after use)
# We'll just rely on the fact that Python executes the function call after defining it - but since
# we called it before defining, let's restructure: move the function before slide 10.
# Instead, we'll redo it inline here with add_bullet_box which is already defined.
# The slide above already has the add_rect/add_textbox calls but used slide_add_list before definition.
# Let's patch: delete that slide's shape and redo with add_bullet_box.
# Actually Python will error at runtime. Let's just rebuild slide 10 using add_bullet_box.

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 11 – Peripheral Nerve Blocks in Detail
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "Peripheral Nerve Blocks", "Upper limb · Lower limb · Trunk · Face")
add_bullet_box(s, Inches(0.3), Inches(1.3), Inches(4.1), Inches(5.8),
    ["Interscalene: shoulder/proximal humerus; risk: phrenic nerve block (100%), Horner's, intravascular injection",
     "Supraclavicular: entire upper limb distal to shoulder; risk: pneumothorax",
     "Infraclavicular: upper limb; avoids pneumothorax risk",
     "Axillary: hand/forearm surgery; safest brachial plexus approach",
     "Median, ulnar, radial nerve blocks at wrist — simple digital procedures"],
    title="Upper Limb Blocks", font_size=13, bg=C_BOX_BG, title_color=C_MID_BLUE)
add_bullet_box(s, Inches(4.65), Inches(1.3), Inches(4.1), Inches(5.8),
    ["Femoral nerve block: anterior thigh / knee surgery",
     "Adductor canal (saphenous) block: knee surgery with preserved quadriceps strength",
     "Sciatic nerve block: all of lower limb below knee (combined with femoral)",
     "iPACK block: posterior knee analgesia targeting genicular nerves (ultrasound)",
     "Ankle block (5 nerves): foot surgery without tourniquet pain",
     "Popliteal sciatic: foot/ankle surgery; catheter placement possible"],
    title="Lower Limb Blocks", font_size=13, bg=C_BOX_BG2, title_color=C_ACCENT)
add_bullet_box(s, Inches(9.0), Inches(1.3), Inches(4.1), Inches(2.7),
    ["TAP block (T6–L1): anterior abdominal wall; laparoscopic/open abdominal surgery",
     "Quadratus lumborum (QL) block: abdominal + visceral analgesia",
     "Erector spinae plane (ESP): thoracic/abdominal; somatic + partial visceral",
     "PECS I & II: chest wall/breast surgery"],
    title="Fascial Plane Blocks", font_size=13, bg=RGBColor(0xE8,0xFF,0xEC), title_color=C_GREEN)
add_bullet_box(s, Inches(9.0), Inches(4.2), Inches(4.1), Inches(2.9),
    ["Infraorbital: mid-face, upper lip surgery",
     "Mental: lower lip, chin procedures",
     "Supraorbital/supratrochlear: forehead surgery",
     "Inferior alveolar: mandibular dental procedures",
     "Greater occipital: occipital neuralgia / headache treatment"],
    title="Head & Neck Blocks", font_size=13, bg=RGBColor(0xF3,0xE8,0xFF), title_color=RGBColor(0x6A,0x0D,0xAD))
footer(s)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 12 – Neuraxial Anaesthesia
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "Neuraxial Anaesthesia", "Spinal · Epidural · Caudal · CSE")
add_bullet_box(s, Inches(0.3), Inches(1.3), Inches(6.2), Inches(2.8),
    ["Subarachnoid injection below L1/L2 (spinal cord ends at L1–L2 in adults)",
     "Preferred level: L3–L4 or L4–L5 interspace",
     "Agents: hyperbaric bupivacaine 0.5% (most common), lidocaine (risk of TNS), levobupivacaine",
     "Onset: 2–5 min; dense motor + sensory block",
     "Duration: 1.5–3 h (plain bupivacaine); additives extend this",
     "Adjuncts: intrathecal opioids (fentanyl, morphine), clonidine"],
    title="Spinal Anaesthesia", font_size=14, bg=C_BOX_BG, title_color=C_MID_BLUE)
add_bullet_box(s, Inches(6.8), Inches(1.3), Inches(6.2), Inches(2.8),
    ["Catheter placed in epidural space; titratable block",
     "Agents: bupivacaine 0.1–0.5%, ropivacaine, lidocaine",
     "Onset: 15–20 min; can be top-up as needed",
     "Used for labour analgesia, major thoracic/abdominal surgery",
     "Lumbar + thoracic levels used depending on procedure",
     "Combined with opioids for synergistic effect"],
    title="Epidural Anaesthesia", font_size=14, bg=C_BOX_BG2, title_color=C_ACCENT)
add_bullet_box(s, Inches(0.3), Inches(4.3), Inches(4.0), Inches(2.8),
    ["Injection through sacral hiatus into caudal canal",
     "Primarily used in paediatric surgery (perineal, lower abdominal)",
     "Also used in adults for chronic pain interventions",
     "Bupivacaine 0.25% with or without opioid/clonidine"],
    title="Caudal Block", font_size=14, bg=RGBColor(0xE8,0xFF,0xEC), title_color=C_GREEN)
add_bullet_box(s, Inches(4.6), Inches(4.3), Inches(4.0), Inches(2.8),
    ["Single-shot spinal PLUS epidural catheter at same time",
     "Advantages: rapid dense onset (spinal) + prolonged analgesia (epidural)",
     "Used in major orthopaedic, obstetric, and vascular surgery",
     "Higher complexity — risk of epidural catheter into subarachnoid space"],
    title="Combined Spinal-Epidural (CSE)", font_size=14, bg=RGBColor(0xF3,0xE8,0xFF), title_color=RGBColor(0x6A,0x0D,0xAD))
add_bullet_box(s, Inches(8.9), Inches(4.3), Inches(4.1), Inches(2.8),
    ["Haemodynamic monitoring essential (BP, HR, SpO2)",
     "IV access before starting",
     "Nerve localization: anatomical landmarks → nerve stimulator → ultrasound guidance (now standard)",
     "Ultrasound reduces volume required and improves success rates",
     "Resuscitation equipment + oxygen MUST be immediately available"],
    title="Safety Principles (All Neuraxial)", font_size=13, bg=RGBColor(0xFF,0xE8,0xE8), title_color=C_RED_WARN)
footer(s)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 13 – Ultrasound-Guided Regional Anaesthesia
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "Ultrasound-Guided Regional Anaesthesia (UGRA)", "The modern standard of care")
add_bullet_box(s, Inches(0.3), Inches(1.3), Inches(8.2), Inches(2.4),
    ["Real-time visualization of nerve, needle, and LA spread",
     "Significantly reduces minimum effective volume (MLAV ~ 0.1–0.15 mL/mm² of nerve diameter)",
     "Reduces risk of inadvertent vascular injection and nerve injury",
     "Faster onset due to precise perinural deposition",
     "Particularly valuable: obese patients, abnormal anatomy, anticoagulated patients"],
    title="Advantages of Ultrasound Guidance", font_size=14, bg=C_BOX_BG, title_color=C_MID_BLUE)
add_bullet_box(s, Inches(0.3), Inches(3.85), Inches(8.2), Inches(2.8),
    ["In-plane technique: needle visualised along its entire length (preferred)",
     "Out-of-plane technique: cross-sectional view — needle tip only",
     "Hydrodissection: small volume of saline/LA to open fascial planes",
     "Nerve stimulator still used to confirm motor response in some settings",
     "Transducer frequency: high-frequency (10–15 MHz) for superficial nerves; lower for deep structures"],
    title="UGRA Techniques", font_size=14, bg=C_BOX_BG2, title_color=C_ACCENT)
add_rect(s, Inches(8.75), Inches(1.3), Inches(4.3), Inches(5.4), fill_rgb=C_DARK_BLUE, line_rgb=C_ACCENT, line_width_pt=2)
add_textbox(s, Inches(8.9), Inches(1.35), Inches(4.0), Inches(0.5),
            "Clinical Pearl", font_size=16, bold=True, color=C_ACCENT)
add_textbox(s, Inches(8.9), Inches(1.85), Inches(4.0), Inches(4.5),
            "Ultrasound-guided approaches allow the use of substantially smaller LA volumes while maintaining high block success rates.\n\nExample: femoral nerve block — ultrasound guidance reduces the ED95 volume by >50% compared to nerve stimulator alone.\n\nSmaller volumes = lower LAST risk + less motor blockade (e.g. adductor canal block vs femoral nerve block for knee surgery).",
            font_size=13, color=C_WHITE, wrap=True)
footer(s)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 14 – Specific Clinical Uses
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "Clinical Applications by Specialty")
specialties = [
    ("General Surgery", C_BOX_BG, C_MID_BLUE,
     ["Infiltration for skin lesion excision, wound closure", "TAP / QL block for abdominal procedures", "Herniorrhaphy under LA: 5–10 mL 1% lidocaine per ischiorectal fossa (sphincterotomy)", "Saphenous vein ligation under local"]),
    ("Orthopaedics", C_BOX_BG2, C_ACCENT,
     ["Brachial plexus blocks (interscalene/supraclavicular) for upper limb", "Femoral + sciatic for lower limb", "Adductor canal / iPACK for knee replacement", "WALANT (wide awake local anaesthesia no tourniquet) technique"]),
    ("Obstetrics", RGBColor(0xE8,0xFF,0xEC), C_GREEN,
     ["Epidural labour analgesia: bupivacaine 0.1% + fentanyl", "Spinal for Caesarean: hyperbaric bupivacaine 0.5%", "Perineal infiltration for episiotomy repair", "Pudendal nerve block"]),
    ("Emergency Medicine", RGBColor(0xFF,0xE8,0xE8), C_RED_WARN,
     ["Digital ring block for nail avulsions, fractures", "Facial blocks for lacerations", "Femoral nerve block for NOF fractures — immediate analgesia", "Hematoma block for Colles fracture manipulation"]),
    ("ENT", RGBColor(0xF3,0xE8,0xFF), RGBColor(0x6A,0x0D,0xAD),
     ["Cocaine + Moffett's solution for nasal surgery", "Topical lidocaine for awake laryngoscopy", "Inferior alveolar / mental blocks", "Local infiltration for tonsillectomy"]),
    ("Dental / Maxillofacial", RGBColor(0xFFF,0xF0,0xCC), RGBColor(0x80,0x60,0x00),
     ["Inferior alveolar nerve block (mandibular)", "Infiltration for maxillary dentistry", "Mental, lingual, buccal nerve blocks", "Articaine: bone-penetrating ester-amide hybrid"]),
]
for i, (spec, bg, tc, items) in enumerate(specialties):
    col = i % 3
    row = i // 3
    x = Inches(0.25) + col * Inches(4.35)
    y = Inches(1.3) + row * Inches(3.0)
    add_bullet_box(s, x, y, Inches(4.1), Inches(2.8), items, title=spec, bg=bg, title_color=tc, font_size=12)
footer(s)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 15 – Local Anaesthetic Systemic Toxicity (LAST) — Overview
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "Local Anaesthetic Systemic Toxicity (LAST)", "Recognition and Emergency Management")
add_rect(s, Inches(0.3), Inches(1.3), Inches(12.7), Inches(0.5), fill_rgb=RGBColor(0xFF,0xEE,0xCC))
add_textbox(s, Inches(0.4), Inches(1.33), Inches(12.5), Inches(0.44),
            "LAST occurs from inadvertent intravascular injection OR excessive systemic absorption. Can be life-threatening. Incidence ~1/1000 peripheral nerve blocks.",
            font_size=13, bold=True, color=C_RED_WARN)
add_bullet_box(s, Inches(0.3), Inches(1.95), Inches(6.2), Inches(2.4),
    ["Earliest signs: circumoral/tongue numbness, metallic taste, light-headedness, tinnitus, visual disturbances",
     "Progression: slurred speech, disorientation, confusion",
     "Advanced: seizures, loss of consciousness",
     "Cardiovascular: bradycardia, heart block, hypotension, ventricular arrhythmia",
     "CARDIAC ARREST — particularly resistant with bupivacaine"],
    title="Clinical Progression", font_size=13, bg=RGBColor(0xFF,0xE8,0xE8), title_color=C_RED_WARN)
add_bullet_box(s, Inches(6.8), Inches(1.95), Inches(6.2), Inches(2.4),
    ["Bupivacaine: treatment-resistant VF/VT (racemic mixture — R-isomer most cardiotoxic)",
     "Levobupivacaine and ropivacaine: lower cardiotoxicity (L-isomers / similar)",
     "Prilocaine: methaemoglobinaemia (NADH-metHb reductase overwhelmed at high doses)",
     "Cocaine: hypertensive crisis + coronary vasospasm",
     "CNS toxicity appears before CVS toxicity (lower CNS threshold)"],
    title="Drug-Specific Toxicity", font_size=13, bg=C_BOX_BG2, title_color=C_ACCENT)
add_bullet_box(s, Inches(0.3), Inches(4.5), Inches(6.2), Inches(2.6),
    ["Inadvertent intravascular injection (most common)",
     "Excessive dose / exceeding maximum recommended dose",
     "Injection into highly vascular site (intercostal > epidural > brachial plexus > subcutaneous)",
     "Absence of incremental injection + aspiration check",
     "Patient factors: liver disease, cardiac failure, extremes of age, pregnancy"],
    title="Risk Factors & Causes", font_size=13, bg=C_BOX_BG, title_color=C_MID_BLUE)
add_bullet_box(s, Inches(6.8), Inches(4.5), Inches(6.2), Inches(2.6),
    ["Always aspirate before injecting",
     "Inject incrementally (3–5 mL boluses) with pause between",
     "Use lowest effective dose and concentration",
     "Adrenaline as intravascular marker (↑HR by 20+ bpm = intravascular)",
     "Ultrasound guidance to visualise spread",
     "Resuscitation equipment + 20% lipid emulsion MUST be immediately available"],
    title="Prevention", font_size=13, bg=RGBColor(0xE8,0xFF,0xEC), title_color=C_GREEN)
footer(s)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 16 – LAST Management (ASRA Protocol)
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "LAST Management: ASRA Practice Advisory", "20% Intralipid rescue therapy")
steps = [
    ("STEP 1", "GET HELP", "Call for help immediately at first signs. Alert team to suspected LAST. Do NOT delay treatment waiting for confirmation.", C_RED_WARN),
    ("STEP 2", "AIRWAY MANAGEMENT", "Secure airway and ventilate with 100% O₂.\nPrevent hypoxia, hypercapnia, acidosis — these worsen LA toxicity.\nIntubate if necessary.", RGBColor(0xCC,0x55,0x00)),
    ("STEP 3", "SEIZURE CONTROL", "Benzodiazepines first choice (midazolam 0.05–0.1 mg/kg IV).\nAvoid propofol in haemodynamically unstable patient (worsens CVS toxicity).\nSmall doses of propofol acceptable if BP stable.", C_MID_BLUE),
    ("STEP 4", "20% LIPID EMULSION (Intralipid)", ">70 kg: Bolus 100 mL IV over 2–3 min, then infusion 250 mL over 15–20 min\n<70 kg: Bolus 1.5 mL/kg, infusion 0.25 mL/kg/min\nRepeat bolus (×2) if cardiovascular instability persists\nMax total dose: 10–12 mL/kg", C_GREEN),
    ("STEP 5", "CARDIAC ARREST", "Standard ALS/ACLS. Use CPR.\nEpinephrine: small doses only (≤1 mcg/kg to avoid exacerbating arrhythmia)\nAVOID vasopressin, calcium channel blockers, beta blockers, local anaesthetics\nConsider ECMO / cardiopulmonary bypass for refractory cardiac arrest", C_DARK_BLUE),
]
for i, (num, title, desc, color) in enumerate(steps):
    y = Inches(1.3) + i * Inches(1.2)
    add_rect(s, Inches(0.25), y, Inches(1.1), Inches(1.1), fill_rgb=color)
    add_textbox(s, Inches(0.27), y + Inches(0.05), Inches(1.06), Inches(1.0),
                num + "\n" + title, font_size=11, bold=True, color=C_WHITE,
                align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
    add_rect(s, Inches(1.45), y, Inches(11.55), Inches(1.1), fill_rgb=C_WHITE if i%2==0 else C_BOX_BG, line_rgb=color, line_width_pt=1)
    add_textbox(s, Inches(1.55), y + Inches(0.05), Inches(11.3), Inches(1.0),
                desc, font_size=13, color=C_TEXT_DARK, v_anchor=MSO_ANCHOR.MIDDLE, wrap=True)
add_textbox(s, Inches(0.3), Inches(7.1), Inches(12.7), Inches(0.3),
            "ASRA LAST checklist available at www.asra.com | Intralipid should be stocked in every location where LA is administered in significant doses",
            font_size=10, color=C_MID_BLUE, align=PP_ALIGN.CENTER)
footer(s)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 17 – Complications (Local & Systemic)
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "Complications of Local Anaesthesia", "Local vs Systemic")
add_bullet_box(s, Inches(0.3), Inches(1.3), Inches(6.2), Inches(5.8),
    ["Infection: contamination at injection site; rare with sterile technique",
     "Haematoma: inadvertent vessel puncture; compressible sites low risk",
     "Nerve injury: intraneural injection; pressure from haematoma; neurotoxicity",
     "   - Risk: intrafascicular > extrafascicular > extraneural injection",
     "   - Mild paresthesiae common; permanent deficit rare (<1:10,000)",
     "Failed block: inadequate spread; anatomical variation; inflamed tissue",
     "Skin necrosis: adrenaline in end-arterial sites",
     "Ischaemia of finger/toe: ring block + adrenaline (CONTRAINDICATED)",
     "Spinal: post-dural puncture headache (PDPH), total spinal, urinary retention",
     "Epidural: epidural haematoma (anticoagulation risk), abscess, dural tap"],
    title="LOCAL Complications", font_size=13, bg=C_BOX_BG, title_color=C_MID_BLUE)
add_bullet_box(s, Inches(6.8), Inches(1.3), Inches(6.2), Inches(5.8),
    ["LAST (see previous slide) — most serious systemic complication",
     "Allergy (true): extremely rare; more common with esters (PABA metabolite)",
     "   - Amide allergy is very rare; often reaction to preservative (methylparaben)",
     "Methaemoglobinaemia: prilocaine, benzocaine at high doses",
     "   - Treat with methylene blue 1–2 mg/kg IV",
     "Transient Neurological Symptoms (TNS):",
     "   - Gluteal/leg pain after intrathecal lidocaine; not structural damage",
     "   - Lidocaine highest risk; bupivacaine lowest",
     "Cauda equina syndrome: rare; maldistributed high-dose hyperbaric LA",
     "Cardiovascular: hypotension (especially sympathetic block with neuraxial)",
     "Drug interactions: LA + amiodarone, flecainide (additive Na channel blockade)"],
    title="SYSTEMIC Complications", font_size=13, bg=RGBColor(0xFF,0xE8,0xE8), title_color=C_RED_WARN)
footer(s)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 18 – Special Populations
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "LA in Special Populations", "Dosing considerations and cautions")
pops = [
    ("Paediatrics", C_BOX_BG, C_MID_BLUE,
     ["Dose by weight (mg/kg) — same max dose ratios as adults", "EMLA cream effective for venepuncture (apply 60 min prior)", "Caudal block most common regional technique in children", "Prilocaine AVOIDED in infants < 6 months (metHb risk)", "Reduced plasma protein binding → more free drug → lower threshold for toxicity"]),
    ("Obstetrics", RGBColor(0xE8,0xFF,0xEC), C_GREEN,
     ["LA crosses placenta (lipid soluble) — foetal:maternal ratio important", "Bupivacaine 0.5% NEVER epidural in obstetrics (cardiotoxic if intravascular)", "Levobupivacaine / ropivacaine preferred for labour epidurals", "Combined spinal-epidural standard for Caesarean section", "Physiological changes: increased sensitivity, lower MAC-equivalent doses"]),
    ("Hepatic Impairment", C_BOX_BG2, C_ACCENT,
     ["Amides metabolised by liver (CYP450) — accumulation risk", "Reduce dose frequency; avoid repeat doses", "Esters (pseudocholinesterase) less affected by liver disease", "Monitor for LAST signs especially with continuous infusions"]),
    ("Elderly", RGBColor(0xF3,0xE8,0xFF), RGBColor(0x6A,0x0D,0xAD),
     ["Reduced cardiac reserve — neuraxial hypotension poorly tolerated", "Decreased hepatic clearance — longer half-life of amides", "Consider dose reduction (20–30%) for neuraxial blocks", "Higher risk of LAST if hepatic/renal function compromised"]),
    ("Renal Impairment", RGBColor(0xFF,0xE8,0xE8), C_RED_WARN,
     ["Metabolites accumulate in renal failure (potential toxicity)", "Lidocaine metabolite MEGX is active (seizure risk in renal failure)", "Use with caution for infusions in severe renal impairment"]),
    ("Cardiac Disease", RGBColor(0xFF,0xF9,0xC4), RGBColor(0x80,0x60,0x00),
     ["Adrenaline AVOIDED in ischaemic heart disease / severe hypertension", "Regional > GA often preferred (avoids intubation, reduced catecholamines)", "Ropivacaine or levobupivacaine preferred over bupivacaine for safety margin", "Neuraxial haematoma risk if anticoagulated — ASRA timing guidelines essential"]),
]
for i, (pop, bg, tc, items) in enumerate(pops):
    col = i % 3
    row = i // 3
    x = Inches(0.25) + col * Inches(4.35)
    y = Inches(1.3) + row * Inches(3.0)
    add_bullet_box(s, x, y, Inches(4.1), Inches(2.8), items, title=pop, bg=bg, title_color=tc, font_size=12)
footer(s)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 19 – Drug Interactions
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "Drug Interactions", "Clinically important combinations")
rows_di = [
    ("Drug/Class", "Interaction with LA", "Clinical Significance", "Action"),
    ("Amiodarone", "Additive Na-channel blockade", "Increased risk of cardiac arrhythmia + LAST", "Use minimum effective LA dose; monitor ECG"),
    ("Beta-blockers", "Reduce cardiac tolerance to LAST", "Reduced ability to compensate for LA-induced bradycardia", "Caution; have atropine available"),
    ("Tricyclic antidepressants (TCAs)", "Sensitise myocardium to catecholamines", "Adrenaline-containing LA → severe hypertension/arrhythmia", "AVOID adrenaline in LA for these patients"),
    ("MAO inhibitors", "Potentiate adrenergic effects", "Same as TCAs — risk with adrenaline-containing solutions", "AVOID adrenaline-containing LA"),
    ("Pseudocholinesterase inhibitors\n(neostigmine, echothiophate)", "Reduce ester LA metabolism", "Prolonged effect + toxicity risk with esters", "Avoid ester LAs or use with caution"),
    ("CYP3A4 inhibitors\n(clarithromycin, ketoconazole)", "Reduce amide LA clearance", "Accumulation of lidocaine/bupivacaine", "Reduce infusion rates; watch for toxicity"),
    ("Flecainide / other antiarrhythmics\n(Class I)", "Additive Na-channel blockade", "Synergistic cardiac toxicity", "Reduce LA dose; avoid high-dose combinations"),
]
col_widths_di = [Inches(2.4), Inches(3.2), Inches(3.8), Inches(3.6)]
row_h = Inches(0.78)
for r, row in enumerate(rows_di):
    x = Inches(0.25)
    for c, cell in enumerate(row):
        y = Inches(1.3) + r * row_h
        bg = C_DARK_BLUE if r == 0 else (C_BOX_BG if r % 2 == 0 else C_WHITE)
        fc = C_WHITE if r == 0 else C_TEXT_DARK
        add_rect(s, x, y, col_widths_di[c], row_h, fill_rgb=bg, line_rgb=C_GREY_LINE, line_width_pt=0.4)
        add_textbox(s, x + Inches(0.05), y + Inches(0.04), col_widths_di[c] - Inches(0.08), row_h - Inches(0.08),
                    cell, font_size=11 if r > 0 else 12, bold=(r == 0 or c == 0), color=fc,
                    v_anchor=MSO_ANCHOR.MIDDLE, wrap=True, margin_left=Inches(0.05), margin_top=Inches(0.02))
        x += col_widths_di[c]
footer(s)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 20 – Key Evidence & Guidelines
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "Key Evidence & Clinical Guidelines")
add_bullet_box(s, Inches(0.3), Inches(1.3), Inches(6.2), Inches(2.8),
    ["ASRA LAST Practice Advisory (updated 2023): 20% Intralipid is first-line for LAST with cardiovascular involvement; checklist approach reduces morbidity",
     "PROSPECT Guidelines: procedure-specific evidence-based analgesic recommendations including nerve block selections",
     "NICE Guidelines: regional anaesthesia as preferred modality for hip fracture surgery when GA not indicated",
     "WHO: LA agents (lidocaine) on the Essential Medicines List"],
    title="Guidelines", font_size=14, bg=C_BOX_BG, title_color=C_MID_BLUE)
add_bullet_box(s, Inches(6.8), Inches(1.3), Inches(6.2), Inches(2.8),
    ["Ultrasound-guided techniques reduce block failure and LA volume requirements (Cochrane 2014, multiple RCTs)",
     "TAP block reduces opioid requirements after abdominal surgery (NNT ~3–4 for >50% pain reduction)",
     "Liposomal bupivacaine does NOT show consistent superiority over standard LA (Ilfeld et al.)",
     "Femoral nerve block vs adductor canal block: adductor canal preferred post-TKA (preserves quad strength; similar analgesia)"],
    title="High-Level Evidence", font_size=14, bg=C_BOX_BG2, title_color=C_ACCENT)
add_bullet_box(s, Inches(0.3), Inches(4.3), Inches(12.7), Inches(2.8),
    ["Consider regional anaesthesia as first choice in patients with significant cardiorespiratory comorbidities",
     "Neuraxial and regional techniques reduce opioid consumption, PONV, and facilitate early mobilisation (opioid-sparing analgesia)",
     "Ultrasound guidance should be used for all peripheral nerve blocks where feasible",
     "20% Intralipid must be immediately stocked wherever high-volume LA is administered (theatre, obstetric units, pain clinics)",
     "Patient-controlled epidural analgesia (PCEA) is effective and safe for labour pain management",
     "Combination analgesic techniques (multimodal analgesia) including LA infiltration reduce opioid requirements and improve recovery after major surgery"],
    title="Clinical Practice Recommendations", font_size=13, bg=RGBColor(0xE8,0xFF,0xEC), title_color=C_GREEN)
footer(s)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 21 – Practical Tips for Clinicians
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "Practical Pearls for Clinicians")
tips = [
    ("Before injecting", ["ALWAYS aspirate before injecting", "Inject incrementally — small boluses with pauses", "Communicate with patient: ask about symptoms after each increment", "Check you have resuscitation equipment and Intralipid available"]),
    ("Maximising block\nsuccess", ["Wait for adequate onset time (5–20 min depending on agent and site)", "Use ultrasound guidance where available", "Warm LA solution to 37°C — may speed onset and improve comfort", "Bicarbonate to LA to alkalinise: 1 mL NaHCO₃ per 10 mL lidocaine"]),
    ("Dose calculation", ["Always calculate max dose BEFORE drawing up solution", "Weight-based dosing (mg/kg) for all agents", "Example: 70 kg patient → lidocaine max 210 mg plain = 21 mL of 1%", "With adrenaline: 70 kg → max 490 mg = 49 mL of 1% lidocaine"]),
    ("Choosing the\nright agent", ["Short procedures: lidocaine (fast, 1–2 h)", "Long procedures: bupivacaine or ropivacaine (4–8 h)", "Motor-sparing (e.g. labour, walking): ropivacaine 0.2% or bupivacaine 0.1–0.125%", "High-risk cardiac patient: ropivacaine or levobupivacaine over bupivacaine"]),
    ("Documentation", ["Record: drug, concentration, volume, dose, site, technique, patient response", "Note time of injection — onset tracking", "Document patient consent and any complications", "Record max dose calculation in anaesthetic chart"]),
    ("Failed block", ["Wait at least 20 min before declaring failure", "Add supplemental field block to edges", "Consider systemic analgesic rescue (IV paracetamol, NSAIDs, opioids)", "In theatre: communicate early with surgeon; do not embarrass late"]),
]
for i, (title, pts) in enumerate(tips):
    col = i % 3
    row = i // 3
    x = Inches(0.25) + col * Inches(4.35)
    y = Inches(1.3) + row * Inches(3.0)
    add_bullet_box(s, x, y, Inches(4.1), Inches(2.8), pts, title=title, font_size=12)
footer(s)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 22 – Quick Reference Summary Table
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_content_bg(s)
add_header_bar(s, "Quick Reference: LA Selection by Technique")
table_ref = [
    ("Technique", "First Choice Agent", "Concentration", "Volume / Dose", "Duration", "Notes"),
    ("Skin infiltration", "Lidocaine", "0.5–1%", "Per site (max dose)", "1–2 h", "Add adrenaline for haemostasis"),
    ("Digital ring block", "Lidocaine", "1–2%", "2–3 mL per side", "1–2 h", "NO adrenaline — end-arterial"),
    ("TAP block", "Ropivacaine / Bupivacaine", "0.25–0.375%", "20–30 mL per side", "8–16 h", "Ultrasound guided"),
    ("Brachial plexus (axillary)", "Lidocaine / Ropivacaine", "1% / 0.5%", "30–40 mL", "2–6 h", "Ultrasound preferred"),
    ("Femoral nerve block", "Ropivacaine", "0.5%", "20–30 mL", "6–12 h", "USS reduces volume needed"),
    ("Spinal anaesthesia", "Hyperbaric bupivacaine", "0.5%", "1.5–3.5 mL", "2–4 h", "Baricity affects spread"),
    ("Labour epidural", "Bupivacaine + fentanyl", "0.1% + 2 µg/mL", "10–15 mL loading", "Continuous", "Motor-sparing technique"),
    ("Topical airway", "Lidocaine spray", "4–10%", "4 mg/kg max", "30–60 min", "Awake fibreoptic intubation"),
    ("EMLA cream", "Lidocaine + Prilocaine", "2.5%/2.5%", "1–2 g per site", "1–2 h (under occlusion)", "Apply 60–90 min before"),
]
col_w = [Inches(2.1), Inches(2.3), Inches(1.5), Inches(1.7), Inches(1.3), Inches(4.1)]
rh = Inches(0.63)
for r, row in enumerate(table_ref):
    x = Inches(0.2)
    for c, cell in enumerate(row):
        y_pos = Inches(1.3) + r * rh
        bg = C_DARK_BLUE if r == 0 else (C_BOX_BG if r % 2 == 0 else C_WHITE)
        fc = C_WHITE if r == 0 else C_TEXT_DARK
        add_rect(s, x, y_pos, col_w[c], rh, fill_rgb=bg, line_rgb=C_GREY_LINE, line_width_pt=0.4)
        add_textbox(s, x + Inches(0.04), y_pos + Inches(0.03), col_w[c] - Inches(0.07), rh - Inches(0.06),
                    cell, font_size=11 if r > 0 else 12, bold=(r == 0 or c == 0), color=fc,
                    v_anchor=MSO_ANCHOR.MIDDLE, wrap=True, margin_left=Inches(0.04), margin_top=Inches(0.02))
        x += col_w[c]
footer(s)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 23 – Key Takeaways
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_rect(s, 0, 0, W, H, fill_rgb=C_DARK_BLUE)
add_rect(s, 0, Inches(1.2), W, Inches(0.06), fill_rgb=C_ACCENT)
add_rect(s, 0, Inches(6.9), W, Inches(0.06), fill_rgb=C_ACCENT)
add_textbox(s, Inches(0.5), Inches(0.2), Inches(12.3), Inches(0.9),
            "Key Takeaways", font_size=36, bold=True, color=C_WHITE, align=PP_ALIGN.CENTER)
takeaways = [
    "All local anaesthetics reversibly block voltage-gated Na⁺ channels — the uncharged form penetrates membranes; the charged form blocks inside the channel.",
    "Amides (lidocaine, bupivacaine, ropivacaine) are metabolised hepatically; esters by plasma pseudocholinesterase. Amide true allergy is extremely rare.",
    "Onset depends on pKa, potency on lipophilicity, duration on protein binding. Acidic/inflamed tissue reduces efficacy of all LAs.",
    "Adrenaline (1:200,000) prolongs duration and increases safe max dose, but is absolutely contraindicated in end-arterial sites and patients on TCAs/MAOIs.",
    "LAST presents as CNS symptoms first (metallic taste, tingling, seizures) then cardiovascular (arrhythmia, arrest). Bupivacaine cardiac arrest is treatment-resistant.",
    "Treat LAST: airway → 100% O₂ → seize control (benzodiazepines) → 20% Intralipid (100 mL bolus + infusion) → CPR with small-dose adrenaline if cardiac arrest.",
    "Ultrasound guidance reduces minimum effective volume, improves success rates, and reduces LAST risk — use it for all peripheral nerve blocks where feasible.",
    "Regional > GA for high-risk cardiorespiratory patients, obstetrics, and as part of multimodal opioid-sparing analgesia strategies.",
]
for i, text in enumerate(takeaways):
    row = i % 4
    col = i // 4
    x = Inches(0.4) + col * Inches(6.5)
    y = Inches(1.4) + row * Inches(1.35)
    add_rect(s, x, y, Inches(6.0), Inches(1.25), fill_rgb=C_MID_BLUE)
    add_rect(s, x, y, Inches(0.18), Inches(1.25), fill_rgb=C_ACCENT)
    add_textbox(s, x + Inches(0.25), y + Inches(0.05), Inches(5.65), Inches(1.15),
                text, font_size=13, color=C_WHITE, v_anchor=MSO_ANCHOR.MIDDLE, wrap=True,
                margin_left=Inches(0.06), margin_top=Inches(0.04))
add_textbox(s, Inches(0.3), Inches(7.05), Inches(12.7), Inches(0.35),
            "Sources: Bailey & Love's Short Practice of Surgery 28e | Miller's Anesthesia 10e | Barash Clinical Anesthesia 9e | Sabiston Surgery | Roberts & Hedges Clinical Procedures in Emergency Medicine",
            font_size=9, color=C_GREY_LINE, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# Save
# ══════════════════════════════════════════════════════════════════════════════
out_path = "/tmp/workspace/local-anaesthesia-ppt/Local_Anaesthesia.pptx"
prs.save(out_path)
print(f"Saved: {out_path}")
print(f"Slide count: {len(prs.slides)}")
Running Command

cd /tmp/workspace/local-anaesthesia-ppt && python build_ppt.py 2>&1

Editing File

~/local-anaesthesia-ppt/build_ppt.py

Successfully replaced 1 instance(s) of the string in '/tmp/workspace/local-anaesthesia-ppt/build_ppt.py'
Running Command

cd /tmp/workspace/local-anaesthesia-ppt && python build_ppt.py 2>&1

Editing File

~/local-anaesthesia-ppt/build_ppt.py

Successfully replaced 1 instance(s) of the string in '/tmp/workspace/local-anaesthesia-ppt/build_ppt.py'
Running Command

cd /tmp/workspace/local-anaesthesia-ppt && python build_ppt.py 2>&1

Your presentation is ready:

Local Anaesthesia

Presentation · PPTX


Here is what's inside the 23-slide deck (16:9 widescreen, professional dark-blue/orange colour scheme):
#Slide
1Title slide
2Presentation overview / contents
3Definition & historical milestones (Koller 1884 → lidocaine 1943 → ultrasound era)
4Classification: Esters vs Amides (with memory tip)
5Physicochemical properties: pKa, lipophilicity, protein binding, ionisation
6Mechanism of action: Na⁺ channel blockade, differential nerve block, why LAs fail in inflamed tissue
7Pharmacokinetics: ADME for esters vs amides
8Drugs & maximum doses table (lidocaine, bupivacaine, ropivacaine, prilocaine, levobupivacaine, cocaine, chloroprocaine)
9Adjuvants: adrenaline (benefits + contraindications), dexamethasone, clonidine, liposomal bupivacaine
10Techniques overview: topical, infiltration, peripheral nerve blocks, neuraxial
11Peripheral nerve blocks in detail: upper limb, lower limb, fascial plane blocks, head & neck
12Neuraxial anaesthesia: spinal, epidural, caudal, CSE + safety principles
13Ultrasound-guided regional anaesthesia (UGRA)
14Clinical applications by specialty (general surgery, ortho, obstetrics, EM, ENT, dental)
15LAST: clinical progression, risk factors, drug-specific toxicity, prevention
16LAST management: ASRA 5-step protocol with 20% Intralipid dosing
17Complications: local vs systemic
18Special populations: paediatrics, obstetrics, hepatic/renal impairment, elderly, cardiac disease
19Drug interactions table
20Key evidence & clinical guidelines (ASRA, NICE, PROSPECT, Cochrane)
21Practical pearls for clinicians (6 topic boxes)
22Quick reference selection table by technique
23Key takeaways (8-point visual summary)
Sources: Bailey & Love's Surgery 28e, Miller's Anesthesia 10e, Barash Clinical Anesthesia 9e, Sabiston Textbook of Surgery, Roberts & Hedges Emergency Medicine.
This is a shared conversation. Sign in to Orris to start your own chat.