𝟏:-Define blood transfusion and 𝐒𝐭𝐬𝟐:- indications πŸ‘:-Assess patients for blood transfusion needs. πŸ’:-Explain the importance of compatibility testing. πŸ“:-Recognize the risks and πŸ”:-benefits of blood transfusion. Generate a detailed pptx or docx presentation as per medical textbook refernce

Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Running Command

mkdir -p /home/daytona/workspace/blood-transfusion-pptx && ls /home/daytona/work…

Where is ppt

Writing File

~/blood-transfusion-pptx/build.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Blood Transfusion";
pres.author = "Medical Education";

// ─── THEME COLORS ───────────────────────────────────────────────
const C = {
  darkBg:    "0D1B2A",   // deep navy  – title / section dividers
  midBg:     "1B3A5C",   // med blue   – accent bars
  accent:    "E63946",   // crimson red – blood motif
  gold:      "F4A261",   // warm amber – highlights
  white:     "FFFFFF",
  lightGray: "EDF2F7",
  textDark:  "1A202C",
  subText:   "4A5568",
};

// ─── HELPER: section-divider slide ──────────────────────────────
function addDivider(pres, num, title, subtitle) {
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.darkBg } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 4.5, w: 10, h: 1.125, fill: { color: C.accent } });
  s.addText(`0${num}`, { x: 0.4, y: 0.3, w: 2, h: 1.2, fontSize: 72, bold: true, color: C.accent, transparency: 30 });
  s.addText(title, { x: 0.5, y: 1.4, w: 9, h: 1.1, fontSize: 38, bold: true, color: C.white, fontFace: "Calibri" });
  s.addText(subtitle, { x: 0.5, y: 2.6, w: 9, h: 0.8, fontSize: 18, color: C.gold, fontFace: "Calibri", italic: true });
  return s;
}

// ─── HELPER: content slide ───────────────────────────────────────
function addContent(pres, title, bullets, footnote) {
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.85, fill: { color: C.midBg } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0.85, w: 0.18, h: 4.775, fill: { color: C.accent } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.35, w: 10, h: 0.275, fill: { color: C.darkBg } });
  s.addText(title, { x: 0.3, y: 0.1, w: 9.4, h: 0.65, fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
  const items = bullets.map((b, i) => ({
    text: b.text,
    options: { bullet: b.sub ? { indent: 30 } : true, fontSize: b.sub ? 14 : 16, color: b.sub ? C.subText : C.textDark, bold: b.bold || false, breakLine: i < bullets.length - 1 }
  }));
  s.addText(items, { x: 0.35, y: 0.95, w: 9.3, h: 4.25, fontFace: "Calibri", valign: "top" });
  if (footnote) {
    s.addText(footnote, { x: 0.3, y: 5.3, w: 9.4, h: 0.28, fontSize: 10, color: C.white, italic: true, fontFace: "Calibri" });
  }
  return s;
}

// ─── HELPER: two-column slide ────────────────────────────────────
function addTwoCol(pres, title, leftTitle, leftItems, rightTitle, rightItems, footnote) {
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.85, fill: { color: C.midBg } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.35, w: 10, h: 0.275, fill: { color: C.darkBg } });
  s.addText(title, { x: 0.3, y: 0.1, w: 9.4, h: 0.65, fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
  // Left col
  s.addShape(pres.ShapeType.rect, { x: 0.25, y: 0.95, w: 4.5, h: 4.3, fill: { color: C.lightGray }, line: { color: C.midBg, width: 1 } });
  s.addText(leftTitle, { x: 0.3, y: 0.98, w: 4.4, h: 0.4, fontSize: 14, bold: true, color: C.midBg, fontFace: "Calibri" });
  const lItems = leftItems.map((b, i) => ({ text: b, options: { bullet: true, fontSize: 13, color: C.textDark, breakLine: i < leftItems.length - 1 } }));
  s.addText(lItems, { x: 0.35, y: 1.45, w: 4.3, h: 3.7, fontFace: "Calibri", valign: "top" });
  // Right col
  s.addShape(pres.ShapeType.rect, { x: 5.1, y: 0.95, w: 4.5, h: 4.3, fill: { color: "FFF5F5" }, line: { color: C.accent, width: 1 } });
  s.addText(rightTitle, { x: 5.15, y: 0.98, w: 4.4, h: 0.4, fontSize: 14, bold: true, color: C.accent, fontFace: "Calibri" });
  const rItems = rightItems.map((b, i) => ({ text: b, options: { bullet: true, fontSize: 13, color: C.textDark, breakLine: i < rightItems.length - 1 } }));
  s.addText(rItems, { x: 5.2, y: 1.45, w: 4.3, h: 3.7, fontFace: "Calibri", valign: "top" });
  if (footnote) s.addText(footnote, { x: 0.3, y: 5.3, w: 9.4, h: 0.28, fontSize: 10, color: C.white, italic: true, fontFace: "Calibri" });
  return s;
}

// ─── HELPER: table slide ─────────────────────────────────────────
function addTableSlide(pres, title, rows, footnote) {
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.85, fill: { color: C.midBg } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.35, w: 10, h: 0.275, fill: { color: C.darkBg } });
  s.addText(title, { x: 0.3, y: 0.1, w: 9.4, h: 0.65, fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
  s.addTable(rows, {
    x: 0.3, y: 0.95, w: 9.4,
    colW: [2.8, 6.6],
    fontFace: "Calibri",
    fontSize: 14,
    border: { pt: 1, color: "CCCCCC" },
    autoPage: false,
  });
  if (footnote) s.addText(footnote, { x: 0.3, y: 5.3, w: 9.4, h: 0.28, fontSize: 10, color: C.white, italic: true, fontFace: "Calibri" });
  return s;
}

// ════════════════════════════════════════════════════════════════
// SLIDE 1 β€” TITLE
// ════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.darkBg } });
  // Decorative red band
  s.addShape(pres.ShapeType.rect, { x: 0, y: 3.7, w: 10, h: 0.12, fill: { color: C.accent } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 3.85, w: 10, h: 0.04, fill: { color: C.gold } });
  // Large drop icon placeholder (text)
  s.addText("🩸", { x: 8.0, y: 0.3, w: 1.6, h: 1.6, fontSize: 72, align: "center" });
  // Title
  s.addText("Blood Transfusion", { x: 0.5, y: 0.6, w: 7.2, h: 1.3, fontSize: 44, bold: true, color: C.white, fontFace: "Calibri" });
  s.addText("A Comprehensive Clinical Overview", { x: 0.5, y: 2.0, w: 7.2, h: 0.6, fontSize: 22, color: C.gold, fontFace: "Calibri", italic: true });
  // Topics strip
  const topics = [
    "01 Definition", "02 Indications", "03 Patient Assessment",
    "04 Compatibility Testing", "05 Risks", "06 Benefits"
  ];
  s.addText(topics.join("   |   "), { x: 0.5, y: 2.75, w: 9, h: 0.5, fontSize: 13, color: "A0AEC0", fontFace: "Calibri" });
  s.addText("References: Bailey & Love's Surgery 28e Β· Roberts & Hedges' Clinical Procedures Β· Henry's Clinical Diagnosis Β· Tietz Textbook of Laboratory Medicine Β· Rosen's Emergency Medicine", {
    x: 0.5, y: 4.0, w: 9, h: 0.7, fontSize: 10, color: "718096", fontFace: "Calibri", italic: true
  });
}

// ════════════════════════════════════════════════════════════════
// SECTION 1 β€” DEFINITION
// ════════════════════════════════════════════════════════════════
addDivider(pres, 1, "Definition of Blood Transfusion", "What it is, historical context & types of blood products");

addContent(pres, "Definition of Blood Transfusion", [
  { text: "Core Definition", bold: true },
  { text: "The intravenous transfer of whole blood or blood components from a donor to a recipient for therapeutic purposes.", sub: true },
  { text: '"Any blood transfusion is a serious undertaking. If regarded as a form of transplantation of regenerative tissue from a donor being given to a recipient, its importance is clearly understood."', sub: true },
  { text: "β€” Pye's Surgical Handicraft, 22nd Edition", sub: true },
  { text: " " },
  { text: "Key Concept", bold: true },
  { text: "Blood transfusion is essentially a form of tissue transplant and carries all the associated immunological risks.", sub: true },
  { text: "The procedure must be treated with the same degree of clinical gravity as organ transplantation.", sub: true },
], "Source: Pye's Surgical Handicraft, 22nd Ed.");

addContent(pres, "Types of Blood Products Transfused", [
  { text: "Whole Blood", bold: true },
  { text: "Contains all components: RBCs, plasma, platelets, and clotting factors. Used in massive haemorrhage and military settings.", sub: true },
  { text: "Packed Red Blood Cells (PRBCs)", bold: true },
  { text: "Most common product. Used for anaemia and acute blood loss. Provides oxygen-carrying capacity without volume overload.", sub: true },
  { text: "Fresh Frozen Plasma (FFP)", bold: true },
  { text: "Contains all clotting factors. Used in coagulopathy, liver disease, massive transfusion protocols.", sub: true },
  { text: "Platelet Concentrate", bold: true },
  { text: "Used for thrombocytopenia (<50,000/Β΅L in active bleeding). Maintain platelet count >50,000/Β΅L during active GI bleeding.", sub: true },
  { text: "Autologous Blood Transfusion", bold: true },
  { text: "Patient pre-donates their own blood before elective surgery, or intraoperative cell salvage (cell saver) is used.", sub: true },
], "Source: Bailey & Love's Surgery 28e; Rosen's Emergency Medicine");

// ════════════════════════════════════════════════════════════════
// SECTION 2 β€” INDICATIONS
// ════════════════════════════════════════════════════════════════
addDivider(pres, 2, "Indications for Blood Transfusion", "Clinical triggers and haemoglobin-based transfusion criteria");

addContent(pres, "Indications for Blood Transfusion", [
  { text: '"Blood transfusions should be avoided if possible, and many previous uses are now no longer considered appropriate."', sub: true },
  { text: "β€” Bailey & Love's Short Practice of Surgery, 28th Edition", sub: true },
  { text: " " },
  { text: "Accepted Clinical Indications", bold: true },
  { text: "Acute blood loss β€” to replace circulating volume and maintain oxygen delivery", sub: true },
  { text: "Perioperative anaemia β€” to ensure adequate oxygen delivery during the perioperative phase", sub: true },
  { text: "Symptomatic chronic anaemia β€” without haemorrhage or impending surgery", sub: true },
  { text: "Haematological disorders β€” sickle cell disease, thalassaemia, aplastic anaemia", sub: true },
  { text: "Massive haemorrhage protocols β€” trauma, obstetric haemorrhage, GI bleed", sub: true },
  { text: "Coagulopathy β€” FFP/platelets in DIC, liver failure, warfarin reversal", sub: true },
], "Source: Bailey & Love's Surgery 28e, p.42–43; Rosen's Emergency Medicine");

// Hb Trigger Table
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.85, fill: { color: C.midBg } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.35, w: 10, h: 0.275, fill: { color: C.darkBg } });
  s.addText("Transfusion Trigger β€” Haemoglobin Thresholds", { x: 0.3, y: 0.1, w: 9.4, h: 0.65, fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });

  const rows = [
    [
      { text: "Hb Level (g/dL)", options: { bold: true, color: C.white, fill: C.darkBg, fontSize: 15 } },
      { text: "Transfusion Guidance", options: { bold: true, color: C.white, fill: C.darkBg, fontSize: 15 } }
    ],
    [
      { text: "< 6 g/dL", options: { bold: true, color: C.accent, fontSize: 14 } },
      { text: "Probably WILL benefit from transfusion", options: { fontSize: 14 } }
    ],
    [
      { text: "6 – 8 g/dL", options: { bold: true, color: C.midBg, fontSize: 14 } },
      { text: "Transfusion UNLIKELY to benefit in absence of bleeding or impending surgery", options: { fontSize: 14 } }
    ],
    [
      { text: "> 8 g/dL", options: { bold: true, color: "2F855A", fontSize: 14 } },
      { text: "NO indication for transfusion in absence of other risk factors", options: { fontSize: 14 } }
    ],
    [
      { text: "> 9 g/dL (CAD)", options: { bold: true, color: "744210", fontSize: 14 } },
      { text: "Target for patients with known/symptomatic coronary artery disease or cardiac ischaemia", options: { fontSize: 14 } }
    ],
  ];
  s.addTable(rows, { x: 0.4, y: 0.98, w: 9.2, colW: [2.8, 6.4], fontFace: "Calibri", border: { pt: 1, color: "CCCCCC" }, rowH: 0.72 });
  s.addText("Historically Hb >10 g/dL was targeted β€” this is now shown to increase morbidity and mortality compared to restrictive strategies.", {
    x: 0.4, y: 4.7, w: 9.2, h: 0.55, fontSize: 13, color: C.subText, italic: true, fontFace: "Calibri"
  });
  s.addText("Source: Bailey & Love's Surgery 28e Table 2.6; Rosen's Emergency Medicine", { x: 0.3, y: 5.3, w: 9.4, h: 0.28, fontSize: 10, color: C.white, italic: true, fontFace: "Calibri" });
}

// ════════════════════════════════════════════════════════════════
// SECTION 3 β€” PATIENT ASSESSMENT
// ════════════════════════════════════════════════════════════════
addDivider(pres, 3, "Assessing Patients for Blood Transfusion", "Pre-transfusion evaluation, clinical & laboratory workup");

addContent(pres, "Clinical Assessment Before Transfusion", [
  { text: "History", bold: true },
  { text: "Previous transfusions and any transfusion reactions", sub: true },
  { text: "Known blood group / red cell alloantibodies", sub: true },
  { text: "Pregnancy history (Rh sensitisation risk)", sub: true },
  { text: "Medications (anticoagulants, immunosuppressants)", sub: true },
  { text: "Symptoms of anaemia: fatigue, dyspnoea, angina, syncope", sub: true },
  { text: "Examination", bold: true },
  { text: "Vital signs: HR, BP, temperature, respiratory rate, SpOβ‚‚", sub: true },
  { text: "Pallor, jaundice, oedema, signs of cardiac decompensation", sub: true },
  { text: "Active bleeding sites, estimated blood loss", sub: true },
], "Source: Henry's Clinical Diagnosis & Management by Laboratory Methods; Bailey & Love's 28e");

addContent(pres, "Laboratory Investigation for Transfusion Need", [
  { text: "Essential Pre-transfusion Laboratory Tests", bold: true },
  { text: "Full Blood Count (FBC) β€” Hb, Hct, platelet count, WBC", sub: true },
  { text: "ABO and Rh(D) blood grouping β€” mandatory before any transfusion", sub: true },
  { text: "Antibody screen β€” detect unexpected red cell alloantibodies", sub: true },
  { text: "Crossmatch β€” donor cells vs. recipient serum compatibility check", sub: true },
  { text: "Coagulation screen (PT, APTT, fibrinogen) β€” if FFP/platelets considered", sub: true },
  { text: "Special Populations Requiring Extra Care", bold: true },
  { text: "Neonates: weak/absent isohemagglutinins; maternally derived antibodies persist weeks after birth", sub: true },
  { text: "Multiply transfused patients: may develop multiple alloantibodies; provide antigen-matched RBCs", sub: true },
  { text: "Immunosuppressed patients: may lack expected ABO antibodies; use group O RBCs and AB plasma", sub: true },
], "Source: Henry's Clinical Diagnosis & Management by Laboratory Methods, Ch. 36");

addContent(pres, "Pretransfusion Testing β€” Step-by-Step Protocol", [
  { text: "Step 1: Patient identification", bold: true },
  { text: "Correctly labelled specimen with unique patient ID β€” most critical step to prevent fatal errors", sub: true },
  { text: "Step 2: ABO and Rh(D) typing", bold: true },
  { text: "At least TWO separate determinations of recipient ABO group required for electronic crossmatch", sub: true },
  { text: "Step 3: Antibody Screen", bold: true },
  { text: "Detects unexpected red cell antibodies. If positive β†’ proceed to antibody identification", sub: true },
  { text: "Step 4: Crossmatch (Serological or Electronic)", bold: true },
  { text: "Final check of ABO compatibility. Full crossmatch takes ~45 minutes.", sub: true },
  { text: "Step 5: Specimen retention", bold: true },
  { text: "Pretransfusion samples must be retained for at least 7 days after each transfusion", sub: true },
], "Source: Henry's Clinical Diagnosis & Management by Laboratory Methods");

// ════════════════════════════════════════════════════════════════
// SECTION 4 β€” COMPATIBILITY TESTING
// ════════════════════════════════════════════════════════════════
addDivider(pres, 4, "Compatibility Testing", "ABO/Rh systems, crossmatching procedures and clinical significance");

addContent(pres, "The ABO Blood Group System", [
  { text: "Basis of the System", bold: true },
  { text: "Three allelic genes: A, B, and O β€” control synthesis of enzymes adding carbohydrate residues to RBC surface glycoproteins", sub: true },
  { text: "Naturally occurring antibodies are found in serum of those lacking the corresponding antigen", sub: true },
  { text: " " },
  { text: "Blood Group O: Universal Donor (no antigens β†’ no reaction in recipient)", sub: true },
  { text: "Blood Group AB: Universal Recipient (no circulating antibodies β†’ accepts any type)", sub: true },
  { text: " " },
  { text: "ABO Incompatibility Risk", bold: true },
  { text: "Severe, potentially fatal agglutination can occur with the FIRST transfusion of ABO-incompatible blood", sub: true },
  { text: "Most common cause: clerical errors β€” wrong patient identification at sample collection or blood administration", sub: true },
], "Source: Bailey & Love's Surgery 28e; Roberts & Hedges' Clinical Procedures in Emergency Medicine");

// ABO Table
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.85, fill: { color: C.midBg } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.35, w: 10, h: 0.275, fill: { color: C.darkBg } });
  s.addText("ABO Blood Group System β€” Antigens, Antibodies & Frequency", { x: 0.3, y: 0.1, w: 9.4, h: 0.65, fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
  const rows = [
    [
      { text: "Phenotype", options: { bold: true, color: C.white, fill: C.darkBg } },
      { text: "Genotype", options: { bold: true, color: C.white, fill: C.darkBg } },
      { text: "Antigens on RBC", options: { bold: true, color: C.white, fill: C.darkBg } },
      { text: "Antibodies in Serum", options: { bold: true, color: C.white, fill: C.darkBg } },
      { text: "Frequency (UK)", options: { bold: true, color: C.white, fill: C.darkBg } },
    ],
    [
      { text: "O", options: { bold: true, fontSize: 15 } },
      { text: "OO", options: { fontSize: 14 } },
      { text: "O", options: { fontSize: 14 } },
      { text: "Anti-A, Anti-B", options: { fontSize: 14, bold: true, color: C.accent } },
      { text: "46%  (Universal Donor)", options: { fontSize: 14, bold: true, color: "2F855A" } },
    ],
    [
      { text: "A", options: { bold: true, fontSize: 15 } },
      { text: "AA or AO", options: { fontSize: 14 } },
      { text: "A", options: { fontSize: 14 } },
      { text: "Anti-B", options: { fontSize: 14, color: C.accent } },
      { text: "42%", options: { fontSize: 14 } },
    ],
    [
      { text: "B", options: { bold: true, fontSize: 15 } },
      { text: "BB or BO", options: { fontSize: 14 } },
      { text: "B", options: { fontSize: 14 } },
      { text: "Anti-A", options: { fontSize: 14, color: C.accent } },
      { text: "9%", options: { fontSize: 14 } },
    ],
    [
      { text: "AB", options: { bold: true, fontSize: 15 } },
      { text: "AB", options: { fontSize: 14 } },
      { text: "A and B", options: { fontSize: 14 } },
      { text: "None", options: { fontSize: 14, bold: true, color: "2F855A" } },
      { text: "3%  (Universal Recipient)", options: { fontSize: 14, bold: true, color: "2F855A" } },
    ],
  ];
  s.addTable(rows, { x: 0.3, y: 0.95, w: 9.4, colW: [1.4, 1.5, 1.9, 2.4, 2.2], fontFace: "Calibri", border: { pt: 1, color: "CCCCCC" }, rowH: 0.7 });
  s.addText("Source: Bailey & Love's Short Practice of Surgery, 28th Edition, Table 2.7", { x: 0.3, y: 5.3, w: 9.4, h: 0.28, fontSize: 10, color: C.white, italic: true, fontFace: "Calibri" });
}

addContent(pres, "The Rhesus (Rh) Blood Group System", [
  { text: "Rh(D) Antigen", bold: true },
  { text: "Strongly antigenic; present in ~85% of the UK population (Rh-positive)", sub: true },
  { text: "Antibodies are NOT naturally present β€” formed only after exposure to Rh+ blood", sub: true },
  { text: " " },
  { text: "Clinical Significance", bold: true },
  { text: "Transfusing Rh+ blood to Rhβˆ’ patient β†’ forms anti-D antibodies", sub: true },
  { text: "Second exposure to Rh antigen β†’ severe haemolytic reaction", sub: true },
  { text: "In pregnancy: maternal anti-D crosses placenta β†’ Haemolytic Disease of the Newborn (HDN) / Hydrops Fetalis", sub: true },
  { text: " " },
  { text: "Other Important Antigen Systems", bold: true },
  { text: "Kell (K/k), Duffy (Fyᡃ/Fyᡇ), Kidd (Jkᡃ/Jkᡇ), MNS systems β€” clinically relevant in patients requiring repeated transfusions (e.g., sickle cell disease)", sub: true },
], "Source: Bailey & Love's Surgery 28e; Roberts & Hedges' Clinical Procedures in Emergency Medicine");

addContent(pres, "Crossmatching β€” Procedure and Types", [
  { text: '"Compatibility testing involves mixing the donor\'s RBCs and serum with the serum and RBCs of the recipient to identify the potential for a transfusion reaction."', sub: true },
  { text: "β€” Roberts & Hedges' Clinical Procedures in Emergency Medicine", sub: true },
  { text: " " },
  { text: "Types of Crossmatch", bold: true },
  { text: "Serological (Full) Crossmatch β€” ~45 minutes. Mixes donor RBCs with recipient serum. Incubated at 37Β°C with antiglobulin reagent. Detects ABO + other antibodies.", sub: true },
  { text: "Type-Specific Blood β€” ABO/Rh matched only; issued within 10–15 minutes in urgent situations", sub: true },
  { text: "Electronic (Computer) Crossmatch β€” Valid when β‰₯2 prior ABO determinations exist and antibody screen is negative", sub: true },
  { text: "Emergency Release (Group O) β€” Oβˆ’ for females of childbearing age; O+ for males. No crossmatch required.", sub: true },
  { text: " " },
  { text: "End-point: Presence of RBC agglutination (gross or microscopic) or haemolysis = INCOMPATIBLE", sub: true },
], "Source: Roberts & Hedges' Clinical Procedures; Henry's Clinical Diagnosis & Management by Laboratory Methods");

// ════════════════════════════════════════════════════════════════
// SECTION 5 β€” RISKS
// ════════════════════════════════════════════════════════════════
addDivider(pres, 5, "Risks of Blood Transfusion", "Acute and delayed reactions, infectious risks and preventive strategies");

addContent(pres, "Classification of Transfusion Reactions", [
  { text: "Transfusion reactions are classified as ACUTE (during or within hours) or DELAYED (>24 hours after transfusion)", sub: true },
  { text: "In 2017, 44 fatal transfusion reactions were reported in the United States (NHSN Hemovigilance Module)", sub: true },
  { text: "Allergic reactions account for ~46.8% of all adverse transfusion reactions", sub: true },
  { text: " " },
  { text: "ACUTE REACTIONS", bold: true },
  { text: "Acute Haemolytic Transfusion Reaction (AHTR) β€” ABO incompatibility β†’ IgM activation β†’ complement-mediated intravascular haemolysis β†’ MOF", sub: true },
  { text: "Febrile Non-Haemolytic Reaction (FNHTR) β€” Graft-vs-host leukocyte response; fever, chills/rigors. Rare with leukodepleted blood.", sub: true },
  { text: "Allergic / Anaphylactic Reaction β€” 1–4% of transfusions. Anaphylaxis <0.1%. Urticaria, bronchospasm, shock.", sub: true },
  { text: "TRALI (Transfusion-Related Acute Lung Injury) β€” Antibodies in donor plasma activate recipient neutrophils β†’ non-cardiogenic pulmonary oedema", sub: true },
  { text: "TACO (Transfusion-Associated Circulatory Overload) β€” Volume overload β†’ pulmonary oedema (risk in elderly, cardiac disease)", sub: true },
], "Source: Tietz Textbook of Laboratory Medicine, 7th Ed., Ch. 93; Bailey & Love's Surgery 28e");

addContent(pres, "Delayed and Infectious Risks", [
  { text: "DELAYED REACTIONS", bold: true },
  { text: "Delayed Haemolytic Transfusion Reaction (DHTR) β€” Anamnestic antibody response to minor antigens, 3–10 days post-transfusion; Coombs-positive haemolysis", sub: true },
  { text: "Transfusion-Associated Graft vs Host Disease (TA-GvHD) β€” Donor T-lymphocytes attack immunocompromised host tissues; often fatal β†’ prevented by irradiation of blood products", sub: true },
  { text: "Post-Transfusion Purpura (PTP) β€” Sudden severe thrombocytopenia 5–12 days post-transfusion; anti-HPA-1a antibodies", sub: true },
  { text: "Iron Overload β€” In chronically transfused patients (thalassaemia, myelodysplasia); requires chelation therapy", sub: true },
  { text: " " },
  { text: "INFECTIOUS RISKS", bold: true },
  { text: "HIV: ~1:1.5 million per unit (modern screened blood)", sub: true },
  { text: "Hepatitis B/C: extremely low with nucleic acid testing (NAT)", sub: true },
  { text: "Bacterial contamination: higher risk with platelets (stored at room temperature)", sub: true },
], "Source: Tietz Textbook of Laboratory Medicine 7e; Bailey & Love's Surgery 28e");

addTwoCol(pres,
  "Prevention of Transfusion Reactions",
  "Pre-Transfusion Safeguards",
  [
    "Correct patient identification at sample collection AND bedside",
    "Two-person verification: patient details vs blood label",
    "Full ABO/Rh typing + antibody screen before every transfusion",
    "Full crossmatch (45 min) when time allows",
    "Leukodepletion of blood products β€” prevents FNHTR and TA-GvHD",
    "Irradiation for immunocompromised patients β€” prevents TA-GvHD",
  ],
  "Management if Reaction Occurs",
  [
    "STOP the transfusion immediately",
    "Keep IV line open with normal saline",
    "Check patient identity and blood product labels",
    "Notify the blood bank β€” return blood bag for testing",
    "Supportive treatment: IV fluids, antihistamines, adrenaline for anaphylaxis",
    "Haemovigilance reporting to NHSN/SHOT",
  ],
  "Source: Bailey & Love's Surgery 28e; Tietz Textbook of Laboratory Medicine 7e"
);

// ════════════════════════════════════════════════════════════════
// SECTION 6 β€” BENEFITS
// ════════════════════════════════════════════════════════════════
addDivider(pres, 6, "Benefits of Blood Transfusion", "Life-saving clinical value and patient blood management");

addContent(pres, "Benefits of Blood Transfusion", [
  { text: "1. Restoration of Oxygen-Carrying Capacity", bold: true },
  { text: "PRBCs provide haemoglobin β†’ restores tissue oxygen delivery in haemorrhage and severe anaemia", sub: true },
  { text: "Critical in trauma, surgical blood loss, and perioperative care", sub: true },
  { text: "2. Reversal of Haemodynamic Instability", bold: true },
  { text: "Rapid restoration of circulating volume in exsanguinating haemorrhage β†’ prevents shock, organ failure and death", sub: true },
  { text: "3. Correction of Coagulopathy", bold: true },
  { text: "FFP restores clotting factors in DIC, liver failure, and massive haemorrhage protocols", sub: true },
  { text: "Platelet transfusion prevents/treats life-threatening bleeding in thrombocytopenia", sub: true },
  { text: "4. Management of Haematological Conditions", bold: true },
  { text: "Exchange transfusion in sickle cell crisis reduces HbS% and prevents end-organ damage", sub: true },
  { text: "Regular transfusions in thalassaemia major prevent chronic hypoxia and cardiac failure", sub: true },
], "Source: Bailey & Love's Surgery 28e; Henry's Clinical Diagnosis & Management; Rosen's Emergency Medicine");

addContent(pres, "Patient Blood Management (PBM) β€” The Modern Approach", [
  { text: "Patient Blood Management (PBM) is an evidence-based, patient-centred strategy to optimise patient outcomes by managing and preserving a patient's own blood.", sub: true },
  { text: " " },
  { text: "Three Pillars of PBM", bold: true },
  { text: "Pillar 1 β€” Optimise red cell mass BEFORE surgery: treat preoperative anaemia with iron, EPO, B12/folate", sub: true },
  { text: "Pillar 2 β€” Minimise blood loss DURING procedure: surgical haemostasis, cell salvage, antifibrinolytics (tranexamic acid)", sub: true },
  { text: "Pillar 3 β€” Optimise tolerance of anaemia AFTER: restrictive transfusion thresholds, volume optimisation, high-flow Oβ‚‚", sub: true },
  { text: " " },
  { text: "A restrictive transfusion strategy (Hb threshold 7–8 g/dL) is associated with lower all-cause mortality and rebleeding vs liberal strategy.", sub: true },
], "Source: Henry's Clinical Diagnosis & Management; Bailey & Love's Surgery 28e; Rosen's Emergency Medicine");

// ════════════════════════════════════════════════════════════════
// FINAL SLIDE β€” SUMMARY
// ════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.darkBg } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0.82, w: 10, h: 0.06, fill: { color: C.accent } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 4.8, w: 10, h: 0.06, fill: { color: C.gold } });
  s.addText("Key Takeaways", { x: 0.5, y: 0.12, w: 9, h: 0.65, fontSize: 32, bold: true, color: C.white, fontFace: "Calibri" });
  const pts = [
    "Blood transfusion = tissue transplant; treat with clinical gravity",
    "Indications: acute blood loss, perioperative & symptomatic chronic anaemia, coagulopathy",
    "Assess patients with FBC, blood grouping, antibody screen, and crossmatch before transfusion",
    "Compatibility testing (ABO/Rh typing + crossmatch) is mandatory to prevent fatal haemolytic reactions",
    "Risks: AHTR, FNHTR, TRALI, TACO, TA-GvHD, infections β€” prevention relies on strict patient ID checks",
    "Benefits: restores Oβ‚‚ delivery, reverses shock, corrects coagulopathy, manages haematological disease",
    "Patient Blood Management: restrict transfusions, optimise alternatives, use restrictive Hb thresholds (7–8 g/dL)",
  ];
  const items = pts.map((p, i) => ({
    text: p,
    options: { bullet: true, fontSize: 15, color: i % 2 === 0 ? C.white : C.gold, breakLine: i < pts.length - 1 }
  }));
  s.addText(items, { x: 0.5, y: 0.95, w: 9, h: 3.75, fontFace: "Calibri", valign: "top" });
  s.addText("References: Bailey & Love's Surgery 28e Β· Roberts & Hedges' Clinical Procedures Β· Henry's Clinical Diagnosis Β· Tietz Textbook of Laboratory Medicine Β· Rosen's Emergency Medicine Β· Pye's Surgical Handicraft 22e", {
    x: 0.4, y: 4.9, w: 9.2, h: 0.6, fontSize: 9.5, color: "718096", italic: true, fontFace: "Calibri"
  });
}

// ─── WRITE FILE ──────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/blood-transfusion-pptx/Blood_Transfusion.pptx" })
  .then(() => console.log("SUCCESS: Blood_Transfusion.pptx created"))
  .catch(e => { console.error("ERROR:", e); process.exit(1); });
!

Failed to create session: unauthorized: authentication failed: Bearer token is invalid

We encountered an error while processing your request. Please try again or reach out to us for help.

βœ‰οΈhi@orris.care
This is a shared conversation. Sign in to Orris to start your own chat.