Causes of Hospital acquired infections . Prevention of HAI in ice. Long question for MD Anaesthesia exam
"hospital acquired infection" AND "intensive care unit" AND prevention
"healthcare associated infection" AND ICU AND prevention
| Type | Acronym | Definition |
|---|---|---|
| Ventilator-Associated Pneumonia | VAP | New pneumonia ≥48 h after intubation |
| Catheter-Related Bloodstream Infection | CRBSI/CLABSI | BSI attributed to intravascular catheter |
| Catheter-Associated Urinary Tract Infection | CAUTI | UTI in a catheterised patient |
| Surgical Site Infection | SSI | Infection at operative wound site |
| Clostridioides difficile Infection | CDI | Antibiotic-associated colitis |
| ICU-Acquired Sinusitis | — | Related to nasal/oral tubes |
| Invasive Fungal Infection | IFI | Candida/Aspergillus in susceptible hosts |
| Source | Early (< 48–72 h) | Late (> 72 h) |
|---|---|---|
| VAP | H. influenzae, S. pneumoniae, MSSA, oral flora | MRSA, Pseudomonas aeruginosa, Acinetobacter |
| CRBSI | S. epidermidis, S. aureus | Enterococcus, Enteric GNRs, Pseudomonas, Candida |
| CAUTI | Staphylococci, Enterococcus, Enteric GNRs, Pseudomonas | — |
| CDI | Clostridioides difficile (spore-forming) | — |
| Element | Recommendation |
|---|---|
| Daily necessity review | Remove CVC as soon as no longer needed |
| Dressing changes | Gauze every 2 days; transparent film every 7 days (sooner if soiled/loose) |
| Hub/port access | "Scrub the hub" before each access; sterile end-caps on all lumens |
| Chlorhexidine at dressing changes | Apply to catheter site at each dressing change |
| Avoid routine guidewire exchange | Does NOT reduce infection; increases mechanical complications |
| IV set maintenance | Per institutional guidelines |
| Antimicrobial-impregnated catheters | Use when expected duration > 5 days or local CRBSI rate > 3.3/1000 catheter-days (chlorhexidine/silver sulfadiazine OR minocycline/rifampin) |
| Staff education | Standardised competency-based training for all CVC-manipulating staff |
| Domain | Measures |
|---|---|
| Hospital building | HVAC systems, water distribution monitoring, construction barriers |
| Environmental cleaning | Regular disinfection; sporicidal agents for CDI |
| Sterilisation | Proper reprocessing of all reusable medical equipment |
| Food/laundry services | Safe food handling; proper laundry handling |
| Surveillance | Active HAI surveillance (SSI, CAUTI, CLABSI, VAP, CDI) with public reporting |
| Infection | Regimen |
|---|---|
| VAP — Early (<72h) | Ceftriaxone + azithromycin; add vancomycin/linezolid if MRSA history |
| VAP — Late (>72h) | Vancomycin OR linezolid + cefepime; consider ciprofloxacin if MDR GNRs |
| CRBSI/BSI | Vancomycin OR linezolid + cefepime ± ciprofloxacin |
| CAUTI — non-catheter | Ceftriaxone |
| CAUTI — catheter-associated | Ceftazidime; add vancomycin if GPCs on Gram stain; meropenem if MDR/ESBL |
| CDI | Oral vancomycin; add IV metronidazole if shock/megacolon/ileus |
| Sepsis, unknown source | Vancomycin + meropenem ± ciprofloxacin |
Antibiotic selection must account for local antibiograms. All regimens should be narrowed once culture results are available.
| HAI | Core Bundle Elements |
|---|---|
| VAP | HOB ≥30°, hand hygiene, oral CHX, subglottic suction ETT, early weaning, avoid unnecessary acid suppression |
| CLABSI | Hand hygiene, full sterile barrier, CHX-alcohol skin prep, optimal site, daily necessity review, "scrub the hub" |
| CAUTI | Aseptic insertion, closed system, daily necessity review, early removal |
| CDI | Antibiotic stewardship, soap-and-water handwashing, contact precautions, sporicidal disinfection |
| IFI | Limit CVC/PN/antibiotics, fluconazole prophylaxis in high-risk, early diagnosis with β-D-glucan |
| Sinusitis | Oral > nasal intubation, early tube removal |
Create a summary PDF with HAI bundles and antibiotic regimens
ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or missing"
mkdir -p /home/daytona/workspace/hai-summary && python3 -c "from reportlab.lib i…
~/hai-summary/build_pdf.py
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_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, KeepTogether, PageBreak
)
from reportlab.platypus.flowables import HRFlowable
from reportlab.lib.colors import HexColor
OUTPUT = "/home/daytona/workspace/hai-summary/HAI_Bundles_Antibiotic_Regimens.pdf"
# ── Colour palette ────────────────────────────────────────────────────────────
DARK_BLUE = HexColor("#1A3A5C")
MED_BLUE = HexColor("#2563A8")
LIGHT_BLUE = HexColor("#D6E8FA")
TEAL = HexColor("#0E7490")
TEAL_LT = HexColor("#CCEFF5")
RED = HexColor("#B91C1C")
RED_LT = HexColor("#FEE2E2")
GREEN = HexColor("#166534")
GREEN_LT = HexColor("#DCFCE7")
ORANGE = HexColor("#92400E")
ORANGE_LT = HexColor("#FEF3C7")
PURPLE = HexColor("#5B21B6")
PURPLE_LT = HexColor("#EDE9FE")
GREY_DARK = HexColor("#374151")
GREY_MID = HexColor("#6B7280")
GREY_LT = HexColor("#F3F4F6")
WHITE = colors.white
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
rightMargin=1.8*cm, leftMargin=1.8*cm,
topMargin=2*cm, bottomMargin=2*cm,
title="HAI Prevention Bundles & Antibiotic Regimens",
author="Orris Clinical Summary"
)
W = A4[0] - 3.6*cm # usable width
styles = getSampleStyleSheet()
def S(name, **kw):
return ParagraphStyle(name, **kw)
# Custom styles
Title = S("Title", fontSize=22, leading=28, textColor=WHITE,
alignment=TA_CENTER, fontName="Helvetica-Bold")
Subtitle = S("Subtitle", fontSize=11, leading=16, textColor=LIGHT_BLUE,
alignment=TA_CENTER, fontName="Helvetica")
SecHead = S("SecHead", fontSize=13, leading=18, textColor=WHITE,
fontName="Helvetica-Bold", spaceAfter=2)
SubHead = S("SubHead", fontSize=10, leading=14, textColor=DARK_BLUE,
fontName="Helvetica-Bold", spaceBefore=6, spaceAfter=4)
Body = S("Body", fontSize=8.5, leading=13, textColor=GREY_DARK,
fontName="Helvetica", spaceAfter=3)
BulletItem = S("BulletItem", fontSize=8.5, leading=13, textColor=GREY_DARK,
fontName="Helvetica", leftIndent=12, bulletIndent=0, spaceAfter=2)
FootNote = S("FootNote", fontSize=7, leading=10, textColor=GREY_MID,
fontName="Helvetica-Oblique", alignment=TA_CENTER)
CellBold = S("CellBold", fontSize=8, leading=11, textColor=WHITE,
fontName="Helvetica-Bold")
CellBody = S("CellBody", fontSize=7.8, leading=11, textColor=GREY_DARK,
fontName="Helvetica")
CellBodySm = S("CellBodySm", fontSize=7.2, leading=10.5, textColor=GREY_DARK,
fontName="Helvetica")
TblHdr = S("TblHdr", fontSize=8, leading=11, textColor=WHITE,
fontName="Helvetica-Bold", alignment=TA_CENTER)
def section_banner(text, bg=DARK_BLUE):
"""Full-width coloured banner for section headings."""
tbl = Table([[Paragraph(text, SecHead)]], colWidths=[W])
tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING", (0,0), (-1,-1), 6),
("LEFTPADDING", (0,0), (-1,-1), 10),
("RIGHTPADDING", (0,0), (-1,-1), 10),
("ROUNDEDCORNERS", [4]),
]))
return tbl
def bullet(text, indent=12):
return Paragraph(f"• {text}", BulletItem)
def sub_bullet(text):
s = S("sub_b", fontSize=8, leading=12, textColor=GREY_DARK,
fontName="Helvetica", leftIndent=24, bulletIndent=12, spaceAfter=1)
return Paragraph(f"– {text}", s)
def hr(color=LIGHT_BLUE, thickness=0.8):
return HRFlowable(width="100%", thickness=thickness, color=color, spaceAfter=4, spaceBefore=4)
def sp(h=0.3):
return Spacer(1, h*cm)
# ═══════════════════════════════════════════════════════════════════════════════
# STORY
# ═══════════════════════════════════════════════════════════════════════════════
story = []
# ── COVER BANNER ─────────────────────────────────────────────────────────────
cover_data = [[
Paragraph("Hospital-Acquired Infections", Title),
Paragraph("Prevention Bundles & Antibiotic Regimens", Subtitle),
Paragraph("Quick-Reference Summary · ICU / MD Anaesthesia", FootNote),
]]
cover = Table(cover_data, colWidths=[W])
cover.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), DARK_BLUE),
("TOPPADDING", (0,0), (-1,-1), 18),
("BOTTOMPADDING", (0,0), (-1,-1), 18),
("LEFTPADDING", (0,0), (-1,-1), 16),
("RIGHTPADDING", (0,0), (-1,-1), 16),
("ROUNDEDCORNERS", [6]),
]))
story.append(cover)
story.append(sp(0.5))
# ── DEFINITION BOX ───────────────────────────────────────────────────────────
def_box = Table([[
Paragraph(
"<b>Hospital-Acquired Infection (HAI)</b> — Also called <i>nosocomial infection</i>. "
"An infection occurring ≥48 h after hospital admission, not present or incubating at admission. "
"HAIs affect ~3% of hospitalised patients (CDC) and cost <b>$7.2–14.9 billion/year</b> (US). "
"Many are <b>preventable</b> with evidence-based bundles.",
S("defbox", fontSize=8.5, leading=13, textColor=DARK_BLUE,
fontName="Helvetica", alignment=TA_JUSTIFY)
)
]], colWidths=[W])
def_box.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), LIGHT_BLUE),
("BOX", (0,0), (-1,-1), 1, MED_BLUE),
("TOPPADDING", (0,0), (-1,-1), 8),
("BOTTOMPADDING", (0,0), (-1,-1), 8),
("LEFTPADDING", (0,0), (-1,-1), 10),
("RIGHTPADDING", (0,0), (-1,-1), 10),
]))
story.append(def_box)
story.append(sp(0.5))
# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 1: HAI OVERVIEW TABLE
# ═══════════════════════════════════════════════════════════════════════════════
story.append(section_banner("1. HAI Types in ICU — Overview", DARK_BLUE))
story.append(sp(0.3))
hai_hdr = [
Paragraph("HAI Type", TblHdr),
Paragraph("Acronym", TblHdr),
Paragraph("Definition", TblHdr),
Paragraph("Common Organisms", TblHdr),
]
hai_rows = [
["Ventilator-Associated Pneumonia", "VAP", "Pneumonia ≥48 h after intubation",
"Early: H. influenzae, S. pneumoniae, MSSA\nLate: MRSA, Pseudomonas, Acinetobacter"],
["Catheter-Related Bloodstream Infx", "CRBSI/CLABSI", "BSI attributed to intravascular catheter (CVC ≥48 h in situ)",
"S. epidermidis, S. aureus, Enterococcus, Enteric GNRs, Candida"],
["Catheter-Associated UTI", "CAUTI", "UTI in catheterised patient",
"Staphylococci, Enterococcus, Enteric GNRs, Pseudomonas"],
["C. difficile Infection", "CDI", "AAC; toxin-mediated colitis after antibiotics",
"Clostridioides difficile (spore-forming)"],
["Surgical Site Infection", "SSI", "Infection at operative wound within 30 days",
"S. aureus, MRSA, Enteric GNRs, Streptococci"],
["ICU-Acquired Sinusitis", "—", "Nasal/oral tubes block sinus ostia",
"Same as VAP pathogens"],
["Invasive Fungal Infection", "IFI", "Candida/Aspergillus in susceptible host",
"Candida albicans (~50%), C. tropicalis, C. glabrata, Aspergillus"],
]
hai_data = [hai_hdr]
for r in hai_rows:
hai_data.append([Paragraph(x, CellBodySm) for x in r])
col_w = [W*0.22, W*0.11, W*0.32, W*0.35]
hai_tbl = Table(hai_data, colWidths=col_w, repeatRows=1)
hai_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), DARK_BLUE),
("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, GREY_LT]),
("BOX", (0,0), (-1,-1), 0.5, GREY_MID),
("INNERGRID", (0,0), (-1,-1), 0.3, HexColor("#D1D5DB")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
story.append(hai_tbl)
story.append(sp(0.6))
# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 2: CAUSES
# ═══════════════════════════════════════════════════════════════════════════════
story.append(section_banner("2. Causes / Risk Factors for HAI", MED_BLUE))
story.append(sp(0.3))
causes_cols = [
("Host Factors", RED_LT, RED, [
"Critical illness — altered immunity, malnutrition",
"Extremes of age (neonates, elderly)",
"Immunosuppression: steroids, chemo",
"Disrupted skin/mucosal barriers",
"Altered microbiome (broad antibiotics)",
]),
("Device / Procedure Factors", ORANGE_LT, ORANGE, [
"Endotracheal tube — bypasses mucociliary clearance",
"Nasotracheal intubation — blocks sinus ostia",
"Central venous catheter — skin/hub colonisation, biofilm",
"Urinary catheter — bacteriuria → bacteraemia 5%",
"NG tube — aspiration risk",
]),
("Environmental / Systemic", GREEN_LT, GREEN, [
"Poor hand hygiene (single most preventable cause)",
"Contaminated equipment/surfaces",
"Crowding, understaffing (COVID ↑CLABSI 28–91%)",
"HVAC/water (Legionella, Aspergillus)",
"Prolonged antibiotics → C. difficile, resistance",
"Parenteral nutrition → Candida risk",
]),
]
cause_cells = []
for (title, bg, fg, items) in causes_cols:
cell_content = [Paragraph(title, S("ch", fontSize=8.5, leading=12,
fontName="Helvetica-Bold", textColor=fg,
spaceAfter=4))]
for it in items:
cell_content.append(Paragraph(f"• {it}", CellBodySm))
t = Table([[cell_content]], colWidths=[(W-0.6)/3])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("BOX", (0,0), (-1,-1), 0.5, fg),
("TOPPADDING", (0,0), (-1,-1), 8),
("BOTTOMPADDING", (0,0), (-1,-1), 8),
("LEFTPADDING", (0,0), (-1,-1), 8),
("RIGHTPADDING", (0,0), (-1,-1), 8),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
cause_cells.append(t)
cause_row = Table([cause_cells], colWidths=[(W-0.6)/3]*3,
hAlign="LEFT")
cause_row.setStyle(TableStyle([
("LEFTPADDING", (0,0), (-1,-1), 3),
("RIGHTPADDING", (0,0), (-1,-1), 3),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
story.append(cause_row)
story.append(sp(0.6))
# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 3: PREVENTION BUNDLES
# ═══════════════════════════════════════════════════════════════════════════════
story.append(section_banner("3. ICU Prevention Bundles", TEAL))
story.append(sp(0.3))
# ── 3A: VAP Bundle ────────────────────────────────────────────────────────────
story.append(KeepTogether([
Paragraph("3A. VAP Prevention Bundle", S("sh", fontSize=10, leading=14,
fontName="Helvetica-Bold", textColor=TEAL, spaceBefore=4, spaceAfter=4)),
]))
vap_hdr = [Paragraph(x, TblHdr) for x in ["Measure", "Detail / Evidence"]]
vap_rows = [
("✔ Head-of-bed elevation ≥30°",
"Reduces microaspiration of gastric contents. Simple, low-cost, strong evidence. Apply in ALL ventilated patients."),
("✔ Strict hand hygiene",
"Between all patient contacts. Single most important cross-transmission prevention measure."),
("✔ Oral decontamination with chlorhexidine",
"Reduces oropharyngeal bacterial burden; likely reduces VAP incidence. Use 0.12–0.2% CHX oral rinse."),
("✔ Subglottic suctioning ETT",
"Meta-analysis supports reduction in VAP incidence + shorter ICU/hospital LOS. Use suction port ETTs in patients expected to be ventilated >72 h."),
("✔ Early weaning / extubation",
"Daily spontaneous breathing trials (SBT). Minimise duration of mechanical ventilation. Prefer NIV where appropriate."),
("✔ Ventilator circuit management",
"Change only when visibly soiled. Avoid unnecessary circuit breaks that increase contamination risk."),
("✔ Selective Digestive Decontamination (SDD)",
"Non-absorbable enteral antibiotics; growing evidence but controversial (antibiotic resistance concerns)."),
("⚠ GI acid suppression",
"Use only in HIGH-RISK patients (coagulopathy, MV). Acid suppression allows gastric bacterial overgrowth → ↑VAP risk. Consider sucralfate as alternative."),
("✔ Avoid routine ETT suctioning",
"Only when clinically indicated; use closed suction systems."),
]
vap_data = [vap_hdr] + [[Paragraph(a, CellBodySm), Paragraph(b, CellBodySm)] for a,b in vap_rows]
vap_tbl = Table(vap_data, colWidths=[W*0.32, W*0.68], repeatRows=1)
vap_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), TEAL),
("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, TEAL_LT]),
("BOX", (0,0), (-1,-1), 0.5, TEAL),
("INNERGRID", (0,0), (-1,-1), 0.3, HexColor("#A7D8E0")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
story.append(vap_tbl)
story.append(sp(0.5))
# ── 3B: CLABSI Bundle ─────────────────────────────────────────────────────────
story.append(KeepTogether([
Paragraph("3B. CLABSI Prevention Bundle (↓46% in US after implementation)",
S("sh2", fontSize=10, leading=14, fontName="Helvetica-Bold",
textColor=MED_BLUE, spaceBefore=4, spaceAfter=4)),
]))
clabsi_hdr = [Paragraph(x, TblHdr) for x in ["Phase", "Bundle Element", "Recommendation"]]
clabsi_rows = [
# INSERTION
("INSERTION", "Hand hygiene",
"Wash hands before insertion. Don gloves and mask."),
("INSERTION", "Maximal sterile barrier (MSB)",
"Sterile gown + gloves + cap + mask + FULL BODY drape for patient."),
("INSERTION", "Skin antisepsis",
"Chlorhexidine-alcohol solution — superior to povidone-iodine or alcohol alone."),
("INSERTION", "Optimal site selection",
"Subclavian → lowest infection/DVT risk (highest mechanical risk).\nInternal jugular → intermediate.\nFemoral → highest infection risk; reserve for emergency/coagulopathy."),
("INSERTION", "Ultrasound guidance",
"Reduces insertion attempts and trauma; strongly recommended."),
("INSERTION", "Replace emergency lines",
"Catheters placed without aseptic technique must be replaced as soon as patient condition allows."),
# MAINTENANCE
("MAINTENANCE", "Daily necessity review",
"Remove CVC as soon as it is no longer required. Document date of insertion and removal."),
("MAINTENANCE", "Dressing changes",
"Gauze dressing: every 2 days.\nTransparent film: every 7 days (sooner if soiled/damp/loose)."),
("MAINTENANCE", "'Scrub the hub'",
"Disinfect all ports/hubs before and after each access. Cover open lumens with sterile end-caps."),
("MAINTENANCE", "Chlorhexidine at dressing change",
"Apply CHX solution to catheter exit site at every dressing change."),
("MAINTENANCE", "Antimicrobial-impregnated catheter",
"Use when expected duration >5 days OR local CRBSI rate >3.3/1000 catheter-days.\nOptions: CHX/silver sulfadiazine OR minocycline/rifampin."),
("MAINTENANCE", "Avoid routine guidewire exchange",
"Does NOT reduce infection. Increases mechanical complications. Replace catheter if CRBSI confirmed — do NOT exchange over guidewire."),
("MAINTENANCE", "Staff education",
"Standardised competency-based training for all staff manipulating CVCs."),
]
clabsi_data = [clabsi_hdr]
prev_phase = None
for phase, elem, rec in clabsi_rows:
display_phase = phase if phase != prev_phase else ""
prev_phase = phase
clabsi_data.append([
Paragraph(display_phase, S("ph", fontSize=8, fontName="Helvetica-Bold",
textColor=MED_BLUE if phase=="INSERTION" else TEAL,
leading=11)),
Paragraph(elem, CellBodySm),
Paragraph(rec, CellBodySm),
])
ins_rows = [i+1 for i,(ph,_,_) in enumerate(clabsi_rows) if ph=="INSERTION"]
maint_rows = [i+1 for i,(ph,_,_) in enumerate(clabsi_rows) if ph=="MAINTENANCE"]
clabsi_tbl = Table(clabsi_data, colWidths=[W*0.13, W*0.27, W*0.60], repeatRows=1)
ts = TableStyle([
("BACKGROUND", (0,0), (-1,0), MED_BLUE),
("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, GREY_LT]),
("BOX", (0,0), (-1,-1), 0.5, MED_BLUE),
("INNERGRID", (0,0), (-1,-1), 0.3, HexColor("#BFDBFE")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
("VALIGN", (0,0), (-1,-1), "TOP"),
])
# Background for insertion rows
for r in ins_rows:
ts.add("BACKGROUND", (0,r), (0,r), HexColor("#DBEAFE"))
for r in maint_rows:
ts.add("BACKGROUND", (0,r), (0,r), HexColor("#D1FAE5"))
clabsi_tbl.setStyle(ts)
story.append(clabsi_tbl)
story.append(sp(0.5))
# ── 3C: CAUTI + CDI side by side ──────────────────────────────────────────────
cauti_items = [
("✔", "Aseptic technique during insertion"),
("✔", "Closed drainage system; bag below bladder level"),
("✔", "Daily necessity review — remove ASAP"),
("✔", "Use only when strictly indicated (not for convenience)"),
("✔", "Consider intermittent catheterisation as alternative"),
("✔", "Hand hygiene before any catheter manipulation"),
("⚠", "Antimicrobial coatings — insufficient evidence for routine use"),
]
cdi_items = [
("✔", "Antibiotic stewardship — restrict broad-spectrum, de-escalate"),
("✔", "Soap-and-water handwashing (alcohol gel INEFFECTIVE vs spores)"),
("✔", "Contact precautions — gown + gloves; isolate patients"),
("✔", "Sporicidal environmental cleaning (bleach-based)"),
("✔", "Avoid PPIs unless clearly indicated"),
("✔", "Treat: oral vancomycin; add IV metronidazole if shock/megacolon"),
]
def mini_bundle_cell(title, bg, fg, items, width):
content = [Paragraph(title, S("mbt", fontSize=9, fontName="Helvetica-Bold",
textColor=fg, leading=13, spaceAfter=5))]
for icon, text in items:
content.append(Paragraph(
f'<font color="{"#166534" if icon=="✔" else "#B91C1C"}">{icon}</font> {text}',
CellBodySm
))
t = Table([[content]], colWidths=[width])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("BOX", (0,0), (-1,-1), 0.8, fg),
("TOPPADDING", (0,0), (-1,-1), 8),
("BOTTOMPADDING", (0,0), (-1,-1), 8),
("LEFTPADDING", (0,0), (-1,-1), 8),
("RIGHTPADDING", (0,0), (-1,-1), 8),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
return t
half = (W - 0.4) / 2
cauti_cell = mini_bundle_cell("3C. CAUTI Prevention", TEAL_LT, TEAL, cauti_items, half)
cdi_cell = mini_bundle_cell("3D. C. difficile (CDI) Prevention", ORANGE_LT, ORANGE, cdi_items, half)
pair_row = Table([[cauti_cell, cdi_cell]], colWidths=[half, half])
pair_row.setStyle(TableStyle([
("LEFTPADDING", (0,0), (-1,-1), 2),
("RIGHTPADDING", (0,0), (-1,-1), 2),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
story.append(pair_row)
story.append(sp(0.5))
# ── 3E: Fungal + Sinusitis ────────────────────────────────────────────────────
fungal_items = [
("✔", "Limit CVC duration, PN use, broad-spectrum antibiotics"),
("✔", "Prophylactic fluconazole in high-risk surgical ICU patients"),
("✔", "β-D-glucan assay: ~80% sensitive/specific (Candida, Aspergillus)"),
("✔", "Whole-blood PCR: >90% sensitivity; result within hours"),
("✔", "Candiduria alone: usually resolves with catheter removal"),
("⚠", "Candida peritonitis: treat if clinical signs of infection (mortality ~50%)"),
]
sinus_items = [
("✔", "Prefer OROTRACHEAL over nasotracheal intubation"),
("✔", "Sinusitis rate: nasal ~95% vs oral ~25% at 1 week"),
("✔", "Remove nasal tubes (ETT, NG) as early as clinically possible"),
("✔", "Suspect sinusitis in ICU fever of unknown origin (~16% of FUO in surgical ICU)"),
("✔", "Quantitative cultures needed to confirm bacterial vs radiographic sinusitis"),
]
fungal_cell = mini_bundle_cell("3E. Invasive Fungal Infection Prevention", PURPLE_LT, PURPLE, fungal_items, half)
sinus_cell = mini_bundle_cell("3F. ICU-Acquired Sinusitis Prevention", RED_LT, RED, sinus_items, half)
pair_row2 = Table([[fungal_cell, sinus_cell]], colWidths=[half, half])
pair_row2.setStyle(TableStyle([
("LEFTPADDING", (0,0), (-1,-1), 2),
("RIGHTPADDING", (0,0), (-1,-1), 2),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
story.append(pair_row2)
story.append(sp(0.6))
# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 4: ANTIBIOTIC REGIMENS
# ═══════════════════════════════════════════════════════════════════════════════
story.append(PageBreak())
story.append(section_banner("4. Empiric Antibiotic Regimens for Common ICU Infections", RED))
story.append(sp(0.3))
story.append(Paragraph(
"<i>Based on Barash, Cullen & Stoelting's Clinical Anesthesia, 9e. "
"Always tailor to LOCAL ANTIBIOGRAM. De-escalate after 48–72 h culture results.</i>",
S("note", fontSize=8, fontName="Helvetica-Oblique", textColor=RED,
leading=12, spaceAfter=6)
))
abx_hdr = [Paragraph(x, TblHdr) for x in
["Infection", "Sub-type / Notes", "Empiric Regimen", "Duration"]]
abx_rows = [
# VAP
("VAP\n(Ventilator-Associated\nPneumonia)",
"Early (<72 h of intubation)\nCommunity/sensitive flora",
"Ceftriaxone + Azithromycin\n\n+ Vancomycin or Linezolid\nif MRSA history/risk",
"5–8 days\n(narrow on\ncultures)"),
("VAP",
"Late (>72 h)\nMDR organisms likely\n(MRSA, Pseudomonas,\nAcinetobacter)",
"Vancomycin OR Linezolid\n+ Cefepime\n± Ciprofloxacin\n (if MDR GNRs likely)",
"8 days\n(14 days for\nPseudomonas)"),
# BSI
("Bloodstream Infection\n(CRBSI/CLABSI/BSI)",
"Cover MRSA + MDR GNRs;\nadd anti-Pseudomonal if high\nlocal incidence",
"Vancomycin OR Linezolid\n+ Cefepime\n± Ciprofloxacin\n (MDR GNRs / ESBLs)",
"≥7 days\n(≥14 days for\nS. aureus)"),
# CAUTI
("CAUTI\n(Urinary Tract Infection)",
"Non-catheter-associated",
"Ceftriaxone",
"5–7 days"),
("CAUTI",
"Catheter-associated;\nGPCs on Gram stain\nor MDR GNRs/ESBL risk",
"Ceftazidime\n+ Vancomycin (if GPCs on stain)\nor Meropenem\n (MDR/ESBL concern)",
"7–14 days"),
# CDI
("C. difficile Infection\n(CDI)",
"Non-severe; first episode",
"Oral Vancomycin 125 mg QDS × 10 days\n(alternative: oral Fidaxomicin)",
"10 days"),
("CDI",
"Severe (shock, megacolon,\nileus, peritonitis)",
"Oral Vancomycin 500 mg QDS\n+ IV Metronidazole 500 mg TDS\n± surgical consult",
"10–14 days"),
# Meningitis
("Meningitis",
"Non-surgical / community",
"Dexamethasone + Ceftriaxone\n+ Vancomycin + Ampicillin\n+ Acyclovir",
"10–21 days\n(per organism)"),
("Meningitis",
"Post-surgical / post-trauma\n(GNRs + S. aureus likely)",
"Cefepime + Metronidazole\n+ Vancomycin",
"10–21 days"),
# IAI
("Intra-Abdominal Infection\n(IAI)",
"Community-acquired",
"Ceftriaxone + Metronidazole",
"4–7 days\nafter source\ncontrol"),
("IAI",
"Hospital-acquired / post-op\nMDR risk",
"Vancomycin\n+ Piperacillin-Tazobactam\nOR Meropenem",
"5–7 days\nafter source\ncontrol"),
# Sepsis
("Sepsis / Septic Shock\n(Unknown Source)",
"Broad empiric cover;\nnarrow urgently on cultures",
"Vancomycin + Meropenem\n± Ciprofloxacin\n (MDR GNRs / ESBLs)",
"Reassess at\n48–72 h;\nde-escalate"),
# Fungal
("Invasive Candidiasis\n(Candidaemia)",
"Non-neutropenic ICU patient;\nremove CVCs if feasible",
"Echinocandin (Caspofungin,\nMicafungin, Anidulafungin)\nOR Fluconazole if sensitive,\nnon-critically ill",
"14 days after\nlast positive\nculture"),
]
abx_data = [abx_hdr]
prev_infx = ""
for infx, sub, reg, dur in abx_rows:
display_infx = infx if infx != prev_infx else ""
prev_infx = infx
abx_data.append([
Paragraph(display_infx, S("ai", fontSize=8, fontName="Helvetica-Bold",
textColor=DARK_BLUE, leading=11)),
Paragraph(sub, CellBodySm),
Paragraph(reg, S("reg", fontSize=8, fontName="Helvetica", leading=11.5,
textColor=GREY_DARK)),
Paragraph(dur, CellBodySm),
])
abx_tbl = Table(abx_data, colWidths=[W*0.20, W*0.22, W*0.38, W*0.20], repeatRows=1)
abx_ts = TableStyle([
("BACKGROUND", (0,0), (-1,0), RED),
("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, RED_LT]),
("BOX", (0,0), (-1,-1), 0.5, RED),
("INNERGRID", (0,0), (-1,-1), 0.3, HexColor("#FECACA")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
("VALIGN", (0,0), (-1,-1), "TOP"),
])
abx_tbl.setStyle(abx_ts)
story.append(abx_tbl)
story.append(sp(0.5))
# ── De-escalation box ─────────────────────────────────────────────────────────
deesc = Table([[
Paragraph(
"<b>De-Escalation Principle:</b> "
"Start empiric broad-spectrum antibiotics AFTER cultures are sent. "
"Narrow or discontinue based on 48–72 h culture + sensitivity results. "
"This approach ensures adequate initial treatment while minimising "
"antibiotic resistance and Clostridioides difficile risk.",
S("deesc", fontSize=8.5, leading=13, fontName="Helvetica",
textColor=DARK_BLUE, alignment=TA_JUSTIFY)
)
]], colWidths=[W])
deesc.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), LIGHT_BLUE),
("BOX", (0,0), (-1,-1), 1.2, MED_BLUE),
("LEFTPADDING", (0,0), (-1,-1), 10),
("RIGHTPADDING", (0,0), (-1,-1), 10),
("TOPPADDING", (0,0), (-1,-1), 8),
("BOTTOMPADDING",(0,0), (-1,-1), 8),
]))
story.append(deesc)
story.append(sp(0.6))
# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 5: MASTER SUMMARY TABLE
# ═══════════════════════════════════════════════════════════════════════════════
story.append(section_banner("5. Master Summary — HAI Bundles at a Glance", DARK_BLUE))
story.append(sp(0.3))
sum_hdr = [Paragraph(x, TblHdr) for x in ["HAI", "Core Bundle Elements"]]
sum_rows = [
("VAP",
"HOB ≥30° | Hand hygiene | Oral CHX | Subglottic suctioning ETT | Early weaning/SBT | Minimise acid suppression | Closed suction"),
("CLABSI",
"Hand hygiene | Full sterile barrier | CHX-alcohol skin prep | Optimal site (subclavian preferred) | Daily necessity review | 'Scrub the hub' | Antimicrobial catheter if >5 days"),
("CAUTI",
"Aseptic insertion | Closed drainage | Bag below bladder | Daily review | Shortest duration possible | Prefer intermittent catheterisation"),
("CDI",
"Antibiotic stewardship | Soap-and-water handwashing (not alcohol) | Contact precautions + isolation | Sporicidal cleaning | Avoid unnecessary PPIs"),
("Invasive Fungal",
"Limit CVC / PN / antibiotics | Fluconazole prophylaxis (high-risk) | Early β-D-glucan / PCR diagnosis | Prompt antifungal treatment"),
("Sinusitis",
"Oral > nasal intubation | Early removal of nasal tubes | Suspect in ICU FUO"),
("General",
"Care bundles | Antimicrobial stewardship | Daily device review | Active IPC surveillance | Staff education | Environmental cleaning"),
]
sum_data = [sum_hdr] + [[Paragraph(a, S("sk", fontSize=8.5, fontName="Helvetica-Bold",
textColor=DARK_BLUE, leading=12)),
Paragraph(b, CellBodySm)] for a,b in sum_rows]
sum_tbl = Table(sum_data, colWidths=[W*0.15, W*0.85], repeatRows=1)
sum_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), DARK_BLUE),
("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, LIGHT_BLUE]),
("BOX", (0,0), (-1,-1), 0.5, DARK_BLUE),
("INNERGRID", (0,0), (-1,-1), 0.3, HexColor("#D1D5DB")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
story.append(sum_tbl)
story.append(sp(0.6))
# ── Footer note ───────────────────────────────────────────────────────────────
footer = Table([[
Paragraph(
"Sources: Barash, Cullen & Stoelting's Clinical Anesthesia 9e · Miller's Anesthesia 10e · "
"Current Surgical Therapy 14e · Tietz Textbook of Laboratory Medicine 7e · Goldman-Cecil Medicine. "
"Generated by Orris Clinical AI · May 2026",
FootNote
)
]], colWidths=[W])
footer.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), GREY_LT),
("BOX", (0,0), (-1,-1), 0.5, HexColor("#D1D5DB")),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING",(0,0), (-1,-1), 6),
]))
story.append(footer)
# ── BUILD ─────────────────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF created: {OUTPUT}")