attachment
attachment

Interpret this table in simplified way

Table 15-4: Evaluating Acid-Base Status in Respiratory Acidosis

The table uses a Ratio = ΔH⁺ / ΔPco₂ (change in hydrogen ions divided by change in CO₂) to figure out what type of acid-base disorder is present.
Here's the simplified breakdown:

The Ratio and What It Means

RatioWhat's HappeningDiagnosis
< 0.3H⁺ rise is much less than expected for the CO₂ riseChronic respiratory acidosis + Metabolic alkalosis (the body is over-compensating)
= 0.3H⁺ rise matches what chronic CO₂ retention would causePure Chronic Respiratory Acidosis
0.3 - 0.8H⁺ rise is between chronic and acute expected valuesChronic respiratory acidosis + Acute respiratory acidosis (mixed) - check pH
= 0.8H⁺ rise matches what acute CO₂ retention would causePure Acute Respiratory Acidosis
> 0.8H⁺ rise is more than even acute respiratory acidosis explainsAcute or Chronic Respiratory Acidosis + Metabolic Acidosis

The Core Concept in Simple Terms

  • When CO₂ rises (respiratory acidosis), H⁺ also rises - but by how much tells you the story:
    • Chronic respiratory acidosis: kidneys compensate over days, so H⁺ rises only a little per unit CO₂ (ratio ~0.3)
    • Acute respiratory acidosis: no kidney compensation yet, so H⁺ rises more per unit CO₂ (ratio ~0.8)
    • If H⁺ rises even more than 0.8 → something extra is adding acid = metabolic acidosis on top
    • If H⁺ rises less than 0.3 → something is neutralizing acid = metabolic alkalosis on top

Explain how to calculate ΔH⁺ and ΔPco₂ from lab values

How to Calculate ΔH⁺ and ΔPco₂ from ABG Values

Both values come from an Arterial Blood Gas (ABG) report.

Step 1: Get Your Lab Values

From the ABG, you need:
  • pH (to convert to H⁺)
  • PaCO₂ (directly given in mmHg)
Normal reference values:
ParameterNormal Value
pH7.40
H⁺40 nmol/L
PaCO₂40 mmHg

Step 2: Convert pH → H⁺ Concentration

pH is a logarithmic scale, so you can't subtract it directly. You must convert to H⁺ first.

The Easy Clinical Formula (the "80 minus" rule):

H⁺ (nmol/L) ≈ 80 − (last two digits of pH)
pHCalculationH⁺
7.4080 - 40= 40 nmol/L
7.3080 - 30= 50 nmol/L
7.2080 - 20= 60 nmol/L
7.5080 - 50= 30 nmol/L
This formula is accurate between pH 7.20 - 7.55. Outside this range, use the exact formula below.

Exact Formula (if needed):

H⁺ = 10^(9 − pH) nmol/L
Example: pH 7.30 → H⁺ = 10^(9−7.30) = 10^1.70 = 50 nmol/L

Step 3: Calculate ΔH⁺ and ΔPco₂

Once you have H⁺, both deltas are simple subtractions from normal:

ΔH⁺ = Patient's H⁺ − 40

ΔPco₂ = Patient's PaCO₂ − 40


Worked Example

ABG result: pH = 7.24, PaCO₂ = 60 mmHg
Step 1 - Convert pH to H⁺:
  • H⁺ = 80 − 24 = 56 nmol/L
Step 2 - Calculate deltas:
  • ΔH⁺ = 56 − 40 = 16
  • ΔPco₂ = 60 − 40 = 20
Step 3 - Calculate ratio:
  • Ratio = 16 ÷ 20 = 0.8
Interpretation: Ratio = 0.8 → Pure Acute Respiratory Acidosis

Quick Summary

1. Read pH and PaCO₂ from ABG
2. H⁺ = 80 − (last 2 digits of pH)
3. ΔH⁺ = H⁺ − 40
4. ΔPco₂ = PaCO₂ − 40
5. Ratio = ΔH⁺ ÷ ΔPco₂ → look up in table
The whole calculation takes about 30 seconds once you memorize the 80-minus rule.

Different sodium bicarbonate preparation and its infusion dose

This is a medical question, so let me check the medical library first.
Searching sources...
Reading File
Finding Sources
Searching the Web

sodium bicarbonate preparations IV infusion dose concentrations clinical

Reading File
Reading File
Here is a complete breakdown of all sodium bicarbonate preparations and their dosing:

Sodium Bicarbonate (NaHCO₃) - Preparations & Dosing


Part 1: Available Preparations

A. IV Injection (Bolus) Vials/Ampules

ConcentrationStrengthVolumeContentTonicity
8.4%1 mEq/mL50 mL50 mEq per ampuleHypertonic (2000 mOsm/L)
7.5%0.9 mEq/mL50 mL44.6 mEq per ampuleHypertonic
4.2%0.5 mEq/mL100 mL50 mEq per vialLess hypertonic
8.4% is the most commonly used in emergencies - each 50 mL ampule = 1 mEq/mL, easy to dose.

B. IV Infusion (Drip) Bags

PreparationVolumeNaHCO₃ contentCarrier fluid
1.26%500 mL75 mEqIsotonic (near-physiologic)
50 mEq in 1L1000 mL50 mEqD5W, 0.45% NS, or sterile water
75 mEq in 1L1000 mL75 mEqD5W or 0.45% NS
100 mEq in 1L1000 mL100 mEqD5W or 0.45% NS
150 mEq in 1L1000 mL150 mEqD5W or sterile water
The 1.26% (isotonic) bag is safest for large-volume infusions - least risk of hypernatremia.

C. Oral Tablets

FormStrength
NaHCO₃ tablets325 mg or 650 mg (= 7.7 mEq per 650 mg tablet)
KHCO₃ tablets25-50 mEq
KHCO₃-citric acid20-40 mEq

Part 2: Dosing by Clinical Situation

1. Metabolic Acidosis (General)

Formula:
Dose (mEq) = 0.3 × Weight (kg) × Base Deficit
  • Give half the calculated dose first, then recheck ABG
  • Non-urgent: 2-5 mEq/kg IV over 4-8 hours
  • Never correct fully in one go - risk of overshoot alkalosis

2. Cardiac Arrest

  • Initial bolus: 1 mEq/kg IV push (= 1 mL/kg of 8.4%)
  • Repeat: 0.5 mEq/kg every 10 minutes
  • Guided by ABG

3. Wide QRS / Sodium Channel Blockade (e.g., TCA overdose, beta-blocker overdose)

  • Bolus: 2-3 mEq/kg rapid IV over 1-2 minutes
    • 70 kg patient = 140-210 mEq = 3-4 ampules of 8.4%
  • Goal: Narrow QRS to < 100-120 ms
  • Maintenance infusion: 3 ampules NaHCO₃ + 1L D5W, run at twice maintenance rate
  • Target serum pH: 7.50-7.55

4. Hyperkalemia (Subacute)

  • Use isotonic (1.26%) infusion - NOT hypertonic push
  • Effect on K⁺ takes 4-6 hours (not useful acutely on its own)
  • Hypertonic bolus does NOT lower K⁺ acutely and risks hypernatremia

5. Urinary Alkalinization (e.g., salicylate toxicity, rhabdomyolysis)

  • Add 150 mEq NaHCO₃ to 850 mL D5W (= 1L bag)
  • Infuse to maintain urine pH > 7.5 and serum pH 7.50-7.55
  • Monitor urine pH hourly

Part 3: Key Practical Points

PointDetail
Central line preferred for 8.4%Hypertonic - can cause tissue necrosis if extravasated
Peripheral useDilute 8.4% → use 1.26% or dilute further
Monitor:ABG, serum Na⁺, K⁺, ionized Ca²⁺, urine pH
Caution:Lowers ionized Ca²⁺ - do not mix with calcium solutions
VentilationIncrease rate during infusion - NaHCO₃ generates CO₂
Overshoot riskNever fully correct acidosis in one session

Sources: StatPearls (NCBI), Tintinalli's Emergency Medicine, Brenner & Rector's The Kidney, FDA prescribing information

Difference between ABG and VBG

ABG comes from arterial blood (usually radial artery), while VBG comes from venous blood. pH and HCO₃ are very similar between the two, but PO₂ is only reliable from ABG. VBG is easier and safer to obtain.
Searching sources...
Reading File
Searching the Web

ABG vs VBG difference clinical correlation pH PCO2 PO2 accuracy

Finding Sources
Reading File
Reading File
Here is a complete, simplified comparison:

ABG vs VBG - Complete Comparison


Part 1: Basic Differences

FeatureABGVBG
Blood sourceArtery (usually radial)Vein (peripheral or central)
Pain levelMore painfulLess painful
DifficultyTechnically harderEasier
Needle-stick riskHigher (arterial pressure)Lower
ComplicationsArterial spasm, hematoma, nerve injury, thrombosisMinimal
Allen's test needed?Yes (before radial puncture)No

Part 2: How the Values Compare

ParameterABG (Normal)VBG (Normal)DifferenceReliable on VBG?
pH7.35-7.457.31-7.41VBG ~0.03-0.05 lower✅ Yes
PCO₂35-45 mmHg41-51 mmHgVBG ~4-6 mmHg higher✅ Yes (screening)
HCO₃22-26 mEq/L22-26 mEq/LEssentially same✅ Yes
Base Excess-2 to +2SimilarMinimal difference✅ Yes
PO₂80-100 mmHg30-50 mmHgVery different❌ No - use SpO₂
Lactate<2 mmol/LSimilarMinimal difference✅ Yes
The key rule: VBG tells you about acid-base status reliably. It tells you nothing about oxygenation - use pulse oximetry (SpO₂) for that instead.

Part 3: The Conversion Formula

If you have a VBG and need to estimate ABG values:
Estimated ABG pH  = VBG pH + 0.05
Estimated ABG PCO₂ = VBG PCO₂ − 5 mmHg
This adjustment improves diagnostic accuracy from ~45% to ~74% (BUMC study, n=187 ICU patients).

Part 4: When to Use Each

✅ VBG is sufficient for:

  • Metabolic acidosis monitoring (DKA, renal failure)
  • Screening for hypercarbia (if VBG PCO₂ normal → arterial PCO₂ almost certainly normal)
  • COPD exacerbation (acid-base assessment)
  • Electrolyte monitoring (Na⁺, K⁺, Cl⁻, iCa²⁺)
  • Lactate measurement
  • Serial monitoring (reduces repeated arterial stabs)

❌ ABG is required when:

  • Oxygenation status is the primary concern (PaO₂ needed)
  • Respiratory failure assessment (exact PaCO₂ matters)
  • VBG PCO₂ is elevated (> 45 mmHg) - need the exact arterial value
  • Major trauma
  • Titrating mechanical ventilation
  • VBG shows abnormal result and exact arterial values are needed to guide management

Part 5: Quick Memory Aid

VBG = ACID-BASE ✅ + OXYGENATION ❌
ABG = ACID-BASE ✅ + OXYGENATION ✅

If VBG is normal → ABG is almost certainly normal
If VBG is abnormal → may need ABG to confirm and quantify

Sources: Harriet Lane Handbook (23rd ed.), Rosen's Emergency Medicine, emDocs clinical review, BUMC prospective study (n=187), Springer International Journal of Emergency Medicine

Give me full note on atrial fibrillation pathophysiology, etiology, diagnosis and management according to latest guideline for emergency physician.

Finding Sources
Searching PubMed

"atrial fibrillation"[MeSH Terms] AND "guideline"[pt]

Searching the Web

atrial fibrillation 2023 2024 ACC AHA ESC guidelines emergency management

Reading File
Reading File
Reading File
Finding Sources
Reading Web Page

https://amu.hr/article/current-management-of-atrial-fibrilla…

Reading File
Finding Sources
Reading File
Reading File
Here is the full clinical note on Atrial Fibrillation for the emergency physician:

Atrial Fibrillation - Emergency Physician's Complete Note

Guidelines referenced: 2023 ACC/AHA/ACCP/HRS (Circulation 2024;149:e1-e156) | 2024 ESC/EACTS Guidelines (Eur Heart J 2024;45:3314)

1. DEFINITION & CLASSIFICATION

AF is the most common sustained cardiac arrhythmia, characterized by disorganized atrial electrical activity replacing normal sinus rhythm.

2023 ACC/AHA Staging (new concept - replaces old terminology)

StageDescription
Stage 1At risk for AF (risk factors present, no AF yet)
Stage 2Pre-AF (structural/electrical changes, no documented AF)
Stage 3AF present - subdivided as:
3aParoxysmal - terminates spontaneously, usually <7 days
3bPersistent - sustained >7 days, requires cardioversion
3cLong-standing persistent - continuous AF >12 months
3dSuccessful AF ablation
Stage 4Permanent AF - rhythm control no longer pursued

2. PATHOPHYSIOLOGY

Triggering Mechanism

  • Multiple micro-reentry circuits within atrial tissue generate 300-600 atrial impulses/min
  • The AV node acts as a gatekeeper, allowing only some impulses to reach the ventricles (typically 100-180 bpm at rest)
  • Result: irregularly irregular ventricular response

Electrophysiologic Substrate

  • Pulmonary vein foci - ectopic firing from pulmonary vein ostia is the most important trigger (basis of ablation therapy)
  • Atrial fibrosis and remodeling - structural changes that perpetuate re-entry
  • Electrical remodeling - AF begets AF; the longer AF persists, the harder it is to convert ("AF promotes AF")

Hemodynamic Consequences

  1. Loss of atrial kick - normally contributes 15-30% of cardiac output; loss is particularly harmful in patients with diastolic dysfunction or hypertrophic cardiomyopathy
  2. Rapid ventricular rate - reduces diastolic filling time, drops stroke volume
  3. Tachycardia-induced cardiomyopathy - prolonged rapid AF can cause reversible LV dysfunction
  4. Thrombus formation - stasis in left atrial appendage (LAA) → thrombus → systemic embolization → stroke (3-5x increased stroke risk)

3. ETIOLOGY

Cardiac Causes

CauseNotes
Hypertensive heart diseaseMost common overall cause
Ischemic heart disease / MIEspecially after acute MI
Valvular diseaseMitral disease most strongly associated
Congestive heart failureUp to 1/3 of CHF patients have AF
CardiomyopathyDilated and hypertrophic
Pericarditis / myocarditisInflammatory trigger
Cardiac surgeryPost-op AF very common
WPW / Accessory pathwaySpecial management consideration
Sick sinus syndromeBrady-tachy syndrome

Non-Cardiac / Systemic Causes

CauseNotes
HyperthyroidismScreen all new AF - get TSH
Pulmonary embolismAcute right heart strain
Sepsis / infectionSystemic inflammation
Alcohol"Holiday heart syndrome" - binge drinking
Catecholamine excessStress, pheochromocytoma, stimulants
Electrolyte disturbanceHypokalemia, hypomagnesemia
Myocardial contusionTrauma
Obstructive sleep apneaMajor modifiable risk factor
ObesityIndependent risk factor
Lone AF (idiopathic)No identifiable cause, usually younger patients

4. CLINICAL PRESENTATION

Symptoms (variable)

  • Palpitations (most common)
  • Dyspnea / exercise intolerance
  • Chest discomfort
  • Fatigue / light-headedness
  • Syncope or pre-syncope
  • Silent AF - found incidentally on ECG; especially in elderly

Signs

  • Irregularly irregular pulse (hallmark)
  • Variable pulse deficit (radial vs apical)
  • Signs of hemodynamic compromise (hypotension, diaphoresis, pulmonary edema) in unstable AF

Red Flags in ED

  • HR > 150 with hypotension → unstable → immediate cardioversion
  • Wide QRS with AF → consider WPW or aberrancy (never give AV nodal blockers in WPW)
  • New onset AF with chest pain → ACS trigger or consequence
  • Stroke symptoms + AF → urgent imaging

5. DIAGNOSIS

ECG Findings (Gold Standard)

  • Absent P waves (replaced by fibrillatory "f" waves - coarse or fine)
  • f waves best seen in lead V1 and inferior leads
  • Irregularly irregular RR intervals - the hallmark
  • QRS usually narrow (unless aberrancy/BBB/WPW)

ECG Pitfalls

ScenarioFindingAction
Wide QRS + irregular rhythm + HR >200Suspect WPWAvoid AV nodal blockers → use procainamide
Wide QRS + irregular + HR <200BBB with AFAV nodal blocking safe
Ashman phenomenonLong-short cycle → aberrant RBBB beatDon't mistake for PVC/VT
Regular rhythm in "AF"May be flutter with fixed blockCheck for flutter waves

Workup in ED

TestPurpose
12-lead ECGConfirm AF, look for WPW, ischemia, LVH
TroponinExclude ACS as trigger or consequence
BMP / electrolytesK⁺, Mg²⁺, renal function (for drug dosing)
TSHRule out thyrotoxicosis
CBCAnemia, infection
Chest X-rayHeart failure, pulmonary pathology
Coagulation (INR/PT)If anticoagulation planned or patient on warfarin
Echo (bedside or formal)LV function, valve disease, clot if available

6. EMERGENCY MANAGEMENT

Step 1: Is the Patient Hemodynamically UNSTABLE?

Unstable = hypotension, acute pulmonary edema, altered consciousness, ongoing ischemia
  • → Immediate synchronized DC cardioversion (do NOT delay for anticoagulation)
  • Give anticoagulation as soon as possible before/during cardioversion (LMWH or UFH bolus)
  • Start at 120-200 J biphasic (biphasic preferred - 94% vs 84% efficacy vs monophasic)
  • Continue OAC for at least 4 weeks post-cardioversion

Step 2: Stable Patient - Rate vs. Rhythm Control Decision

Rate Control Strategy

First-line for: older patients, asymptomatic/mildly symptomatic, heart failure with low EF (avoid non-DHP CCBs), AF >48 hours without anticoagulation
DrugDoseNotes
Metoprolol IV2.5-5 mg IV over 2 min, repeat q5min up to 15 mgBeta-blocker of choice; safe in HF
Diltiazem IV0.25 mg/kg over 2 min, then 5-15 mg/hr infusionHighly effective; avoid in HF with low EF
Verapamil IV2.5-5 mg over 2 min, repeat 5-10 mgAvoid in HF
Digoxin IV0.5 mg IV loading, then 0.25 mg q6hSlow onset; good for HF + AF
Amiodarone IV150 mg over 10-15 minUse when others contraindicated; also has rhythm control effect
Target heart rate:
  • Resting HR < 110 bpm acceptable if asymptomatic with preserved LV function (lenient strategy)
  • Resting HR < 80 bpm if symptomatic or heart failure (strict strategy - AHA Class IIa)

Rhythm Control Strategy

Prefer for: new-onset AF <24-48 hours, younger/symptomatic patients, hemodynamically unstable, heart failure with reduced EF (catheter ablation - NOT antiarrhythmic drugs)

A. Pharmacologic Cardioversion (chemical cardioversion)

DrugDoseNotes
Procainamide30-50 mg/min IV up to 18-20 mg/kg (max 12 mg/kg in CHF)First-line if WPW suspected
Ibutilide0.015-0.02 mg/kg IV over 10-15 minHighest conversion rate; avoid in structural heart disease
Amiodarone150 mg IV over 10-15 min → 1 mg/min x6h → 0.5 mg/min x18hSafe in structural heart disease
Flecainide300 mg oral ("pill-in-pocket")Contraindicated in structural/ischemic heart disease
Propafenone600 mg oralSame contraindications as flecainide

B. Electrical Cardioversion (DC cardioversion)

  • Synchronized cardioversion - mandatory (avoids R-on-T)
  • Start: 120-200 J biphasic
  • Success rate higher than pharmacologic conversion
  • Combined strategy: pharmacologic first, then electrical if not converted in 30 min → reduces need for electrical shock in ~50% of cases
  • Up to 50% of new-onset AF converts spontaneously within 24 hours - observation is an option

Step 3: Anticoagulation Decision

AF Duration < 48 hours

  • Cardioversion can proceed without prior anticoagulation
  • Give anticoagulation before cardioversion regardless (LMWH or UFH bolus)
  • Continue OAC for at least 4 weeks post-cardioversion (post-cardioversion stunning risk)
  • Exception: patients without thromboembolic risk factors (CHA₂DS₂-VA = 0) who restore sinus rhythm within 24 hours may omit 4-week anticoagulation

AF Duration > 48 hours (or unknown duration)

  • Do NOT cardiovert unless:
    • Patient has been on therapeutic anticoagulation for ≥3 weeks (DOAC adherence or INR ≥2.0), OR
    • TEE performed showing no LAA thrombus
  • Then cardiovert and continue OAC ≥4 weeks post-cardioversion

Long-term Anticoagulation: CHA₂DS₂-VASc Score

Risk FactorPoints
C - Congestive heart failure1
H - Hypertension1
A₂ - Age ≥ 75 years2
D - Diabetes mellitus1
S₂ - Prior Stroke/TIA/embolism2
V - Vascular disease (MI, PAD, aortic plaque)1
A - Age 65-74 years1
Sc - Sex category (female)1
Maximum9
ScoreRecommendation
0 (male) / 1 (female)No anticoagulation needed
1 (male)Anticoagulation should be considered
≥2 (male) / ≥3 (female)Oral anticoagulation recommended

DOAC Preferred Over Warfarin (2023 ACC/AHA, 2024 ESC - Class I)

DOACDose (standard)Notes
Apixaban5 mg BD (2.5 mg BD if ≥2 of: age ≥80, weight ≤60 kg, Cr ≥1.5 mg/dL)Lowest bleeding risk; preferred in most
Rivaroxaban20 mg OD with evening mealOnce daily convenience
Dabigatran150 mg BD (110 mg BD if age >75 or high bleed risk)Only direct thrombin inhibitor
Edoxaban60 mg OD (30 mg if CrCl 15-50, weight ≤60 kg)Less data in ED
WarfarinTarget INR 2.0-3.0Use only for valvular AF (mechanical valve, rheumatic mitral stenosis)
ESC 2024 recommends initiating DOAC in the ED for eligible high-stroke-risk AF patients - don't wait for outpatient follow-up.

Step 4: Special Situations

WPW + AF (Pre-excitation AF)

  • ECG: wide, irregular QRS, rate often >200 bpm
  • NEVER give: adenosine, diltiazem, verapamil, digoxin, amiodarone (all can accelerate accessory pathway conduction → VF)
  • Give: Procainamide IV (drug of choice) or immediate DC cardioversion if unstable

AF + Acute Heart Failure

  • Rate control with beta-blocker (metoprolol) or digoxin (avoid verapamil/diltiazem)
  • Early rhythm control via catheter ablation (not antiarrhythmic drugs) improves outcomes in HFrEF

AF + ACS

  • Urgent coronary angiography if ongoing ischemia
  • Triple therapy risk (OAC + dual antiplatelet) - minimize duration; usually move to dual therapy (OAC + P2Y12) after 1 week

Thyrotoxic AF

  • Beta-blockade for rate control (propranolol preferred - also blocks T4→T3 conversion)
  • Treat underlying thyroid disease
  • Cardioversion often deferred until euthyroid

Post-cardioversion Monitoring

  • Observe for minimum 30-60 minutes after cardioversion
  • Watch for: re-initiation of AF, bradycardia, thromboembolic events
  • 80% of patients can be safely discharged from ED after successful rate/rhythm control

7. ED DISPOSITION GUIDE

SituationDisposition
Successful rate/rhythm control, hemodynamically stableDischarge with OAC + rate control + cardiology follow-up
Persistent AF, controlled rate, low-risk patientDischarge with outpatient plan
Uncontrolled rate despite therapyAdmit
New heart failure, pulmonary edema, ongoing ischemiaAdmit
Failed cardioversion, unstableAdmit (CCU/monitored bed)
Unknown AF duration, no anticoagulation, needs cardioversionAdmit or arrange TEE
Stroke/TIA associated with AFAdmit neurology/stroke team

8. AF-CARE Framework (2024 ESC - New Model)

The ESC 2024 guidelines restructure AF management around the AF-CARE model:
LetterPrinciple
CComorbidity and risk factor management (weight, BP, diabetes, sleep apnea, alcohol)
AAvoiding stroke and thromboembolism (anticoagulation)
RReducing symptoms (rate/rhythm control)
EEvaluation and dynamic reassessment (regular follow-up, monitoring)

Quick Reference: ED Decision Tree

AF on ECG
    │
    ├─ UNSTABLE? (↓BP, pulmonary edema, altered consciousness)
    │       └─ YES → Immediate Synchronized DC Cardioversion + Anticoagulate ASAP
    │
    └─ STABLE?
            │
            ├─ Duration < 48h? → Cardiovert (electrical or pharmacologic)
            │       └─ Anticoagulate before + continue ≥4 weeks after
            │
            ├─ Duration > 48h? → Rate Control first
            │       └─ Cardiovert only after 3 weeks anticoagulation OR TEE clear
            │
            ├─ WPW suspected? → Procainamide or DC cardioversion ONLY
            │
            └─ All stable patients → Calculate CHA₂DS₂-VASc → Start DOAC if score ≥2

Sources: Rosen's Emergency Medicine (10th ed.) | Tintinalli's Emergency Medicine | Braunwald's Heart Disease | 2023 ACC/AHA/ACCP/HRS Guideline (PMID 38043043) | 2024 ESC Guidelines (PMID 39210723)This is a full emergency physician-oriented AF note covering everything from pathophysiology to the latest 2023 ACC/AHA and 2024 ESC guidelines. A few highlights to remember at the bedside:
  1. WPW + AF is a trap - the wide irregular rhythm above 200 bpm needs procainamide or DC cardioversion, not AV nodal blockers
  2. The 48-hour rule governs cardioversion safety without prior anticoagulation
  3. ESC 2024 now recommends starting DOACs in the ED - don't defer to outpatient
  4. 80%+ of AF patients can be safely discharged from the ED after adequate rate/rhythm control
  5. The new AF-CARE framework shifts focus toward managing underlying comorbidities (weight, OSA, hypertension, alcohol) as equal pillars alongside anticoagulation and rate/rhythm control

Pulmonary TB latest WHO update

Reading File
Searching the Web

WHO tuberculosis guidelines 2024 2025 latest update treatment

Searching PubMed

"tuberculosis"[MeSH Terms] AND "WHO" AND "guideline"[pt]

Finding Sources
Reading Web Page

https://www.who.int/news/item/08-10-2025-who-releases-new-gu…

Searching the Web

WHO consolidated guidelines tuberculosis module 4 2025 DS-TB DR-TB treatment update summary

Reading File
Reading Web Page

https://pmc.ncbi.nlm.nih.gov/articles/PMC12248249

Reading File
Searching the Web

WHO 2025 Module 4 tuberculosis 4-month regimen isoniazid rifapentine moxifloxacin pyrazinamide DS-TB update

Finding Sources
Reading File
Now I have comprehensive information from textbooks, WHO guidelines, and the latest 2025 updates. Let me compile the full note.

Pulmonary Tuberculosis - Full Clinical Note with Latest WHO 2025 Updates

Guidelines referenced:
  • WHO Consolidated Guidelines Module 4 (April 2025) - DS-TB & DR-TB
  • WHO Module 6 (October 2025) - TB & Comorbidities (Undernutrition)
  • ATS/CDC/ERS/IDSA 2025 Clinical Practice Guideline (AJRCCM, January 2025)
  • WHO Global TB Report 2024

1. EPIDEMIOLOGY & BURDEN

  • TB remains the leading infectious disease killer globally (second only to COVID-19 in recent years)
  • 10.8 million new TB cases reported in 2023 (WHO Global TB Report 2024)
  • ~10% of all TB cases are drug-resistant (MDR/RR-TB)
  • High-burden countries: India, Indonesia, China, Philippines, Pakistan, Nigeria, Bangladesh, South Africa
  • Undernutrition is the single largest modifiable risk factor (new WHO 2025 focus)

2. ETIOLOGY & MICROBIOLOGY

  • Causative agent: Mycobacterium tuberculosis (aerobic, slow-growing, acid-fast bacillus)
  • Transmission: airborne - droplet nuclei (1-5 µm) from infectious pulmonary/laryngeal TB
  • Infectiousness depends on: cavitary disease, AFB smear positivity, cough frequency, inadequate ventilation
  • Only ~10% of infected immunocompetent individuals develop active disease over a lifetime (90% maintain latent infection)

Risk Factors for Progression from Latent to Active TB

CategoryExamples
ImmunosuppressionHIV (highest risk - 5-10% per year), TNF-α inhibitors, organ transplant, steroids
MalnutritionBMI < 18.5 - major independent risk factor (new WHO emphasis 2025)
Diabetes mellitus3x increased risk
SilicosisOccupational exposure
CKD / dialysisUremia-induced immune suppression
Alcohol use disorderSocial + immune factors
Recent TB infection<2 years from exposure
Extremes of ageInfants, elderly
Tobacco smokingIndependent risk factor

3. PATHOPHYSIOLOGY

Primary Infection

  1. Bacilli inhaled → deposited in alveoli → engulfed by alveolar macrophages
  2. Initially uncontrolled replication → spread to hilar lymph nodes (forming Ghon complex)
  3. Immune response (2-8 weeks): T-cell mediated → granuloma formation
  4. Granuloma = organized collection of activated macrophages, epithelioid cells, Langhans giant cells, lymphocytes
  5. Central caseous necrosis occurs in granuloma - this is the hallmark of TB
  6. In most: granuloma contains infection → latent TB infection (LTBI)

Reactivation (Post-Primary TB)

  • Latent bacilli survive inside granulomas for years/decades
  • Disruption of immune control → bacilli reactivate → progressive disease
  • Characteristic location: apical and posterior segments of upper lobes (high O₂ tension)
  • Cavity formation: caseous material liquefies → drains into bronchus → cavity + airborne transmission

Key Immunology Concepts

  • TST (Mantoux) and IGRA measure T-cell sensitization to TB antigens - positive = prior exposure
  • Cavity = most infectious (highest bacillary load + direct bronchial communication)
  • HIV coinfection: CD4 <200 → atypical presentation, no cavity, lower lobe involvement, smear-negative but culture-positive

4. CLINICAL PRESENTATION

Pulmonary TB (most common form)

Constitutional symptoms (all are subacute/chronic):
  • Persistent cough >2-3 weeks (productive or dry)
  • Fever (low-grade, afternoon)
  • Night sweats
  • Weight loss / anorexia
  • Fatigue
  • Hemoptysis (advanced/cavitary disease)
  • Note: up to 25% of culture-confirmed TB do not report cough
Physical Examination:
  • Often non-specific
  • Post-tussive rales in upper zones
  • Amphoric (hollow) breath sounds = cavity
  • Advanced: signs of consolidation, pleural effusion

Special Presentations

ScenarioFeatures
HIV coinfection (CD4 <200)Lower lobe, no cavity, smear-negative, miliary pattern, normal CXR possible
Miliary TBHematogenous dissemination, 1-2 mm granulomas in lungs/liver/bone marrow, fundoscopic choroidal tubercles
Primary progressiveMiddle/lower lobe consolidation, hilar adenopathy
ElderlyAtypical symptoms, lower lobe involvement, confused with other diagnoses
TB pleuritisExudative effusion, pleuritic chest pain, 3-6 months post-infection
IRIS (TB-immune reconstitution)Paradoxical worsening after starting ART in HIV patients

5. DIAGNOSIS

Step 1: Suspect TB - Who to Test

Evaluate any patient with:
  • Cough >2 weeks + fever/sweats/weight loss
  • Hemoptysis
  • Abnormal CXR (upper lobe infiltrate, cavity, fibrosis)
  • Known HIV + any respiratory symptoms
  • Contact with confirmed TB case
  • Migrant from high-burden country

Step 2: Chest Radiography

FindingSignificance
Apical/posterior upper lobe infiltrateClassic reactivation TB
CavitationActive, highly infectious
Tree-in-bud opacitiesEndobronchial spread
Miliary pattern (1-2 mm nodules)Hematogenous dissemination
Ghon complex / Ranke complexHealed primary infection
Hilar adenopathyPrimary disease
Lower lobe + no cavityHIV-related or primary
Normal CXRDoes NOT exclude TB in HIV patients
CT chest is more sensitive than plain CXR, especially in HIV or subtle disease.

Step 3: Microbiological Diagnosis

TestSpecimenSensitivityNotes
Sputum AFB smear (ZN stain)3 sputum samples (early morning)45-80%Rapid, cheap; positive = infectious; negative doesn't exclude
Sputum culture (gold standard)Sputum/BAL80-90%Takes 2-8 weeks (liquid media 2-3 wks; solid 6-8 wks); confirms diagnosis & DST
Xpert MTB/RIF (GeneXpert)Sputum/BAL/tissue88% (smear+ve), 68% (smear-ve)WHO first-line rapid test - 2 hours; also detects rifampicin resistance
Xpert MTB/RIF UltraAnySlightly more sensitive than standardBetter for paucibacillary/extrapulmonary
TB-LAMPSputumSimilar to smearPoint-of-care; less widely available
Line probe assay (LPA)Culture/sputum-Detects INH & RIF resistance (Hain GenoType)
Whole genome sequencingCultureReferenceComprehensive DST; not yet routine

Step 4: Immunological Tests

TestMethodInterpretation
Tuberculin Skin Test (TST/Mantoux)5 TU PPD ID → read induration at 48-72h≥5 mm (HIV/immunocompromised); ≥10 mm (high-risk); ≥15 mm (low-risk)
IGRA (QuantiFERON-TB Gold Plus / T-SPOT.TB)Blood test; measures IFN-γ to ESAT-6/CFP-10Preferred over TST in BCG-vaccinated individuals
TST/IGRA = positive means prior exposure / LTBI - DOES NOT diagnose active TB. Active TB requires microbiological confirmation.

Diagnostic Algorithm (WHO-recommended)

Symptoms of TB (cough >2wks, fever, weight loss, night sweats)
        ↓
Chest X-ray
        ↓
Xpert MTB/RIF (first-line WHO diagnostic tool)
    ├─ MTB detected, RIF resistant → MDR-TB workup → LPA/DST
    ├─ MTB detected, RIF sensitive → DS-TB treatment
    └─ MTB not detected → sputum culture + clinical evaluation
                          ├─ Culture positive → TB treatment
                          └─ Culture negative + clinical improvement on treatment → culture-negative TB

6. TREATMENT - LATEST WHO & ATS/CDC 2025 UPDATES

A. Drug-Susceptible TB (DS-TB)

Standard 6-Month Regimen (remains an alternative option - WHO 2022/2025)

2HRZE / 4HR
PhaseDurationDrugsAbbreviation
Intensive2 monthsIsoniazid (H) + Rifampicin (R) + Pyrazinamide (Z) + Ethambutol (E)2HRZE
Continuation4 monthsIsoniazid (H) + Rifampicin (R)4HR

🆕 NEW 4-Month Regimen (WHO 2022 / ATS/CDC/ERS/IDSA 2025 - Conditionally Recommended)

2HPZM / 2HPM (rifapentine-moxifloxacin regimen)
PhaseDurationDrugs
Intensive2 monthsIsoniazid (H) + Rifapentine (P) + Pyrazinamide (Z) + Moxifloxacin (M)
Continuation2 monthsIsoniazid (H) + Rifapentine (P) + Moxifloxacin (M)
Key evidence: The TBTC Study 31 / ACTG A5349 trial showed this 4-month regimen is non-inferior to the 6-month standard (disease-free survival at 12 months, similar adverse events 18.8% vs 19.3%)
Eligibility (≥12 years old):
  • Drug-susceptible pulmonary TB confirmed
  • NOT for: confirmed/suspected MDR-TB, HIV on efavirenz-based ART (drug interaction with rifapentine), pregnancy (insufficient data), extrapulmonary TB (evidence limited)
Dosing (by weight - all taken daily with food):
Drug40-55 kg56-75 kg76-90 kg
Isoniazid300 mg300 mg300 mg
Rifapentine900 mg1200 mg1500 mg
Moxifloxacin400 mg400 mg400 mg
Pyrazinamide (intensive phase only)1000 mg1500 mg2000 mg
Always give pyridoxine (B6) 25-50 mg/day with isoniazid to prevent peripheral neuropathy.

🆕 4-Month Regimen for Children (Non-Severe TB, 3 months - 16 years)

2HRZE / 2HR (instead of the standard 2HRZE/4HR)
  • WHO now recommends the shorter 4-month regimen for children with non-severe TB (no suspicion of MDR/RR-TB)
  • Non-severe = peripheral lymphadenopathy, uncomplicated pulmonary disease without cavitation

B. Drug-Resistant TB (DR-TB)

Definitions

TermDefinition
MDR-TBResistant to isoniazid AND rifampicin
RR-TBRifampicin-resistant (treated same as MDR-TB)
Pre-XDR-TBMDR/RR-TB + resistant to any fluoroquinolone
XDR-TBMDR/RR-TB + resistant to fluoroquinolone + bedaquiline OR linezolid

🆕 BPaLM Regimen - NOW Preferred for MDR/RR-TB (WHO 2022 onwards, reinforced 2025)

6 months - BPaLM
DrugDose
B - Bedaquiline400 mg OD x 2 weeks → 200 mg 3x/week x 22 weeks
Pa - Pretomanid200 mg OD
L - Linezolid600 mg OD (may reduce to 300 mg for toxicity)
M - Moxifloxacin400 mg OD
If fluoroquinolone-resistant: use BPaL (without moxifloxacin) - same duration
Evidence: ZeNix and TB-PRACTECAL trials demonstrated BPaLM superior to the older 9-20 month injectable-based regimens with fewer adverse events and better treatment success rates.
WHO strongly recommends: Injectable agents (amikacin, kanamycin, capreomycin) are no longer preferred in MDR-TB - they are relegated to salvage regimens only.

Grouping of DR-TB Drugs (WHO Priority)

GroupDrugsRole
Group A (always include if possible)Levofloxacin OR Moxifloxacin, Bedaquiline, LinezolidCore agents
Group B (add to complete regimen)Clofazimine, Cycloserine/TerizidoneAdd-ons
Group C (when Groups A&B insufficient)Ethambutol, Delamanid, Pyrazinamide, Imipenem-cilastatin, Amikacin, Ethionamide, PASLast resort

C. Latent TB Infection (LTBI) - Preventive Therapy

RegimenDurationNotes
1HP (Isoniazid + Rifapentine weekly)1 month (12 doses)Preferred - shortest, highest completion
3HP (Isoniazid + Rifapentine weekly)3 months (12 doses)WHO preferred option
3HR (Isoniazid + Rifampicin daily)3 monthsAlternative
6H (Isoniazid daily)6 monthsAlternative; 9H also acceptable

7. WHO 2025 NEW UPDATES - SUMMARY

Module 4 Update (April 15, 2025)

  1. 4-month DS-TB regimen (2HPZM/2HPM) now formally included alongside the 6-month standard
  2. Updated evidence for BPaLM as preferred MDR-TB regimen with refined dosing guidance
  3. New guidance on treatment monitoring - culture conversion at 2 months remains key milestone
  4. Strengthened recommendations for DST before treatment for all patients

Module 6 Update (October 7, 2025) - TB & Undernutrition

  1. Nutritional assessment and counselling mandatory for ALL people with TB and household contacts
  2. Nutritional interventions recommended for all TB patients with undernutrition (regardless of age, drug resistance, pregnancy, or severity)
  3. Food assistance to household contacts in food-insecure settings to prevent TB (supported by RATIONS trial evidence)
  4. Operational handbook released to support country-level implementation

8. MONITORING & FOLLOW-UP

TimepointAction
BaselineSputum AFB x3, culture, LFTs, CBC, creatinine, uric acid, visual acuity (if ethambutol)
2 months (end of intensive phase)Repeat sputum culture - culture conversion is KEY prognostic marker
MonthlyClinical assessment, symptom review, adherence check
End of treatmentSputum smear + culture; CXR
Adverse effects monitoringLFTs monthly (isoniazid/rifampicin hepatotoxicity); vision (ethambutol); hearing (aminoglycosides); QTc (bedaquiline, fluoroquinolones, clofazimine)

Drug-induced Hepatotoxicity (DILI) - Threshold for stopping

Stop hepatotoxic anti-TB drugs if: ALT >3x ULN with symptoms OR ALT >5x ULN without symptoms

9. INFECTION CONTROL

  • Airborne precautions: N95 respirator for healthcare workers (not surgical mask)
  • Negative pressure isolation rooms for hospitalized patients
  • Patient education: cover cough, natural ventilation
  • Continue isolation until: 3 consecutive negative sputum smears (after starting treatment)
  • TB is notifiable in virtually all countries

10. TB SPECIAL POPULATIONS

PopulationKey Considerations
HIV + TBStart TB treatment FIRST → add ART within 2-8 weeks (2 weeks if CD4 <50); use rifabutin instead of rifampicin with PIs; beware IRIS
Pregnancy2HRZE/4HR standard regimen (rifampicin + pyrazinamide generally safe); avoid aminoglycosides (ototoxicity); pyridoxine essential
Children4-month regimen for non-severe TB now recommended; weight-based dosing
DiabetesMonitor glycaemia closely; rifampicin reduces OHG levels
CKD/DialysisAvoid ethambutol (accumulates); adjust pyrazinamide; rifampicin dose unchanged
Liver diseaseAvoid pyrazinamide if severe; monitor LFTs closely

11. END TB STRATEGY TARGETS (2030)

  • 90% reduction in TB deaths (vs 2015)
  • 80% reduction in TB incidence rate
  • No TB-affected families facing catastrophic costs
  • Key 2027 milestone: license at least one new TB vaccine

Sources: Goldman-Cecil Medicine (26th ed.) | Murray & Nadel's Respiratory Medicine | Tintinalli's Emergency Medicine | WHO Module 4 (April 2025) | WHO Module 6 (October 2025) | ATS/CDC/ERS/IDSA 2025 Guidelines (PMID via PMC11755361) | PMC TB Drug Resistance Review 2025

Stroke recent update 2026

Finding Sources
Searching PubMed

"ischemic stroke"[MeSH Terms] AND "guideline"[pt]

Searching the Web

stroke guidelines 2025 2026 AHA ASA update ischemic stroke treatment thrombolysis thrombectomy

Excellent - there's a brand new AHA/ASA 2026 guideline published January 26, 2026. Let me get full details on it plus core textbook content.
Reading Web Page

https://www.tctmd.com/news/ahaasa-release-new-comprehensive-…

Reading Article

PMID: 41582814

Finding Sources
Reading File
Searching the Web

2026 AHA ASA stroke guideline blood pressure management thrombectomy window extended pediatric dysphagia secondary prevention

Reading File
Reading Web Page

https://recapem.com/update-on-management-of-acute-ischemic-s…

Stroke - Full Clinical Note with 2026 Updates

Primary Guideline: AHA/ASA 2026 Guideline for the Early Management of Patients with Acute Ischemic Stroke Published: January 26, 2026 | Stroke journal | DOI: 10.1161/STR.0000000000000513 (Replaces 2018 guidelines and 2019 update)
Also referenced: ESO 2025 BP update (Eur Stroke J, May 2026) | ESO 2024 PFO guidelines | ILEP 2026 lipid management consensus

1. STROKE OVERVIEW & CLASSIFICATION

Definition

Stroke = sudden-onset focal neurological deficit due to vascular brain injury, lasting >24 hours (or any duration with imaging confirmation)

Types

TypeProportionMechanism
Ischemic stroke~87%Thrombotic / embolic / small vessel occlusion
Intracerebral hemorrhage (ICH)~10%Hypertensive rupture / amyloid angiopathy
Subarachnoid hemorrhage (SAH)~3%Aneurysmal rupture

TOAST Classification (Ischemic Stroke Subtypes)

SubtypeFeatures
Large artery atherosclerosisStenosis/occlusion >50% of major artery; cortical or cerebellar deficit
CardioembolicCardiac source (AF, valvular, LV thrombus); sudden onset, maximal at onset
Small vessel (lacunar)Deep penetrating artery; classic lacunar syndromes; no cortical features
Other determined etiologyCoagulopathy, dissection, vasculitis, CADASIL
CryptogenicNo cause found despite workup

2. PATHOPHYSIOLOGY

Ischemic Penumbra Concept

  • Core: irreversibly infarcted tissue (CBF < 10 mL/100g/min) - cannot be saved
  • Penumbra: ischemic but viable tissue (CBF 10-20 mL/100g/min) - TARGET of reperfusion therapy
  • Time is brain: ~1.9 million neurons lost per minute in untreated stroke
  • The penumbra-to-core ratio (mismatch) drives eligibility for extended-window treatment

Mechanisms of Ischemic Injury

  1. ATP depletion → failure of Na⁺/K⁺ ATPase → cellular swelling
  2. Glutamate excitotoxicity → calcium influx → mitochondrial dysfunction
  3. Free radical production → lipid peroxidation
  4. Inflammation → cytokine release → secondary injury
  5. Blood-brain barrier breakdown → vasogenic edema

Hemorrhagic Transformation

  • Can occur spontaneously or after reperfusion therapy
  • Large infarct core, high BP, delayed reperfusion = risk factors
  • Types: HI1, HI2 (petechial), PH1, PH2 (parenchymal hematoma - PH2 = clinical worsening)

3. RISK FACTORS

ModifiableNon-modifiable
Hypertension (most important)Age (risk doubles per decade >55)
Atrial fibrillationMale sex (slightly)
Diabetes mellitusRace (Black > White)
DyslipidemiaFamily history
SmokingPrior stroke/TIA
Obesity / physical inactivityHereditary conditions (CADASIL, etc.)
Excessive alcohol
OSA
Patent foramen ovale (PFO)

4. CLINICAL PRESENTATION

FAST / BE-FAST Recognition

LetterSymptom
BBalance - sudden loss
EEyes - sudden vision loss or double vision
FFace drooping (unilateral)
AArm weakness
SSpeech difficulty (slurred or incomprehensible)
TTime - call emergency services immediately

Stroke Syndromes by Territory

TerritoryKey Features
MCA (anterior circulation)Contralateral hemiplegia (arm > leg), hemisensory loss, aphasia (dominant), neglect (non-dominant), gaze deviation toward lesion
ACAContralateral leg weakness > arm, personality change, incontinence
PCAContralateral homonymous hemianopia, thalamic involvement (sensory loss), alexia without agraphia
Basilar arteryLocked-in syndrome, coma, cranial nerve palsies, cerebellar signs, "crossed" deficits
PICA (lateral medullary - Wallenberg)Ipsilateral facial + contralateral body sensory loss, ipsilateral Horner's, dysphagia, vertigo, hiccups
Lacunar syndromesPure motor hemiplegia, pure sensory stroke, ataxic hemiparesis, dysarthria-clumsy hand

NIHSS (National Institutes of Health Stroke Scale)

  • Scores 0-42; higher = more severe
  • 0-5 = minor; 6-15 = moderate; 16-20 = moderate-severe; >20 = severe
  • 2026 update: NIHSS no longer sole gatekeeper for IVT - see treatment section

5. DIAGNOSIS

Prehospital

  • Cincinnati Prehospital Stroke Scale (CPSS): face, arm, speech - 1 abnormal = 72% stroke likelihood
  • Activate stroke protocol immediately
  • 2026 guideline: Direct transport to endovascular thrombectomy (EVT)-capable hospital preferred when rapid interhospital transfer is not available

ED Assessment - Immediate (<10 minutes on arrival)

STAT labs:
  • CBC, PT/INR, aPTT, blood glucose (hypoglycemia mimics stroke!)
  • BMP, troponin, ECG (cardiac source, AF)
  • Blood type and screen
STAT imaging:
ImagingRole
Non-contrast CT (NCCT)First-line - rule out hemorrhage; very fast
CT Angiography (CTA)Large vessel occlusion (LVO) - essential for EVT decision
CT Perfusion (CTP)Penumbra assessment for extended window (4.5-24h)
MRI DWIMost sensitive for early ischemia; DWI-FLAIR mismatch for wake-up stroke
MR AngiographyAlternative to CTA for vessel imaging
ASPECTS Score (Alberta Stroke Program Early CT Score)
  • 10-point scale assessing early ischemic changes on CT in MCA territory
  • 10 = no ischemia; 0 = severe ischemia throughout MCA territory
  • 2026 update: EVT now Class 1 even for ASPECTS 3-5 (previously controversial)

6. ACUTE MANAGEMENT - AHA/ASA 2026 GUIDELINE

Immediate General Care

ParameterTargetNotes
O₂ saturation>94%Supplemental O₂ only if hypoxic
TemperatureNormothermiaTreat fever aggressively (antipyretics)
Blood glucose140-180 mg/dLDo NOT target 80-130 mg/dL (2026 update)
HypoglycemiaTreat if <60 mg/dLIV dextrose immediately
IV fluidsNormal saline (isotonic)Avoid hypotonic (worsens cerebral edema)
NPOUntil dysphagia screeningNew 2026 emphasis on formal dysphagia assessment before any oral intake

Step 1: Hemorrhage Excluded on CT → Decision for Reperfusion


REPERFUSION THERAPY

A. IV Thrombolysis (IVT)

🆕 KEY 2026 UPDATE: Disabling vs Non-Disabling - Primary Decision Framework

The fundamental question is no longer "What is the NIHSS score?" but "Is this deficit disabling for this patient?"
Deficit TypeAction
Disabling (even if NIHSS 0-5)Give IVT - Class 1
Non-disabling (patient can function at baseline)Do NOT give IVT - give DAPT instead
Examples of disabling with low NIHSS: dominant-hand weakness preventing work, visual field loss preventing driving, aphasia preventing communication.

🆕 Drug Choice: Tenecteplase NOW Class 1 (equal to alteplase)

DrugDoseAdministrationClass (2026)
Tenecteplase (TNK)0.25 mg/kg IV (max 25 mg)Single bolus - push and goClass 1
Alteplase (tPA)0.9 mg/kg IV (max 90 mg)10% bolus over 1 min + 90% infusion over 60 minClass 1
Tenecteplase advantages (2026 rationale):
  • Single IV bolus - much simpler to administer
  • Enables immediate transfer after injection ("push and go")
  • Non-inferior efficacy and safety vs alteplase (multiple RCTs including NOR-TEST 2, AcT trial)
  • Many centers are already shifting to tenecteplase

Time Windows for IVT

WindowRecommendationClass
0-4.5 hours (standard)IVT for disabling deficit, no contraindicationsClass 1
🆕 4.5-9 hours / wake-up strokeIVT may be reasonable if CTP or DWI-FLAIR mismatch shows salvageable brainClass 2a (NEW)
🆕 Up to 24 hours (select patients)IVT for extended window when advanced imaging confirms penumbraClass 2b
The extended 4.5-9h window is based on the EXTEND, ECASS-4, and WAKE-UP trials.

Pre-IVT Blood Pressure Target

  • BP must be <185/110 mmHg before giving IVT
  • Use labetalol, nicardipine, or clevidipine to lower if needed
  • Post-IVT target: maintain BP <180/105 mmHg for 24 hours

IVT Absolute Contraindications (2026 - key changes)

Contraindication2026 Status
Intracranial hemorrhage on CTAbsolute contraindication (unchanged)
BP >185/110 refractory to treatmentAbsolute
Recent major surgery (<14 days)Absolute
INR >1.7 on warfarinAbsolute
DOAC taken within 48 hours (standard dose)Absolute
Blood glucose <50 mg/dLAbsolute
🆕 Non-disabling deficitNew - do not give IVT
🆕 Prior ICHReclassified as relative contraindication (case-by-case)

BP Management AFTER IVT (2026)

  • Target <180/105 mmHg for first 24 hours
  • 🆕 ESO 2025 update: Intensive lowering to <140 mmHg after reperfusion is NOT recommended (Class 3 - harm)

B. Endovascular Thrombectomy (EVT / Mechanical Thrombectomy)

Standard Window: 0-24 Hours (LVO)

Core eligibility criteria (2026):
  • Large vessel occlusion (LVO) confirmed on CTA (ICA, M1, M2 MCA, basilar)
  • NIHSS ≥6 (for anterior circulation)
  • Pre-stroke mRS ≤2 (functionally independent before stroke)
  • Within 24 hours of last known well

🆕 2026 EVT Updates

UpdateDetailsClass
Expanded core sizeEVT now recommended for ASPECTS 3-5 (large ischemic core)Class 1 (expanded from previous Class 2b)
ASPECTS 0-2EVT may be considered in selected patientsClass 2a (new)
Basilar artery occlusionEVT up to 24 hours if NIHSS ≥10Class 1
Direct to EVT-capable centerRecommended when interhospital transfer is slowClass 1
Bridging IVT + EVTGive IVT if eligible, then proceed immediately to EVT without waitingClass 1
Posterior circulationEVT supported with new evidence from ATTENTION and BAOCHE trialsClass 1

🆕 Pediatric Stroke (NEW section in 2026 guidelines)

  • IVT may be considered in children with AIS (Class 2b)
  • EVT reasonable for children ≥6 years with LVO (Class 2a)
  • Previously had minimal guidance for pediatric patients

7. BLOOD PRESSURE MANAGEMENT IN ACUTE STROKE

Pre-Thrombolysis/Thrombectomy

  • Must be <185/110 before IVT

After IVT (Post-thrombolysis 24h)

  • <180/105 mmHg

After Successful Reperfusion (EVT or IVT)

  • 🆕 ESO 2025 / AHA 2026: Intensive lowering to <140 mmHg is NOT recommended - associated with worse outcomes
  • Allow permissive hypertension (up to 180/105 is acceptable)

No Reperfusion Therapy (conservative management)

  • Do NOT lower BP unless >220/120 mmHg (or hypertensive emergency features)
  • Permissive hypertension maintained for 24-48h to preserve penumbral flow
  • Exception: lower BP if concomitant ACS, aortic dissection, hypertensive encephalopathy

ICH

  • Target SBP 130-140 mmHg within 1 hour of presentation (based on INTERACT3 trial)

8. SECONDARY PREVENTION

Antiplatelet Therapy

ScenarioRegimenDuration
Minor stroke (NIHSS ≤3) / high-risk TIA (ABCD2 ≥4)DAPT: Aspirin 100 mg + Clopidogrel 75 mg21 days (POINT/CHANCE trial) then single agent
Post-EVT (no thrombolysis)DAPT for 21 days (Class 1, LOE A)21 days
Routine post-strokeAspirin 100 mg dailyLong-term
Post-EVT with acute stentingDAPT for 30-90 days (Class 2a)
🆕 Non-disabling stroke (no IVT given)DAPT preferred over IVT (2026)21 days
Aspirin allergyClopidogrel 75 mg dailyLong-term

Anticoagulation

IndicationAgentNotes
AF-related cardioembolic strokeDOAC (preferred) or warfarinStart within 2-14 days depending on infarct size
Mechanical heart valveWarfarin (INR 2.5-3.5)DOACs contraindicated
Venous sinus thrombosisHeparin → warfarin/DOAC
Cervical artery dissectionAntiplatelet OR anticoagulationEquivalent efficacy (CADISS trial)
PFO + cryptogenic strokeConsider closure (ESO 2024 guideline - preferred over medical therapy in selected patients)

Lipid Management (ILEP 2026 Consensus)

  • Target LDL-C < 1.4 mmol/L (<55 mg/dL) for secondary prevention
  • High-intensity statin (atorvastatin 40-80 mg or rosuvastatin 20-40 mg) first-line
  • Add ezetimibe if target not reached
  • Add PCSK9 inhibitor (inclisiran/alirocumab/evolocumab) if still not at goal

Blood Pressure (Long-term Secondary Prevention)

  • Target <130/80 mmHg
  • Start/restart antihypertensives within 24-48h if hemodynamically stable after acute phase

Glucose & Diabetes

  • HbA1c target < 7% for secondary stroke prevention
  • GLP-1 agonists / SGLT2 inhibitors preferred in diabetic patients with atherosclerotic disease

9. DYSPHAGIA MANAGEMENT (🆕 2026 Emphasis)

  • Formal dysphagia screening before any oral intake is now strongly recommended (2026 update)
  • Failed screening → NPO, speech therapy evaluation, consider NGT
  • Early dysphagia management reduces aspiration pneumonia - a major cause of post-stroke death

10. STROKE UNIT CARE & MONITORING (24-48 Hours)

ParameterMonitor For
Neurological statusNIHSS q1-2h; watch for early deterioration
BPPer reperfusion status targets above
Cardiac monitoring24-48h continuous ECG for AF detection
TemperatureHyperthermia worsens outcomes - treat aggressively
O₂ saturation>94%
Glucose140-180 mg/dL
SwallowingFormal assessment before oral intake
DVT prophylaxisPneumatic compression stockings from admission

11. HEMORRHAGIC STROKE (ICH) - KEY POINTS

  • Immediate BP control: SBP to 130-140 mmHg within 1 hour (INTERACT3)
  • Reverse anticoagulation immediately:
    • Warfarin → 4-factor PCC + Vitamin K IV
    • Dabigatran → Idarucizumab (Praxbind)
    • Factor Xa inhibitors → Andexanet alfa
  • Neurosurgery consultation: for cerebellar ICH >3 cm, hydrocephalus, herniation
  • External ventricular drain (EVD) for obstructive hydrocephalus
  • Do NOT give steroids (worsen outcomes in ICH)

12. SUMMARY TABLE: 2026 KEY CHANGES AT A GLANCE

TopicOld (2018/2019)New (2026)
Thrombolytic choiceAlteplase preferredTenecteplase = Alteplase (both Class 1)
IVT decision triggerNIHSS scoreDisabling vs non-disabling deficit
IVT window0-4.5h standard0-4.5h standard; 4.5-9h with imaging mismatch (Class 2a)
Non-disabling strokeIVT not recommendedDAPT preferred (explicitly stated)
EVT core sizeASPECTS ≥6 preferredClass 1 for ASPECTS 3-5; Class 2a for 0-2
Basilar occlusion EVTLimited window guidanceEVT up to 24h if NIHSS ≥10 (Class 1)
Post-reperfusion BPNot clearly definedIntensive <140 mmHg NOT recommended (Class 3)
Glucose target140-180 mg/dL140-180 mg/dL confirmed; 80-130 actively discouraged
Pediatric strokeMinimal guidanceDedicated section: IVT (Class 2b), EVT ≥6 yrs (Class 2a)
DysphagiaScreening recommendedFormal assessment before ANY oral intake - stronger emphasis
PFO closureUncertainESO 2024: PFO closure preferred over medical therapy in selected cryptogenic stroke
TransportNearest stroke centerDirect to EVT-capable center when transfer systems inadequate

Sources:
  • 2026 AHA/ASA Guideline (Prabhakaran et al. Stroke, Jan 26, 2026. PMID 41582814)
  • ESO 2025 BP Management Update (Sandset et al. Eur Stroke J, May 2026. PMID 42095756)
  • ESO 2024 PFO Guidelines (PMID 38752755)
  • ILEP 2026 Lipid-Stroke Consensus (PMID 41249078)
  • Rosen's Emergency Medicine | Bradley & Daroff's Neurology in Clinical PracticeThis is the most current stroke note available, built directly from the brand-new AHA/ASA 2026 guideline (published January 26, 2026 - just 5 months ago). Here are the most important takeaways from the update:

The 5 Biggest 2026 Changes to Remember

  1. Tenecteplase = Alteplase (Class 1) - Single bolus injection makes it much faster and easier to use. Many centers are already switching.
  2. "Disabling vs Non-disabling" replaces NIHSS as the IVT trigger - A patient with NIHSS 2 but dominant-hand weakness that prevents their job SHOULD get IVT. A patient with NIHSS 4 but no functional impact should NOT get IVT (give DAPT instead).
  3. Extended IVT window to 4.5-9 hours with CTP or DWI-FLAIR mismatch on imaging - important for rural areas and wake-up strokes.
  4. EVT for large cores (ASPECTS 3-5) is now Class 1 - previously was controversial. More patients now qualify for thrombectomy even with larger infarcts on arrival.
  5. Don't aggressively lower BP after reperfusion - targeting <140 mmHg post-reperfusion was found to harm outcomes. Permissive hypertension up to 180/105 is acceptable.

Different triage system for emergency physician

Searching sources...
Finding Sources
Searching the Web

emergency department triage systems comparison ESI Manchester ATS CTAS START MCI 2024 2025

Finding Sources
Finding Sources
Searching the Web

START triage SALT triage mass casualty incident MCI system categories 2025

Reading File
Reading File
Reading File
I now have comprehensive content. Here is the complete triage reference note:

Triage Systems for the Emergency Physician - Complete Reference

Triage derives from the French "trier" (to sort). The goal differs fundamentally between routine ED triage (identify the sickest individual) and disaster/MCI triage (do the most good for the most people).

PART 1: ED (ROUTINE) TRIAGE SYSTEMS

Five major 5-level systems are used worldwide. 5-level systems are superior to 3-level systems in both validity and reliability.

1. Emergency Severity Index (ESI) 🇺🇸

Used in: United States (most widely used), many international EDs Basis: Acuity + anticipated resource utilization Levels: 5
LevelCategoryColorCriteriaTarget Time to Physician
1ResuscitationRedRequires immediate life-saving intervention (intubation, defibrillation, CPR)Immediate
2EmergentOrangeHigh-risk situation; lethargic/disoriented; severe pain/distress; dangerous vital signs<15 min
3UrgentYellowStable vitals but needs multiple resources (labs + imaging + IV)<30 min
4Less UrgentGreenNeeds one resource only (one lab OR one X-ray)<60 min
5Non-UrgentBlueNeeds no resources - history + exam only<120 min
ESI Decision Algorithm:
Step 1: Does the patient need IMMEDIATE life-saving intervention? → Level 1
Step 2: Is this a HIGH-RISK situation / confused / severe distress? → Level 2
Step 3: How many RESOURCES will this patient need?
         ≥2 resources → Level 3 (also check vital signs - abnormals bump to Level 2)
         1 resource → Level 4
         0 resources → Level 5
Vital sign thresholds that bump Level 3 → Level 2:
  • HR >100 or <50 | RR >20 | SpO₂ <92% | Temperature >38.5°C | Altered mentation
Pros: Simple, resource-based, widely validated, used for all ages (with pediatric modification) Cons: "Resources" subjective; poor inter-rater reliability across countries

2. Manchester Triage System (MTS) 🇬🇧

Used in: UK, Europe, Netherlands, Brazil Basis: Presenting complaint → flowchart → discriminators Levels: 5
LevelCategoryColorTarget Time
1ImmediateRedImmediate (0 min)
2Very UrgentOrange10 minutes
3UrgentYellow60 minutes
4StandardGreen120 minutes
5Non-UrgentBlue240 minutes
How it works:
  1. Select the presenting complaint flowchart (52 flowcharts e.g., chest pain, headache, breathing difficulty)
  2. Work through discriminators in priority order (e.g., airway compromise → shock → extreme pain)
  3. Assign level based on the first positive discriminator encountered
Key discriminators: Life threat, airway compromise, haemodynamic abnormality, level of consciousness, temperature, pain score
Pros: Structured, symptom-specific, systematic flowcharts, widely used in Europe Cons: Slower (~3-5 min per patient); less sensitive in elderly with atypical presentations; limited sensitivity for frail patients (2025 PLOS ONE study)

3. Canadian Triage and Acuity Scale (CTAS) 🇨🇦

Used in: Canada, some Asian and Middle Eastern countries Basis: Chief complaint + modifiers + vital signs Levels: 5
LevelCategoryColorTarget Time to PhysicianReassessment
1ResuscitationBlue/RedImmediateContinuous
2EmergentRed/Orange15 minutesEvery 15 min
3UrgentYellow30 minutesEvery 30 min
4Less UrgentGreen60 minutesEvery 60 min
5Non-UrgentWhite120 minutesEvery 120 min
Unique features:
  • Only system with mandatory reassessment intervals at each level
  • Uses modifiers: first-order (chief complaint-based) and second-order (pain, mechanism of injury)
  • Pediatric version: PaedsCTAS (accounts for age-adjusted vitals, pediatric-specific presentations)
  • Highest reliability among all systems (κ = 0.7-0.95)
Pros: Very reliable, reassessment built in, robust pediatric version, well-validated Cons: Complex, takes 5-10 minutes to complete properly; requires training

4. Australasian Triage Scale (ATS) 🇦🇺

Used in: Australia, New Zealand Basis: Clinical urgency - time to treatment Levels: 5
LevelCategoryColorMax Time to TreatmentDuration of Assessment
1Immediately Life-ThreateningRedImmediateContinuous
2Imminently Life-ThreateningOrange10 minutesEvery 10 min
3Potentially Life-ThreateningYellow30 minutesEvery 30 min
4Potentially SeriousGreen60 minutesEvery 60 min
5Less UrgentBlue120 minutesEvery 120 min
Unique features:
  • Specifies initial assessment time (not just time to physician)
  • Explicitly states duration of each assessment
  • Includes mental health and social triage criteria
Pros: Time-based, clear, established nationally Cons: Moderate reliability (κ = 0.3-0.6); less resource-oriented

5. South African Triage Scale (SATS) 🇿🇦

Used in: South Africa, sub-Saharan Africa, resource-limited settings Basis: Triage Early Warning Score (TEWS) + presenting complaint discriminators Levels: 5
LevelCategoryColorAction
1EmergencyRedImmediate
2Very UrgentOrangeWithin 10 min
3UrgentYellowWithin 1 hour
4RoutineGreenWithin 4 hours
5Not UrgentBlueWithin 8 hours
TEWS scoring: Walking ability + respiratory rate + oxygen saturation + temperature + heart rate + systolic BP + AVPU
Unique: Designed for resource-limited settings; incorporates mobility assessment as a key first step

HEAD-TO-HEAD COMPARISON TABLE

FeatureESIMTSCTASATSSATS
OriginUSAUKCanadaAustraliaSouth Africa
BasisAcuity + resourcesSymptom flowchartsComplaint + modifiersClinical urgencyTEWS + complaint
Levels55555
Time to complete1-2 min3-5 min5-10 min2-3 min2-3 min
Mandatory reassessmentNoNoYesNoNo
Pediatric versionYes (ESI-Peds)Yes (PaedsMTS)Yes (PaedsCTAS)YesYes
Reliability (κ)0.7-0.90.3-0.60.7-0.950.3-0.60.7
Best forUS EDs, resource predictionEuropean EDs, symptom-drivenHigh-reliability, trainingAustralian settingLow-resource settings
WeaknessResources subjectiveSlow, poor for elderly/atypicalComplex, time-consumingModerate reliabilityLimited international validation
No single triage system has proven clearly superior to the others - selection depends on setting, training, and local validation.

PART 2: MASS CASUALTY INCIDENT (MCI) TRIAGE SYSTEMS

Goal shifts from individual care to utilitarian: greatest good for greatest number. MCI defined as ≥5 patients overwhelming local resources.

Universal MCI Triage Color Categories

ColorCategoryMeaning
🔴 RedImmediateLife-threatening; needs treatment NOW to survive
🟡 YellowDelayedSerious but stable; can wait
🟢 GreenMinimal/Minor"Walking wounded"; minor injuries
BlackExpectant/DeadInjuries incompatible with survival given resources; or no signs of life
GrayExpectant (SALT only)Expected to die despite maximal intervention

1. START (Simple Triage And Rapid Treatment) 🇺🇸

Used: Prehospital/field triage, adults Speed: 30-60 seconds per patient Assessment: RPM - Respirations, Perfusion, Mental status
Algorithm:
Can the patient WALK?
    YES → GREEN (minimal/walking wounded)
    NO ↓
Is patient BREATHING?
    NO → Open airway → still not breathing? → BLACK (deceased)
         Breathing after opening? → RED (immediate)
    YES ↓
Respiratory rate?
    >30/min → RED (immediate)
    <10/min → RED (immediate)
    10-29/min ↓
Perfusion: Radial pulse or capillary refill >2 sec?
    No pulse / CRT >2 sec → RED (immediate) + hemorrhage control
    Pulse present / CRT ≤2 sec ↓
Mental status: Can follow simple commands?
    NO → RED (immediate)
    YES → YELLOW (delayed)
Key rule: During START, only two interventions allowed:
  1. Open airway (head-tilt/chin-lift)
  2. Direct pressure on obvious external hemorrhage
Pros: Fast, simple, validated in real MCI (2002 Placentia Linda train crash - 100% sensitivity for RED category) Cons: Requires capillary refill or respiratory rate (may be inaccurate in field); some overtriage

2. SALT (Sort, Assess, Lifesaving interventions, Treatment/Transport) 🇺🇸

Used: US national standard (CDC-recommended), prehospital + hospital Developed: 2011 by multidisciplinary consensus (Model Uniform Core Criteria)
Two-phase approach:
Phase 1 - SORT (global):
"If you can hear me and can walk, move to [safe area]" → GREEN
Assess remaining in priority: Still > Waving > Those who walked but couldn't relocate
Phase 2 - ASSESS (individual, one-by-one):
AssessmentFindingCategory
No signs of lifeNo breathing, no pulseBLACK (dead)
Signs of life present→ Perform brief lifesaving interventions if possible (control hemorrhage, open airway, give antidote)
After interventions: Likely to survive?Cannot follow commands + no peripheral pulse + poor breathingGRAY (expectant)
Obeys commands OR has peripheral pulse OR normal breathingRED (immediate)
Significant injury, not immediateCan waitYELLOW (delayed)
Minor / no injuryAmbulatoryGREEN (minimal)
Key difference from START: SALT adds GRAY category (expectant - will likely die) separate from BLACK (already dead) - eliminates ambiguity about dying but not yet dead patients
Pros: More precise categorization, all-hazards approach (trauma/medical/chemical/radiological), reduces undertriage by 9% vs START Cons: Slightly more complex; less studied in real disasters than START
Rosen's Emergency Medicine recommends START until more evidence on SALT accumulates.

3. JumpSTART (Pediatric MCI Triage)

Used: Children in MCI settings Modification of START with pediatric-specific criteria:
StepSTART (Adults)JumpSTART (Children)
Apneic patient→ BLACK→ Attempt 5 rescue breaths first → if still apneic → BLACK
Resp rate normal10-29/min15-45/min
Mental statusFollow commandsAVPU scale (Alert, Voice, Pain, Unresponsive)

4. CareFlight Triage

Used: Australia, some prehospital systems Steps: Walk → Obeys commands → Pulse → Respiratory effort
  • Performed best overall across all ages in multi-tool evaluation
  • Simpler than JumpSTART for pediatric victims

5. RAMP (Rapid Assessment of Mentation and Pulse)

Used: Emerging system, military and tactical medicine Basis: Mental status + pulse only
  • Faster than START (assesses only 2 parameters)
  • Results largely similar to START in final categorization
  • Suitable when time is extremely limited

PART 3: SPECIAL SITUATIONS IN TRIAGE

CBRN / Hazmat Triage

  • Decontamination BEFORE standard triage
  • Antidote administration (e.g., atropine for organophosphate) is a lifesaving intervention during SALT
  • PPE for triage personnel mandatory

Pediatric Considerations (Routine ED)

  • All major ED systems have pediatric versions (ESI, CTAS, MTS, ATS)
  • No single pediatric ED triage system proven superior
  • Pediatric Triage Tape (PTT): Length-based criteria for infants/toddlers in MCI settings

Geriatric Triage

  • Both ESI and MTS show limited sensitivity in elderly patients with atypical presentations (PLOS ONE, 2025)
  • ESI performs better than MTS for discriminating urgency in older adults
  • Current consensus: triage systems need revision to account for age-related vulnerability and non-specific presentations

QUICK REFERENCE SUMMARY

ROUTINE ED TRIAGE (most to least reliable):
CTAS > ESI > MTS > ATS > SATS

MCI/DISASTER TRIAGE:
Adults: START (most validated) or SALT (US national standard)
Children: JumpSTART (pediatric modification of START)

KEY PRINCIPLE DIFFERENCES:
ED triage   = save the sickest INDIVIDUAL
MCI triage  = save the MOST people with available resources

Sources: Rosen's Emergency Medicine (10th ed.) | Tintinalli's Emergency Medicine | HSTCSA Performance Review (2024) | PLOS ONE Geriatric Triage Study (2025) | WikEM MCI Triage | CDC SALT Guidelines

Different triage system for emergency physician

It looks like this is the same question you just asked — I provided a full detailed answer covering all major triage systems just a few minutes ago.
Here's a quick recap of what was covered:

Part 1 - Routine ED Triage Systems (5-level):
  • ESI (USA) - acuity + resource utilization
  • MTS / Manchester (UK/Europe) - symptom flowcharts
  • CTAS (Canada) - most reliable, mandatory reassessment intervals
  • ATS (Australia) - time-based, nationally mandated
  • SATS (South Africa) - TEWS scoring, resource-limited settings
Part 2 - Mass Casualty / MCI Triage:
  • START - adult field triage (RPM assessment, 30-60 sec/patient)
  • SALT - US national standard (Sort→Assess→Lifesaving interventions), adds Gray category
  • JumpSTART - pediatric modification of START
  • CareFlight - best overall performance in pediatric evaluations
  • RAMP - rapid 2-parameter assessment (mentation + pulse)
Part 3 - Special considerations:
  • CBRN/Hazmat triage
  • Geriatric triage limitations
  • Pediatric ED triage systems

Scroll up to see the full detailed note with algorithms, color categories, time targets, comparison tables, and decision flowcharts. Let me know if you'd like me to expand on any specific system or add anything!

Generate a pocket guide PDF for ESI vs CTAS decision-making

Reading File
Running Command

ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace does not exist"

Running Command

mkdir -p /home/daytona/workspace/triage-guide && python3 -c "import reportlab; print('reportlab ok')"

Writing File

~/triage-guide/generate_pocket_guide.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm, cm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_RIGHT
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, KeepTogether
)
from reportlab.platypus.flowables import HRFlowable
from reportlab.lib.colors import HexColor

# ── Colour palette ──────────────────────────────────────────────────────────
NAVY      = HexColor('#0D1B4B')
TEAL      = HexColor('#0077A8')
ORANGE    = HexColor('#E05A00')
LIGHT_BG  = HexColor('#F0F4FA')
WHITE     = colors.white

# Triage level colours
RED       = HexColor('#C62828')
ORANGE_T  = HexColor('#E65100')
YELLOW_T  = HexColor('#F9A825')
GREEN_T   = HexColor('#2E7D32')
BLUE_T    = HexColor('#1565C0')

L_RED     = HexColor('#FFCDD2')
L_ORANGE  = HexColor('#FFE0B2')
L_YELLOW  = HexColor('#FFF9C4')
L_GREEN   = HexColor('#C8E6C9')
L_BLUE    = HexColor('#BBDEFB')

# ── Document setup ──────────────────────────────────────────────────────────
OUTPUT = '/home/daytona/workspace/triage-guide/ESI_vs_CTAS_Pocket_Guide.pdf'
doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    leftMargin=14*mm, rightMargin=14*mm,
    topMargin=14*mm,  bottomMargin=14*mm,
    title='ESI vs CTAS Pocket Guide',
    author='Emergency Medicine Reference'
)

# ── Styles ───────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()

def S(name, **kw):
    return ParagraphStyle(name, **kw)

title_style = S('Title2',
    fontName='Helvetica-Bold', fontSize=18,
    textColor=WHITE, alignment=TA_CENTER, leading=22)

subtitle_style = S('Sub',
    fontName='Helvetica', fontSize=9,
    textColor=HexColor('#BBDEFB'), alignment=TA_CENTER, leading=12)

section_style = S('Section',
    fontName='Helvetica-Bold', fontSize=11,
    textColor=WHITE, alignment=TA_CENTER, leading=14)

body_style = S('Body2',
    fontName='Helvetica', fontSize=8.5,
    textColor=HexColor('#1A1A2E'), leading=12)

small_style = S('Small',
    fontName='Helvetica', fontSize=7.5,
    textColor=HexColor('#333355'), leading=10)

bold_small = S('BoldSmall',
    fontName='Helvetica-Bold', fontSize=8,
    textColor=HexColor('#1A1A2E'), leading=11)

note_style = S('Note',
    fontName='Helvetica-Oblique', fontSize=7.5,
    textColor=HexColor('#444466'), leading=10)

cell_style = S('Cell',
    fontName='Helvetica', fontSize=8,
    textColor=HexColor('#1A1A2E'), leading=11, alignment=TA_LEFT)

cell_bold = S('CellBold',
    fontName='Helvetica-Bold', fontSize=8.5,
    textColor=HexColor('#1A1A2E'), leading=11, alignment=TA_LEFT)

hdr_style = S('Hdr',
    fontName='Helvetica-Bold', fontSize=9,
    textColor=WHITE, alignment=TA_CENTER, leading=12)

# ── Helper to build a coloured header banner ─────────────────────────────────
def banner(text, bg=NAVY, text_style=None):
    ts = text_style or section_style
    tbl = Table([[Paragraph(text, ts)]], colWidths=[182*mm])
    tbl.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), bg),
        ('TOPPADDING',    (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('LEFTPADDING',   (0,0), (-1,-1), 8),
        ('RIGHTPADDING',  (0,0), (-1,-1), 8),
        ('ROUNDEDCORNERS', [4,4,4,4]),
    ]))
    return tbl

# ── Title block ───────────────────────────────────────────────────────────────
title_tbl = Table(
    [[Paragraph('ESI vs CTAS', title_style)],
     [Paragraph('Emergency Triage Pocket Guide  |  For Emergency Physicians & Nurses', subtitle_style)]],
    colWidths=[182*mm]
)
title_tbl.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), NAVY),
    ('TOPPADDING',    (0,0), (-1,-1), 8),
    ('BOTTOMPADDING', (0,0), (-1,-1), 8),
    ('LEFTPADDING',   (0,0), (-1,-1), 10),
    ('RIGHTPADDING',  (0,0), (-1,-1), 10),
]))

# ── ESI decision algorithm table ──────────────────────────────────────────────
esi_algo = [
    [Paragraph('<b>Step</b>', hdr_style),
     Paragraph('<b>Question</b>', hdr_style),
     Paragraph('<b>Answer</b>', hdr_style),
     Paragraph('<b>Level</b>', hdr_style)],
    [Paragraph('1', cell_bold),
     Paragraph('Immediate life-saving intervention needed?', cell_style),
     Paragraph('YES', cell_style),
     Paragraph('Level 1 🔴', cell_bold)],
    [Paragraph('2', cell_bold),
     Paragraph('High-risk / confused / severe distress / dangerous vitals?', cell_style),
     Paragraph('YES', cell_style),
     Paragraph('Level 2 🟠', cell_bold)],
    [Paragraph('3', cell_bold),
     Paragraph('How many RESOURCES needed?', cell_style),
     Paragraph('≥ 2 resources\n1 resource\n0 resources', cell_style),
     Paragraph('Level 3 🟡\nLevel 4 🟢\nLevel 5 🔵', cell_bold)],
    [Paragraph('3a', cell_bold),
     Paragraph('If Level 3: Are vitals dangerous?', cell_style),
     Paragraph('YES → upgrade', cell_style),
     Paragraph('Level 2 🟠', cell_bold)],
]

esi_algo_tbl = Table(esi_algo, colWidths=[13*mm, 72*mm, 45*mm, 30*mm])
esi_algo_tbl.setStyle(TableStyle([
    ('BACKGROUND',    (0,0), (-1,0), NAVY),
    ('BACKGROUND',    (0,1), (-1,1), L_RED),
    ('BACKGROUND',    (0,2), (-1,2), L_ORANGE),
    ('BACKGROUND',    (0,3), (-1,3), L_YELLOW),
    ('BACKGROUND',    (0,4), (-1,4), L_ORANGE),
    ('FONTNAME',      (0,0), (-1,0), 'Helvetica-Bold'),
    ('FONTSIZE',      (0,0), (-1,-1), 8),
    ('GRID',          (0,0), (-1,-1), 0.4, HexColor('#AABBCC')),
    ('VALIGN',        (0,0), (-1,-1), 'MIDDLE'),
    ('TOPPADDING',    (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING',   (0,0), (-1,-1), 5),
    ('RIGHTPADDING',  (0,0), (-1,-1), 5),
]))

# ── ESI Vital sign danger zone table ─────────────────────────────────────────
vitals_data = [
    [Paragraph('<b>Parameter</b>', hdr_style),
     Paragraph('<b>Age <3 mo</b>', hdr_style),
     Paragraph('<b>3 mo–3 yr</b>', hdr_style),
     Paragraph('<b>3–8 yr</b>', hdr_style),
     Paragraph('<b>>8 yr / Adult</b>', hdr_style)],
    ['HR > (bpm)', '>180', '>160', '>140', '>100'],
    ['HR < (bpm)', '<50',  '<50',  '<50',  '<50'],
    ['RR > (bpm)', '>50',  '>40',  '>30',  '>20'],
    ['SpO₂ <',     '<92%', '<92%', '<92%', '<92%'],
    ['Temp °C >',  '>38',  '>38.5','—',    '>38.5'],
]
vitals_tbl = Table(vitals_data, colWidths=[28*mm, 28*mm, 28*mm, 28*mm, 40*mm])
vitals_tbl.setStyle(TableStyle([
    ('BACKGROUND',    (0,0), (-1,0), TEAL),
    ('BACKGROUND',    (0,1), (-1,1), HexColor('#F8F8FF')),
    ('BACKGROUND',    (0,2), (-1,2), HexColor('#F0F0FF')),
    ('BACKGROUND',    (0,3), (-1,3), HexColor('#F8F8FF')),
    ('BACKGROUND',    (0,4), (-1,4), HexColor('#F0F0FF')),
    ('BACKGROUND',    (0,5), (-1,5), HexColor('#F8F8FF')),
    ('FONTNAME',      (0,0), (-1,0), 'Helvetica-Bold'),
    ('FONTNAME',      (0,1), (0,-1), 'Helvetica-Bold'),
    ('FONTSIZE',      (0,0), (-1,-1), 7.5),
    ('ALIGN',         (0,0), (-1,-1), 'CENTER'),
    ('GRID',          (0,0), (-1,-1), 0.4, HexColor('#AABBCC')),
    ('VALIGN',        (0,0), (-1,-1), 'MIDDLE'),
    ('TOPPADDING',    (0,0), (-1,-1), 3),
    ('BOTTOMPADDING', (0,0), (-1,-1), 3),
]))

# ── CTAS decision table ───────────────────────────────────────────────────────
ctas_data = [
    [Paragraph('<b>Level</b>', hdr_style),
     Paragraph('<b>Category</b>', hdr_style),
     Paragraph('<b>Colour</b>', hdr_style),
     Paragraph('<b>Time to MD</b>', hdr_style),
     Paragraph('<b>Reassess</b>', hdr_style),
     Paragraph('<b>Examples</b>', hdr_style)],
    ['1', 'Resuscitation',  '🔴 Red',    'Immediate',  'Continuous',
     'Cardiac arrest, apnoea, RSI needed'],
    ['2', 'Emergent',       '🟠 Orange', '≤15 min',    'q15 min',
     'STEMI, stroke, sepsis, major trauma'],
    ['3', 'Urgent',         '🟡 Yellow', '≤30 min',    'q30 min',
     'Moderate pain, stable GI bleed, seizure (postictal)'],
    ['4', 'Less Urgent',    '🟢 Green',  '≤60 min',    'q60 min',
     'Minor injury, sore throat, UTI symptoms'],
    ['5', 'Non-Urgent',     '🔵 Blue',   '≤120 min',   'q120 min',
     'Prescription refill, rash, well-child concern'],
]
ctas_tbl = Table(ctas_data, colWidths=[10*mm, 28*mm, 18*mm, 22*mm, 20*mm, 64*mm])
ctas_tbl.setStyle(TableStyle([
    ('BACKGROUND',    (0,0), (-1,0), NAVY),
    ('BACKGROUND',    (0,1), (-1,1), L_RED),
    ('BACKGROUND',    (0,2), (-1,2), L_ORANGE),
    ('BACKGROUND',    (0,3), (-1,3), L_YELLOW),
    ('BACKGROUND',    (0,4), (-1,4), L_GREEN),
    ('BACKGROUND',    (0,5), (-1,5), L_BLUE),
    ('FONTNAME',      (0,0), (-1,0), 'Helvetica-Bold'),
    ('FONTNAME',      (0,1), (0,-1), 'Helvetica-Bold'),
    ('FONTSIZE',      (0,0), (-1,-1), 7.5),
    ('ALIGN',         (1,0), (4,-1), 'CENTER'),
    ('GRID',          (0,0), (-1,-1), 0.4, HexColor('#AABBCC')),
    ('VALIGN',        (0,0), (-1,-1), 'MIDDLE'),
    ('TOPPADDING',    (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING',   (0,0), (-1,-1), 4),
    ('RIGHTPADDING',  (0,0), (-1,-1), 4),
]))

# ── ESI Level detailed table ──────────────────────────────────────────────────
esi_levels = [
    [Paragraph('<b>Level</b>', hdr_style),
     Paragraph('<b>Category</b>', hdr_style),
     Paragraph('<b>Basis for Decision</b>', hdr_style),
     Paragraph('<b>Wait Time</b>', hdr_style),
     Paragraph('<b>Clinical Examples</b>', hdr_style)],
    ['1', 'Resuscitation',
     'Immediate life-saving intervention required NOW',
     'Immediate',
     'Intubation, cardioversion, CPR, massive haemorrhage'],
    ['2', 'Emergent',
     'High-risk; confused/lethargic; severe pain/distress; danger vitals',
     '<15 min',
     'STEMI, anaphylaxis, active seizure, severe dyspnoea, suicidal'],
    ['3', 'Urgent',
     '≥2 resources needed; vitals normal or mildly abnormal',
     '<30 min',
     'Abdominal pain (labs + CT), moderate asthma (neb + CXR)'],
    ['4', 'Less Urgent',
     'Only 1 resource needed; no distress',
     '<60 min',
     'Ankle sprain (X-ray only), simple laceration (repair only)'],
    ['5', 'Non-Urgent',
     '0 resources; history + exam only',
     '<120 min',
     'Prescription refill, cold symptoms, well-controlled chronic disease'],
]
esi_levels_tbl = Table(esi_levels, colWidths=[10*mm, 25*mm, 55*mm, 20*mm, 60*mm])
esi_levels_tbl.setStyle(TableStyle([
    ('BACKGROUND',    (0,0), (-1,0), NAVY),
    ('BACKGROUND',    (0,1), (-1,1), L_RED),
    ('BACKGROUND',    (0,2), (-1,2), L_ORANGE),
    ('BACKGROUND',    (0,3), (-1,3), L_YELLOW),
    ('BACKGROUND',    (0,4), (-1,4), L_GREEN),
    ('BACKGROUND',    (0,5), (-1,5), L_BLUE),
    ('FONTNAME',      (0,0), (-1,0), 'Helvetica-Bold'),
    ('FONTNAME',      (0,1), (0,-1), 'Helvetica-Bold'),
    ('FONTSIZE',      (0,0), (-1,-1), 7.5),
    ('ALIGN',         (1,0), (3,-1), 'CENTER'),
    ('GRID',          (0,0), (-1,-1), 0.4, HexColor('#AABBCC')),
    ('VALIGN',        (0,0), (-1,-1), 'MIDDLE'),
    ('TOPPADDING',    (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING',   (0,0), (-1,-1), 4),
    ('RIGHTPADDING',  (0,0), (-1,-1), 4),
]))

# ── Side-by-side comparison table ────────────────────────────────────────────
compare_data = [
    [Paragraph('<b>Feature</b>', hdr_style),
     Paragraph('<b>ESI</b>', hdr_style),
     Paragraph('<b>CTAS</b>', hdr_style)],
    ['Origin / Country', 'USA (AHRQ)', 'Canada (CAEP)'],
    ['Decision Basis', 'Acuity + Expected Resources', 'Chief Complaint + Modifiers + Vitals'],
    ['Time to Complete', '1–2 minutes', '5–10 minutes'],
    ['Mandatory Reassessment', '✗  (only when needed)', '✓  At fixed intervals per level'],
    ['Paediatric Version', 'ESI Paeds (same algorithm)', 'PaedsCTAS (age-adjusted criteria)'],
    ['Reliability (κ)', '0.70–0.90', '0.70–0.95 (highest of all systems)'],
    ['Unique Strength', 'Resource prediction; fast', 'Built-in safety net (reassessment)'],
    ['Main Weakness', 'Resources subjective; variable across countries', 'Complex; requires training; time-intensive'],
    ['Best Setting', 'High-volume US EDs; resource allocation focus', 'Any ED; especially when structured monitoring needed'],
    ['Pain Score Used?', '✓  (for Level 2 consideration)', '✓  (first-order modifier)'],
    ['Vital Sign Threshold', 'Triggers Level 2 upgrade from Level 3', 'Incorporated as modifiers for level adjustment'],
    ['Non-disabling mild symptoms', 'Level 4 or 5', 'Level 4 or 5'],
]
compare_tbl = Table(compare_data, colWidths=[48*mm, 67*mm, 67*mm])
compare_tbl.setStyle(TableStyle([
    ('BACKGROUND',    (0,0), (-1,0), NAVY),
    ('BACKGROUND',    (0,1), (-1,1), LIGHT_BG),
    ('BACKGROUND',    (0,2), (-1,2), WHITE),
    ('BACKGROUND',    (0,3), (-1,3), LIGHT_BG),
    ('BACKGROUND',    (0,4), (-1,4), WHITE),
    ('BACKGROUND',    (0,5), (-1,5), LIGHT_BG),
    ('BACKGROUND',    (0,6), (-1,6), WHITE),
    ('BACKGROUND',    (0,7), (-1,7), LIGHT_BG),
    ('BACKGROUND',    (0,8), (-1,8), WHITE),
    ('BACKGROUND',    (0,9), (-1,9), LIGHT_BG),
    ('BACKGROUND',    (0,10),(-1,10),WHITE),
    ('BACKGROUND',    (0,11),(-1,11),LIGHT_BG),
    ('BACKGROUND',    (0,12),(-1,12),WHITE),
    ('FONTNAME',      (0,0), (-1,0), 'Helvetica-Bold'),
    ('FONTNAME',      (0,1), (0,-1), 'Helvetica-Bold'),
    ('FONTSIZE',      (0,0), (-1,-1), 8),
    ('GRID',          (0,0), (-1,-1), 0.4, HexColor('#AABBCC')),
    ('VALIGN',        (0,0), (-1,-1), 'MIDDLE'),
    ('TOPPADDING',    (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING',   (0,0), (-1,-1), 5),
    ('RIGHTPADDING',  (0,0), (-1,-1), 5),
]))

# ── CTAS Modifiers box ────────────────────────────────────────────────────────
ctas_mod_data = [
    [Paragraph('<b>CTAS Modifiers (Adjust Level Up/Down)</b>', hdr_style)],
    [Paragraph(
        '<b>First-Order (Chief-Complaint Based):</b> Mechanism of injury, acuity of onset, '
        'severity of pain/discomfort (NRS ≥8 → consider upgrading by 1 level)<br/><br/>'
        '<b>Second-Order (Adding Context):</b> Age extremes (&lt;2 yr or &gt;70 yr), '
        'immunocompromised state, mechanism, co-morbidities, patient distress<br/><br/>'
        '<b>Key Rule:</b> Reassessment at mandated intervals is REQUIRED. '
        'If patient deteriorates → upgrade immediately. Document reassessment time.',
        small_style)],
]
ctas_mod_tbl = Table(ctas_mod_data, colWidths=[182*mm])
ctas_mod_tbl.setStyle(TableStyle([
    ('BACKGROUND',    (0,0), (-1,0), TEAL),
    ('BACKGROUND',    (0,1), (-1,1), HexColor('#E8F4FD')),
    ('GRID',          (0,0), (-1,-1), 0.4, HexColor('#AABBCC')),
    ('TOPPADDING',    (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('LEFTPADDING',   (0,0), (-1,-1), 7),
    ('RIGHTPADDING',  (0,0), (-1,-1), 7),
]))

# ── Clinical tips box ─────────────────────────────────────────────────────────
tips_data = [
    [Paragraph('<b>Clinical Decision Tips  — ESI</b>', hdr_style),
     Paragraph('<b>Clinical Decision Tips  — CTAS</b>', hdr_style)],
    [Paragraph(
        '• <b>Disabling deficit</b> at any NIHSS → Level 2 (do not rely solely on NIHSS)<br/>'
        '• Severe pain (NRS ≥8) alone → consider Level 2<br/>'
        '• Normal vitals do NOT rule out Level 2 (high-risk history trumps)<br/>'
        '• "Resources" = distinct services ordered (one CBC = 1, CBC+BMP = still 1 lab draw)<br/>'
        '• CT scan = 1 resource; CT + labs = 2 resources = Level 3 minimum<br/>'
        '• Confused/altered → automatically Level 2<br/>'
        '• Child with fever: apply paediatric danger vital thresholds',
        small_style),
     Paragraph(
        '• Use <b>first positive discriminator</b> — do not skip down flowchart<br/>'
        '• Age &lt;2 or &gt;70 → consider upgrading one level<br/>'
        '• Missed reassessment = patient safety risk — document every interval<br/>'
        '• Pain ≥8/10 → upgrade by 1 level as first-order modifier<br/>'
        '• Immunocompromised patients (HIV, chemo, transplant) → upgrade<br/>'
        '• If in doubt between two levels → always assign the <b>higher acuity</b> level<br/>'
        '• Sepsis criteria present → Level 2 at minimum',
        small_style)],
]
tips_tbl = Table(tips_data, colWidths=[91*mm, 91*mm])
tips_tbl.setStyle(TableStyle([
    ('BACKGROUND',    (0,0), (0,0), ORANGE),
    ('BACKGROUND',    (1,0), (1,0), TEAL),
    ('BACKGROUND',    (0,1), (0,1), HexColor('#FFF3E0')),
    ('BACKGROUND',    (1,1), (1,1), HexColor('#E0F2FF')),
    ('GRID',          (0,0), (-1,-1), 0.4, HexColor('#AABBCC')),
    ('VALIGN',        (0,0), (-1,-1), 'TOP'),
    ('TOPPADDING',    (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('LEFTPADDING',   (0,0), (-1,-1), 6),
    ('RIGHTPADDING',  (0,0), (-1,-1), 6),
]))

# ── Level-to-Level concordance table ─────────────────────────────────────────
concordance_data = [
    [Paragraph('<b>ESI Level</b>', hdr_style),
     Paragraph('<b>Approximate CTAS Equivalent</b>', hdr_style),
     Paragraph('<b>Notes on Differences</b>', hdr_style)],
    ['Level 1 🔴', 'Level 1 🔴', 'Identical — immediate life threat'],
    ['Level 2 🟠', 'Level 2 🟠', 'ESI 2 is slightly broader (includes any high-risk without immediate need)'],
    ['Level 3 🟡', 'Level 2–3 🟠🟡', 'CTAS uses modifiers; ESI 3 with danger vitals → CTAS 2'],
    ['Level 4 🟢', 'Level 4 🟢', 'Very similar — one resource / less urgent'],
    ['Level 5 🔵', 'Level 5 🔵', 'Identical — no resources / non-urgent'],
]
concordance_tbl = Table(concordance_data, colWidths=[35*mm, 55*mm, 92*mm])
concordance_tbl.setStyle(TableStyle([
    ('BACKGROUND',    (0,0), (-1,0), NAVY),
    ('BACKGROUND',    (0,1), (-1,1), L_RED),
    ('BACKGROUND',    (0,2), (-1,2), L_ORANGE),
    ('BACKGROUND',    (0,3), (-1,3), L_YELLOW),
    ('BACKGROUND',    (0,4), (-1,4), L_GREEN),
    ('BACKGROUND',    (0,5), (-1,5), L_BLUE),
    ('FONTNAME',      (0,0), (-1,0), 'Helvetica-Bold'),
    ('FONTNAME',      (0,1), (0,-1), 'Helvetica-Bold'),
    ('FONTSIZE',      (0,0), (-1,-1), 8),
    ('GRID',          (0,0), (-1,-1), 0.4, HexColor('#AABBCC')),
    ('VALIGN',        (0,0), (-1,-1), 'MIDDLE'),
    ('TOPPADDING',    (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING',   (0,0), (-1,-1), 5),
    ('RIGHTPADDING',  (0,0), (-1,-1), 5),
]))

# ── Footer ────────────────────────────────────────────────────────────────────
footer_data = [[
    Paragraph(
        'ESI: Emergency Severity Index (AHRQ, USA)  |  CTAS: Canadian Triage and Acuity Scale (CAEP)  |  '
        'Pocket guide for clinical reference only — always apply clinical judgement  |  '
        'Compiled June 2026',
        note_style)
]]
footer_tbl = Table(footer_data, colWidths=[182*mm])
footer_tbl.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), LIGHT_BG),
    ('TOPPADDING',    (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING',   (0,0), (-1,-1), 6),
    ('RIGHTPADDING',  (0,0), (-1,-1), 6),
    ('BOX', (0,0), (-1,-1), 0.5, HexColor('#AABBCC')),
]))

# ── Assemble story ────────────────────────────────────────────────────────────
story = [
    title_tbl,
    Spacer(1, 4*mm),

    # Page 1: ESI
    KeepTogether([
        banner('1.  ESI — Emergency Severity Index (USA)', ORANGE),
        Spacer(1, 2*mm),
        banner('1a  ESI Decision Algorithm', TEAL),
        Spacer(1, 1*mm),
        esi_algo_tbl,
        Spacer(1, 2*mm),
    ]),

    KeepTogether([
        banner('1b  ESI — Full Level Details', TEAL),
        Spacer(1, 1*mm),
        esi_levels_tbl,
        Spacer(1, 2*mm),
    ]),

    KeepTogether([
        banner('1c  ESI — Vital Sign Danger Thresholds (trigger Level 2 upgrade)', TEAL),
        Spacer(1, 1*mm),
        vitals_tbl,
        Spacer(1, 3*mm),
    ]),

    # Page 2: CTAS
    KeepTogether([
        banner('2.  CTAS — Canadian Triage and Acuity Scale', ORANGE),
        Spacer(1, 2*mm),
        banner('2a  CTAS Level Reference', TEAL),
        Spacer(1, 1*mm),
        ctas_tbl,
        Spacer(1, 2*mm),
    ]),

    KeepTogether([
        banner('2b  CTAS — Modifiers & Reassessment Rules', TEAL),
        Spacer(1, 1*mm),
        ctas_mod_tbl,
        Spacer(1, 3*mm),
    ]),

    # Comparison section
    KeepTogether([
        banner('3.  ESI vs CTAS — Head-to-Head Comparison', NAVY),
        Spacer(1, 1*mm),
        compare_tbl,
        Spacer(1, 3*mm),
    ]),

    KeepTogether([
        banner('4.  Level Concordance  (ESI ↔ CTAS)', NAVY),
        Spacer(1, 1*mm),
        concordance_tbl,
        Spacer(1, 3*mm),
    ]),

    KeepTogether([
        banner('5.  Clinical Tips at the Triage Desk', NAVY),
        Spacer(1, 1*mm),
        tips_tbl,
        Spacer(1, 3*mm),
    ]),

    footer_tbl,
]

doc.build(story)
print(f"PDF created: {OUTPUT}")
Running Command

python3 /home/daytona/workspace/triage-guide/generate_pocket_guide.py

Running Command

ls -lh /home/daytona/workspace/triage-guide/

Your pocket guide is ready:

ESI vs CTAS Pocket Guide

PDF Document · PDF


What's inside the guide:

SectionContent
1. ESI Decision Algorithm3-step flowchart (life threat → high risk → resources) with colour coding
2. ESI Full Level DetailsAll 5 levels with criteria, wait times, and clinical examples
3. ESI Vital Sign ThresholdsAge-stratified danger vitals that trigger Level 2 upgrade
4. CTAS Level ReferenceAll 5 levels with time-to-physician, mandatory reassessment intervals, examples
5. CTAS ModifiersFirst-order and second-order modifier rules + reassessment documentation note
6. Head-to-Head Comparison12-row feature comparison (origin, basis, reliability, strengths, weaknesses)
7. Level ConcordanceESI ↔ CTAS equivalent mapping with notes on key differences
8. Clinical Tips at the Desk7 tips each for ESI and CTAS, side by side
Formatted as a colour-coded A4 document with triage-standard red/orange/yellow/green/blue level colours throughout - suitable for printing and laminating for the triage desk.
This is a shared conversation. Sign in to Orris to start your own chat.