Hi

Hi! How can I help you today?

Exolain Immunoglobulin it's function and role

Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Loading Image
Here is a thorough explanation of immunoglobulins, drawn from authoritative medical textbooks.

Immunoglobulins (Antibodies)

What Are Immunoglobulins?

Immunoglobulins (Ig) are glycoproteins produced by plasma cells - the terminally differentiated form of B lymphocytes. They exist in two forms:
  • Membrane-bound: Serve as antigen receptors on the surface of B cells (B cell receptor / BCR)
  • Secreted: Circulate in plasma, mucosal secretions, and interstitial fluids to provide humoral immunity
They were originally called "antitoxins" because they were first discovered as protective molecules against diphtheria toxin. The broader name "antibody" was later adopted to describe their ability to bind virtually any foreign substance (antigen).
"Secreted antibodies neutralize microbial toxins, prevent the entry and spread of pathogens, and trigger several effector mechanisms that eliminate the microbes."
  • Cellular and Molecular Immunology

Structure of Immunoglobulins

Immunoglobulin Structure (IgG1)
The basic unit consists of 4 polypeptide chains:
  • 2 Heavy (H) chains - ~440 amino acids
  • 2 Light (L) chains - ~220 amino acids
These are held together by interchain disulfide bonds and have a characteristic Y-shape.

Regions

RegionDescription
Variable (V) regionsLocated at the N-terminus of both H and L chains. Unique to each antibody - responsible for antigen binding (forms the "paratope")
Constant (C) regionsSame within a given class. Responsible for effector functions (complement activation, Fc receptor binding)
Fab fragmentContains VH + CH1 + full light chain. The antigen-binding portion
Fc fragmentContains CH2 + CH3 domains. Interacts with Fc receptors, complement, and other immune molecules
Hinge regionFlexible segment allowing the two Fab arms to move and bind antigen at varying distances
Each light chain has 1 variable + 1 constant domain. Each heavy chain has 1 variable + 3 or 4 constant domains (IgG/IgA have 3; IgM/IgE have 4).
Two types of light chains exist: kappa (κ) and lambda (λ) - present across all five Ig classes, but only one type per molecule.

The Five Classes (Isotypes)

The isotype is determined by the type of heavy chain (μ, γ, δ, α, ε):

IgG (~75% of serum immunoglobulins)

  • Monomer, MW ~150,000 Da
  • 4 subclasses: IgG1, IgG2, IgG3, IgG4
  • Only Ig that crosses the placenta - provides passive neonatal immunity
  • Dominant in secondary (memory) immune responses
  • Fixes complement; acts as an opsonin (promotes phagocytosis by macrophages and neutrophils)
  • IgG1/IgG3: respond to protein antigens; IgG2: responds primarily to polysaccharides

IgM (~10% of serum immunoglobulins)

  • Pentamer of 5 subunits linked by disulfide bonds and J chains; MW ~900,000 Da
  • First antibody produced in a primary immune response (and T-cell-independent responses)
  • Along with IgD, is the main B-cell surface receptor on naive B cells
  • Most efficient complement-fixing antibody
  • Levels decline rapidly as IgG takes over in the later response

IgA (~15% of serum immunoglobulins)

  • Exists as monomer (serum) and dimer (secretory - joined by J chain + secretory component)
  • Transported across epithelium by an active secretory component-dependent mechanism
  • Predominant Ig in external secretions: saliva, tears, breast milk, colostrum, intestinal secretions
  • Primary role is mucosal immunity - neutralizes pathogens before they enter the systemic circulation
  • "Humans produce more IgA than any other immunoglobulin class"

IgE (~0.004% of serum immunoglobulins)

  • Monomer, MW ~200,000 Da - lowest serum concentration
  • High-affinity Fc receptors on mast cells and basophils
  • Antigen cross-linking of IgE on mast cells/basophils triggers degranulation (histamine, leukotrienes)
  • Role in allergic reactions (Type I hypersensitivity) and anti-parasitic defense (especially helminths)
  • Low-affinity IgE receptors also on eosinophils, neutrophils, macrophages, platelets

IgD (~0.25% of serum immunoglobulins)

  • Monomer, MW ~185 kDa
  • Exists primarily as membrane-bound IgD on early B cells (co-expressed with IgM)
  • Functions as an antigen receptor on immature B cells, helping initiate antibody responses
  • Only IgD and IgM can be co-expressed by the same cell

Key Functions of Immunoglobulins

FunctionMechanism
NeutralizationBinding blocks toxins/viruses from attaching to host cell receptors
OpsonizationFc region binds Fc receptors on phagocytes, enhancing pathogen engulfment
Complement activationIgG and IgM fix complement (classical pathway), leading to bacteriolysis, opsonization, inflammation
Antibody-dependent cellular cytotoxicity (ADCC)Antibodies coat infected cells; NK cells recognize Fc regions and lyse the target
Mast cell/basophil activationIgE cross-linking triggers degranulation - important in allergy and anti-parasite defense
Mucosal protectionSecretory IgA prevents pathogen entry at mucosal surfaces
Neonatal protectionIgG crosses the placenta; IgA is passed through breast milk

Fc Receptor Interactions (Summary Table)

Immune CellInteractionOutcome
Macrophages / NeutrophilsFc receptor (IgG)Opsonization / Phagocytosis
NK cellsFc receptorADCC (killing of infected cells)
Mast cells / BasophilsHigh-affinity FcεRI (IgE)Degranulation, allergic response
T cellsFc receptorCheckpoint regulation
Neonatal gut epitheliumFcRn receptor (IgG)Transplacental/milk transport
ComplementC1q binds IgG/IgM FcClassical pathway activation

Summary

Immunoglobulins are the effector molecules of humoral immunity. Their Y-shaped structure elegantly separates two functions: the variable Fab arms bind antigen with exquisite specificity, while the constant Fc tail signals to the rest of the immune system - activating complement, tagging pathogens for phagocytosis, triggering cell killing, and mediating allergic responses. The five isotypes (IgG, IgM, IgA, IgD, IgE) divide labor across different anatomical compartments and phases of the immune response.
Sources: Cummings Otolaryngology Head and Neck Surgery | Medical Microbiology 9e | Cellular and Molecular Immunology | Basic Medical Biochemistry 6e

Explain Plasma protein

Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Loading Image
Finding Sources
Now I have comprehensive material from multiple authoritative textbooks. Here is the full explanation:

Plasma Proteins

What Are Plasma Proteins?

Plasma proteins are a heterogeneous group of proteins dissolved in the liquid (plasma) portion of blood, making up approximately 6-8 g/dL of total plasma. They are primarily produced in the liver (albumin, fibrinogen, most globulins, coagulation factors), while antibody-type globulins (immunoglobulins) are produced by lymphocytes/plasma cells in lymphoid tissue.
"The plasma proteins consist of albumin, globulin, and fibrinogen fractions. Most capillary walls are relatively impermeable to the proteins in plasma, and the proteins therefore exert an osmotic force of about 25 mmHg across the capillary wall (oncotic pressure)."
  • Ganong's Review of Medical Physiology

Synthesis and Origin

  • Liver synthesizes: albumin, fibrinogen, alpha and beta globulins, coagulation factors, acute-phase proteins, complement proteins, carrier proteins (transferrin, ceruloplasmin, etc.)
  • Lymphoid tissues / Plasma cells: Immunoglobulins (gamma globulins / antibodies)
  • Normal albumin synthesis: ~120-400 mg/kg/day; the liver can produce up to 30 g/day under high demand
Reversible equilibrium between tissue proteins, plasma proteins, and amino acids
The diagram above shows how plasma proteins are in constant dynamic equilibrium with tissue proteins and circulating amino acids - making them a readily mobilizable protein reserve.

Major Classes and Functions

1. Albumin (~3.5-5.0 g/dL; ~60% of total plasma protein)

The most abundant plasma protein, synthesized exclusively by the liver.
RoleDetail
Colloid osmotic (oncotic) pressureAccounts for ~80% of the 25 mmHg oncotic pressure that keeps fluid inside capillaries
Transport carrierBinds and transports bilirubin, free fatty acids, Ca²⁺, Zn²⁺, Cu²⁺, steroids, thyroid hormones, and many drugs
Amino acid reserveActs as a labile protein store - can be broken down to supply amino acids to tissues during starvation/disease
BufferingContributes ~15% of blood buffering capacity (via ionizable COOH and NH₂ groups)
Clinical note: Albumin is decreased in cirrhosis, nephrotic syndrome, severe malnutrition, and chronic inflammation (IL-6 suppresses synthesis). Low albumin leads to edema due to reduced oncotic pressure.

2. Globulins (~2.5-3.5 g/dL total)

Subdivided by electrophoresis into alpha (α), beta (β), and gamma (γ) fractions:

Alpha Globulins (α₁, α₂)

ProteinFunction
Alpha-1 antitrypsin (α₁-antiproteinase)Major serine protease inhibitor - protects tissues from neutrophil elastase
Alpha-2 macroglobulinBroad-spectrum protease inhibitor
HaptoglobinBinds free hemoglobin released from lysed RBCs - protects kidneys from hemoglobin toxicity
CeruloplasminFerroxidase; transports copper; converts Fe²⁺ → Fe³⁺ for binding to transferrin
Alpha-1 acid glycoprotein (orosomucoid)Acute-phase protein; drug binding
Alpha-fetoprotein (AFP)Normal in fetal serum; elevated in hepatocellular carcinoma and neural tube defects

Beta Globulins

ProteinFunction
TransferrinTransports iron (Fe³⁺) in the blood
Lipoproteins (LDL, VLDL)Transport lipids and cholesterol
Complement proteins (C3, C4)Immune defense, opsonization, inflammation
Beta-2 microglobulinComponent of MHC class I; immune function

Gamma Globulins (Immunoglobulins: IgG, IgM, IgA, IgD, IgE)

  • Produced by plasma cells (see Immunoglobulins above)
  • Role in immune defense: neutralization, opsonization, complement activation, ADCC, mucosal immunity
  • Elevated in chronic infections, liver disease, autoimmune conditions

3. Fibrinogen (~200-400 mg/dL)

  • Synthesized by the liver
  • The precursor to fibrin - activated by thrombin during coagulation
  • Fibrinogen is cleaved by thrombin → fibrin monomers → polymerize into insoluble fibrin clot that seals vascular injuries
  • An acute-phase reactant - levels rise during inflammation
  • Also contributes to blood viscosity and platelet aggregation (binds GPIIb/IIIa)

Summary Table: Key Plasma Proteins and Their Functions

Function CategoryProtein(s)
Oncotic pressureAlbumin
TransportAlbumin, transferrin, ceruloplasmin, transthyretin, haptoglobin, retinol-binding protein, sex hormone-binding globulin, thyroid-binding globulin, lipoproteins
CoagulationFibrinogen, Factors I, II, V, VII, VIII, IX, X, XI, XII, XIII
Anti-coagulationAntithrombin, Protein C, Protein S
Immune defenseImmunoglobulins (IgG, IgM, IgA, IgD, IgE), complement proteins
AntiproteasesAlpha-1 antitrypsin, alpha-2 macroglobulin, antichymotrypsin
Acute-phase responseC-reactive protein (CRP), fibrinogen, haptoglobin, alpha-1 acid glycoprotein, alpha-1 antitrypsin
Enzyme activityCholinesterase, ceruloplasmin (ferroxidase), coagulation factor enzymes
Amino acid reserveAlbumin and all plasma proteins (via pinocytosis by macrophages)

Acute-Phase Proteins

During infection, inflammation, or tissue injury, hepatocytes are stimulated (mainly by IL-1 and IL-6) to rapidly increase production of certain proteins:
  • Positive acute-phase proteins (increase): CRP, fibrinogen, haptoglobin, alpha-1 antitrypsin, alpha-1 acid glycoprotein - levels can rise 1.5 to over 1000-fold (CRP)
  • Negative acute-phase proteins (decrease): Albumin, transthyretin, transferrin - liver shifts resources to making defensive proteins
CRP is the most clinically used biomarker of tissue injury and inflammation.

Clinical Conditions Affecting Plasma Proteins

ConditionEffect
Liver cirrhosis / diseaseDecreased albumin, fibrinogen, coagulation factors → edema, coagulopathy
Nephrotic syndromeMassive urinary albumin loss → hypoalbuminemia → edema
Malnutrition / starvationReduced synthesis → hypoproteinemia
Chronic inflammationElevated CRP, fibrinogen; depressed albumin
Multiple myelomaMonoclonal immunoglobulin spike (M protein)
Alpha-1 antitrypsin deficiencyEmphysema (uncontrolled protease activity in lungs) and liver disease
Wilson diseaseLow ceruloplasmin → copper accumulation

Buffering Role

Plasma proteins contribute ~15% of the blood's buffering capacity through ionization of their constituent carboxyl (-COOH) and amino (-NH₂) groups. At normal plasma pH of 7.40, most plasma proteins carry a net negative charge (anionic form).
Sources: Guyton and Hall Textbook of Medical Physiology | Ganong's Review of Medical Physiology | Harper's Illustrated Biochemistry 32nd Ed | Tietz Textbook of Laboratory Medicine 7th Edition

Explain sepsis in full

Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Finding Sources
Reading File
Finding Sources
Reading File
Finding Sources
Reading File
Reading File
Loading Image
Finding Sources
Finding Sources
Finding Sources
Reading File
I now have extensive, high-quality source material. Here is the comprehensive explanation of sepsis:

Sepsis - A Full Explanation

1. Definition (Sepsis-3, 2016)

Sepsis is defined as life-threatening organ dysfunction caused by a dysregulated host response to infection.
More precisely (Sepsis-3 definition): infection + SOFA score increase ≥ 2 points from baseline.
Septic shock is a subset of sepsis with:
  • Persistent hypotension despite adequate fluid resuscitation (30 mL/kg crystalloid)
  • Requirement for vasopressors to maintain MAP ≥ 65 mmHg
  • Serum lactate > 2 mmol/L despite resuscitation
  • Associated mortality exceeds 40%
"Sepsis is defined as an infection with organ dysfunction... Septic shock is the addition of cardiovascular dysfunction, specifically hypotension despite fluid resuscitation, and the need for vasopressors."
  • Sabiston Textbook of Surgery

2. Epidemiology

  • >750,000 cases/year in the United States alone - and the incidence is rising
  • Despite improvements in care, mortality remains ~40%
  • Most common triggers: gram-positive bacteria > gram-negative bacteria > fungi
  • SARS-CoV-2 and other emerging viral infections can also cause sepsis
  • Risk is highest in: immunocompromised patients (chemotherapy, HIV), elderly, patients with multidrug-resistant organisms, and ICU patients

3. Causes and Source of Infection

Common sources (by site):
SourceCommon Pathogens
Pneumonia (lung)S. pneumoniae, Klebsiella, Staphylococcus aureus, gram-negatives
Urinary tractE. coli, Klebsiella, Enterococcus
AbdomenE. coli, anaerobes, Bacteroides, Enterococcus
Skin/soft tissueS. aureus, Streptococcus pyogenes
Bloodstream (primary)Staphylococcus, gram-negatives, fungi (Candida)
CNS (meningitis)Neisseria meningitidis, S. pneumoniae
Central line (CLABSI)Staphylococcus epidermidis, S. aureus, Candida

4. Pathophysiology

This is the core of understanding sepsis. The diagram below (from Robbins Pathology) summarizes the cascade:
Major pathogenic pathways in septic shock - Robbins Pathology

Step 1 - Recognition of Microbial Products

Microbial components (PAMPs - Pathogen-Associated Molecular Patterns) and host damage signals (DAMPs) are recognized by:
  • Toll-like receptors (TLRs) on macrophages, neutrophils, dendritic cells, and endothelial cells
  • C-type lectin receptors (detect fungal antigens)
  • G-protein-coupled receptors (detect bacterial peptides)
Key microbial triggers include: endotoxin (LPS from gram-negatives), peptidoglycan, staphylococcal enterotoxin B, and M protein of streptococci.

Step 2 - Pro-inflammatory Cascade

Receptor ligation activates NF-kB (nuclear factor kappa-B), a master transcription factor, leading to massive upregulation of:
MediatorEffect
TNF, IL-1, IL-12, IL-18, IFN-γCore cytokine storm - fever, leukocyte activation, endothelial injury
HMGB1Late-phase mediator of inflammation
CRP, ProcalcitoninAcute-phase markers of inflammation
Reactive oxygen species (ROS)Oxidative tissue damage
Prostaglandins, PAFVasodilation, vascular permeability
Complement (C3a, C5a, C3b)Mast cell activation, chemotaxis, opsonization, further inflammation

Step 3 - Counter-Regulatory Immunosuppression (Simultaneous)

  • The hyperinflammatory state paradoxically triggers immunosuppression, making patients vulnerable to secondary (nosocomial) infections
  • Mechanisms: shift from Th1 (pro-inflammatory) to Th2/anti-inflammatory cytokines, production of IL-10, soluble TNF receptor, IL-1 receptor antagonist, lymphocyte apoptosis, and cellular anergy
  • Patients can oscillate between hyperinflammatory and immunosuppressed states throughout their illness

Step 4 - Endothelial Activation and Vascular Injury

  • Cytokines loosen endothelial tight junctions → widespread vascular leakage → protein-rich edema throughout body
  • Upregulation of nitric oxide (NO) → vasodilation → systemic hypotension
  • Upregulation of adhesion molecules → neutrophil infiltration into tissues
  • Loss of normal autoregulation of microvascular flow → oxygen delivery-demand mismatch

Step 5 - Procoagulant State and DIC

  • Proinflammatory cytokines increase tissue factor (TF) on monocytes and endothelial cells
  • Simultaneously, anticoagulant factors are suppressed: TFPI, thrombomodulin, Protein C are all downregulated
  • PAI-1 is upregulated → inhibits fibrinolysis
  • Neutrophil extracellular traps (NETs) further activate both intrinsic and extrinsic coagulation pathways
  • Result: systemic thrombin activation, fibrin-rich microthrombi in small vessels throughout the body → tissue ischemia
  • In severe cases: Disseminated Intravascular Coagulation (DIC) in up to 50% of septic patients - consumption of clotting factors and platelets leads to paradoxical bleeding

Step 6 - Metabolic Abnormalities

  • Insulin resistance and hyperglycemia: TNF, IL-1, stress hormones (glucagon, glucocorticoids, catecholamines) drive gluconeogenesis while impairing GLUT-4 surface expression and suppressing insulin secretion
  • Hyperglycemia decreases neutrophil bactericidal function and upregulates endothelial adhesion molecules
  • Elevated lactate: from tissue hypoxia and impaired mitochondrial oxidative phosphorylation → lactic acidosis
  • Adrenal axis dysfunction: early cortisol surge may be followed by relative adrenal insufficiency (or Waterhouse-Friderichsen syndrome from adrenal necrosis in DIC)

Step 7 - Organ Dysfunction and Multiorgan Failure (MOF)

The cumulative effects of:
  • Systemic hypotension
  • Vascular leakage/edema
  • Microvascular thrombosis
  • Impaired mitochondrial oxygen use
  • Cytokine-induced myocardial depression
...lead to failure of multiple organs:
OrganSepsis-related Injury
LungsAcute Respiratory Distress Syndrome (ARDS) - cytokines disrupt alveolar-capillary membrane
KidneysAcute Kidney Injury (AKI) - hypoperfusion + direct inflammatory injury
LiverKupffer cell activation, hepatic hypoperfusion, centrilobular necrosis, cholestasis (jaundice is the most common cause in ICU sepsis)
HeartMyocardial depression (reduced contractility and cardiac output)
BrainSeptic encephalopathy - altered mental status, delirium
CoagulationDIC - thrombosis + bleeding

5. Stages of Septic Shock

Shock in sepsis (like all shock) tends to progress through three stages:
  1. Non-progressive (compensated) stage: Baroreceptor reflexes, catecholamine release, RAAS activation, and ADH secretion maintain blood pressure and vital organ perfusion
  2. Progressive stage: Compensatory mechanisms fail; tissue hypoperfusion worsens; metabolic acidosis, worsening hemodynamics
  3. Irreversible stage: Cellular and tissue injury is so severe that even correcting hemodynamic defects cannot prevent death; organ failure is irreversible

6. Clinical Features

FeatureDetails
Fever>38°C - or hypothermia (<36°C) in severe/immunocompromised
TachycardiaHR >90 bpm
TachypneaRR >20 breaths/min; respiratory alkalosis early, acidosis later
Altered mental statusConfusion, agitation, obtundation
HypotensionSBP <90 or MAP <65 mmHg (in septic shock)
Warm, flushed skinEarly (high-output/distributive phase)
Cold, clammy skinLate (low-output, decompensated)
OliguriaUrine output <0.5 mL/kg/hr - early sign of AKI
JaundiceHepatic involvement

7. Diagnosis

Screening Tool - qSOFA (Quick SOFA)

Use outside the ICU to identify patients at risk. Score ≥ 2 = suspect sepsis:
CriterionPoints
Altered mental status (GCS < 15)1
Respiratory rate ≥ 22/min1
Systolic BP ≤ 100 mmHg1

Definitive Assessment - SOFA Score

Assesses 6 organ systems (Respiration, Coagulation, Liver, Cardiovascular, CNS, Renal). SOFA ≥ 2 from baseline = organ dysfunction = sepsis.

Lab Investigations

TestSignificance
Blood cultures (x2)Identify pathogen - draw before antibiotics
CBCLeukocytosis (>12,000) or leukopenia (<4,000); bandemia ≥5-10%
Lactate>2 mmol/L = tissue hypoperfusion; >4 = septic shock
ProcalcitoninElevated in bacterial sepsis; helps guide antibiotic duration
CRPGeneral inflammation marker
BMP/CreatinineAKI assessment
LFTs/BilirubinHepatic involvement
PT/aPTT, fibrinogen, D-dimerDIC screening
ABGRespiratory failure, acid-base status
Chest X-ray/CTSource identification (pneumonia, abscess)

8. Management (Surviving Sepsis Campaign Guidelines)

The "Hour-1 Bundle" (immediate priorities)

  1. Measure lactate - re-measure if initial >2 mmol/L
  2. Blood cultures (x2 sets) - before antibiotics
  3. Broad-spectrum IV antibiotics within 1 hour of sepsis recognition
  4. Fluid resuscitation: 30 mL/kg IV balanced crystalloid (e.g., Lactated Ringer's or normal saline) for hypotension or lactate ≥4
  5. Vasopressors if hypotension persists to maintain MAP ≥ 65 mmHg

Vasopressor Therapy

DrugRole
NorepinephrineFirst-line - associated with decreased mortality vs. dopamine
Vasopressin (0.03-0.04 U/min)Add-on to norepinephrine; helps reduce norepinephrine dose
EpinephrineSecond-line add-on
DopamineNo longer preferred - higher arrhythmia risk

Antibiotics

  • Empirical broad-spectrum coverage based on suspected source and local resistance patterns
  • De-escalate based on culture results (antibiotic stewardship)
  • Duration typically 5-7 days once source controlled; procalcitonin used to guide de-escalation

Adjunctive Therapies

TherapyIndication
Hydrocortisone 200-300 mg/dayRefractory septic shock (persisting despite fluids + vasopressors) - addresses relative adrenal insufficiency
Insulin infusionTarget blood glucose 140-180 mg/dL (avoid hypoglycemia)
Low tidal volume ventilation (6 mL/kg IBW)ARDS - reduces mortality
Renal replacement therapy (CRRT)Severe AKI unresponsive to medical management
DVT prophylaxisHeparin (unless contraindicated by DIC)
Stress ulcer prophylaxisPPI or H2 blocker
Source controlDrain abscess, remove infected line, debride necrotizing tissue

9. Summary - The Core Concept

"Sepsis occurs when the response to infection becomes generalized and injures normal tissues remote from the site of infection... The multiplicity of factors and the complexity of the interactions explain why most attempts to intervene therapeutically with antagonists of specific mediators have not been effective."
  • Robbins, Cotran & Kumar Pathologic Basis of Disease
Sepsis is fundamentally a failure of the normal immune containment system. The host's attempt to fight a localized infection spirals into a whole-body inflammatory catastrophe that damages its own tissues. The simultaneous activation of both pro-inflammatory and immunosuppressive arms, combined with endothelial injury, procoagulant states, and metabolic derangement, creates a self-amplifying cascade culminating in multiorgan failure and death.
Sources: Robbins, Cotran & Kumar Pathologic Basis of Disease | Sabiston Textbook of Surgery | Rosen's Emergency Medicine | Miller's Anesthesia 10e | Sleisenger & Fordtran's GI and Liver Disease | Medical Microbiology 9e

Make me slides of this material

Reading File
Reading File
Running Command

ls /home/daytona/workspace/ 2>/dev/null && mkdir -p /home/daytona/workspace/sepsis-slides

Writing File

~/sepsis-slides/create_sepsis.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Sepsis - A Comprehensive Overview";
pres.author = "Medical Education";

// ─── COLOR PALETTE ───
// Deep navy dominant, crimson accent, white/light-grey text, slate for content bg
const C = {
  navyDark:   "0D1B2A",  // dominant dark bg
  navy:       "1A2E45",  // section headers bg
  crimson:    "C0392B",  // accent - danger/alert
  crimsonLight:"E74C3C", // lighter crimson
  teal:       "1ABC9C",  // second accent - positive/treatment
  gold:       "F39C12",  // highlight
  white:      "FFFFFF",
  lightGrey:  "ECF0F1",
  midGrey:    "BDC3C7",
  darkGrey:   "2C3E50",
  cardBg:     "162033",  // slightly lighter than navyDark for cards
  cardBg2:    "1E2D40",
};

// ─── HELPERS ───
function titleSlide(pres, title, subtitle) {
  const s = pres.addSlide();
  // Full dark bg
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navyDark } });
  // Crimson accent bar left
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.crimson } });
  // Gold bottom stripe
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.2, w: 10, h: 0.08, fill: { color: C.gold } });

  s.addText(title, {
    x: 0.4, y: 1.4, w: 9.2, h: 1.5,
    fontSize: 44, bold: true, color: C.white,
    fontFace: "Calibri", align: "center"
  });
  s.addText(subtitle, {
    x: 0.4, y: 3.1, w: 9.2, h: 0.8,
    fontSize: 20, color: C.midGrey,
    fontFace: "Calibri", align: "center", italic: true
  });
  s.addText("Sources: Robbins Pathology | Sabiston Surgery | Rosen's EM | Miller's Anesthesia", {
    x: 0.4, y: 4.9, w: 9.2, h: 0.3,
    fontSize: 9, color: C.midGrey, fontFace: "Calibri", align: "center"
  });
  return s;
}

function sectionDivider(pres, number, title) {
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 2.55, w: 10, h: 0.06, fill: { color: C.crimson } });
  s.addText(`0${number}`, {
    x: 0.4, y: 1.0, w: 2, h: 1.5,
    fontSize: 80, bold: true, color: C.crimson,
    fontFace: "Calibri", align: "left", transparency: 30
  });
  s.addText(title, {
    x: 0.4, y: 2.7, w: 9.2, h: 1.2,
    fontSize: 32, bold: true, color: C.white,
    fontFace: "Calibri", align: "left"
  });
  return s;
}

function contentHeader(s, pres, title, accentColor) {
  const ac = accentColor || C.crimson;
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navyDark } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.72, fill: { color: C.navy } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0.72, w: 10, h: 0.05, fill: { color: ac } });
  s.addText(title, {
    x: 0.3, y: 0.08, w: 9.4, h: 0.6,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0
  });
}

function bulletList(s, items, x, y, w, h, opts) {
  const o = opts || {};
  const textArr = items.map((item, i) => ({
    text: item,
    options: {
      bullet: { type: "bullet", characterCode: "25B6", color: o.bulletColor || C.crimson },
      color: o.color || C.lightGrey,
      fontSize: o.fontSize || 14,
      fontFace: "Calibri",
      paraSpaceBefore: o.spacing || 4,
      breakLine: i < items.length - 1
    }
  }));
  s.addText(textArr, { x, y, w, h, valign: "top" });
}

function card(s, pres, x, y, w, h, title, body, titleColor, bgColor) {
  const bg = bgColor || C.cardBg;
  const tc = titleColor || C.crimson;
  s.addShape(pres.ShapeType.roundRect, {
    x, y, w, h, fill: { color: bg }, line: { color: tc, width: 1.5 }, rectRadius: 0.05
  });
  s.addText(title, {
    x: x + 0.1, y: y + 0.05, w: w - 0.2, h: 0.35,
    fontSize: 12, bold: true, color: tc, fontFace: "Calibri", margin: 0
  });
  s.addText(body, {
    x: x + 0.1, y: y + 0.42, w: w - 0.2, h: h - 0.52,
    fontSize: 11, color: C.lightGrey, fontFace: "Calibri", valign: "top", wrap: true, margin: 0
  });
}

// ═══════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ═══════════════════════════════════════════════════════════
titleSlide(pres, "SEPSIS", "A Comprehensive Clinical Overview\nDefinition · Pathophysiology · Diagnosis · Management");

// ═══════════════════════════════════════════════════════════
// SLIDE 2 — AGENDA
// ═══════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentHeader(s, pres, "Contents at a Glance", C.teal);
  const topics = [
    ["01", "Definition & Epidemiology"],
    ["02", "Causes & Infection Sources"],
    ["03", "Pathophysiology – The Cascade"],
    ["04", "Endothelial & Coagulation Changes"],
    ["05", "Metabolic Abnormalities & Organ Failure"],
    ["06", "Clinical Features"],
    ["07", "Diagnosis – qSOFA, SOFA & Labs"],
    ["08", "Management – Surviving Sepsis Campaign"],
  ];
  topics.forEach(([num, topic], i) => {
    const col = i < 4 ? 0 : 1;
    const row = i % 4;
    const x = col === 0 ? 0.3 : 5.2;
    const y = 0.95 + row * 1.05;
    s.addShape(pres.ShapeType.rect, { x, y, w: 4.6, h: 0.82, fill: { color: C.cardBg2 }, line: { color: C.navy, width: 0.5 } });
    s.addText(num, { x: x + 0.08, y: y + 0.1, w: 0.5, h: 0.6, fontSize: 18, bold: true, color: C.crimson, fontFace: "Calibri", margin: 0 });
    s.addText(topic, { x: x + 0.65, y: y + 0.16, w: 3.8, h: 0.5, fontSize: 13, color: C.lightGrey, fontFace: "Calibri", valign: "middle", margin: 0 });
  });
}

// ═══════════════════════════════════════════════════════════
// SECTION 01 DIVIDER
// ═══════════════════════════════════════════════════════════
sectionDivider(pres, 1, "Definition & Epidemiology");

// ═══════════════════════════════════════════════════════════
// SLIDE 4 — DEFINITION
// ═══════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentHeader(s, pres, "Definition (Sepsis-3, 2016)", C.crimson);

  // Sepsis box
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.9, w: 9.4, h: 1.1, fill: { color: C.navy }, line: { color: C.crimson, width: 2 } });
  s.addText("SEPSIS", { x: 0.4, y: 0.92, w: 1.8, h: 0.35, fontSize: 13, bold: true, color: C.crimson, fontFace: "Calibri", margin: 0 });
  s.addText("Life-threatening organ dysfunction caused by a dysregulated host response to infection.\nFormal criterion: Infection + SOFA score increase ≥ 2 points from baseline.", {
    x: 0.4, y: 1.3, w: 9.2, h: 0.62,
    fontSize: 13, color: C.lightGrey, fontFace: "Calibri", margin: 0
  });

  // Septic shock box
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 2.15, w: 9.4, h: 1.3, fill: { color: C.navy }, line: { color: C.gold, width: 2 } });
  s.addText("SEPTIC SHOCK", { x: 0.4, y: 2.17, w: 2.6, h: 0.35, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
  s.addText([
    { text: "Sepsis + all three criteria:", options: { bold: true, color: C.midGrey, breakLine: true } },
    { text: "  • Persistent hypotension despite 30 mL/kg crystalloid resuscitation", options: { color: C.lightGrey, breakLine: true } },
    { text: "  • Vasopressors required to maintain MAP ≥ 65 mmHg", options: { color: C.lightGrey, breakLine: true } },
    { text: "  • Serum lactate > 2 mmol/L despite resuscitation", options: { color: C.lightGrey } },
  ], { x: 0.4, y: 2.54, w: 9.2, h: 0.88, fontSize: 12, fontFace: "Calibri", margin: 0 });

  // Mortality badge
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 3.6, w: 2.8, h: 1.5, fill: { color: C.crimson }, line: { color: C.crimson, width: 1 } });
  s.addText(">40%", { x: 0.3, y: 3.65, w: 2.8, h: 0.82, fontSize: 38, bold: true, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });
  s.addText("Mortality in\nSeptic Shock", { x: 0.3, y: 4.45, w: 2.8, h: 0.55, fontSize: 12, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });

  s.addShape(pres.ShapeType.rect, { x: 3.4, y: 3.6, w: 2.8, h: 1.5, fill: { color: C.cardBg2 }, line: { color: C.gold, width: 1.5 } });
  s.addText("750,000+", { x: 3.4, y: 3.65, w: 2.8, h: 0.82, fontSize: 34, bold: true, color: C.gold, fontFace: "Calibri", align: "center", margin: 0 });
  s.addText("US cases per year\n(rising incidence)", { x: 3.4, y: 4.45, w: 2.8, h: 0.55, fontSize: 12, color: C.midGrey, fontFace: "Calibri", align: "center", margin: 0 });

  s.addShape(pres.ShapeType.rect, { x: 6.5, y: 3.6, w: 3.2, h: 1.5, fill: { color: C.cardBg2 }, line: { color: C.teal, width: 1.5 } });
  s.addText("Most Common\nTriggers", { x: 6.5, y: 3.65, w: 3.2, h: 0.5, fontSize: 12, bold: true, color: C.teal, fontFace: "Calibri", align: "center", margin: 0 });
  s.addText("Gram-positive bacteria\nGram-negative bacteria\nFungi · Viruses (SARS-CoV-2)", { x: 6.5, y: 4.2, w: 3.2, h: 0.85, fontSize: 11, color: C.lightGrey, fontFace: "Calibri", align: "center", margin: 0 });
}

// ═══════════════════════════════════════════════════════════
// SECTION 02 DIVIDER
// ═══════════════════════════════════════════════════════════
sectionDivider(pres, 2, "Causes & Infection Sources");

// ═══════════════════════════════════════════════════════════
// SLIDE 6 — CAUSES
// ═══════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentHeader(s, pres, "Common Sources of Infection", C.gold);

  const sources = [
    { site: "Lungs (Pneumonia)", pathogens: "S. pneumoniae, Klebsiella,\nS. aureus, gram-negatives", color: C.crimson },
    { site: "Urinary Tract", pathogens: "E. coli, Klebsiella,\nEnterococcus", color: C.gold },
    { site: "Abdomen", pathogens: "E. coli, Bacteroides,\nanaerobes, Enterococcus", color: C.teal },
    { site: "Skin / Soft Tissue", pathogens: "S. aureus,\nStreptococcus pyogenes", color: C.crimsonLight },
    { site: "Bloodstream (CLABSI)", pathogens: "S. epidermidis, S. aureus,\nCandida", color: C.midGrey },
    { site: "CNS (Meningitis)", pathogens: "N. meningitidis,\nS. pneumoniae", color: "#9B59B6" },
  ];

  sources.forEach((src, i) => {
    const col = i % 3;
    const row = Math.floor(i / 3);
    const x = 0.2 + col * 3.25;
    const y = 0.88 + row * 2.2;
    s.addShape(pres.ShapeType.roundRect, { x, y, w: 3.1, h: 2.0, fill: { color: C.cardBg }, line: { color: src.color, width: 2 }, rectRadius: 0.06 });
    // Top color bar
    s.addShape(pres.ShapeType.rect, { x, y, w: 3.1, h: 0.45, fill: { color: src.color } });
    s.addText(src.site, { x: x + 0.08, y: y + 0.06, w: 2.94, h: 0.35, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", margin: 0 });
    s.addText(src.pathogens, { x: x + 0.1, y: y + 0.52, w: 2.9, h: 1.35, fontSize: 11.5, color: C.lightGrey, fontFace: "Calibri", valign: "top", margin: 0 });
  });

  // Risk factors strip
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.28, w: 10, h: 0.345, fill: { color: C.navy } });
  s.addText("High-risk hosts: Immunocompromised · Elderly · ICU patients · Multidrug-resistant organism carriers · Chemotherapy recipients", {
    x: 0.2, y: 5.3, w: 9.6, h: 0.3, fontSize: 10, color: C.midGrey, fontFace: "Calibri", margin: 0
  });
}

// ═══════════════════════════════════════════════════════════
// SECTION 03 DIVIDER
// ═══════════════════════════════════════════════════════════
sectionDivider(pres, 3, "Pathophysiology – The Cascade");

// ═══════════════════════════════════════════════════════════
// SLIDE 8 — PATHOPHYSIOLOGY OVERVIEW
// ═══════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentHeader(s, pres, "Pathophysiology: Step-by-Step Cascade", C.crimson);

  const steps = [
    { n: "1", label: "PAMPs/DAMPs\nRecognized by TLRs", color: C.gold },
    { n: "2", label: "NF-κB Activation\n& Cytokine Storm", color: C.crimson },
    { n: "3", label: "Counter-regulatory\nImmunosuppression", color: "#9B59B6" },
    { n: "4", label: "Endothelial Injury\n& Vascular Leak", color: C.teal },
    { n: "5", label: "Procoagulant State\n& DIC", color: C.crimsonLight },
    { n: "6", label: "Metabolic Failure\n& Organ Dysfunction", color: C.gold },
  ];

  steps.forEach((step, i) => {
    const x = 0.3 + i * 1.6;
    s.addShape(pres.ShapeType.rect, { x, y: 0.88, w: 1.4, h: 1.2, fill: { color: step.color }, line: { color: step.color, width: 1 } });
    s.addText(step.n, { x, y: 0.9, w: 1.4, h: 0.5, fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });
    s.addText(step.label, { x, y: 1.4, w: 1.4, h: 0.65, fontSize: 9.5, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });
    if (i < 5) {
      s.addText("→", { x: x + 1.4, y: 1.1, w: 0.2, h: 0.5, fontSize: 18, color: C.midGrey, fontFace: "Calibri", align: "center", margin: 0 });
    }
  });

  // Two column detail
  const leftItems = [
    "PAMPs (LPS, peptidoglycan) bind Toll-like receptors on macrophages, neutrophils, dendritic cells",
    "G-protein-coupled receptors detect bacterial peptides; C-type lectins detect fungal antigens",
    "NF-κB translocates to nucleus → upregulates inflammatory gene expression",
    "Key cytokines: TNF, IL-1, IL-12, IL-18, IFN-γ, HMGB1",
    "Complement activated → C3a (mast cells), C5a (chemotaxis), C3b (opsonin)",
    "ROS, prostaglandins, PAF also elaborated → endothelial damage",
  ];
  const rightItems = [
    "Hyperinflammation simultaneously triggers counter-regulatory immunosuppression",
    "Shift from Th1 (pro-inflammatory) → Th2/anti-inflammatory cytokines",
    "IL-10, soluble TNF receptor, IL-1 receptor antagonist produced",
    "Lymphocyte apoptosis and cellular anergy occur",
    "Patients oscillate between hyperinflammatory & immunosuppressed states",
    "Explains high risk of nosocomial (secondary) infections during recovery",
  ];

  s.addText("Initiation & Inflammation", { x: 0.3, y: 2.22, w: 4.5, h: 0.35, fontSize: 12, bold: true, color: C.crimson, fontFace: "Calibri", margin: 0 });
  bulletList(s, leftItems, 0.3, 2.58, 4.5, 2.85, { fontSize: 11, color: C.lightGrey, spacing: 2 });

  s.addShape(pres.ShapeType.rect, { x: 5.0, y: 2.22, w: 0.04, h: 3.1, fill: { color: C.navy } });

  s.addText("Counter-regulation & Immune Paralysis", { x: 5.2, y: 2.22, w: 4.5, h: 0.35, fontSize: 12, bold: true, color: "#9B59B6", fontFace: "Calibri", margin: 0 });
  bulletList(s, rightItems, 5.2, 2.58, 4.5, 2.85, { fontSize: 11, color: C.lightGrey, spacing: 2, bulletColor: "#9B59B6" });
}

// ═══════════════════════════════════════════════════════════
// SLIDE 9 — ENDOTHELIAL & COAGULATION
// ═══════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentHeader(s, pres, "Endothelial Activation & Procoagulant State", C.crimson);

  // Endothelial section
  s.addText("Endothelial Injury", { x: 0.3, y: 0.85, w: 4.5, h: 0.38, fontSize: 14, bold: true, color: C.teal, fontFace: "Calibri", margin: 0 });
  bulletList(s, [
    "Cytokines loosen tight junctions → protein-rich vascular leak → widespread edema",
    "NO and vasoactive mediators (C3a, C5a, PAF) → smooth muscle relaxation → hypotension",
    "Loss of microvascular autoregulation → O₂ delivery-demand mismatch",
    "Adhesion molecule upregulation → neutrophil tissue infiltration",
    "Increased capillaries with intermittent/heterogeneous flow"
  ], 0.3, 1.25, 4.6, 3.6, { fontSize: 11.5, color: C.lightGrey, spacing: 3, bulletColor: C.teal });

  s.addShape(pres.ShapeType.rect, { x: 5.05, y: 0.82, w: 0.04, h: 4.5, fill: { color: C.navy } });

  // Coagulation section
  s.addText("Procoagulant State & DIC", { x: 5.2, y: 0.85, w: 4.5, h: 0.38, fontSize: 14, bold: true, color: C.crimson, fontFace: "Calibri", margin: 0 });
  bulletList(s, [
    "Proinflammatory cytokines ↑ tissue factor (TF) on monocytes & endothelial cells",
    "Anticoagulant factors suppressed: TFPI, thrombomodulin, Protein C all ↓",
    "PAI-1 upregulated → impaired fibrinolysis",
    "NETs activate both intrinsic & extrinsic coagulation pathways",
    "Systemic thrombin activation → fibrin microthrombi in small vessels → ischemia",
    "DIC in up to 50% of septic patients → paradoxical bleeding from factor consumption"
  ], 5.2, 1.25, 4.6, 3.6, { fontSize: 11.5, color: C.lightGrey, spacing: 3, bulletColor: C.crimson });

  // DIC box
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 4.95, w: 9.4, h: 0.5, fill: { color: C.crimson } });
  s.addText("⚠  DIC = Disseminated Intravascular Coagulation: simultaneous widespread clotting AND bleeding — a life-threatening emergency", {
    x: 0.4, y: 5.0, w: 9.2, h: 0.38, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", margin: 0
  });
}

// ═══════════════════════════════════════════════════════════
// SECTION 05 DIVIDER (Metabolic + Organ)
// ═══════════════════════════════════════════════════════════
sectionDivider(pres, 5, "Metabolic Abnormalities & Organ Failure");

// ═══════════════════════════════════════════════════════════
// SLIDE 11 — METABOLIC + ORGAN FAILURE
// ═══════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentHeader(s, pres, "Metabolic Derangements & Multiorgan Failure", C.gold);

  // Metabolic left
  s.addText("Metabolic Abnormalities", { x: 0.3, y: 0.85, w: 4.5, h: 0.38, fontSize: 14, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
  bulletList(s, [
    "Insulin resistance & hyperglycemia: TNF/IL-1 + stress hormones drive gluconeogenesis, impair GLUT-4",
    "Hyperglycemia ↓ neutrophil function, ↑ endothelial adhesion molecules",
    "Lactic acidosis: tissue hypoxia + mitochondrial damage → impaired oxidative phosphorylation",
    "Elevated triglycerides and blood glucose",
    "Adrenal insufficiency: initial cortisol surge → relative adrenal failure or frank necrosis (Waterhouse-Friderichsen in DIC)",
  ], 0.3, 1.28, 4.6, 2.8, { fontSize: 11, color: C.lightGrey, spacing: 2, bulletColor: C.gold });

  s.addShape(pres.ShapeType.rect, { x: 5.05, y: 0.82, w: 0.04, h: 4.5, fill: { color: C.navy } });

  // Organ failure right - color cards
  s.addText("Organ Dysfunction", { x: 5.2, y: 0.85, w: 4.5, h: 0.38, fontSize: 14, bold: true, color: C.crimson, fontFace: "Calibri", margin: 0 });

  const organs = [
    { organ: "Lungs", injury: "ARDS – alveolar-capillary disruption, hypoxemia", color: C.crimson },
    { organ: "Kidneys", injury: "AKI – hypoperfusion + direct inflammatory injury", color: C.teal },
    { organ: "Liver", injury: "Jaundice, elevated enzymes, cholestasis – Kupffer cell activation", color: C.gold },
    { organ: "Heart", injury: "Myocardial depression – ↓ contractility & cardiac output", color: C.crimsonLight },
    { organ: "Brain", injury: "Septic encephalopathy – delirium, altered consciousness", color: "#9B59B6" },
    { organ: "Coagulation", injury: "DIC – diffuse microthrombi + haemorrhage", color: C.midGrey },
  ];
  organs.forEach((org, i) => {
    const y = 1.3 + i * 0.68;
    s.addShape(pres.ShapeType.rect, { x: 5.2, y, w: 0.85, h: 0.55, fill: { color: org.color } });
    s.addText(org.organ, { x: 5.2, y, w: 0.85, h: 0.55, fontSize: 10, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
    s.addText(org.injury, { x: 6.1, y: y + 0.04, w: 3.6, h: 0.48, fontSize: 10.5, color: C.lightGrey, fontFace: "Calibri", valign: "middle", margin: 0 });
  });
}

// ═══════════════════════════════════════════════════════════
// SECTION 06 DIVIDER
// ═══════════════════════════════════════════════════════════
sectionDivider(pres, 6, "Clinical Features & Stages of Shock");

// ═══════════════════════════════════════════════════════════
// SLIDE 13 — CLINICAL FEATURES
// ═══════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentHeader(s, pres, "Clinical Features of Sepsis", C.crimson);

  const features = [
    { sign: "Fever", detail: "> 38°C (or hypothermia < 36°C\nin severe/immunocompromised)", color: C.crimson },
    { sign: "Tachycardia", detail: "HR > 90 bpm", color: C.gold },
    { sign: "Tachypnea", detail: "RR > 20/min; early respiratory\nalkalosis → late acidosis", color: C.teal },
    { sign: "Altered Mental Status", detail: "Confusion, agitation,\nobtundation", color: "#9B59B6" },
    { sign: "Hypotension", detail: "SBP < 90 or MAP < 65 mmHg\n(in septic shock)", color: C.crimsonLight },
    { sign: "Skin Changes", detail: "Early: warm, flushed\nLate: cold, clammy, mottled", color: C.midGrey },
    { sign: "Oliguria", detail: "Urine < 0.5 mL/kg/hr\n(early AKI marker)", color: C.teal },
    { sign: "Jaundice", detail: "Hepatic involvement;\nmost common ICU jaundice cause", color: C.gold },
  ];

  features.forEach((f, i) => {
    const col = i % 4;
    const row = Math.floor(i / 4);
    const x = 0.15 + col * 2.44;
    const y = 0.88 + row * 2.2;
    s.addShape(pres.ShapeType.roundRect, { x, y, w: 2.3, h: 2.0, fill: { color: C.cardBg }, line: { color: f.color, width: 2 }, rectRadius: 0.06 });
    s.addShape(pres.ShapeType.rect, { x, y, w: 2.3, h: 0.45, fill: { color: f.color } });
    s.addText(f.sign, { x: x + 0.05, y: y + 0.06, w: 2.2, h: 0.35, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });
    s.addText(f.detail, { x: x + 0.08, y: y + 0.52, w: 2.14, h: 1.35, fontSize: 11, color: C.lightGrey, fontFace: "Calibri", align: "center", valign: "top", margin: 0 });
  });
}

// ═══════════════════════════════════════════════════════════
// SLIDE 14 — STAGES OF SHOCK
// ═══════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentHeader(s, pres, "Stages of Septic Shock", C.gold);

  const stages = [
    {
      n: "Stage 1", label: "Non-Progressive\n(Compensated)",
      desc: "Baroreceptor reflexes activated\nCatecholamine release\nRAAS activation; ADH release\nVital organ perfusion maintained\nNo clinical deterioration yet",
      color: C.teal
    },
    {
      n: "Stage 2", label: "Progressive",
      desc: "Compensatory mechanisms fail\nWorsening tissue hypoperfusion\nMetabolic acidosis develops\nLactate rises\nClinical deterioration apparent",
      color: C.gold
    },
    {
      n: "Stage 3", label: "Irreversible",
      desc: "Cellular/tissue injury too severe\nOrgan failure irreversible\nEven correcting hemodynamics\ncannot prevent death\nMultiple organ failure ensues",
      color: C.crimson
    },
  ];

  stages.forEach((st, i) => {
    const x = 0.3 + i * 3.2;
    s.addShape(pres.ShapeType.roundRect, { x, y: 0.88, w: 3.0, h: 4.5, fill: { color: C.cardBg }, line: { color: st.color, width: 2.5 }, rectRadius: 0.08 });
    s.addShape(pres.ShapeType.rect, { x, y: 0.88, w: 3.0, h: 0.72, fill: { color: st.color } });
    s.addText(st.n, { x: x + 0.1, y: 0.9, w: 2.8, h: 0.35, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });
    s.addText(st.label, { x: x + 0.1, y: 1.25, w: 2.8, h: 0.35, fontSize: 10, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });
    s.addText(st.desc, { x: x + 0.15, y: 1.72, w: 2.7, h: 3.5, fontSize: 12, color: C.lightGrey, fontFace: "Calibri", valign: "top", margin: 0 });
    if (i < 2) {
      s.addText("→", { x: x + 3.0, y: 2.6, w: 0.2, h: 0.5, fontSize: 22, color: C.midGrey, fontFace: "Calibri", align: "center", margin: 0 });
    }
  });
}

// ═══════════════════════════════════════════════════════════
// SECTION 07 DIVIDER
// ═══════════════════════════════════════════════════════════
sectionDivider(pres, 7, "Diagnosis – qSOFA, SOFA & Laboratory Tests");

// ═══════════════════════════════════════════════════════════
// SLIDE 16 — DIAGNOSIS TOOLS
// ═══════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentHeader(s, pres, "Diagnostic Criteria", C.teal);

  // qSOFA box
  s.addShape(pres.ShapeType.roundRect, { x: 0.3, y: 0.88, w: 4.5, h: 3.2, fill: { color: C.cardBg }, line: { color: C.teal, width: 2 }, rectRadius: 0.06 });
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.88, w: 4.5, h: 0.5, fill: { color: C.teal } });
  s.addText("qSOFA  (Quick SOFA — outside ICU)", { x: 0.38, y: 0.9, w: 4.34, h: 0.42, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0 });
  const qItems = [
    "Altered mental status (GCS < 15)  →  1 pt",
    "Respiratory rate ≥ 22 /min  →  1 pt",
    "Systolic BP ≤ 100 mmHg  →  1 pt",
  ];
  bulletList(s, qItems, 0.4, 1.44, 4.3, 1.5, { fontSize: 12, color: C.lightGrey, spacing: 5, bulletColor: C.teal });
  s.addShape(pres.ShapeType.rect, { x: 0.4, y: 2.98, w: 4.3, h: 0.42, fill: { color: C.navy } });
  s.addText("Score ≥ 2 = Suspect Sepsis → Get full SOFA assessment", { x: 0.45, y: 3.0, w: 4.2, h: 0.35, fontSize: 11, bold: true, color: C.teal, fontFace: "Calibri", margin: 0 });

  // SOFA box
  s.addShape(pres.ShapeType.roundRect, { x: 5.1, y: 0.88, w: 4.6, h: 3.2, fill: { color: C.cardBg }, line: { color: C.gold, width: 2 }, rectRadius: 0.06 });
  s.addShape(pres.ShapeType.rect, { x: 5.1, y: 0.88, w: 4.6, h: 0.5, fill: { color: C.gold } });
  s.addText("SOFA Score (ICU — definitive criterion)", { x: 5.18, y: 0.9, w: 4.44, h: 0.42, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0 });
  const sofaItems = [
    "Respiration: PaO₂/FiO₂ ratio",
    "Coagulation: Platelet count",
    "Liver: Bilirubin",
    "Cardiovascular: MAP / vasopressors",
    "CNS: Glasgow Coma Scale",
    "Renal: Creatinine / urine output",
  ];
  bulletList(s, sofaItems, 5.2, 1.44, 4.3, 1.5, { fontSize: 12, color: C.lightGrey, spacing: 3, bulletColor: C.gold });
  s.addShape(pres.ShapeType.rect, { x: 5.2, y: 2.98, w: 4.3, h: 0.42, fill: { color: C.navy } });
  s.addText("SOFA ≥ 2 points from baseline = Organ Dysfunction = SEPSIS", { x: 5.25, y: 3.0, w: 4.2, h: 0.35, fontSize: 11, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });

  // Lab header
  s.addText("Key Laboratory Investigations", { x: 0.3, y: 4.22, w: 9.4, h: 0.35, fontSize: 13, bold: true, color: C.crimson, fontFace: "Calibri", margin: 0 });

  const labs = [
    "Blood cultures (×2) — before antibiotics",
    "CBC — leukocytosis/leukopenia, bandemia",
    "Lactate — >2 mmol/L = hypoperfusion",
    "Procalcitonin — bacterial sepsis marker",
    "CRP — inflammation",
    "BMP/Creatinine — AKI",
    "LFTs/Bilirubin — hepatic involvement",
    "PT/aPTT, D-dimer — DIC screening",
    "ABG — acid-base, respiratory status",
  ];
  // 3-column lab grid
  const perCol = 3;
  labs.forEach((lab, i) => {
    const col = Math.floor(i / perCol);
    const row = i % perCol;
    s.addText(`• ${lab}`, {
      x: 0.3 + col * 3.2, y: 4.6 + row * 0.3,
      w: 3.1, h: 0.28,
      fontSize: 10, color: C.lightGrey, fontFace: "Calibri", margin: 0
    });
  });
}

// ═══════════════════════════════════════════════════════════
// SECTION 08 DIVIDER
// ═══════════════════════════════════════════════════════════
sectionDivider(pres, 8, "Management – Surviving Sepsis Campaign");

// ═══════════════════════════════════════════════════════════
// SLIDE 18 — HOUR-1 BUNDLE
// ═══════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentHeader(s, pres, "The Hour-1 Bundle (Immediate Management)", C.crimson);

  const bundle = [
    { n: "1", action: "Measure Lactate", detail: "Remeasure if initial > 2 mmol/L", color: C.teal },
    { n: "2", action: "Blood Cultures ×2", detail: "Before antibiotics — do not delay", color: C.gold },
    { n: "3", action: "IV Antibiotics", detail: "Broad-spectrum within 1 HOUR\nof sepsis recognition", color: C.crimson },
    { n: "4", action: "Fluid Resuscitation", detail: "30 mL/kg IV balanced crystalloid\n(Lactated Ringer's preferred)", color: C.teal },
    { n: "5", action: "Vasopressors", detail: "If hypotension persists\nTarget MAP ≥ 65 mmHg", color: C.crimsonLight },
  ];

  bundle.forEach((b, i) => {
    const x = 0.2 + i * 1.9;
    s.addShape(pres.ShapeType.roundRect, { x, y: 0.9, w: 1.75, h: 3.0, fill: { color: C.cardBg }, line: { color: b.color, width: 2.5 }, rectRadius: 0.06 });
    s.addShape(pres.ShapeType.ellipse, { x: x + 0.525, y: 0.95, w: 0.7, h: 0.7, fill: { color: b.color } });
    s.addText(b.n, { x: x + 0.525, y: 0.97, w: 0.7, h: 0.65, fontSize: 20, bold: true, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });
    s.addText(b.action, { x: x + 0.08, y: 1.74, w: 1.6, h: 0.65, fontSize: 12, bold: true, color: b.color, fontFace: "Calibri", align: "center", margin: 0 });
    s.addText(b.detail, { x: x + 0.08, y: 2.45, w: 1.6, h: 1.35, fontSize: 10.5, color: C.lightGrey, fontFace: "Calibri", align: "center", valign: "top", margin: 0 });
  });

  // Vasopressor section
  s.addText("Vasopressor Hierarchy", { x: 0.3, y: 4.08, w: 5, h: 0.35, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
  const vpItems = [
    "Norepinephrine — FIRST-LINE (↓ mortality vs dopamine)",
    "Vasopressin (0.03–0.04 U/min) — add-on to norepinephrine",
    "Epinephrine — second-line add-on",
    "Dopamine — no longer preferred (↑ arrhythmia risk)",
  ];
  bulletList(s, vpItems, 0.3, 4.45, 4.8, 1.0, { fontSize: 11, color: C.lightGrey, spacing: 2, bulletColor: C.gold });

  // Antibiotics note
  s.addText("Antibiotic Principles", { x: 5.2, y: 4.08, w: 4.5, h: 0.35, fontSize: 13, bold: true, color: C.teal, fontFace: "Calibri", margin: 0 });
  bulletList(s, [
    "Empirical broad-spectrum based on source & local resistance",
    "De-escalate based on culture results (stewardship)",
    "Duration: 5–7 days once source controlled",
    "Procalcitonin guides de-escalation"
  ], 5.2, 4.45, 4.6, 1.0, { fontSize: 11, color: C.lightGrey, spacing: 2, bulletColor: C.teal });
}

// ═══════════════════════════════════════════════════════════
// SLIDE 19 — ADJUNCTIVE THERAPIES
// ═══════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentHeader(s, pres, "Adjunctive & Supportive Therapies", C.teal);

  const therapies = [
    { therapy: "Hydrocortisone\n200–300 mg/day", indication: "Refractory septic shock (persisting despite fluids + vasopressors) — addresses relative adrenal insufficiency", color: C.crimson },
    { therapy: "Insulin Infusion", indication: "Target blood glucose 140–180 mg/dL; avoid hypoglycemia which worsens outcomes", color: C.gold },
    { therapy: "Lung-Protective\nVentilation (ARDS)", indication: "Low tidal volume 6 mL/kg IBW; PEEP titration; proven to ↓ mortality in ARDS", color: C.teal },
    { therapy: "Renal Replacement\nTherapy (CRRT)", indication: "Severe AKI unresponsive to medical management; continuous mode preferred in hemodynamically unstable patients", color: "#9B59B6" },
    { therapy: "Source Control", indication: "Drain abscess, remove infected central line, debride necrotizing tissue — critical to antibiotics working", color: C.crimsonLight },
    { therapy: "DVT & Stress Ulcer\nProphylaxis", indication: "Heparin for DVT unless DIC contraindication; PPI or H₂ blocker for stress ulcer prophylaxis", color: C.midGrey },
  ];

  therapies.forEach((t, i) => {
    const col = i % 3;
    const row = Math.floor(i / 3);
    const x = 0.2 + col * 3.25;
    const y = 0.9 + row * 2.2;
    s.addShape(pres.ShapeType.roundRect, { x, y, w: 3.1, h: 2.05, fill: { color: C.cardBg }, line: { color: t.color, width: 2 }, rectRadius: 0.06 });
    s.addShape(pres.ShapeType.rect, { x, y, w: 3.1, h: 0.52, fill: { color: t.color } });
    s.addText(t.therapy, { x: x + 0.07, y: y + 0.06, w: 2.96, h: 0.42, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
    s.addText(t.indication, { x: x + 0.1, y: y + 0.58, w: 2.9, h: 1.38, fontSize: 10.5, color: C.lightGrey, fontFace: "Calibri", valign: "top", wrap: true, margin: 0 });
  });
}

// ═══════════════════════════════════════════════════════════
// SLIDE 20 — SUMMARY / CONCLUSION
// ═══════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navyDark } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.teal } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.2, w: 10, h: 0.08, fill: { color: C.gold } });

  s.addText("Key Takeaways", { x: 0.4, y: 0.25, w: 9.2, h: 0.65, fontSize: 28, bold: true, color: C.white, fontFace: "Calibri", align: "center" });

  const takeaways = [
    { icon: "01", text: "Sepsis = infection + organ dysfunction. Septic shock = sepsis + vasopressors needed + lactate > 2 mmol/L", color: C.crimson },
    { icon: "02", text: "The cascade: PAMPs activate TLRs → NF-κB → cytokine storm + simultaneous immunosuppression → endothelial injury → DIC → multiorgan failure", color: C.gold },
    { icon: "03", text: "Pathophysiology is biphasic: hyperinflammatory AND immunosuppressed simultaneously — explaining secondary infection risk", color: "#9B59B6" },
    { icon: "04", text: "SOFA ≥ 2 = sepsis; qSOFA ≥ 2 = screen positive outside ICU; lactate is key prognostic marker", color: C.teal },
    { icon: "05", text: "Hour-1 Bundle: culture → antibiotics within 1 hr → 30 mL/kg fluid → vasopressors if needed → norepinephrine is first-line", color: C.teal },
  ];

  takeaways.forEach((tk, i) => {
    const y = 1.05 + i * 0.85;
    s.addShape(pres.ShapeType.rect, { x: 0.4, y, w: 0.5, h: 0.65, fill: { color: tk.color } });
    s.addText(tk.icon, { x: 0.4, y, w: 0.5, h: 0.65, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
    s.addText(tk.text, { x: 1.05, y: y + 0.06, w: 8.65, h: 0.55, fontSize: 12, color: C.lightGrey, fontFace: "Calibri", valign: "middle", margin: 0 });
  });

  s.addText("Sources: Robbins & Cotran Pathologic Basis of Disease · Sabiston Textbook of Surgery · Rosen's Emergency Medicine · Miller's Anesthesia 10e", {
    x: 0.4, y: 5.3, w: 9.2, h: 0.25, fontSize: 8.5, color: C.midGrey, fontFace: "Calibri", align: "center", italic: true
  });
}

// ─── WRITE FILE ───
pres.writeFile({ fileName: "/home/daytona/workspace/sepsis-slides/Sepsis_Complete.pptx" })
  .then(() => console.log("✅ Sepsis_Complete.pptx created successfully"))
  .catch(err => { console.error("❌ Error:", err); process.exit(1); });
Running Command

cd /home/daytona/workspace/sepsis-slides && node create_sepsis.js

Running Command

ls -lh /home/daytona/workspace/sepsis-slides/

Your presentation is ready! Download it here:

Sepsis Complete

Presentation · PPTX


The deck contains 20 slides with a dark navy + crimson clinical design:
SlideContent
1Title slide
2Contents at a Glance
3-4Definition, Sepsis-3 criteria, Epidemiology (stats badges)
5-6Section divider + Infection Sources (color-coded cards)
7-8Section divider + Pathophysiology cascade (6-step flow + detail)
9Endothelial activation & Procoagulant state / DIC
10-11Section divider + Metabolic abnormalities & Organ failure (per-organ cards)
12-13Section divider + Clinical features (8-card grid)
14Stages of shock (non-progressive → progressive → irreversible)
15-16Section divider + Diagnosis (qSOFA, SOFA, Labs)
17-18Section divider + Hour-1 Bundle + Vasopressor hierarchy
19Adjunctive therapies (steroids, insulin, ARDS ventilation, CRRT, source control)
20Key Takeaways / Summary slide
This is a shared conversation. Sign in to Orris to start your own chat.