Rhabdomyolysis tell me everything about that u know like definition treatment protocol hospita ethiology physical examination lizations causes symptoms like that every thing in the medical field

Reading File
Finding Sources
Finding Sources
Searching PubMed

rhabdomyolysis management treatment

Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
I now have comprehensive information from multiple authoritative textbooks. Let me compile the full, detailed answer.

Rhabdomyolysis: A Complete Medical Overview


1. DEFINITION

Rhabdomyolysis is an acute, potentially fatal clinical syndrome reflecting the dissolution and disintegration of striated (skeletal) muscle, with the release of intracellular muscle contents into the systemic circulation. The term comes from Greek: rhabdo (rod-shaped), myo (muscle), lysis (breakdown).
Key released contents include:
  • Myoglobin (causes myoglobinemia and myoglobinuria)
  • Creatine kinase (CK)
  • Potassium, calcium, phosphate
  • Lactate dehydrogenase (LDH), aldolase, aspartate aminotransferase (AST)
  • Organic acids, uric acid, nucleic acids
The common terminal cellular event is disruption of the Na+/K+-ATPase pump and calcium transport, leading to increased intracellular calcium and subsequent muscle cell necrosis. Calcium activates phospholipase A2, vasoactive molecules, proteases, and free oxygen radicals.
  • Goldman-Cecil Medicine, p. 1162; Tintinalli's Emergency Medicine, p. 612

2. EPIDEMIOLOGY

  • Approximately 26,000 hospitalized cases per year in the United States
  • 13-67% of rhabdomyolysis patients develop acute kidney injury (AKI)
  • Rhabdomyolysis accounts for 5-10% of all AKI in the United States
  • AKI secondary to rhabdomyolysis is independently associated with longer hospitalizations and higher mortality
  • The U.S. military reports >500 annual cases of exertional rhabdomyolysis
  • Exertional rhabdomyolysis incidence is higher in Black, non-Hispanic men (60.0 per 100,000 person-years)
  • Individuals with sickle cell trait have a slightly elevated risk
  • Multiple causes are present in more than half of all patients
  • Goldman-Cecil Medicine, p. 1162-1163

3. ETIOLOGY (Causes)

Causes are broadly divided into Inherited and Acquired.

Acquired Causes

CategoryExamples
TraumaCrush injury, electrical/lightning injury, burns, prolonged immobilization
ExertionStatus epilepticus, strenuous exercise (CrossFit, spinning, military training, marathons), delirium, electrical shock, CPR
Crush/CompressionExternal weight, prolonged immobility, bariatric surgery, limb compression from coma
IschemiaArterial occlusion, compartment syndrome, sickle cell disease, DIC
Temperature extremesExertional heatstroke, malignant hyperthermia, hypothermia, fever, burns, lightning
InfectionsInfluenza A & B, Herpes simplex, Coxsackievirus, EBV, CMV, HIV, Adenovirus, SARS-CoV-2 (COVID-19), Legionella, Salmonella, Shigella, Streptococcus, Staphylococcus aureus
Metabolic/ElectrolyteHypokalemia, hypophosphatemia, hypocalcemia, hypernatremia/hyponatremia, DKA, nonketotic hyperosmolar state, hyperthyroidism, hypothyroidism, pancreatitis
Drugs of AbuseCocaine (~20% of overdoses), heroin, amphetamines/methamphetamines, alcohol, phencyclidine (PCP), LSD, MDMA ("ecstasy"), bath salts, synthetic cannabinoids ("spice")
MedicationsStatins (0-2.2 cases/1000 person-years; cerivastatin highest risk), antipsychotics/neuroleptics, colchicine, SSRIs, tricyclic antidepressants, isoniazid, propofol, zidovudine, barbiturates, lithium, monoamine oxidase inhibitors, corticosteroids, theophylline, diphenhydramine
Autoimmune/InflammatoryPolymyositis, dermatomyositis
Neuroleptic Malignant SyndromeDue to antipsychotics
OtherSevere hyponatremia rapidly corrected, dietary supplements with stimulants

Inherited Causes

PathwayDisease Example
Glycolysis/glycogenolysisMcArdle disease (myophosphorylase deficiency)
Fatty acid oxidationCarnitine palmitoyltransferase II (CPT-II) deficiency
Krebs cycleAconitase deficiency
Pentose phosphate pathwayG6PD deficiency
Purine nucleotide cycleMyoadenylate deaminase deficiency
Mitochondrial respiratory chainSuccinate dehydrogenase deficiency
Genetic mutations associated with exertional rhabdomyolysis include: RyR1 (ryanodine receptor 1 - also linked to malignant hyperthermia), CPT2, PYGM (myophosphorylase), PFKM (phosphofructokinase), ACTN3, CKMM NcoI, and others.
  • Goldman-Cecil Medicine, p. 1163; Tintinalli's Emergency Medicine, p. 612; Comprehensive Clinical Nephrology, p. 991

4. PATHOPHYSIOLOGY

The final common pathway for all types of rhabdomyolysis:
  1. Direct or indirect injury to muscle cells
  2. Disruption of the Na+/K+-ATPase pump and calcium transport mechanisms
  3. Massive influx of intracellular calcium
  4. Calcium activates phospholipase A2, proteases, and free radical production
  5. Cell membrane destruction and muscle cell necrosis
  6. Release of myoglobin, CK, potassium, phosphate, organic acids, and other contents into circulation

How AKI Develops:

Three main mechanisms operate simultaneously:
  • Renal vasoconstriction - myoglobin causes direct vasoconstriction
  • Proximal tubular cell injury - oxidative stress from heme protein (myoglobin contains Fe²+)
  • Intratubular obstruction - myoglobin and uric acid precipitate in distal tubules, worsened by acidic urine and volume depletion
  • Macrophages activated by platelets form extracellular traps that are directly pathogenic in rhabdomyolysis-induced kidney injury
Risk for AKI is lower when CK < 20,000 U/L. Rhabdomyolysis can cause AKI at CK levels as low as 5,000 U/L when coexisting conditions (sepsis, acidosis, volume depletion) are present.
  • Tintinalli's Emergency Medicine, p. 612; Comprehensive Clinical Nephrology, p. 990-991

5. SYMPTOMS (History)

The classic triad: myalgia + weakness + dark/brown urine
However, muscle symptoms are present in only ~50% of cases.
SymptomDetails
Muscle pain (myalgia)Usually involving the affected muscle groups; may be severe
Muscle weaknessCan be profound; often in proximal muscles
Dark/brown/tea-colored urineClassic "cola-colored" or "port-wine" urine due to myoglobinuria
Malaise/fatigueCommon, nonspecific
Low-grade feverCommon
Nausea and vomitingGastrointestinal upset
Abdominal painCan mimic acute abdomen
TachycardiaRelated to hypovolemia
Decreased urine outputMay indicate developing AKI
ParesthesiasIf compartment syndrome developing
Symptoms can be acute in onset. In exertional rhabdomyolysis, exercise-related history is key. Patients with drug-induced rhabdomyolysis may have altered mental status.

6. PHYSICAL EXAMINATION

Physical findings can be local or systemic.

Local Findings:

  • Muscle swelling and tenderness - involved muscle groups
  • Tense, indurated muscles - especially with compartment syndrome
  • Warmth over affected muscles
  • Reduced range of motion in affected limbs
  • Skin changes - erythema, bruising over compressed areas

Systemic Findings:

  • Vital signs: Tachycardia (hypovolemia), hypotension, fever (heat stroke, NMS, infection)
  • Cardiovascular: Dysrhythmias from hyperkalemia, hypocalcemia
  • Neurological: Altered mental status, signs of tetany (hypocalcemia), weakness
  • Renal: Decreased or absent urine output; dark, reddish-brown urine
  • Edema: Swollen limbs; third spacing of fluids into damaged muscle

Neurovascular exam of extremities:

  • Paresthesias, weakness, or paralysis suggest peripheral nerve compression or compartment syndrome
  • Multiple nerves in the same extremity may be involved
  • Compartment syndrome signs: pain out of proportion, pain with passive stretch, tense swollen compartment, paresthesias
  • Goldman-Cecil Medicine, p. 1163; Tintinalli's Emergency Medicine, p. 612-613

7. DIAGNOSIS

Primary Diagnostic Test

Serum Creatine Kinase (CK) - most sensitive and reliable marker of muscle injury
  • Normal upper limit: ~200 U/L
  • Rhabdomyolysis typically defined as CK > 5 times normal (i.e., >1,000 U/L)
  • Clinically significant: CK often >10,000-20,000 U/L
  • CK peaks at 24-72 hours after injury, then declines

Urinalysis

  • Urine dipstick - positive for blood (due to myoglobin cross-reactivity with orthotolidine) without RBCs on microscopy = highly suggestive of myoglobinuria
  • Urine color - reddish-brown, tea/cola-colored
  • Microscopy - pigmented granular ("muddy brown") casts; absence of red blood cells despite positive dipstick
  • Urine myoglobin testing is NOT timely (done once/day in most labs) - not a reliable acute predictor

Blood Tests (Comprehensive Panel)

TestExpected Finding
CKMarkedly elevated (hallmark)
Myoglobin (serum)Elevated
AldolaseElevated
LDHElevated
ASTElevated (muscle-derived)
Serum creatinineElevated (AKI)
BUNElevated
PotassiumHyperkalemia (life-threatening)
PhosphateHyperphosphatemia
CalciumHypocalcemia (early phase)
BicarbonateLow (metabolic/lactic acidosis)
Uric acidElevated
CBCThrombocytopenia possible
Coagulation studiesDIC may develop

Urine Tests

  • Urinalysis with microscopy
  • Urine myoglobin
  • Urine output monitoring (Foley catheter for critical patients)

Additional Workup

  • ECG - look for peaked T-waves (hyperkalemia), arrhythmias
  • Compartment pressure measurement - if clinical suspicion; >30 mmHg warrants fasciotomy
  • For recurrent rhabdomyolysis: forearm exercise test (nonischemic), EMG, muscle biopsy, metabolic enzyme testing, genetic testing
  • Caffeine-halothane contracture test - if malignant hyperthermia or exertional heat illness suspected

Differential Diagnosis

  • Guillain-Barré syndrome (polyneuropathy, post-viral, no CK elevation)
  • Periodic paralysis (post-rest onset, transient electrolyte disturbances)
  • Acute myopathies (polymyositis, dermatomyositis)
  • Hemoglobinuria (hemolysis - RBCs present on microscopy)
  • Porphyria
  • Acute glomerulonephritis
  • Drug-induced urine discoloration (phenytoin, rifampin, riboflavin, beets)
  • Goldman-Cecil Medicine, p. 1163-1164; Tintinalli's Emergency Medicine, p. 612-613

8. COMPLICATIONS

Life-Threatening Complications:

  1. Acute Kidney Injury (AKI) - most serious; occurs in 13-50% of cases; rhabdomyolysis is responsible for 7-10% of all AKI in the U.S.
  2. Hyperkalemia - most severe in first 12-36 hours; can cause fatal arrhythmias; standard insulin/glucose therapy may be less effective in this setting
  3. Cardiac arrhythmias - from hyperkalemia and organic acid release combined with hypocalcemia
  4. Disseminated Intravascular Coagulation (DIC)
  5. Metabolic acidosis - lactic acidosis

Other Complications:

  • Compartment syndrome - from muscle swelling, edema, aggressive fluid resuscitation, or reperfusion
  • Peripheral nerve injury - from compartment swelling; can cause paresthesias, paralysis
  • Hypocalcemia (early) followed by hypercalcemia (during recovery/resolution phase)
  • Hyperphosphatemia
  • Acute hepatic injury (in severe cases)
  • Respiratory failure (if diaphragm/respiratory muscles affected)
  • Rebound hypercalcemia - if asymptomatic hypocalcemia corrected early (ectopic calcium deposits mobilize during recovery)
  • Tintinalli's Emergency Medicine, p. 613; Goldman-Cecil Medicine, p. 1164

9. RISK STRATIFICATION

MMRI Score (Mortality or Need for Dialysis Prediction)

ParameterValuePoints
Creatinine1.4-2.2 mg/dL1.5
Creatinine>2.2 mg/dL2.5
Calcium<7.5 mg/dL2
CK>40,000 IU/L2
Phosphate4.0-5.4 mg/dL1.5
Phosphate>5.4 mg/dL3
Bicarbonate<19 mEq/L2
Etiology NOT seizures/syncope/exercise/statins/myositis-1
Female sex-1
Age 50-70-1.5
Age 71-80-2.5
Age >80-3
  • Score ≤5: 3% risk of renal replacement therapy or death
  • Score ≥10: 52% risk of renal replacement therapy or death
  • Tintinalli's Emergency Medicine, p. 613

10. TREATMENT PROTOCOL

A. Prehospital Care (Crush/Trauma Victims)

  1. Vigorous IV fluid resuscitation - most important intervention to prevent AKI
  2. IV normal saline at 1 L/hour once limb is extricated
  3. After extrication: alternating IV normal saline 500 mL with 5% dextrose in normal saline at 1 L/hr
  4. Avoid potassium-containing solutions (Lactated Ringer's) or lactate-containing solutions until electrolytes are known (due to risk of hyperkalemia and lactic acidosis)

B. Emergency Department Care (Full Protocol)

Step 1 - Fluid Resuscitation (Cornerstone of Treatment)
  • Rapid correction of fluid deficit with IV crystalloids
  • Target rate: 4 mL/kg/hour IV fluids
  • Goal: urine output 200-300 mL/hour (or 3-4 mL/kg/hour minimum)
  • Continue aggressive IV rehydration for 24-72 hours
  • Monitor with urinary catheter (Foley) in critical patients
Step 2 - Cardiac Monitoring
  • Continuous ECG monitoring - electrolyte disturbances cause arrhythmias
  • Monitor for peaked T-waves (hyperkalemia)
Step 3 - Urine Alkalinization (Selective Use)
  • Sodium bicarbonate: Consider for patients with systemic acidosis AND/OR to alkalinize urine
  • Mechanism: decreases cast formation, minimizes myoglobin toxicity, inhibits lipid peroxidation, reduces hyperkalemia risk
  • Caution: can cause calcium to precipitate in soft tissues and contribute to hyperosmolarity
  • Maintain isotonic solution; avoid metabolic alkalosis or hypokalemia
  • No convincing evidence that bicarbonate is superior to fluids alone for all patients
Step 4 - Mannitol (Selective Use)
  • Osmotic diuretic, volume expander, free radical scavenger
  • Use only AFTER adequate kidney function is confirmed and when needed to maintain target urine output (300 mL/hr)
  • Avoid in hypovolemic patients - can worsen osmotic diuresis
  • Use with great caution in patients with marginal cardiac function
  • No proven benefit over fluids alone in controlled trials
Step 5 - Electrolyte Management
ProblemTreatment
Hyperkalemia (first 12-36 hrs)Insulin + glucose (may be less effective than usual), ion-exchange resins (sodium polystyrene sulfonate), calcium for cardiotoxicity
Hypocalcemia (asymptomatic)Do NOT treat - calcium deposits worsen; treat only if symptomatic, tetany, or severe hyperkalemia
Hypercalcemia (recovery phase)Continue saline diuresis
HyperphosphatemiaOral phosphate binders when phosphate >7 mg/dL
Step 6 - Additional ED Measures
  • Urinary catheter for output monitoring in critical patients
  • Hemodynamic monitoring for elderly, heart disease, or preexisting renal disease
  • Avoid NSAIDs - vasoconstrict renal vasculature
  • Treat underlying cause (e.g., seizure control, discontinue offending drug)
Step 7 - Dialysis (Indications)
  • Refractory hyperkalemia
  • Severe fluid overload
  • Persistent metabolic acidosis
  • Uremia/severe AKI with persistent oliguria

C. Specific Situations

Malignant Hyperthermia:
  • Discontinue all triggering anesthetics immediately
  • Dantrolene sodium 2.5-4 mg/kg IV, followed by ~1 mg/kg every 4 hours for up to 48 hours (prevents recrudescence)
  • Aggressive cooling
Compartment Syndrome:
  • Measure compartment pressures if suspected
  • Fasciotomy if pressure >30 mmHg
  • Late fasciotomy (>12 hours) is relatively contraindicated (converts closed to open wound, risk of infection)
Crush Injury:
  • Aggressive on-site IV normal saline
  • Mangled Extremity Severity Score to assess limb salvageability
  • Amputation if massive non-salvageable damage
Exertional Rhabdomyolysis:
  • Most cases are self-limited
  • Aggressive hydration
  • Monitor for systemic signs/AKI that suggest underlying metabolic disorder
Neuroleptic Malignant Syndrome:
  • Discontinue offending antipsychotic
  • Dantrolene, bromocriptine, or lorazepam
  • Aggressive supportive care

D. Prevention (Especially Exertional)

  • Adequate pre-hydration before exercise
  • Gradual increase in exercise intensity (avoid sudden high-intensity programs)
  • Avoid exercising in extreme heat/humidity
  • Adequate acclimatization
  • Avoid combinations of drugs that increase rhabdomyolysis risk (e.g., statin + cyclosporine)
  • Dietary supplements with stimulants should be avoided in high-risk individuals
  • Goldman-Cecil Medicine, p. 1164-1165; Tintinalli's Emergency Medicine, p. 613-614

11. HOSPITAL ADMISSION CRITERIA AND DISPOSITION

Admit to Hospital:

  • CK significantly elevated (generally >5,000-10,000 U/L) with any systemic signs
  • Any evidence of AKI (elevated creatinine, decreased urine output)
  • Significant electrolyte abnormalities (hyperkalemia, hypocalcemia)
  • Hemodynamic instability
  • Cardiac arrhythmias
  • Compartment syndrome signs
  • Inability to maintain adequate oral hydration

Admit to ICU:

  • Severe AKI requiring dialysis
  • Life-threatening hyperkalemia or arrhythmias
  • DIC
  • Multi-organ failure
  • Malignant hyperthermia
  • Neuroleptic malignant syndrome
  • MMRI score ≥10

Discharge (Outpatient Management) - Appropriate for:

  • Healthy patients with exertional rhabdomyolysis
  • Mild CK elevation without systemic signs
  • Normal or trending-down CK
  • Normal renal function and electrolytes
  • Good oral intake possible
  • Close follow-up available
Patients should have:
  • Return precautions for dark urine, decreased urination, weakness
  • Follow-up creatinine, CK, and electrolytes
  • Avoidance of triggering factors
  • Investigation of underlying cause if recurrent
  • Tintinalli's Emergency Medicine, p. 613-614

12. SPECIAL POPULATIONS

Pediatric Patients

  • Rhabdomyolysis is less common and generally more benign than in adults
  • Most common causes (non-recurrent): viral myositis, trauma, connective tissue disease
  • Recurrent episodes in children: strongly suspect inherited metabolic disorder
  • Common specific pediatric causes: nonketotic hyperosmolar coma, viral myositis, dystonia, malignant hyperthermia, trauma
  • 2025 systematic review and meta-analysis (PMID: 41146051) provides updated data on pediatric rhabdomyolysis etiologies and outcomes

Drug/Alcohol Users

  • Drugs of abuse + alcohol are the leading cause in urban adults
  • Nearly 20% of cocaine overdoses are complicated by rhabdomyolysis
  • Coma-induced muscle compression from alcohol is a major risk

Athletes and Military

  • Exertional rhabdomyolysis is a significant occupational and athletic hazard
  • Risk factors: poor conditioning, male sex, inadequate hydration, restrictive clothing, high ambient temperature, high humidity
  • Eccentric (resistance) exercise causes greater CK elevation than concentric (aerobic) exercise

Statin Users

  • Up to 10% experience myalgias
  • True rhabdomyolysis rate: 0-2.2 cases/1000 person-years
  • Polypharmacy risk: cyclosporine, macrolide antibiotics, warfarin, digoxin, dual statin therapy
  • Statins can also cause autoimmune anti-HMG-CoA antibody myopathy

13. KEY CLINICAL PEARLS

  1. Cola-colored urine with no RBCs on microscopy = rhabdomyolysis until proven otherwise
  2. CK is the most sensitive marker - check serially every 12-24 hours
  3. Urine myoglobin is cleared faster than CK - may be negative when CK is still very high
  4. Hypocalcemia in early rhabdomyolysis should NOT be treated unless symptomatic - it will spontaneously reverse and may cause rebound hypercalcemia if corrected
  5. Hyperkalemia is most dangerous in the first 12-36 hours - monitor continuously
  6. NSAIDs are contraindicated - they worsen renal perfusion
  7. Recurrent rhabdomyolysis = workup for inherited metabolic disease
  8. Malignant hyperthermia requires dantrolene - do not delay
  9. Compartment pressures >30 mmHg = surgical emergency (fasciotomy)
  10. There is NO universally proven benefit of bicarbonate or mannitol over aggressive fluid therapy alone - fluids are the cornerstone

Recent Evidence


Sources:
  • Goldman-Cecil Medicine International Edition, Chapter 99 (Rhabdomyolysis)
  • Tintinalli's Emergency Medicine: A Comprehensive Study, Chapter 89
  • Comprehensive Clinical Nephrology, 7th Edition, Chapter 72
  • Rosen's Emergency Medicine: Concepts and Clinical Practice
  • Bradley and Daroff's Neurology in Clinical Practice

Can u make a 15 slides of presentation with is explanation without missing any thing and add some pictures according to medical field

Reading File
Reading File
Reading File
Searching the Web

rhabdomyolysis medical images pathophysiology muscle necrosis myoglobin kidney site:commons.wikimedia.org OR site:nlm.nih.gov

Running Command

ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or missing"

Running Command

mkdir -p /home/daytona/workspace/rhabdomyolysis-pptx && node /home/daytona/skill…

Running Command

node /home/daytona/skills/shared/scripts/fetch_images.js \ "https://upload.wik…

Writing File

~/rhabdomyolysis-pptx/build.js

const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");

// ─── FETCH IMAGES ────────────────────────────────────────────────────────────
const imageUrls = [
  "https://cdn.lecturio.com/assets/Kidney-injury-in-rhabdomyolysis.jpg",
];
let images = [];
try {
  const raw = execSync(
    `node /home/daytona/skills/shared/scripts/fetch_images.js ${imageUrls.map(u => `"${u}"`).join(" ")}`,
    { timeout: 25000 }
  ).toString();
  images = JSON.parse(raw);
} catch (e) {
  images = imageUrls.map(u => ({ url: u, base64: null, error: e.message }));
}

const kidneyImg = images[0] && images[0].base64 ? images[0].base64 : null;

// ─── THEME COLORS ────────────────────────────────────────────────────────────
const C = {
  darkBg:    "0D1B2A",   // deep navy
  midBg:     "1B2A40",   // slightly lighter navy
  accent:    "E63946",   // medical red
  accentLt:  "FF6B6B",   // lighter red
  gold:      "F4A261",   // amber/gold
  white:     "FFFFFF",
  lightGray: "E8EDF4",
  silver:    "B0BAC9",
  teal:      "2EC4B6",
  green:     "2D9C6E",
  orange:    "F4A261",
  cardBg:    "142236",
};

// ─── HELPERS ─────────────────────────────────────────────────────────────────
function slide_header(slide, title, subtitle) {
  // Full dark background
  slide.addShape("rect", { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.darkBg }, line: { color: C.darkBg } });
  // Red accent bar top
  slide.addShape("rect", { x: 0, y: 0, w: 10, h: 0.08, fill: { color: C.accent }, line: { color: C.accent } });
  // Red accent bar bottom
  slide.addShape("rect", { x: 0, y: 5.545, w: 10, h: 0.08, fill: { color: C.accent }, line: { color: C.accent } });
  // Title
  slide.addText(title, {
    x: 0.45, y: 0.18, w: 9.1, h: 0.62,
    fontSize: 28, bold: true, color: C.white,
    fontFace: "Calibri", align: "left", valign: "middle", margin: 0
  });
  // Red underline
  slide.addShape("rect", { x: 0.45, y: 0.82, w: 9.1, h: 0.04, fill: { color: C.accent }, line: { color: C.accent } });
  if (subtitle) {
    slide.addText(subtitle, {
      x: 0.45, y: 0.88, w: 9.1, h: 0.32,
      fontSize: 12, color: C.silver, fontFace: "Calibri",
      align: "left", valign: "top", italic: true, margin: 0
    });
  }
}

function card(slide, x, y, w, h, title, lines, titleColor) {
  slide.addShape("rect", {
    x, y, w, h,
    fill: { color: C.cardBg },
    line: { color: C.accent, width: 1 },
    shadow: { type: "outer", color: "000000", blur: 8, offset: 3, angle: 135, opacity: 0.25 }
  });
  slide.addText(title, {
    x: x + 0.12, y: y + 0.1, w: w - 0.24, h: 0.3,
    fontSize: 11, bold: true, color: titleColor || C.gold,
    fontFace: "Calibri", align: "left", valign: "top", margin: 0
  });
  const items = lines.map((l, i) => ({
    text: l, options: { bullet: { code: "2022" }, breakLine: i < lines.length - 1, color: C.lightGray, fontSize: 9.5, fontFace: "Calibri", paraSpaceBefore: 2 }
  }));
  slide.addText(items, {
    x: x + 0.12, y: y + 0.42, w: w - 0.24, h: h - 0.54,
    valign: "top", margin: 0
  });
}

function label_value(slide, x, y, w, h, label, value, lColor, vColor) {
  slide.addShape("rect", { x, y, w, h, fill: { color: C.cardBg }, line: { color: C.teal, width: 0.75 } });
  slide.addText(label, { x: x + 0.1, y: y + 0.06, w: w - 0.2, h: 0.22, fontSize: 9, bold: true, color: lColor || C.teal, fontFace: "Calibri", align: "center", margin: 0 });
  slide.addText(value, { x: x + 0.1, y: y + 0.28, w: w - 0.2, h: h - 0.36, fontSize: 8.5, color: vColor || C.lightGray, fontFace: "Calibri", align: "center", valign: "top", margin: 0 });
}

// ─── PRESENTATION ────────────────────────────────────────────────────────────
let pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Rhabdomyolysis — Complete Medical Overview";
pres.author = "Medical Education";

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE SLIDE
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape("rect", { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.darkBg }, line: { color: C.darkBg } });
  // Decorative diagonal stripe
  sl.addShape("rect", { x: 6.8, y: 0, w: 3.2, h: 5.625, fill: { color: C.midBg }, line: { color: C.midBg } });
  sl.addShape("rect", { x: 0, y: 0, w: 10, h: 0.12, fill: { color: C.accent }, line: { color: C.accent } });
  sl.addShape("rect", { x: 0, y: 5.505, w: 10, h: 0.12, fill: { color: C.accent }, line: { color: C.accent } });
  // Red vertical accent
  sl.addShape("rect", { x: 0.38, y: 0.8, w: 0.08, h: 3.6, fill: { color: C.accent }, line: { color: C.accent } });

  sl.addText("RHABDOMYOLYSIS", {
    x: 0.65, y: 0.85, w: 6.0, h: 0.85,
    fontSize: 40, bold: true, color: C.white,
    fontFace: "Calibri", align: "left", valign: "middle", charSpacing: 3, margin: 0
  });
  sl.addText("Complete Medical Overview", {
    x: 0.65, y: 1.75, w: 6.0, h: 0.45,
    fontSize: 18, color: C.accentLt, fontFace: "Calibri",
    align: "left", valign: "top", italic: true, margin: 0
  });
  sl.addShape("rect", { x: 0.65, y: 2.22, w: 5.8, h: 0.04, fill: { color: C.accent }, line: { color: C.accent } });

  sl.addText([
    { text: "Definition  •  Epidemiology  •  Etiology", options: { breakLine: true } },
    { text: "Pathophysiology  •  Symptoms  •  Physical Exam", options: { breakLine: true } },
    { text: "Diagnosis  •  Complications  •  Treatment Protocol", options: { breakLine: true } },
    { text: "Hospitalization  •  Special Populations  •  Prevention" }
  ], {
    x: 0.65, y: 2.35, w: 6.0, h: 1.4,
    fontSize: 10.5, color: C.silver, fontFace: "Calibri",
    align: "left", valign: "top", lineSpacingMultiple: 1.3, margin: 0
  });

  sl.addText("Sources: Goldman-Cecil Medicine • Tintinalli's Emergency Medicine\nComprehensive Clinical Nephrology • Rosen's Emergency Medicine", {
    x: 0.65, y: 4.9, w: 6.0, h: 0.55,
    fontSize: 8, color: C.silver, fontFace: "Calibri",
    align: "left", italic: true, margin: 0
  });

  // Right panel icons/labels
  sl.addText("🩺", { x: 7.1, y: 0.9, w: 2.5, h: 0.7, fontSize: 42, align: "center", margin: 0 });
  sl.addText("Emergency Medicine\nNephrology\nNeurology", {
    x: 7.0, y: 1.75, w: 2.7, h: 0.75,
    fontSize: 9, color: C.silver, fontFace: "Calibri",
    align: "center", lineSpacingMultiple: 1.4, margin: 0
  });
  sl.addShape("rect", { x: 7.0, y: 2.6, w: 2.7, h: 0.04, fill: { color: C.gold }, line: { color: C.gold } });
  sl.addText("CK > 1000 U/L", { x: 7.0, y: 2.7, w: 2.7, h: 0.3, fontSize: 11, bold: true, color: C.gold, align: "center", fontFace: "Calibri", margin: 0 });
  sl.addText("Hallmark Lab Finding", { x: 7.0, y: 3.0, w: 2.7, h: 0.25, fontSize: 8.5, color: C.silver, align: "center", fontFace: "Calibri", margin: 0 });
  sl.addText("~26,000 US cases/year", { x: 7.0, y: 3.35, w: 2.7, h: 0.28, fontSize: 9.5, color: C.accentLt, align: "center", bold: true, fontFace: "Calibri", margin: 0 });
  sl.addText("13–67% develop AKI", { x: 7.0, y: 3.65, w: 2.7, h: 0.28, fontSize: 9.5, color: C.accentLt, align: "center", fontFace: "Calibri", margin: 0 });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — DEFINITION & OVERVIEW
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  slide_header(sl, "DEFINITION & OVERVIEW", "What is Rhabdomyolysis?");
  sl.addShape("rect", { x: 0, y: 1.25, w: 10, h: 4.25, fill: { color: C.midBg }, line: { color: C.midBg } });

  sl.addText("Rhabdomyolysis", {
    x: 0.4, y: 1.35, w: 9.2, h: 0.38,
    fontSize: 16, bold: true, color: C.gold, fontFace: "Calibri", align: "left", margin: 0
  });
  sl.addText(
    "An acute, potentially fatal clinical syndrome reflecting the dissolution and disintegration of striated (skeletal) muscle, with the release of intracellular muscle contents into the systemic circulation.",
    { x: 0.4, y: 1.72, w: 9.2, h: 0.55, fontSize: 11, color: C.lightGray, fontFace: "Calibri", align: "left", lineSpacingMultiple: 1.3, margin: 0 }
  );
  sl.addShape("rect", { x: 0.4, y: 2.3, w: 9.2, h: 0.04, fill: { color: C.accent }, line: { color: C.accent } });

  // Etymology
  sl.addText("Etymology", { x: 0.4, y: 2.4, w: 3.0, h: 0.28, fontSize: 11, bold: true, color: C.teal, fontFace: "Calibri", margin: 0 });
  const etym = [
    ["Rhabdo", "Rod-shaped"],
    ["Myo", "Muscle"],
    ["Lysis", "Breakdown / dissolution"],
  ];
  etym.forEach(([term, def], i) => {
    sl.addShape("rect", { x: 0.4 + i * 3.1, y: 2.72, w: 2.85, h: 0.65, fill: { color: C.cardBg }, line: { color: C.teal, width: 0.75 } });
    sl.addText(term, { x: 0.4 + i * 3.1 + 0.1, y: 2.76, w: 2.65, h: 0.26, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", align: "center", margin: 0 });
    sl.addText(def, { x: 0.4 + i * 3.1 + 0.1, y: 3.03, w: 2.65, h: 0.28, fontSize: 9.5, color: C.silver, fontFace: "Calibri", align: "center", margin: 0 });
  });

  sl.addShape("rect", { x: 0.4, y: 3.5, w: 9.2, h: 0.04, fill: { color: C.gold }, line: { color: C.gold } });
  sl.addText("Key Released Substances", { x: 0.4, y: 3.58, w: 5.0, h: 0.28, fontSize: 11, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
  const substances = ["Myoglobin (→ myoglobinuria)", "Creatine Kinase (CK)", "Potassium & Phosphate", "LDH, Aldolase, AST", "Organic acids & Uric acid"];
  substances.forEach((s, i) => {
    const col = i < 3 ? 0 : 1;
    const row = i < 3 ? i : i - 3;
    sl.addText("• " + s, {
      x: 0.4 + col * 4.7, y: 3.9 + row * 0.28,
      w: 4.5, h: 0.26, fontSize: 10, color: C.lightGray, fontFace: "Calibri", margin: 0
    });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — EPIDEMIOLOGY
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  slide_header(sl, "EPIDEMIOLOGY", "Incidence, Demographics & Burden of Disease");
  sl.addShape("rect", { x: 0, y: 1.25, w: 10, h: 4.25, fill: { color: C.midBg }, line: { color: C.midBg } });

  // Stat boxes row 1
  const stats = [
    { val: "~26,000", lbl: "Hospitalized cases/yr\n(United States)", col: C.accent },
    { val: "13–67%", lbl: "Develop\nAcute Kidney Injury", col: C.gold },
    { val: "5–10%", lbl: "Of all AKI caused\nby rhabdomyolysis", col: C.teal },
    { val: "500+", lbl: "Annual US military\nexertional cases", col: C.accentLt },
  ];
  stats.forEach((s, i) => {
    sl.addShape("rect", { x: 0.3 + i * 2.37, y: 1.35, w: 2.2, h: 1.0,
      fill: { color: C.cardBg }, line: { color: s.col, width: 1.5 },
      shadow: { type: "outer", color: "000000", blur: 8, offset: 2, angle: 135, opacity: 0.3 }
    });
    sl.addText(s.val, { x: 0.3 + i * 2.37 + 0.1, y: 1.4, w: 2.0, h: 0.44,
      fontSize: 24, bold: true, color: s.col, fontFace: "Calibri", align: "center", margin: 0 });
    sl.addText(s.lbl, { x: 0.3 + i * 2.37 + 0.1, y: 1.85, w: 2.0, h: 0.44,
      fontSize: 8.5, color: C.silver, fontFace: "Calibri", align: "center", margin: 0 });
  });

  sl.addShape("rect", { x: 0.3, y: 2.5, w: 9.4, h: 0.04, fill: { color: C.accent }, line: { color: C.accent } });
  sl.addText("Risk Groups & Demographics", { x: 0.3, y: 2.58, w: 9.4, h: 0.3, fontSize: 12, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });

  const riskItems = [
    "Urban adults: Drugs of abuse, alcohol, muscle compression, status epilepticus most common causes",
    "Pediatric: Trauma, viral myositis, dystonia, nonketotic hyperosmolar coma; recurrent episodes → inherited disorder",
    "Military & athletes: Exertional rhabdomyolysis; higher in Black non-Hispanic men (60/100,000 person-years)",
    "Sickle cell trait carriers: Slightly elevated exertional risk",
    "Multiple causes present in >50% of all patients",
    "AKI from rhabdomyolysis → independently associated with longer hospitalization & higher mortality",
  ];
  riskItems.forEach((item, i) => {
    sl.addText("• " + item, {
      x: 0.3, y: 2.92 + i * 0.33,
      w: 9.4, h: 0.31, fontSize: 9.5, color: C.lightGray, fontFace: "Calibri", margin: 0
    });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — ETIOLOGY (ACQUIRED CAUSES)
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  slide_header(sl, "ETIOLOGY — ACQUIRED CAUSES", "Trauma • Drugs • Infection • Metabolic • Temperature Extremes");
  sl.addShape("rect", { x: 0, y: 1.25, w: 10, h: 4.25, fill: { color: C.midBg }, line: { color: C.midBg } });

  const cats = [
    { title: "Trauma & Compression", color: C.accent, lines: ["Crush injury", "Electrical / lightning", "Burns, prolonged immobility", "Compartment syndrome", "Bariatric surgery"] },
    { title: "Drugs of Abuse", color: C.accentLt, lines: ["Cocaine (~20% of ODs)", "Heroin, Amphetamines", "Alcohol (direct + coma)", "PCP, MDMA, Bath salts", "Synthetic cannabinoids"] },
    { title: "Medications", color: C.gold, lines: ["Statins (0–2.2/1000 p-yrs)", "Antipsychotics / NMS", "Colchicine, SSRIs", "Propofol, Isoniazid", "Corticosteroids, Lithium"] },
    { title: "Infections", color: C.teal, lines: ["Influenza A & B", "HIV, CMV, EBV, HSV", "SARS-CoV-2 (COVID-19)", "Legionella, Salmonella", "Streptococcus, Staph aureus"] },
    { title: "Temperature Extremes", color: C.green, lines: ["Exertional heatstroke", "Malignant hyperthermia", "Neuroleptic malignant syn.", "Hypothermia, Burns", "Lightning strike"] },
    { title: "Metabolic / Electrolytes", color: C.orange, lines: ["Hypokalemia, Hypophosphatemia", "DKA, Hyperosmolar state", "Rapid Na correction", "Hyperthyroid / Hypothyroid", "Pancreatitis"] },
  ];
  cats.forEach((c, i) => {
    const col = i % 3;
    const row = Math.floor(i / 3);
    card(sl, 0.25 + col * 3.22, 1.35 + row * 2.05, 3.0, 1.92, c.title, c.lines, c.color);
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — ETIOLOGY (INHERITED / GENETIC CAUSES)
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  slide_header(sl, "ETIOLOGY — INHERITED & GENETIC CAUSES", "Suspect in recurrent rhabdomyolysis, especially with exercise intolerance");
  sl.addShape("rect", { x: 0, y: 1.25, w: 10, h: 4.25, fill: { color: C.midBg }, line: { color: C.midBg } });

  const genRows = [
    { pathway: "Glycolysis / Glycogenolysis", disease: "McArdle disease (myophosphorylase deficiency)", gene: "PYGM" },
    { pathway: "Fatty Acid Oxidation", disease: "Carnitine palmitoyltransferase II deficiency", gene: "CPT2" },
    { pathway: "Krebs Cycle", disease: "Aconitase deficiency", gene: "—" },
    { pathway: "Pentose Phosphate Pathway", disease: "Glucose-6-phosphate dehydrogenase (G6PD) deficiency", gene: "G6PD" },
    { pathway: "Purine Nucleotide Cycle", disease: "Myoadenylate deaminase deficiency", gene: "AMPDA1" },
    { pathway: "Mitochondrial Resp. Chain", disease: "Succinate dehydrogenase deficiency", gene: "SDHA" },
    { pathway: "Ryanodine Receptor", disease: "Malignant hyperthermia susceptibility", gene: "RyR1" },
    { pathway: "Phosphofructokinase", disease: "Tarui disease (glycogen storage VII)", gene: "PFKM" },
  ];

  // Header row
  sl.addShape("rect", { x: 0.3, y: 1.36, w: 9.4, h: 0.35, fill: { color: C.accent }, line: { color: C.accent } });
  sl.addText("Metabolic Pathway", { x: 0.35, y: 1.38, w: 3.0, h: 0.3, fontSize: 10, bold: true, color: C.white, fontFace: "Calibri", margin: 0 });
  sl.addText("Disease / Deficiency", { x: 3.4, y: 1.38, w: 4.8, h: 0.3, fontSize: 10, bold: true, color: C.white, fontFace: "Calibri", margin: 0 });
  sl.addText("Key Gene", { x: 8.25, y: 1.38, w: 1.45, h: 0.3, fontSize: 10, bold: true, color: C.white, fontFace: "Calibri", margin: 0 });

  genRows.forEach((r, i) => {
    const y = 1.73 + i * 0.42;
    const bg = i % 2 === 0 ? C.cardBg : C.midBg;
    sl.addShape("rect", { x: 0.3, y, w: 9.4, h: 0.4, fill: { color: bg }, line: { color: bg } });
    sl.addText(r.pathway, { x: 0.4, y: y + 0.04, w: 2.9, h: 0.32, fontSize: 9.5, color: C.teal, fontFace: "Calibri", bold: true, margin: 0 });
    sl.addText(r.disease, { x: 3.4, y: y + 0.04, w: 4.8, h: 0.32, fontSize: 9.5, color: C.lightGray, fontFace: "Calibri", margin: 0 });
    sl.addText(r.gene, { x: 8.3, y: y + 0.04, w: 1.35, h: 0.32, fontSize: 9.5, color: C.gold, bold: true, fontFace: "Calibri", align: "center", margin: 0 });
  });

  sl.addText("⚠  Recurrent rhabdomyolysis without clear cause → order forearm exercise test, EMG, muscle biopsy & genetic panel", {
    x: 0.3, y: 5.15, w: 9.4, h: 0.33,
    fontSize: 9, color: C.accentLt, fontFace: "Calibri", italic: true, margin: 0
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — PATHOPHYSIOLOGY
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  slide_header(sl, "PATHOPHYSIOLOGY", "Final Common Pathway & Mechanism of Acute Kidney Injury");
  sl.addShape("rect", { x: 0, y: 1.25, w: 10, h: 4.25, fill: { color: C.midBg }, line: { color: C.midBg } });

  // Flow diagram (horizontal)
  const steps = [
    { label: "Muscle Injury\n(any cause)", color: C.accent },
    { label: "Na⁺/K⁺-ATPase\ndisruption", color: C.accentLt },
    { label: "↑ Intracellular\nCa²⁺", color: C.gold },
    { label: "Cell Necrosis\n+ PLA₂ activation", color: C.orange },
    { label: "Contents released\ninto circulation", color: C.green },
  ];
  steps.forEach((s, i) => {
    sl.addShape("rect", { x: 0.25 + i * 1.92, y: 1.38, w: 1.7, h: 0.8,
      fill: { color: C.cardBg }, line: { color: s.color, width: 1.5 }
    });
    sl.addText(s.label, { x: 0.25 + i * 1.92 + 0.05, y: 1.42, w: 1.6, h: 0.72,
      fontSize: 9, bold: true, color: s.color, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
    if (i < steps.length - 1) {
      sl.addText("▶", { x: 0.25 + i * 1.92 + 1.72, y: 1.57, w: 0.2, h: 0.42,
        fontSize: 14, color: C.silver, align: "center", margin: 0 });
    }
  });

  sl.addShape("rect", { x: 0.25, y: 2.28, w: 9.45, h: 0.04, fill: { color: C.teal }, line: { color: C.teal } });
  sl.addText("How Acute Kidney Injury Develops", { x: 0.25, y: 2.36, w: 9.4, h: 0.3, fontSize: 12, bold: true, color: C.teal, fontFace: "Calibri", margin: 0 });

  const akiMechs = [
    { title: "1. Renal Vasoconstriction", detail: "Myoglobin directly vasoconstricts renal vasculature → ↓ GFR" },
    { title: "2. Tubular Cell Injury", detail: "Oxidative stress from heme protein (Fe²⁺ in myoglobin) → proximal tubular necrosis" },
    { title: "3. Intratubular Obstruction", detail: "Myoglobin + uric acid precipitate in distal tubules; worsened by acidic urine & hypovolemia" },
    { title: "4. Macrophage Traps", detail: "Platelet-activated macrophages form extracellular traps that are directly nephrotoxic" },
  ];
  akiMechs.forEach((m, i) => {
    sl.addShape("rect", { x: 0.25 + (i % 2) * 4.75, y: 2.72 + Math.floor(i / 2) * 0.8, w: 4.5, h: 0.72,
      fill: { color: C.cardBg }, line: { color: C.teal, width: 0.75 }
    });
    sl.addText(m.title, { x: 0.35 + (i % 2) * 4.75, y: 2.76 + Math.floor(i / 2) * 0.8, w: 4.3, h: 0.26,
      fontSize: 10, bold: true, color: C.teal, fontFace: "Calibri", margin: 0 });
    sl.addText(m.detail, { x: 0.35 + (i % 2) * 4.75, y: 3.02 + Math.floor(i / 2) * 0.8, w: 4.3, h: 0.36,
      fontSize: 9, color: C.lightGray, fontFace: "Calibri", margin: 0 });
  });

  sl.addText("CK threshold: AKI risk ↓ when CK < 20,000 U/L | AKI can occur at CK 5,000 U/L with co-existing sepsis, acidosis, or hypovolemia", {
    x: 0.25, y: 5.18, w: 9.4, h: 0.3,
    fontSize: 8.5, color: C.accentLt, italic: true, fontFace: "Calibri", margin: 0
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — SYMPTOMS
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  slide_header(sl, "CLINICAL SYMPTOMS", "Classic Triad + Associated Symptoms | Acute onset");
  sl.addShape("rect", { x: 0, y: 1.25, w: 10, h: 4.25, fill: { color: C.midBg }, line: { color: C.midBg } });

  // Classic triad
  sl.addText("Classic Triad", { x: 0.3, y: 1.35, w: 4.0, h: 0.3, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });

  const triad = [
    { icon: "💪", title: "Myalgia", sub: "Muscle pain (may be severe or absent in ~50%)" },
    { icon: "⚡", title: "Weakness", sub: "Proximal muscle weakness, often profound" },
    { icon: "🟤", title: "Dark Urine", sub: "Cola / tea-colored urine (myoglobinuria)" },
  ];
  triad.forEach((t, i) => {
    sl.addShape("rect", { x: 0.3 + i * 3.2, y: 1.7, w: 3.0, h: 0.95,
      fill: { color: C.accent }, line: { color: C.accentLt, width: 1 },
      shadow: { type: "outer", color: "000000", blur: 8, offset: 3, angle: 135, opacity: 0.35 }
    });
    sl.addText(t.icon + " " + t.title, { x: 0.3 + i * 3.2 + 0.1, y: 1.74, w: 2.8, h: 0.36,
      fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });
    sl.addText(t.sub, { x: 0.3 + i * 3.2 + 0.1, y: 2.1, w: 2.8, h: 0.5,
      fontSize: 9, color: C.lightGray, fontFace: "Calibri", align: "center", margin: 0 });
  });

  sl.addShape("rect", { x: 0.3, y: 2.75, w: 9.4, h: 0.04, fill: { color: C.teal }, line: { color: C.teal } });
  sl.addText("Associated Symptoms", { x: 0.3, y: 2.83, w: 9.4, h: 0.3, fontSize: 12, bold: true, color: C.teal, fontFace: "Calibri", margin: 0 });

  const syms = [
    ["Malaise & fatigue", "General weakness, non-specific"], ["Low-grade fever", "Systemic inflammatory response"],
    ["Nausea & vomiting", "GI upset common"], ["Abdominal pain", "Can mimic acute abdomen"],
    ["Tachycardia", "Hypovolemia-driven"], ["Decreased urine output", "Developing AKI sign"],
    ["Paresthesias", "Early compartment syndrome"], ["Altered mental status", "Drug-induced or severe electrolyte abnormality"],
  ];
  syms.forEach(([sym, detail], i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    sl.addShape("rect", { x: 0.3 + col * 4.75, y: 3.18 + row * 0.47, w: 4.5, h: 0.42,
      fill: { color: C.cardBg }, line: { color: C.cardBg }
    });
    sl.addText(sym, { x: 0.4 + col * 4.75, y: 3.22 + row * 0.47, w: 1.6, h: 0.32,
      fontSize: 9.5, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
    sl.addText(detail, { x: 2.05 + col * 4.75, y: 3.22 + row * 0.47, w: 2.9, h: 0.32,
      fontSize: 9, color: C.silver, fontFace: "Calibri", margin: 0 });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 — PHYSICAL EXAMINATION
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  slide_header(sl, "PHYSICAL EXAMINATION", "Local and Systemic Findings");
  sl.addShape("rect", { x: 0, y: 1.25, w: 10, h: 4.25, fill: { color: C.midBg }, line: { color: C.midBg } });

  card(sl, 0.25, 1.35, 4.65, 2.3, "Local Findings (Muscles & Extremities)", [
    "Muscle swelling and tenderness on palpation",
    "Tense, indurated muscles (especially with compartment syndrome)",
    "Warmth and erythema over affected muscles",
    "Reduced range of motion of affected limbs",
    "Skin changes: erythema, bruising over compressed areas",
    "Tense compartment → passive stretch pain = emergency",
  ], C.gold);

  card(sl, 5.1, 1.35, 4.65, 2.3, "Systemic Findings", [
    "VS: Tachycardia (hypovolemia), hypotension, fever",
    "Cardiac: Dysrhythmias (hyperkalemia, hypocalcemia)",
    "Neuro: Altered consciousness, tetany signs",
    "Renal: Dark urine, oliguria or anuria",
    "Edema: Swollen limbs, third-spacing into muscle",
    "Respiratory: Weakness if diaphragm involved",
  ], C.teal);

  sl.addShape("rect", { x: 0.25, y: 3.75, w: 9.5, h: 0.04, fill: { color: C.accent }, line: { color: C.accent } });
  sl.addText("Neurovascular Exam — CRITICAL for Compartment Syndrome", { x: 0.25, y: 3.83, w: 9.5, h: 0.28, fontSize: 11, bold: true, color: C.accent, fontFace: "Calibri", margin: 0 });

  const neuro = [
    "Pain out of proportion to injury",
    "Pain on passive muscle stretch",
    "Paresthesias in distal digits",
    "Paralysis (late sign)",
    "Pallor of extremity",
    "Pulselessness (very late)",
  ];
  neuro.forEach((n, i) => {
    sl.addText("• " + n, {
      x: 0.3 + (i % 3) * 3.2, y: 4.15 + Math.floor(i / 3) * 0.32,
      w: 3.1, h: 0.3, fontSize: 9.5, color: C.lightGray, fontFace: "Calibri", margin: 0
    });
  });
  sl.addText("Compartment Pressure ≥ 30 mmHg → Fasciotomy required", {
    x: 0.25, y: 5.18, w: 9.5, h: 0.3,
    fontSize: 9, bold: true, color: C.accentLt, italic: true, fontFace: "Calibri", margin: 0
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 — DIAGNOSIS (LABS)
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  slide_header(sl, "DIAGNOSIS — LABORATORY WORKUP", "CK is the most sensitive and reliable marker");
  sl.addShape("rect", { x: 0, y: 1.25, w: 10, h: 4.25, fill: { color: C.midBg }, line: { color: C.midBg } });

  // CK highlight box
  sl.addShape("rect", { x: 0.25, y: 1.35, w: 9.5, h: 0.8,
    fill: { color: C.accent }, line: { color: C.accentLt, width: 1.5 }
  });
  sl.addText("🔑 HALLMARK: Serum CK > 1,000 U/L  (> 5× upper normal limit) — Peaks at 24–72 hrs after injury, then declines", {
    x: 0.35, y: 1.45, w: 9.3, h: 0.6,
    fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0
  });

  const labs = [
    { test: "Creatine Kinase (CK)", finding: "> 5× ULN (> 1,000 U/L)", color: C.accent },
    { test: "Serum Myoglobin", finding: "Elevated (clears faster than CK)", color: C.accentLt },
    { test: "Potassium", finding: "HYPERKALEMIA — most dangerous (12–36 hrs)", color: C.gold },
    { test: "Phosphate", finding: "HYPERPHOSPHATEMIA", color: C.gold },
    { test: "Calcium", finding: "HYPOCALCEMIA (early) → Hypercalcemia (recovery)", color: C.orange },
    { test: "Bicarbonate", finding: "LOW — metabolic lactic acidosis", color: C.teal },
    { test: "Creatinine / BUN", finding: "Elevated — indicates AKI", color: C.green },
    { test: "LDH, AST, Aldolase", finding: "Elevated (muscle-derived)", color: C.silver },
    { test: "Uric Acid", finding: "Elevated (tubular obstruction)", color: C.silver },
    { test: "CBC", finding: "Thrombocytopenia possible", color: C.silver },
    { test: "Coagulation (PT/PTT)", finding: "Deranged if DIC developing", color: C.accentLt },
    { test: "Urine Dipstick", finding: "Heme positive + NO RBCs = myoglobinuria", color: C.teal },
  ];

  labs.forEach((l, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const y = 2.25 + row * 0.43;
    const x = 0.25 + col * 4.87;
    sl.addShape("rect", { x, y, w: 4.62, h: 0.4, fill: { color: C.cardBg }, line: { color: C.cardBg } });
    sl.addText(l.test + ":", { x: x + 0.1, y: y + 0.04, w: 2.1, h: 0.32, fontSize: 9, bold: true, color: l.color, fontFace: "Calibri", margin: 0 });
    sl.addText(l.finding, { x: x + 2.2, y: y + 0.04, w: 2.35, h: 0.32, fontSize: 8.5, color: C.lightGray, fontFace: "Calibri", margin: 0 });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 — DIAGNOSIS (IMAGING & DIFFERENTIAL)
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  slide_header(sl, "DIAGNOSIS — URINALYSIS, IMAGING & DIFFERENTIAL", "Key diagnostic clues and exclusion of mimics");
  sl.addShape("rect", { x: 0, y: 1.25, w: 10, h: 4.25, fill: { color: C.midBg }, line: { color: C.midBg } });

  sl.addText("Urinalysis & Urine Microscopy", { x: 0.3, y: 1.35, w: 5.0, h: 0.3, fontSize: 12, bold: true, color: C.teal, fontFace: "Calibri", margin: 0 });
  const urineFindings = [
    "Cola / reddish-brown colored urine",
    "Urine dipstick: HEME POSITIVE",
    "Microscopy: NO red blood cells (key distinction!)",
    "Pigmented granular 'muddy brown' casts — classic",
    "Absence of RBCs with positive dipstick = myoglobinuria",
    "Urine myoglobin testing (≤1×/day — not timely for acute monitoring)",
  ];
  urineFindings.forEach((u, i) => {
    sl.addText("• " + u, {
      x: 0.3, y: 1.7 + i * 0.32,
      w: 5.5, h: 0.3, fontSize: 9.5, color: C.lightGray, fontFace: "Calibri", margin: 0
    });
  });

  // If kidney image available
  if (kidneyImg) {
    sl.addImage({ data: kidneyImg, x: 6.05, y: 1.35, w: 3.65, h: 2.6, altText: "Kidney injury in rhabdomyolysis" });
    sl.addText("Acute kidney injury in rhabdomyolysis\n(tubular cast nephropathy)", {
      x: 6.05, y: 3.96, w: 3.65, h: 0.42,
      fontSize: 7.5, color: C.silver, fontFace: "Calibri", align: "center", italic: true, margin: 0
    });
  }

  sl.addShape("rect", { x: 0.3, y: 3.78, w: 9.4, h: 0.04, fill: { color: C.accent }, line: { color: C.accent } });
  sl.addText("Differential Diagnosis", { x: 0.3, y: 3.86, w: 9.4, h: 0.28, fontSize: 12, bold: true, color: C.accent, fontFace: "Calibri", margin: 0 });

  const diffs = [
    { d: "Guillain-Barré Syndrome", k: "Polyneuropathy post-viral; normal CK; EMG distinction" },
    { d: "Periodic Paralysis", k: "Post-rest onset; transient electrolyte disturbances; no CK elevation" },
    { d: "Hemoglobinuria", k: "Dipstick positive + RBCs on microscopy (hemolysis)" },
    { d: "Porphyria", k: "Urine discoloration; specific porphyrin tests; no CK elevation" },
  ];
  diffs.forEach((d, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    sl.addText("▸ " + d.d + ": ", { x: 0.3 + col * 4.75, y: 4.19 + row * 0.32, w: 2.0, h: 0.28, fontSize: 9, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
    sl.addText(d.k, { x: 2.2 + col * 4.75, y: 4.19 + row * 0.32, w: 2.8, h: 0.28, fontSize: 8.5, color: C.lightGray, fontFace: "Calibri", margin: 0 });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 — COMPLICATIONS
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  slide_header(sl, "COMPLICATIONS", "Potentially life-threatening — early recognition is essential");
  sl.addShape("rect", { x: 0, y: 1.25, w: 10, h: 4.25, fill: { color: C.midBg }, line: { color: C.midBg } });

  // AKI big box
  sl.addShape("rect", { x: 0.25, y: 1.35, w: 9.5, h: 0.75,
    fill: { color: C.cardBg }, line: { color: C.accent, width: 2 }
  });
  sl.addText("⚠  ACUTE KIDNEY INJURY (AKI) — Most Serious Complication", {
    x: 0.35, y: 1.38, w: 9.3, h: 0.28,
    fontSize: 12, bold: true, color: C.accent, fontFace: "Calibri", margin: 0
  });
  sl.addText("Occurs in 13–67% | 7–10% of all US AKI | Renal replacement therapy needed in 26% of severe cases | Mortality up to 50% in AKI Stage 3",
    { x: 0.35, y: 1.68, w: 9.3, h: 0.35, fontSize: 9, color: C.lightGray, fontFace: "Calibri", margin: 0 });

  const compls = [
    { title: "Hyperkalemia", detail: "Most severe 12–36 hrs post-injury; fatal arrhythmias; insulin/glucose less effective", color: C.gold },
    { title: "Cardiac Arrhythmias", detail: "From hyperkalemia + organic acidosis + hypocalcemia; ECG monitoring mandatory", color: C.accent },
    { title: "Metabolic Acidosis", detail: "Lactic acidosis from muscle necrosis; worsens myoglobin tubular toxicity", color: C.orange },
    { title: "DIC", detail: "Disseminated intravascular coagulation from massive tissue injury", color: C.accentLt },
    { title: "Compartment Syndrome", detail: "Muscle edema ↑ compartment pressure → nerve + vascular compression", color: C.teal },
    { title: "Hypocalcemia → Hypercalcemia", detail: "Early ↓ Ca²⁺; late rebound ↑ Ca²⁺ during recovery (ectopic Ca deposits mobilize)", color: C.green },
  ];
  compls.forEach((c, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    card(sl, 0.25 + col * 4.87, 2.2 + row * 0.98, 4.62, 0.9, c.title, [c.detail], c.color);
  });

  sl.addText("Peripheral nerve injury, hepatic failure, respiratory failure (if diaphragm involved) also reported in severe cases", {
    x: 0.25, y: 5.2, w: 9.5, h: 0.28,
    fontSize: 8.5, color: C.silver, italic: true, fontFace: "Calibri", margin: 0
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 — TREATMENT PROTOCOL (PREHOSPITAL + ED)
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  slide_header(sl, "TREATMENT PROTOCOL", "Prehospital → Emergency Department — Fluids are the cornerstone");
  sl.addShape("rect", { x: 0, y: 1.25, w: 10, h: 4.25, fill: { color: C.midBg }, line: { color: C.midBg } });

  sl.addText("STEP 1 — PREHOSPITAL (Crush / Suspected Rhabdomyolysis)", { x: 0.25, y: 1.35, w: 9.5, h: 0.3, fontSize: 11, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
  const pre = [
    "IV Normal Saline 1 L/hr once limb is extricated",
    "Continue after extrication: alternate NS 500 mL with D5NS at 1 L/hr",
    "AVOID potassium-containing or lactate-containing solutions until electrolytes known",
  ];
  pre.forEach((p, i) => {
    sl.addText("• " + p, { x: 0.35, y: 1.67 + i * 0.28, w: 9.3, h: 0.26, fontSize: 9.5, color: C.lightGray, fontFace: "Calibri", margin: 0 });
  });

  sl.addShape("rect", { x: 0.25, y: 2.53, w: 9.5, h: 0.04, fill: { color: C.teal }, line: { color: C.teal } });
  sl.addText("STEP 2 — EMERGENCY DEPARTMENT", { x: 0.25, y: 2.6, w: 9.5, h: 0.3, fontSize: 11, bold: true, color: C.teal, fontFace: "Calibri", margin: 0 });

  const edSteps = [
    { step: "Fluids", detail: "IV crystalloids at 4 mL/kg/hr — goal urine output 200–300 mL/hr (or ≥3–4 mL/kg/hr) for 24–72 hrs" },
    { step: "Monitoring", detail: "Continuous ECG (arrhythmias), Foley catheter for urine output in critical patients, hemodynamic monitoring" },
    { step: "Bicarbonate", detail: "Consider ONLY with systemic acidosis; alkalinizes urine → ↓ cast formation; avoid metabolic alkalosis" },
    { step: "Mannitol", detail: "ONLY after adequate renal function confirmed; use when needed for UO 300 mL/hr; avoid in hypovolemia" },
    { step: "Electrolytes", detail: "Hyperkalemia: insulin + glucose, ion-exchange resins; Hypercalcemia: saline diuresis; Hyperphosphate: oral binders (PO₄ > 7 mg/dL)" },
    { step: "Hypocalcemia", detail: "DO NOT treat asymptomatic hypocalcemia — risk rebound hypercalcemia; treat only if symptomatic or severe hyperkalemia" },
  ];
  edSteps.forEach((e, i) => {
    sl.addShape("rect", { x: 0.25, y: 2.94 + i * 0.37, w: 9.5, h: 0.34,
      fill: { color: i % 2 === 0 ? C.cardBg : C.darkBg }, line: { color: C.cardBg }
    });
    sl.addText(e.step, { x: 0.35, y: 2.97 + i * 0.37, w: 1.1, h: 0.28, fontSize: 9, bold: true, color: C.teal, fontFace: "Calibri", margin: 0 });
    sl.addText(e.detail, { x: 1.5, y: 2.97 + i * 0.37, w: 8.1, h: 0.28, fontSize: 8.5, color: C.lightGray, fontFace: "Calibri", margin: 0 });
  });
  sl.addText("⚠  AVOID NSAIDs — vasoconstrictive effect on kidneys worsens renal perfusion", {
    x: 0.25, y: 5.2, w: 9.5, h: 0.28,
    fontSize: 8.5, bold: true, color: C.accentLt, italic: true, fontFace: "Calibri", margin: 0
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 13 — SPECIFIC TREATMENTS & SPECIAL SCENARIOS
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  slide_header(sl, "SPECIFIC TREATMENTS & SPECIAL SCENARIOS", "Malignant Hyperthermia • Compartment Syndrome • Crush Injury • NMS");
  sl.addShape("rect", { x: 0, y: 1.25, w: 10, h: 4.25, fill: { color: C.midBg }, line: { color: C.midBg } });

  const scenarios = [
    {
      title: "Malignant Hyperthermia",
      color: C.accent,
      lines: [
        "STOP all triggering anesthetic agents immediately",
        "Dantrolene sodium 2.5–4 mg/kg IV (then ~1 mg/kg q4h × 48h)",
        "Aggressive external cooling",
        "Monitor CK, K⁺, temp, urine output closely",
      ]
    },
    {
      title: "Compartment Syndrome",
      color: C.gold,
      lines: [
        "Measure compartment pressures if suspected",
        "Fasciotomy if pressure ≥ 30 mmHg",
        "Late fasciotomy (>12 hrs) relatively contraindicated",
        "Watch for: tense muscles, rising CK, neurovascular compromise",
      ]
    },
    {
      title: "Crush Injury",
      color: C.teal,
      lines: [
        "Aggressive IV NS on-site before extrication",
        "Mangled Extremity Severity Score (MESS) to assess salvageability",
        "Amputation may be required for massive non-salvageable damage",
        "Continue fluids aggressively post-extrication",
      ]
    },
    {
      title: "Neuroleptic Malignant Syndrome",
      color: C.green,
      lines: [
        "Discontinue all antipsychotic/triggering drugs",
        "Dantrolene + Bromocriptine or Lorazepam",
        "Aggressive supportive care + cooling",
        "ICU admission, CK & electrolyte monitoring",
      ]
    },
    {
      title: "Dialysis — Indications",
      color: C.accentLt,
      lines: [
        "Refractory hyperkalemia (not responsive to medical therapy)",
        "Severe fluid overload / pulmonary edema",
        "Persistent severe metabolic acidosis",
        "Uremia / severe AKI with persistent oliguria",
      ]
    },
    {
      title: "Recurrent Rhabdomyolysis Workup",
      color: C.orange,
      lines: [
        "Forearm exercise test (nonischemic)",
        "Electromyography (EMG)",
        "Muscle biopsy + metabolic enzyme studies",
        "Genetic testing (CPT2, PYGM, RyR1, G6PD, etc.)",
      ]
    },
  ];
  scenarios.forEach((s, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    card(sl, 0.25 + col * 4.87, 1.35 + row * 1.38, 4.62, 1.28, s.title, s.lines, s.color);
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 14 — RISK STRATIFICATION & HOSPITALIZATION
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  slide_header(sl, "RISK STRATIFICATION & HOSPITAL DISPOSITION", "MMRI Score + Admission Criteria");
  sl.addShape("rect", { x: 0, y: 1.25, w: 10, h: 4.25, fill: { color: C.midBg }, line: { color: C.midBg } });

  sl.addText("MMRI Risk Score (Mortality or Renal Replacement Therapy)", {
    x: 0.25, y: 1.35, w: 5.8, h: 0.3,
    fontSize: 11, bold: true, color: C.gold, fontFace: "Calibri", margin: 0
  });

  // Score table
  const scoreRows = [
    ["Creatinine 1.4–2.2 mg/dL", "1.5 pts"], ["Creatinine > 2.2 mg/dL", "2.5 pts"],
    ["Calcium < 7.5 mg/dL", "2 pts"], ["CK > 40,000 IU/L", "2 pts"],
    ["Phosphate 4.0–5.4 mg/dL", "1.5 pts"], ["Phosphate > 5.4 mg/dL", "3 pts"],
    ["Bicarbonate < 19 mEq/L", "2 pts"], ["Etiology: NOT seizure/syncope/exercise/statin", "1 pt"],
    ["Female sex", "1 pt"], ["Age 50–70 yrs", "1.5 pts"],
    ["Age 71–80 yrs", "2.5 pts"], ["Age > 80 yrs", "3 pts"],
  ];
  // Table header
  sl.addShape("rect", { x: 0.25, y: 1.68, w: 5.6, h: 0.28, fill: { color: C.accent }, line: { color: C.accent } });
  sl.addText("Parameter", { x: 0.35, y: 1.7, w: 3.8, h: 0.22, fontSize: 9, bold: true, color: C.white, fontFace: "Calibri", margin: 0 });
  sl.addText("Points", { x: 4.95, y: 1.7, w: 0.85, h: 0.22, fontSize: 9, bold: true, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });
  scoreRows.forEach((r, i) => {
    const y = 1.98 + i * 0.24;
    sl.addShape("rect", { x: 0.25, y, w: 5.6, h: 0.22, fill: { color: i % 2 === 0 ? C.cardBg : C.darkBg }, line: { color: C.cardBg } });
    sl.addText(r[0], { x: 0.35, y: y + 0.02, w: 3.8, h: 0.18, fontSize: 8, color: C.lightGray, fontFace: "Calibri", margin: 0 });
    sl.addText(r[1], { x: 4.95, y: y + 0.02, w: 0.85, h: 0.18, fontSize: 8, bold: true, color: C.gold, fontFace: "Calibri", align: "center", margin: 0 });
  });

  // Interpretation
  sl.addShape("rect", { x: 0.25, y: 4.86, w: 5.6, h: 0.55, fill: { color: C.cardBg }, line: { color: C.gold, width: 1 } });
  sl.addText("Score ≤ 5: 3% risk of RRT or death   |   Score ≥ 10: 52% risk of RRT or death", {
    x: 0.35, y: 4.92, w: 5.4, h: 0.44, fontSize: 9.5, bold: true, color: C.gold, fontFace: "Calibri", align: "center", margin: 0
  });

  // Right column — admission criteria
  sl.addText("Admit to Hospital", { x: 6.1, y: 1.35, w: 3.65, h: 0.3, fontSize: 11, bold: true, color: C.teal, fontFace: "Calibri", margin: 0 });
  const admitCrit = [
    "CK > 5,000–10,000 U/L with any systemic signs",
    "Evidence of AKI (↑ creatinine, ↓ UO)",
    "Hyperkalemia or significant electrolyte abnormalities",
    "Hemodynamic instability",
    "Cardiac arrhythmias",
    "Compartment syndrome",
    "Inability to maintain oral hydration",
  ];
  admitCrit.forEach((a, i) => {
    sl.addText("• " + a, { x: 6.1, y: 1.68 + i * 0.3, w: 3.65, h: 0.28, fontSize: 8.5, color: C.lightGray, fontFace: "Calibri", margin: 0 });
  });

  sl.addText("ICU Indications", { x: 6.1, y: 3.8, w: 3.65, h: 0.3, fontSize: 11, bold: true, color: C.accent, fontFace: "Calibri", margin: 0 });
  const icuCrit = [
    "Dialysis-dependent AKI",
    "Life-threatening hyperkalemia / arrhythmia",
    "DIC or multi-organ failure",
    "Malignant hyperthermia / NMS",
    "MMRI Score ≥ 10",
  ];
  icuCrit.forEach((c, i) => {
    sl.addText("• " + c, { x: 6.1, y: 4.13 + i * 0.28, w: 3.65, h: 0.26, fontSize: 8.5, color: C.lightGray, fontFace: "Calibri", margin: 0 });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 15 — PREVENTION, SPECIAL POPULATIONS & KEY PEARLS
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  slide_header(sl, "PREVENTION, SPECIAL POPULATIONS & KEY CLINICAL PEARLS", "");
  sl.addShape("rect", { x: 0, y: 1.25, w: 10, h: 4.25, fill: { color: C.midBg }, line: { color: C.midBg } });

  // Prevention
  card(sl, 0.25, 1.35, 3.1, 1.85, "Prevention", [
    "Gradual exercise intensity progression",
    "Adequate pre-exercise hydration",
    "Avoid extreme heat/humidity during exertion",
    "Acclimatization before high-intensity training",
    "Avoid statin + interacting drugs (cyclosporine, macrolides)",
    "Caution with stimulant supplements",
  ], C.green);

  // Special populations
  card(sl, 3.55, 1.35, 3.1, 1.85, "Special Populations", [
    "Pediatric: Viral myositis, trauma most common; recurrent → inherited disorder",
    "Athletes: Eccentric > concentric exercise risk; MMRI score for risk",
    "Sickle cell trait: Slightly elevated exertional risk",
    "Elderly: Higher MMRI score; risk fluid overload with aggressive hydration",
    "Statins: Polypharmacy dramatically increases risk",
  ], C.teal);

  // Key pearls
  sl.addShape("rect", { x: 6.85, y: 1.35, w: 2.9, h: 1.85, fill: { color: C.cardBg }, line: { color: C.gold, width: 1.5 } });
  sl.addText("⭐ Key Exertional Risks", { x: 6.95, y: 1.4, w: 2.7, h: 0.28, fontSize: 10, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
  ["Poor conditioning", "Male sex", "Dehydration", "Restrictive clothing", "High temp/humidity", "Overcager motivation"].forEach((r, i) => {
    sl.addText("• " + r, { x: 6.95, y: 1.72 + i * 0.24, w: 2.7, h: 0.22, fontSize: 8.5, color: C.lightGray, fontFace: "Calibri", margin: 0 });
  });

  sl.addShape("rect", { x: 0.25, y: 3.28, w: 9.5, h: 0.04, fill: { color: C.accent }, line: { color: C.accent } });
  sl.addText("🔑 10 Critical Clinical Pearls", { x: 0.25, y: 3.36, w: 9.5, h: 0.3, fontSize: 12, bold: true, color: C.accent, fontFace: "Calibri", margin: 0 });

  const pearls = [
    "Cola urine + NO RBCs on microscopy = rhabdomyolysis until proven otherwise",
    "CK is the most sensitive marker — check serially every 12–24 hours",
    "Urine myoglobin clears faster than CK — may be negative when CK is still very elevated",
    "NEVER treat asymptomatic hypocalcemia — causes ectopic calcification + rebound hypercalcemia",
    "Hyperkalemia is most dangerous in first 12–36 hrs — continuous ECG monitoring mandatory",
    "NSAIDs are CONTRAINDICATED — worsen renal perfusion",
    "Recurrent rhabdomyolysis without clear cause = inherited metabolic disease workup",
    "Malignant hyperthermia requires DANTROLENE — do not delay",
    "Compartment pressures ≥ 30 mmHg = surgical emergency (fasciotomy)",
    "No proven benefit of bicarbonate or mannitol over aggressive IV fluids alone",
  ];
  pearls.forEach((p, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    sl.addText((i + 1) + ". " + p, {
      x: 0.25 + col * 4.87, y: 3.7 + row * 0.35,
      w: 4.65, h: 0.32, fontSize: 8.5, color: C.lightGray, fontFace: "Calibri", margin: 0
    });
  });
}

// ─── WRITE FILE ──────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/rhabdomyolysis-pptx/Rhabdomyolysis_Complete_Medical_Overview.pptx" })
  .then(() => console.log("✅ DONE: Rhabdomyolysis_Complete_Medical_Overview.pptx"))
  .catch(e => { console.error("❌ ERROR:", e); process.exit(1); });
Running Command

cd /home/daytona/workspace/rhabdomyolysis-pptx && node build.js 2>&1

Running Command

ls -lh /home/daytona/workspace/rhabdomyolysis-pptx/Rhabdomyolysis_Complete_Medic…

Your 15-slide presentation is ready! Download it here:

Rhabdomyolysis Complete Medical Overview

Presentation · PPTX


Here is what each slide covers:
#Slide TitleContent
1Title SlideOverview, key stats, hallmark finding
2Definition & OverviewEtymology, definition, key released substances
3Epidemiology26,000/yr US cases, AKI rates, risk demographics
4Etiology — Acquired Causes6 category cards: Trauma, Drugs, Medications, Infections, Temperature, Metabolic
5Etiology — Inherited/GeneticTable of metabolic pathways, diseases, and genes (McArdle, CPT-II, G6PD, RyR1, etc.)
6PathophysiologyStep-by-step flow diagram + 4 mechanisms of AKI
7Clinical SymptomsClassic triad + 8 associated symptoms with details
8Physical ExaminationLocal vs systemic findings + neurovascular exam for compartment syndrome
9Diagnosis — Labs12 key lab findings with expected results + hallmark CK box
10Diagnosis — Urinalysis & DifferentialUrine findings + medical image of kidney injury + differential diagnosis
11ComplicationsAKI, hyperkalemia, arrhythmias, DIC, compartment syndrome, Ca abnormalities
12Treatment ProtocolPrehospital + ED step-by-step protocol with fluid targets
13Specific TreatmentsMH (dantrolene), compartment (fasciotomy), crush injury, NMS, dialysis, recurrent workup
14Risk Stratification & HospitalizationFull MMRI score table + admission and ICU criteria
15Prevention, Special Populations & Pearls10 critical clinical pearls + prevention + at-risk groups
Design: Deep navy/medical red theme, color-coded category cards, stat boxes, flow diagrams, and a medical image of rhabdomyolysis-induced kidney injury on slide 10.
This is a shared conversation. Sign in to Orris to start your own chat.