~/anaesthesia-study-guide/build_guide.py
from docx import Document
from docx.shared import Pt, Inches, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.oxml.ns import qn
from docx.oxml import OxmlElement
import copy
doc = Document()
# ──────────────────────────────────────────────
# PAGE SETUP: A4, margins
# ──────────────────────────────────────────────
section = doc.sections[0]
section.page_width = Inches(8.27)
section.page_height = Inches(11.69)
section.left_margin = Inches(1.0)
section.right_margin = Inches(1.0)
section.top_margin = Inches(1.0)
section.bottom_margin = Inches(1.0)
# ──────────────────────────────────────────────
# COLOUR PALETTE
# ──────────────────────────────────────────────
DARK_BLUE = RGBColor(0x1A, 0x35, 0x5E) # deep navy
MED_BLUE = RGBColor(0x2E, 0x6E, 0xBD) # heading blue
ACCENT_TEAL = RGBColor(0x00, 0x86, 0x96) # teal subheadings
BOX_FILL = RGBColor(0xE8, 0xF4, 0xFD) # light blue box bg
WARN_FILL = RGBColor(0xFF, 0xF3, 0xCD) # amber for limitations
KEY_FILL = RGBColor(0xD4, 0xED, 0xDA) # green for key points
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
DARK_GRAY = RGBColor(0x33, 0x33, 0x33)
# ──────────────────────────────────────────────
# BASE STYLE
# ──────────────────────────────────────────────
normal_style = doc.styles["Normal"]
normal_style.font.name = "Arial"
normal_style.font.size = Pt(10.5)
normal_style.font.color.rgb = DARK_GRAY
# ──────────────────────────────────────────────
# HELPER FUNCTIONS
# ──────────────────────────────────────────────
def set_cell_bg(cell, rgb: RGBColor):
tc = cell._tc
tcPr = tc.get_or_add_tcPr()
shd = OxmlElement('w:shd')
shd.set(qn('w:val'), 'clear')
shd.set(qn('w:color'), 'auto')
shd.set(qn('w:fill'), f'{rgb[0]:02X}{rgb[1]:02X}{rgb[2]:02X}')
tcPr.append(shd)
def set_cell_border(cell, **kwargs):
"""Add border to a cell. kwargs: top, bottom, left, right = 'single'"""
tc = cell._tc
tcPr = tc.get_or_add_tcPr()
tcBorders = OxmlElement('w:tcBorders')
for edge, val in kwargs.items():
border = OxmlElement(f'w:{edge}')
border.set(qn('w:val'), val)
border.set(qn('w:sz'), '4')
border.set(qn('w:space'), '0')
border.set(qn('w:color'), '2E6EBD')
tcBorders.append(border)
tcPr.append(tcBorders)
def add_cover_title(doc, text):
p = doc.add_paragraph()
p.alignment = WD_ALIGN_PARAGRAPH.CENTER
run = p.add_run(text)
run.bold = True
run.font.size = Pt(26)
run.font.color.rgb = WHITE
run.font.name = "Arial"
# paragraph shading
pPr = p._p.get_or_add_pPr()
shd = OxmlElement('w:shd')
shd.set(qn('w:val'), 'clear')
shd.set(qn('w:color'), 'auto')
shd.set(qn('w:fill'), '1A355E')
pPr.append(shd)
p.paragraph_format.space_before = Pt(12)
p.paragraph_format.space_after = Pt(12)
return p
def add_h1(doc, text):
"""Main topic heading - dark blue banner"""
p = doc.add_paragraph()
p.alignment = WD_ALIGN_PARAGRAPH.LEFT
run = p.add_run(f" {text}")
run.bold = True
run.font.size = Pt(15)
run.font.color.rgb = WHITE
run.font.name = "Arial"
pPr = p._p.get_or_add_pPr()
shd = OxmlElement('w:shd')
shd.set(qn('w:val'), 'clear')
shd.set(qn('w:color'), 'auto')
shd.set(qn('w:fill'), '1A355E')
pPr.append(shd)
p.paragraph_format.space_before = Pt(14)
p.paragraph_format.space_after = Pt(4)
return p
def add_h2(doc, text):
"""Section heading - medium blue"""
p = doc.add_paragraph()
run = p.add_run(text)
run.bold = True
run.font.size = Pt(12.5)
run.font.color.rgb = MED_BLUE
run.font.name = "Arial"
p.paragraph_format.space_before = Pt(10)
p.paragraph_format.space_after = Pt(2)
# bottom border
pPr = p._p.get_or_add_pPr()
pBdr = OxmlElement('w:pBdr')
bottom = OxmlElement('w:bottom')
bottom.set(qn('w:val'), 'single')
bottom.set(qn('w:sz'), '4')
bottom.set(qn('w:space'), '1')
bottom.set(qn('w:color'), '2E6EBD')
pBdr.append(bottom)
pPr.append(pBdr)
return p
def add_h3(doc, text):
"""Sub-section heading - teal"""
p = doc.add_paragraph()
run = p.add_run(text)
run.bold = True
run.font.size = Pt(11)
run.font.color.rgb = ACCENT_TEAL
run.font.name = "Arial"
p.paragraph_format.space_before = Pt(7)
p.paragraph_format.space_after = Pt(2)
return p
def add_body(doc, text, indent=False):
p = doc.add_paragraph()
run = p.add_run(text)
run.font.size = Pt(10.5)
run.font.color.rgb = DARK_GRAY
run.font.name = "Arial"
if indent:
p.paragraph_format.left_indent = Inches(0.25)
p.paragraph_format.space_after = Pt(3)
return p
def add_bullet(doc, text, level=0, bold_prefix=None):
p = doc.add_paragraph(style='List Bullet')
p.paragraph_format.left_indent = Inches(0.25 + level * 0.25)
p.paragraph_format.space_after = Pt(2)
if bold_prefix:
r1 = p.add_run(bold_prefix + ": ")
r1.bold = True
r1.font.size = Pt(10.5)
r1.font.name = "Arial"
r1.font.color.rgb = DARK_GRAY
r2 = p.add_run(text)
r2.font.size = Pt(10.5)
r2.font.name = "Arial"
r2.font.color.rgb = DARK_GRAY
return p
def add_box(doc, title, items, fill_rgb=None):
"""A shaded box with a title and bullet items."""
if fill_rgb is None:
fill_rgb = BOX_FILL
tbl = doc.add_table(rows=1, cols=1)
tbl.style = 'Table Grid'
cell = tbl.rows[0].cells[0]
set_cell_bg(cell, fill_rgb)
# Title
tp = cell.add_paragraph()
tr = tp.add_run(title)
tr.bold = True
tr.font.size = Pt(11)
tr.font.color.rgb = DARK_BLUE
tr.font.name = "Arial"
tp.paragraph_format.space_after = Pt(3)
# Items
for item in items:
ip = cell.add_paragraph()
ip.paragraph_format.left_indent = Inches(0.15)
ir = ip.add_run(f"• {item}")
ir.font.size = Pt(10)
ir.font.name = "Arial"
ir.font.color.rgb = DARK_GRAY
ip.paragraph_format.space_after = Pt(1)
# Remove first empty paragraph python-docx adds
cell.paragraphs[0]._element.getparent().remove(cell.paragraphs[0]._element)
p_after = doc.add_paragraph()
p_after.paragraph_format.space_after = Pt(4)
return tbl
def add_table(doc, headers, rows, header_fill=None):
if header_fill is None:
header_fill = MED_BLUE
ncols = len(headers)
tbl = doc.add_table(rows=1 + len(rows), cols=ncols)
tbl.style = 'Table Grid'
# Header row
hdr_cells = tbl.rows[0].cells
for i, h in enumerate(headers):
set_cell_bg(hdr_cells[i], header_fill)
p = hdr_cells[i].paragraphs[0]
run = p.add_run(h)
run.bold = True
run.font.size = Pt(10)
run.font.color.rgb = WHITE
run.font.name = "Arial"
# Data rows
for ri, row_data in enumerate(rows):
cells = tbl.rows[ri + 1].cells
for ci, val in enumerate(row_data):
# alternate shading
if ri % 2 == 0:
set_cell_bg(cells[ci], RGBColor(0xF5, 0xF9, 0xFF))
p = cells[ci].paragraphs[0]
run = p.add_run(str(val))
run.font.size = Pt(10)
run.font.name = "Arial"
run.font.color.rgb = DARK_GRAY
p_after = doc.add_paragraph()
p_after.paragraph_format.space_after = Pt(6)
return tbl
def add_spacer(doc, height_pt=6):
p = doc.add_paragraph()
p.paragraph_format.space_before = Pt(0)
p.paragraph_format.space_after = Pt(height_pt)
def add_divider(doc):
p = doc.add_paragraph()
pPr = p._p.get_or_add_pPr()
pBdr = OxmlElement('w:pBdr')
bottom = OxmlElement('w:bottom')
bottom.set(qn('w:val'), 'single')
bottom.set(qn('w:sz'), '6')
bottom.set(qn('w:space'), '1')
bottom.set(qn('w:color'), '1A355E')
pBdr.append(bottom)
pPr.append(pBdr)
p.paragraph_format.space_before = Pt(4)
p.paragraph_format.space_after = Pt(4)
# ══════════════════════════════════════════════════════════
# COVER PAGE
# ══════════════════════════════════════════════════════════
add_cover_title(doc, "ANAESTHESIA QUICK REVISION GUIDE")
p = doc.add_paragraph()
p.alignment = WD_ALIGN_PARAGRAPH.CENTER
r = p.add_run("Exam-Focused Study Notes | Jan 2025 & Sept 2025 Paper Topics")
r.font.size = Pt(12)
r.font.color.rgb = MED_BLUE
r.font.name = "Arial"
r.italic = True
add_spacer(doc, 8)
# Topic index box
add_box(doc, "TOPICS COVERED", [
"1. Opioid Free Anaesthesia (OFA) — Role, Benefits & Limitations",
"2. Recent Advances in Anaesthesia for Intrauterine Fetal Surgery",
"3. Ultrasound for Airway Assessment and Management",
"4. Hospital Acquired Infections & Ventilator Associated Pneumonia (VAP)",
], fill_rgb=RGBColor(0xE8, 0xF4, 0xFD))
add_spacer(doc, 8)
p2 = doc.add_paragraph()
p2.alignment = WD_ALIGN_PARAGRAPH.CENTER
r2 = p2.add_run("Sources: Miller's Anesthesia 10e | Morgan & Mikhail 7e | Barash Clinical Anesthesia 9e | Fishman's Pulmonary Diseases 6e")
r2.font.size = Pt(9)
r2.font.color.rgb = RGBColor(0x66, 0x66, 0x66)
r2.font.name = "Arial"
r2.italic = True
doc.add_page_break()
# ══════════════════════════════════════════════════════════
# TOPIC 1: OPIOID FREE ANAESTHESIA
# ══════════════════════════════════════════════════════════
add_h1(doc, "TOPIC 1: OPIOID FREE ANAESTHESIA (OFA)")
add_h2(doc, "Definition & Background")
add_body(doc, "Opioid Free Anaesthesia (OFA) is an anaesthetic technique in which opioids are completely avoided intraoperatively, relying on a combination of non-opioid analgesics, regional techniques, and adjuvant drugs to achieve analgesia and obtund the surgical stress response.")
add_spacer(doc, 4)
add_body(doc, "Opioid-Sparing Analgesia (OSA) = minimising (not eliminating) opioids. OFA is a subset of the broader OSA movement.")
add_h2(doc, "WHY OFA? — The Rationale")
add_box(doc, "Drivers of the OFA Movement", [
"Global opioid epidemic — prescription opioid abuse crisis",
"Opioid-induced hyperalgesia (OIH) — paradoxical pain sensitisation",
"Postoperative nausea & vomiting (PONV) — opioids are the #1 cause",
"Respiratory depression — especially in OSA, obese, elderly patients",
"Postoperative delirium in ICU/elderly patients",
"Immunosuppressive effects of opioids (NK cell suppression)",
"Opioid tolerance and dependence risk in naive patients",
"Delayed return of bowel function (opioid-induced ileus)",
], fill_rgb=BOX_FILL)
add_h2(doc, "Pharmacological Components of OFA")
add_table(doc,
["Drug Category", "Agents", "Mechanism"],
[
["Alpha-2 agonists", "Dexmedetomidine, Clonidine", "Presynaptic alpha-2; reduces NE release; sedation + analgesia"],
["NMDA antagonists", "Ketamine (S-ketamine), Mg SO4", "Blocks NMDA receptor; prevents central sensitisation"],
["IV local anaesthetic", "Systemic Lidocaine infusion", "Na-channel block; anti-hyperalgesic; anti-inflammatory"],
["NSAIDs / COX-2i", "Ketorolac, Parecoxib, Celecoxib", "Inhibit prostaglandin synthesis peripherally"],
["Alpha-2-delta ligands", "Gabapentin, Pregabalin", "Block voltage-gated Ca2+ channels; reduce glutamate release"],
["Glucocorticoids", "Dexamethasone", "Anti-inflammatory; prolongs regional block duration"],
["Paracetamol", "IV/oral Acetaminophen", "Central & peripheral COX inhibition; supraspinal action"],
["Regional techniques", "Epidural, TAP, PEC blocks, PNBs", "Afferent blockade; prevent central sensitisation"],
["Beta-blockers", "Esmolol", "Blunts surgical stress haemodynamic response"],
["Volatile agents", "High-dose sevo/desflurane", "MAC-adjusted; provides immobility & some analgesia"],
]
)
add_h2(doc, "Benefits of OFA")
add_box(doc, "POTENTIAL BENEFITS", [
"1. Reduces PONV — bariatric surgery studies show benefit beyond triple antiemetic prophylaxis",
"2. Avoids respiratory depression — crucial in morbid obesity, OSA, paediatric tonsillectomy",
"3. Prevents OIH — avoids paradoxical pain sensitisation from high-dose intraoperative opioids",
"4. Reduces postoperative delirium — modifiable risk factor in elderly/ICU",
"5. Faster return of bowel function — shorter ileus; supports ERAS protocols",
"6. Shorter PACU stay and faster discharge",
"7. Reduced chronic pain risk — less peripheral and central sensitisation",
"8. Preserves immune function — avoids opioid-induced NK cell suppression",
"9. No opioid dependence risk in naive patients",
], fill_rgb=KEY_FILL)
add_h2(doc, "Limitations of OFA")
add_box(doc, "LIMITATIONS / RISKS", [
"1. Haemodynamic instability — large proof-of-concept RCT terminated early due to hypoxia & bradycardia",
"2. Increased vasopressor requirement (dexmedetomidine causes bradycardia & hypotension)",
"3. Postoperative sedation and falls (residual dexmedetomidine effect)",
"4. Inadequate for highly nociceptive procedures without regional anaesthesia",
"5. Dependence on regional techniques — block failure, haematoma, nerve injury risk",
"6. Adjuvant drug side effects: Ketamine (dysphoria), NSAIDs (renal/GI), Pregabalin (dizziness)",
"7. Limited high-quality RCT evidence for major cardiac/thoracic surgery",
"8. Not universally superior — opioid-sparing approach may be more practical in most patients",
], fill_rgb=WARN_FILL)
add_h2(doc, "OFA vs Opioid-Sparing Analgesia")
add_table(doc,
["Feature", "OFA (Opioid Free)", "Opioid-Sparing (OSA)"],
[
["Opioid dose", "Zero intraoperatively", "Reduced (not zero)"],
["Evidence base", "Limited RCTs", "Strong, well-established"],
["PONV benefit", "Maximum", "Significant"],
["Haemodynamic stability", "Potentially compromised", "Better"],
["Applicability", "Selected cases", "Near universal"],
["ERAS compatibility", "High", "High"],
["Typical candidates", "Bariatric, opioid-dependent, OSA", "All surgical patients"],
]
)
add_h2(doc, "Clinical Bottom Line")
add_box(doc, "KEY TAKE-HOME MESSAGE", [
"OFA is NOT a universal solution — it is best reserved for selected patients",
"Opioid-SPARING multimodal analgesia is the recommended standard for most patients",
"A large proof-of-concept study was terminated early due to hypoxia and bradycardia (Miller's 10e)",
"By using a multimodal pharmacological + regional approach, the anaesthesiologist can contribute to combating the opioid crisis while maintaining patient safety",
"Pre-operative screening for chronic pain, opioid use, and substance abuse is essential",
], fill_rgb=BOX_FILL)
doc.add_page_break()
# ══════════════════════════════════════════════════════════
# TOPIC 2: INTRAUTERINE FETAL SURGERY
# ══════════════════════════════════════════════════════════
add_h1(doc, "TOPIC 2: ANAESTHESIA FOR INTRAUTERINE FETAL SURGERY")
add_h2(doc, "Introduction")
add_body(doc, "Fetal surgery encompasses in utero interventions to correct anatomical malformations causing irreversible harm if untreated. The anaesthesiologist faces a unique DUAL-PATIENT challenge: the pregnant mother AND the fetus. Success depends on multidisciplinary teamwork at a specialised fetal therapy centre. (Miller's Anesthesia 10e, Ch. 59)")
add_h2(doc, "Prerequisites for Fetal Surgery")
add_box(doc, "Criteria (must satisfy ALL)", [
"Fetal lesion accurately diagnosed on imaging",
"Progression & severity of anomaly predictable and well-understood",
"No other severe anomalies contraindicating intervention",
"Without treatment: fetal demise, irreversible organ damage, or severe neonatal morbidity",
"Risk to the pregnant patient is acceptably low",
"Animal model feasibility demonstrated",
"Ethics committee approval; full informed consent obtained",
"Specialised multidisciplinary centre (Level II or III)",
], fill_rgb=BOX_FILL)
add_h2(doc, "Classification of Fetal Surgery Procedures")
add_table(doc,
["Type", "Technique", "Anaesthesia Used"],
[
["Minimally invasive (FIGS-IT)", "US-guided percutaneous needle procedures", "Local + IV sedation"],
["Fetoscopic surgery", "Small scope; percutaneous; US + camera guidance", "Local, sedation, or neuraxial (CSE/epidural)"],
["Open fetal surgery", "Maternal laparotomy + hysterotomy", "General anaesthesia (MANDATORY)"],
["EXIT procedure", "Delivery while placenta intact; airway secured", "General anaesthesia + epidural"],
]
)
add_h2(doc, "Conditions & RCT Evidence")
add_table(doc,
["Condition", "Procedure", "Trial / Evidence"],
[
["Twin-to-Twin Transfusion Syndrome (TTTS)", "Fetoscopic laser photocoagulation of placental vessels", "Level I RCT — standard of care"],
["Myelomeningocele (spina bifida)", "Open or fetoscopic MMC repair", "MOMS Trial — improved motor function"],
["Congenital Diaphragmatic Hernia (CDH)", "Fetal Endoscopic Tracheal Occlusion (FETO)", "TOTAL Trial — survival benefit in severe CDH"],
["Lower Urinary Tract Obstruction (LUTO)", "Vesico-amniotic shunt", "PLUTO Trial"],
["Sacrococcygeal Teratoma (SCT)", "Debulking for high-output cardiac failure", "Case series; Level III centres"],
["CPAM / pulmonary lesions", "Thoraco-amniotic shunt", "Selected cases"],
]
)
add_h2(doc, "Anaesthetic Management — Overview")
add_h3(doc, "A. Maternal Anaesthesia")
add_box(doc, "For Open Fetal Surgery", [
"General anaesthesia REQUIRED",
"High-dose volatile agent: Desflurane/Sevoflurane at 1.5–2 MAC",
" -> Provides: maternal anaesthesia + uterine relaxation (tocolysis) + transplacental fetal anaesthesia",
"Supplemental IV: propofol, remifentanil infusion",
"Epidural catheter inserted pre-op for postoperative pain management",
"Arterial line + large-bore IV + type & crossmatch (haemorrhage risk)",
], fill_rgb=BOX_FILL)
add_box(doc, "For Fetoscopic / Minimally Invasive Procedures", [
"Neuraxial anaesthesia preferred (spinal or CSE)",
"OR: local infiltration + IV sedation (fentanyl + midazolam)",
"No need for uterine relaxation agents in most cases",
"Less maternal physiological derangement",
], fill_rgb=KEY_FILL)
add_h3(doc, "B. Fetal Anaesthesia and Analgesia")
add_body(doc, "Fetal pain perception: nociceptive pathways present by 24–28 weeks gestation. Fetal hormonal & haemodynamic stress responses to noxious stimuli are well-documented — direct fetal opioid analgesia attenuates these responses.")
add_spacer(doc, 4)
add_table(doc,
["Route", "Drugs", "Indications"],
[
["Transplacental (maternal IV/inhalational)", "Volatile agents, opioids, benzodiazepines", "All open fetal surgery"],
["Intramuscular (IM into fetus)", "Fentanyl 10–20 mcg/kg + Atropine 20 mcg/kg + Vecuronium", "Fetoscopic procedures"],
["Intra-umbilical vein injection", "Fentanyl, atropine, muscle relaxant", "When IM access difficult"],
]
)
add_h3(doc, "C. Uterine Relaxation (Tocolysis)")
add_box(doc, "Tocolytic Strategy", [
"INTRAOPERATIVE: High-dose volatile agents (primary; dose-dependent uterine relaxation)",
"INTRAOPERATIVE ADJUNCT: IV Nitroglycerin (rapid onset, short duration)",
"PERIOPERATIVE: IV Magnesium sulphate",
"POSTOPERATIVE: Nifedipine (Ca-channel blocker) or Indomethacin (PG inhibitor)",
"Indometacin caution: avoid after 32 weeks (premature ductal closure)",
], fill_rgb=BOX_FILL)
add_h3(doc, "D. Fetal Monitoring")
add_box(doc, "Fetal Monitoring Methods", [
"Continuous fetal echocardiography / fetal heart rate monitoring throughout procedure",
"Umbilical artery Doppler — detects flow abnormalities (sign of fetal compromise)",
"Fetal pulse oximetry (limited; used on exteriorised limb in open surgery)",
"Fetal scalp electrode (when applicable)",
"Immediate access to fetal resuscitation drugs: atropine, epinephrine",
], fill_rgb=BOX_FILL)
add_h2(doc, "Recent Advances (Exam High-Yield)")
add_table(doc,
["Advance", "Key Points"],
[
["Fetoscopic MMC Repair", "3-port technique; CSE anaesthesia; reduced maternal morbidity vs open surgery"],
["FETO for CDH (TOTAL Trial)", "Balloon at 27–30 wks; removed at 34 wks; neuraxial/local anaesthesia; benefit in liver-up CDH with o/e LHR < 25%"],
["EXIT Procedure", "High-dose volatile; uterus kept relaxed; airway secured on placental bypass before cord cut"],
["Fetal Cardiac Interventions", "Aortic/pulmonary valvuloplasty; US-guided percutaneous; fetal IM injection; 60–70% technical success"],
["Neurodevelopmental Safety", "FDA 2016 warning re: anaesthetics & developing brain; GAS trial: single short exposure = minimal risk"],
["Three-Level Fetal Centres", "Level I: low risk; Level II: ICU capable; Level III: all open + all complications"],
["Bioethics & Counselling", "Termination, watchful waiting, or intervention — all must be offered; informed consent paramount"],
]
)
add_h2(doc, "Complications & Management")
add_table(doc,
["Complication", "Management"],
[
["Fetal bradycardia", "Atropine IM/IV into fetus; adjust volatile conc; maternal ephedrine"],
["PPROM (most common)", "Most frequent complication; conservative or delivery based on GA"],
["Preterm labour", "Tocolysis: magnesium, nifedipine; monitor CTG 24–48 h post-op"],
["Maternal haemorrhage", "Blood products; uterotonics after fetus delivered"],
["Mirror syndrome", "Severe preeclampsia mimic; delivery usually required"],
["Fetal demise", "Emergency caesarean or expectant management based on GA"],
]
)
doc.add_page_break()
# ══════════════════════════════════════════════════════════
# TOPIC 3: ULTRASOUND FOR AIRWAY
# ══════════════════════════════════════════════════════════
add_h1(doc, "TOPIC 3: ULTRASOUND FOR AIRWAY ASSESSMENT & MANAGEMENT")
add_h2(doc, "Introduction")
add_body(doc, "Point-of-care ultrasound (POCUS) provides real-time, dynamic, objective anatomical information of the airway without radiation. It has transformed from a supplementary tool to an integral component of modern airway practice — for pre-operative planning, intubation guidance, ETT confirmation, and emergency airway rescue. (Morgan & Mikhail 7e; Miller's Anesthesia 10e)")
add_h2(doc, "Ultrasound Anatomy of the Airway")
add_table(doc,
["Structure", "US Appearance", "Clinical Relevance"],
[
["Thyroid cartilage", "Echogenic; inverted V-shape anteriorly", "Landmark for CTM identification"],
["Cricothyroid membrane (CTM)", "Hypoechoic gap between thyroid & cricoid", "Surgical airway landmark"],
["Cricoid cartilage", "Echogenic ring; inferior to CTM", "Defines subglottic space"],
["Tracheal rings", "Hyperechoic anterior walls; posterior acoustic shadow", "Counting rings for tracheostomy level"],
["Trachea (lumen)", "Anechoic lumen behind rings; 'snowstorm' artifact from air", "Confirms tracheal vs oesophageal intubation"],
["Thyroid gland", "Bilateral echogenic; flanks trachea", "Avoidance during tracheostomy"],
["Oesophagus", "Posterior & lateral to trachea (usually left)", "Identifies oesophageal intubation"],
["Vocal cords", "Coronal view through thyroid cartilage; symmetrical hyperechoic bands", "Vocal cord mobility assessment"],
]
)
add_h2(doc, "Probe & Views")
add_table(doc,
["View", "Probe", "Frequency", "Best Used For"],
[
["Transverse (cross-section)", "Linear", "7.5–15 MHz", "Trachea, CTM, oesophagus, ETT position"],
["Longitudinal (sagittal)", "Linear", "7.5–15 MHz", "Tracheal ring counting; tracheostomy planning"],
["Coronal (through thyroid cartilage)", "Linear", "7.5–15 MHz", "Vocal cord movement"],
["Subglottic transverse", "Linear", "7.5–15 MHz", "Tracheal diameter; ETT size selection"],
]
)
add_h2(doc, "Application 1: Pre-operative Airway Assessment")
add_box(doc, "Predicting Difficult Airway with Ultrasound", [
"Pre-tracheal soft tissue thickness: >28 mm skin-to-trachea predicts difficult laryngoscopy (obese patients)",
"Tongue base thickness: hyoid-to-mental distance correlates with Mallampati class",
"Sublingual space (hyoid to floor of mouth): reduced in obesity — predicts difficult mask ventilation",
"Anterior neck fat: quantifiable; relevant for bag-mask ventilation difficulty",
"Neck circumference: identified on US; > 43 cm associated with difficult intubation",
], fill_rgb=BOX_FILL)
add_h2(doc, "Application 2: Cricothyroid Membrane (CTM) Identification")
add_box(doc, "Why Ultrasound CTM Identification Matters", [
"Palpation-based CTM identification FAILS in up to 65% of cases — especially in obese & female patients",
"Ultrasound reliably identifies CTM by the hypoechoic gap between thyroid and cricoid cartilages",
"USEFUL Protocol: systematic scanning from thyroid notch to cricoid for CTM marking",
"Pre-operative US marking of CTM recommended in anticipated difficult airways BEFORE induction",
"Directly improves success rate of emergency cricothyrotomy in 'can't intubate, can't oxygenate' scenarios",
], fill_rgb=WARN_FILL)
add_h2(doc, "Application 3: ETT Placement Confirmation")
add_table(doc,
["Scenario", "US Finding", "Interpretation"],
[
["Tracheal intubation", "Single 'double-tract sign' in trachea (hyperechoic lines)", "CORRECT — tracheal placement"],
["Oesophageal intubation", "Two 'double-tract signs': one in trachea + one in oesophagus (posterior-lateral)", "INCORRECT — pull back immediately"],
["Dynamic real-time view", "ETT tip visible passing through tracheal rings as hyperechoic area", "Real-time intubation confirmation"],
]
)
add_body(doc, "Sensitivity of ultrasound for detecting oesophageal intubation: 97–100%. Faster than clinical auscultation in noisy environments (ED, ICU).", indent=True)
add_body(doc, "Note: Capnography remains the GOLD STANDARD — ultrasound is a rapid adjunct, not a replacement.", indent=True)
add_h2(doc, "Application 4: Bilateral Lung Ventilation Confirmation")
add_box(doc, "Lung Ultrasound for Ventilation", [
"Lung sliding sign (B-mode): pleural line shimmering bilaterally = bilateral ventilation confirmed",
"Absent lung sliding on one side = endobronchial intubation or pneumothorax",
"M-mode: SEASHORE SIGN = normal ventilation; BARCODE SIGN = no ventilation",
"Sensitivity for endobronchial intubation: ~95%",
"Diaphragm assessment: bilateral dome excursion confirms symmetric ventilation",
], fill_rgb=BOX_FILL)
add_h2(doc, "Application 5: ETT Size Selection (Subglottic Diameter)")
add_bullet(doc, "Transverse US view at subglottic level measures air-mucosa interface diameter")
add_bullet(doc, "ETT outer diameter should be ≤80% of tracheal internal diameter")
add_bullet(doc, "Especially useful in paediatric patients — reduces post-extubation stridor")
add_bullet(doc, "Reduces need for ETT exchange due to size mismatch")
add_h2(doc, "Application 6: Percutaneous Tracheostomy Guidance")
add_box(doc, "Ultrasound-Guided Percutaneous Tracheostomy", [
"Identifies pre-tracheal vessels — avoids thyroid vessels and innominate artery puncture",
"Confirms needle insertion between tracheal rings (not into thyroid or vessels)",
"Real-time guidance for Seldinger wire placement",
"Confirms intraluminal wire position before dilation",
"Reduces pneumothorax, haemorrhage, and false passage complications",
], fill_rgb=BOX_FILL)
add_h2(doc, "Advantages vs Limitations")
add_table(doc,
["Advantages", "Limitations"],
[
["Non-invasive, no radiation", "Operator dependent — needs training"],
["Real-time dynamic imaging", "Obesity/subcutaneous emphysema degrades image quality"],
["Bedside — OR, ICU, ED", "Cannot visualise larynx beyond vocal cords"],
["Detects oesophageal intubation (97–100%)", "Does NOT replace capnography (gold standard)"],
["CTM identification in obese patients", "Real-time intubation technically challenging"],
["Detects endobronchial intubation rapidly", "Limited evidence for difficult airway prediction vs clinical scoring"],
["No sedation or patient cooperation required", "Equipment cost and availability variable"],
]
)
add_h2(doc, "Summary Algorithm: Ultrasound in Airway Management")
add_box(doc, "STEP-BY-STEP APPROACH", [
"PRE-OP: Assess anterior neck soft tissue; identify CTM; measure subglottic diameter",
" -> In obese/difficult airway: mark CTM under US before induction",
"DURING INTUBATION: Real-time transverse neck view to confirm ETT in trachea",
"POST-INTUBATION: Bilateral lung sliding to confirm bilateral ventilation",
"IF DOUBT: Two-point scan (neck + lungs) takes < 30 seconds",
"FOR TRACHEOSTOMY: Pre-procedural vessel mapping; real-time needle guidance",
"EMERGENCY: Pre-marked CTM guides surgical airway in CICO scenario",
], fill_rgb=RGBColor(0xE8, 0xF4, 0xFD))
doc.add_page_break()
# ══════════════════════════════════════════════════════════
# TOPIC 4: HAI & VAP
# ══════════════════════════════════════════════════════════
add_h1(doc, "TOPIC 4: HOSPITAL ACQUIRED INFECTIONS & VENTILATOR ASSOCIATED PNEUMONIA")
add_h2(doc, "Hospital Acquired Infections (HAI) — Overview")
add_box(doc, "Definition of HAI (Nosocomial Infection)", [
"Infection NOT present or incubating at time of hospital admission",
"Develops 48 hours or more after admission",
"May manifest up to 30 days post-discharge (or 1 year for implant-related infections)",
"Types: VAP, CAUTI, CLABSI, SSI, C. difficile infection",
], fill_rgb=BOX_FILL)
add_table(doc,
["HAI Type", "Definition", "Common Organism"],
[
["VAP", "Pneumonia ≥48 h after intubation", "S. aureus, Pseudomonas, Klebsiella"],
["HAP (non-ventilated)", "Pneumonia ≥48 h after admission (non-intubated)", "Same as VAP"],
["CAUTI", "UTI with urinary catheter in situ", "E. coli, Klebsiella, Candida"],
["CLABSI", "BSI with central venous catheter", "CoNS, S. aureus, Candida"],
["SSI", "Surgical site infection within 30 days", "S. aureus, E. coli, Enterococcus"],
]
)
add_h2(doc, "VENTILATOR ASSOCIATED PNEUMONIA (VAP)")
add_h3(doc, "Definition")
add_box(doc, "VAP — Clinical Definition", [
"Pneumonia diagnosed 48 hours or more after endotracheal intubation",
"Clinical criteria: New/progressive lung infiltrate PLUS 2 of the following:",
" 1. Hyperthermia (>38°C) or hypothermia (<36°C)",
" 2. WBC > 10,000/mm³ or leucopenia",
" 3. Purulent tracheal secretions",
" 4. Worsening oxygenation (rising FiO2 / falling SpO2)",
"Early VAP: < 4 days — likely community-sensitive organisms",
"Late VAP: ≥ 5 days — higher risk of MDR organisms",
], fill_rgb=BOX_FILL)
add_h3(doc, "Epidemiology (High-Yield Numbers)")
add_box(doc, "Key Statistics to Memorise", [
"VAP = most common HAI in ICU; accounts for 28% of ALL HAIs",
"Mechanical ventilation increases pneumonia risk 20-FOLD",
"~10% of mechanically ventilated patients develop VAP",
"VAP rate: 14.8 cases per 1000 ventilator days (Canadian multicentre study)",
"ICU mortality: 24.8%; In-hospital mortality: 31.9%",
"Attributable ICU LOS increase: 4–13 days",
"Additional hospitalisation cost: ~$39,828 per patient",
], fill_rgb=WARN_FILL)
add_h3(doc, "Pathophysiology / Causes")
add_body(doc, "Primary route: Aspiration of microorganisms colonising the oropharynx/aerodigestive tract into the lower respiratory tract in a host with impaired immunity.")
add_spacer(doc, 4)
add_box(doc, "Why Does Colonisation Increase in Hospitalised Patients?", [
"Altered gastric pH from PPIs/H2-blockers (stress ulcer prophylaxis) -> gastric overgrowth",
"Contaminated respiratory equipment and hospital water systems",
"Healthcare worker hand transmission (most preventable route)",
"Respiratory droplet spread of MDR organisms",
"Disruption of normal oropharyngeal flora by broad-spectrum antibiotics",
"Impaired host immunity: severity of illness, immunosuppression, malnutrition",
], fill_rgb=BOX_FILL)
add_h3(doc, "Microbiology (NHSN 2015–2017 Data)")
add_table(doc,
["Pathogen", "% Isolates", "Rank", "Key Note"],
[
["Staphylococcus aureus (MRSA incl.)", "28.8%", "1st", "Most common; MRSA needs vancomycin/linezolid"],
["Pseudomonas aeruginosa", "12.9%", "2nd", "MDR common; anti-pseudomonal coverage needed"],
["Klebsiella species", "10.1%", "3rd", "ESBL possible; carbapenems if resistant"],
["Enterobacter species", "8.4%", "4th", "Inducible AmpC resistance"],
["Haemophilus influenzae", "5.9%", "5th", "Sensitive organisms; early VAP"],
["Escherichia coli", "5.6%", "7th", "ESBL strains increasing"],
["Acinetobacter species", "3.2%", "10th", "Highly MDR; outbreak risk in ICU"],
]
)
add_body(doc, "16.8% of all VAP isolates show resistance to ≥3 antibiotic classes (MDR).", indent=True)
add_h3(doc, "Risk Factors for VAP")
add_table(doc,
["Patient-Related Risk Factors", "Procedure/Environment-Related"],
[
["Age > 60 years", "Duration of mechanical ventilation (most important)"],
["Altered consciousness / sedation", "Supine positioning (flat bed)"],
["Chronic lung disease (COPD, bronchiectasis)", "Nasotracheal intubation (vs orotracheal)"],
["ARDS prior to VAP", "Reintubation"],
["Immunosuppression / steroids", "Nasogastric tube (promotes aspiration)"],
["Prior IV antibiotics within 90 days", "Frequent ventilator circuit handling"],
["Septic shock at VAP onset", "Inadequate nurse-to-patient ratio"],
["Acute renal replacement therapy", "Indwelling vascular/urinary catheters"],
]
)
add_h2(doc, "PREVENTION OF VAP")
add_h3(doc, "VAP Prevention Bundle (IHI Ventilator Bundle)")
add_body(doc, "Bundle = simultaneous implementation of ALL measures (synergistic effect greater than individual interventions)")
add_table(doc,
["Prevention Strategy", "Evidence", "Notes"],
[
["Semierect positioning (HOB 30–45°)", "Level 1 RCT", "Reduces micro-aspiration"],
["Oral chlorhexidine decontamination", "Level 1 RCT", "0.12% or 0.2% twice daily"],
["Orotracheal (not nasotracheal) intubation", "Level 1 RCT", "Nasotracheal promotes sinusitis + VAP"],
["Subglottic secretion drainage", "Level 1 RCT", "Special ETT with suction port above cuff"],
["Polyurethane ETT cuff (not PVC)", "Level 1 RCT", "Reduces micro-aspiration around cuff"],
["Silver-coated ETT", "Level 1 RCT", "Anti-biofilm; reduces early VAP"],
["Closed ETT suctioning system", "Level 1 RCT", "Prevents VAP from open suctioning"],
["Heat-moisture exchanger (HME)", "Level 1 RCT", "Replaces heated humidifier"],
["Rotational / kinetic beds", "Level 1 RCT", "Prevents secretion pooling"],
["Non-invasive ventilation (NIV) where possible", "Level 1 RCT", "Avoids intubation entirely"],
["Daily SAT + SBT protocol (minimise vent days)", "Level 1 RCT", "Every day on vent = VAP risk"],
["Daily sedation vacation (SAT)", "Level 2", "Allows neuro assessment; speeds extubation"],
["Avoid reintubation", "Level 2", "Each reintubation recontaminates airway"],
["Orogastric (not nasogastric) feeding tube", "Level 2", "Reduces sinusitis and aspiration"],
["Restricted blood transfusion", "Level 2", "Immunosuppressive effects of transfusion"],
]
)
add_box(doc, "NOT RECOMMENDED for VAP Prevention", [
"Routine ventilator circuit changes (increases VAP risk by disturbing biofilm)",
"Chest physiotherapy (no benefit for VAP prevention)",
"Early tracheostomy (no VAP benefit; only improves patient comfort)",
"Routine antibiotic cycling/rotation (promotes MDR selection)",
"Routine antibiotic prophylaxis (causes MDR organisms)",
"Specific stress ulcer prophylaxis regimen over another",
], fill_rgb=WARN_FILL)
add_h2(doc, "MANAGEMENT OF VAP")
add_h3(doc, "Step 1: Diagnosis")
add_box(doc, "CPIS Score (Clinical Pulmonary Infection Score) — Score > 6 suggests VAP", [
"Temperature: 36.5–38.4°C = 0; 38.5–38.9°C = 1; ≥39 or ≤36 = 2",
"WBC: 4000–11000 = 0; <4000 or >11000 = 1; + band forms >50% = +1",
"Tracheal secretions: none = 0; non-purulent = 1; purulent = 2",
"Oxygenation (PaO2/FiO2): >240 or ARDS = 0; ≤240 and no ARDS = 2",
"Chest X-ray: no infiltrate = 0; diffuse = 1; localised = 2",
"Culture of tracheal aspirate: negative = 0; positive = 1 or 2",
], fill_rgb=BOX_FILL)
add_h3(doc, "Microbiological Sampling (Quantitative Culture Thresholds)")
add_table(doc,
["Method", "CFU Threshold", "Notes"],
[
["Bronchoscopic BAL", "≥10⁴ CFU/mL", "Gold standard; highest specificity"],
["Protected Specimen Brush (PSB)", "≥10³ CFU/mL", "Bronchoscopic; reduces contamination"],
["Non-bronchoscopic (mini) BAL", "≥10⁴ CFU/mL", "Bedside; no bronchoscopy needed"],
["Endotracheal aspirate", "≥10⁵–10⁶ CFU/mL", "Most available; lower specificity"],
]
)
add_h3(doc, "Step 2: Empirical Antibiotic Selection")
add_body(doc, "FIRST: Assess risk for MDR organisms", indent=False)
add_spacer(doc,3)
add_box(doc, "Risk Factors for MDR VAP", [
"Prior IV antibiotics within 90 days",
"Hospitalisation ≥ 5 days at time of VAP",
"Septic shock at VAP onset",
"ARDS prior to VAP onset",
"Acute renal replacement therapy",
"Residence in LTAC / skilled nursing facility",
], fill_rgb=WARN_FILL)
add_spacer(doc,4)
add_table(doc,
["Risk Category", "Antibiotic Regimen"],
[
["Low MDR risk (early VAP, no risk factors)", "Monotherapy: Piperacillin-tazobactam OR Cefepime OR Levofloxacin OR Meropenem"],
["High MDR risk (late VAP / risk factors present)", "MRSA coverage: Vancomycin OR Linezolid\nPLUS Anti-pseudomonal beta-lactam: Pip-tazo / Cefepime / Carbapenem\nPLUS (if double GN needed): Aminoglycoside OR Ciprofloxacin"],
["MRSA-confirmed or high local prevalence", "Vancomycin (trough 15–20 mg/L) OR Linezolid 600 mg BD"],
]
)
add_body(doc, "KEY: Failure to initiate APPROPRIATE antibiotics promptly = independent predictor of mortality. Regimen change needed in 43.7% of VAP cases in one large Spanish multicentre study.", indent=True)
add_h3(doc, "Step 3: Duration & De-escalation")
add_box(doc, "Antibiotic Duration Principles", [
"7–8 day course is as effective as 14–21 days for most VAP (IDSA/ATS 2016)",
"Procalcitonin-guided de-escalation reduces antibiotic duration without worsening outcomes",
"After 48–72 h: review cultures; NARROW to targeted therapy",
"De-escalation reduces MDR emergence, costs, and adverse effects",
"Prolonged therapy only for: Pseudomonas, Acinetobacter, non-fermenting GNB (10–14 days)",
], fill_rgb=KEY_FILL)
add_h3(doc, "Step 4: Supportive Management")
add_bullet(doc, "Lung-protective ventilation: TV 6 mL/kg IBW; plateau pressure < 30 cmH2O")
add_bullet(doc, "Prone positioning if concurrent ARDS (> 12 h/day)")
add_bullet(doc, "Continue VAP prevention bundle measures throughout ICU stay")
add_bullet(doc, "Nutritional support: enteral feeding preferred; avoid parenteral")
add_bullet(doc, "Glycaemic control: target 140–180 mg/dL (avoid hypoglycaemia)")
add_bullet(doc, "DVT prophylaxis: LMWH or UFH; compression stockings")
add_h2(doc, "Quick Summary: VAP at a Glance")
add_table(doc,
["Parameter", "Value / Key Point"],
[
["Definition", "Pneumonia ≥48 h after intubation"],
["Most common pathogen", "Staphylococcus aureus (28.8%)"],
["Incidence", "~10% of ventilated patients; 14.8/1000 vent-days"],
["Most important risk factor", "Duration of mechanical ventilation"],
["Most important prevention", "Minimise ventilator days (daily SBT + SAT)"],
["Best diagnostic sample", "Bronchoscopic BAL (≥10⁴ CFU/mL)"],
["Antibiotic duration", "7–8 days (most cases)"],
["Attributable mortality", "1–27% (wide range; confounded by severity)"],
["Additional cost per case", "~$39,828 USD"],
["IDSA/ATS Guideline Year", "2016 (most recent major guideline)"],
]
)
add_spacer(doc, 12)
add_divider(doc)
# Footer note
p_footer = doc.add_paragraph()
p_footer.alignment = WD_ALIGN_PARAGRAPH.CENTER
r_footer = p_footer.add_run("Sources: Miller's Anesthesia 10e | Morgan & Mikhail's Clinical Anesthesiology 7e | Barash Clinical Anesthesia 9e | Fishman's Pulmonary Diseases & Disorders 6e | IDSA/ATS VAP Guidelines 2016")
r_footer.font.size = Pt(8.5)
r_footer.font.color.rgb = RGBColor(0x88, 0x88, 0x88)
r_footer.font.name = "Arial"
r_footer.italic = True
# ──────────────────────────────────────────────
# SAVE
# ──────────────────────────────────────────────
out_path = "/tmp/workspace/anaesthesia-study-guide/Anaesthesia_Quick_Revision_Guide.docx"
doc.save(out_path)
print(f"Saved: {out_path}")