PREPARE PPT ON HYPOPHARYNGOSCOPYFROM THIEME PUBLICATION FOR UG MBBS STUDENTS

Reading File
Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Searching Images

hypopharyngoscopy laryngoscopy procedure endoscopy hypopharynx

Reading File
Reading File
Finding Sources
Reading File

FROM SURESH PILLAI AND KAILESH PUJARY TEXTBOOK OF OTORHINOLARYNGOLOGY HEAD AND NECK SURGERY

Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Searching Images

hypopharynx anatomy pyriform sinus postcricoid region diagram

Searching Images

indirect laryngoscopy mirror examination throat

Reading File
Reading File
Reading File
Loading Image
Loading Image
Loading Image
Running Command

mkdir -p /tmp/workspace/hypopharyngoscopy-ppt && ls /tmp/workspace/hypopharyngoscopy-ppt/

Running Command

python /tmp/skills/shared/scripts/fetch_images.py \ "https://cdn.orris.care/cdss_images/58e8ca77e02bc44fc4a25f45446522e0efb95a899b90f276f68e1a311f5802e0.png" \ "https://cdn.orris.care/cdss_images/f78a4eedb46980437c81771b0d1850dbd1260e143d2fc349f0a009028525997d.png" \ "https://cdn.orris.care/cdss_images/d8c27c9d7fea2e68c70b014cf1e9c9f95c098b1b6b0e7905c4991da7312c71d1.png" 2>/dev/null | python3 -c "import json,sys; data=json.load(sys.stdin); [print(i, d['error'] if d['error'] else 'OK', len(d.get('base64','') or '')) for i,d in enumerate(data)]"

Writing File

~/hypopharyngoscopy-ppt/build_ppt.py

import json, subprocess, base64
from io import BytesIO
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

# ─── Color Palette ───────────────────────────────────────────────
NAVY    = RGBColor(0x0D, 0x2B, 0x55)   # dark navy – title bg
TEAL    = RGBColor(0x00, 0x7B, 0x8A)   # accent / section headers
WHITE   = RGBColor(0xFF, 0xFF, 0xFF)
LIGHTBG = RGBColor(0xF0, 0xF6, 0xF8)   # very light blue – content bg
DARK    = RGBColor(0x1A, 0x1A, 0x2E)   # body text
GOLD    = RGBColor(0xE8, 0xB84B, 0x00) # accent bullets

# ─── Fetch images ─────────────────────────────────────────────────
URLS = [
    "https://cdn.orris.care/cdss_images/58e8ca77e02bc44fc4a25f45446522e0efb95a899b90f276f68e1a311f5802e0.png",  # hypopharynx anatomy
    "https://cdn.orris.care/cdss_images/f78a4eedb46980437c81771b0d1850dbd1260e143d2fc349f0a009028525997d.png",  # flexible laryngoscopy clinical
    "https://cdn.orris.care/cdss_images/d8c27c9d7fea2e68c70b014cf1e9c9f95c098b1b6b0e7905c4991da7312c71d1.png",  # larynx topical anesthesia diagram
]

img_data = json.loads(subprocess.check_output(
    ["python", "/tmp/skills/shared/scripts/fetch_images.py"] + URLS
))

def get_img(idx):
    d = img_data[idx]
    if d["base64"]:
        raw = base64.b64decode(d["base64"].split(",",1)[-1])
        return BytesIO(raw)
    return None

img_hypopharynx  = get_img(0)
img_flex_scope   = get_img(1)
img_larynx_diag  = get_img(2)

# ─── Presentation setup ───────────────────────────────────────────
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, fill_rgb=None, alpha=None):
    shape = slide.shapes.add_shape(1, Inches(x), Inches(y), Inches(w), Inches(h))
    shape.line.fill.background()
    if fill_rgb:
        shape.fill.solid()
        shape.fill.fore_color.rgb = fill_rgb
    else:
        shape.fill.background()
    return shape

def add_text(slide, text, x, y, w, h, size=18, bold=False, color=WHITE,
             align=PP_ALIGN.LEFT, wrap=True, italic=False, anchor=MSO_ANCHOR.TOP):
    tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
    tf = tb.text_frame
    tf.word_wrap = wrap
    tf.vertical_anchor = anchor
    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_multiline(slide, lines, x, y, w, h, size=15, color=DARK,
                  bold_first=False, wrap=True, line_spacing=1.15):
    """lines: list of (text, bold, color_override)"""
    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(6)
    tf.margin_right = Pt(6)
    tf.margin_top   = Pt(4)
    tf.margin_bottom= Pt(4)
    from pptx.util import Pt as PT
    from pptx.oxml.ns import qn
    from lxml import etree
    first = True
    for (text, bold, col) in lines:
        if first:
            p = tf.paragraphs[0]
            first = False
        else:
            p = tf.add_paragraph()
        p.alignment = PP_ALIGN.LEFT
        run = p.add_run()
        run.text = text
        run.font.size  = Pt(size)
        run.font.bold  = bold
        run.font.color.rgb = col if col else color
        run.font.name  = "Calibri"
    return tb

def add_image(slide, img_stream, x, y, w, h=None):
    if img_stream is None:
        return
    img_stream.seek(0)
    if h:
        slide.shapes.add_picture(img_stream, Inches(x), Inches(y), Inches(w), Inches(h))
    else:
        slide.shapes.add_picture(img_stream, Inches(x), Inches(y), Inches(w))

def header_bar(slide, title, subtitle=None):
    """Navy top bar with white title"""
    add_rect(slide, 0, 0, 13.333, 1.15, fill_rgb=NAVY)
    add_text(slide, title, 0.3, 0.05, 12.5, 0.65,
             size=28, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
    if subtitle:
        add_text(slide, subtitle, 0.3, 0.7, 12.5, 0.4,
                 size=14, bold=False, color=RGBColor(0xBB, 0xDD, 0xEE), align=PP_ALIGN.LEFT)
    # teal accent line
    add_rect(slide, 0, 1.15, 13.333, 0.06, fill_rgb=TEAL)

def content_bg(slide):
    add_rect(slide, 0, 1.21, 13.333, 6.29, fill_rgb=LIGHTBG)

def section_box(slide, label, x, y, w, h=0.4):
    add_rect(slide, x, y, w, h, fill_rgb=TEAL)
    add_text(slide, label, x+0.05, y+0.02, w-0.1, h-0.04,
             size=13, bold=True, color=WHITE, align=PP_ALIGN.LEFT)

def bullet_list(slide, items, x, y, w, h, size=14, dot_color=TEAL):
    tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
    tf = tb.text_frame
    tf.word_wrap = True
    tf.margin_left  = Pt(4)
    tf.margin_right = Pt(4)
    tf.margin_top   = Pt(2)
    tf.margin_bottom= Pt(2)
    first = True
    for item in items:
        if isinstance(item, tuple):
            text, sz, bd, col = item
        else:
            text, sz, bd, col = item, size, False, DARK
        if first:
            p = tf.paragraphs[0]
            first = False
        else:
            p = tf.add_paragraph()
        p.alignment = PP_ALIGN.LEFT
        # bullet dot
        run0 = p.add_run()
        run0.text = "• "
        run0.font.size = Pt(sz)
        run0.font.color.rgb = dot_color
        run0.font.bold = True
        run0.font.name = "Calibri"
        run1 = p.add_run()
        run1.text = text
        run1.font.size = Pt(sz)
        run1.font.bold = bd
        run1.font.color.rgb = col
        run1.font.name = "Calibri"

# ═══════════════════════════════════════════════════════════════════
#  SLIDE 1 – TITLE SLIDE
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, fill_rgb=NAVY)
# diagonal accent
add_rect(slide, 0, 4.5, 13.333, 3.0, fill_rgb=TEAL)
# white card
add_rect(slide, 1.2, 1.5, 10.9, 4.5, fill_rgb=WHITE)

add_text(slide, "HYPOPHARYNGOSCOPY",
         1.4, 1.7, 10.5, 1.1,
         size=38, bold=True, color=NAVY, align=PP_ALIGN.CENTER)
add_text(slide, "Examination of the Hypopharynx",
         1.4, 2.75, 10.5, 0.55,
         size=22, bold=False, color=TEAL, align=PP_ALIGN.CENTER)
add_rect(slide, 3.5, 3.35, 6.3, 0.06, fill_rgb=TEAL)
add_text(slide, "For Undergraduate MBBS Students",
         1.4, 3.5, 10.5, 0.45,
         size=16, bold=False, color=DARK, align=PP_ALIGN.CENTER)
add_text(slide, "Department of ENT & Head-Neck Surgery",
         1.4, 4.0, 10.5, 0.4,
         size=14, italic=True, color=RGBColor(0x44, 0x44, 0x44), align=PP_ALIGN.CENTER)
add_text(slide, "Reference: K J Lee's Essential Otolaryngology | Scott-Brown's Otorhinolaryngology | Cummings Otolaryngology",
         0.5, 6.9, 12.3, 0.4,
         size=10, italic=True, color=WHITE, align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════════
#  SLIDE 2 – LEARNING OBJECTIVES
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
content_bg(slide)
header_bar(slide, "Learning Objectives", "By end of this session, students should be able to:")

objectives = [
    ("Define hypopharyngoscopy and state its clinical importance", 16, True, NAVY),
    ("Describe the anatomy of the hypopharynx and its three subsites", 16, False, DARK),
    ("List the indications and contraindications for hypopharyngoscopy", 16, False, DARK),
    ("Describe the equipment used – indirect, flexible, and rigid methods", 16, False, DARK),
    ("Outline the step-by-step technique of hypopharyngoscopy", 16, False, DARK),
    ("Discuss the findings seen and their clinical significance", 16, False, DARK),
    ("Enumerate the complications and their management", 16, False, DARK),
]

add_rect(slide, 0.5, 1.35, 12.3, 5.9, fill_rgb=WHITE)
bullet_list(slide, objectives, 0.65, 1.5, 12.0, 5.7, size=16)

# ═══════════════════════════════════════════════════════════════════
#  SLIDE 3 – ANATOMY OF THE HYPOPHARYNX (with image)
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
content_bg(slide)
header_bar(slide, "Anatomy of the Hypopharynx", "The 'lower' pharynx — where food and air pathways diverge")

# left text panel
add_rect(slide, 0.3, 1.3, 7.2, 5.95, fill_rgb=WHITE)

section_box(slide, "Definition & Boundaries", 0.4, 1.35, 4.2)
bullet_list(slide, [
    ("Extends from superior border of hyoid bone (floor of vallecula) to lower border of cricoid cartilage", 13, False, DARK),
    ("Lies posterior and lateral to larynx", 13, False, DARK),
    ("Communicates above with oropharynx, below with cervical oesophagus", 13, False, DARK),
], 0.4, 1.78, 7.1, 1.45, size=13)

section_box(slide, "Three Subsites (Clinically Important)", 0.4, 3.28, 5.5)
bullet_list(slide, [
    ("Pyriform Sinuses (bilateral): most common site of hypopharyngeal cancer; bounded laterally by thyroid cartilage, medially by aryepiglottic folds", 13, False, DARK),
    ("Posterior Hypopharyngeal Wall: from level of hyoid to lower border of cricoid", 13, False, DARK),
    ("Postcricoid Region: from arytenoid cartilages to inferior border of cricoid — forms anterior wall; connects right and left pyriform sinuses", 13, False, DARK),
], 0.4, 3.72, 7.1, 2.9, size=13)

# right image
add_image(slide, img_hypopharynx, 7.7, 1.3, 5.3, 5.9)
add_text(slide, "Fig: Sagittal diagram — oral cavity (green), oropharynx (yellow), hypopharynx (blue)",
         7.7, 7.1, 5.3, 0.35, size=9, italic=True, color=RGBColor(0x44,0x44,0x44), align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════════
#  SLIDE 4 – DEFINITION & INTRODUCTION
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
content_bg(slide)
header_bar(slide, "Hypopharyngoscopy — Introduction", "Direct visual examination of the hypopharynx")

add_rect(slide, 0.4, 1.3, 12.5, 5.9, fill_rgb=WHITE)

add_text(slide, "What is Hypopharyngoscopy?",
         0.6, 1.4, 12.0, 0.5, size=18, bold=True, color=NAVY)

bullet_list(slide, [
    ("Endoscopic examination of the hypopharynx — the lowest part of the pharynx", 15, False, DARK),
    ("Synonymous with 'indirect laryngoscopy' when performed with laryngeal mirror, and 'direct hypopharyngoscopy' when done under GA with rigid laryngoscope", 15, False, DARK),
    ("Also performed via flexible nasopharyngolaryngoscopy (FNL) — now the standard of care in most ENT clinics", 15, False, DARK),
], 0.6, 1.95, 12.1, 1.7, size=15)

add_text(slide, "Historical Perspective",
         0.6, 3.7, 12.0, 0.4, size=16, bold=True, color=TEAL)
bullet_list(slide, [
    ("Garcia (1854): introduced indirect mirror laryngoscopy — visualised his own larynx", 14, False, DARK),
    ("Killian (1912): pioneered direct laryngoscopy / suspension laryngoscopy", 14, False, DARK),
    ("Modern era: flexible fiberoptic endoscopes have largely replaced indirect mirror examination", 14, False, DARK),
    ("Rigid Hopkins rod telescope (70°/90°): gold standard for 'voice clinic' examination", 14, False, DARK),
], 0.6, 4.12, 12.1, 2.75, size=14)

# ═══════════════════════════════════════════════════════════════════
#  SLIDE 5 – INDICATIONS
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
content_bg(slide)
header_bar(slide, "Indications for Hypopharyngoscopy", "When to perform the procedure")

add_rect(slide, 0.3, 1.3, 6.1, 5.9, fill_rgb=WHITE)
add_rect(slide, 6.9, 1.3, 6.1, 5.9, fill_rgb=WHITE)

# Left panel
section_box(slide, "Diagnostic Indications", 0.4, 1.35, 4.5)
bullet_list(slide, [
    ("Dysphagia (difficulty swallowing) — to rule out postcricoid carcinoma, Zenker's diverticulum", 14, False, DARK),
    ("Odynophagia (painful swallowing)", 14, False, DARK),
    ("Hoarseness / voice change", 14, False, DARK),
    ("Globus pharyngeus — sensation of lump in throat", 14, False, DARK),
    ("Throat pain or otalgia (referred via Jacobson's nerve)", 14, False, DARK),
    ("Suspected foreign body in hypopharynx", 14, False, DARK),
    ("Neck mass with suspected primary pharyngeal malignancy", 14, False, DARK),
    ("Haemoptysis / haematemesis of uncertain origin", 14, False, DARK),
    ("Assessment of vocal cord mobility", 14, False, DARK),
    ("Post-treatment surveillance of HN cancers", 14, False, DARK),
], 0.4, 1.78, 5.9, 5.3, size=13)

# Right panel
section_box(slide, "Therapeutic / Operative Indications", 7.0, 1.35, 5.7)
bullet_list(slide, [
    ("Removal of foreign bodies (fish bones, coins, dentures)", 14, False, DARK),
    ("Biopsy of hypopharyngeal lesions / tumours", 14, False, DARK),
    ("Dilatation of post-cricoid strictures", 14, False, DARK),
    ("Zenker's diverticulum — endoscopic stapling / cricopharyngeal myotomy", 14, False, DARK),
    ("Laser treatment of hypopharyngeal tumours", 14, False, DARK),
    ("Assessment before microlaryngoscopy procedures", 14, False, DARK),
], 7.0, 1.78, 5.9, 4.0, size=13)

section_box(slide, "Staging & Pre-operative Assessment", 7.0, 5.82, 5.7)
bullet_list(slide, [
    ("TNM staging of laryngeal / hypopharyngeal carcinoma", 13, False, DARK),
    ("Assessing resectability of tumours", 13, False, DARK),
], 7.0, 6.25, 5.9, 1.1, size=13)

# ═══════════════════════════════════════════════════════════════════
#  SLIDE 6 – CONTRAINDICATIONS & PRECAUTIONS
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
content_bg(slide)
header_bar(slide, "Contraindications & Precautions", "When to be cautious or defer")

add_rect(slide, 0.3, 1.3, 6.0, 5.9, fill_rgb=WHITE)
add_rect(slide, 6.9, 1.3, 6.1, 5.9, fill_rgb=WHITE)

section_box(slide, "Absolute Contraindications", 0.4, 1.35, 5.0, 0.4)
bullet_list(slide, [
    ("Uncooperative patient (for office indirect/flexible exam)", 14, False, DARK),
    ("Acute epiglottitis — manipulation may precipitate complete airway obstruction", 14, False, DARK),
    ("Severe coagulopathy (for biopsy / operative procedures)", 14, False, DARK),
    ("Known or suspected tracheomalacia (rigid scope may precipitate collapse)", 14, False, DARK),
], 0.4, 1.78, 5.85, 2.4, size=13)

section_box(slide, "Relative Contraindications", 0.4, 4.22, 5.0, 0.4)
bullet_list(slide, [
    ("Severe trismus or limited mouth opening — may preclude mirror exam", 14, False, DARK),
    ("Hypersensitive gag reflex", 14, False, DARK),
    ("Cervical spine disease — limits neck positioning for direct laryngoscopy", 14, False, DARK),
    ("Active respiratory distress", 14, False, DARK),
    ("Pregnancy (GA with direct laryngoscopy — relative only)", 14, False, DARK),
], 0.4, 4.65, 5.85, 2.5, size=13)

section_box(slide, "Special Precautions", 7.0, 1.35, 5.7, 0.4)
bullet_list(slide, [
    ("Informed written consent must be obtained", 14, False, DARK),
    ("Allergy history — lidocaine / cocaine for topical anaesthesia", 14, False, DARK),
    ("Cardiovascular disease: limit epinephrine in local anaesthetic (max 100 µg/10 min)", 14, False, DARK),
    ("Malignant hyperthermia susceptibility: avoid succinylcholine and volatile agents", 14, False, DARK),
    ("Fasting required for GA (6 hrs solids, 2 hrs clear fluids)", 14, False, DARK),
    ("Anticoagulant medications — withhold if biopsy planned", 14, False, DARK),
    ("Prophylactic atropine 0.4 mg IM — reduces secretions and vagal reflexes", 14, False, DARK),
], 7.0, 1.78, 5.9, 4.7, size=13)

# ═══════════════════════════════════════════════════════════════════
#  SLIDE 7 – EQUIPMENT
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
content_bg(slide)
header_bar(slide, "Equipment Used in Hypopharyngoscopy", "Indirect → Flexible → Rigid")

add_rect(slide, 0.3, 1.3, 4.0, 5.9, fill_rgb=WHITE)
add_rect(slide, 4.7, 1.3, 4.0, 5.9, fill_rgb=WHITE)
add_rect(slide, 9.1, 1.3, 3.9, 5.9, fill_rgb=WHITE)

# Panel 1
section_box(slide, "1. Indirect (Mirror) Method", 0.35, 1.35, 3.9, 0.4)
bullet_list(slide, [
    ("Laryngeal mirror (No. 4–6)", 13, False, DARK),
    ("Head mirror / head light (Clar's lamp)", 13, False, DARK),
    ("Spirit lamp or warm water to prevent fogging of mirror", 13, False, DARK),
    ("Tongue depressor / gauze", 13, False, DARK),
    ("Topical anaesthetic (4% xylocaine spray to oropharynx)", 13, False, DARK),
    ("Advantages: Inexpensive, widely available, no GA needed", 13, True, TEAL),
    ("Limitations: High failure rate, learning curve, cannot assess hypopharynx well", 13, False, RGBColor(0x99,0x00,0x00)),
], 0.35, 1.8, 3.85, 5.2, size=12)

# Panel 2
section_box(slide, "2. Flexible Nasopharyngolaryngoscope", 4.75, 1.35, 3.9, 0.4)
bullet_list(slide, [
    ("Fibre-optic or video chip-tip flexible endoscope (3–4 mm diameter)", 13, False, DARK),
    ("Light source (xenon / LED) + camera unit + monitor", 13, False, DARK),
    ("Biopsy channel (in therapeutic scope) for FB removal", 13, False, DARK),
    ("Topical decongestant: xylometazoline nasal spray prior", 13, False, DARK),
    ("Topical LA: cophenylcaine / lignocaine (1–2%)", 13, False, DARK),
    ("Advantages: Excellent view of hypopharynx, oropharynx, larynx; office procedure; well tolerated; can assess swallowing (FEES)", 13, True, TEAL),
    ("Now considered standard of care in ENT clinics", 13, False, NAVY),
], 4.75, 1.8, 3.85, 5.2, size=12)

# Panel 3
section_box(slide, "3. Rigid Laryngoscope (Direct / GA)", 9.15, 1.35, 3.75, 0.4)
bullet_list(slide, [
    ("Macintosh / Wis-Hipple laryngoscope blade for initial airway assessment", 13, False, DARK),
    ("Benjamin or Lindholm suspension laryngoscope for microlaryngoscopy", 13, False, DARK),
    ("Hopkins rod 70°/90° telescope for high-resolution optics", 13, False, DARK),
    ("Operating microscope (Zeiss) — for microsurgical procedures", 13, False, DARK),
    ("CO2 / KTP / Nd:YAG laser attachments", 13, False, DARK),
    ("Performed under GA + muscle relaxation + jet ventilation or THRIVE", 13, False, DARK),
    ("Advantages: Full visualisation, allows biopsy, staging, operative interventions", 13, True, TEAL),
], 9.15, 1.8, 3.75, 5.2, size=12)

# ═══════════════════════════════════════════════════════════════════
#  SLIDE 8 – TOPICAL ANAESTHESIA & PATIENT PREP
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
content_bg(slide)
header_bar(slide, "Anaesthesia & Patient Preparation", "Essential steps before the procedure")

add_rect(slide, 0.3, 1.3, 7.7, 5.9, fill_rgb=WHITE)

section_box(slide, "Topical Anaesthesia of the Larynx & Hypopharynx", 0.4, 1.35, 7.4, 0.4)
bullet_list(slide, [
    ("Method 1 — Laryngeal syringe: topical LA applied to mucosa of pyriform fossa (superior laryngeal nerve runs deep here), laryngeal surface of epiglottis, and vocal folds", 14, False, DARK),
    ("Method 2 — Superior laryngeal nerve block (percutaneous): needle inserted 1 cm caudal to greater cornu of hyoid, directed to pierce thyrohyoid membrane; inject 3 mL lignocaine", 14, False, DARK),
    ("Method 3 — Transtracheal injection: 25-gauge needle through cricothyroid membrane in midline; free aspiration of air confirms position; instil 4 mL LA — anaesthetises larynx and trachea", 14, False, DARK),
    ("Oropharyngeal topical spray also required for adequate visualisation", 14, False, DARK),
], 0.4, 1.78, 7.5, 3.2, size=13)

section_box(slide, "Pre-medication", 0.4, 5.0, 7.4, 0.4)
bullet_list(slide, [
    ("Antisialogue: Atropine 0.4–0.8 mg IM/IV  |  Glycopyrrolate 0.2 mg  |  Scopolamine 0.2–0.4 mg IM", 13, False, DARK),
    ("Anti-emetics: Ondansetron, Dexamethasone (reduces PONV and airway oedema)", 13, False, DARK),
    ("Anxiolytics: Midazolam IV for sedation in flexible procedures if required", 13, False, DARK),
], 0.4, 5.43, 7.5, 1.75, size=13)

# right image
img_larynx_diag.seek(0)
add_image(slide, img_larynx_diag, 8.2, 1.35, 4.8, 5.6)
add_text(slide, "Fig: Superior laryngeal nerve in pyriform fossa\n(KJ Lee's Essential Otolaryngology)",
         8.2, 6.95, 4.8, 0.45, size=9, italic=True, color=RGBColor(0x44,0x44,0x44), align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════════
#  SLIDE 9 – TECHNIQUE (FLEXIBLE)
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
content_bg(slide)
header_bar(slide, "Technique: Flexible Laryngoscopy / Hypopharyngoscopy",
           "Step-by-step procedure — Scott-Brown's Otorhinolaryngology")

add_rect(slide, 0.3, 1.3, 8.5, 5.9, fill_rgb=WHITE)

section_box(slide, "Step-by-Step Technique", 0.4, 1.35, 5.5, 0.4)
bullet_list(slide, [
    ("Step 1 – Preparation: Spray xylometazoline to decongest nasal mucosa; apply topical LA (cophenylcaine) to both nares. Seat patient comfortably at 90°.", 13, False, DARK),
    ("Step 2 – Introduction: Pass endoscope through anterior nares along the floor of the nose UNDER the inferior turbinate (widest, clearest route).", 13, False, DARK),
    ("Step 3 – Postnasal space: Ask patient to inhale through nose → opens postnasal sphincter → endoscope passes into oropharynx.", 13, False, DARK),
    ("Step 4 – Systematic assessment (stepwise):", 13, True, NAVY),
    ("    • Vallecula (tongue protrusion helps expose)", 13, False, DARK),
    ("    • Supraglottic larynx: epiglottis, aryepiglottic folds, arytenoids", 13, False, DARK),
    ("    • Pyriform fossae (bilateral) — note pooling of secretions (suggests obstruction)", 13, False, DARK),
    ("    • Postcricoid region", 13, False, DARK),
    ("    • Posterior hypopharyngeal wall", 13, False, DARK),
    ("    • Glottis: vocal cord mobility, symmetry; ask patient to say 'EEE'", 13, False, DARK),
    ("Step 5 – Document: Record accurate side of any lesion found (errors are common — left/right)", 13, True, RGBColor(0x99,0x00,0x00)),
    ("Step 6 – Extended applications: FEES (Flexible Endoscopic Evaluation of Swallowing), videoendoscopy of cervical oesophagus, biopsy via working channel", 13, False, DARK),
], 0.4, 1.78, 8.3, 5.3, size=13)

# right image — flexible scope clinical photo
img_flex_scope.seek(0)
add_image(slide, img_flex_scope, 9.0, 1.35, 4.1, 4.6)
add_text(slide, "Fig: Flexible laryngoscopy in the ENT clinic\n(Scott-Brown's Otorhinolaryngology)",
         9.0, 5.95, 4.1, 0.5, size=9, italic=True, color=RGBColor(0x44,0x44,0x44), align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════════
#  SLIDE 10 – TECHNIQUE (INDIRECT MIRROR)
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
content_bg(slide)
header_bar(slide, "Technique: Indirect Mirror Laryngoscopy / Hypopharyngoscopy",
           "The classic clinical skill — still examined in MBBS finals")

add_rect(slide, 0.3, 1.3, 12.7, 5.9, fill_rgb=WHITE)

section_box(slide, "Step-by-Step (Indirect Mirror)", 0.4, 1.35, 6.5, 0.4)
bullet_list(slide, [
    ("Patient position: seated upright, head in 'sniffing' position (slightly extended), leaning slightly forward", 14, False, DARK),
    ("Warm the mirror (No. 4–6) over spirit lamp or in warm water — TEST on back of hand to avoid burning patient", 14, False, DARK),
    ("Depress tongue: hold tongue with gauze between index finger and thumb of left hand", 14, False, DARK),
    ("Introduce mirror: posterior pharyngeal wall, angled 45° upward — DO NOT touch soft palate (triggers gag)", 14, False, DARK),
    ("Illuminate with head mirror / head light reflected from behind patient", 14, False, DARK),
    ("Structures seen: base of tongue, vallecula, epiglottis, aryepiglottic folds, pyriform fossae, arytenoids, interarytenoid region, vocal cords (assess for mobility)", 14, True, TEAL),
    ("Ask patient to say 'EEE' (high-pitched) → vocal cord adduction seen", 14, False, DARK),
    ("Ask patient to sniff → vocal cord abduction seen", 14, False, DARK),
], 0.4, 1.78, 12.3, 5.3, size=13)

section_box(slide, "Limitations of Mirror Exam", 0.4, 5.93, 5.0, 0.4)
bullet_list(slide, [
    ("High failure rate (gag reflex, poor cooperation) | Does NOT give a satisfactory view of postcricoid and anterior wall of hypopharynx | Requires practice", 12, False, RGBColor(0x88,0x00,0x00)),
], 0.4, 6.35, 12.0, 0.75, size=12)

# ═══════════════════════════════════════════════════════════════════
#  SLIDE 11 – DIRECT HYPOPHARYNGOSCOPY (GA)
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
content_bg(slide)
header_bar(slide, "Direct Hypopharyngoscopy Under General Anaesthesia",
           "Operative / suspension laryngoscopy")

add_rect(slide, 0.3, 1.3, 6.0, 5.9, fill_rgb=WHITE)
add_rect(slide, 6.9, 1.3, 6.1, 5.9, fill_rgb=WHITE)

section_box(slide, "Procedure", 0.4, 1.35, 5.6, 0.4)
bullet_list(slide, [
    ("Patient positioned: supine, 'Boyce' or 'Rose' position — neck flexed, head extended ('sniffing position') on a ring pillow", 14, False, DARK),
    ("GA + neuromuscular blockade + jet ventilation or THRIVE technique", 14, False, DARK),
    ("Teeth guard placed to protect upper teeth", 14, False, DARK),
    ("Suspension laryngoscope inserted along right side of tongue, uvula deviated left", 14, False, DARK),
    ("Blade advanced to epiglottis — lift indirectly to expose glottis and hypopharynx", 14, False, DARK),
    ("Laryngoscope suspended from chest support → operator has bimanual freedom for microsurgery", 14, False, DARK),
    ("Hopkins rod 0°/30° scope for additional magnification and documentation", 14, False, DARK),
    ("Operating microscope used for microlaryngoscopy", 14, False, DARK),
], 0.4, 1.78, 5.8, 5.3, size=13)

section_box(slide, "What Can Be Done Under Direct Scope?", 7.0, 1.35, 5.7, 0.4)
bullet_list(slide, [
    ("Biopsy of lesions in pyriform sinus, postcricoid region, posterior wall", 14, False, DARK),
    ("Foreign body removal (fish bones, dental prostheses)", 14, False, DARK),
    ("Endoscopic stapling of Zenker's diverticulum (Dohlman's procedure)", 14, False, DARK),
    ("Cricopharyngeal myotomy", 14, False, DARK),
    ("CO2 laser excision of hypopharyngeal tumours (TLM)", 14, False, DARK),
    ("Assessment of tumour extent for staging (T1–T4 per AJCC/UICC)", 14, False, DARK),
    ("Dilatation of postcricoid strictures", 14, False, DARK),
    ("Vocal cord injection / medialization", 14, False, DARK),
], 7.0, 1.78, 5.9, 4.0, size=13)

section_box(slide, "Failure of Indirect → Predict Difficult Direct", 7.0, 5.88, 5.7, 0.4)
bullet_list(slide, [
    ("Failure of indirect laryngoscopy predicts that microlaryngoscopy may be technically difficult (Scott-Brown's)", 13, False, RGBColor(0x88,0x00,0x00)),
], 7.0, 6.3, 5.9, 0.85, size=12)

# ═══════════════════════════════════════════════════════════════════
#  SLIDE 12 – NORMAL FINDINGS ON HYPOPHARYNGOSCOPY
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
content_bg(slide)
header_bar(slide, "Normal Findings on Hypopharyngoscopy",
           "Structures identified during examination")

add_rect(slide, 0.3, 1.3, 12.7, 5.9, fill_rgb=WHITE)

section_box(slide, "Structures Visualised (Superior to Inferior)", 0.4, 1.35, 8.0, 0.4)

normal_structures = [
    ("Base of tongue & lingual tonsils", "Visible at upper margin"),
    ("Valleculae", "Bilateral grooves between base of tongue and epiglottis"),
    ("Epiglottis", "Omega-shaped structure; should be mobile and not rigid"),
    ("Aryepiglottic folds", "Lateral margins of laryngeal inlet"),
    ("Pyriform fossae (bilateral)", "Smooth mucosa bilaterally; POOLING = pathological"),
    ("Arytenoids", "Should move symmetrically on phonation and breathing"),
    ("Interarytenoid region / postcricoid area", "Smooth; any irregularity — suspect malignancy"),
    ("Posterior hypopharyngeal wall", "Smooth pink mucosa; submucosal vessels visible"),
    ("Vocal cords (glottis)", "White/pearly; full abduction on sniff, adduction on 'EEE'"),
]

tb = slide.shapes.add_textbox(Inches(0.4), Inches(1.8), Inches(12.5), Inches(5.3))
tf = tb.text_frame
tf.word_wrap = True
tf.margin_left = Pt(4); tf.margin_right = Pt(4)
from pptx.util import Pt as PT_U
first = True
for struct, note in normal_structures:
    if first:
        p = tf.paragraphs[0]
        first = False
    else:
        p = tf.add_paragraph()
    p.alignment = PP_ALIGN.LEFT
    r0 = p.add_run(); r0.text = "● "; r0.font.color.rgb = TEAL; r0.font.bold = True; r0.font.size = Pt(14); r0.font.name = "Calibri"
    r1 = p.add_run(); r1.text = struct + ": "; r1.font.bold = True; r1.font.size = Pt(14); r1.font.color.rgb = NAVY; r1.font.name = "Calibri"
    r2 = p.add_run(); r2.text = note; r2.font.size = Pt(13); r2.font.color.rgb = DARK; r2.font.name = "Calibri"

# ═══════════════════════════════════════════════════════════════════
#  SLIDE 13 – ABNORMAL FINDINGS / PATHOLOGIES
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
content_bg(slide)
header_bar(slide, "Abnormal Findings & Pathologies Detected",
           "Common conditions diagnosed via hypopharyngoscopy")

add_rect(slide, 0.3, 1.3, 6.0, 5.9, fill_rgb=WHITE)
add_rect(slide, 6.9, 1.3, 6.1, 5.9, fill_rgb=WHITE)

section_box(slide, "Malignant Conditions", 0.4, 1.35, 4.5, 0.4)
bullet_list(slide, [
    ("Pyriform sinus carcinoma: most common (60–70% of hypopharyngeal cancers); presents as irregular ulcerative lesion; pooling of saliva in ipsilateral fossa", 13, False, DARK),
    ("Postcricoid carcinoma: associated with Plummer-Vinson syndrome (iron-deficiency anaemia + dysphagia); more common in females", 13, False, DARK),
    ("Posterior pharyngeal wall carcinoma: rare; presents as exophytic growth", 13, False, DARK),
    ("Second primary tumours: hypopharyngoscopy essential to rule out synchronous malignancies", 13, False, DARK),
], 0.4, 1.78, 5.85, 3.1, size=12)

section_box(slide, "Benign / Inflammatory Conditions", 0.4, 4.92, 5.6, 0.4)
bullet_list(slide, [
    ("Zenker's diverticulum: pulsion diverticulum at Killian's dehiscence; pooling of food debris", 13, False, DARK),
    ("Pharyngitis / pharyngeal abscess", 13, False, DARK),
    ("Post-cricoid web — associated with Plummer-Vinson syndrome", 13, False, DARK),
    ("Hypopharyngeal haemangioma, papilloma", 13, False, DARK),
], 0.4, 5.35, 5.85, 1.8, size=12)

section_box(slide, "Laryngeal & Vocal Cord Pathology", 7.0, 1.35, 5.7, 0.4)
bullet_list(slide, [
    ("Vocal cord palsy (unilateral/bilateral): reduced or absent cord movement", 13, False, DARK),
    ("Vocal cord polyp, nodule, cyst, leukoplakia", 13, False, DARK),
    ("Laryngeal carcinoma: irregular mass on vocal cord or supraglottis", 13, False, DARK),
    ("Laryngomalacia: omega-shaped epiglottis, prolapse of aryepiglottic folds on inspiration (in infants)", 13, False, DARK),
    ("Subglottic stenosis / papillomatosis", 13, False, DARK),
], 7.0, 1.78, 5.9, 2.7, size=12)

section_box(slide, "Foreign Bodies & Others", 7.0, 4.55, 5.7, 0.4)
bullet_list(slide, [
    ("Fish bones most common in pyriform fossa — impacted at cricopharyngeus", 13, False, DARK),
    ("Paterson-Brown-Kelly (Plummer-Vinson) syndrome: postcricoid web + iron deficiency", 13, False, DARK),
    ("GORD-related laryngeal changes: posterior laryngitis, contact granuloma, subglottic oedema", 13, False, DARK),
    ("Pooling of secretions in pyriform fossa → suggests functional obstruction of cricopharyngeus", 13, False, DARK),
], 7.0, 4.98, 5.9, 2.25, size=12)

# ═══════════════════════════════════════════════════════════════════
#  SLIDE 14 – COMPLICATIONS
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
content_bg(slide)
header_bar(slide, "Complications of Hypopharyngoscopy",
           "Know these for clinical exams")

add_rect(slide, 0.3, 1.3, 6.0, 5.9, fill_rgb=WHITE)
add_rect(slide, 6.9, 1.3, 6.1, 5.9, fill_rgb=WHITE)

section_box(slide, "Flexible / Indirect Scope", 0.4, 1.35, 5.0, 0.4)
bullet_list(slide, [
    ("Vasovagal syncope — especially in anxious patients", 14, False, DARK),
    ("Gagging and vomiting", 14, False, DARK),
    ("Epistaxis (from nasal passage during insertion)", 14, False, DARK),
    ("Laryngospasm (rare)", 14, False, DARK),
    ("Failure to visualise — most common 'complication' of indirect mirror examination", 14, False, DARK),
    ("Local anaesthetic toxicity (if excessive dose used)", 14, False, DARK),
], 0.4, 1.78, 5.85, 3.5, size=13)

section_box(slide, "Direct Laryngoscopy (Under GA)", 0.4, 5.3, 5.5, 0.4)
bullet_list(slide, [
    ("Dental injury — protect with tooth guard", 14, False, DARK),
    ("Lip or tongue laceration", 14, False, DARK),
    ("Temporomandibular joint dislocation", 14, False, DARK),
], 0.4, 5.73, 5.85, 1.4, size=13)

section_box(slide, "Operative / Post-procedural Complications", 7.0, 1.35, 5.7, 0.4)
bullet_list(slide, [
    ("Haemorrhage — especially post-biopsy; manage with pressure/packing/cautery", 14, False, DARK),
    ("Oedema of larynx / hypopharynx → airway compromise → emergency tracheostomy may be needed", 14, False, DARK),
    ("Perforation of pharyngeal wall: rare but serious; presents with surgical emphysema, pain, fever", 14, False, DARK),
    ("Aspiration of blood or secretions", 14, False, DARK),
    ("Infection / mediastinitis (if perforation unrecognised)", 14, False, DARK),
    ("PONV (post-operative nausea and vomiting) — managed with ondansetron, dexamethasone", 14, False, DARK),
    ("Airway fire — rare with laser; use lowest FiO2 possible and flame-retardant ETT", 14, False, DARK),
], 7.0, 1.78, 5.9, 4.7, size=13)

# ═══════════════════════════════════════════════════════════════════
#  SLIDE 15 – COMPARISON TABLE
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
content_bg(slide)
header_bar(slide, "Comparison: Methods of Hypopharyngoscopy",
           "Quick revision table for MBBS exams")

add_rect(slide, 0.3, 1.3, 12.7, 5.9, fill_rgb=WHITE)

from pptx.util import Inches as IN
from pptx.util import Pt as PT
from pptx.oxml.ns import qn
from lxml import etree

# Build table manually
rows_data = [
    ["Feature", "Indirect Mirror", "Flexible Endoscope", "Direct Rigid (GA)"],
    ["Anaesthesia", "Topical LA spray", "Topical LA nasal/throat", "General anaesthesia"],
    ["Setting", "Outpatient clinic", "Outpatient clinic", "Operation theatre"],
    ["View quality", "Limited", "Excellent (standard of care)", "Best — microsurgical"],
    ["Hypopharynx view", "Poor (postcricoid not seen)", "Good", "Excellent — all subsites"],
    ["Operative capability", "None", "Limited (biopsy channel)", "Full — biopsy, laser, FB"],
    ["Patient cooperation", "Required (high fail rate)", "Required (well tolerated)", "Not required"],
    ["Advantages", "Cheap, no equipment", "No GA, dynamic swallow", "Full staging, therapy"],
    ["Disadvantages", "High failure, limited view", "No GA-level access", "GA risks, theatre time"],
    ["Best for", "Vocal cord assessment", "Routine clinic exam, FEES", "Biopsy, FB, surgery"],
]

tbl_x, tbl_y = Inches(0.4), Inches(1.45)
tbl_w, tbl_h = Inches(12.5), Inches(5.7)

table = slide.shapes.add_table(len(rows_data), 4, tbl_x, tbl_y, tbl_w, tbl_h).table
col_widths = [Inches(2.2), Inches(3.0), Inches(3.5), Inches(3.8)]
for i, w in enumerate(col_widths):
    table.columns[i].width = w

header_bg = NAVY
row_odd   = RGBColor(0xE8, 0xF4, 0xF8)
row_even  = WHITE

for r_idx, row_vals in enumerate(rows_data):
    for c_idx, val in enumerate(row_vals):
        cell = table.cell(r_idx, c_idx)
        cell.text = val
        tf = cell.text_frame
        tf.word_wrap = True
        for para in tf.paragraphs:
            para.alignment = PP_ALIGN.CENTER if r_idx == 0 else PP_ALIGN.LEFT
            for run in para.runs:
                run.font.name = "Calibri"
                run.font.size = Pt(11) if r_idx > 0 else Pt(12)
                run.font.bold = (r_idx == 0 or c_idx == 0)
                run.font.color.rgb = WHITE if r_idx == 0 else (NAVY if c_idx == 0 else DARK)
        # cell background
        tc = cell._tc
        tcPr = tc.get_or_add_tcPr()
        solidFill = etree.SubElement(tcPr, qn('a:solidFill'))
        srgbClr = etree.SubElement(solidFill, qn('a:srgbClr'))
        if r_idx == 0:
            srgbClr.set('val', '0D2B55')
        elif c_idx == 0:
            srgbClr.set('val', '007B8A')
            for para in tf.paragraphs:
                for run in para.runs:
                    run.font.color.rgb = WHITE
        elif r_idx % 2 == 0:
            srgbClr.set('val', 'E8F4F8')
        else:
            srgbClr.set('val', 'FFFFFF')

# ═══════════════════════════════════════════════════════════════════
#  SLIDE 16 – CLINICAL SCENARIOS / VIVA QUESTIONS
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
content_bg(slide)
header_bar(slide, "Clinical Scenarios & Viva Questions",
           "Preparing for MBBS finals and clinical examinations")

add_rect(slide, 0.3, 1.3, 12.7, 5.9, fill_rgb=WHITE)

scenarios = [
    ("Q1", "A 55-year-old male smoker presents with progressive dysphagia and weight loss. Flexible laryngoscopy shows pooling of saliva in the right pyriform fossa. Diagnosis? Next step?",
     "Suspect pyriform sinus carcinoma. CT neck + chest, biopsy under direct laryngoscopy, PET-CT for staging."),
    ("Q2", "A 45-year-old woman with iron-deficiency anaemia and dysphagia. Endoscopy shows a postcricoid web. Diagnosis?",
     "Plummer-Vinson (Paterson-Brown-Kelly) syndrome. Treat iron deficiency; endoscopic dilatation of web."),
    ("Q3", "Indirect laryngoscopy fails in a patient. What does this predict?",
     "Failure of indirect laryngoscopy predicts that direct microlaryngoscopy may also be technically difficult."),
    ("Q4", "What is the significance of pooling of secretions in the pyriform fossa on flexible laryngoscopy?",
     "Indicates obstruction or sensory deficit at or below the level of the pyriform fossa — suggests tumour, stricture, or neurological cause."),
    ("Q5", "Name the nerve anaesthetised when LA is injected into the pyriform fossa mucosa.",
     "Internal branch of the superior laryngeal nerve (branch of vagus CN X)."),
]

y_pos = 1.42
for q, scenario, answer in scenarios:
    add_rect(slide, 0.4, y_pos, 12.3, 0.3, fill_rgb=TEAL)
    add_text(slide, q + ": " + scenario, 0.45, y_pos+0.01, 12.2, 0.28, size=11, bold=True, color=WHITE)
    add_text(slide, "Ans: " + answer, 0.45, y_pos+0.32, 12.2, 0.35, size=11, bold=False, color=NAVY)
    y_pos += 0.72

# ═══════════════════════════════════════════════════════════════════
#  SLIDE 17 – KEY POINTS / SUMMARY
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
content_bg(slide)
header_bar(slide, "Key Points — Summary", "Remember for your exams!")

add_rect(slide, 0.3, 1.3, 12.7, 5.9, fill_rgb=WHITE)

key_points = [
    "Hypopharynx extends from hyoid to lower border of cricoid — 3 subsites: pyriform sinuses, posterior wall, postcricoid region",
    "Hypopharyngoscopy = visual examination of hypopharynx — indirect (mirror), flexible fiberoptic, or direct rigid under GA",
    "Flexible nasopharyngolaryngoscopy is NOW the standard of care in ENT clinics — better view, better tolerated",
    "Superior laryngeal nerve pierces thyrohyoid membrane — topical LA to pyriform fossa anaesthetises it",
    "Pooling of secretions in pyriform fossa on endoscopy = pathological sign — obstruction below",
    "Failure of indirect laryngoscopy predicts difficult direct laryngoscopy/microlaryngoscopy",
    "Pyriform sinus = most common subsite for hypopharyngeal carcinoma (60–70%)",
    "Postcricoid carcinoma associated with Plummer-Vinson (Patterson-Brown-Kelly) syndrome — iron deficiency anaemia + dysphagia + web",
    "Killian's dehiscence (between cricopharyngeus and inferior constrictor) → site of Zenker's diverticulum",
    "Direct hypopharyngoscopy under GA allows biopsy, FB removal, endoscopic stapling of Zenker's, laser surgery (TLM)",
]

bullet_list(slide, key_points, 0.4, 1.4, 12.5, 5.75, size=14, dot_color=TEAL)

# ═══════════════════════════════════════════════════════════════════
#  SLIDE 18 – THANK YOU
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, fill_rgb=NAVY)
add_rect(slide, 0, 5.5, 13.333, 2.0, fill_rgb=TEAL)
add_text(slide, "Thank You", 0.5, 1.8, 12.3, 1.4,
         size=52, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_text(slide, "Questions & Discussion Welcome",
         0.5, 3.3, 12.3, 0.7,
         size=22, bold=False, color=RGBColor(0xBB, 0xDD, 0xFF), align=PP_ALIGN.CENTER)
add_text(slide, "References: K J Lee's Essential Otolaryngology (11e) • Scott-Brown's Otorhinolaryngology Head & Neck Surgery (8e) • Cummings Otolaryngology (7e)",
         0.5, 5.6, 12.3, 0.5,
         size=11, italic=True, color=WHITE, align=PP_ALIGN.CENTER)
add_text(slide, "Prepared for UG MBBS ENT Teaching | Department of Otorhinolaryngology & Head-Neck Surgery",
         0.5, 6.2, 12.3, 0.5,
         size=12, italic=False, color=WHITE, align=PP_ALIGN.CENTER)

# ─── SAVE ─────────────────────────────────────────────────────────
out_path = "/tmp/workspace/hypopharyngoscopy-ppt/Hypopharyngoscopy_MBBS.pptx"
prs.save(out_path)
print(f"Saved: {out_path}")
print(f"Total slides: {len(prs.slides)}")
Running Command

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

Editing File

~/hypopharyngoscopy-ppt/build_ppt.py

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

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

Your presentation is ready for download:

Hypopharyngoscopy MBBS

Presentation · PPTX


Note on textbook source: The Suresh Pillai & Kailesh Pujary "Textbook of Otorhinolaryngology Head and Neck Surgery" is not in the digital library. The PPT has been built from the three most authoritative ENT reference texts available - K J Lee's Essential Otolaryngology (McGraw-Hill / standard Indian curriculum reference), Scott-Brown's Otorhinolaryngology Head & Neck Surgery, and Cummings Otolaryngology - which cover the same syllabus content that Pillai & Pujary addresses.

Presentation Overview — 18 Slides

#Slide Title
1Title Slide
2Learning Objectives
3Anatomy of the Hypopharynx (with sagittal diagram image)
4Definition & Historical Introduction
5Indications (Diagnostic + Therapeutic)
6Contraindications & Precautions
7Equipment — Indirect / Flexible / Rigid (3-column layout)
8Anaesthesia & Patient Preparation (with nerve diagram image)
9Technique: Flexible Laryngoscopy (with clinical photo)
10Technique: Indirect Mirror Laryngoscopy
11Direct Hypopharyngoscopy Under GA
12Normal Findings on Hypopharyngoscopy
13Abnormal Findings & Pathologies Detected
14Complications
15Comparison Table (all 3 methods side by side)
16Clinical Scenarios & Viva Q&A
17Key Points Summary
18Thank You / References
Embedded images from the textbooks:
  • Sagittal anatomy diagram (oral cavity / oropharynx / hypopharynx in colour)
  • Flexible laryngoscopy clinical photograph
  • Laryngeal anatomy & superior laryngeal nerve diagram
This is a shared conversation. Sign in to Orris to start your own chat.