Steps to cpr
CPR steps 2024 AHA guidelines adult
https://www.redcross.org/take-a-class/cpr/performing-cpr/cpr…
| Parameter | Value |
|---|---|
| Compression rate | 100-120 per minute |
| Compression depth (adults) | At least 2 inches (5 cm) |
| Compression-to-breath ratio | 30:2 |
| Check breathing for no more than | 10 seconds |
| Pause between compressions | Less than 10 seconds |
Create a CPR quick reference guide PDF I can print
mkdir -p /home/daytona/workspace/cpr-guide && ls /home/daytona/workspace/cpr-guide/
~/cpr-guide/generate_cpr_pdf.py
from reportlab.lib.pagesizes import letter
from reportlab.lib import colors
from reportlab.lib.units import inch
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable
)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT
from reportlab.platypus import KeepTogether
OUTPUT = "/home/daytona/workspace/cpr-guide/CPR_Quick_Reference.pdf"
# ── Colours ───────────────────────────────────────────────────────────────────
RED = colors.HexColor("#CC1F1A")
DARK_RED = colors.HexColor("#8B0000")
LIGHT_RED = colors.HexColor("#FDECEA")
DARK_GRAY = colors.HexColor("#2B2B2B")
MID_GRAY = colors.HexColor("#555555")
LIGHT_GRAY= colors.HexColor("#F4F4F4")
WHITE = colors.white
TEAL = colors.HexColor("#0B6E7C")
# ── Document ──────────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
OUTPUT,
pagesize=letter,
leftMargin=0.6*inch,
rightMargin=0.6*inch,
topMargin=0.5*inch,
bottomMargin=0.5*inch,
)
styles = getSampleStyleSheet()
# Custom styles
title_style = ParagraphStyle(
"Title", fontSize=26, fontName="Helvetica-Bold",
textColor=WHITE, alignment=TA_CENTER, spaceAfter=2
)
subtitle_style = ParagraphStyle(
"Subtitle", fontSize=11, fontName="Helvetica",
textColor=WHITE, alignment=TA_CENTER, spaceAfter=0
)
section_header = ParagraphStyle(
"SectionHeader", fontSize=12, fontName="Helvetica-Bold",
textColor=WHITE, alignment=TA_LEFT, leftIndent=6, spaceAfter=0
)
step_num_style = ParagraphStyle(
"StepNum", fontSize=18, fontName="Helvetica-Bold",
textColor=WHITE, alignment=TA_CENTER
)
step_title_style = ParagraphStyle(
"StepTitle", fontSize=12, fontName="Helvetica-Bold",
textColor=DARK_RED, spaceAfter=2
)
step_body_style = ParagraphStyle(
"StepBody", fontSize=9.5, fontName="Helvetica",
textColor=DARK_GRAY, leading=14, spaceAfter=0
)
note_style = ParagraphStyle(
"Note", fontSize=8.5, fontName="Helvetica-Oblique",
textColor=MID_GRAY, leading=12
)
key_num_style = ParagraphStyle(
"KeyNum", fontSize=22, fontName="Helvetica-Bold",
textColor=RED, alignment=TA_CENTER
)
key_label_style = ParagraphStyle(
"KeyLabel", fontSize=8, fontName="Helvetica",
textColor=MID_GRAY, alignment=TA_CENTER
)
footer_style = ParagraphStyle(
"Footer", fontSize=7.5, fontName="Helvetica",
textColor=MID_GRAY, alignment=TA_CENTER
)
story = []
# ── HEADER BANNER ─────────────────────────────────────────────────────────────
header_data = [[
Paragraph("❤ CPR QUICK REFERENCE GUIDE", title_style),
Paragraph("Adult Cardiopulmonary Resuscitation | AHA / Red Cross Guidelines 2025", subtitle_style),
]]
header_table = Table(header_data, colWidths=[7.3*inch])
header_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), RED),
("ROUNDEDCORNERS", [8]),
("TOPPADDING", (0,0), (-1,-1), 10),
("BOTTOMPADDING",(0,0),(-1,-1), 10),
("LEFTPADDING", (0,0), (-1,-1), 14),
("RIGHTPADDING",(0,0), (-1,-1), 14),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
story.append(header_table)
story.append(Spacer(1, 10))
# ── EMERGENCY CALLOUT ─────────────────────────────────────────────────────────
callout_data = [[
Paragraph("☎ CALL 911 FIRST (or direct a bystander to call) — then begin CPR", ParagraphStyle(
"Callout", fontSize=11, fontName="Helvetica-Bold",
textColor=DARK_RED, alignment=TA_CENTER
))
]]
callout_table = Table(callout_data, colWidths=[7.3*inch])
callout_table.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), LIGHT_RED),
("BOX", (0,0),(-1,-1), 1.5, RED),
("ROUNDEDCORNERS",[6]),
("TOPPADDING", (0,0),(-1,-1), 8),
("BOTTOMPADDING",(0,0),(-1,-1), 8),
]))
story.append(callout_table)
story.append(Spacer(1, 10))
# ── STEPS ─────────────────────────────────────────────────────────────────────
steps = [
("1", "CHECK THE SCENE",
"Ensure the environment is safe. Use gloves or PPE if available."),
("2", "CHECK FOR RESPONSIVENESS",
"Tap shoulders firmly. Shout 'Are you okay?' twice.\nIf no response and not breathing normally → proceed."),
("3", "CALL 911 & GET AN AED",
"Call 911 or send someone to call. Send a second person\nto retrieve an AED from the nearest location."),
("4", "POSITION THE PERSON",
"Place them on their back on a firm, flat surface.\nKneel beside their chest."),
("5", "30 CHEST COMPRESSIONS",
"• Heel of hand on center of chest (lower sternum)\n• Second hand on top, fingers interlaced\n• Arms straight, lean directly over hands\n• Compress ≥ 2 inches deep at 100–120/min\n• Allow full chest recoil between compressions"),
("6", "OPEN THE AIRWAY",
"Head-tilt / chin-lift:\n• One hand on forehead, tilt back gently\n• Two fingers under chin, lift upward"),
("7", "2 RESCUE BREATHS",
"• Pinch nose shut, seal mouth completely\n• Give 1 breath over 1 second — watch chest rise\n• If chest does not rise, retilt head and retry once"),
("8", "REPEAT 30:2 CYCLE",
"Continue sets of 30 compressions + 2 breaths.\nMinimize any pause to < 10 seconds."),
("9", "USE AED WHEN AVAILABLE",
"Power on AED → attach pads as shown → follow voice prompts.\nDeliver shock if advised, then immediately resume CPR."),
("10","KEEP GOING",
"Stop only when:\n• Person shows clear signs of life\n• Trained EMS takes over\n• You are physically unable to continue"),
]
# Build steps as a 2-column grid: 5 rows × 2 cols
def make_step_cell(num, title, body):
num_table = Table([[Paragraph(num, step_num_style)]], colWidths=[0.42*inch])
num_table.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), RED),
("ROUNDEDCORNERS",[20]),
("TOPPADDING", (0,0),(-1,-1), 5),
("BOTTOMPADDING",(0,0),(-1,-1), 5),
]))
text_block = [
Paragraph(title, step_title_style),
Paragraph(body.replace("\n", "<br/>"), step_body_style),
]
inner = Table(
[[num_table, [Paragraph(title, step_title_style),
Paragraph(body.replace("\n","<br/>"), step_body_style)]]],
colWidths=[0.48*inch, 3.0*inch]
)
inner.setStyle(TableStyle([
("VALIGN", (0,0),(-1,-1), "TOP"),
("LEFTPADDING", (0,0),(0,-1), 0),
("RIGHTPADDING",(0,0),(0,-1), 6),
("LEFTPADDING", (1,0),(1,-1), 4),
("TOPPADDING", (0,0),(-1,-1), 0),
("BOTTOMPADDING",(0,0),(-1,-1), 0),
]))
wrapper = Table([[inner]], colWidths=[3.6*inch])
wrapper.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), LIGHT_GRAY),
("BOX", (0,0),(-1,-1), 0.5, colors.HexColor("#DDDDDD")),
("ROUNDEDCORNERS",[6]),
("TOPPADDING", (0,0),(-1,-1), 8),
("BOTTOMPADDING",(0,0),(-1,-1), 8),
("LEFTPADDING", (0,0),(-1,-1), 8),
("RIGHTPADDING",(0,0),(-1,-1), 8),
]))
return wrapper
# Pair steps into rows of 2
step_rows = []
for i in range(0, len(steps), 2):
left = make_step_cell(*steps[i])
right = make_step_cell(*steps[i+1]) if i+1 < len(steps) else Spacer(1,1)
step_rows.append([left, right])
steps_table = Table(step_rows, colWidths=[3.65*inch, 3.65*inch], hAlign="CENTER")
steps_table.setStyle(TableStyle([
("VALIGN", (0,0),(-1,-1), "TOP"),
("LEFTPADDING", (0,0),(-1,-1), 0),
("RIGHTPADDING",(0,0),(-1,-1), 0),
("TOPPADDING", (0,0),(-1,-1), 0),
("BOTTOMPADDING",(0,0),(-1,-1), 6),
("COLPADDING", (0,0),(-1,-1), 6),
]))
story.append(steps_table)
story.append(Spacer(1, 10))
# ── KEY NUMBERS ───────────────────────────────────────────────────────────────
kn_header = Table(
[[Paragraph("KEY NUMBERS TO REMEMBER", section_header)]],
colWidths=[7.3*inch]
)
kn_header.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), TEAL),
("ROUNDEDCORNERS",[5]),
("TOPPADDING", (0,0),(-1,-1), 5),
("BOTTOMPADDING",(0,0),(-1,-1), 5),
]))
story.append(kn_header)
story.append(Spacer(1, 6))
key_items = [
("100–120", "compressions\nper minute"),
("≥ 2\"", "compression\ndepth"),
("30 : 2", "compressions\nto breaths"),
("< 10 sec","max pause\nbetween compressions"),
("1 sec", "per rescue\nbreath"),
]
kn_cells = []
for val, lbl in key_items:
kn_cells.append(
Table([
[Paragraph(val, key_num_style)],
[Paragraph(lbl.replace("\n","<br/>"), key_label_style)],
], colWidths=[1.36*inch])
)
kn_table = Table([kn_cells], colWidths=[1.46*inch]*5)
kn_table.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), WHITE),
("BOX", (0,0),(-1,-1), 0.5, colors.HexColor("#CCCCCC")),
("INNERGRID", (0,0),(-1,-1), 0.5, colors.HexColor("#EEEEEE")),
("VALIGN", (0,0),(-1,-1), "MIDDLE"),
("TOPPADDING", (0,0),(-1,-1), 6),
("BOTTOMPADDING",(0,0),(-1,-1), 6),
]))
story.append(kn_table)
story.append(Spacer(1, 8))
# ── HANDS-ONLY NOTE ───────────────────────────────────────────────────────────
ho_data = [[
Paragraph(
"<b>HANDS-ONLY CPR:</b> If you are untrained or uncomfortable giving rescue breaths, "
"continuous chest compressions alone (100–120/min) are still effective for adult bystander CPR. "
"Any CPR is better than no CPR.",
note_style
)
]]
ho_table = Table(ho_data, colWidths=[7.3*inch])
ho_table.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), colors.HexColor("#EEF7F8")),
("BOX", (0,0),(-1,-1), 1, TEAL),
("ROUNDEDCORNERS",[5]),
("TOPPADDING", (0,0),(-1,-1), 7),
("BOTTOMPADDING",(0,0),(-1,-1), 7),
("LEFTPADDING", (0,0),(-1,-1), 10),
("RIGHTPADDING",(0,0),(-1,-1), 10),
]))
story.append(ho_table)
story.append(Spacer(1, 6))
# ── FOOTER ────────────────────────────────────────────────────────────────────
story.append(HRFlowable(width="100%", thickness=0.5, color=colors.HexColor("#CCCCCC")))
story.append(Spacer(1, 4))
story.append(Paragraph(
"Based on 2025 AHA Guidelines for CPR & ECC and American Red Cross CPR Guidelines | "
"This card is a quick reference only — formal CPR training is strongly recommended | "
"Call 911 in all emergencies",
footer_style
))
# ── BUILD ─────────────────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF created: {OUTPUT}")
cd /home/daytona/workspace/cpr-guide && python generate_cpr_pdf.py 2>&1
CPR Quick Reference
PDF Document · PDF
Shock
types of shock pathophysiology classification clinical features management
"Shock is defined as a state of systemic tissue hypoperfusion resulting from reduced cardiac output and/or reduced effective circulating blood volume."
- Robbins, Cotran & Kumar Pathologic Basis of Disease, p. 134
| Type | Core Mechanism | Common Causes |
|---|---|---|
| Hypovolemic | Low blood/fluid volume | Hemorrhage, burns, vomiting, diarrhea, trauma |
| Cardiogenic | Pump failure | MI (>40% myocardium lost), arrhythmia, tamponade, PE |
| Distributive | Vasodilation / maldistribution | Sepsis, anaphylaxis, neurogenic (spinal injury) |
| Obstructive | Mechanical outflow block | Pulmonary embolism, tension pneumothorax, cardiac tamponade |
Important: Shock can occur with normal blood pressure, especially early or in distributive states. The base deficit and lactate are more reliable early markers than BP alone. - Rosen's Emergency Medicine
| Marker | Significance |
|---|---|
| Serum lactate >4 mmol/L | Tissue hypoperfusion; predicts organ failure |
| Base deficit < -4 mEq/L | Equivalent to lactate; indicates ongoing acidosis |
| Rising lactate + worsening base deficit | Persistent or worsening shock despite resuscitation |
| Urine output <0.5 mL/kg/h | Severe renal hypoperfusion |
| Type | Primary Intervention |
|---|---|
| Hemorrhagic | Blood products (pRBC + FFP + platelets in 1:1:1), control bleeding |
| Septic | Early antibiotics + IV fluids + norepinephrine; target MAP ≥65 mmHg |
| Cardiogenic | Inotropes, revascularization (PCI for STEMI), mechanical support if refractory |
| Neurogenic | IV fluids, vasopressors (phenylephrine/norepinephrine), spinal stabilization |
| Anaphylactic | Epinephrine IM (first-line), IV fluids, antihistamines, steroids |
| Obstructive (PE) | Anticoagulation, thrombolytics, embolectomy; needle decompression for tension pneumo |
Notes with comparison chart
~/cpr-guide/generate_shock_notes.py
from reportlab.lib.pagesizes import letter
from reportlab.lib import colors
from reportlab.lib.units import inch
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, KeepTogether, PageBreak
)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_RIGHT
OUTPUT = "/home/daytona/workspace/cpr-guide/Shock_Notes_USMLE.pdf"
# ── Colour palette ────────────────────────────────────────────────────────────
NAVY = colors.HexColor("#0D2137")
BLUE = colors.HexColor("#1565C0")
LIGHT_BLUE= colors.HexColor("#E3F2FD")
MED_BLUE = colors.HexColor("#BBDEFB")
TEAL = colors.HexColor("#00695C")
LIGHT_TEAL= colors.HexColor("#E0F2F1")
RED = colors.HexColor("#C62828")
LIGHT_RED = colors.HexColor("#FFEBEE")
ORANGE = colors.HexColor("#E65100")
LIGHT_ORANGE = colors.HexColor("#FFF3E0")
PURPLE = colors.HexColor("#6A1B9A")
LIGHT_PURPLE = colors.HexColor("#F3E5F5")
DARK_GRAY = colors.HexColor("#212121")
MID_GRAY = colors.HexColor("#616161")
LIGHT_GRAY= colors.HexColor("#F5F5F5")
BORDER = colors.HexColor("#CFD8DC")
WHITE = colors.white
GOLD = colors.HexColor("#F9A825")
LIGHT_GOLD= colors.HexColor("#FFFDE7")
# ── Doc setup ─────────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
OUTPUT, pagesize=letter,
leftMargin=0.55*inch, rightMargin=0.55*inch,
topMargin=0.45*inch, bottomMargin=0.45*inch,
)
# ── Styles ────────────────────────────────────────────────────────────────────
def mks(name, **kw):
base = dict(fontName="Helvetica", fontSize=9, textColor=DARK_GRAY, leading=13, spaceAfter=0, spaceBefore=0)
base.update(kw)
return ParagraphStyle(name, **base)
doc_title = mks("DocTitle", fontSize=22, fontName="Helvetica-Bold", textColor=WHITE, alignment=TA_CENTER, leading=26)
doc_sub = mks("DocSub", fontSize=10, fontName="Helvetica", textColor=WHITE, alignment=TA_CENTER)
sec_hdr = mks("SecHdr", fontSize=11, fontName="Helvetica-Bold", textColor=WHITE, alignment=TA_LEFT)
sub_hdr = mks("SubHdr", fontSize=10, fontName="Helvetica-Bold", textColor=NAVY, spaceAfter=2)
body = mks("Body", fontSize=8.5, leading=13)
body_bold = mks("BodyBold", fontSize=8.5, fontName="Helvetica-Bold", leading=13)
bullet_style= mks("Bullet", fontSize=8.5, leading=13, leftIndent=10)
small = mks("Small", fontSize=7.5, textColor=MID_GRAY, leading=11)
tbl_hdr = mks("TblHdr", fontSize=8, fontName="Helvetica-Bold", textColor=WHITE, alignment=TA_CENTER, leading=11)
tbl_cell = mks("TblCell", fontSize=8, leading=11, alignment=TA_CENTER)
tbl_cell_l = mks("TblCellL", fontSize=8, leading=11, alignment=TA_LEFT)
tbl_label = mks("TblLabel", fontSize=8, fontName="Helvetica-Bold", leading=11, alignment=TA_LEFT)
footer_s = mks("Footer", fontSize=7, textColor=MID_GRAY, alignment=TA_CENTER)
key_box = mks("KeyBox", fontSize=8.5, fontName="Helvetica-Bold", textColor=RED, alignment=TA_CENTER)
note_s = mks("Note", fontSize=8, fontName="Helvetica-Oblique", textColor=MID_GRAY, leading=11)
story = []
# ══════════════════════════════════════════════════════════════════════════════
# PAGE HEADER
# ══════════════════════════════════════════════════════════════════════════════
hdr = Table([[
Paragraph("SHOCK", doc_title),
Paragraph("Medical Student / USMLE Notes | Pathophysiology · Classification · Hemodynamics · Management", doc_sub),
]], colWidths=[doc.width])
hdr.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), NAVY),
("TOPPADDING", (0,0),(-1,-1), 10),
("BOTTOMPADDING",(0,0),(-1,-1), 10),
("LEFTPADDING", (0,0),(-1,-1), 14),
]))
story.append(hdr)
story.append(Spacer(1,8))
# helper: coloured section bar
def sec_bar(text, colour=BLUE):
t = Table([[Paragraph(text, sec_hdr)]], colWidths=[doc.width])
t.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), colour),
("TOPPADDING", (0,0),(-1,-1), 4),
("BOTTOMPADDING",(0,0),(-1,-1), 4),
("LEFTPADDING", (0,0),(-1,-1), 8),
]))
return t
def colored_box(content_rows, bg=LIGHT_BLUE, border=BLUE):
t = Table(content_rows, colWidths=[doc.width])
t.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), bg),
("BOX", (0,0),(-1,-1), 0.8, border),
("TOPPADDING", (0,0),(-1,-1), 5),
("BOTTOMPADDING",(0,0),(-1,-1), 5),
("LEFTPADDING", (0,0),(-1,-1), 8),
("RIGHTPADDING", (0,0),(-1,-1), 8),
]))
return t
# ══════════════════════════════════════════════════════════════════════════════
# 1. DEFINITION
# ══════════════════════════════════════════════════════════════════════════════
story.append(sec_bar("1. DEFINITION"))
story.append(Spacer(1,5))
def_box = colored_box([[
Paragraph(
"<b>Shock</b> = a state of <b>acute circulatory failure</b> causing <b>tissue hypoperfusion</b> "
"and cellular hypoxia. Oxygen delivery to tissues is insufficient to meet metabolic demands, "
"resulting in anaerobic metabolism, lactic acidosis, and — if uncorrected — irreversible organ failure and death.",
body)
]], LIGHT_BLUE, BLUE)
story.append(def_box)
story.append(Spacer(1,4))
# Key formula
formula_data = [
[Paragraph("Oxygen Delivery (DO<sub rise='2'>2</sub>)", tbl_hdr),
Paragraph("= Cardiac Output (CO) × Arterial O<sub rise='2'>2</sub> Content (CaO<sub rise='2'>2</sub>)", tbl_cell)],
[Paragraph("CO = HR × Stroke Volume", tbl_hdr),
Paragraph("CaO<sub rise='2'>2</sub> = (Hb × 1.34 × SaO<sub rise='2'>2</sub>) + (0.003 × PaO<sub rise='2'>2</sub>)", tbl_cell)],
]
formula_t = Table(formula_data, colWidths=[2.5*inch, 5.0*inch])
formula_t.setStyle(TableStyle([
("BACKGROUND", (0,0),(0,-1), NAVY),
("BACKGROUND", (1,0),(1,-1), LIGHT_BLUE),
("TEXTCOLOR", (0,0),(0,-1), WHITE),
("GRID", (0,0),(-1,-1), 0.5, BORDER),
("TOPPADDING", (0,0),(-1,-1), 4),
("BOTTOMPADDING",(0,0),(-1,-1), 4),
("LEFTPADDING", (0,0),(-1,-1), 6),
]))
story.append(formula_t)
story.append(Spacer(1,8))
# ══════════════════════════════════════════════════════════════════════════════
# 2. CLASSIFICATION
# ══════════════════════════════════════════════════════════════════════════════
story.append(sec_bar("2. CLASSIFICATION OF SHOCK"))
story.append(Spacer(1,5))
class_colours = [BLUE, RED, TEAL, PURPLE]
class_data_raw = [
("HYPOVOLEMIC", BLUE, LIGHT_BLUE,
"Low intravascular volume → ↓ preload → ↓ CO",
"Hemorrhage, severe burns, vomiting/diarrhea, third-spacing, dehydration",
"Tachycardia, ↓BP, cool/clammy skin, flat neck veins, oliguria",
"IV fluids; blood products (pRBC:FFP:plt 1:1:1) for hemorrhage; control bleeding"),
("CARDIOGENIC", RED, LIGHT_RED,
"Pump failure → ↓ CO despite normal/high volume",
"MI (>40% LV loss), arrhythmia, myocarditis, valvular failure, cardiac tamponade",
"Tachycardia, ↓BP, pulmonary edema (crackles), JVD, cool/clammy skin, S3",
"Inotropes (dobutamine), vasopressors (NE); PCI for STEMI; IABP/MCS if refractory"),
("DISTRIBUTIVE", TEAL, LIGHT_TEAL,
"Pathological vasodilation → ↓ SVR → relative hypovolemia; includes septic, anaphylactic, neurogenic",
"Sepsis/bacteremia, anaphylaxis (IgE), spinal cord injury, adrenal crisis",
"Septic: fever, warm/flushed skin early; Anaphylactic: urticaria, bronchospasm; Neurogenic: bradycardia + hypotension",
"Septic: NE + broad antibiotics + fluids; Anaphylactic: IM epinephrine (FIRST LINE); Neurogenic: NE/phenylephrine"),
("OBSTRUCTIVE", PURPLE, LIGHT_PURPLE,
"Mechanical block of cardiac output",
"Massive PE, tension pneumothorax, cardiac tamponade, aortic dissection",
"Tension PTX: absent breath sounds, tracheal deviation, JVD; Tamponade: Beck's triad; PE: pleuritic chest pain, hypoxia",
"Tension PTX: needle decompression → chest tube; Tamponade: pericardiocentesis; Massive PE: anticoag ± thrombolytics"),
]
for name, col, light, mech, causes, sx, tx in class_data_raw:
row1 = Table([[Paragraph(name, mks("TN", fontSize=10, fontName="Helvetica-Bold", textColor=WHITE, alignment=TA_LEFT))]], colWidths=[doc.width])
row1.setStyle(TableStyle([("BACKGROUND",(0,0),(-1,-1),col),("TOPPADDING",(0,0),(-1,-1),3),("BOTTOMPADDING",(0,0),(-1,-1),3),("LEFTPADDING",(0,0),(-1,-1),8)]))
inner = [
[Paragraph("<b>Mechanism:</b>", body_bold), Paragraph(mech, body)],
[Paragraph("<b>Causes:</b>", body_bold), Paragraph(causes, body)],
[Paragraph("<b>Signs/Sx:</b>", body_bold), Paragraph(sx, body)],
[Paragraph("<b>Treatment:</b>", body_bold), Paragraph(tx, body)],
]
inner_t = Table(inner, colWidths=[1.1*inch, doc.width-1.1*inch])
inner_t.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), light),
("TOPPADDING", (0,0),(-1,-1), 3),
("BOTTOMPADDING",(0,0),(-1,-1), 3),
("LEFTPADDING", (0,0),(-0,-1), 8),
("LEFTPADDING", (1,0),(1,-1), 4),
("VALIGN", (0,0),(-1,-1), "TOP"),
]))
story.append(KeepTogether([row1, inner_t]))
story.append(Spacer(1, 5))
story.append(Spacer(1,4))
# ══════════════════════════════════════════════════════════════════════════════
# 3. HEMODYNAMIC COMPARISON CHART
# ══════════════════════════════════════════════════════════════════════════════
story.append(sec_bar("3. HEMODYNAMIC COMPARISON CHART ★ HIGH-YIELD", ORANGE))
story.append(Spacer(1,5))
hdrs = ["Parameter", "Hypovolemic", "Cardiogenic", "Distributive\n(Septic)", "Obstructive\n(Tamponade/PE)"]
hdr_cols = [NAVY, BLUE, RED, TEAL, PURPLE]
rows = [
["CO / CI", "↓↓", "↓↓↓", "↑↑ (early)\n↓ (late)", "↓↓"],
["SVR", "↑↑", "↑↑", "↓↓", "↑↑"],
["CVP / PCWP", "↓↓", "↑↑", "↓ or normal", "↑ (PCWP)\n↑ (CVP)"],
["HR", "↑", "↑", "↑↑", "↑"],
["BP (Systolic)", "↓", "↓", "↓", "↓"],
["Pulse pressure","Narrow", "Narrow", "Wide (early)", "Narrow (pulsus paradoxus)"],
["SvO₂", "↓", "↓", "↑ (early)\n↓ (late)", "↓"],
["Skin", "Cool/pale","Cool/clammy","Warm/flushed\n(early)", "Cool/pale"],
["JVD", "Absent", "Present","Absent", "Present"],
["Lung sounds", "Clear", "Crackles","Clear", "Clear (tamponade)\nAbsent (PTX)"],
["Urine output", "↓", "↓", "↓", "↓"],
["Lactate", "↑", "↑", "↑", "↑"],
["1st-line Rx", "IV fluids\n+ blood products","Dobutamine\n+ NE + PCI","NE + antibiotics\n+ fluids","Decompress /\npericardiocentesis"],
]
col_w = [1.55*inch, 1.4*inch, 1.4*inch, 1.4*inch, 1.65*inch]
# Header row
hdr_row = [Paragraph(h.replace("\n","<br/>"), tbl_hdr) for h in hdrs]
all_rows = [hdr_row]
# Alternating shading
alt = [colors.HexColor("#EEF2FF"), WHITE]
for i, r in enumerate(rows):
bg = alt[i % 2]
all_rows.append([
Paragraph("<b>" + r[0] + "</b>", tbl_label),
*[Paragraph(c.replace("\n","<br/>"), tbl_cell) for c in r[1:]]
])
hd_table = Table(all_rows, colWidths=col_w)
ts = TableStyle([
("GRID", (0,0),(-1,-1), 0.4, BORDER),
("TOPPADDING", (0,0),(-1,-1), 4),
("BOTTOMPADDING", (0,0),(-1,-1), 4),
("LEFTPADDING", (0,0),(-1,-1), 4),
("RIGHTPADDING", (0,0),(-1,-1), 4),
("VALIGN", (0,0),(-1,-1), "MIDDLE"),
# header row backgrounds by type
("BACKGROUND", (0,0),(0,0), NAVY),
("BACKGROUND", (1,0),(1,0), BLUE),
("BACKGROUND", (2,0),(2,0), RED),
("BACKGROUND", (3,0),(3,0), TEAL),
("BACKGROUND", (4,0),(4,0), PURPLE),
# param col
("BACKGROUND", (0,1),(0,-1), colors.HexColor("#ECEFF1")),
])
# alternating row fill
for i in range(len(rows)):
bg = colors.HexColor("#EEF2FF") if i % 2 == 0 else WHITE
ts.add("BACKGROUND", (1, i+1), (-1, i+1), bg)
hd_table.setStyle(ts)
story.append(hd_table)
story.append(Spacer(1, 6))
# ══════════════════════════════════════════════════════════════════════════════
# 4. THREE STAGES OF SHOCK
# ══════════════════════════════════════════════════════════════════════════════
story.append(sec_bar("4. THREE STAGES OF SHOCK", colors.HexColor("#37474F")))
story.append(Spacer(1, 5))
stage_data = [
["Stage 1\nCOMPENSATED\n(Nonprogressive)", colors.HexColor("#1565C0"), LIGHT_BLUE,
"Baroreceptors activate → catecholamines, ADH, RAAS\n"
"• Tachycardia, ↑ SVR, renal fluid conservation\n"
"• Blood shunted from skin/gut → heart and brain\n"
"• No overt organ dysfunction; lactate mildly ↑\n"
"• Skin: cool and pale (warm/flushed in early sepsis)"],
["Stage 2\nDECOMPENSATED\n(Progressive)", colors.HexColor("#BF360C"), LIGHT_RED,
"Compensatory mechanisms overwhelmed\n"
"• Anaerobic glycolysis → lactic acidosis → pH ↓\n"
"• Arterioles dilate → blood pools in microcirculation\n"
"• DIC may develop from endothelial injury\n"
"• Vital organs (kidney, heart, bowel) begin to fail"],
["Stage 3\nIRREVERSIBLE", colors.HexColor("#4A148C"), LIGHT_PURPLE,
"Lysosomal enzyme leakage amplifies cell destruction\n"
"• ↑ Nitric oxide → worsening myocardial contractility\n"
"• Ischemic gut → bacterial translocation → bacteremia\n"
"• Multisystem organ failure (MSOF)\n"
"• Death even if hemodynamics are corrected"],
]
stage_cells = []
for label, col, light, details in stage_data:
label_t = Table([[Paragraph(label.replace("\n","<br/>"), mks("SL", fontSize=8.5, fontName="Helvetica-Bold", textColor=WHITE, alignment=TA_CENTER))]],
colWidths=[1.4*inch])
label_t.setStyle(TableStyle([("BACKGROUND",(0,0),(-1,-1),col),("TOPPADDING",(0,0),(-1,-1),6),("BOTTOMPADDING",(0,0),(-1,-1),6)]))
detail_t = Table([[Paragraph(details.replace("\n","<br/>"), mks("SD", fontSize=8, leading=12))]],
colWidths=[doc.width/3 - 1.5*inch])
detail_t.setStyle(TableStyle([("BACKGROUND",(0,0),(-1,-1),light),("TOPPADDING",(0,0),(-1,-1),5),("BOTTOMPADDING",(0,0),(-1,-1),5),("LEFTPADDING",(0,0),(-1,-1),6)]))
cell = Table([[label_t],[detail_t]], colWidths=[doc.width/3])
cell.setStyle(TableStyle([("TOPPADDING",(0,0),(-1,-1),0),("BOTTOMPADDING",(0,0),(-1,-1),0),("LEFTPADDING",(0,0),(-1,-1),0),("RIGHTPADDING",(0,0),(-1,-1),0)]))
stage_cells.append(cell)
stage_row = Table([stage_cells], colWidths=[doc.width/3]*3)
stage_row.setStyle(TableStyle([("TOPPADDING",(0,0),(-1,-1),0),("BOTTOMPADDING",(0,0),(-1,-1),0),("LEFTPADDING",(0,0),(-1,-1),2),("RIGHTPADDING",(0,0),(-1,-1),2)]))
story.append(stage_row)
story.append(Spacer(1,8))
# ══════════════════════════════════════════════════════════════════════════════
# 5. DIAGNOSIS & LAB MARKERS
# ══════════════════════════════════════════════════════════════════════════════
story.append(sec_bar("5. DIAGNOSIS — CLINICAL CRITERIA & LAB MARKERS", colors.HexColor("#37474F")))
story.append(Spacer(1,5))
diag_left = [
[Paragraph("<b>Empirical Criteria for Shock (any majority):</b>", body_bold)],
[Paragraph("• Ill appearance / altered mental status", bullet_style)],
[Paragraph("• HR > 100 bpm", bullet_style)],
[Paragraph("• RR > 20 /min or PaCO₂ < 32 mmHg", bullet_style)],
[Paragraph("• Base deficit < −4 mEq/L or Lactate > 4 mmol/L", bullet_style)],
[Paragraph("• Urine output < 0.5 mL/kg/h", bullet_style)],
[Paragraph("• SBP < 90 mmHg or MAP < 65 mmHg sustained > 30 min", bullet_style)],
[Paragraph("<i>Note: Shock can occur with NORMAL BP (especially early / distributive)</i>", note_s)],
]
diag_right = [
[Paragraph("<b>Key Lab Markers:</b>", body_bold)],
[Paragraph("• <b>Lactate > 4 mmol/L</b> → tissue hypoperfusion; predicts organ failure", bullet_style)],
[Paragraph("• <b>Base deficit < −4 mEq/L</b> → equivalent to lactate elevation", bullet_style)],
[Paragraph("• <b>Rising lactate + worsening base deficit</b> → refractory shock", bullet_style)],
[Paragraph("• <b>Creatinine / BUN ↑</b> → acute kidney injury", bullet_style)],
[Paragraph("• <b>Troponin ↑</b> → myocardial injury (cardiogenic or demand ischemia)", bullet_style)],
[Paragraph("• <b>Procalcitonin, CRP ↑</b> → sepsis markers", bullet_style)],
[Paragraph("• <b>Coags (PT/INR/fibrinogen/D-dimer)</b> → DIC screen", bullet_style)],
]
left_t = Table(diag_left, colWidths=[(doc.width/2)-4])
left_t.setStyle(TableStyle([("BACKGROUND",(0,0),(-1,-1),LIGHT_BLUE),("BOX",(0,0),(-1,-1),0.5,BLUE),("TOPPADDING",(0,0),(-1,-1),3),("BOTTOMPADDING",(0,0),(-1,-1),3),("LEFTPADDING",(0,0),(-1,-1),6)]))
right_t = Table(diag_right, colWidths=[(doc.width/2)-4])
right_t.setStyle(TableStyle([("BACKGROUND",(0,0),(-1,-1),LIGHT_TEAL),("BOX",(0,0),(-1,-1),0.5,TEAL),("TOPPADDING",(0,0),(-1,-1),3),("BOTTOMPADDING",(0,0),(-1,-1),3),("LEFTPADDING",(0,0),(-1,-1),6)]))
diag_row = Table([[left_t, right_t]], colWidths=[doc.width/2, doc.width/2])
diag_row.setStyle(TableStyle([("LEFTPADDING",(0,0),(-1,-1),0),("RIGHTPADDING",(0,0),(-1,-1),0),("TOPPADDING",(0,0),(-1,-1),0),("BOTTOMPADDING",(0,0),(-1,-1),0),("COLPADDING",(0,0),(-1,-1),4)]))
story.append(diag_row)
story.append(Spacer(1,8))
# ══════════════════════════════════════════════════════════════════════════════
# 6. SEPTIC SHOCK — PATHOGENESIS
# ══════════════════════════════════════════════════════════════════════════════
story.append(sec_bar("6. SEPTIC SHOCK — PATHOGENESIS (HIGH DETAIL)", RED))
story.append(Spacer(1,5))
sepsis_steps = [
("Microbial Trigger", "Endotoxin (LPS), exotoxins, fungal antigens activate TLRs on macrophages/dendritic cells via PAMPs & DAMPs"),
("NF-κB Activation", "TLR signaling → NF-κB nuclear translocation → transcription of TNF, IL-1, IL-6, IL-12, IL-18, IFN-γ, HMGB1"),
("Complement Activation", "Microbial components directly activate complement → C3a/C5a (anaphylatoxins) → further inflammation, vasodilation"),
("Endothelial Injury", "Cytokines ↑ adhesion molecules; coagulation activated via factor XII → widespread microvascular thrombosis, DIC"),
("Vasodilation / ↓ SVR", "NO (nitric oxide) massively ↑ → profound vasodilation → distributive shock; relative hypovolemia"),
("Counter-regulation", "Counter-regulatory immunosuppression: lymphocyte apoptosis, Th1→Th2 shift, IL-10 ↑ → oscillation between hyperinflammation and immunosuppression"),
("Organ Failure", "ARDS (lung), AKI, hepatic dysfunction, DIC, encephalopathy — SOFA score used to quantify organ failure"),
]
sep_rows = [[Paragraph(f"<b>{a}</b>", mks("SA", fontSize=8, fontName="Helvetica-Bold", textColor=DARK_GRAY)),
Paragraph(b, mks("SB", fontSize=8, leading=12))] for a, b in sepsis_steps]
sep_t = Table(sep_rows, colWidths=[1.6*inch, doc.width-1.6*inch])
sep_t.setStyle(TableStyle([
("GRID", (0,0),(-1,-1), 0.4, BORDER),
("BACKGROUND", (0,0),(0,-1), colors.HexColor("#FFCDD2")),
("BACKGROUND", (1,0),(1,-1), LIGHT_RED),
("TOPPADDING", (0,0),(-1,-1), 4),
("BOTTOMPADDING", (0,0),(-1,-1), 4),
("LEFTPADDING", (0,0),(-1,-1), 6),
("VALIGN", (0,0),(-1,-1), "TOP"),
]))
story.append(sep_t)
story.append(Spacer(1, 4))
# Sepsis definitions box
sep_def = Table([[Paragraph(
"<b>Definitions (Sepsis-3):</b> "
"<b>Sepsis</b> = life-threatening organ dysfunction (SOFA score ↑≥2) from dysregulated host response to infection. "
"<b>Septic Shock</b> = Sepsis + vasopressor requirement to maintain MAP ≥65 + lactate >2 mmol/L despite adequate fluids. "
"Mortality ~40%.",
mks("SepDef", fontSize=8.5, leading=12))
]], colWidths=[doc.width])
sep_def.setStyle(TableStyle([("BACKGROUND",(0,0),(-1,-1),colors.HexColor("#FFEBEE")),("BOX",(0,0),(-1,-1),1,RED),("TOPPADDING",(0,0),(-1,-1),5),("BOTTOMPADDING",(0,0),(-1,-1),5),("LEFTPADDING",(0,0),(-1,-1),8)]))
story.append(sep_def)
story.append(Spacer(1,8))
# ══════════════════════════════════════════════════════════════════════════════
# 7. VASOPRESSOR / VASOACTIVE DRUG TABLE
# ══════════════════════════════════════════════════════════════════════════════
story.append(sec_bar("7. VASOACTIVE DRUGS IN SHOCK", ORANGE))
story.append(Spacer(1,5))
vaso_hdrs = ["Drug", "Dose", "Receptors", "Main Effect", "Use in Shock"]
vaso_rows = [
["Norepinephrine\n(1st line — septic)", "3–30 µg/min", "α1 > β1", "↑SVR + modest ↑CO", "Septic, distributive;\npreferred over dopamine"],
["Epinephrine", "5–20 µg/min", "α + β1 + β2", "↑CO + ↑SVR\n(also bronchodilation)", "Anaphylaxis (IM first!\nthen IV infusion); refractory septic"],
["Vasopressin", "0.01–0.04 U/min", "V1 receptors", "↑SVR; no ↑HR;\nno ↑pulm. vasc. resistance", "Adjunct to NE in septic;\nuseful with pulm. HTN or RV failure"],
["Dobutamine", "2–15 µg/kg/min", "β1 > β2", "↑CO (inotrope);\n↓SVR slightly", "Cardiogenic shock;\nlow CO states"],
["Dopamine\n(not preferred)", "varies", "DA > β > α\n(dose-dependent)", "Low: renal vasodilation\nHigh: ↑SVR", "No longer recommended;\n↑arrhythmias vs NE"],
["Phenylephrine", "2–300 µg/min", "Pure α1", "↑SVR; reflex ↓HR", "Neurogenic shock;\ncontraindicated if low CO"],
]
vaso_cols = [1.5*inch, 1.05*inch, 1.1*inch, 1.6*inch, 2.15*inch]
v_hdr_row = [Paragraph(h, tbl_hdr) for h in vaso_hdrs]
v_all = [v_hdr_row]
for i, r in enumerate(vaso_rows):
bg = colors.HexColor("#FFF8E1") if i % 2 == 0 else WHITE
v_all.append([Paragraph(c.replace("\n","<br/>"), tbl_cell_l if j==0 else tbl_cell) for j,c in enumerate(r)])
v_table = Table(v_all, colWidths=vaso_cols)
v_ts = TableStyle([
("GRID", (0,0),(-1,-1), 0.4, BORDER),
("BACKGROUND", (0,0),(-1,0), ORANGE),
("TOPPADDING", (0,0),(-1,-1), 4),
("BOTTOMPADDING", (0,0),(-1,-1), 4),
("LEFTPADDING", (0,0),(-1,-1), 4),
("RIGHTPADDING", (0,0),(-1,-1), 4),
("VALIGN", (0,0),(-1,-1), "TOP"),
])
for i in range(len(vaso_rows)):
bg = colors.HexColor("#FFF8E1") if i % 2 == 0 else WHITE
v_ts.add("BACKGROUND", (0,i+1),(-1,i+1), bg)
v_table.setStyle(v_ts)
story.append(v_table)
story.append(Spacer(1,8))
# ══════════════════════════════════════════════════════════════════════════════
# 8. ORGAN PATHOLOGY IN SHOCK
# ══════════════════════════════════════════════════════════════════════════════
story.append(sec_bar("8. ORGAN PATHOLOGY IN SHOCK", colors.HexColor("#37474F")))
story.append(Spacer(1,5))
organs = [
("Kidney", "Acute Tubular Necrosis (ATN)", "Most common cause of AKI; ischemic injury to proximal tubule and loop of Henle; granular 'muddy brown' casts on UA"),
("Lung", "ARDS / 'Shock Lung'", "Diffuse alveolar damage; especially in septic and traumatic shock; protein-rich edema, hyaline membranes"),
("Heart", "Subendocardial infarction", "Ischemia of inner 1/3 of myocardium; diffuse non-territorial; ST depression on ECG; supply-demand mismatch"),
("Brain", "Ischemic encephalopathy", "Watershed zone infarcts; altered mental status; neurons and cardiomyocytes cannot regenerate"),
("GI Tract", "Hemorrhagic enteropathy / Ischemic bowel", "Mucosal ulceration; bacterial translocation into bloodstream → superimposed bacteremia"),
("Adrenals", "Cortical lipid depletion", "Reflects maximal steroid synthesis; in overwhelming sepsis → Waterhouse-Friderichsen syndrome (adrenal hemorrhage)"),
("Liver", "Centrilobular necrosis / 'Shock liver'","Zone 3 (centrilobular) most susceptible; ↑ transaminases; may resolve with resuscitation"),
]
org_hdr = [Paragraph(h, tbl_hdr) for h in ["Organ", "Lesion", "Notes"]]
org_rows = [org_hdr]
for i, (org, les, notes) in enumerate(organs):
bg = colors.HexColor("#ECEFF1") if i % 2 == 0 else WHITE
org_rows.append([
Paragraph(f"<b>{org}</b>", tbl_label),
Paragraph(les, tbl_cell_l),
Paragraph(notes, mks("ON", fontSize=7.8, leading=11)),
])
org_t = Table(org_rows, colWidths=[1.0*inch, 1.8*inch, 4.6*inch])
org_ts = TableStyle([
("GRID", (0,0),(-1,-1), 0.4, BORDER),
("BACKGROUND", (0,0),(-1,0), colors.HexColor("#37474F")),
("TOPPADDING", (0,0),(-1,-1), 4),
("BOTTOMPADDING", (0,0),(-1,-1), 4),
("LEFTPADDING", (0,0),(-1,-1), 4),
("VALIGN", (0,0),(-1,-1), "TOP"),
])
for i in range(len(organs)):
bg = colors.HexColor("#ECEFF1") if i % 2 == 0 else WHITE
org_ts.add("BACKGROUND", (0,i+1),(-1,i+1), bg)
org_t.setStyle(org_ts)
story.append(org_t)
story.append(Spacer(1,8))
# ══════════════════════════════════════════════════════════════════════════════
# 9. USMLE HIGH-YIELD PEARLS
# ══════════════════════════════════════════════════════════════════════════════
story.append(sec_bar("9. USMLE HIGH-YIELD PEARLS ⭐", GOLD))
story.append(Spacer(1,5))
pearls = [
"Only type of shock with HIGH PCWP + LOW CO + HIGH SVR = CARDIOGENIC",
"Only type of shock with LOW SVR + HIGH CO (early) = DISTRIBUTIVE (septic)",
"Hypovolemic + Cardiogenic both show: ↓CO, ↑SVR, ↓CVP/PCWP (except cardiogenic has ↑PCWP)",
"Beck's Triad (tamponade) = Hypotension + JVD + Muffled heart sounds → pericardiocentesis",
"Tension PTX = Absent breath sounds + tracheal deviation away + JVD → NEEDLE decompression 2nd ICS MCL",
"1st-line vasopressor for septic shock = NOREPINEPHRINE (not dopamine — ↑ arrhythmias with dopamine)",
"1st-line treatment for anaphylactic shock = IM EPINEPHRINE (thigh) — do NOT give antihistamines first",
"Lactate > 4 mmol/L OR base deficit < -4 mEq/L = presumptive shock regardless of BP",
"Neurogenic shock = hypotension + BRADYCARDIA (not tachycardia) — from loss of sympathetic tone",
"Cardiogenic shock post-MI defined as: SBP <90 + CI <2.2 L/min/m² + PCWP >18 mmHg",
"Urine output < 0.5 mL/kg/h = severe renal hypoperfusion marker in shock",
"SOFA score used to define/track organ dysfunction in sepsis; ↑≥2 from baseline = sepsis",
]
pearl_rows = []
for i, p in enumerate(pearls):
bg = LIGHT_GOLD if i % 2 == 0 else WHITE
pearl_rows.append([
Paragraph(f"★", mks("Star", fontSize=9, fontName="Helvetica-Bold", textColor=GOLD, alignment=TA_CENTER)),
Paragraph(p, mks("Pearl", fontSize=8.5, leading=12))
])
pearl_t = Table(pearl_rows, colWidths=[0.25*inch, doc.width-0.25*inch])
p_ts = TableStyle([
("GRID", (0,0),(-1,-1), 0.3, BORDER),
("TOPPADDING", (0,0),(-1,-1), 4),
("BOTTOMPADDING", (0,0),(-1,-1), 4),
("LEFTPADDING", (0,0),(-1,-1), 5),
("VALIGN", (0,0),(-1,-1), "MIDDLE"),
])
for i in range(len(pearls)):
bg = LIGHT_GOLD if i % 2 == 0 else WHITE
p_ts.add("BACKGROUND", (0,i),(-1,i), bg)
pearl_t.setStyle(p_ts)
story.append(pearl_t)
story.append(Spacer(1,8))
# ══════════════════════════════════════════════════════════════════════════════
# FOOTER
# ══════════════════════════════════════════════════════════════════════════════
story.append(HRFlowable(width="100%", thickness=0.5, color=BORDER))
story.append(Spacer(1,3))
story.append(Paragraph(
"Sources: Robbins, Cotran & Kumar — Pathologic Basis of Disease (10e) | Harrison's Principles of Internal Medicine (22e) | "
"Rosen's Emergency Medicine | Goldman-Cecil Medicine | Sabiston Textbook of Surgery | Schwartz's Principles of Surgery "
"| For educational use only — verify with current clinical guidelines",
footer_s
))
doc.build(story)
print(f"PDF created: {OUTPUT}")
cd /home/daytona/workspace/cpr-guide && python generate_shock_notes.py 2>&1
Shock Notes USMLE
PDF Document · PDF
Im not able to download pdf
ls -lh /home/daytona/workspace/cpr-guide/
Shock Notes USMLE
PDF Document · PDF
CPR Quick Reference
PDF Document · PDF
Create HTML version of shock notes I can print
~/cpr-guide/shock_notes.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shock Notes — USMLE / Medical Student</title>
<style>
/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: 'Segoe UI', Arial, sans-serif;
font-size: 13px;
color: #212121;
background: #f0f2f5;
padding: 20px;
}
/* ── Print styles ── */
@media print {
body { background: white; padding: 0; font-size: 11px; }
.page { box-shadow: none; margin: 0; padding: 12mm; max-width: 100%; }
.no-print { display: none; }
section { page-break-inside: avoid; }
h2.sec-bar { page-break-after: avoid; }
@page { margin: 10mm; size: A4; }
}
/* ── Page wrapper ── */
.page {
max-width: 1000px;
margin: 0 auto 30px;
background: white;
box-shadow: 0 4px 20px rgba(0,0,0,0.12);
border-radius: 6px;
overflow: hidden;
padding-bottom: 16px;
}
/* ── Print button ── */
.print-btn {
display: block;
width: 200px;
margin: 0 auto 18px;
padding: 12px 0;
background: #1565C0;
color: white;
border: none;
border-radius: 6px;
font-size: 15px;
font-weight: bold;
cursor: pointer;
text-align: center;
letter-spacing: 0.5px;
}
.print-btn:hover { background: #0D47A1; }
/* ── Header banner ── */
.header {
background: linear-gradient(135deg, #0D2137 0%, #1565C0 100%);
color: white;
padding: 18px 24px 14px;
}
.header h1 { font-size: 28px; letter-spacing: 2px; margin-bottom: 4px; }
.header p { font-size: 11px; opacity: 0.85; letter-spacing: 0.5px; }
/* ── Section bars ── */
h2.sec-bar {
color: white;
padding: 6px 14px;
font-size: 12px;
letter-spacing: 0.8px;
text-transform: uppercase;
margin: 14px 12px 8px;
border-radius: 4px;
}
.bar-blue { background: #1565C0; }
.bar-red { background: #C62828; }
.bar-teal { background: #00695C; }
.bar-orange { background: #E65100; }
.bar-gray { background: #37474F; }
.bar-gold { background: #F9A825; color: #212121 !important; }
/* ── Content padding ── */
.inner { padding: 0 12px; }
/* ── Definition box ── */
.def-box {
background: #E3F2FD;
border-left: 4px solid #1565C0;
border-radius: 4px;
padding: 10px 14px;
margin-bottom: 10px;
line-height: 1.6;
}
.formula-row {
display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap;
}
.formula-pill {
background: #0D2137;
color: white;
border-radius: 4px;
padding: 6px 12px;
font-size: 12px;
font-weight: bold;
}
.formula-val {
background: #BBDEFB;
border-radius: 4px;
padding: 6px 12px;
font-size: 12px;
}
/* ── Classification cards ── */
.cards-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
margin-bottom: 10px;
}
.card { border-radius: 5px; overflow: hidden; }
.card-header {
color: white;
font-weight: bold;
font-size: 12px;
padding: 5px 10px;
letter-spacing: 1px;
}
.card-body { padding: 8px 10px; font-size: 12px; line-height: 1.6; }
.card-body b { color: #333; }
.card-row { margin-bottom: 3px; }
.label { font-weight: bold; min-width: 80px; display: inline-block; }
.hypo .card-header { background: #1565C0; }
.hypo .card-body { background: #E3F2FD; }
.cardio .card-header { background: #C62828; }
.cardio .card-body { background: #FFEBEE; }
.distrib .card-header { background: #00695C; }
.distrib .card-body { background: #E0F2F1; }
.obstruct .card-header { background: #6A1B9A; }
.obstruct .card-body { background: #F3E5F5; }
/* ── Tables ── */
table {
width: 100%;
border-collapse: collapse;
font-size: 12px;
margin-bottom: 10px;
}
th {
color: white;
padding: 6px 8px;
text-align: center;
font-size: 11px;
letter-spacing: 0.3px;
}
td {
padding: 5px 8px;
border: 1px solid #CFD8DC;
vertical-align: top;
line-height: 1.5;
text-align: center;
}
td.left { text-align: left; }
tr:nth-child(even) td { background: #EEF2FF; }
tr:nth-child(odd) td { background: #ffffff; }
/* Hemodynamic table header colours */
.hd-table th:nth-child(1) { background: #0D2137; }
.hd-table th:nth-child(2) { background: #1565C0; }
.hd-table th:nth-child(3) { background: #C62828; }
.hd-table th:nth-child(4) { background: #00695C; }
.hd-table th:nth-child(5) { background: #6A1B9A; }
.hd-table td:first-child { background: #ECEFF1 !important; font-weight: bold; text-align: left; }
/* ── Stages ── */
.stages-grid {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 8px;
margin-bottom: 10px;
}
.stage { border-radius: 5px; overflow: hidden; }
.stage-header {
color: white;
font-weight: bold;
font-size: 11px;
padding: 7px 10px;
text-align: center;
line-height: 1.5;
}
.stage-body { padding: 8px 10px; font-size: 11.5px; line-height: 1.6; }
.stage-body li { margin-bottom: 2px; margin-left: 14px; }
.s1 .stage-header { background: #1565C0; }
.s1 .stage-body { background: #E3F2FD; }
.s2 .stage-header { background: #BF360C; }
.s2 .stage-body { background: #FBE9E7; }
.s3 .stage-header { background: #4A148C; }
.s3 .stage-body { background: #F3E5F5; }
/* ── Diagnosis 2-col ── */
.diag-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
margin-bottom: 10px;
}
.diag-box {
border-radius: 4px;
padding: 10px 12px;
font-size: 12px;
line-height: 1.7;
}
.diag-box.blue { background: #E3F2FD; border: 1px solid #1565C0; }
.diag-box.teal { background: #E0F2F1; border: 1px solid #00695C; }
.diag-box li { margin-left: 16px; margin-bottom: 2px; }
.diag-box .note { font-style: italic; color: #616161; font-size: 11px; margin-top: 6px; }
/* ── Sepsis pathogenesis table ── */
.sep-table td:first-child { background: #FFCDD2 !important; font-weight: bold; text-align: left; width: 140px; }
.sep-table td:last-child { background: #FFEBEE !important; text-align: left; }
.sep-table tr:nth-child(even) td { background: #FFCDD2 !important; }
.sep-table tr:nth-child(even) td:last-child { background: #FFEBEE !important; }
.sep-def {
background: #FFEBEE;
border: 1.5px solid #C62828;
border-radius: 4px;
padding: 8px 14px;
font-size: 12px;
line-height: 1.6;
margin-bottom: 10px;
}
/* Vaso table */
.vaso-table th { background: #E65100; }
.vaso-table td:first-child { font-weight: bold; text-align: left; background: #FFF8E1 !important; }
.vaso-table tr:nth-child(even) td { background: #FFF8E1; }
.vaso-table tr:nth-child(odd) td { background: #ffffff; }
/* Organ table */
.organ-table th { background: #37474F; }
.organ-table td:first-child { font-weight: bold; text-align: left; background: #ECEFF1 !important; }
/* ── Pearls ── */
.pearl-list { list-style: none; margin-bottom: 12px; }
.pearl-list li {
padding: 6px 10px 6px 32px;
position: relative;
font-size: 12.5px;
line-height: 1.6;
border-bottom: 1px solid #ECEFF1;
}
.pearl-list li:nth-child(odd) { background: #FFFDE7; }
.pearl-list li:nth-child(even) { background: #ffffff; }
.pearl-list li::before {
content: "★";
position: absolute;
left: 8px;
color: #F9A825;
font-size: 14px;
top: 5px;
}
/* ── Footer ── */
.footer {
border-top: 1px solid #CFD8DC;
padding: 8px 14px 0;
font-size: 10px;
color: #9E9E9E;
text-align: center;
margin-top: 8px;
}
/* Arrow helpers */
.up { color: #C62828; font-weight: bold; }
.down { color: #1565C0; font-weight: bold; }
.norm { color: #388E3C; font-weight: bold; }
</style>
</head>
<body>
<button class="print-btn no-print" onclick="window.print()">🖨 Print / Save as PDF</button>
<div class="page">
<!-- HEADER -->
<div class="header">
<h1>SHOCK</h1>
<p>Medical Student / USMLE Notes | Pathophysiology · Classification · Hemodynamics · Management</p>
</div>
<!-- ══ 1. DEFINITION ══ -->
<h2 class="sec-bar bar-blue">1. Definition</h2>
<div class="inner">
<div class="def-box">
<b>Shock</b> = a state of <b>acute circulatory failure</b> causing <b>tissue hypoperfusion</b> and cellular hypoxia.
Oxygen delivery to tissues is insufficient to meet metabolic demands, resulting in anaerobic metabolism,
lactic acidosis, and — if uncorrected — irreversible multi-organ failure and death.
At the subcellular level, <b>mitochondria</b> are the first organelles affected (consume >95% of O₂).
</div>
<div class="formula-row">
<span class="formula-pill">O₂ Delivery (DO₂) = CO × CaO₂</span>
<span class="formula-val">CO = HR × Stroke Volume</span>
<span class="formula-val">CaO₂ = (Hb × 1.34 × SaO₂) + (0.003 × PaO₂)</span>
</div>
</div>
<!-- ══ 2. CLASSIFICATION ══ -->
<h2 class="sec-bar bar-blue">2. Classification of Shock</h2>
<div class="inner">
<div class="cards-grid">
<div class="card hypo">
<div class="card-header">HYPOVOLEMIC</div>
<div class="card-body">
<div class="card-row"><span class="label">Mechanism:</span> Low intravascular volume → ↓ preload → ↓ CO</div>
<div class="card-row"><span class="label">Causes:</span> Hemorrhage, severe burns, vomiting/diarrhea, third-spacing, dehydration</div>
<div class="card-row"><span class="label">Signs:</span> Tachycardia, ↓BP, cool/clammy skin, flat neck veins, oliguria</div>
<div class="card-row"><span class="label">Treatment:</span> IV fluids; blood products (pRBC:FFP:plt 1:1:1) for hemorrhage; control bleeding</div>
</div>
</div>
<div class="card cardio">
<div class="card-header">CARDIOGENIC</div>
<div class="card-body">
<div class="card-row"><span class="label">Mechanism:</span> Pump failure → ↓ CO despite normal/high filling volume</div>
<div class="card-row"><span class="label">Causes:</span> MI (>40% LV loss), arrhythmia, myocarditis, valvular failure, cardiac tamponade</div>
<div class="card-row"><span class="label">Signs:</span> Tachycardia, ↓BP, pulmonary edema (crackles), JVD, cool/clammy skin, S3 gallop</div>
<div class="card-row"><span class="label">Treatment:</span> Dobutamine (inotrope) + norepinephrine; PCI for STEMI; IABP/MCS if refractory</div>
</div>
</div>
<div class="card distrib">
<div class="card-header">DISTRIBUTIVE (Septic / Anaphylactic / Neurogenic)</div>
<div class="card-body">
<div class="card-row"><span class="label">Mechanism:</span> Pathological vasodilation → ↓ SVR → relative hypovolemia</div>
<div class="card-row"><span class="label">Causes:</span> Sepsis/bacteremia, anaphylaxis (IgE-mediated), spinal cord injury, adrenal crisis</div>
<div class="card-row"><span class="label">Signs:</span> Septic: fever, warm/flushed early; Anaphylactic: urticaria, bronchospasm; Neurogenic: hypotension + bradycardia</div>
<div class="card-row"><span class="label">Treatment:</span> Septic: NE + antibiotics + fluids; Anaphylactic: <b>IM epinephrine FIRST</b>; Neurogenic: NE or phenylephrine</div>
</div>
</div>
<div class="card obstruct">
<div class="card-header">OBSTRUCTIVE</div>
<div class="card-body">
<div class="card-row"><span class="label">Mechanism:</span> Mechanical block of cardiac output</div>
<div class="card-row"><span class="label">Causes:</span> Massive PE, tension pneumothorax, cardiac tamponade, aortic dissection</div>
<div class="card-row"><span class="label">Signs:</span> Tension PTX: absent breath sounds, tracheal deviation, JVD; Tamponade: Beck's triad; PE: pleuritic chest pain, hypoxia</div>
<div class="card-row"><span class="label">Treatment:</span> Tension PTX: needle decompression → chest tube; Tamponade: pericardiocentesis; Massive PE: anticoag ± thrombolytics</div>
</div>
</div>
</div>
</div>
<!-- ══ 3. HEMODYNAMIC COMPARISON CHART ══ -->
<h2 class="sec-bar bar-orange">3. Hemodynamic Comparison Chart ★ HIGH-YIELD</h2>
<div class="inner">
<table class="hd-table">
<thead>
<tr>
<th>Parameter</th>
<th>Hypovolemic</th>
<th>Cardiogenic</th>
<th>Distributive (Septic)</th>
<th>Obstructive (Tamponade/PE)</th>
</tr>
</thead>
<tbody>
<tr><td>CO / CI</td><td class="down">↓↓</td><td class="down">↓↓↓</td><td><span class="up">↑↑ early</span> / <span class="down">↓ late</span></td><td class="down">↓↓</td></tr>
<tr><td>SVR</td><td class="up">↑↑</td><td class="up">↑↑</td><td class="down">↓↓</td><td class="up">↑↑</td></tr>
<tr><td>CVP / PCWP</td><td class="down">↓↓</td><td class="up">↑↑</td><td class="down">↓ or normal</td><td><span class="up">↑ CVP</span> / <span class="up">↑ PCWP</span></td></tr>
<tr><td>Heart Rate</td><td class="up">↑</td><td class="up">↑</td><td class="up">↑↑</td><td class="up">↑</td></tr>
<tr><td>Blood Pressure</td><td class="down">↓</td><td class="down">↓</td><td class="down">↓</td><td class="down">↓</td></tr>
<tr><td>Pulse Pressure</td><td>Narrow</td><td>Narrow</td><td>Wide (early)</td><td>Narrow / pulsus paradoxus</td></tr>
<tr><td>SvO₂</td><td class="down">↓</td><td class="down">↓</td><td><span class="up">↑ early</span> / <span class="down">↓ late</span></td><td class="down">↓</td></tr>
<tr><td>Skin</td><td>Cool / pale</td><td>Cool / clammy</td><td>Warm / flushed (early)</td><td>Cool / pale</td></tr>
<tr><td>JVD</td><td>Absent</td><td>Present</td><td>Absent</td><td>Present</td></tr>
<tr><td>Lung Sounds</td><td>Clear</td><td>Crackles (pulm. edema)</td><td>Clear</td><td>Clear (tamponade); Absent (PTX)</td></tr>
<tr><td>Urine Output</td><td class="down">↓</td><td class="down">↓</td><td class="down">↓</td><td class="down">↓</td></tr>
<tr><td>Lactate</td><td class="up">↑</td><td class="up">↑</td><td class="up">↑</td><td class="up">↑</td></tr>
<tr>
<td><b>1st-line Rx</b></td>
<td>IV fluids + blood products (1:1:1)</td>
<td>Dobutamine + NE; PCI for STEMI</td>
<td>Norepinephrine + antibiotics + fluids</td>
<td>Decompress / pericardiocentesis / anticoag</td>
</tr>
</tbody>
</table>
<p style="font-size:11px; color:#616161; margin-bottom:10px;">
<b>Cardiogenic shock definition:</b> SBP <90 mmHg + CI <2.2 L/min/m² + PCWP >18 mmHg
</p>
</div>
<!-- ══ 4. THREE STAGES ══ -->
<h2 class="sec-bar bar-gray">4. Three Stages of Shock</h2>
<div class="inner">
<div class="stages-grid">
<div class="stage s1">
<div class="stage-header">STAGE 1<br>COMPENSATED (Nonprogressive)</div>
<div class="stage-body">
<ul>
<li>Baroreceptors activate → catecholamines, ADH, RAAS</li>
<li>Tachycardia, ↑ SVR, renal fluid conservation</li>
<li>Blood shunted: skin/gut → heart and brain</li>
<li>No overt organ dysfunction yet</li>
<li>Lactate mildly ↑; creatinine may rise</li>
<li>Skin: cool/pale (warm/flushed in early sepsis)</li>
</ul>
</div>
</div>
<div class="stage s2">
<div class="stage-header">STAGE 2<br>DECOMPENSATED (Progressive)</div>
<div class="stage-body">
<ul>
<li>Compensatory mechanisms overwhelmed</li>
<li>Anaerobic glycolysis → lactic acidosis</li>
<li>↓ pH blunts vasomotor response → arterioles dilate</li>
<li>Blood pools in microcirculation → worsens CO</li>
<li>DIC develops from endothelial injury</li>
<li>Vital organs (kidney, heart, bowel) begin to fail</li>
</ul>
</div>
</div>
<div class="stage s3">
<div class="stage-header">STAGE 3<br>IRREVERSIBLE</div>
<div class="stage-body">
<ul>
<li>Lysosomal enzyme leakage amplifies destruction</li>
<li>↑ NO → myocardial contractility worsens further</li>
<li>Ischemic gut → bacterial translocation → bacteremia</li>
<li>Multisystem organ failure (MSOF)</li>
<li>Death even if hemodynamics corrected</li>
</ul>
</div>
</div>
</div>
</div>
<!-- ══ 5. DIAGNOSIS ══ -->
<h2 class="sec-bar bar-gray">5. Diagnosis — Clinical Criteria & Lab Markers</h2>
<div class="inner">
<div class="diag-grid">
<div class="diag-box blue">
<b>Empirical Criteria for Shock (majority should be met):</b>
<ul>
<li>Ill appearance / altered mental status</li>
<li>HR > 100 bpm</li>
<li>RR > 20/min or PaCO₂ < 32 mmHg</li>
<li>Base deficit < −4 mEq/L or Lactate > 4 mmol/L</li>
<li>Urine output < 0.5 mL/kg/h</li>
<li>SBP < 90 mmHg or MAP < 65 mmHg > 30 min</li>
</ul>
<p class="note">⚠ Shock can occur with NORMAL BP — especially early or in distributive states</p>
</div>
<div class="diag-box teal">
<b>Key Lab Markers:</b>
<ul>
<li><b>Lactate > 4 mmol/L</b> → tissue hypoperfusion; predicts organ failure</li>
<li><b>Base deficit < −4 mEq/L</b> → equivalent to lactate elevation</li>
<li><b>Rising lactate + worsening BD</b> → refractory shock</li>
<li><b>Creatinine / BUN ↑</b> → acute kidney injury</li>
<li><b>Troponin ↑</b> → myocardial injury (demand ischemia)</li>
<li><b>Procalcitonin, CRP ↑</b> → sepsis markers</li>
<li><b>PT/INR/fibrinogen/D-dimer</b> → DIC screen</li>
</ul>
</div>
</div>
</div>
<!-- ══ 6. SEPTIC SHOCK PATHOGENESIS ══ -->
<h2 class="sec-bar bar-red">6. Septic Shock — Pathogenesis (High Detail)</h2>
<div class="inner">
<table class="sep-table">
<tbody>
<tr><td>Microbial Trigger</td><td>Endotoxin (LPS), exotoxins, fungal antigens activate TLRs on macrophages/dendritic cells via PAMPs & DAMPs</td></tr>
<tr><td>NF-κB Activation</td><td>TLR signaling → NF-κB nuclear translocation → transcription of TNF, IL-1, IL-6, IL-12, IL-18, IFN-γ, HMGB1</td></tr>
<tr><td>Complement Activation</td><td>Microbial components activate complement → C3a/C5a (anaphylatoxins) → further inflammation and vasodilation</td></tr>
<tr><td>Endothelial Injury</td><td>Cytokines ↑ adhesion molecules; coagulation activated via factor XII → widespread microvascular thrombosis, DIC</td></tr>
<tr><td>Vasodilation / ↓SVR</td><td>Massive ↑ nitric oxide (NO) → profound vasodilation → distributive shock; relative hypovolemia</td></tr>
<tr><td>Counter-regulation</td><td>Lymphocyte apoptosis, Th1→Th2 shift, ↑ IL-10 → immunosuppression; oscillation between hyperinflammation and immune suppression</td></tr>
<tr><td>Organ Failure</td><td>ARDS, AKI, hepatic dysfunction, DIC, encephalopathy — SOFA score quantifies organ failure</td></tr>
</tbody>
</table>
<div class="sep-def">
<b>Sepsis-3 Definitions:</b>
<b>Sepsis</b> = life-threatening organ dysfunction (SOFA ↑≥2 from baseline) caused by dysregulated host response to infection.
<b>Septic Shock</b> = Sepsis + vasopressor requirement to maintain MAP ≥65 mmHg + lactate >2 mmol/L despite adequate fluids.
Mortality ≈ <b>40%</b>. Most common triggers: gram-positive bacteria > gram-negative bacteria > fungi.
</div>
</div>
<!-- ══ 7. VASOACTIVE DRUGS ══ -->
<h2 class="sec-bar bar-orange">7. Vasoactive Drugs in Shock</h2>
<div class="inner">
<table class="vaso-table">
<thead>
<tr>
<th style="text-align:left">Drug</th>
<th>Dose</th>
<th>Receptors</th>
<th>Main Effect</th>
<th>Use in Shock</th>
</tr>
</thead>
<tbody>
<tr>
<td><b>Norepinephrine</b><br><small>(1st line — septic)</small></td>
<td>3–30 µg/min</td>
<td>α1 > β1</td>
<td>↑ SVR + modest ↑ CO</td>
<td class="left">Septic / distributive; preferred over dopamine</td>
</tr>
<tr>
<td><b>Epinephrine</b></td>
<td>5–20 µg/min (IV)<br>0.3–0.5 mg IM</td>
<td>α + β1 + β2</td>
<td>↑ CO + ↑ SVR; bronchodilation</td>
<td class="left">Anaphylaxis: <b>IM FIRST</b>; refractory septic shock</td>
</tr>
<tr>
<td><b>Vasopressin</b></td>
<td>0.01–0.04 U/min</td>
<td>V1 receptors</td>
<td>↑ SVR; no ↑ HR; no ↑ pulm. resistance</td>
<td class="left">Adjunct to NE in septic; useful with pulm. HTN or RV failure</td>
</tr>
<tr>
<td><b>Dobutamine</b></td>
<td>2–15 µg/kg/min</td>
<td>β1 > β2</td>
<td>↑ CO (inotrope); ↓ SVR slightly</td>
<td class="left">Cardiogenic shock; low CO states</td>
</tr>
<tr>
<td><b>Dopamine</b><br><small>(not preferred)</small></td>
<td>dose-dependent</td>
<td>DA > β > α</td>
<td>Variable by dose; ↑ arrhythmias</td>
<td class="left">⚠ Not recommended — higher mortality vs NE in septic/cardiogenic</td>
</tr>
<tr>
<td><b>Phenylephrine</b></td>
<td>2–300 µg/min</td>
<td>Pure α1</td>
<td>↑ SVR; reflex ↓ HR</td>
<td class="left">Neurogenic shock; avoid if low CO</td>
</tr>
</tbody>
</table>
</div>
<!-- ══ 8. ORGAN PATHOLOGY ══ -->
<h2 class="sec-bar bar-gray">8. Organ Pathology in Shock</h2>
<div class="inner">
<table class="organ-table">
<thead>
<tr>
<th style="text-align:left">Organ</th>
<th style="text-align:left">Lesion</th>
<th style="text-align:left">Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Kidney</td>
<td class="left">Acute Tubular Necrosis (ATN)</td>
<td class="left">Most common cause of AKI; ischemic injury to proximal tubule; granular "muddy brown" casts on UA</td>
</tr>
<tr>
<td>Lung</td>
<td class="left">ARDS / "Shock Lung"</td>
<td class="left">Diffuse alveolar damage; especially septic and traumatic shock; protein-rich edema, hyaline membranes</td>
</tr>
<tr>
<td>Heart</td>
<td class="left">Subendocardial infarction</td>
<td class="left">Ischemia of inner 1/3 of myocardium; diffuse, non-territorial; ST depression; supply-demand mismatch</td>
</tr>
<tr>
<td>Brain</td>
<td class="left">Ischemic encephalopathy</td>
<td class="left">Watershed zone infarcts; altered mental status; neurons and cardiomyocytes cannot regenerate</td>
</tr>
<tr>
<td>GI Tract</td>
<td class="left">Hemorrhagic enteropathy / Ischemic bowel</td>
<td class="left">Mucosal ulceration; bacterial translocation into bloodstream → superimposed bacteremia worsens shock</td>
</tr>
<tr>
<td>Adrenals</td>
<td class="left">Cortical lipid depletion</td>
<td class="left">Maximal steroid synthesis; overwhelming sepsis → Waterhouse-Friderichsen syndrome (adrenal hemorrhage)</td>
</tr>
<tr>
<td>Liver</td>
<td class="left">Centrilobular necrosis / "Shock liver"</td>
<td class="left">Zone 3 (centrilobular) most susceptible; ↑ transaminases; may resolve if resuscitation succeeds</td>
</tr>
</tbody>
</table>
</div>
<!-- ══ 9. USMLE PEARLS ══ -->
<h2 class="sec-bar bar-gold">9. USMLE High-Yield Pearls ⭐</h2>
<div class="inner">
<ul class="pearl-list">
<li>Only type with <b>HIGH PCWP + LOW CO + HIGH SVR</b> = <b>CARDIOGENIC</b></li>
<li>Only type with <b>LOW SVR + HIGH CO (early)</b> = <b>DISTRIBUTIVE (septic)</b></li>
<li>Hypovolemic vs Cardiogenic: both ↓CO, ↑SVR — difference is PCWP (↓ in hypovolemic, ↑↑ in cardiogenic)</li>
<li><b>Beck's Triad</b> (tamponade) = Hypotension + JVD + Muffled heart sounds → <b>pericardiocentesis</b></li>
<li><b>Tension PTX</b> = absent breath sounds + tracheal deviation away + JVD → <b>needle decompression 2nd ICS MCL</b></li>
<li>1st-line vasopressor for septic shock = <b>NOREPINEPHRINE</b> (not dopamine — dopamine ↑ arrhythmias, ↑ mortality)</li>
<li>1st-line for anaphylactic shock = <b>IM EPINEPHRINE (thigh)</b> — do NOT give antihistamines or steroids first</li>
<li>Lactate >4 mmol/L <b>OR</b> base deficit < −4 mEq/L = presumptive shock regardless of BP</li>
<li><b>Neurogenic shock</b> = hypotension + <b>BRADYCARDIA</b> (unlike all other shock types which cause tachycardia)</li>
<li>Cardiogenic shock post-MI: SBP <90 + CI <2.2 L/min/m² + <b>PCWP >18 mmHg</b></li>
<li>Urine output <0.5 mL/kg/h = severe renal hypoperfusion marker in any shock</li>
<li><b>SOFA score ↑ ≥2</b> from baseline = sepsis; add vasopressor need + lactate >2 = <b>septic shock</b></li>
</ul>
</div>
<!-- FOOTER -->
<div class="footer">
Sources: Robbins, Cotran & Kumar — Pathologic Basis of Disease (10e) | Harrison's Principles of Internal Medicine (22e) |
Rosen's Emergency Medicine | Goldman-Cecil Medicine | Sabiston Textbook of Surgery | Schwartz's Principles of Surgery
| For educational use only — verify with current clinical guidelines
</div>
</div><!-- /page -->
</body>
</html>
ls -lh /home/daytona/workspace/cpr-guide/shock_notes.html
shock notes
HTML File · HTML
No links working
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shock Notes — USMLE / Medical Student</title>
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, sans-serif; font-size: 13px; color: #212121; background: #f0f2f5; padding: 20px; }
@media print {
body { background: white; padding: 0; font-size: 11px; }
.page { box-shadow: none; margin: 0; padding: 10mm; max-width: 100%; }
.no-print { display: none; }
@page { margin: 8mm; size: A4; }
}
.page { max-width: 1000px; margin: 0 auto 30px; background: white; box-shadow: 0 4px 20px rgba(0,0,0,0.12); border-radius: 6px; overflow: hidden; padding-bottom: 16px; }
.print-btn { display: block; width: 220px; margin: 0 auto 18px; padding: 12px 0; background: #1565C0; color: white; border: none; border-radius: 6px; font-size: 15px; font-weight: bold; cursor: pointer; text-align: center; }
.print-btn:hover { background: #0D47A1; }
.header { background: linear-gradient(135deg, #0D2137 0%, #1565C0 100%); color: white; padding: 18px 24px 14px; }
.header h1 { font-size: 28px; letter-spacing: 2px; margin-bottom: 4px; }
.header p { font-size: 11px; opacity: 0.85; }
h2.sec-bar { color: white; padding: 6px 14px; font-size: 12px; letter-spacing: 0.8px; text-transform: uppercase; margin: 14px 12px 8px; border-radius: 4px; }
.bar-blue { background: #1565C0; }
.bar-red { background: #C62828; }
.bar-orange { background: #E65100; }
.bar-gray { background: #37474F; }
.bar-gold { background: #F9A825; color: #212121 !important; }
.inner { padding: 0 12px; }
.def-box { background: #E3F2FD; border-left: 4px solid #1565C0; border-radius: 4px; padding: 10px 14px; margin-bottom: 10px; line-height: 1.6; }
.formula-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.formula-pill { background: #0D2137; color: white; border-radius: 4px; padding: 6px 12px; font-size: 12px; font-weight: bold; }
.formula-val { background: #BBDEFB; border-radius: 4px; padding: 6px 12px; font-size: 12px; }
.cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.card { border-radius: 5px; overflow: hidden; }
.card-header { color: white; font-weight: bold; font-size: 12px; padding: 5px 10px; letter-spacing: 1px; }
.card-body { padding: 8px 10px; font-size: 12px; line-height: 1.6; }
.card-row { margin-bottom: 3px; }
.label { font-weight: bold; min-width: 80px; display: inline-block; }
.hypo .card-header { background: #1565C0; } .hypo .card-body { background: #E3F2FD; }
.cardio .card-header { background: #C62828; } .cardio .card-body { background: #FFEBEE; }
.distrib .card-header { background: #00695C; } .distrib .card-body { background: #E0F2F1; }
.obstruct .card-header { background: #6A1B9A; } .obstruct .card-body { background: #F3E5F5; }
table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 10px; }
th { color: white; padding: 6px 8px; text-align: center; font-size: 11px; }
td { padding: 5px 8px; border: 1px solid #CFD8DC; vertical-align: top; line-height: 1.5; text-align: center; }
td.left { text-align: left; }
tr:nth-child(even) td { background: #EEF2FF; }
tr:nth-child(odd) td { background: #ffffff; }
.hd-table th:nth-child(1) { background: #0D2137; }
.hd-table th:nth-child(2) { background: #1565C0; }
.hd-table th:nth-child(3) { background: #C62828; }
.hd-table th:nth-child(4) { background: #00695C; }
.hd-table th:nth-child(5) { background: #6A1B9A; }
.hd-table td:first-child { background: #ECEFF1 !important; font-weight: bold; text-align: left; }
.stages-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.stage { border-radius: 5px; overflow: hidden; }
.stage-header { color: white; font-weight: bold; font-size: 11px; padding: 7px 10px; text-align: center; line-height: 1.5; }
.stage-body { padding: 8px 10px; font-size: 11.5px; line-height: 1.6; }
.stage-body li { margin-bottom: 2px; margin-left: 14px; }
.s1 .stage-header { background: #1565C0; } .s1 .stage-body { background: #E3F2FD; }
.s2 .stage-header { background: #BF360C; } .s2 .stage-body { background: #FBE9E7; }
.s3 .stage-header { background: #4A148C; } .s3 .stage-body { background: #F3E5F5; }
.diag-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.diag-box { border-radius: 4px; padding: 10px 12px; font-size: 12px; line-height: 1.7; }
.diag-box.blue { background: #E3F2FD; border: 1px solid #1565C0; }
.diag-box.teal { background: #E0F2F1; border: 1px solid #00695C; }
.diag-box li { margin-left: 16px; margin-bottom: 2px; }
.diag-box .note { font-style: italic; color: #616161; font-size: 11px; margin-top: 6px; }
.sep-table td:first-child { background: #FFCDD2 !important; font-weight: bold; text-align: left; width: 140px; }
.sep-table td:last-child { background: #FFEBEE !important; text-align: left; }
.sep-def { background: #FFEBEE; border: 1.5px solid #C62828; border-radius: 4px; padding: 8px 14px; font-size: 12px; line-height: 1.6; margin-bottom: 10px; }
.vaso-table th { background: #E65100; }
.vaso-table td:first-child { font-weight: bold; text-align: left; }
.organ-table th { background: #37474F; }
.organ-table td:first-child { font-weight: bold; text-align: left; background: #ECEFF1 !important; }
.pearl-list { list-style: none; margin-bottom: 12px; }
.pearl-list li { padding: 6px 10px 6px 32px; position: relative; font-size: 12.5px; line-height: 1.6; border-bottom: 1px solid #ECEFF1; }
.pearl-list li:nth-child(odd) { background: #FFFDE7; }
.pearl-list li:nth-child(even) { background: #ffffff; }
.pearl-list li::before { content: "★"; position: absolute; left: 8px; color: #F9A825; font-size: 14px; top: 5px; }
.footer { border-top: 1px solid #CFD8DC; padding: 8px 14px 0; font-size: 10px; color: #9E9E9E; text-align: center; margin-top: 8px; }
.up { color: #C62828; font-weight: bold; }
.down { color: #1565C0; font-weight: bold; }
</style>
</head>
<body>
<button class="print-btn no-print" onclick="window.print()">🖨 Print / Save as PDF</button>
<div class="page">
<div class="header">
<h1>SHOCK</h1>
<p>Medical Student / USMLE Notes | Pathophysiology · Classification · Hemodynamics · Management</p>
</div>
<h2 class="sec-bar bar-blue">1. Definition</h2>
<div class="inner">
<div class="def-box">
<b>Shock</b> = a state of <b>acute circulatory failure</b> causing <b>tissue hypoperfusion</b> and cellular hypoxia.
O₂ delivery to tissues is insufficient to meet metabolic demands → anaerobic metabolism → lactic acidosis →
irreversible multi-organ failure and death if uncorrected.
<b>Mitochondria</b> are the first subcellular structures affected (consume >95% of body O₂).
</div>
<div class="formula-row">
<span class="formula-pill">O₂ Delivery (DO₂) = CO × CaO₂</span>
<span class="formula-val">CO = HR × Stroke Volume</span>
<span class="formula-val">CaO₂ = (Hb × 1.34 × SaO₂) + (0.003 × PaO₂)</span>
</div>
</div>
<h2 class="sec-bar bar-blue">2. Classification of Shock</h2>
<div class="inner">
<div class="cards-grid">
<div class="card hypo">
<div class="card-header">HYPOVOLEMIC</div>
<div class="card-body">
<div class="card-row"><span class="label">Mechanism:</span> Low intravascular volume → ↓ preload → ↓ CO</div>
<div class="card-row"><span class="label">Causes:</span> Hemorrhage, burns, vomiting/diarrhea, third-spacing, dehydration</div>
<div class="card-row"><span class="label">Signs:</span> Tachycardia, ↓BP, cool/clammy skin, flat neck veins, oliguria</div>
<div class="card-row"><span class="label">Treatment:</span> IV fluids; blood products (pRBC:FFP:plt 1:1:1) for hemorrhage; stop bleeding</div>
</div>
</div>
<div class="card cardio">
<div class="card-header">CARDIOGENIC</div>
<div class="card-body">
<div class="card-row"><span class="label">Mechanism:</span> Pump failure → ↓ CO despite normal/high filling volume</div>
<div class="card-row"><span class="label">Causes:</span> MI (>40% LV loss), arrhythmia, myocarditis, valvular failure, tamponade</div>
<div class="card-row"><span class="label">Signs:</span> Tachycardia, ↓BP, pulmonary edema (crackles), JVD, cool/clammy skin, S3</div>
<div class="card-row"><span class="label">Treatment:</span> Dobutamine + norepinephrine; PCI for STEMI; IABP/MCS if refractory</div>
</div>
</div>
<div class="card distrib">
<div class="card-header">DISTRIBUTIVE (Septic / Anaphylactic / Neurogenic)</div>
<div class="card-body">
<div class="card-row"><span class="label">Mechanism:</span> Pathological vasodilation → ↓ SVR → relative hypovolemia</div>
<div class="card-row"><span class="label">Causes:</span> Sepsis, anaphylaxis (IgE), spinal cord injury, adrenal crisis</div>
<div class="card-row"><span class="label">Signs:</span> Septic: fever, warm/flushed early; Anaphylaxis: urticaria, wheeze; Neurogenic: bradycardia</div>
<div class="card-row"><span class="label">Treatment:</span> Septic: NE + abx + fluids; Anaphylaxis: <b>IM epi FIRST</b>; Neurogenic: NE/phenylephrine</div>
</div>
</div>
<div class="card obstruct">
<div class="card-header">OBSTRUCTIVE</div>
<div class="card-body">
<div class="card-row"><span class="label">Mechanism:</span> Mechanical block of cardiac output</div>
<div class="card-row"><span class="label">Causes:</span> Massive PE, tension pneumothorax, cardiac tamponade, aortic dissection</div>
<div class="card-row"><span class="label">Signs:</span> PTX: absent breath sounds + tracheal deviation + JVD; Tamponade: Beck's triad</div>
<div class="card-row"><span class="label">Treatment:</span> PTX: needle decompression; Tamponade: pericardiocentesis; PE: anticoag ± thrombolytics</div>
</div>
</div>
</div>
</div>
<h2 class="sec-bar bar-orange">3. Hemodynamic Comparison Chart ★ HIGH-YIELD</h2>
<div class="inner">
<table class="hd-table">
<thead>
<tr>
<th>Parameter</th>
<th>Hypovolemic</th>
<th>Cardiogenic</th>
<th>Distributive (Septic)</th>
<th>Obstructive (Tamponade/PE)</th>
</tr>
</thead>
<tbody>
<tr><td>CO / CI</td><td class="down">↓↓</td><td class="down">↓↓↓</td><td><span class="up">↑↑ early</span> / <span class="down">↓ late</span></td><td class="down">↓↓</td></tr>
<tr><td>SVR</td><td class="up">↑↑</td><td class="up">↑↑</td><td class="down">↓↓</td><td class="up">↑↑</td></tr>
<tr><td>CVP / PCWP</td><td class="down">↓↓</td><td class="up">↑↑</td><td class="down">↓ or normal</td><td class="up">↑ (both)</td></tr>
<tr><td>Heart Rate</td><td class="up">↑</td><td class="up">↑</td><td class="up">↑↑</td><td class="up">↑</td></tr>
<tr><td>Blood Pressure</td><td class="down">↓</td><td class="down">↓</td><td class="down">↓</td><td class="down">↓</td></tr>
<tr><td>Pulse Pressure</td><td>Narrow</td><td>Narrow</td><td>Wide (early)</td><td>Narrow / pulsus paradoxus</td></tr>
<tr><td>SvO₂</td><td class="down">↓</td><td class="down">↓</td><td><span class="up">↑ early</span> / <span class="down">↓ late</span></td><td class="down">↓</td></tr>
<tr><td>Skin</td><td>Cool / pale</td><td>Cool / clammy</td><td>Warm / flushed (early)</td><td>Cool / pale</td></tr>
<tr><td>JVD</td><td>Absent</td><td>Present</td><td>Absent</td><td>Present</td></tr>
<tr><td>Lung Sounds</td><td>Clear</td><td>Crackles</td><td>Clear</td><td>Clear / Absent (PTX)</td></tr>
<tr><td>Urine Output</td><td class="down">↓</td><td class="down">↓</td><td class="down">↓</td><td class="down">↓</td></tr>
<tr><td>Lactate</td><td class="up">↑</td><td class="up">↑</td><td class="up">↑</td><td class="up">↑</td></tr>
<tr><td><b>1st-line Rx</b></td><td>Fluids + blood (1:1:1)</td><td>Dobutamine + NE; PCI</td><td>NE + abx + fluids</td><td>Decompress / pericard. / anticoag</td></tr>
</tbody>
</table>
<p style="font-size:11px;color:#616161;margin-bottom:10px;"><b>Cardiogenic shock:</b> SBP <90 + CI <2.2 L/min/m² + PCWP >18 mmHg</p>
</div>
<h2 class="sec-bar bar-gray">4. Three Stages of Shock</h2>
<div class="inner">
<div class="stages-grid">
<div class="stage s1">
<div class="stage-header">STAGE 1<br>COMPENSATED (Nonprogressive)</div>
<div class="stage-body"><ul>
<li>Baroreceptors → catecholamines, ADH, RAAS activate</li>
<li>Tachycardia, ↑SVR, renal fluid conservation</li>
<li>Blood shunted: skin/gut → heart and brain</li>
<li>No overt organ dysfunction yet</li>
<li>Lactate mildly ↑; creatinine may begin to rise</li>
<li>Skin: cool/pale (warm/flushed in early sepsis)</li>
</ul></div>
</div>
<div class="stage s2">
<div class="stage-header">STAGE 2<br>DECOMPENSATED (Progressive)</div>
<div class="stage-body"><ul>
<li>Compensatory mechanisms overwhelmed</li>
<li>Anaerobic glycolysis → lactic acidosis → ↓pH</li>
<li>↓pH blunts vasomotor response → arterioles dilate</li>
<li>Blood pools in microcirculation → worsens CO (vicious cycle)</li>
<li>DIC develops from endothelial injury</li>
<li>Vital organs (kidney, heart, bowel) begin to fail</li>
</ul></div>
</div>
<div class="stage s3">
<div class="stage-header">STAGE 3<br>IRREVERSIBLE</div>
<div class="stage-body"><ul>
<li>Lysosomal enzyme leakage amplifies cell destruction</li>
<li>↑NO → myocardial contractility worsens further</li>
<li>Ischemic gut → bacterial translocation → bacteremia</li>
<li>Multisystem organ failure (MSOF)</li>
<li>Death even if hemodynamics are corrected</li>
</ul></div>
</div>
</div>
</div>
<h2 class="sec-bar bar-gray">5. Diagnosis — Clinical Criteria & Lab Markers</h2>
<div class="inner">
<div class="diag-grid">
<div class="diag-box blue">
<b>Empirical Criteria for Shock (majority should be met):</b>
<ul>
<li>Ill appearance / altered mental status</li>
<li>HR > 100 bpm</li>
<li>RR > 20/min or PaCO₂ < 32 mmHg</li>
<li>Base deficit < −4 mEq/L or Lactate > 4 mmol/L</li>
<li>Urine output < 0.5 mL/kg/h</li>
<li>SBP < 90 mmHg or MAP < 65 mmHg > 30 min</li>
</ul>
<p class="note">⚠ Shock can occur with NORMAL BP — especially early or in distributive states</p>
</div>
<div class="diag-box teal">
<b>Key Lab Markers:</b>
<ul>
<li><b>Lactate > 4 mmol/L</b> → tissue hypoperfusion; predicts organ failure</li>
<li><b>Base deficit < −4 mEq/L</b> → equivalent indicator to lactate</li>
<li><b>Rising lactate + worsening BD</b> → refractory shock</li>
<li><b>Creatinine/BUN ↑</b> → acute kidney injury</li>
<li><b>Troponin ↑</b> → myocardial injury / demand ischemia</li>
<li><b>Procalcitonin, CRP ↑</b> → sepsis markers</li>
<li><b>PT/INR/fibrinogen/D-dimer</b> → DIC screen</li>
</ul>
</div>
</div>
</div>
<h2 class="sec-bar bar-red">6. Septic Shock — Pathogenesis</h2>
<div class="inner">
<table class="sep-table">
<tbody>
<tr><td>Microbial Trigger</td><td>Endotoxin (LPS), exotoxins, fungal antigens activate TLRs on macrophages/dendritic cells via PAMPs & DAMPs</td></tr>
<tr><td>NF-κB Activation</td><td>TLR signaling → NF-κB nuclear translocation → transcription of TNF, IL-1, IL-6, IL-12, IL-18, IFN-γ, HMGB1</td></tr>
<tr><td>Complement</td><td>Microbial components activate complement → C3a/C5a (anaphylatoxins) → further inflammation and vasodilation</td></tr>
<tr><td>Endothelial Injury</td><td>Cytokines ↑ adhesion molecules; coagulation activated via factor XII → microvascular thrombosis, DIC</td></tr>
<tr><td>Vasodilation / ↓SVR</td><td>Massive ↑ nitric oxide (NO) → profound vasodilation → distributive shock; relative hypovolemia</td></tr>
<tr><td>Counter-regulation</td><td>Lymphocyte apoptosis, Th1→Th2 shift, ↑IL-10 → immunosuppression; oscillation between hyperinflammation and immune suppression</td></tr>
<tr><td>Organ Failure</td><td>ARDS, AKI, hepatic dysfunction, DIC, encephalopathy — SOFA score quantifies organ failure</td></tr>
</tbody>
</table>
<div class="sep-def">
<b>Sepsis-3:</b> <b>Sepsis</b> = life-threatening organ dysfunction (SOFA ↑≥2) from dysregulated host response to infection.
<b>Septic Shock</b> = Sepsis + vasopressor needed to maintain MAP ≥65 + lactate >2 mmol/L despite fluids.
Mortality ≈ <b>40%</b>. Triggers: gram-positive > gram-negative bacteria > fungi.
</div>
</div>
<h2 class="sec-bar bar-orange">7. Vasoactive Drugs in Shock</h2>
<div class="inner">
<table class="vaso-table">
<thead>
<tr><th style="text-align:left">Drug</th><th>Dose</th><th>Receptors</th><th>Main Effect</th><th>Use in Shock</th></tr>
</thead>
<tbody>
<tr><td><b>Norepinephrine</b> (1st line — septic)</td><td>3–30 µg/min</td><td>α1 > β1</td><td>↑SVR + modest ↑CO</td><td class="left">Septic/distributive; preferred over dopamine</td></tr>
<tr><td><b>Epinephrine</b></td><td>5–20 µg/min IV; 0.3 mg IM</td><td>α + β1 + β2</td><td>↑CO + ↑SVR; bronchodilation</td><td class="left">Anaphylaxis: <b>IM FIRST</b>; refractory septic shock</td></tr>
<tr><td><b>Vasopressin</b></td><td>0.01–0.04 U/min</td><td>V1</td><td>↑SVR; no ↑HR; no ↑pulm. resistance</td><td class="left">Adjunct to NE; useful with pulm. HTN or RV failure</td></tr>
<tr><td><b>Dobutamine</b></td><td>2–15 µg/kg/min</td><td>β1 > β2</td><td>↑CO (inotrope); ↓SVR slightly</td><td class="left">Cardiogenic shock; low CO states</td></tr>
<tr><td><b>Dopamine</b> (not preferred)</td><td>dose-dependent</td><td>DA > β > α</td><td>Variable; ↑arrhythmias</td><td class="left">⚠ Not recommended — higher mortality vs NE</td></tr>
<tr><td><b>Phenylephrine</b></td><td>2–300 µg/min</td><td>Pure α1</td><td>↑SVR; reflex ↓HR</td><td class="left">Neurogenic shock; avoid if low CO</td></tr>
</tbody>
</table>
</div>
<h2 class="sec-bar bar-gray">8. Organ Pathology in Shock</h2>
<div class="inner">
<table class="organ-table">
<thead>
<tr><th style="text-align:left">Organ</th><th style="text-align:left">Lesion</th><th style="text-align:left">Notes</th></tr>
</thead>
<tbody>
<tr><td>Kidney</td><td class="left">Acute Tubular Necrosis (ATN)</td><td class="left">Most common AKI cause; proximal tubule injury; granular "muddy brown" casts on UA</td></tr>
<tr><td>Lung</td><td class="left">ARDS / "Shock Lung"</td><td class="left">Diffuse alveolar damage; protein-rich edema, hyaline membranes; especially septic/traumatic</td></tr>
<tr><td>Heart</td><td class="left">Subendocardial infarction</td><td class="left">Inner 1/3 myocardium ischemia; diffuse non-territorial; ST depression; supply-demand mismatch</td></tr>
<tr><td>Brain</td><td class="left">Ischemic encephalopathy</td><td class="left">Watershed zone infarcts; AMS; neurons and cardiomyocytes cannot regenerate</td></tr>
<tr><td>GI Tract</td><td class="left">Hemorrhagic enteropathy / Ischemic bowel</td><td class="left">Mucosal ulceration; bacterial translocation → superimposed bacteremia</td></tr>
<tr><td>Adrenals</td><td class="left">Cortical lipid depletion</td><td class="left">Maximal steroid synthesis; overwhelming sepsis → Waterhouse-Friderichsen syndrome</td></tr>
<tr><td>Liver</td><td class="left">Centrilobular necrosis / "Shock liver"</td><td class="left">Zone 3 most susceptible; ↑transaminases; may resolve with resuscitation</td></tr>
</tbody>
</table>
</div>
<h2 class="sec-bar bar-gold">9. USMLE High-Yield Pearls ⭐</h2>
<div class="inner">
<ul class="pearl-list">
<li>Only type with <b>HIGH PCWP + LOW CO + HIGH SVR</b> = <b>CARDIOGENIC</b></li>
<li>Only type with <b>LOW SVR + HIGH CO (early)</b> = <b>DISTRIBUTIVE (septic)</b></li>
<li>Hypovolemic vs Cardiogenic: both ↓CO, ↑SVR — key difference is PCWP (↓ in hypovolemic, ↑↑ in cardiogenic)</li>
<li><b>Beck's Triad</b> (tamponade) = Hypotension + JVD + Muffled heart sounds → <b>pericardiocentesis</b></li>
<li><b>Tension PTX</b> = absent breath sounds + tracheal deviation AWAY + JVD → <b>needle decompression 2nd ICS MCL</b></li>
<li>1st-line vasopressor for septic shock = <b>NOREPINEPHRINE</b> (dopamine → ↑arrhythmias, ↑mortality)</li>
<li>1st-line for anaphylaxis = <b>IM EPINEPHRINE (thigh)</b> — NOT antihistamines or steroids first</li>
<li>Lactate >4 mmol/L <b>OR</b> base deficit < −4 mEq/L = presumptive shock regardless of BP</li>
<li><b>Neurogenic shock</b> = hypotension + <b>BRADYCARDIA</b> (all other types → tachycardia)</li>
<li>Cardiogenic shock post-MI: SBP <90 + CI <2.2 L/min/m² + <b>PCWP >18 mmHg</b></li>
<li>Urine output <0.5 mL/kg/h = severe renal hypoperfusion in any shock state</li>
<li><b>SOFA ↑ ≥2</b> from baseline = sepsis; add vasopressor need + lactate >2 mmol/L = <b>septic shock</b></li>
</ul>
</div>
<div class="footer">
Sources: Robbins, Cotran & Kumar (10e) | Harrison's Principles of Internal Medicine (22e) | Rosen's Emergency Medicine |
Goldman-Cecil Medicine | Sabiston & Schwartz Surgery | For educational use only
</div>
</div>
</body>
</html>
shock_notes.html → open in any browser → Ctrl+P → Save as PDFLink to pdf
which wkhtmltopdf; which chromium; which chromium-browser; which google-chrome; which weasyprint; python3 -c "import weasyprint; print('weasyprint ok')" 2>&1
chromium --headless --no-sandbox --disable-gpu --print-to-pdf=/home/daytona/workspace/cpr-guide/Shock_Notes_USMLE.pdf --print-to-pdf-no-header "file:///home/daytona/workspace/cpr-guide/shock_notes.html" 2>&1
Shock Notes USMLE
PDF Document · PDF
Not able to download pdf
<!DOCTYPE html>)shock_notes.html, then double-click to open in your browserPortal htn and symptoms explained with diagram
Medical diagram of portal hypertension showing the portal venous system anatomy. Include: liver with cirrhosis/fibrosis, portal vein, superior mesenteric vein, splenic vein, inferior mesenteric vein. Show portosystemic collateral vessels with arrows indicating blood flow direction: esophageal varices at gastroesophageal junction, caput medusae at umbilicus, hemorrhoids at rectum, and splenorenal shunt. Label normal portal pressure (5-10 mmHg) and hypertensive pressure (>12 mmHg). Show splenomegaly. Use color-coded arrows: red for high pressure portal blood, blue for collateral bypass routes. Clean anatomical illustration style with clear labels.


| Category | Site of Obstruction | Examples |
|---|---|---|
| Prehepatic | Portal vein before liver | Portal vein thrombosis (PVT), splenic vein thrombosis, AV fistula |
| Intrahepatic | Within liver (most common) | Cirrhosis (sinusoidal), schistosomiasis (presinusoidal), veno-occlusive disease (postsinusoidal) |
| Posthepatic | Hepatic veins or beyond | Budd-Chiari syndrome, right heart failure, constrictive pericarditis |
| Site | Collateral Vessel | Clinical Consequence |
|---|---|---|
| Lower esophagus / gastric cardia | Left gastric (coronary) vein ↔ azygos vein | Esophageal & gastric varices → life-threatening hemorrhage |
| Umbilicus | Paraumbilical veins ↔ epigastric veins | Caput medusae (dilated veins radiating from umbilicus) |
| Rectum | Superior rectal vein ↔ middle/inferior rectal veins | Hemorrhoids (anorectal varices) |
| Retroperitoneum | Mesenteric veins ↔ retroperitoneal veins | Retroperitoneal varices (Retzius veins) |
| Spleen → left renal vein | Splenic vein ↔ left renal vein | Splenorenal shunt |
| Parameter | Value |
|---|---|
| Normal portal pressure (HVPG) | <5 mmHg |
| Portal hypertension defined | HVPG >5 mmHg |
| Clinically significant (complications develop) | HVPG >10-12 mmHg |
| High mortality risk | HVPG >16 mmHg |
| Variceal bleeding treatment failure risk | HVPG >20 mmHg |
| SAAG confirming portal hypertension | ≥1.1 g/dL |
| Ascites protein (transudate) | <3 g/dL |
| Complication | Treatment |
|---|---|
| Variceal bleeding (acute) | Octreotide (↓ splanchnic blood flow) + endoscopic band ligation + prophylactic antibiotics |
| Variceal bleeding (prevention) | Non-selective beta-blockers (propranolol/nadolol/carvedilol); band ligation |
| Refractory / recurrent varices | TIPS (transjugular intrahepatic portosystemic shunt) or surgical distal splenorenal shunt |
| Ascites | Sodium restriction + spironolactone ± furosemide; large-volume paracentesis + albumin for refractory |
| SBP | Cefotaxime; prophylaxis with norfloxacin/ciprofloxacin |
| Hepatic encephalopathy | Lactulose (reduces ammonia); rifaximin (reduces gut bacteria) |
| HRS | Terlipressin + albumin; TIPS; liver transplant (definitive) |
| Definitive cure | Liver transplantation |