Hypoxic pulmonary vasoconstriction
"hypoxic pulmonary vasoconstriction" mechanism
| Mediator | Effect on HPV |
|---|---|
| Nitric oxide (NO) | Inhibits HPV (vasodilatory); NO synthesis inhibitors augment HPV; inhaled NO (~20 ppm) reduces HPV |
| Endothelins (from pulmonary endothelial cells) | Vasoconstrictor peptides that augment HPV |
| Prostacyclin | Vasodilatory; modulates HPV |
| Factor | Effect on HPV |
|---|---|
| Metabolic acidosis | Enhances HPV |
| Metabolic alkalosis | Attenuates HPV |
| Respiratory acidosis (CO₂) | Little direct effect; acidosis component augments |
| Respiratory alkalosis | Blunts HPV |
| Hypercapnia | Augments HPV (reduces NO, acidosis) |
| Sympathetic activation | Enhances HPV |
| Temperature | Modifies HPV |
| Size of hypoxic zone | Larger zone = stronger global HPV |

Create a clinical reference guide on HPV management in one-lung ventilation
"one-lung ventilation" AND "hypoxic pulmonary vasoconstriction"
mkdir -p /home/daytona/workspace/olv-hpv-guide && ls /home/daytona/workspace/olv-hpv-guide/
~/olv-hpv-guide/generate_guide.py
#!/usr/bin/env python3
"""
Clinical Reference Guide: HPV Management in One-Lung Ventilation
Generated for Anesthesiologists / Residents
"""
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, KeepTogether, PageBreak
)
from reportlab.platypus.flowables import Flowable
OUTPUT = "/home/daytona/workspace/olv-hpv-guide/HPV_OLV_Clinical_Reference_Guide.pdf"
# ─── Color palette ───────────────────────────────────────────────────────────
NAVY = colors.HexColor("#1A2E4A")
TEAL = colors.HexColor("#0D7377")
LIGHT_TEAL = colors.HexColor("#E8F5F5")
AMBER = colors.HexColor("#E8720C")
AMBER_BG = colors.HexColor("#FEF3EC")
RED = colors.HexColor("#C0392B")
RED_BG = colors.HexColor("#FDEDEC")
GREEN = colors.HexColor("#1E8449")
GREEN_BG = colors.HexColor("#EAFAF1")
GREY = colors.HexColor("#7F8C8D")
LIGHT_GREY = colors.HexColor("#F2F4F4")
DARK_TEXT = colors.HexColor("#1C2833")
WHITE = colors.white
W, H = A4 # 595.27 x 841.89
# ─── Document setup ───────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
topMargin=2.5*cm,
bottomMargin=2.0*cm,
leftMargin=2.0*cm,
rightMargin=2.0*cm,
title="HPV Management in One-Lung Ventilation – Clinical Reference Guide",
author="Orris Medical Reference",
subject="Thoracic Anesthesia",
)
# ─── Styles ──────────────────────────────────────────────────────────────────
base = getSampleStyleSheet()
def style(name, **kwargs):
return ParagraphStyle(name, **kwargs)
S = {
"cover_title": style("cover_title",
fontSize=28, textColor=WHITE, fontName="Helvetica-Bold",
leading=34, alignment=TA_CENTER, spaceAfter=6),
"cover_sub": style("cover_sub",
fontSize=13, textColor=colors.HexColor("#BDE3E4"), fontName="Helvetica",
alignment=TA_CENTER, leading=18),
"cover_meta": style("cover_meta",
fontSize=10, textColor=colors.HexColor("#BDE3E4"), fontName="Helvetica",
alignment=TA_CENTER, leading=14),
"h1": style("h1",
fontSize=16, textColor=WHITE, fontName="Helvetica-Bold",
leading=20, spaceBefore=0, spaceAfter=0),
"h2": style("h2",
fontSize=12, textColor=NAVY, fontName="Helvetica-Bold",
leading=16, spaceBefore=10, spaceAfter=4),
"h3": style("h3",
fontSize=10.5, textColor=TEAL, fontName="Helvetica-Bold",
leading=14, spaceBefore=8, spaceAfter=3),
"body": style("body",
fontSize=9.5, textColor=DARK_TEXT, fontName="Helvetica",
leading=14, spaceAfter=4, alignment=TA_JUSTIFY),
"body_sm": style("body_sm",
fontSize=8.5, textColor=DARK_TEXT, fontName="Helvetica",
leading=12, spaceAfter=3),
"bullet": style("bullet",
fontSize=9.5, textColor=DARK_TEXT, fontName="Helvetica",
leading=14, spaceAfter=3, leftIndent=14, firstLineIndent=-10),
"bullet_sm": style("bullet_sm",
fontSize=8.5, textColor=DARK_TEXT, fontName="Helvetica",
leading=12, spaceAfter=2, leftIndent=14, firstLineIndent=-10),
"table_hdr": style("table_hdr",
fontSize=9, textColor=WHITE, fontName="Helvetica-Bold",
leading=12, alignment=TA_CENTER),
"table_cell": style("table_cell",
fontSize=8.8, textColor=DARK_TEXT, fontName="Helvetica",
leading=12, alignment=TA_LEFT),
"table_cell_c": style("table_cell_c",
fontSize=8.8, textColor=DARK_TEXT, fontName="Helvetica",
leading=12, alignment=TA_CENTER),
"caption": style("caption",
fontSize=7.5, textColor=GREY, fontName="Helvetica-Oblique",
leading=10, alignment=TA_CENTER),
"footer": style("footer",
fontSize=7.5, textColor=GREY, fontName="Helvetica",
alignment=TA_CENTER, leading=10),
"alert_title": style("alert_title",
fontSize=10, fontName="Helvetica-Bold", leading=14),
"alert_body": style("alert_body",
fontSize=9, fontName="Helvetica", leading=13),
"source": style("source",
fontSize=7.5, textColor=GREY, fontName="Helvetica-Oblique",
leading=10, alignment=TA_LEFT),
}
# ─── Helper flowables ─────────────────────────────────────────────────────────
def section_header(text, color=NAVY):
"""Full-width colored header bar."""
data = [[Paragraph(text, S["h1"])]]
t = Table(data, colWidths=[doc.width])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), color),
("TOPPADDING", (0,0), (-1,-1), 8),
("BOTTOMPADDING", (0,0), (-1,-1), 8),
("LEFTPADDING", (0,0), (-1,-1), 12),
("RIGHTPADDING", (0,0), (-1,-1), 12),
("ROWBACKGROUNDS", (0,0), (-1,-1), [color]),
]))
return t
def alert_box(title, items, bg=AMBER_BG, border=AMBER, title_color=AMBER):
"""Colored alert / info box."""
body_lines = "".join(f"<bullet>•</bullet> {i}<br/>" for i in items)
data = [[
Paragraph(f'<font color="{title_color.hexval()}">{title}</font>', S["alert_title"]),
],[
Paragraph(body_lines, S["alert_body"]),
]]
t = Table(data, colWidths=[doc.width])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("LINEABOVE", (0,0), (-1,0), 2, border),
("TOPPADDING", (0,0), (-1,0), 8),
("BOTTOMPADDING", (0,-1), (-1,-1), 8),
("LEFTPADDING", (0,0), (-1,-1), 12),
("RIGHTPADDING", (0,0), (-1,-1), 12),
]))
return t
def info_box(title, items, bg=LIGHT_TEAL, border=TEAL, title_color=TEAL):
return alert_box(title, items, bg, border, title_color)
def two_col(left_items, right_items, left_title="", right_title=""):
"""Two-column layout using a 2-cell table."""
col_w = (doc.width - 0.3*cm) / 2
def build_cell(title, items):
paras = []
if title:
paras.append(Paragraph(title, S["h3"]))
for item in items:
paras.append(item)
return paras
lc = build_cell(left_title, left_items)
rc = build_cell(right_title, right_items)
data = [[lc, rc]]
t = Table(data, colWidths=[col_w, col_w], spaceBefore=4, spaceAfter=6)
t.setStyle(TableStyle([
("VALIGN", (0,0), (-1,-1), "TOP"),
("LEFTPADDING", (0,0), (-1,-1), 0),
("RIGHTPADDING", (0,0), (-1,-1), 4),
("TOPPADDING", (0,0), (-1,-1), 0),
("BOTTOMPADDING", (0,0), (-1,-1), 0),
]))
return t
def hr(color=TEAL, thickness=1):
return HRFlowable(width="100%", thickness=thickness, color=color,
spaceAfter=4, spaceBefore=4)
def sp(h=6):
return Spacer(1, h)
def b(text):
return f"<b>{text}</b>"
def bullet(text):
return Paragraph(f"• {text}", S["bullet"])
def bullet_sm(text):
return Paragraph(f"• {text}", S["bullet_sm"])
def subbullet(text):
return Paragraph(f" — {text}", S["bullet_sm"])
# ─── Cover page ───────────────────────────────────────────────────────────────
def cover_page():
els = []
# Top banner
banner_data = [[
Paragraph("CLINICAL REFERENCE GUIDE", S["cover_sub"]),
Paragraph("HPV Management in One-Lung Ventilation", S["cover_title"]),
Paragraph("For Anesthesiologists & Residents · Thoracic Surgery", S["cover_sub"]),
Spacer(1, 0.4*cm),
Paragraph("Miller's Anesthesia 10e · Murray & Nadel · Barash Clinical Anesthesia 9e · Morgan & Mikhail 7e", S["cover_meta"]),
Spacer(1, 0.2*cm),
Paragraph("July 2026", S["cover_meta"]),
]]
banner = Table(banner_data, colWidths=[doc.width + 4*cm])
banner.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), NAVY),
("TOPPADDING", (0,0), (-1,-1), 32),
("BOTTOMPADDING", (0,0), (-1,-1), 32),
("LEFTPADDING", (0,0), (-1,-1), 20),
("RIGHTPADDING", (0,0), (-1,-1), 20),
("ALIGN", (0,0), (-1,-1), "CENTER"),
]))
els.append(banner)
els.append(sp(16))
# "At a glance" boxes
els.append(Paragraph("GUIDE AT A GLANCE", ParagraphStyle("glance_hdr",
fontSize=10, textColor=GREY, fontName="Helvetica-Bold",
alignment=TA_CENTER, spaceAfter=8)))
at_glance = [
("01", "Physiology", "HPV mechanism, stimulus, magnitude, time course"),
("02", "Predictors", "Risk factors for OLV hypoxemia"),
("03", "Prevention", "Anaesthetic choice, lung denitrogenation, positioning"),
("04", "Ventilation", "Protective strategy: VT, PEEP, DP, PCV vs VCV"),
("05", "Step-Up Rx", "Structured treatment ladder for intraoperative hypoxemia"),
("06", "Drug Guide", "Agents that inhibit vs preserve HPV"),
("07", "Cardiac Output", "CO-HPV interaction and hemodynamic targets"),
("08", "Special Cases", "COPD, right-sided thoracotomy, post-pneumonectomy"),
]
rows = []
for num, title, desc in at_glance:
rows.append([
Paragraph(f'<font color="{TEAL.hexval()}" size="18"><b>{num}</b></font>',
ParagraphStyle("gn", fontSize=18, textColor=TEAL,
fontName="Helvetica-Bold", alignment=TA_CENTER)),
Paragraph(f'<b>{title}</b><br/><font size="8" color="{GREY.hexval()}">{desc}</font>',
ParagraphStyle("gt", fontSize=9.5, textColor=DARK_TEXT,
fontName="Helvetica", leading=13)),
])
col_w = (doc.width - 0.4*cm) / 2
paired_rows = []
for i in range(0, len(rows), 2):
if i+1 < len(rows):
paired_rows.append([rows[i][0], rows[i][1], rows[i+1][0], rows[i+1][1]])
else:
paired_rows.append([rows[i][0], rows[i][1], "", ""])
glance_t = Table(paired_rows,
colWidths=[1.2*cm, col_w - 1.2*cm, 1.2*cm, col_w - 1.2*cm],
rowHeights=1.4*cm)
glance_t.setStyle(TableStyle([
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("ROWBACKGROUNDS", (0,0), (-1,-1), [LIGHT_GREY, WHITE]),
("LINEBELOW", (0,0), (-1,-2), 0.5, colors.HexColor("#D5D8DC")),
]))
els.append(glance_t)
els.append(sp(16))
# Disclaimer
disc = Table([[Paragraph(
"<b>DISCLAIMER:</b> This guide is intended as an educational reference for "
"qualified healthcare professionals. Clinical decisions must always be individualised "
"based on patient status, institutional protocols, and current guidelines. "
"Drug doses and thresholds are approximate; verify with primary sources before use.",
ParagraphStyle("disc", fontSize=8, textColor=GREY, fontName="Helvetica",
leading=11, alignment=TA_JUSTIFY)
)]], colWidths=[doc.width])
disc.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), LIGHT_GREY),
("TOPPADDING", (0,0), (-1,-1), 8),
("BOTTOMPADDING", (0,0), (-1,-1), 8),
("LEFTPADDING", (0,0), (-1,-1), 10),
("RIGHTPADDING", (0,0), (-1,-1), 10),
]))
els.append(disc)
els.append(PageBreak())
return els
# ─── Section 1: Physiology ────────────────────────────────────────────────────
def section_physiology():
els = []
els.append(section_header("01 PHYSIOLOGY OF HPV IN ONE-LUNG VENTILATION"))
els.append(sp(8))
els.append(Paragraph("What is HPV?", S["h2"]))
els.append(Paragraph(
"Hypoxic pulmonary vasoconstriction (HPV) is an intrinsic reflex of pulmonary "
"vascular smooth muscle cells (VSMCs) that constricts small pulmonary arteries and "
"arterioles when alveolar O₂ tension (P<sub>A</sub>O₂) falls. "
"Unlike systemic vessels - which dilate under hypoxia to maximise tissue O₂ "
"delivery - the pulmonary vasculature constricts, thereby diverting blood away from "
"hypoventilated zones toward well-ventilated alveoli. This unique behaviour optimises "
"ventilation-perfusion (V/Q) matching and is the principal physiological defence "
"against intraoperative hypoxaemia during OLV.",
S["body"]))
# Stimulus / Magnitude two-col
left = [
Paragraph("Stimulus & Threshold", S["h3"]),
bullet(f"{b('Primary trigger:')} Alveolar PO₂ (P<sub>A</sub>O₂) < 60 mmHg"),
bullet(f"{b('Maximal response:')} P<sub>A</sub>O₂ ≈ 30 mmHg"),
bullet(f"{b('Secondary trigger:')} Mixed venous PO₂ (weaker signal)"),
bullet(f"{b('HPV begins within seconds')} of alveolar O₂ reduction"),
bullet("Two-phase time course: rapid initial rise then slower sustained phase"),
bullet("After 8 h of hypoxia, PVR may not normalise for hours post-exposure"),
]
right = [
Paragraph("Magnitude During OLV", S["h3"]),
bullet("HPV can reduce blood flow to the non-ventilated lung by up to <b>50%</b>"),
bullet("Without HPV, non-ventilated lung receives ~35-45% of CO (obligatory shunt)"),
bullet("With HPV active, this falls to ~20-25%"),
bullet("Lung collapse itself also raises PVR in the non-ventilated lung (mechanical effect)"),
bullet("Net shunt during OLV is typically <b>20-30%</b> with modern anaesthetic management"),
bullet(f"{b('Right thoracotomy:')} larger shunt (right lung = 55% normal perfusion vs 45% left)"),
]
els.append(two_col(left, right))
els.append(Paragraph("Cellular Mechanism", S["h2"]))
mech_data = [
[Paragraph(b("Step"), S["table_hdr"]),
Paragraph(b("Event"), S["table_hdr"]),
Paragraph(b("Key Mediators"), S["table_hdr"])],
[Paragraph("1", S["table_cell_c"]),
Paragraph("Alveolar O₂ falls → mitochondrial O₂ sensing", S["table_cell"]),
Paragraph("Complex III of electron transport chain", S["table_cell"])],
[Paragraph("2a", S["table_cell_c"]),
Paragraph("<b>Redox hypothesis:</b> ↓ ROS → reduced sulfhydryl groups on Kv1.5", S["table_cell"]),
Paragraph("Kv1.5 voltage-gated K⁺ channel", S["table_cell"])],
[Paragraph("2b", S["table_cell_c"]),
Paragraph("<b>ROS hypothesis:</b> ↑ ROS from complex III → Ca²⁺ release from SR + influx", S["table_cell"]),
Paragraph("Ryanodine receptors, non-selective cation channels", S["table_cell"])],
[Paragraph("3", S["table_cell_c"]),
Paragraph("K⁺ channel closure → membrane depolarisation → voltage-gated Ca²⁺ channel opening", S["table_cell"]),
Paragraph("L-type Ca²⁺ channels", S["table_cell"])],
[Paragraph("4", S["table_cell_c"]),
Paragraph("↑ intracellular Ca²⁺ → smooth muscle contraction", S["table_cell"]),
Paragraph("Myosin light chain kinase", S["table_cell"])],
[Paragraph("5", S["table_cell_c"]),
Paragraph("RhoA/ROCK pathway → ↑ Ca²⁺ sensitisation of myofilaments", S["table_cell"]),
Paragraph("RhoA, Rho-kinase (ROCK)", S["table_cell"])],
[Paragraph("6", S["table_cell_c"]),
Paragraph("Connexin-40 retrograde endothelial signal + TRPV4 Ca²⁺ influx (arterioles)", S["table_cell"]),
Paragraph("Connexin-40, TRPV4", S["table_cell"])],
]
mech_t = Table(mech_data, colWidths=[1.0*cm, 9.0*cm, 5.2*cm],
repeatRows=1, spaceBefore=4, spaceAfter=6)
mech_t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), NAVY),
("ROWBACKGROUNDS", (0,1), (-1,-1), [WHITE, LIGHT_GREY]),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#BDC3C7")),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
]))
els.append(mech_t)
# Endothelial modulators
els.append(Paragraph("Endothelial Modulators of HPV", S["h2"]))
mod_data = [
[Paragraph(b("Mediator"), S["table_hdr"]),
Paragraph(b("Origin"), S["table_hdr"]),
Paragraph(b("Effect on HPV"), S["table_hdr"]),
Paragraph(b("Clinical Relevance"), S["table_hdr"])],
[Paragraph("Nitric oxide (NO)", S["table_cell"]),
Paragraph("Endothelium (eNOS)", S["table_cell"]),
Paragraph('<font color="#C0392B">↓ Inhibits</font>', S["table_cell_c"]),
Paragraph("Inhaled NO (20 ppm) reduces HPV; vasodilators ↓ NO → worsen V/Q", S["table_cell"])],
[Paragraph("Endothelin-1 (ET-1)", S["table_cell"]),
Paragraph("Pulmonary endothelium", S["table_cell"]),
Paragraph('<font color="#1E8449">↑ Augments</font>', S["table_cell_c"]),
Paragraph("ET receptor antagonists used in PAH; relevant in chronic hypoxia", S["table_cell"])],
[Paragraph("Prostacyclin (PGI₂)", S["table_cell"]),
Paragraph("Endothelium", S["table_cell"]),
Paragraph('<font color="#C0392B">↓ Inhibits</font>', S["table_cell_c"]),
Paragraph("Bronchodilators releasing PGI₂ may worsen PaO₂ in asthma", S["table_cell"])],
]
mod_t = Table(mod_data,
colWidths=[3.2*cm, 3.2*cm, 2.8*cm, 6.0*cm],
repeatRows=1, spaceBefore=4, spaceAfter=6)
mod_t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), TEAL),
("ROWBACKGROUNDS", (0,1), (-1,-1), [WHITE, LIGHT_GREY]),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#BDC3C7")),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
]))
els.append(mod_t)
els.append(sp(4))
els.append(Paragraph(
"Sources: Miller's Anesthesia 10e (Ch. 19, 49) · Murray & Nadel Respiratory Medicine · "
"Barash Clinical Anesthesia 9e (Ch. 38)",
S["source"]))
return els
# ─── Section 2: Predictors ────────────────────────────────────────────────────
def section_predictors():
els = []
els.append(PageBreak())
els.append(section_header("02 PREDICTORS OF HYPOXAEMIA DURING OLV"))
els.append(sp(8))
els.append(Paragraph(
"Intraoperative hypoxaemia (SpO₂ < 90%, PaO₂ < 60 mmHg) during OLV is "
"predictable in the majority of cases. Historical incidence was 20-25%; modern practice "
"achieves <5% with optimised technique. Key risk factors are listed below.",
S["body"]))
els.append(sp(4))
pred_data = [
[Paragraph(b("Risk Factor"), S["table_hdr"]),
Paragraph(b("Direction"), S["table_hdr"]),
Paragraph(b("Mechanism"), S["table_hdr"])],
[Paragraph("Right-sided thoracotomy", S["table_cell"]),
Paragraph('<font color="#C0392B">Higher risk</font>', S["table_cell_c"]),
Paragraph("Right lung normally ~55% of total perfusion → larger obligatory shunt; mean PaO₂ ~100 mmHg lower vs left", S["table_cell"])],
[Paragraph("Normal preop PFTs", S["table_cell"]),
Paragraph('<font color="#C0392B">Higher risk</font>', S["table_cell_c"]),
Paragraph("No pre-existing redistribution; operative lung has near-normal perfusion that must be overcome by HPV", S["table_cell"])],
[Paragraph("Supine position during OLV", S["table_cell"]),
Paragraph('<font color="#C0392B">Higher risk</font>', S["table_cell_c"]),
Paragraph("Lateral position provides gravity-assisted redistribution to dependent (ventilated) lung", S["table_cell"])],
[Paragraph("Low PaO₂ on two-lung ventilation", S["table_cell"]),
Paragraph('<font color="#C0392B">Higher risk</font>', S["table_cell_c"]),
Paragraph("Reduced reserve; baseline V/Q mismatch", S["table_cell"])],
[Paragraph("Low preop FEV₁ (if operative lung)", S["table_cell"]),
Paragraph('<font color="#1E8449">Lower risk</font>', S["table_cell_c"]),
Paragraph("Pre-existing hypoperfusion of diseased operative lung → less shunt during OLV", S["table_cell"])],
[Paragraph("V/Q scan: high perfusion to operative lung", S["table_cell"]),
Paragraph('<font color="#C0392B">Higher risk</font>', S["table_cell_c"]),
Paragraph("Greater shunt fraction when that lung is collapsed; shunt correlates with fractional perfusion of ventilated lung", S["table_cell"])],
[Paragraph("COPD (dependent lung)", S["table_cell"]),
Paragraph('<font color="#E8720C">Variable</font>', S["table_cell_c"]),
Paragraph("Faster desaturation during isovolemic haemodilution; gas trapping may impair oxygenation", S["table_cell"])],
[Paragraph("High cardiac output / vasodilator use", S["table_cell"]),
Paragraph('<font color="#C0392B">Higher risk</font>', S["table_cell_c"]),
Paragraph("Passive distension of non-ventilated lung vasculature overcomes HPV; vasodilators (GTN, SNP) attenuate HPV", S["table_cell"])],
]
pred_t = Table(pred_data, colWidths=[4.5*cm, 2.5*cm, 8.2*cm],
repeatRows=1, spaceBefore=4, spaceAfter=6)
pred_t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), NAVY),
("ROWBACKGROUNDS", (0,1), (-1,-1), [WHITE, LIGHT_GREY]),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#BDC3C7")),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
]))
els.append(pred_t)
els.append(info_box(
"PREOPERATIVE RISK ASSESSMENT",
[
"Order a preoperative V/Q perfusion scan for borderline candidates: "
"fractional perfusion of the ventilated lung strongly predicts intraoperative PaO₂",
"Note baseline SpO₂, FEV₁/FVC, side of operation and comorbidities before the case",
"Higher-risk patients (right-sided, normal PFTs, low baseline PaO₂) warrant arterial line for continuous monitoring",
"Consider TIVA as baseline anaesthetic in high-risk cases to preserve HPV",
]
))
els.append(sp(4))
els.append(Paragraph("Sources: Miller's Anesthesia 10e (Ch. 49) · Barash Clinical Anesthesia 9e", S["source"]))
return els
# ─── Section 3: Prevention ────────────────────────────────────────────────────
def section_prevention():
els = []
els.append(PageBreak())
els.append(section_header("03 PREVENTION OF HYPOXAEMIA"))
els.append(sp(8))
left = [
Paragraph("Pre-OLV Optimisation", S["h3"]),
bullet(f"{b('Denitrogenation:')} Ventilate operative lung with FiO₂ 1.0 immediately before collapsing it. Nitrogen delays collapse due to low blood-gas solubility - particularly problematic in VATS and emphysema."),
sp(3),
bullet(f"{b('Recruitment of dependent lung:')} Apply sustained inflation (20 cmH₂O for 15-20 s) to the dependent lung immediately after initiating OLV to clear pre-existing atelectasis."),
sp(3),
bullet(f"{b('Position:')} Lateral decubitus is standard. Gravity assists redistribution of cardiac output to dependent (ventilated) lung. Avoid supine OLV when possible."),
sp(3),
bullet(f"{b('DLT position:')} Confirm with fiberoptic bronchoscopy after placement and again after lateral positioning - surgical manipulation displaces tubes."),
]
right = [
Paragraph("Anaesthetic Choice", S["h3"]),
bullet(f"{b('TIVA preferred in high-risk cases:')} Propofol + remifentanil/fentanyl does not inhibit HPV; provides better oxygenation in some studies."),
sp(3),
bullet(f"{b('Modern volatile agents (≤1 MAC):')} Isoflurane, sevoflurane, desflurane cause only ~20% inhibition of HPV at 1 MAC - a net ~4% increase in shunt, which is rarely clinically detectable."),
sp(3),
bullet(f"{b('Avoid N₂O:')} Inhibits HPV, increases postoperative atelectasis (51% vs 24% with air/O₂), and raises PA pressure in pulmonary hypertension."),
sp(3),
bullet(f"{b('Avoid vasodilators when possible:')} GTN, nitroprusside, dobutamine blunt HPV - avoid or minimise during OLV."),
sp(3),
bullet(f"{b('Dexmedetomidine adjunct:')} Reduces volatile anaesthetic requirement and has been shown to improve oxygenation during OLV."),
]
els.append(two_col(left, right))
els.append(alert_box(
"AVOID DURING OLV - HPV INHIBITORS",
[
"Nitrous oxide (N₂O) - inhibits HPV + raises PA pressures + increases postop atelectasis",
"Nitroglycerin (GTN) and sodium nitroprusside (SNP) - direct pulmonary vasodilators",
"High-dose volatile anaesthetics (>1 MAC) - dose-dependent HPV inhibition",
"Dobutamine / high-dose inotropes - ↑ CO → passive distension overrides HPV",
"Certain bronchodilators (PGI₂ releasers) in asthma - may increase flow to poorly ventilated zones",
],
bg=RED_BG, border=RED, title_color=RED
))
els.append(sp(4))
els.append(Paragraph("Sources: Miller's Anesthesia 10e (Ch. 49) · Morgan & Mikhail 7e · Barash 9e", S["source"]))
return els
# ─── Section 4: Protective Ventilation ───────────────────────────────────────
def section_ventilation():
els = []
els.append(PageBreak())
els.append(section_header("04 PROTECTIVE VENTILATION STRATEGY DURING OLV"))
els.append(sp(8))
els.append(Paragraph(
"The anesthesiologist's dual goal during OLV is to: (1) maintain the ventilated "
"(dependent) lung near its functional residual capacity (FRC) to minimise its PVR, "
"and (2) maximise PVR in the non-ventilated lung by facilitating collapse and preserving HPV. "
"PVR is a U-shaped function of lung volume - it is lowest at FRC and rises at both "
"extremes (RV and TLC).",
S["body"]))
els.append(sp(4))
param_data = [
[Paragraph(b("Parameter"), S["table_hdr"]),
Paragraph(b("Target"), S["table_hdr"]),
Paragraph(b("Rationale / Evidence"), S["table_hdr"])],
[Paragraph("Tidal Volume (VT)", S["table_cell"]),
Paragraph("<b>4-6 mL/kg IBW</b>", S["table_cell_c"]),
Paragraph("Low VT reduces VILI. <3 mL/kg may cause lung derecruitment and hypoxaemia from atelectasis. Aim for the range that avoids both over-distension and derecruitment.", S["table_cell"])],
[Paragraph("FiO₂", S["table_cell"]),
Paragraph("<b>1.0 standard</b><br/>0.5-0.8 in protective protocols", S["table_cell_c"]),
Paragraph("FiO₂ 1.0 provides safety margin but may cause absorption atelectasis. Some centres use 80-100% targeting SpO₂ ≥ 94%.", S["table_cell"])],
[Paragraph("PEEP (dependent lung)", S["table_cell"]),
Paragraph("<b>5 cmH₂O</b> baseline<br/>Titrated to DP", S["table_cell_c"]),
Paragraph("Maintains alveolar recruitment. Individualised PEEP guided by driving pressure (DP) is superior to fixed PEEP in reducing postoperative pneumonia/ARDS (Barash RCT, n=292).", S["table_cell"])],
[Paragraph("Plateau Pressure", S["table_cell"]),
Paragraph("<b>< 25 cmH₂O</b>", S["table_cell_c"]),
Paragraph("Limiting plateau pressure reduces barotrauma and VILI.", S["table_cell"])],
[Paragraph("Peak Airway Pressure", S["table_cell"]),
Paragraph("<b>< 35 cmH₂O</b>", S["table_cell_c"]),
Paragraph("PCV may lower peak pressures vs VCV (but similar distal airway pressures); PCV preferred post-transplant, post-pneumonectomy, or with bronchial blocker.", S["table_cell"])],
[Paragraph("Driving Pressure (DP = Pplat - PEEP)", S["table_cell"]),
Paragraph("<b>Minimise DP</b><br/>Individualise PEEP", S["table_cell_c"]),
Paragraph("DP most strongly associated with survival in ARDS (Amato meta-analysis, 3,562 pts). DP-guided PEEP during OLV reduces postoperative pulmonary complications vs fixed PEEP strategy.", S["table_cell"])],
[Paragraph("Respiratory Rate", S["table_cell"]),
Paragraph("<b>10-14 /min</b>", S["table_cell_c"]),
Paragraph("Titrate to achieve acceptable PaCO₂. Permissive hypercapnia acceptable in patients with normal SpO₂ and adequate minute ventilation.", S["table_cell"])],
[Paragraph("PCV vs VCV", S["table_cell"]),
Paragraph("<b>Either acceptable</b>", S["table_cell_c"]),
Paragraph("PCV does not improve oxygenation vs VCV in most studies. PCV limits peak pressures but delivered VT varies with compliance changes - requires close monitoring.", S["table_cell"])],
]
param_t = Table(param_data, colWidths=[3.8*cm, 3.8*cm, 7.6*cm],
repeatRows=1, spaceBefore=4, spaceAfter=6)
param_t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), NAVY),
("ROWBACKGROUNDS", (0,1), (-1,-1), [WHITE, LIGHT_GREY]),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#BDC3C7")),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
]))
els.append(param_t)
els.append(info_box(
"DRIVING PRESSURE - KEY CONCEPT",
[
"DP = Plateau pressure - PEEP = VT / Respiratory system compliance",
"DP reflects the 'functional lung size' exposed to each tidal breath",
"Goal: select PEEP level that produces the <b>lowest DP</b> - this avoids both atelectasis (too little PEEP) and overdistension (too much PEEP)",
"Evidence: DP-guided PEEP during OLV (RCT, n=292) reduced postoperative pneumonia and ARDS vs conventional protective ventilation (Park et al.)",
]
))
els.append(sp(4))
els.append(Paragraph("Sources: Barash Clinical Anesthesia 9e (Ch. 38) · Miller's Anesthesia 10e (Ch. 49) · Morgan & Mikhail 7e", S["source"]))
return els
# ─── Section 5: Step-Up Treatment Ladder ─────────────────────────────────────
def section_stepup():
els = []
els.append(PageBreak())
els.append(section_header("05 STEP-UP TREATMENT LADDER FOR INTRAOPERATIVE HYPOXAEMIA"))
els.append(sp(8))
els.append(Paragraph(
"Acceptable SpO₂ during OLV: <b>≥ 90% (PaO₂ > 60 mmHg)</b> in most patients. "
"Higher targets required in coronary/cerebrovascular disease or anaemia. "
"Brief periods of SpO₂ in the high 80s may be tolerated in otherwise healthy patients. "
"Follow the step-up ladder below - initiate Step 1 first and escalate as needed.",
S["body"]))
els.append(sp(6))
steps = [
("STEP 1", TEAL, "Verify DLT / Blocker Position",
[
"Fiberoptic bronchoscopy through the tracheal lumen - confirm cuff position relative to carina",
"Suction both lumens to exclude secretion obstruction",
"Reposition tube if displaced (common after surgical manipulation or lateral positioning)",
]),
("STEP 2", TEAL, "Increase FiO₂ to 1.0",
[
"Provides immediate reserve and partial relief",
"May worsen absorption atelectasis in dependent lung (monitor closely)",
]),
("STEP 3", TEAL, "Recruitment Manoeuvre - Dependent (Ventilated) Lung",
[
"Sustained inflation: hold at 20 cmH₂O for 15-20 seconds",
"OR stepwise PEEP increments: +5 cmH₂O q5 breaths until PEEP 20 cmH₂O, plateau 40 cmH₂O",
"Caution: impaired venous return during RM may worsen CO and PaO₂ - monitor BP",
"Follow RM with appropriate PEEP to sustain recruitment",
]),
("STEP 4", TEAL, "Optimise PEEP on Ventilated Lung",
[
"Titrate PEEP to achieve lowest driving pressure (DP = Pplat - PEEP)",
"Insufficient PEEP: atelectasis and shunt in dependent lung",
"Excessive PEEP: overdistension, raised PVR in dependent lung redirecting blood to non-ventilated lung",
]),
("STEP 5", AMBER, "CPAP 5-10 cmH₂O to Non-Ventilated (Operative) Lung",
[
"Single most effective rescue manoeuvre for OLV hypoxaemia",
"Apply 5-10 cmH₂O CPAP with oxygen after a small inflation VT to the non-ventilated lung",
"Maintains partial alveolar patency → allows O₂ uptake without full ventilation",
"Caution in VATS: inflated operative lung impairs surgical visualisation - discuss with surgeon",
"Insufflation of O₂ alone (without positive pressure) does NOT reliably improve PaO₂",
"Intermittent re-inflation of collapsed lung with O₂ also improves PaO₂",
]),
("STEP 6", AMBER, "Clamp Pulmonary Artery (Pneumonectomy Cases)",
[
"During pneumonectomy: deliberate PA clamping eliminates shunt through operative lung",
"Highly effective - essentially converts to single-lung physiology with zero operative lung flow",
]),
("STEP 7", RED, "Resume Two-Lung Ventilation",
[
"For severe refractory hypoxaemia - always an option in extremis",
"Communicate with surgeon: intermittent bilateral inflation may be feasible",
"Consider brief periods of 2-LV for recovery of SpO₂ before resuming OLV",
]),
]
for step_label, color, title, points in steps:
points_text = "".join(f"• {p}<br/>" for p in points)
row_data = [[
Paragraph(f'<font color="{WHITE.hexval()}"><b>{step_label}</b></font>',
ParagraphStyle("sl", fontSize=9, fontName="Helvetica-Bold",
textColor=WHITE, alignment=TA_CENTER, leading=12)),
[
Paragraph(f'<b>{title}</b>',
ParagraphStyle("st", fontSize=9.5, fontName="Helvetica-Bold",
textColor=DARK_TEXT, leading=13)),
Paragraph(points_text,
ParagraphStyle("sp", fontSize=8.8, fontName="Helvetica",
textColor=DARK_TEXT, leading=13, leftIndent=2)),
]
]]
row_t = Table(row_data, colWidths=[1.4*cm, doc.width - 1.4*cm],
spaceBefore=2, spaceAfter=2)
row_t.setStyle(TableStyle([
("BACKGROUND", (0,0), (0,-1), color),
("BACKGROUND", (1,0), (1,-1), LIGHT_GREY if color == TEAL else AMBER_BG if color == AMBER else RED_BG),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING", (0,0), (-1,-1), 6),
("LEFTPADDING", (0,0), (0,0), 4),
("RIGHTPADDING", (0,0), (0,0), 4),
("LEFTPADDING", (1,0), (1,0), 8),
("LINEBELOW", (0,0), (-1,-1), 1, WHITE),
]))
els.append(row_t)
els.append(sp(8))
els.append(alert_box(
"EMERGENCY PROTOCOL - SpO₂ < 85% NOT RESPONDING",
[
"Immediately resume two-lung ventilation",
"FiO₂ 1.0 - confirm circuit connections and airway patency",
"Bolus phenylephrine or vasopressor if haemodynamically unstable",
"Rule out tension pneumothorax, endobronchial tube displacement, secretion plug",
"Consider arterial blood gas for PaO₂/PaCO₂ trend",
"Alert surgeon and reassess urgency/feasibility of OLV continuation",
],
bg=RED_BG, border=RED, title_color=RED
))
els.append(sp(4))
els.append(Paragraph("Sources: Miller's Anesthesia 10e (Ch. 49) · Morgan & Mikhail 7e · Barash Clinical Anesthesia 9e (Ch. 38)", S["source"]))
return els
# ─── Section 6: Drug Guide ────────────────────────────────────────────────────
def section_drugs():
els = []
els.append(PageBreak())
els.append(section_header("06 DRUG REFERENCE: EFFECTS ON HPV"))
els.append(sp(8))
drug_data = [
[Paragraph(b("Drug / Agent"), S["table_hdr"]),
Paragraph(b("Class"), S["table_hdr"]),
Paragraph(b("HPV Effect"), S["table_hdr"]),
Paragraph(b("Magnitude"), S["table_hdr"]),
Paragraph(b("Clinical Notes"), S["table_hdr"])],
# Inhibitors
[Paragraph("Halothane", S["table_cell"]),
Paragraph("Volatile (old)", S["table_cell"]),
Paragraph('<font color="#C0392B">Strong inhibition</font>', S["table_cell_c"]),
Paragraph("Dose-dependent +++", S["table_cell_c"]),
Paragraph("Historically contributed to high OLV hypoxaemia rates (1960-80s). Rarely used.", S["table_cell"])],
[Paragraph("Enflurane", S["table_cell"]),
Paragraph("Volatile (old)", S["table_cell"]),
Paragraph('<font color="#C0392B">Moderate inhibition</font>', S["table_cell_c"]),
Paragraph("++", S["table_cell_c"]),
Paragraph("Greater inhibition than modern agents. Not in routine use.", S["table_cell"])],
[Paragraph("Isoflurane ≤1 MAC", S["table_cell"]),
Paragraph("Volatile (modern)", S["table_cell"]),
Paragraph('<font color="#E8720C">Mild inhibition</font>', S["table_cell_c"]),
Paragraph("~20% inhibition at 1 MAC", S["table_cell_c"]),
Paragraph("Net shunt increase ~4% during OLV - below detection threshold in most studies. Acceptable for OLV.", S["table_cell"])],
[Paragraph("Sevoflurane ≤1 MAC", S["table_cell"]),
Paragraph("Volatile (modern)", S["table_cell"]),
Paragraph('<font color="#E8720C">Mild inhibition</font>', S["table_cell_c"]),
Paragraph("Equipotent to isoflurane", S["table_cell_c"]),
Paragraph("Preferred agent for thoracic anaesthesia in many centres. Anti-inflammatory cytokine profile may reduce postoperative complications.", S["table_cell"])],
[Paragraph("Desflurane ≤1 MAC", S["table_cell"]),
Paragraph("Volatile (modern)", S["table_cell"]),
Paragraph('<font color="#E8720C">Mild inhibition</font>', S["table_cell_c"]),
Paragraph("Equipotent to isoflurane", S["table_cell_c"]),
Paragraph("No significant difference from sevoflurane in OLV studies. Avoid in reactive airway disease.", S["table_cell"])],
[Paragraph("Nitrous oxide (N₂O)", S["table_cell"]),
Paragraph("Inhalational", S["table_cell"]),
Paragraph('<font color="#C0392B">Inhibits HPV</font>', S["table_cell_c"]),
Paragraph("++", S["table_cell_c"]),
Paragraph("<b>Avoid in thoracic surgery.</b> Also ↑ PA pressure, ↑ postop atelectasis (51% vs 24%), contraindicated in blebs/bullae.", S["table_cell"])],
[Paragraph("Propofol (TIVA)", S["table_cell"]),
Paragraph("IV anaesthetic", S["table_cell"]),
Paragraph('<font color="#1E8449">No inhibition</font>', S["table_cell_c"]),
Paragraph("Neutral", S["table_cell_c"]),
Paragraph("Preferred in high-risk OLV patients, patients who received bleomycin (limit FiO₂), right-sided or expected difficult OLV.", S["table_cell"])],
[Paragraph("Ketamine", S["table_cell"]),
Paragraph("IV dissociative", S["table_cell"]),
Paragraph('<font color="#1E8449">Preserves HPV</font>', S["table_cell_c"]),
Paragraph("Neutral / mild augmentation", S["table_cell_c"]),
Paragraph("May increase PVR via sympathomimetic effect. Acceptable for OLV.", S["table_cell"])],
[Paragraph("Dexmedetomidine", S["table_cell"]),
Paragraph("α₂-agonist adjunct", S["table_cell"]),
Paragraph('<font color="#1E8449">Improves OLV oxygenation</font>', S["table_cell_c"]),
Paragraph("Reduces volatile need", S["table_cell_c"]),
Paragraph("Decreasing volatile anaesthetic dose with dex has been shown to improve PaO₂ during OLV.", S["table_cell"])],
[Paragraph("Opioids (remifentanil, fentanyl)", S["table_cell"]),
Paragraph("IV opioids", S["table_cell"]),
Paragraph('<font color="#1E8449">No inhibition</font>', S["table_cell_c"]),
Paragraph("Neutral", S["table_cell_c"]),
Paragraph("Standard components of TIVA for OLV.", S["table_cell"])],
[Paragraph("Nitroglycerin (GTN)", S["table_cell"]),
Paragraph("Vasodilator", S["table_cell"]),
Paragraph('<font color="#C0392B">Inhibits HPV</font>', S["table_cell_c"]),
Paragraph("++ (dose-dependent)", S["table_cell_c"]),
Paragraph("Avoid or minimise dose during OLV. Worsens PaO₂ through pulmonary vasodilation.", S["table_cell"])],
[Paragraph("Sodium nitroprusside (SNP)", S["table_cell"]),
Paragraph("Vasodilator", S["table_cell"]),
Paragraph('<font color="#C0392B">Inhibits HPV</font>', S["table_cell_c"]),
Paragraph("++", S["table_cell_c"]),
Paragraph("Potent pulmonary vasodilator. Avoid during OLV if possible.", S["table_cell"])],
[Paragraph("Ca²⁺ channel blockers", S["table_cell"]),
Paragraph("Antihypertensive", S["table_cell"]),
Paragraph('<font color="#C0392B">Inhibits HPV</font>', S["table_cell_c"]),
Paragraph("+ to ++", S["table_cell_c"]),
Paragraph("Combined with volatile agent can reduce HPV by up to 40% vs either drug alone.", S["table_cell"])],
[Paragraph("Dobutamine (high dose)", S["table_cell"]),
Paragraph("Inotrope", S["table_cell"]),
Paragraph('<font color="#C0392B">Indirect inhibition</font>', S["table_cell_c"]),
Paragraph("Via ↑ CO", S["table_cell_c"]),
Paragraph("↑ CO → passive distension of non-ventilated lung vasculature → overrides HPV. Negative net effect on PaO₂.", S["table_cell"])],
[Paragraph("Inhaled NO", S["table_cell"]),
Paragraph("Selective vasodilator", S["table_cell"]),
Paragraph('<font color="#1E8449">Selective vasodilation (ventilated lung)</font>', S["table_cell_c"]),
Paragraph("Effective at ~20 ppm", S["table_cell_c"]),
Paragraph("Inhaled NO reaches only ventilated areas → dilates ventilated lung vasculature → redistributes flow to ventilated lung → may improve V/Q.", S["table_cell"])],
]
drug_t = Table(drug_data,
colWidths=[3.2*cm, 2.6*cm, 3.0*cm, 2.4*cm, 4.0*cm],
repeatRows=1, spaceBefore=4, spaceAfter=6)
drug_t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), NAVY),
("ROWBACKGROUNDS", (0,1), (-1,-1), [WHITE, LIGHT_GREY]),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#BDC3C7")),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
]))
els.append(drug_t)
els.append(sp(4))
els.append(Paragraph("Sources: Miller's Anesthesia 10e (Ch. 19, 49) · Murray & Nadel · Barash Clinical Anesthesia 9e", S["source"]))
return els
# ─── Section 7: Cardiac Output ────────────────────────────────────────────────
def section_cardiac_output():
els = []
els.append(PageBreak())
els.append(section_header("07 CARDIAC OUTPUT, HAEMODYNAMICS AND HPV"))
els.append(sp(8))
els.append(Paragraph(
"The relationship between cardiac output (CO) and PaO₂ during OLV is complex "
"and non-linear. Both extremes of CO impair oxygenation through different mechanisms. "
"Maintaining a normal cardiac output is critical to optimising PaO₂ during OLV.",
S["body"]))
els.append(sp(4))
co_data = [
[Paragraph(b("CO State"), S["table_hdr"]),
Paragraph(b("Effect on Shunt (Qs/Qt)"), S["table_hdr"]),
Paragraph(b("Effect on SvO₂"), S["table_hdr"]),
Paragraph(b("Net Effect on PaO₂"), S["table_hdr"]),
Paragraph(b("Mechanism"), S["table_hdr"])],
[Paragraph("High / Supranormal CO\n(e.g., dopamine)", S["table_cell_c"]),
Paragraph("↑ Shunt", S["table_cell_c"]),
Paragraph("↑ SvO₂", S["table_cell_c"]),
Paragraph('<font color="#C0392B">↓ PaO₂ (net negative)</font>', S["table_cell_c"]),
Paragraph("Passive distension of non-ventilated lung vasculature overcomes HPV; shunt effect dominates", S["table_cell"])],
[Paragraph("Normal CO\n(target range)", S["table_cell_c"]),
Paragraph("Baseline shunt 20-30%", S["table_cell_c"]),
Paragraph("Normal", S["table_cell_c"]),
Paragraph('<font color="#1E8449">Optimal PaO₂</font>', S["table_cell_c"]),
Paragraph("HPV intact; V/Q maintained; SvO₂ adequate for shunted blood", S["table_cell"])],
[Paragraph("Low CO\n(hypotension, hypovolaemia)", S["table_cell_c"]),
Paragraph("↓ Shunt", S["table_cell_c"]),
Paragraph("↓ SvO₂", S["table_cell_c"]),
Paragraph('<font color="#C0392B">↓ PaO₂ (net negative)</font>', S["table_cell_c"]),
Paragraph("Low SvO₂ means even small shunt fraction markedly depresses PaO₂; vasoconstriction may also impair ventilated lung perfusion", S["table_cell"])],
]
co_t = Table(co_data, colWidths=[2.8*cm, 2.8*cm, 2.8*cm, 2.8*cm, 4.0*cm],
repeatRows=1, spaceBefore=4, spaceAfter=6)
co_t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), NAVY),
("ROWBACKGROUNDS", (0,1), (-1,-1), [WHITE, LIGHT_GREY]),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#BDC3C7")),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
]))
els.append(co_t)
els.append(info_box(
"HAEMODYNAMIC TARGETS DURING OLV",
[
"Maintain cardiac output within normal range - avoid both extremes",
"Avoid supranormal CO from inotropes (dopamine, dobutamine) - worsens HPV and shunt",
"Keep SvO₂ ≥ 65% - low mixed venous O₂ markedly amplifies the effect of any shunt on PaO₂",
"Thoracic epidural analgesia: no direct HPV effect, but hypotension from sympathectomy can ↓ CO → ↓ PaO₂ - maintain BP actively",
"Surgical trauma may release vasoactive metabolites → can oppose HPV in operative lung",
"Surgical manipulation (PA traction/clamping) dramatically alters non-ventilated lung perfusion - communicate with surgeon",
]
))
els.append(Paragraph("Additional Modulating Factors", S["h2"]))
mod_data2 = [
[Paragraph(b("Factor"), S["table_hdr"]),
Paragraph(b("Effect on HPV"), S["table_hdr"])],
[Paragraph("Metabolic acidosis", S["table_cell"]),
Paragraph('<font color="#1E8449">↑ Enhances HPV</font>', S["table_cell_c"])],
[Paragraph("Metabolic alkalosis", S["table_cell"]),
Paragraph('<font color="#C0392B">↓ Attenuates HPV</font>', S["table_cell_c"])],
[Paragraph("Hypercapnia / respiratory acidosis", S["table_cell"]),
Paragraph('<font color="#1E8449">↑ Augments HPV (via acidosis + ↓ NO)</font>', S["table_cell_c"])],
[Paragraph("Respiratory alkalosis", S["table_cell"]),
Paragraph('<font color="#C0392B">↓ Blunts HPV</font>', S["table_cell_c"])],
[Paragraph("Hypothermia", S["table_cell"]),
Paragraph("Modifies HPV response", S["table_cell_c"])],
[Paragraph("Increased sympathetic tone / obesity", S["table_cell"]),
Paragraph('<font color="#1E8449">↑ Enhanced HPV (via ↑ sympathetic + ↓ β₂-AR)', S["table_cell_c"])],
[Paragraph("Thoracic epidural (direct)", S["table_cell"]),
Paragraph("Minimal direct effect (HPV is a local chemical response)", S["table_cell_c"])],
]
mod_t2 = Table(mod_data2, colWidths=[9.0*cm, 6.2*cm],
repeatRows=1, spaceBefore=4, spaceAfter=6)
mod_t2.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), TEAL),
("ROWBACKGROUNDS", (0,1), (-1,-1), [WHITE, LIGHT_GREY]),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#BDC3C7")),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
]))
els.append(mod_t2)
els.append(sp(4))
els.append(Paragraph("Sources: Miller's Anesthesia 10e (Ch. 49) · Murray & Nadel", S["source"]))
return els
# ─── Section 8: Special Cases ─────────────────────────────────────────────────
def section_special():
els = []
els.append(PageBreak())
els.append(section_header("08 SPECIAL CLINICAL SCENARIOS"))
els.append(sp(8))
scenarios = [
("COPD Patient Undergoing OLV",
GREEN, GREEN_BG,
[
"COPD patients desaturate faster during isovolemic haemodilution - monitor Hb preoperatively",
"Gas trapping in dependent lung may impair PEEP effectiveness - use longer expiratory time (I:E 1:3 or 1:4)",
"Auto-PEEP common: measure intrinsic PEEP before adding extrinsic PEEP",
"Better HPV response in some COPD patients due to pre-existing vasoconstriction of emphysematous zones",
"Lower plateau pressure targets important - fragile lung parenchyma",
"Variable PaO₂ outcomes: patients with extensive emphysema on the operative side may have naturally low perfusion → paradoxically better OLV oxygenation",
]),
("Right-Sided Thoracotomy",
AMBER, AMBER_BG,
[
"Right lung = ~55% of total pulmonary blood flow (vs ~45% left) → larger obligatory shunt",
"Expected mean PaO₂ ~100 mmHg lower than equivalent left-sided procedure",
"Higher pre-operative risk: consider preop V/Q scan",
"Have CPAP circuit ready earlier in the case",
"More likely to need TIVA as baseline anaesthetic",
]),
("Post-Pneumonectomy Space / Contralateral Surgery",
RED, RED_BG,
[
"Only one functional lung - zero tolerance for HPV inhibition or barotrauma",
"Mandatory TIVA (propofol-based)",
"PCV preferred to limit peak pressures on the single remaining lung",
"Strict VT 4-5 mL/kg, plateau <25 cmH₂O, PEEP 5 cmH₂O",
"Avoid N₂O and all systemic vasodilators",
"Early escalation to two-lung ventilation (if possible) if SpO₂ falls",
]),
("Bleomycin-Treated Patients",
AMBER, AMBER_BG,
[
"Bleomycin lung toxicity is O₂-dependent - high FiO₂ accelerates pulmonary fibrosis",
"Target FiO₂ 0.21-0.30 intraoperatively (lowest that maintains SpO₂ ≥ 93%)",
"TIVA is preferred to allow reduced FiO₂ without requiring higher volatile MAC",
"Monitor SpO₂ and PaO₂ closely - the reduced FiO₂ leaves less reserve",
"HPV preservation (via TIVA) is especially important to maintain oxygenation at low FiO₂",
]),
("Chronic Hypoxia / High-Altitude Pulmonary Hypertension",
TEAL, LIGHT_TEAL,
[
"Sustained HPV from chronic hypoxia leads to vascular remodelling and fixed PH",
"Increased baseline PVR: right heart may be impaired (cor pulmonale)",
"HPV response may be attenuated (suppressed by chronic exposure) but structural changes persist",
"Avoid agents that further raise PVR (N₂O, vasoconstrictors)",
"Consider pulmonary vasodilators (inhaled NO, sildenafil) perioperatively if significant pre-existing PH",
"Right heart function monitoring is important",
]),
]
for title, color, bg, points in scenarios:
pts_text = "".join(f"• {p}<br/>" for p in points)
data = [[
Paragraph(f'<font color="{WHITE.hexval()}"><b>{title}</b></font>',
ParagraphStyle("sh", fontSize=10, fontName="Helvetica-Bold",
textColor=WHITE, leading=14))
],[
Paragraph(pts_text,
ParagraphStyle("sb", fontSize=9, fontName="Helvetica",
textColor=DARK_TEXT, leading=13))
]]
sc_t = Table(data, colWidths=[doc.width], spaceBefore=4, spaceAfter=2)
sc_t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), color),
("BACKGROUND", (0,1), (-1,-1), bg),
("TOPPADDING", (0,0), (-1,0), 7),
("BOTTOMPADDING", (0,0), (-1,0), 7),
("TOPPADDING", (0,1), (-1,-1), 7),
("BOTTOMPADDING", (0,1), (-1,-1), 7),
("LEFTPADDING", (0,0), (-1,-1), 10),
("RIGHTPADDING", (0,0), (-1,-1), 10),
]))
els.append(sc_t)
els.append(sp(8))
# Quick Reference Card
els.append(Paragraph("QUICK REFERENCE: OLV AT A GLANCE", S["h2"]))
qr_data = [
[Paragraph(b("Parameter"), S["table_hdr"]),
Paragraph(b("Value / Action"), S["table_hdr"])],
[Paragraph("Acceptable SpO₂ floor", S["table_cell"]),
Paragraph("≥ 90% (high 80s briefly in healthy patients without organ risk)", S["table_cell"])],
[Paragraph("PaO₂ target", S["table_cell"]),
Paragraph("> 60 mmHg (adjust upward for coronary/cerebrovascular disease, anaemia)", S["table_cell"])],
[Paragraph("HPV onset PAO₂ threshold", S["table_cell"]),
Paragraph("< 60 mmHg; maximal at ~30 mmHg", S["table_cell"])],
[Paragraph("HPV flow reduction", S["table_cell"]),
Paragraph("Up to 50% ↓ blood flow to non-ventilated lung", S["table_cell"])],
[Paragraph("Typical OLV shunt", S["table_cell"]),
Paragraph("20-30% with modern management (<5% hypoxaemia incidence)", S["table_cell"])],
[Paragraph("VT (protective)", S["table_cell"]),
Paragraph("4-6 mL/kg IBW", S["table_cell"])],
[Paragraph("PEEP strategy", S["table_cell"]),
Paragraph("5 cmH₂O baseline; titrate to lowest driving pressure (Pplat - PEEP)", S["table_cell"])],
[Paragraph("First-line hypoxaemia rescue", S["table_cell"]),
Paragraph("Verify DLT position → FiO₂ 1.0 → Recruitment → PEEP optimisation → CPAP to operative lung", S["table_cell"])],
[Paragraph("Preferred anaesthetic (high-risk)", S["table_cell"]),
Paragraph("TIVA (propofol + remifentanil) - no HPV inhibition", S["table_cell"])],
[Paragraph("Avoid", S["table_cell"]),
Paragraph("N₂O, vasodilators (GTN, SNP), supranormal CO, high volatile MAC", S["table_cell"])],
]
qr_t = Table(qr_data, colWidths=[5.5*cm, 9.7*cm],
repeatRows=1, spaceBefore=4, spaceAfter=6)
qr_t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), NAVY),
("ROWBACKGROUNDS", (0,1), (-1,-1), [WHITE, LIGHT_GREY]),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#BDC3C7")),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
]))
els.append(qr_t)
els.append(sp(4))
els.append(Paragraph(
"Sources: Miller's Anesthesia 10e (Ch. 49) · Murray & Nadel Respiratory Medicine · "
"Barash Clinical Anesthesia 9e (Ch. 38) · Morgan & Mikhail Clinical Anesthesiology 7e",
S["source"]))
return els
# ─── Page numbering ───────────────────────────────────────────────────────────
def on_page(canvas, doc):
canvas.saveState()
canvas.setFont("Helvetica", 7.5)
canvas.setFillColor(GREY)
canvas.drawCentredString(
W / 2, 1.2*cm,
f"HPV Management in One-Lung Ventilation | Clinical Reference Guide | Page {doc.page}"
)
canvas.restoreState()
# ─── Build ────────────────────────────────────────────────────────────────────
story = []
story += cover_page()
story += section_physiology()
story += section_predictors()
story += section_prevention()
story += section_ventilation()
story += section_stepup()
story += section_drugs()
story += section_cardiac_output()
story += section_special()
doc.build(story, onFirstPage=on_page, onLaterPages=on_page)
print(f"PDF written to {OUTPUT}")
cd /home/daytona/workspace/olv-hpv-guide && python3 generate_guide.py 2>&1
~/olv-hpv-guide/generate_guide.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/olv-hpv-guide/generate_guide.py'
cd /home/daytona/workspace/olv-hpv-guide && python3 generate_guide.py 2>&1
~/olv-hpv-guide/generate_guide.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/olv-hpv-guide/generate_guide.py'
cd /home/daytona/workspace/olv-hpv-guide && python3 generate_guide.py 2>&1
ls -lh /home/daytona/workspace/olv-hpv-guide/HPV_OLV_Clinical_Reference_Guide.pdf
HPV OLV Clinical Reference Guide
PDF Document · PDF
| Section | Contents |
|---|---|
| 01 - Physiology | HPV stimulus/threshold, magnitude during OLV, cellular mechanism table (K⁺ channels → Ca²⁺ → ROCK pathway), endothelial modulators (NO, ET-1, PGI₂) |
| 02 - Predictors | Risk factor table with direction and mechanism for each (right-sided surgery, normal PFTs, V/Q scan findings, supine position, CO state) |
| 03 - Prevention | Pre-OLV lung denitrogenation, recruitment, positioning, anaesthetic choice; red-flag box listing all HPV inhibitors to avoid |
| 04 - Protective Ventilation | VT, FiO₂, PEEP, plateau pressure, driving pressure, PCV vs VCV - with evidence base; driving pressure concept box |
| 05 - Step-Up Treatment Ladder | 7-step colour-coded escalation from DLT position check → FiO₂ → recruitment → PEEP → CPAP → PA clamp → 2-LV; emergency protocol box |
| 06 - Drug Reference | Full table of 14 agents (volatile agents, TIVA, vasodilators, dexmedetomidine, inhaled NO) with HPV effect, magnitude, and clinical notes |
| 07 - Cardiac Output & Haemodynamics | CO-HPV interaction (low/normal/supranormal CO effects), haemodynamic targets, modulating factors table (pH, CO₂, sympathetic tone) |
| 08 - Special Scenarios | COPD, right-sided thoracotomy, post-pneumonectomy, bleomycin-treated patients, chronic hypoxia/PH - plus a one-page quick reference card |
Hyperbaric oxygen therapy
"hyperbaric oxygen therapy"
| Chamber Type | Pressurization | Oxygen Delivery | Notes |
|---|---|---|---|
| Monoplace (single-person) | 100% O₂ pressurizes chamber | Patient breathes ambient 100% O₂ | Most common; no personnel inside |
| Multiplace (large) | Compressed air pressurizes chamber | 100% O₂ by mask, hood, or ET tube | Multiple patients + medical staff inside simultaneously |
| Condition | PaO₂ (mmHg) | Dissolved O₂ (mL/dL) |
|---|---|---|
| Breathing air at sea level (1 ATA) | ~100 | ~0.3 |
| 100% O₂ at 1 ATA | ~673 | ~2.0 |
| 100% O₂ at 2-2.5 ATA | ~1,400-1,600 | ~4-5 |
| 100% O₂ at 3 ATA | ~2,193 | ~6.6 |
| Indication | Rationale |
|---|---|
| Decompression sickness ("the bends") | Reduces bubble size, promotes nitrogen elimination; first-line treatment |
| Arterial gas embolism | Bubble compression + oxygenation; life-saving |
| Carbon monoxide poisoning | Rapidly displaces CO from hemoglobin + cytochrome oxidase |
| Gas gangrene (clostridial myonecrosis) | Direct bacteriostasis of anaerobes; once ~100% fatal, now largely curable |
| Cyanide poisoning | Supports aerobic metabolism while antidotes act |
| Acute peripheral ischaemia / crush injury | Oxygenates borderline viable tissue in the "zone of injury" |
| Indication | Evidence Summary |
|---|---|
| Diabetic foot ulcers (Wagner 3-4, failed standard care) | RCTs show 54% healing with HBOT vs 25% standard; wound healing rate 56% → 60-75% (Ennis, n=25,562) |
| Osteoradionecrosis (mandible and other sites) | Cochrane review: improved outcomes in head/neck, anorectal radiation injury; reduces ORN after dental extraction |
| Soft tissue radionecrosis | Radiation cystitis, proctitis, soft tissue injuries - good evidence |
| Chronic refractory osteomyelitis | Adjunct when unresponsive to antibiotics |
| Necrotising fasciitis | Adjunct to surgical debridement |
| Preservation of skin grafts / flap salvage | Improves graft take and flap survival by oxygenating ischaemic zones |
| Thermal burns | Reduces depth of injury, accelerates healing |
| Parameter | Standard Range |
|---|---|
| Pressure | 1.9 - 3.0 ATA (most wound protocols: 2.0-2.5 ATA; decompression sickness: 2.8-3.0 ATA) |
| Session duration | 90-120 minutes |
| Frequency | Once daily (emergencies: multiple daily), 5-6 days/week |
| Total sessions | 20-40 sessions (wound indications); acute conditions vary widely |
| Minimum to assess response | Improvement expected by sessions 15-20 |
| FiO₂ | 100% throughout session |
| Type | Manifestation | Notes |
|---|---|---|
| CNS (Paul Bert effect) | Tonic-clonic seizures resembling grand mal | Most feared acute complication; prevented by air breaks (breathing air for 5 min/hour during session) |
| Pulmonary (Lorrain Smith effect) | Substernal burning → tracheobronchitis → ARDS-like injury from O₂ free radical damage to alveoli | Occurs with prolonged exposure (>12-16 h at 1 ATA); clinical sessions are short enough to be safe |
| Ocular | Transient myopia | Lens changes; usually reversible within weeks of completing treatment |
Normal: PaO₂ ~100 mmHg → O₂ carried mainly by Hb (98%) + tiny dissolved fraction
HBOT at 3 ATA: PaO₂ ~2,193 mmHg
→ Dissolved O₂ = ~6.6 mL/dL
→ Sufficient to meet resting metabolic needs WITHOUT hemoglobin
→ ROS generated act as:
✓ Bactericidal
✓ Trigger for angiogenesis (eNOS, VEGF)
✓ Stimulant for collagen synthesis
✓ Vasoconstriction (reduces oedema)
✗ Cause of toxicity (seizures, lung injury) if excessive