Create a poster on hd machine mechanism and working

Reading File
Finding Sources
Searching the Web

hemodialysis machine mechanism working principle components

Reading File
Reading File
Searching Images

hemodialysis machine dialyzer circuit diagram

Loading Image
Finding Sources
Reading File
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Running Command

mkdir -p /home/daytona/workspace/hd-poster && ls /home/daytona/workspace/hd-poster/

Writing File

~/hd-poster/create_poster.js

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

// Fetch the Harrison's HD diagram image
const imageUrl = "https://cdn.orris.care/cdss_images/HARRISON_1763034105306_49f4fe97-5014-4506-a5ee-4fa1ce331770.png";
const images = JSON.parse(execSync(
  `node /home/daytona/skills/shared/scripts/fetch_images.js "${imageUrl}"`
).toString());
const hdDiagram = images[0].base64;

const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE"; // 13.3" × 7.5" for poster-style

// ─── COLOR PALETTE ───────────────────────────────────────────────────────────
const C = {
  deepBlue:    "0A1628",   // dominant dark background
  midBlue:     "0D2E5E",   // card backgrounds
  accentBlue:  "1B6CA8",   // section headers
  teal:        "00B4D8",   // accent lines / highlights
  red:         "E63946",   // blood circuit accent
  green:       "2DC653",   // dialysate accent
  white:       "FFFFFF",
  offWhite:    "E8F4FD",
  lightGray:   "B0C4DE",
  yellow:      "FFD700",
};

// ─── SLIDE (POSTER) ──────────────────────────────────────────────────────────
const slide = pres.addSlide();

// Background
slide.addShape(pres.ShapeType.rect, {
  x: 0, y: 0, w: 13.3, h: 7.5,
  fill: { color: C.deepBlue },
  line: { type: "none" },
});

// ── TOP BANNER ───────────────────────────────────────────────────────────────
slide.addShape(pres.ShapeType.rect, {
  x: 0, y: 0, w: 13.3, h: 0.85,
  fill: { color: C.accentBlue },
  line: { type: "none" },
});

// Teal accent bar under banner
slide.addShape(pres.ShapeType.rect, {
  x: 0, y: 0.85, w: 13.3, h: 0.06,
  fill: { color: C.teal },
  line: { type: "none" },
});

// Main Title
slide.addText("HEMODIALYSIS (HD) MACHINE", {
  x: 0.3, y: 0.07, w: 9.5, h: 0.65,
  fontSize: 30, bold: true, color: C.white,
  fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
  charSpacing: 3,
});

// Subtitle badge
slide.addShape(pres.ShapeType.roundRect, {
  x: 9.9, y: 0.12, w: 3.1, h: 0.55,
  fill: { color: C.teal },
  line: { type: "none" },
  rectRadius: 0.1,
});
slide.addText("MECHANISM & WORKING", {
  x: 9.9, y: 0.12, w: 3.1, h: 0.55,
  fontSize: 11, bold: true, color: C.deepBlue,
  fontFace: "Calibri", align: "center", valign: "middle", margin: 0,
});

// ── COLUMN LAYOUT ─────────────────────────────────────────────────────────────
// Col 1: x=0.18  w=3.6
// Col 2 (image): x=4.05  w=5.0
// Col 3: x=9.25  w=3.85

const colY = 1.08; // start Y for content

// ╔═══════════════════════════════════════╗
// ║            LEFT COLUMN                ║
// ╚═══════════════════════════════════════╝

// --- WHAT IS HD? ---
slide.addShape(pres.ShapeType.roundRect, {
  x: 0.18, y: colY, w: 3.6, h: 1.0,
  fill: { color: C.midBlue },
  line: { color: C.teal, pt: 1.5 },
  rectRadius: 0.12,
});
slide.addText("🔬  WHAT IS HEMODIALYSIS?", {
  x: 0.28, y: colY + 0.04, w: 3.4, h: 0.32,
  fontSize: 10.5, bold: true, color: C.teal,
  fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
slide.addText(
  "Hemodialysis substitutes a synthetic filter (dialyzer) for the failed glomerulus. " +
  "Blood is continuously cleansed of uremic toxins, excess fluid, and electrolytes outside " +
  "the body — typically 3 sessions/week, 3–4 hours each.",
  {
    x: 0.28, y: colY + 0.34, w: 3.4, h: 0.6,
    fontSize: 8.5, color: C.offWhite,
    fontFace: "Calibri", align: "left", valign: "top", margin: 0,
  }
);

// --- BLOOD CIRCUIT ---
const bY = colY + 1.14;
slide.addShape(pres.ShapeType.roundRect, {
  x: 0.18, y: bY, w: 3.6, h: 1.68,
  fill: { color: C.midBlue },
  line: { color: C.red, pt: 1.5 },
  rectRadius: 0.12,
});

// Red accent bar on left edge
slide.addShape(pres.ShapeType.rect, {
  x: 0.18, y: bY + 0.02, w: 0.06, h: 1.64,
  fill: { color: C.red },
  line: { type: "none" },
});

slide.addText("🩸  BLOOD (EXTRACORPOREAL) CIRCUIT", {
  x: 0.32, y: bY + 0.07, w: 3.3, h: 0.28,
  fontSize: 10, bold: true, color: C.red,
  fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
slide.addText([
  { text: "Arterial line: ", options: { bold: true, color: C.lightGray } },
  { text: "Blood drawn via vascular access (AVF/graft/catheter)\n", options: { color: C.offWhite } },
  { text: "Blood pump: ", options: { bold: true, color: C.lightGray } },
  { text: "Roller pump drives blood at 300–500 mL/min\n", options: { color: C.offWhite } },
  { text: "Dialyzer: ", options: { bold: true, color: C.lightGray } },
  { text: "Hollow-fiber semipermeable membrane (filter)\n", options: { color: C.offWhite } },
  { text: "Heparin pump: ", options: { bold: true, color: C.lightGray } },
  { text: "Anticoagulation prevents clotting in circuit\n", options: { color: C.offWhite } },
  { text: "Air trap/detector: ", options: { bold: true, color: C.lightGray } },
  { text: "Venous chamber traps air bubbles before return", options: { color: C.offWhite } },
], {
  x: 0.32, y: bY + 0.36, w: 3.3, h: 1.24,
  fontSize: 8, fontFace: "Calibri",
  align: "left", valign: "top", margin: 0,
});

// --- DIALYSIS PRINCIPLES ---
const pY = bY + 1.82;
slide.addShape(pres.ShapeType.roundRect, {
  x: 0.18, y: pY, w: 3.6, h: 1.72,
  fill: { color: C.midBlue },
  line: { color: C.yellow, pt: 1.5 },
  rectRadius: 0.12,
});
slide.addShape(pres.ShapeType.rect, {
  x: 0.18, y: pY + 0.02, w: 0.06, h: 1.68,
  fill: { color: C.yellow },
  line: { type: "none" },
});
slide.addText("⚡  PRINCIPLES OF SOLUTE REMOVAL", {
  x: 0.32, y: pY + 0.07, w: 3.3, h: 0.28,
  fontSize: 10, bold: true, color: C.yellow,
  fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
slide.addText([
  { text: "DIFFUSION\n", options: { bold: true, color: C.yellow } },
  { text: "Small solutes (urea, creatinine, K⁺) move down concentration gradient across membrane.\n\n", options: { color: C.offWhite } },
  { text: "ULTRAFILTRATION\n", options: { bold: true, color: C.yellow } },
  { text: "Hydrostatic pressure drives fluid removal (controls edema).\n\n", options: { color: C.offWhite } },
  { text: "CONVECTION\n", options: { bold: true, color: C.yellow } },
  { text: "Solutes dragged with fluid flow ('solute drag') — important in high-flux dialysis.", options: { color: C.offWhite } },
], {
  x: 0.32, y: pY + 0.36, w: 3.3, h: 1.28,
  fontSize: 8, fontFace: "Calibri",
  align: "left", valign: "top", margin: 0,
});

// ╔═══════════════════════════════════════╗
// ║           CENTER: DIAGRAM             ║
// ╚═══════════════════════════════════════╝

// Image container background
slide.addShape(pres.ShapeType.roundRect, {
  x: 4.02, y: colY, w: 5.06, h: 3.4,
  fill: { color: "FFFFFF" },
  line: { color: C.teal, pt: 2 },
  rectRadius: 0.15,
});

slide.addImage({
  data: hdDiagram,
  x: 4.1, y: colY + 0.08, w: 4.9, h: 3.22,
  sizing: { type: "contain", w: 4.9, h: 3.22 },
});

slide.addText("Fig. Harrison's Principles of Internal Medicine – HD Schema", {
  x: 4.02, y: colY + 3.28, w: 5.06, h: 0.22,
  fontSize: 7, italic: true, color: C.lightGray,
  fontFace: "Calibri", align: "center", valign: "middle", margin: 0,
});

// --- STEP-BY-STEP FLOW below diagram ---
const stepY = colY + 3.58;
slide.addShape(pres.ShapeType.roundRect, {
  x: 4.02, y: stepY, w: 5.06, h: 2.5,
  fill: { color: C.midBlue },
  line: { color: C.accentBlue, pt: 1.2 },
  rectRadius: 0.12,
});
slide.addText("📋  STEP-BY-STEP WORKING", {
  x: 4.15, y: stepY + 0.06, w: 4.8, h: 0.28,
  fontSize: 10.5, bold: true, color: C.teal,
  fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});

const steps = [
  ["①", "Patient connected via vascular access (AVF / graft / catheter)"],
  ["②", "Blood pump draws blood at 300–500 mL/min into arterial line"],
  ["③", "Blood flows through hollow-fiber dialyzer (artificial kidney)"],
  ["④", "Dialysate flows counter-current at 500–800 mL/min on opposite side"],
  ["⑤", "Waste (urea, creatinine, K⁺, phosphate) diffuse across membrane"],
  ["⑥", "Excess fluid removed by controlled ultrafiltration pressure"],
  ["⑦", "Cleaned blood returns via venous line through air detector"],
  ["⑧", "Monitors alarm for pressure changes, blood leaks, air embolism"],
];
const stX = 4.15, stW = 4.8;
steps.forEach((s, i) => {
  const sy = stepY + 0.38 + i * 0.255;
  slide.addText([
    { text: s[0] + "  ", options: { bold: true, color: C.teal } },
    { text: s[1], options: { color: C.offWhite } },
  ], {
    x: stX, y: sy, w: stW, h: 0.24,
    fontSize: 8, fontFace: "Calibri",
    align: "left", valign: "middle", margin: 0,
  });
});

// ╔═══════════════════════════════════════╗
// ║           RIGHT COLUMN               ║
// ╚═══════════════════════════════════════╝

const rX = 9.28;

// --- DIALYSATE CIRCUIT ---
slide.addShape(pres.ShapeType.roundRect, {
  x: rX, y: colY, w: 3.85, h: 1.72,
  fill: { color: C.midBlue },
  line: { color: C.green, pt: 1.5 },
  rectRadius: 0.12,
});
slide.addShape(pres.ShapeType.rect, {
  x: rX, y: colY + 0.02, w: 0.06, h: 1.68,
  fill: { color: C.green },
  line: { type: "none" },
});
slide.addText("💧  DIALYSATE CIRCUIT", {
  x: rX + 0.14, y: colY + 0.07, w: 3.6, h: 0.28,
  fontSize: 10.5, bold: true, color: C.green,
  fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
slide.addText([
  { text: "Water treatment: ", options: { bold: true, color: C.lightGray } },
  { text: "Deionization + reverse osmosis\n", options: { color: C.offWhite } },
  { text: "Acid concentrate: ", options: { bold: true, color: C.lightGray } },
  { text: "Na⁺, K⁺, Ca²⁺, Mg²⁺, Cl⁻, acetate\n", options: { color: C.offWhite } },
  { text: "Bicarbonate: ", options: { bold: true, color: C.lightGray } },
  { text: "NaHCO₃/NaCl corrects acidosis\n", options: { color: C.offWhite } },
  { text: "Flow direction: ", options: { bold: true, color: C.lightGray } },
  { text: "Counter-current to blood (maximises gradient)\n", options: { color: C.offWhite } },
  { text: "Flow rate: ", options: { bold: true, color: C.lightGray } },
  { text: "500–800 mL/min; used dialysate drained away", options: { color: C.offWhite } },
], {
  x: rX + 0.14, y: colY + 0.38, w: 3.6, h: 1.26,
  fontSize: 8, fontFace: "Calibri",
  align: "left", valign: "top", margin: 0,
});

// --- DIALYZER (ARTIFICIAL KIDNEY) ---
const dY = colY + 1.86;
slide.addShape(pres.ShapeType.roundRect, {
  x: rX, y: dY, w: 3.85, h: 1.72,
  fill: { color: C.midBlue },
  line: { color: C.teal, pt: 1.5 },
  rectRadius: 0.12,
});
slide.addShape(pres.ShapeType.rect, {
  x: rX, y: dY + 0.02, w: 0.06, h: 1.68,
  fill: { color: C.teal },
  line: { type: "none" },
});
slide.addText("🫘  THE DIALYZER (ARTIFICIAL KIDNEY)", {
  x: rX + 0.14, y: dY + 0.07, w: 3.6, h: 0.28,
  fontSize: 10, bold: true, color: C.teal,
  fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
slide.addText([
  { text: "Structure: ", options: { bold: true, color: C.lightGray } },
  { text: "Thousands of hollow polysulfone/polyamide fibers\n", options: { color: C.offWhite } },
  { text: "Surface area: ", options: { bold: true, color: C.lightGray } },
  { text: "0.8–2.1 m² of semipermeable membrane\n", options: { color: C.offWhite } },
  { text: "Pore size: ", options: { bold: true, color: C.lightGray } },
  { text: "Allows passage of small solutes; blocks proteins & blood cells\n", options: { color: C.offWhite } },
  { text: "High-flux: ", options: { bold: true, color: C.lightGray } },
  { text: "Larger pores remove middle molecules (β₂-microglobulin)\n", options: { color: C.offWhite } },
  { text: "Configuration: ", options: { bold: true, color: C.lightGray } },
  { text: "Blood inside fibers; dialysate outside — maximises exchange", options: { color: C.offWhite } },
], {
  x: rX + 0.14, y: dY + 0.38, w: 3.6, h: 1.26,
  fontSize: 8, fontFace: "Calibri",
  align: "left", valign: "top", margin: 0,
});

// --- MONITORING & SAFETY ---
const mY = dY + 1.86;
slide.addShape(pres.ShapeType.roundRect, {
  x: rX, y: mY, w: 3.85, h: 1.84,
  fill: { color: C.midBlue },
  line: { color: C.yellow, pt: 1.5 },
  rectRadius: 0.12,
});
slide.addShape(pres.ShapeType.rect, {
  x: rX, y: mY + 0.02, w: 0.06, h: 1.8,
  fill: { color: C.yellow },
  line: { type: "none" },
});
slide.addText("🛡️  MONITORING & SAFETY SYSTEMS", {
  x: rX + 0.14, y: mY + 0.07, w: 3.6, h: 0.28,
  fontSize: 10, bold: true, color: C.yellow,
  fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
slide.addText([
  { text: "Arterial & venous pressure: ", options: { bold: true, color: C.lightGray } },
  { text: "Detects access failure or clotting\n", options: { color: C.offWhite } },
  { text: "Blood flow rate: ", options: { bold: true, color: C.lightGray } },
  { text: "Measured continuously via roller pump\n", options: { color: C.offWhite } },
  { text: "Air (embolism) detector: ", options: { bold: true, color: C.lightGray } },
  { text: "Ultrasonic — stops pump if air detected\n", options: { color: C.offWhite } },
  { text: "Blood leak detector: ", options: { bold: true, color: C.lightGray } },
  { text: "Optical sensor on dialysate outflow\n", options: { color: C.offWhite } },
  { text: "Conductivity monitor: ", options: { bold: true, color: C.lightGray } },
  { text: "Ensures correct dialysate composition\n", options: { color: C.offWhite } },
  { text: "Temperature: ", options: { bold: true, color: C.lightGray } },
  { text: "Maintained at 35–37 °C; deviations trigger alarms", options: { color: C.offWhite } },
], {
  x: rX + 0.14, y: mY + 0.38, w: 3.6, h: 1.38,
  fontSize: 8, fontFace: "Calibri",
  align: "left", valign: "top", margin: 0,
});

// ── BOTTOM FOOTER ────────────────────────────────────────────────────────────
slide.addShape(pres.ShapeType.rect, {
  x: 0, y: 7.28, w: 13.3, h: 0.04,
  fill: { color: C.teal },
  line: { type: "none" },
});
slide.addShape(pres.ShapeType.rect, {
  x: 0, y: 7.32, w: 13.3, h: 0.18,
  fill: { color: C.midBlue },
  line: { type: "none" },
});
slide.addText(
  "Sources: Harrison's Principles of Internal Medicine 21e | Brenner & Rector's The Kidney | Tintinalli's Emergency Medicine | Campbell-Walsh-Wein Urology",
  {
    x: 0.2, y: 7.31, w: 13.0, h: 0.18,
    fontSize: 6.5, italic: true, color: C.lightGray,
    fontFace: "Calibri", align: "center", valign: "middle", margin: 0,
  }
);

// ── VASCULAR ACCESS KEY BOX (below blood circuit title area) ─────────────────
// Already well-covered in step-by-step; add a quick dialysis dose tag
slide.addShape(pres.ShapeType.roundRect, {
  x: 0.18, y: 6.5, w: 3.6, h: 0.65,
  fill: { color: "0D2E5E" },
  line: { color: C.accentBlue, pt: 1 },
  rectRadius: 0.1,
});
slide.addText([
  { text: "Dialysis Dose: ", options: { bold: true, color: C.teal } },
  { text: "Kt/V ≥ 1.2 per session (urea kinetic modelling)\n", options: { color: C.offWhite } },
  { text: "Access types: ", options: { bold: true, color: C.teal } },
  { text: "AVF (preferred) • AVG • Tunnelled CVC", options: { color: C.offWhite } },
], {
  x: 0.28, y: 6.5, w: 3.4, h: 0.65,
  fontSize: 8, fontFace: "Calibri",
  align: "left", valign: "middle", margin: 0,
});

pres.writeFile({ fileName: "/home/daytona/workspace/hd-poster/HD_Machine_Mechanism_Poster.pptx" });
console.log("Poster created successfully!");
Running Command

cd /home/daytona/workspace/hd-poster && node create_poster.js 2>&1

Running Command

ls -lh /home/daytona/workspace/hd-poster/

The poster is ready! Here's your download link:

HD Machine Mechanism Poster

Presentation · PPTX


What's on the poster

A single wide-format poster (13.3" × 7.5") with a deep navy/blue theme, color-coded by circuit, covering:
SectionColorContent
What is HD?TealDefinition, indication, session frequency
Blood (Extracorporeal) CircuitRedArterial line, roller pump, dialyzer, heparin pump, venous air trap
Dialysis PrinciplesGoldDiffusion, Ultrafiltration, Convection
Center DiagramHarrison's official HD schema (hollow-fiber dialyzer, blood/dialysate circuits, delivery system)
Step-by-Step WorkingTeal8-step numbered workflow from access to return
Dialysate CircuitGreenWater treatment, acid concentrate, bicarbonate, counter-current flow
Dialyzer (Artificial Kidney)TealHollow fiber structure, surface area, pore size, high-flux
Monitoring & SafetyGoldPressure, blood flow, air detector, blood leak, conductivity, temperature alarms
Dialysis Dose & AccessBlueKt/V ≥ 1.2, AVF / AVG / CVC access types
Sources: Harrison's 21e, Brenner & Rector's The Kidney, Tintinalli's Emergency Medicine, Campbell-Walsh-Wein Urology.
This is a shared conversation. Sign in to Orris to start your own chat.