Kindly make ppt on Anesthetic management of thyroid surgery

Kindly make ppt on Anesthetic management of thyroid surgery , moderator Dr Mukesh patir Assistant professor Assam medical College and hospital Dibrugarh

Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Finding Sources
Finding Sources
Finding Sources
Running Command

mkdir -p /tmp/workspace/thyroid-anesthesia-ppt && ls /tmp/workspace/thyroid-anesthesia-ppt/

Writing File

~/thyroid-anesthesia-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 ─────────────────────────────────────────────────────────────
DARK_TEAL   = RGBColor(0x00, 0x5F, 0x73)   # header bars
MID_TEAL    = RGBColor(0x0A, 0x91, 0x96)   # accents / sub-headers
LIGHT_AQUA  = RGBColor(0xE0, 0xF7, 0xFA)   # content bg
WHITE       = RGBColor(0xFF, 0xFF, 0xFF)
DARK_TEXT   = RGBColor(0x1A, 0x1A, 0x2E)
GOLD        = RGBColor(0xE9, 0xC4, 0x6A)   # highlight
ORANGE      = RGBColor(0xF4, 0xA2, 0x61)

prs = Presentation()
prs.slide_width  = Inches(13.333)
prs.slide_height = Inches(7.5)
blank = prs.slide_layouts[6]

# ── Helper functions ────────────────────────────────────────────────────────────
def add_rect(slide, x, y, w, h, color):
    shape = slide.shapes.add_shape(1, Inches(x), Inches(y), Inches(w), Inches(h))
    shape.fill.solid()
    shape.fill.fore_color.rgb = color
    shape.line.fill.background()
    return shape

def add_tb(slide, text, x, y, w, h, size, bold=False, color=WHITE,
           align=PP_ALIGN.LEFT, italic=False, wrap=True):
    tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
    tf = tb.text_frame
    tf.word_wrap = wrap
    tf.margin_left = Pt(4)
    tf.margin_right = Pt(4)
    tf.margin_top = Pt(2)
    tf.margin_bottom = Pt(2)
    p = tf.paragraphs[0]
    p.alignment = align
    run = p.add_run()
    run.text = text
    run.font.size = Pt(size)
    run.font.bold = bold
    run.font.italic = italic
    run.font.color.rgb = color
    run.font.name = "Calibri"
    return tb

def add_bullet_box(slide, items, x, y, w, h, title=None, title_size=16,
                   bullet_size=14, bg_color=LIGHT_AQUA, title_color=DARK_TEAL,
                   bullet_color=DARK_TEXT, symbol="•"):
    """Draw a coloured box with optional title and bullet list."""
    box = slide.shapes.add_shape(1, Inches(x), Inches(y), Inches(w), Inches(h))
    box.fill.solid()
    box.fill.fore_color.rgb = bg_color
    box.line.color.rgb = MID_TEAL
    box.line.width = Pt(1)

    tb = slide.shapes.add_textbox(Inches(x+0.12), Inches(y+0.08), Inches(w-0.24), Inches(h-0.16))
    tf = tb.text_frame
    tf.word_wrap = True
    tf.margin_left = Pt(4)
    tf.margin_top = Pt(2)

    if title:
        p = tf.paragraphs[0]
        p.alignment = PP_ALIGN.LEFT
        run = p.add_run()
        run.text = title
        run.font.size = Pt(title_size)
        run.font.bold = True
        run.font.color.rgb = title_color
        run.font.name = "Calibri"

    for item in items:
        p = tf.add_paragraph()
        p.alignment = PP_ALIGN.LEFT
        run = p.add_run()
        run.text = f"{symbol}  {item}"
        run.font.size = Pt(bullet_size)
        run.font.color.rgb = bullet_color
        run.font.name = "Calibri"
        p.space_before = Pt(3)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 1 – TITLE
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)

# Background gradient-like layers
add_rect(slide, 0, 0, 13.333, 7.5, DARK_TEAL)
add_rect(slide, 0, 0, 13.333, 7.5, RGBColor(0x00, 0x3D, 0x4F))

# Decorative top stripe
add_rect(slide, 0, 0, 13.333, 0.35, GOLD)

# White card
add_rect(slide, 1.1, 0.8, 11.1, 5.2, WHITE)

# Title
add_tb(slide, "Anesthetic Management of Thyroid Surgery",
       1.3, 1.1, 10.7, 1.8, 34, bold=True, color=DARK_TEAL, align=PP_ALIGN.CENTER)

# Horizontal rule
add_rect(slide, 2.5, 2.95, 8.3, 0.04, GOLD)

# Subtitle
add_tb(slide, "A Comprehensive Perioperative Approach",
       1.3, 3.1, 10.7, 0.7, 20, bold=False, color=MID_TEAL, align=PP_ALIGN.CENTER, italic=True)

# Moderator
add_tb(slide, "Moderator:",
       3.5, 3.95, 6, 0.45, 15, bold=True, color=DARK_TEXT, align=PP_ALIGN.CENTER)
add_tb(slide, "Dr. Mukesh Patir",
       3.5, 4.35, 6, 0.5, 18, bold=True, color=DARK_TEAL, align=PP_ALIGN.CENTER)
add_tb(slide, "Assistant Professor, Department of Anaesthesiology",
       2.0, 4.8, 9.3, 0.45, 13, color=DARK_TEXT, align=PP_ALIGN.CENTER)
add_tb(slide, "Assam Medical College and Hospital, Dibrugarh",
       2.0, 5.2, 9.3, 0.45, 13, bold=True, color=DARK_TEXT, align=PP_ALIGN.CENTER)

# Bottom stripe
add_rect(slide, 0, 7.1, 13.333, 0.4, MID_TEAL)
add_tb(slide, "Department of Anaesthesiology  |  AMCH Dibrugarh",
       0, 7.12, 13.333, 0.35, 11, color=WHITE, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 2 – OVERVIEW / CONTENTS
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, RGBColor(0xF5, 0xF9, 0xFA))
add_rect(slide, 0, 0, 13.333, 1.05, DARK_TEAL)
add_rect(slide, 0, 1.05, 13.333, 0.06, GOLD)
add_tb(slide, "Overview", 0.3, 0.15, 12.7, 0.8, 30, bold=True, color=WHITE)

contents = [
    "1.  Surgical Indications for Thyroidectomy",
    "2.  Surgical Anatomy Relevant to Anaesthesia",
    "3.  Pre-operative Assessment",
    "4.  Preoperative Optimization – Hyperthyroidism & Hypothyroidism",
    "5.  Airway Assessment & Management",
    "6.  Anaesthetic Technique – Induction, Maintenance & Monitoring",
    "7.  Intraoperative Considerations",
    "8.  Nerve Integrity Monitor (NIM) ETT",
    "9.  Positioning & Surgical Setup",
    "10. Postoperative Care & Complications",
    "11. Thyroid Storm – Recognition & Treatment",
    "12. Special Scenarios & Summary",
]
add_bullet_box(slide, contents, 0.5, 1.3, 12.3, 5.9, bullet_size=15,
               bg_color=WHITE, symbol="►", bullet_color=DARK_TEXT)

add_rect(slide, 0, 7.1, 13.333, 0.4, DARK_TEAL)
add_tb(slide, "Anesthetic Management of Thyroid Surgery  |  AMCH Dibrugarh", 0, 7.12, 13.333, 0.35, 10, color=WHITE, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 3 – SURGICAL INDICATIONS
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, RGBColor(0xF5, 0xF9, 0xFA))
add_rect(slide, 0, 0, 13.333, 1.05, DARK_TEAL)
add_rect(slide, 0, 1.05, 13.333, 0.06, GOLD)
add_tb(slide, "Surgical Indications for Thyroidectomy", 0.3, 0.15, 12.7, 0.8, 26, bold=True, color=WHITE)

left_items = [
    "Thyroid cancer (papillary, follicular, medullary, anaplastic)",
    "Failed medical therapy for hyperthyroidism",
    "Large symptomatic goiter with compressive symptoms",
    "Suspicious thyroid nodule (indeterminate cytology)",
    "Toxic multinodular goiter",
    "Graves' disease – definitive surgical treatment",
]
right_items = [
    "Substernal / retrosternal goiter",
    "Cosmetically unacceptable goiter",
    "Patient preference / intolerance to radioiodine",
    "Pregnancy with uncontrolled hyperthyroidism",
    "Minimally invasive procedures increasingly performed:",
    "  – Robot-assisted transaxillary thyroidectomy",
    "  – Transoral thyroidectomy (requires nasal intubation)",
]

add_bullet_box(slide, left_items, 0.4, 1.3, 6.0, 4.6, title="Common Indications",
               bullet_size=13.5, bg_color=LIGHT_AQUA)
add_bullet_box(slide, right_items, 6.7, 1.3, 6.2, 4.6, title="Additional / Emerging",
               bullet_size=13.5, bg_color=RGBColor(0xFD, 0xF6, 0xEC))

add_rect(slide, 0, 7.1, 13.333, 0.4, DARK_TEAL)
add_tb(slide, "Anesthetic Management of Thyroid Surgery  |  AMCH Dibrugarh", 0, 7.12, 13.333, 0.35, 10, color=WHITE, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 4 – SURGICAL ANATOMY RELEVANT TO ANAESTHESIA
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, RGBColor(0xF5, 0xF9, 0xFA))
add_rect(slide, 0, 0, 13.333, 1.05, DARK_TEAL)
add_rect(slide, 0, 1.05, 13.333, 0.06, GOLD)
add_tb(slide, "Surgical Anatomy Relevant to Anaesthesia", 0.3, 0.15, 12.7, 0.8, 26, bold=True, color=WHITE)

left_items = [
    "Thyroid gland: two lobes + isthmus at C5–T1",
    "Closely related to trachea and larynx",
    "Recurrent Laryngeal Nerve (RLN):",
    "  – Runs in tracheoesophageal groove",
    "  – Motor supply to all intrinsic laryngeal muscles (except cricothyroid)",
    "  – At risk during thyroidectomy",
    "Superior Laryngeal Nerve (SLN):",
    "  – External branch: cricothyroid muscle",
    "  – Internal branch: sensory to supraglottis",
]
right_items = [
    "Parathyroid glands (usually 4) lie posterior to thyroid",
    "Inadvertent removal → hypoparathyroidism → hypocalcaemia",
    "Superior thyroid artery (branch of external carotid)",
    "Inferior thyroid artery (branch of thyrocervical trunk)",
    "Thyroidea ima (in ~10%) from brachiocephalic / aorta",
    "Large substernal goiters may behave as anterior mediastinal mass",
    "CT/MRI review essential before surgery for retrosternal extension",
]
add_bullet_box(slide, left_items, 0.4, 1.3, 6.0, 5.4, title="Key Structures",
               bullet_size=12.5, bg_color=LIGHT_AQUA)
add_bullet_box(slide, right_items, 6.7, 1.3, 6.2, 5.4, title="Anaesthetic Relevance",
               bullet_size=12.5, bg_color=RGBColor(0xFD, 0xF6, 0xEC))

add_rect(slide, 0, 7.1, 13.333, 0.4, DARK_TEAL)
add_tb(slide, "Anesthetic Management of Thyroid Surgery  |  AMCH Dibrugarh", 0, 7.12, 13.333, 0.35, 10, color=WHITE, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 5 – PRE-OPERATIVE ASSESSMENT
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, RGBColor(0xF5, 0xF9, 0xFA))
add_rect(slide, 0, 0, 13.333, 1.05, DARK_TEAL)
add_rect(slide, 0, 1.05, 13.333, 0.06, GOLD)
add_tb(slide, "Pre-operative Assessment", 0.3, 0.15, 12.7, 0.8, 26, bold=True, color=WHITE)

col1 = [
    "Thyroid function tests: TSH, free T3, free T4",
    "Serum calcium & phosphate",
    "Full blood count, coagulation profile",
    "ECG – check for AF, tachyarrhythmia",
    "Indirect laryngoscopy – vocal cord assessment",
    "Review current medications (antithyroid, beta-blockers, steroids)",
]
col2 = [
    "Airway assessment: Mallampati, thyromental distance, neck mobility",
    "Review CT/MRI for tracheal deviation, compression, substernal extension",
    "Assess tracheal compression degree (Maran grading)",
    "Endoscopic airway evaluation for large / compressive goiters",
    "Cardiovascular status: echo if AF, cardiac failure suspected",
    "Pulmonary function tests if significant tracheal compression",
]
col3 = [
    "Thyroid cancer ↑ risk of difficult intubation",
    "Goiter size alone is NOT predictive of difficult intubation",
    "Incidence of difficult intubation in goiter surgery: 5–8%",
    "Awake intubation if: large goiter + airway obstruction + tracheal deviation",
    "Substernal goiter: risk of intrathoracic airway obstruction after GA induction",
    "Discuss plan with surgeon before induction",
]

add_bullet_box(slide, col1, 0.3, 1.3, 4.1, 5.4, title="Investigations", bullet_size=12, bg_color=LIGHT_AQUA)
add_bullet_box(slide, col2, 4.65, 1.3, 4.1, 5.4, title="Airway & Imaging", bullet_size=12, bg_color=RGBColor(0xFD, 0xF6, 0xEC))
add_bullet_box(slide, col3, 9.0, 1.3, 4.0, 5.4, title="Key Concerns", bullet_size=12, bg_color=RGBColor(0xFF, 0xF0, 0xF0))

add_rect(slide, 0, 7.1, 13.333, 0.4, DARK_TEAL)
add_tb(slide, "Anesthetic Management of Thyroid Surgery  |  AMCH Dibrugarh", 0, 7.12, 13.333, 0.35, 10, color=WHITE, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 6 – PREOPERATIVE OPTIMIZATION – HYPERTHYROIDISM
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, RGBColor(0xF5, 0xF9, 0xFA))
add_rect(slide, 0, 0, 13.333, 1.05, DARK_TEAL)
add_rect(slide, 0, 1.05, 13.333, 0.06, GOLD)
add_tb(slide, "Preoperative Optimization – Hyperthyroidism", 0.3, 0.15, 12.7, 0.8, 26, bold=True, color=WHITE)

# Goal statement
add_rect(slide, 0.4, 1.25, 12.5, 0.6, DARK_TEAL)
add_tb(slide, "Goal: Achieve euthyroid state before elective surgery to prevent thyroid storm",
       0.5, 1.28, 12.3, 0.55, 14, bold=True, color=GOLD, align=PP_ALIGN.CENTER)

medical = [
    "Antithyroid drugs (thionamides):",
    "  – Carbimazole / Methimazole: 10–40 mg/day",
    "  – Propylthiouracil (PTU): 100–600 mg/day",
    "  – PTU also inhibits peripheral T4 → T3 conversion",
    "Beta-blockers (Propranolol 40–160 mg/day):",
    "  – Control tachycardia, tremor, anxiety",
    "  – Continue until day of surgery",
    "Iodine (Lugol's iodine) 5–7 days before surgery:",
    "  – Reduces thyroid vascularity (Wolff-Chaikoff effect)",
    "  – Decreases intraoperative blood loss",
    "Target: Heart rate < 80 bpm; euthyroid status confirmed",
]
signs = [
    "Sinus tachycardia / Atrial fibrillation",
    "Myocardial ischemia",
    "Congestive heart failure",
    "Nervousness, tremulousness, insomnia",
    "Heat intolerance, weight loss",
    "Goiter, exophthalmos (Graves' disease)",
    "Operating on acutely hyperthyroid gland",
    "  → may provoke thyroid storm",
    "Do NOT induce GA in uncontrolled hyperthyroid state",
]
add_bullet_box(slide, medical, 0.4, 1.95, 7.0, 5.0, title="Medical Optimization",
               bullet_size=12.5, bg_color=LIGHT_AQUA)
add_bullet_box(slide, signs, 7.65, 1.95, 5.3, 5.0, title="Clinical Signs & Risks",
               bullet_size=12.5, bg_color=RGBColor(0xFF, 0xF0, 0xF0))

add_rect(slide, 0, 7.1, 13.333, 0.4, DARK_TEAL)
add_tb(slide, "Anesthetic Management of Thyroid Surgery  |  AMCH Dibrugarh", 0, 7.12, 13.333, 0.35, 10, color=WHITE, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 7 – PREOPERATIVE OPTIMIZATION – HYPOTHYROIDISM
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, RGBColor(0xF5, 0xF9, 0xFA))
add_rect(slide, 0, 0, 13.333, 1.05, DARK_TEAL)
add_rect(slide, 0, 1.05, 13.333, 0.06, GOLD)
add_tb(slide, "Preoperative Optimization – Hypothyroidism", 0.3, 0.15, 12.7, 0.8, 26, bold=True, color=WHITE)

features = [
    "Bradycardia, decreased cardiac output",
    "Increased peripheral vascular resistance",
    "Low voltage ECG (pericardial effusion)",
    "Depressed ventilatory response to hypoxia/hypercapnia",
    "Lethargy, cold intolerance, slow mentation",
    "Anemia, coagulopathy, hypothermia",
    "Enhanced sensitivity to anesthetic agents, opioids & sedatives",
    "Delayed drug metabolism → prolonged drug action",
    "Risk of postoperative ventilatory failure if severe",
]
management = [
    "Elective surgery: optimize thyroid status first",
    "Levothyroxine (T4) replacement: 1.6 mcg/kg/day",
    "Allow 4–6 weeks for full optimization",
    "Mild-moderate hypothyroidism: surgery generally safe",
    "Severe hypothyroidism / myxedema coma: postpone elective surgery",
    "Emergency surgery: IV levothyroxine + hydrocortisone",
    "Intraoperatively: expect slow metabolism of drugs",
    "Avoid hypothermia; active warming measures",
    "Monitor for hypoglycaemia and hyponatraemia",
]
add_bullet_box(slide, features, 0.4, 1.3, 6.0, 5.6, title="Features Relevant to Anaesthesia",
               bullet_size=13, bg_color=LIGHT_AQUA)
add_bullet_box(slide, management, 6.7, 1.3, 6.2, 5.6, title="Perioperative Management",
               bullet_size=13, bg_color=RGBColor(0xFD, 0xF6, 0xEC))

add_rect(slide, 0, 7.1, 13.333, 0.4, DARK_TEAL)
add_tb(slide, "Anesthetic Management of Thyroid Surgery  |  AMCH Dibrugarh", 0, 7.12, 13.333, 0.35, 10, color=WHITE, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 8 – AIRWAY ASSESSMENT & MANAGEMENT
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, RGBColor(0xF5, 0xF9, 0xFA))
add_rect(slide, 0, 0, 13.333, 1.05, DARK_TEAL)
add_rect(slide, 0, 1.05, 13.333, 0.06, GOLD)
add_tb(slide, "Airway Assessment & Management", 0.3, 0.15, 12.7, 0.8, 26, bold=True, color=WHITE)

assessment = [
    "Mallampati class, mouth opening, neck mobility",
    "Thyromental distance (< 6 cm = difficult)",
    "Tracheal deviation (clinical exam + CXR/CT)",
    "Degree of airway obstruction (stridor, orthopnea)",
    "Indirect/direct laryngoscopy – pre-op vocal cord assessment",
    "CT/MRI: tracheal narrowing, substernal extension",
    "Flow-volume loop: intrathoracic vs. extrathoracic obstruction",
]
techniques = [
    "Standard RSI / modified RSI for most elective cases",
    "Video laryngoscopy preferred for anticipated difficult airway",
    "Awake fibreoptic intubation (AFOI) for:",
    "  – Large goiter + significant tracheal compression",
    "  – Stridor at rest or with exertion",
    "  – Tracheal deviation with compression",
    "  – Previous difficult airway history",
    "LMA: increasingly used; allows spontaneous ventilation",
    "  – Enables real-time vocal cord monitoring",
    "Nasal intubation required for transoral thyroidectomy",
    "Armoured (reinforced) ETT: reduces kinking in neck position",
    "NIM-ETT if intraoperative neural monitoring planned",
]
substernal = [
    "Behave like anterior mediastinal masses",
    "Risk of intrathoracic airway obstruction post-induction",
    "Avoid paralysis until airway secured",
    "Consider AFOI or inhalational induction (Sevoflurane)",
    "Have surgical team ready for emergency sternotomy",
    "Standby for rigid bronchoscopy",
]
add_bullet_box(slide, assessment, 0.3, 1.25, 4.1, 5.6, title="Airway Assessment",
               bullet_size=12, bg_color=LIGHT_AQUA)
add_bullet_box(slide, techniques, 4.65, 1.25, 4.7, 5.6, title="Intubation Strategy",
               bullet_size=12, bg_color=RGBColor(0xFD, 0xF6, 0xEC))
add_bullet_box(slide, substernal, 9.55, 1.25, 3.5, 5.6, title="Substernal Goiter",
               bullet_size=12, bg_color=RGBColor(0xFF, 0xF0, 0xF0))

add_rect(slide, 0, 7.1, 13.333, 0.4, DARK_TEAL)
add_tb(slide, "Anesthetic Management of Thyroid Surgery  |  AMCH Dibrugarh", 0, 7.12, 13.333, 0.35, 10, color=WHITE, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 9 – ANAESTHETIC TECHNIQUE
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, RGBColor(0xF5, 0xF9, 0xFA))
add_rect(slide, 0, 0, 13.333, 1.05, DARK_TEAL)
add_rect(slide, 0, 1.05, 13.333, 0.06, GOLD)
add_tb(slide, "Anaesthetic Technique", 0.3, 0.15, 12.7, 0.8, 26, bold=True, color=WHITE)

premedication = [
    "Anxiolytic: Midazolam 1–2 mg IV (with caution in hypothyroid)",
    "Continue beta-blockers until day of surgery",
    "Continue antithyroid drugs",
    "Antisialagogue: Glycopyrrolate 0.2 mg IM/IV",
    "H2 antagonist: Ranitidine if risk of regurgitation",
    "Antiemetic premedication (PONV risk is high in thyroid surgery)",
]
induction = [
    "Standard: IV induction with Propofol (1.5–2.5 mg/kg)",
    "Fentanyl 1–2 mcg/kg for analgesia",
    "Muscle relaxant:",
    "  – Succinylcholine 1.5 mg/kg for RSI",
    "  – Rocuronium 0.6 mg/kg (if NIM not used)",
    "  – If NIM-ETT: Succinylcholine only for intubation",
    "    (no further NMB post-intubation)",
    "Inhalational induction (Sevoflurane) for:",
    "  – Anticipated difficult airway / substernal goiter",
    "  – Paediatric patients",
]
maintenance = [
    "Inhalational: Isoflurane / Sevoflurane in O2/Air",
    "TIVA: Propofol infusion + Remifentanil (good haemodynamic control)",
    "Avoid high-dose volatile agents in hyperthyroid patients",
    "Muscle relaxation: Avoid if NIM monitoring used",
    "If NMB used: sugammadex for reversal",
    "Monitoring:",
    "  – Standard: NIBP, ECG, SpO2, EtCO2, temperature",
    "  – Consider: IBP (unstable hyperthyroid, cardiac disease)",
    "  – NIM-ETT waveform monitoring",
    "  – Depth of anaesthesia (BIS) for TIVA",
]
add_bullet_box(slide, premedication, 0.3, 1.25, 3.9, 5.6, title="Premedication",
               bullet_size=11.5, bg_color=LIGHT_AQUA)
add_bullet_box(slide, induction, 4.42, 1.25, 4.3, 5.6, title="Induction",
               bullet_size=11.5, bg_color=RGBColor(0xFD, 0xF6, 0xEC))
add_bullet_box(slide, maintenance, 8.95, 1.25, 4.1, 5.6, title="Maintenance & Monitoring",
               bullet_size=11.5, bg_color=RGBColor(0xF0, 0xF8, 0xF0))

add_rect(slide, 0, 7.1, 13.333, 0.4, DARK_TEAL)
add_tb(slide, "Anesthetic Management of Thyroid Surgery  |  AMCH Dibrugarh", 0, 7.12, 13.333, 0.35, 10, color=WHITE, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 10 – NIM-ETT & INTRAOPERATIVE NEURAL MONITORING
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, RGBColor(0xF5, 0xF9, 0xFA))
add_rect(slide, 0, 0, 13.333, 1.05, DARK_TEAL)
add_rect(slide, 0, 1.05, 13.333, 0.06, GOLD)
add_tb(slide, "Nerve Integrity Monitor (NIM) ETT &\nIntraoperative Neural Monitoring (IONM)", 0.3, 0.1, 12.7, 0.92, 24, bold=True, color=WHITE)

nim = [
    "NIM-ETT: Specialised ETT with surface electrodes near vocal cords",
    "Electrodes record EMG activity from vocalis muscles",
    "Surgeon stimulates structures suspected to be RLN",
    "Positive signal: EMG waveform + audible tone → confirms RLN",
    "Helps preserve recurrent laryngeal nerve function",
    "Also allows post-dissection mapping before nerve section",
    "Requires correct positioning: electrodes at 15–20 mm from cords",
    "Verify position after head/neck repositioning for surgical exposure",
]
drug = [
    "Succinylcholine or small dose Rocuronium acceptable for intubation",
    "After intubation: NO further neuromuscular blocking drugs",
    "Residual NMB will abolish EMG signals → false negatives",
    "Use train-of-four (TOF) monitoring to confirm full recovery",
    "Spontaneous ventilation assists EMG quality during IONM",
    "Avoid deep volatile anaesthesia: may suppress EMG",
    "Remifentanil infusion useful for haemodynamic stability without NMB",
]
limitations = [
    "False positives: ETT movement, electrical interference",
    "False negatives: residual NMB, incorrect ETT position",
    "Does not prevent RLN injury – only monitors it",
    "Laryngeal LMA as alternative: allows real-time vocal cord visualisation",
    "Bilateral RLN injury: rare but mandates immediate reintubation",
]
add_bullet_box(slide, nim, 0.3, 1.25, 5.8, 5.6, title="NIM-ETT – Principle & Use",
               bullet_size=12.5, bg_color=LIGHT_AQUA)
add_bullet_box(slide, drug, 6.35, 1.25, 3.8, 5.6, title="Drug Considerations",
               bullet_size=12.5, bg_color=RGBColor(0xFD, 0xF6, 0xEC))
add_bullet_box(slide, limitations, 10.35, 1.25, 2.7, 5.6, title="Limitations",
               bullet_size=11.5, bg_color=RGBColor(0xFF, 0xF0, 0xF0))

add_rect(slide, 0, 7.1, 13.333, 0.4, DARK_TEAL)
add_tb(slide, "Anesthetic Management of Thyroid Surgery  |  AMCH Dibrugarh", 0, 7.12, 13.333, 0.35, 10, color=WHITE, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 11 – POSITIONING & INTRAOPERATIVE CONSIDERATIONS
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, RGBColor(0xF5, 0xF9, 0xFA))
add_rect(slide, 0, 0, 13.333, 1.05, DARK_TEAL)
add_rect(slide, 0, 1.05, 13.333, 0.06, GOLD)
add_tb(slide, "Positioning & Intraoperative Considerations", 0.3, 0.15, 12.7, 0.8, 26, bold=True, color=WHITE)

positioning = [
    "Supine with neck extended (shoulder roll)",
    "Table tilt: 15–20° reverse Trendelenburg",
    "  – Reduces venous congestion in neck",
    "  – Reduces bleeding",
    "Arm board: arms tucked by side",
    "Eye protection: taping mandatory",
    "Risk of venous air embolism (VAE):",
    "  – Head elevated + venous channels open",
    "  – Monitor with EtCO2 + capnography",
    "  – Have left lateral position + aspiration ready",
]
intraop = [
    "Haemostasis: controlled normotension preferred",
    "Avoid hypertension (risk of venous bleeding/hematoma)",
    "Antibiotic prophylaxis: Cefazolin 1g IV before incision",
    "Temperature monitoring: maintain normothermia",
    "Fluid management: restrict crystalloids in neck surgery",
    "Dexamethasone 8 mg IV: reduces oedema + PONV",
    "Blood loss: usually minimal (<100 mL) but can be significant in large goiters",
    "Surgeon may use Lugol's iodine soaked packs (warn team)",
    "Avoid high airway pressures: may mask surgical complications",
]
add_bullet_box(slide, positioning, 0.4, 1.3, 6.0, 5.5, title="Patient Positioning",
               bullet_size=13, bg_color=LIGHT_AQUA)
add_bullet_box(slide, intraop, 6.7, 1.3, 6.2, 5.5, title="Intraoperative Management",
               bullet_size=13, bg_color=RGBColor(0xFD, 0xF6, 0xEC))

add_rect(slide, 0, 7.1, 13.333, 0.4, DARK_TEAL)
add_tb(slide, "Anesthetic Management of Thyroid Surgery  |  AMCH Dibrugarh", 0, 7.12, 13.333, 0.35, 10, color=WHITE, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 12 – EXTUBATION & POSTOPERATIVE CARE
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, RGBColor(0xF5, 0xF9, 0xFA))
add_rect(slide, 0, 0, 13.333, 1.05, DARK_TEAL)
add_rect(slide, 0, 1.05, 13.333, 0.06, GOLD)
add_tb(slide, "Extubation & Postoperative Care", 0.3, 0.15, 12.7, 0.8, 26, bold=True, color=WHITE)

extubation = [
    "Optimal conditions essential for safe extubation",
    "Smooth emergence – avoid coughing/bucking:",
    "  – Remifentanil infusion 0.01–0.05 mcg/kg/min at extubation",
    "  – IV Lidocaine 1–1.5 mg/kg before suctioning",
    "  – Dexmedetomidine infusion",
    "Deep extubation: avoids straining but risk of airway obstruction",
    "Before extubation: check for vocal cord movement",
    "  – Ask patient to say 'E' sound (awake extubation)",
    "  – Evaluate by laryngoscopy / fibreoptic check",
    "Cuff leak test: may identify subglottic oedema",
    "Reintubation equipment MUST be immediately available",
]
complications = [
    "HAEMATOMA FORMATION (most dangerous early complication):",
    "  – Can cause rapid airway compromise",
    "  – Open wound at bedside if stridor/distress",
    "  – Immediate surgical re-exploration",
    "RECURRENT LARYNGEAL NERVE INJURY:",
    "  – Unilateral: hoarseness, weak voice",
    "  – Bilateral: stridor, aphonia → emergency reintubation",
    "TRACHEOMALACIA:",
    "  – Post-decompression collapse after substernal goiter removal",
    "  – May need immediate reintubation / tracheostomy",
    "HYPOCALCAEMIA (hypoparathyroidism):",
    "  – Onset 24–96 hours post-op",
    "  – Circumoral numbness, carpopedal spasm, Chvostek's sign",
    "  – Laryngeal stridor → laryngospasm (early sign!)",
    "  – Treat: IV calcium gluconate / calcium chloride",
    "PNEUMOTHORAX: after substernal goiter excision",
]
add_bullet_box(slide, extubation, 0.3, 1.25, 5.5, 5.7, title="Extubation Strategy",
               bullet_size=11.5, bg_color=LIGHT_AQUA)
add_bullet_box(slide, complications, 6.1, 1.25, 6.9, 5.7, title="Postoperative Complications",
               bullet_size=11, bg_color=RGBColor(0xFF, 0xF0, 0xF0))

add_rect(slide, 0, 7.1, 13.333, 0.4, DARK_TEAL)
add_tb(slide, "Anesthetic Management of Thyroid Surgery  |  AMCH Dibrugarh", 0, 7.12, 13.333, 0.35, 10, color=WHITE, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 13 – THYROID STORM
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, RGBColor(0xF5, 0xF9, 0xFA))
add_rect(slide, 0, 0, 13.333, 1.05, RGBColor(0x8B, 0x00, 0x00))
add_rect(slide, 0, 1.05, 13.333, 0.06, GOLD)
add_tb(slide, "Thyroid Storm (Thyrotoxic Crisis) – Recognition & Management", 0.3, 0.15, 12.7, 0.8, 24, bold=True, color=WHITE)

# Alert banner
add_rect(slide, 0.4, 1.2, 12.5, 0.55, RGBColor(0xFF, 0xCC, 0x00))
add_tb(slide, "⚠  MEDICAL EMERGENCY – Life-threatening exacerbation of hyperthyroidism; most common in undiagnosed or undertreated patients",
       0.5, 1.22, 12.3, 0.5, 12.5, bold=True, color=DARK_TEXT, align=PP_ALIGN.CENTER)

features = [
    "HYPERTHERMIA (fever > 38.5°C, often > 40°C)",
    "Tachycardia / Tachyarrhythmia (HR > 140/min)",
    "Atrial fibrillation / dysrhythmias",
    "Myocardial ischemia / congestive heart failure",
    "Agitation, confusion, delirium, coma",
    "Nausea, vomiting, diarrhoea, abdominal pain",
    "Profuse diaphoresis",
    "Triggers: surgery, trauma, infection, iodine load",
    "No single diagnostic lab test – clinical diagnosis",
    "Burch-Wartofsky Point Scale (BWPS) used for scoring",
]
treatment = [
    "REMOVE / TREAT PRECIPITATING CAUSE",
    "Step 1 – Beta-blocker (FIRST drug):",
    "  Propranolol 1–2 mg IV bolus every 10–15 min",
    "  Or Esmolol infusion (rate control)",
    "Step 2 – Thionamide (1 hour after beta-blocker):",
    "  PTU 200 mg PO/NG q4h (also blocks T4→T3 conversion)",
    "  Or Methimazole 20–40 mg q4–6h",
    "Step 3 – Iodine (at least 1 hour after thionamide):",
    "  Lugol's iodine 10 drops TID or SSKI",
    "Step 4 – Glucocorticoid:",
    "  Dexamethasone 2 mg IV q6h (blocks T4→T3 conversion)",
    "Supportive: cooling blankets, paracetamol (NOT aspirin)",
    "IV fluids + electrolyte correction",
    "Differentiate from: MH, phaeochromocytoma, NMS, light anaesthesia",
]
add_bullet_box(slide, features, 0.3, 1.9, 5.5, 5.0, title="Clinical Features",
               bullet_size=12, bg_color=RGBColor(0xFF, 0xF0, 0xF0))
add_bullet_box(slide, treatment, 6.1, 1.9, 6.9, 5.0, title="Treatment – Sequential Steps",
               bullet_size=11.5, bg_color=RGBColor(0xFD, 0xF6, 0xEC))

add_rect(slide, 0, 7.1, 13.333, 0.4, RGBColor(0x8B, 0x00, 0x00))
add_tb(slide, "Anesthetic Management of Thyroid Surgery  |  AMCH Dibrugarh", 0, 7.12, 13.333, 0.35, 10, color=WHITE, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 14 – REGIONAL ANAESTHESIA / SPECIAL TECHNIQUES
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, RGBColor(0xF5, 0xF9, 0xFA))
add_rect(slide, 0, 0, 13.333, 1.05, DARK_TEAL)
add_rect(slide, 0, 1.05, 13.333, 0.06, GOLD)
add_tb(slide, "Regional Anaesthesia & Special Considerations", 0.3, 0.15, 12.7, 0.8, 26, bold=True, color=WHITE)

regional = [
    "Bilateral superficial cervical plexus block (BSCPB):",
    "  – Limited / minimally invasive thyroidectomy",
    "  – Landmark or ultrasound guided",
    "  – LA: Bupivacaine 0.25% + Lignocaine 1%",
    "  – Covers C2–C4 dermatomes",
    "  – May require sedation (Dexmedetomidine / Midazolam)",
    "Deep cervical plexus block: higher risk (VA, PN block)",
    "BSCPB advantages: reduces opioid requirement, early discharge",
    "LMA with spontaneous ventilation:",
    "  – Increasingly used for standard thyroidectomy",
    "  – Enables real-time vocal cord function assessment",
]
special = [
    "PAEDIATRIC THYROIDECTOMY:",
    "  – Inhalational induction (Sevoflurane)",
    "  – Weight-based drug dosing",
    "  – Smaller ETT; risk of subglottic oedema",
    "PREGNANCY:",
    "  – Thyroid surgery preferably 2nd trimester",
    "  – Avoid teratogenic drugs (first trimester)",
    "  – Fetal heart rate monitoring intraoperatively",
    "EMERGENCY THYROIDECTOMY / THYROID CANCER:",
    "  – Higher risk of difficult airway",
    "  – Plan for awake fibreoptic intubation",
    "  – Multidisciplinary team approach",
    "MINIMALLY INVASIVE / ROBOTIC THYROIDECTOMY:",
    "  – Transaxillary: standard ETT",
    "  – Transoral: nasal intubation mandatory",
    "  – CO2 insufflation: monitor EtCO2 carefully",
]
add_bullet_box(slide, regional, 0.3, 1.3, 6.0, 5.6, title="Regional Techniques",
               bullet_size=12, bg_color=LIGHT_AQUA)
add_bullet_box(slide, special, 6.6, 1.3, 6.4, 5.6, title="Special Patient Groups",
               bullet_size=12, bg_color=RGBColor(0xFD, 0xF6, 0xEC))

add_rect(slide, 0, 7.1, 13.333, 0.4, DARK_TEAL)
add_tb(slide, "Anesthetic Management of Thyroid Surgery  |  AMCH Dibrugarh", 0, 7.12, 13.333, 0.35, 10, color=WHITE, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 15 – ANALGESIA & PONV MANAGEMENT
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, RGBColor(0xF5, 0xF9, 0xFA))
add_rect(slide, 0, 0, 13.333, 1.05, DARK_TEAL)
add_rect(slide, 0, 1.05, 13.333, 0.06, GOLD)
add_tb(slide, "Postoperative Analgesia & PONV Management", 0.3, 0.15, 12.7, 0.8, 26, bold=True, color=WHITE)

analgesia = [
    "Thyroid surgery: mild-moderate postoperative pain",
    "Multimodal analgesia preferred:",
    "  – Paracetamol 1g IV q6h (regular)",
    "  – NSAIDs: Diclofenac / Ketorolac (if no contraindication)",
    "  – Tramadol 50–100 mg IV q6h PRN",
    "  – Morphine 2–4 mg IV PRN (use cautiously – opioid-sparing preferable)",
    "Bilateral superficial cervical plexus block:",
    "  – Reduces postop opioid consumption significantly",
    "Dexamethasone 8 mg IV: analgesic + antiemetic + reduces oedema",
    "IV Lignocaine infusion: opioid-sparing, reduces PONV",
    "Avoid excess opioids: risk of respiratory depression",
    "Wound infiltration: local anaesthetic by surgeon",
]
ponv = [
    "Thyroid surgery = HIGH PONV risk procedure",
    "Risk factors: Female sex, non-smoker, history of PONV/motion sickness",
    "Opioid use adds further risk",
    "Apfel score ≥ 2: multimodal prophylaxis",
    "Prophylaxis regimen:",
    "  – Dexamethasone 8 mg IV at induction",
    "  – Ondansetron 4 mg IV at end of surgery",
    "  – Consider Droperidol 0.625–1.25 mg IV",
    "  – Scopolamine patch (transdermal) if high risk",
    "TIVA with Propofol: reduces baseline PONV vs. volatile agents",
    "Adequate hydration reduces PONV",
    "Treat with: Ondansetron, Metoclopramide, Promethazine",
]
add_bullet_box(slide, analgesia, 0.3, 1.3, 6.3, 5.6, title="Postoperative Analgesia",
               bullet_size=12, bg_color=LIGHT_AQUA)
add_bullet_box(slide, ponv, 6.85, 1.3, 6.1, 5.6, title="PONV Prophylaxis & Treatment",
               bullet_size=12, bg_color=RGBColor(0xFD, 0xF6, 0xEC))

add_rect(slide, 0, 7.1, 13.333, 0.4, DARK_TEAL)
add_tb(slide, "Anesthetic Management of Thyroid Surgery  |  AMCH Dibrugarh", 0, 7.12, 13.333, 0.35, 10, color=WHITE, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 16 – SUMMARY FLOWCHART
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, RGBColor(0xF5, 0xF9, 0xFA))
add_rect(slide, 0, 0, 13.333, 1.05, DARK_TEAL)
add_rect(slide, 0, 1.05, 13.333, 0.06, GOLD)
add_tb(slide, "Perioperative Management – Summary Checklist", 0.3, 0.15, 12.7, 0.8, 26, bold=True, color=WHITE)

steps = [
    ("1. PRE-OPERATIVE", [
        "TFTs, Ca, ECG, vocal cord assessment",
        "Airway assessment + CT/MRI review",
        "Optimize thyroid status (euthyroid before elective surgery)",
        "Beta-blockers + antithyroid drugs until day of surgery",
        "Plan airway strategy (routine vs. difficult vs. AFOI)",
    ], DARK_TEAL),
    ("2. INDUCTION", [
        "Appropriate ETT (standard / NIM / armoured / nasal)",
        "Video laryngoscope on standby",
        "AFOI if large goiter + significant airway compromise",
        "Succinylcholine for RSI; no NMB post-intubation if IONM",
        "Smooth induction – minimise sympathetic response",
    ], MID_TEAL),
    ("3. MAINTENANCE", [
        "Controlled normotension; reverse Trendelenburg",
        "IONM – NIM-ETT signal monitoring",
        "Temperature monitoring; active warming",
        "Dexamethasone 8mg; consider BSCPB for analgesia",
        "Gentle haemostasis; minimal airway pressures",
    ], RGBColor(0x2A, 0x9D, 0x8F)),
    ("4. EMERGENCE & POST-OP", [
        "Smooth extubation – remifentanil / IV lignocaine",
        "Vocal cord assessment before / after extubation",
        "Watch for: haematoma, RLN injury, hypocalcaemia",
        "Multimodal analgesia; PONV prophylaxis",
        "Serial Ca monitoring 24–96 h post total thyroidectomy",
    ], RGBColor(0x26, 0x4F, 0x78)),
]

for i, (title, items, color) in enumerate(steps):
    col_x = 0.3 + i * 3.22
    add_rect(slide, col_x, 1.25, 3.0, 0.45, color)
    add_tb(slide, title, col_x+0.05, 1.27, 2.9, 0.42, 12, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    add_bullet_box(slide, items, col_x, 1.72, 3.0, 5.12,
                   bullet_size=11.5, bg_color=LIGHT_AQUA, symbol="✓")

add_rect(slide, 0, 7.1, 13.333, 0.4, DARK_TEAL)
add_tb(slide, "Anesthetic Management of Thyroid Surgery  |  AMCH Dibrugarh", 0, 7.12, 13.333, 0.35, 10, color=WHITE, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 17 – REFERENCES
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, RGBColor(0xF5, 0xF9, 0xFA))
add_rect(slide, 0, 0, 13.333, 1.05, DARK_TEAL)
add_rect(slide, 0, 1.05, 13.333, 0.06, GOLD)
add_tb(slide, "References", 0.3, 0.15, 12.7, 0.8, 30, bold=True, color=WHITE)

refs = [
    "1.  Barash PG, Cullen BF, Stoelting RK, et al. Barash, Cullen & Stoelting's Clinical Anesthesia, 9th ed. Wolters Kluwer; 2022. Chapter 47: Anesthesia for Thyroid Surgery, pp. 3995–3996.",
    "2.  Miller RD, et al. Miller's Anesthesia, 2-Volume Set, 10th ed. Elsevier; 2023. Chapter 66: Thyroid and Parathyroid Surgery, pp. 9813–9814.",
    "3.  Morgan GE, Mikhail MS. Clinical Anesthesiology, 7th ed. McGraw-Hill; 2022. Chapter: Thyroid Disease and Thyroid Surgery.",
    "4.  Haugen BRM, et al. 2015 American Thyroid Association Management Guidelines for Adult Patients with Thyroid Nodules and Differentiated Thyroid Cancer. Thyroid. 2016;26(1):1–133.",
    "5.  Burch HB, Wartofsky L. Life-threatening thyrotoxicosis: Thyroid storm. Endocrinol Metab Clin North Am. 1993;22(2):263–277.",
    "6.  Dralle H, Sekulla C, Lorenz K, et al. Intraoperative monitoring of the recurrent laryngeal nerve in thyroid surgery. World J Surg. 2008;32(7):1358–1366.",
    "7.  Cernea CR, et al. Surgical techniques for avoiding the external branch of the superior laryngeal nerve injury during thyroidectomy. Head Neck. 2009;31(12):1742.",
    "8.  ASA Difficult Airway Algorithm – Practice Guidelines for Management of the Difficult Airway. Anesthesiology. 2022;136(1):31–81.",
    "9.  Goldman-Cecil Medicine, International Edition. Elsevier; 2020. Section: Thyroid Storm / Thyrotoxic Crisis, pp. 3074.",
    "10. Rosen's Emergency Medicine: Concepts and Clinical Practice, 9th ed. Elsevier; 2018. Chapter 117: Management of Thyrotoxicosis.",
]

tb = slide.shapes.add_textbox(Inches(0.5), Inches(1.3), Inches(12.3), Inches(5.7))
tf = tb.text_frame
tf.word_wrap = True
tf.margin_left = Pt(4)
for i, ref in enumerate(refs):
    p = tf.paragraphs[0] if i == 0 else tf.add_paragraph()
    p.space_before = Pt(3)
    run = p.add_run()
    run.text = ref
    run.font.size = Pt(11.5)
    run.font.color.rgb = DARK_TEXT
    run.font.name = "Calibri"

add_rect(slide, 0, 7.1, 13.333, 0.4, DARK_TEAL)
add_tb(slide, "Anesthetic Management of Thyroid Surgery  |  AMCH Dibrugarh", 0, 7.12, 13.333, 0.35, 10, color=WHITE, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 18 – THANK YOU
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, DARK_TEAL)
add_rect(slide, 0, 0, 13.333, 0.4, GOLD)
add_rect(slide, 0, 7.1, 13.333, 0.4, GOLD)

add_rect(slide, 1.5, 1.5, 10.3, 4.5, WHITE)
add_tb(slide, "Thank You", 1.5, 1.8, 10.3, 1.5, 52, bold=True, color=DARK_TEAL, align=PP_ALIGN.CENTER)
add_rect(slide, 3.5, 3.3, 6.3, 0.05, GOLD)
add_tb(slide, "Dr. Mukesh Patir", 1.5, 3.5, 10.3, 0.6, 22, bold=True, color=DARK_TEAL, align=PP_ALIGN.CENTER)
add_tb(slide, "Assistant Professor, Department of Anaesthesiology", 1.5, 4.1, 10.3, 0.45, 15, color=DARK_TEXT, align=PP_ALIGN.CENTER)
add_tb(slide, "Assam Medical College and Hospital, Dibrugarh", 1.5, 4.55, 10.3, 0.45, 15, bold=True, color=DARK_TEXT, align=PP_ALIGN.CENTER)
add_tb(slide, "Questions & Discussion Welcome", 1.5, 5.15, 10.3, 0.5, 14, italic=True, color=MID_TEAL, align=PP_ALIGN.CENTER)

# ── Save ────────────────────────────────────────────────────────────────────
out = "/tmp/workspace/thyroid-anesthesia-ppt/Anesthetic_Management_Thyroid_Surgery_AMCH.pptx"
from io import BytesIO
buf = BytesIO()
prs.save(buf)
with open(out, "wb") as f:
    f.write(buf.getvalue())
print(f"Saved: {out}")
Running Command

cd /tmp/workspace/thyroid-anesthesia-ppt && python build_ppt.py

Running Command

python -c " from pptx import Presentation prs = Presentation('/tmp/workspace/thyroid-anesthesia-ppt/Anesthetic_Management_Thyroid_Surgery_AMCH.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 presentation is ready. Download it here:

Anesthetic Management Thyroid Surgery AMCH

Presentation · PPTX


Presentation Details
  • 18 slides, 16:9 widescreen format
  • Colour theme: Teal / Aqua / Gold — professional medical academic design
  • Moderator details on Title + Thank You slides: Dr. Mukesh Patir, Assistant Professor, Assam Medical College and Hospital, Dibrugarh

Slide-by-Slide Outline:
#Slide Title
1Title Slide
2Overview / Table of Contents
3Surgical Indications for Thyroidectomy
4Surgical Anatomy Relevant to Anaesthesia
5Pre-operative Assessment
6Preoperative Optimization - Hyperthyroidism
7Preoperative Optimization - Hypothyroidism
8Airway Assessment & Management
9Anaesthetic Technique (Premedication, Induction, Maintenance)
10NIM-ETT & Intraoperative Neural Monitoring (IONM)
11Positioning & Intraoperative Considerations
12Extubation & Postoperative Care + Complications
13Thyroid Storm - Recognition & Sequential Treatment
14Regional Anaesthesia & Special Populations
15Postoperative Analgesia & PONV Management
16Perioperative Summary Checklist (4-column flowchart)
17References (10 citations from Barash, Miller, Morgan, ATA guidelines)
18Thank You / Discussion

Content sourced from:
  • Barash, Cullen & Stoelting's Clinical Anesthesia, 9th ed. - "Anesthesia for Thyroid Surgery"
  • Miller's Anesthesia, 10th ed. - "Thyroid and Parathyroid Surgery"
  • Morgan & Mikhail's Clinical Anesthesiology, 7th ed.
  • Goldman-Cecil Medicine and Rosen's Emergency Medicine for thyroid storm management

Kindly make ppt on Anesthetic management of patient undergoing Adrenal gland surgery from standard Anesthesia book

Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Finding Sources
Reading File
Finding Sources
Reading File
Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.
This is a shared conversation. Sign in to Orris to start your own chat.