Please give me the notes of shock and its treatment and its types, including all its pathophysiology and its treatment. For our examination in a PDF format.
mkdir -p /tmp/workspace/shock-notes && ls /tmp/workspace/
~/shock-notes/generate_shock_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm
from reportlab.lib import colors
from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table,
TableStyle, HRFlowable, PageBreak, KeepTogether)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import ListFlowable, ListItem
output_path = "/tmp/workspace/shock-notes/Shock_Comprehensive_Notes.pdf"
doc = SimpleDocTemplate(
output_path,
pagesize=A4,
rightMargin=2*cm, leftMargin=2*cm,
topMargin=2.5*cm, bottomMargin=2.5*cm,
title="Shock - Comprehensive Examination Notes",
author="Orris Medical Library"
)
W, H = A4
styles = getSampleStyleSheet()
# Custom styles
title_style = ParagraphStyle(
"TitleStyle",
parent=styles["Title"],
fontSize=22,
textColor=colors.HexColor("#1a237e"),
spaceAfter=6,
alignment=TA_CENTER,
fontName="Helvetica-Bold",
)
subtitle_style = ParagraphStyle(
"SubtitleStyle",
parent=styles["Normal"],
fontSize=12,
textColor=colors.HexColor("#5c6bc0"),
spaceAfter=4,
alignment=TA_CENTER,
fontName="Helvetica",
)
h1_style = ParagraphStyle(
"H1Style",
parent=styles["Heading1"],
fontSize=15,
textColor=colors.white,
backColor=colors.HexColor("#1a237e"),
spaceBefore=14,
spaceAfter=6,
leftIndent=-0.3*cm,
rightIndent=-0.3*cm,
borderPadding=(5, 8, 5, 8),
fontName="Helvetica-Bold",
)
h2_style = ParagraphStyle(
"H2Style",
parent=styles["Heading2"],
fontSize=12,
textColor=colors.white,
backColor=colors.HexColor("#283593"),
spaceBefore=10,
spaceAfter=4,
leftIndent=-0.2*cm,
borderPadding=(4, 6, 4, 6),
fontName="Helvetica-Bold",
)
h3_style = ParagraphStyle(
"H3Style",
parent=styles["Heading3"],
fontSize=11,
textColor=colors.HexColor("#1a237e"),
spaceBefore=8,
spaceAfter=3,
fontName="Helvetica-Bold",
borderPadding=(2, 0, 2, 0),
)
body_style = ParagraphStyle(
"BodyStyle",
parent=styles["Normal"],
fontSize=9.5,
leading=14,
spaceAfter=5,
alignment=TA_JUSTIFY,
fontName="Helvetica",
textColor=colors.HexColor("#212121"),
)
bullet_style = ParagraphStyle(
"BulletStyle",
parent=styles["Normal"],
fontSize=9.5,
leading=13,
leftIndent=18,
spaceAfter=2,
fontName="Helvetica",
textColor=colors.HexColor("#212121"),
)
subbullet_style = ParagraphStyle(
"SubBulletStyle",
parent=styles["Normal"],
fontSize=9,
leading=13,
leftIndent=34,
spaceAfter=2,
fontName="Helvetica",
textColor=colors.HexColor("#424242"),
)
highlight_style = ParagraphStyle(
"HighlightStyle",
parent=styles["Normal"],
fontSize=9.5,
leading=13,
backColor=colors.HexColor("#e8eaf6"),
borderColor=colors.HexColor("#3949ab"),
borderWidth=1,
borderPadding=(4, 8, 4, 8),
spaceAfter=6,
fontName="Helvetica",
textColor=colors.HexColor("#1a237e"),
)
warning_style = ParagraphStyle(
"WarningStyle",
parent=styles["Normal"],
fontSize=9.5,
leading=13,
backColor=colors.HexColor("#fff3e0"),
borderColor=colors.HexColor("#e65100"),
borderWidth=1,
borderPadding=(4, 8, 4, 8),
spaceAfter=6,
fontName="Helvetica-Bold",
textColor=colors.HexColor("#bf360c"),
)
footer_style = ParagraphStyle(
"FooterStyle",
parent=styles["Normal"],
fontSize=8,
textColor=colors.HexColor("#9e9e9e"),
alignment=TA_CENTER,
)
def B(text): return f"<b>{text}</b>"
def I(text): return f"<i>{text}</i>"
def BI(text): return f"<b><i>{text}</i></b>"
def CLR(text, hex_color): return f'<font color="{hex_color}">{text}</font>'
def bullet(text, level=0):
sym = "\u2022" if level == 0 else "\u2013"
style = bullet_style if level == 0 else subbullet_style
return Paragraph(f"{sym} {text}", style)
def sp(n=1): return [Spacer(1, n * 0.25 * cm)]
def hr(): return [HRFlowable(width="100%", thickness=0.5, color=colors.HexColor("#9fa8da"), spaceAfter=4)]
# ─── Table helper ─────────────────────────────────────────────────────────────
def make_table(headers, rows, col_widths=None):
th_style = ParagraphStyle("TH", parent=styles["Normal"],
fontSize=9, fontName="Helvetica-Bold",
textColor=colors.white, alignment=TA_CENTER)
td_style = ParagraphStyle("TD", parent=styles["Normal"],
fontSize=8.5, fontName="Helvetica",
textColor=colors.HexColor("#212121"), leading=12)
data = [[Paragraph(h, th_style) for h in headers]]
for row in rows:
data.append([Paragraph(str(c), td_style) for c in row])
usable_w = W - 4*cm
if col_widths is None:
n = len(headers)
col_widths = [usable_w / n] * n
t = Table(data, colWidths=col_widths, repeatRows=1)
t.setStyle(TableStyle([
("BACKGROUND", (0, 0), (-1, 0), colors.HexColor("#283593")),
("ROWBACKGROUNDS", (0, 1), (-1, -1),
[colors.HexColor("#f5f5f5"), colors.white]),
("GRID", (0, 0), (-1, -1), 0.4, colors.HexColor("#bdbdbd")),
("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),
]))
return t
# ════════════════════════════════════════════════════════════════════════════════
# Content
# ════════════════════════════════════════════════════════════════════════════════
story = []
# ─── Cover ────────────────────────────────────────────────────────────────────
story += sp(8)
story.append(Paragraph("SHOCK", title_style))
story.append(Paragraph("Comprehensive Examination Notes", subtitle_style))
story.append(Paragraph("Types · Pathophysiology · Clinical Features · Treatment", subtitle_style))
story += sp(2)
story += hr()
story += sp(1)
story.append(Paragraph(I("Sources: Robbins & Cotran Pathologic Basis of Disease · Robbins & Kumar Basic Pathology · "
"Sabiston Textbook of Surgery · Goldman-Cecil Medicine · Rosen's Emergency Medicine"),
footer_style))
story += sp(1)
story.append(Paragraph(f"Prepared for Examination Use | August 2026", footer_style))
story.append(PageBreak())
# ─── 1. DEFINITION ────────────────────────────────────────────────────────────
story.append(Paragraph("1. DEFINITION OF SHOCK", h1_style))
story += sp(0.5)
story.append(Paragraph(
"Shock is a state of <b>systemic tissue hypoperfusion</b> resulting from reduced cardiac output "
"and/or reduced effective circulating blood volume, leading to cellular hypoxia. "
"At the outset, cellular injury is <b>reversible</b>; however, prolonged shock results in "
"<b>irreversible tissue injury</b> and is potentially fatal.",
body_style))
story.append(Paragraph(
B("Classic Definition (Gross, 1872)") + ": "
"<i>\"A manifestation of the rude unhinging of the machinery of life.\"</i>",
body_style))
story.append(Paragraph(
B("Modern Definition") + ": Inadequate perfusion of tissue leading to cellular hypoxia, "
"organ dysfunction, and, if uncorrected, death.",
body_style))
story += sp(0.5)
story.append(Paragraph(
"⚠ " + B("Key Point:") + " Shock is NOT simply hypotension. Tissue perfusion can be "
"compromised even with a normal blood pressure (compensated shock).",
warning_style))
# ─── 2. CLASSIFICATION ────────────────────────────────────────────────────────
story += sp()
story.append(Paragraph("2. CLASSIFICATION / TYPES OF SHOCK", h1_style))
story += sp(0.5)
story.append(make_table(
["Type", "Mechanism", "Classic Causes", "Haemodynamics"],
[
["Hypovolemic", "Low blood/plasma volume → ↓ preload → ↓ CO",
"Haemorrhage, burns, vomiting, diarrhoea, third-spacing",
"↑ HR, ↓ BP, ↑ SVR, ↓ CO, ↓ CVP, cold/clammy skin"],
["Cardiogenic", "Pump failure → ↓ CO despite adequate volume",
"MI (most common), arrhythmia, tamponade, PE, myocarditis",
"↑ HR, ↓ BP, ↑ SVR, ↓ CO, ↑ CVP/PCWP, JVD"],
["Distributive – Septic", "Cytokine storm → vasodilation → maldistribution",
"Gram+/- bacteria, fungi; sepsis",
"↑ HR, ↓ BP, ↓ SVR, ↑ CO (early/warm), ↓ CO (late/cold)"],
["Distributive – Neurogenic", "Loss of sympathetic tone → vasodilation",
"Spinal cord injury (above T6), spinal anaesthesia",
"↓ HR (bradycardia), ↓ BP, ↓ SVR, warm/dry skin, no tachycardia"],
["Distributive – Anaphylactic", "IgE-mediated → massive vasodilation + ↑ permeability",
"Drug allergy, insect stings, latex",
"↑ HR, ↓ BP, ↓ SVR, urticaria, bronchospasm"],
["Obstructive", "Mechanical obstruction to flow",
"Tension pneumothorax, cardiac tamponade (Beck's triad), massive PE",
"↑ HR, ↓ BP, ↑ CVP, ↓ CO, ↑ SVR"],
],
col_widths=[3*cm, 4.2*cm, 4.2*cm, 4.5*cm]
))
story += sp()
# ─── 3. PATHOPHYSIOLOGY ───────────────────────────────────────────────────────
story.append(Paragraph("3. PATHOPHYSIOLOGY OF SHOCK", h1_style))
# 3.1 General
story.append(Paragraph("3.1 General Cellular & Metabolic Changes", h2_style))
story += sp(0.5)
story.append(bullet(B("Cellular hypoxia") + ": Reduced O₂ delivery shifts metabolism from aerobic → anaerobic glycolysis"))
story.append(bullet(B("Lactic acidosis") + ": Accumulation of lactate → metabolic acidosis (↓ pH, ↑ anion gap)", 1))
story.append(bullet(B("ATP depletion") + ": Failure of Na⁺/K⁺-ATPase → cellular swelling; Ca²⁺ influx → enzyme activation"))
story.append(bullet(B("Membrane disruption") + ": Lysosomal enzyme release → cell necrosis"))
story.append(bullet(B("Endothelial dysfunction") + ": Widespread endothelial activation → inflammation, coagulation, oedema"))
story.append(bullet(B("Reperfusion injury") + ": On restoration of flow: free radical burst, neutrophil activation → additional tissue damage"))
story += sp(0.5)
# Stages of shock
story.append(Paragraph("3.2 Stages of Shock", h2_style))
story += sp(0.5)
story.append(make_table(
["Stage", "Description", "Key Features", "Reversibility"],
[
["Stage 1: Compensated\n(Non-progressive)",
"Baroreceptor reflexes and neurohumoral responses maintain perfusion",
"Tachycardia, peripheral vasoconstriction, ↑ ADH & RAAS, ↑ catecholamines;\nBP may be normal",
"Fully reversible with treatment"],
["Stage 2: Decompensated\n(Progressive)",
"Compensatory mechanisms fail; progressive tissue hypoperfusion",
"↓ BP, altered sensorium, oliguria, metabolic acidosis, anaerobic metabolism",
"Reversible with aggressive treatment"],
["Stage 3: Irreversible\n(Refractory)",
"Widespread cell death; multi-organ failure",
"DIC, ARDS, acute renal failure, hepatic failure; BP unresponsive to vasopressors",
"Irreversible; fatal without organ support"],
],
col_widths=[3.5*cm, 5*cm, 5.5*cm, 3*cm]
))
story += sp()
# 3.3 Hypovolemic
story.append(Paragraph("3.3 Hypovolemic / Haemorrhagic Shock", h2_style))
story += sp(0.5)
story.append(Paragraph(
"Results from <b>loss of blood or plasma volume</b>. The ATLS classification divides haemorrhagic "
"shock into four classes based on volume lost and physiological response:",
body_style))
story.append(make_table(
["Class", "Blood Loss (%)", "Blood Loss (mL, 70 kg)", "Pulse (bpm)", "BP", "RR (breaths/min)", "Urine (mL/h)", "Mental Status", "Initial Fluid"],
[
["I", "0–15", "< 750", "< 100", "Normal", "14–20", "> 30", "Slightly anxious", "Crystalloid"],
["II", "15–30", "750–1500", "> 100", "Normal", "20–30", "20–30", "Mildly anxious", "Crystalloid"],
["III", "30–40", "1500–2000", "> 120", "↓", "30–40", "5–15", "Anxious/Confused", "Crystalloid + Blood"],
["IV", "> 40", "> 2000", "> 140", "↓↓", "> 35", "Negligible", "Confused/Lethargic", "Crystalloid + Blood"],
],
col_widths=[1.2*cm, 1.8*cm, 2.5*cm, 1.8*cm, 1.5*cm, 2.2*cm, 1.8*cm, 2.5*cm, 2.2*cm]
))
story += sp(0.5)
story.append(Paragraph(B("Pathophysiology cascade:"), h3_style))
story.append(bullet("↓ Blood volume → ↓ Venous return → ↓ Cardiac preload → ↓ Stroke volume → ↓ CO"))
story.append(bullet("↓ BP → Baroreceptor activation → SNS stimulation → ↑ HR, ↑ SVR (vasoconstriction)"))
story.append(bullet("Renal perfusion ↓ → RAAS activation → Angiotensin II → Aldosterone → Na⁺ & H₂O retention"))
story.append(bullet("Hypothalamus → ↑ ADH → water reabsorption in collecting duct"))
story.append(bullet("Prolonged: Tissue ischaemia → lactic acidosis → ischaemic organ damage (gut, kidney, heart, brain)"))
story += sp()
# 3.4 Cardiogenic
story.append(Paragraph("3.4 Cardiogenic Shock", h2_style))
story += sp(0.5)
story.append(Paragraph(
"Results from <b>failure of the myocardial pump</b>, leading to low CO despite adequate circulating volume. "
"Most commonly caused by massive MI (typically > 40% of LV myocardium lost).",
body_style))
story.append(Paragraph(B("Causes:"), h3_style))
story.append(bullet(B("Intrinsic") + ": MI, arrhythmia (VF, VT, complete heart block), myocarditis, cardiomyopathy"))
story.append(bullet(B("Extrinsic") + ": Cardiac tamponade (compression), tension pneumothorax"))
story.append(bullet(B("Outflow obstruction") + ": Massive PE, aortic stenosis"))
story.append(Paragraph(B("Pathophysiology cascade:"), h3_style))
story.append(bullet("↓ CO → compensatory ↑ SNS (↑ HR, ↑ SVR) → ↑ myocardial O₂ demand on failing heart"))
story.append(bullet("↑ PCWP → pulmonary oedema → hypoxaemia → further myocardial compromise"))
story.append(bullet("Downward spiral: ↓ CO → ↓ coronary perfusion → further ischaemia → further ↓ CO"))
story.append(bullet("Signs: JVD, S3 gallop, pulmonary rales, cold clammy skin (vasoconstriction)"))
story += sp()
# 3.5 Septic
story.append(Paragraph("3.5 Septic Shock – Detailed Pathophysiology", h2_style))
story += sp(0.5)
story.append(Paragraph(
"<b>Sepsis</b> = Life-threatening organ dysfunction caused by a dysregulated host response to infection. "
"<b>Septic shock</b> = Sepsis with circulatory, cellular & metabolic abnormalities with greater mortality risk.",
body_style))
story.append(Paragraph(
"Incidence: > 750,000 cases/year in the USA. Mortality: 20–40% despite modern care. "
"Most common triggers: Gram-positive bacteria > Gram-negative bacteria > Fungi.",
body_style))
story += sp(0.5)
story.append(Paragraph(B("Step-by-step pathogenesis:"), h3_style))
story.append(bullet(B("Microbial entry") + ": PAMPs (pathogen-associated molecular patterns) – e.g., "
"LPS (endotoxin) from G-ve; peptidoglycan, teichoic acid from G+ve; fungal glucans"))
story.append(bullet(B("Pattern recognition") + ": Toll-like receptors (TLRs), G-protein-coupled receptors, "
"C-type lectin receptors (Dectins for fungi) on macrophages, neutrophils, dendritic cells & endothelium", 1))
story.append(bullet(B("NF-κB activation") + ": Master transcription factor → upregulation of pro-inflammatory genes", 1))
story.append(bullet(B("Cytokine storm") + ": ↑ TNF-α, IL-1β, IL-6, IL-12, IL-18, IFN-γ, HMGB1 → amplified inflammation"))
story.append(bullet(B("Complement activation") + ": → C3a, C5a (anaphylatoxins) → vasodilation, ↑ permeability"))
story.append(bullet(B("Reactive oxygen species (ROS)") + " and lipid mediators: Prostaglandins, PAF, leukotrienes"))
story.append(bullet(B("Endothelial activation/injury") + ": ↑ adhesion molecules (ICAM-1, E-selectin), ↑ permeability → oedema"))
story.append(bullet(B("Peripheral vasodilation") + ": ↑ iNOS → ↑ NO → smooth muscle relaxation → ↓ SVR → distributive shock"))
story.append(bullet(B("Coagulation activation") + ": ↑ Tissue factor on endothelium + factor XII activation → DIC"))
story.append(bullet(B("DIC consequences") + ": Thrombotic microangiopathy → organ ischaemia AND consumption coagulopathy → bleeding", 1))
story.append(bullet(B("Immunosuppression phase") + ": Counter-regulatory response → Th1→Th2 shift, lymphocyte apoptosis, "
"↑ IL-10, ↑ IL-1RA, ↑ sTNFR → immunoparalysis"))
story.append(bullet(B("End result") + ": Multiorgan dysfunction syndrome (MODS)"))
story += sp(0.5)
story.append(Paragraph(B("Haemodynamic profile:"), h3_style))
story.append(bullet(B("Early ('warm') shock") + ": ↑ CO, ↓ SVR, warm/flushed skin, bounding pulse"))
story.append(bullet(B("Late ('cold') shock") + ": ↓ CO (myocardial depression by TNF/IL-1), ↑ SVR, cold skin, MODS"))
story += sp()
# 3.6 Neurogenic
story.append(Paragraph("3.6 Neurogenic Shock", h2_style))
story += sp(0.5)
story.append(bullet("Mechanism: Loss of sympathetic tone (cord injury above T6) → loss of vasomotor control"))
story.append(bullet("Results in: ↓ SVR, ↓ HR (parasympathetics unopposed), ↓ BP, warm/dry skin"))
story.append(bullet("Distinguishing feature: " + B("Bradycardia") + " with hypotension (vs tachycardia in other types)"))
story.append(bullet("Treatment: IV fluids cautiously + vasopressors (noradrenaline/phenylephrine)"))
story += sp()
# 3.7 Anaphylactic
story.append(Paragraph("3.7 Anaphylactic Shock", h2_style))
story += sp(0.5)
story.append(bullet("Mechanism: IgE-mediated mast cell/basophil degranulation → histamine, leukotrienes, prostaglandins"))
story.append(bullet("Results in: Systemic vasodilation, ↑ vascular permeability, bronchoconstriction"))
story.append(bullet("Signs: Urticaria, angioedema, bronchospasm, hypotension, tachycardia"))
story.append(bullet(B("Treatment: Adrenaline (epinephrine) IM 0.5 mg (1:1000) is FIRST-LINE")))
story += sp()
# ─── 4. CLINICAL FEATURES ─────────────────────────────────────────────────────
story.append(Paragraph("4. CLINICAL FEATURES", h1_style))
story += sp(0.5)
story.append(Paragraph(B("Common to ALL types of shock:"), h3_style))
story.append(bullet("Tachycardia (except neurogenic shock)"))
story.append(bullet("Hypotension (SBP < 90 mmHg or ↓ > 40 mmHg from baseline)"))
story.append(bullet("Tachypnoea"))
story.append(bullet("Altered mental status (anxiety → confusion → obtundation)"))
story.append(bullet("Oliguria (urine output < 0.5 mL/kg/h) → anuria in severe shock"))
story.append(bullet("Metabolic (lactic) acidosis: ↑ lactate, ↓ bicarbonate, ↓ pH"))
story += sp(0.5)
story.append(make_table(
["Feature", "Hypovolemic", "Cardiogenic", "Septic (early)", "Neurogenic"],
[
["Skin", "Cold, clammy, pale", "Cold, clammy, pale/blue", "Warm, flushed", "Warm, dry"],
["Heart Rate", "↑↑ Tachycardia", "↑↑ Tachycardia", "↑↑ Tachycardia", "↓ Bradycardia"],
["Blood Pressure", "↓↓", "↓↓", "↓", "↓"],
["SVR", "↑↑ (vasoconstriction)", "↑↑ (vasoconstriction)", "↓↓ (vasodilation)", "↓↓ (vasodilation)"],
["CO/CI", "↓↓", "↓↓↓", "↑ or normal (early)", "↑ or normal"],
["CVP/JVP", "↓↓", "↑↑", "↓ or normal", "↓"],
["Resp. Rate", "↑↑", "↑↑ (pulm. oedema)", "↑↑", "Variable"],
],
col_widths=[3.2*cm, 3.5*cm, 3.5*cm, 3.5*cm, 3.2*cm]
))
story += sp()
# ─── 5. TREATMENT ─────────────────────────────────────────────────────────────
story.append(Paragraph("5. TREATMENT OF SHOCK", h1_style))
story += sp(0.5)
# General principles
story.append(Paragraph("5.1 General Principles (All Types)", h2_style))
story += sp(0.5)
story.append(Paragraph(B("Primary goals: Restore tissue perfusion, correct the underlying cause, prevent MODS."), body_style))
story.append(make_table(
["Priority", "Action", "Details"],
[
["AIRWAY", "Secure & protect airway", "High-flow O₂; intubation if GCS ≤ 8 or respiratory failure"],
["BREATHING", "Adequate ventilation", "Monitor SpO₂, ABG; mechanical ventilation if needed"],
["CIRCULATION", "IV access & resuscitation", "2 large-bore IVs; IV fluid bolus (crystalloid)"],
["MONITORING", "Continuous haemodynamic monitoring",
"ECG, pulse oximetry, NIBP (arterial line if severe), CVP/PA catheter, urine catheter"],
["LABS", "Diagnostic workup",
"CBC, metabolic panel, lactate, ABG, blood cultures (sepsis), coagulation, crossmatch"],
["CAUSE", "Identify & treat cause",
"Bleeding control, antibiotics, revascularisation, drainage, pericardiocentesis"],
],
col_widths=[2.5*cm, 5*cm, 9.5*cm]
))
story += sp()
# 5.2 Fluids
story.append(Paragraph("5.2 Fluid Resuscitation", h2_style))
story += sp(0.5)
story.append(bullet(B("Crystalloids (FIRST-LINE)") + ": Normal saline (0.9% NaCl) or Lactated Ringer's "
"(Ringer's Lactate/Hartmann's). Give 30 mL/kg IV bolus initially in septic shock."))
story.append(bullet(B("Colloids") + ": Albumin (preferred in sepsis/cirrhosis); avoid starches (↑ AKI risk)."))
story.append(bullet(B("Blood products (haemorrhagic shock)")
+ ": Packed RBCs – target Hb 7–8 g/dL. 1:1:1 ratio of pRBC:FFP:platelets in massive haemorrhage."))
story.append(bullet(B("Permissive hypotension") + ": In trauma/haemorrhagic shock, target SBP 80–90 mmHg "
"until surgical haemostasis achieved (avoids 'dilution coagulopathy')."))
story.append(bullet(B("Hypertonic saline (HTS)") + ": Used in traumatic brain injury with haemorrhagic shock; "
"small volumes restore intravascular volume via osmotic mechanism."))
story += sp()
# 5.3 Vasopressors
story.append(Paragraph("5.3 Vasoactive Drugs", h2_style))
story += sp(0.5)
story.append(make_table(
["Drug", "Class/Mechanism", "Indications", "Dose & Notes"],
[
["Noradrenaline\n(Norepinephrine)", "α1 > β1 agonist → ↑ SVR + moderate ↑ CO",
"FIRST-LINE vasopressor for septic, distributive shock",
"0.01–3 µg/kg/min IV infusion; via central line"],
["Adrenaline\n(Epinephrine)", "α1, β1, β2 agonist → ↑ HR, ↑ CO, ↑ SVR",
"1st-line: Anaphylaxis (IM 0.5 mg 1:1000)\nAdd-on: Septic shock, cardiac arrest",
"Anaphylaxis: 0.5 mg IM stat; infusion: 0.01–1 µg/kg/min"],
["Dopamine", "DA > β1 > α1 (dose-dependent)",
"Cardiogenic shock (inotrope); avoid in septic shock",
"2–20 µg/kg/min; higher doses cause arrhythmias"],
["Dobutamine", "β1 > β2 agonist → ↑ CO",
"Cardiogenic shock (pure inotrope, ↓ SVR slightly)",
"2–20 µg/kg/min; may cause ↓ BP if volume-depleted"],
["Vasopressin", "V1 receptor → ↑ SVR; V2 → water retention",
"Add-on in refractory septic shock; norepinephrine-sparing",
"Fixed dose 0.04 units/min; no titration"],
["Phenylephrine", "Pure α1 agonist → ↑ SVR",
"Neurogenic shock; anaphylaxis (if arrhythmia with adrenaline)",
"0.5–5 µg/kg/min"],
["Milrinone", "PDE-III inhibitor → ↑ cAMP → inotrope + vasodilator",
"Cardiogenic shock (refractory); heart transplant bridge",
"0.25–0.75 µg/kg/min; avoid in hypotension"],
],
col_widths=[2.8*cm, 3.8*cm, 4.2*cm, 5.2*cm]
))
story += sp()
# 5.4 Specific treatments
story.append(Paragraph("5.4 Treatment by Shock Type", h2_style))
story += sp(0.5)
story.append(Paragraph(B("A. Hypovolemic / Haemorrhagic Shock"), h3_style))
story.append(bullet("Control haemorrhage: Direct pressure, tourniquet, surgery (damage control)"))
story.append(bullet("IV crystalloids (2 large-bore IVs) + blood products"))
story.append(bullet("Massive transfusion protocol (MTP): pRBC:FFP:Platelets = 1:1:1"))
story.append(bullet("Tranexamic acid (TXA): 1 g IV over 10 min within 3 hours of injury → ↓ mortality"))
story.append(bullet("Calcium (10 mL of 10% calcium gluconate IV) for massive transfusion (citrate toxicity)"))
story.append(bullet("Target: MAP > 65 mmHg (MAP 50–65 in penetrating trauma before haemostasis)"))
story += sp(0.5)
story.append(Paragraph(B("B. Cardiogenic Shock"), h3_style))
story.append(bullet("Treat underlying cause: PCI for STEMI (revascularisation within 90 min – Door-to-Balloon)"))
story.append(bullet("Inotropes: Dobutamine ± dopamine; milrinone in β-blocker overdose"))
story.append(bullet("Vasopressors: Norepinephrine if refractory hypotension"))
story.append(bullet("Mechanical circulatory support (MCS):"))
story.append(bullet("Intra-aortic balloon pump (IABP): ↓ afterload, ↑ diastolic BP/coronary perfusion", 1))
story.append(bullet("Impella device: Microaxial pump; direct LV unloading", 1))
story.append(bullet("VA-ECMO (extracorporeal membrane oxygenation): Severe refractory shock", 1))
story.append(bullet("Avoid fluids if PCWP already high (risk of worsening pulmonary oedema)"))
story.append(bullet("Diuretics (furosemide) for pulmonary oedema"))
story += sp(0.5)
story.append(Paragraph(B("C. Septic Shock – Surviving Sepsis Campaign 'Hour-1 Bundle'"), h3_style))
story.append(Paragraph(
B("★ All of the following should be completed within the FIRST HOUR:"),
warning_style))
story.append(bullet("1. Measure lactate level (re-measure if initial > 2 mmol/L)"))
story.append(bullet("2. Obtain blood cultures BEFORE antibiotics"))
story.append(bullet("3. Administer broad-spectrum antibiotics within 1 hour of recognition"))
story.append(bullet("4. IV crystalloids 30 mL/kg for hypotension OR lactate ≥ 4 mmol/L"))
story.append(bullet("5. Vasopressors (norepinephrine) if MAP < 65 mmHg despite fluid resuscitation"))
story += sp(0.5)
story.append(Paragraph(B("Additional measures in septic shock:"), h3_style))
story.append(bullet("Source control: Drainage of abscess, removal of infected catheter/device, debridement"))
story.append(bullet("Hydrocortisone 200 mg/day IV (continuous infusion) in refractory septic shock "
"(vasopressor-dependent despite adequate fluids)"))
story.append(bullet("Glycaemic control: Insulin to maintain glucose 7.8–10 mmol/L (140–180 mg/dL)"))
story.append(bullet("Lung-protective ventilation if ARDS: TV 6 mL/kg ideal body weight, PEEP titration"))
story.append(bullet("Renal replacement therapy (RRT) if AKI with fluid overload or severe acidosis"))
story += sp(0.5)
story.append(Paragraph(B("D. Anaphylactic Shock"), h3_style))
story.append(make_table(
["Step", "Intervention", "Details"],
[
["1st", "Remove/stop trigger", "Stop causative drug/food/allergen immediately"],
["2nd", B("Adrenaline (Epinephrine) IM – FIRST-LINE"),
"0.5 mg (500 µg) of 1:1000 solution IM into anterolateral thigh; "
"repeat every 5 min if no improvement"],
["3rd", "Position", "Supine with legs elevated (unless respiratory distress)"],
["4th", "Oxygen", "High-flow O₂ 15 L/min via non-rebreather mask"],
["5th", "IV fluids", "500–1000 mL crystalloid IV bolus"],
["6th", "Antihistamines", "Chlorphenamine 10 mg IV (H1 blocker); ranitidine 50 mg IV (H2)"],
["7th", "Corticosteroids", "Hydrocortisone 200 mg IV (prevents biphasic reaction)"],
["8th", "Bronchodilator", "Salbutamol nebulised for bronchospasm"],
["9th", "Adrenaline infusion", "0.05–0.5 µg/kg/min if refractory hypotension"],
],
col_widths=[1.2*cm, 5.3*cm, 10.5*cm]
))
story += sp()
story.append(Paragraph(B("E. Neurogenic Shock"), h3_style))
story.append(bullet("IV fluids (cautiously – avoid fluid overload in neurogenic oedema)"))
story.append(bullet("Vasopressors: Phenylephrine or norepinephrine (↑ SVR)"))
story.append(bullet("Atropine for bradycardia if symptomatic"))
story.append(bullet("Spinal cord management: Methylprednisolone (controversial)"))
story.append(bullet("Maintain MAP ≥ 85–90 mmHg in spinal cord injury to optimise cord perfusion"))
story += sp()
story.append(Paragraph(B("F. Obstructive Shock"), h3_style))
story.append(make_table(
["Cause", "Immediate Treatment"],
[
["Tension Pneumothorax",
"Immediate needle decompression (2nd ICS, MCL or 4th/5th ICS, AAL) → chest tube"],
["Cardiac Tamponade",
"Pericardiocentesis (emergency) → surgical drainage (subxiphoid window);\nFluid bolus as temporising measure"],
["Massive Pulmonary Embolism",
"Systemic thrombolysis (alteplase 100 mg IV over 2h) if haemodynamically unstable;\nSurgical embolectomy or catheter-directed therapy if thrombolysis CI"],
],
col_widths=[4.5*cm, 12.5*cm]
))
story += sp()
# ─── 6. ORGAN EFFECTS & MODS ──────────────────────────────────────────────────
story.append(Paragraph("6. ORGAN EFFECTS IN PROLONGED SHOCK (MODS)", h1_style))
story += sp(0.5)
story.append(make_table(
["Organ System", "Effect of Shock", "Consequences"],
[
["Kidney", "Ischaemic acute tubular necrosis (ATN)", "Oliguria → anuria → acute kidney injury (AKI); ↑ creatinine"],
["Lung", "Alveolar endothelial damage → protein-rich oedema", "ARDS (PaO₂/FiO₂ < 200); bilateral infiltrates on CXR"],
["Gut", "Mucosal ischaemia → bacterial translocation", "Stress ulcers (Curling's ulcers in burns); sepsis propagation"],
["Liver", "Zone 3 (centrilobular) ischaemia", "'Shock liver' – ↑ transaminases, ↑ PT, ↑ bilirubin"],
["Brain", "Hypoperfusion → neuronal injury", "Altered consciousness, coma, watershed infarcts"],
["Heart", "Subendocardial ischaemia", "Stress cardiomyopathy (Takotsubo), arrhythmias"],
["Coagulation", "Endothelial injury + hypoperfusion", "DIC: simultaneous microthrombosis + consumption coagulopathy → bleeding"],
["Adrenal", "Haemorrhagic necrosis (Waterhouse-Friderichsen in meningococcaemia)", "Adrenal insufficiency → refractory hypotension"],
],
col_widths=[3.5*cm, 6*cm, 7.5*cm]
))
story += sp()
# ─── 7. SEPTIC SHOCK – SURVIVING SEPSIS BUNDLES ───────────────────────────────
story.append(Paragraph("7. SEPSIS-3 CRITERIA & SEVERITY ASSESSMENT", h1_style))
story += sp(0.5)
story.append(Paragraph(B("Sepsis-3 Definitions (Singer et al., JAMA 2016):"), h3_style))
story.append(bullet(B("Sepsis") + ": Life-threatening organ dysfunction caused by dysregulated host response to infection"))
story.append(bullet(B("Organ dysfunction") + ": SOFA score ≥ 2 from baseline"))
story.append(bullet(B("Septic shock") + " = Sepsis + (vasopressors needed to maintain MAP ≥ 65 mmHg) + (serum lactate > 2 mmol/L despite adequate fluids)"))
story += sp(0.5)
story.append(Paragraph(B("qSOFA (quick SOFA) – bedside screening tool:"), h3_style))
story.append(Paragraph(
"Score 1 point each for: (1) Altered mental status (GCS < 15), "
"(2) RR ≥ 22 breaths/min, (3) SBP ≤ 100 mmHg. "
"Score ≥ 2 = high risk of sepsis-related organ dysfunction.",
body_style))
story += sp(0.5)
story.append(Paragraph(B("SOFA Score (Sequential Organ Failure Assessment):"), h3_style))
story.append(make_table(
["System", "Score 0", "Score 1", "Score 2", "Score 3", "Score 4"],
[
["PaO₂/FiO₂", "≥ 400", "300–399", "200–299", "100–199 (on vent)", "< 100 (on vent)"],
["Platelets (×10³)", "≥ 150", "100–149", "50–99", "20–49", "< 20"],
["Bilirubin (µmol/L)", "< 20", "20–32", "33–101", "102–204", "> 204"],
["Cardiovascular", "MAP ≥ 70", "MAP < 70", "Dopamine ≤ 5\nor Dobutamine",
"Dopamine 5–15\nor Epi/Norepi ≤ 0.1", "Dopamine > 15\nor Epi/Norepi > 0.1"],
["GCS", "15", "13–14", "10–12", "6–9", "< 6"],
["Creatinine (µmol/L)", "< 110", "110–170", "171–299", "300–440 or UO < 500", "> 440 or UO < 200"],
],
col_widths=[3.5*cm, 2.3*cm, 2.3*cm, 2.3*cm, 3.5*cm, 3.1*cm]
))
story += sp()
# ─── 8. MNEMONIC SUMMARY ─────────────────────────────────────────────────────
story.append(Paragraph("8. EXAM MNEMONICS & KEY POINTS", h1_style))
story += sp(0.5)
story.append(Paragraph(B("★ Immediate management of ANY shock – \"THE ABCS\""), h3_style))
story.append(make_table(
["Letter", "Action"],
[
["T – Two large-bore IVs", "Venous access (antecubital or IO if no IV access)"],
["H – High-flow O₂", "Non-rebreather mask or BVM; intubate if needed"],
["E – ECG & monitoring", "Cardiac monitor, pulse oximetry, BP, temp"],
["A – Assess & treat underlying cause", "Haemorrhage, infection, PE, tamponade"],
["B – Bolus IV fluids", "30 mL/kg crystalloid (adjust per type of shock)"],
["C – Consider vasopressors", "If MAP < 65 mmHg despite adequate fluids → norepinephrine"],
["S – Specific treatment", "Antibiotics (sepsis), PCI (cardiogenic), epinephrine (anaphylaxis)"],
],
col_widths=[5.5*cm, 11.5*cm]
))
story += sp()
story.append(Paragraph(B("★ Types of shock mnemonic – \"HCD + NOA\""), h3_style))
story.append(bullet(B("H") + " = Hypovolemic (haemorrhagic)"))
story.append(bullet(B("C") + " = Cardiogenic"))
story.append(bullet(B("D") + " = Distributive (Septic/Anaphylactic/Neurogenic)"))
story.append(bullet(B("N") + " = Neurogenic"))
story.append(bullet(B("O") + " = Obstructive"))
story.append(bullet(B("A") + " = Anaphylactic"))
story += sp()
story.append(Paragraph(B("★ Beck's Triad (Cardiac Tamponade):"), h3_style))
story.append(Paragraph("Hypotension + JVD + Muffled heart sounds", highlight_style))
story += sp(0.5)
story.append(Paragraph(B("★ Signs indicating progression from compensated → decompensated shock:"), h3_style))
story.append(bullet("BP begins to fall (compensatory mechanisms overwhelmed)"))
story.append(bullet("Lactate > 2 mmol/L (tissue hypoperfusion)"))
story.append(bullet("Urine output < 0.5 mL/kg/h"))
story.append(bullet("Worsening mental status / GCS decline"))
story.append(bullet("Metabolic acidosis on ABG (↓ pH, ↓ HCO₃⁻, base deficit > −4)"))
story += sp()
story.append(Paragraph(B("★ Vasopressor of choice:"), h3_style))
story.append(make_table(
["Shock Type", "First-Line Vasopressor"],
[
["Septic shock", "Norepinephrine"],
["Cardiogenic shock", "Norepinephrine + Dobutamine (inotrope)"],
["Anaphylactic shock", "Epinephrine (IM then IV infusion)"],
["Neurogenic shock", "Phenylephrine or Norepinephrine"],
["Hypovolemic shock", "Fluids first; vasopressors only if refractory"],
],
col_widths=[5*cm, 12*cm]
))
story += sp()
# ─── 9. SUMMARY BOX ──────────────────────────────────────────────────────────
story.append(Paragraph("9. RAPID REVIEW SUMMARY", h1_style))
story += sp(0.5)
story.append(Paragraph(
B("Shock") + " = inadequate tissue perfusion → cellular hypoxia → organ dysfunction → death if untreated.",
highlight_style))
story += sp(0.5)
bullet_summary = [
(B("Hypovolemic"),
"↓ volume → ↓ CO → compensatory ↑ HR, ↑ SVR. Tx: fluids + haemostasis. Class III/IV = blood"),
(B("Cardiogenic"),
"Pump failure → ↓ CO → ↑ SVR, ↑ PCWP. Tx: inotropes, PCI, MCS. JVD + pulmonary oedema"),
(B("Septic"),
"PAMPs → cytokine storm → NO-mediated vasodilation → ↓ SVR, ↑/↓ CO. Tx: Hour-1 bundle"),
(B("Neurogenic"),
"↓ sympathetic tone → bradycardia + ↓ SVR. Warm/dry skin. Tx: fluids + vasopressors"),
(B("Anaphylactic"),
"IgE → mast cell → histamine → vasodilation + bronchospasm. Tx: IM epinephrine STAT"),
(B("Obstructive"),
"Mechanical obstruction to flow. Tx: needle decompression / pericardiocentesis / thrombolysis"),
]
for bold_text, detail in bullet_summary:
story.append(Paragraph(f"\u2022 {bold_text}: {detail}", bullet_style))
story.append(Spacer(1, 0.15*cm))
story += sp()
story += hr()
story.append(Paragraph(
I("Sources: Robbins & Cotran Pathologic Basis of Disease (9780443264528) · Robbins & Kumar Basic Pathology (9780323790185) · "
"Sabiston Textbook of Surgery (9780443124341) · Goldman-Cecil Medicine (9780323930345) | "
"Compiled for examination use by Orris Medical AI, August 2026"),
footer_style))
# ─── Build ────────────────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF generated: {output_path}")
python /tmp/workspace/shock-notes/generate_shock_pdf.py 2>&1
ls -lh /tmp/workspace/shock-notes/
Shock Comprehensive Notes
PDF Document · PDF
| Type | Core Mechanism |
|---|---|
| Hypovolemic | ↓ Volume → ↓ preload → ↓ CO |
| Cardiogenic | Pump failure → ↓ CO despite normal volume |
| Septic (Distributive) | Cytokine storm → vasodilation → ↓ SVR |
| Neurogenic (Distributive) | ↓ Sympathetic tone → bradycardia + vasodilation |
| Anaphylactic (Distributive) | IgE → mast cell → histamine → vasodilation |
| Obstructive | Mechanical obstruction to flow |