You are the world best researcher and professor.create a poster on myasthenia gravis with each and every detail of it .use ost of the image that you can. Create the best image

Reading File
Finding Sources
Searching Images

myasthenia gravis ptosis eye clinical features

Reading File
Reading File
Reading File
Searching Images

myasthenia gravis neuromuscular junction acetylcholine receptor antibody mechanism

Searching Images

myasthenia gravis thymoma thymus treatment

Reading File
Searching Images

myasthenia gravis repetitive nerve stimulation EMG electromyography decremental response

Searching Images

myasthenia crisis respiratory failure treatment plasmapheresis IVIG

Reading File
Reading File
Reading File
Running Command

mkdir -p /home/daytona/workspace/myasthenia-gravis-poster && ls /home/daytona/wo…

Writing File

~/myasthenia-gravis-poster/create_poster.js

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

// Fetch images as base64
const imageUrls = [
  "https://cdn.orris.care/cdss_images/HARRISON_1763033384033_a1f3a029-5aec-44f7-85a4-7cdec696813f.png",   // NMJ mechanism
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_63cb7f12100acbeb8c84f4587750e42cebcc2d33915f89ed226f80601c712cea.jpg", // ptosis neostigmine test
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_796dce2b573ef3107e64d460af9e1cd1d022687ed10e35c75ebd360382b98185.jpg", // Tensilon test
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_cedbaa18f8175d14b309b81fa399f0f6adf5219f94aeaafeeeb8f028e7d1dc14.jpg", // ice test
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_54b01b451fdabf2fcae72519d6a4e3118d1f41eaf67a11e64088ae89327448e0.jpg", // CT thymoma
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_557ec37e14754eb5ae0ff9ba12dff47786c88b92607a2b207ee1afc482901b9a.jpg", // triad ptosis+EMG+CT
  "https://cdn.orris.care/cdss_images/161d2e684dac08cd3fba76c844a979743702f8843cf5a309421236c48f24eea6.png",         // ocular motility fig
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_76b6e88d785749b46c07b7aafda9932c59b3052bd272dca4b7c7f1c8f05c32a6.jpg"   // IVIG treatment
];

console.log("Fetching images...");
let images;
try {
  const result = execSync(
    `node /home/daytona/skills/shared/scripts/fetch_images.js ${imageUrls.map(u => `"${u}"`).join(" ")}`,
    { maxBuffer: 100 * 1024 * 1024, timeout: 60000 }
  ).toString();
  images = JSON.parse(result);
  console.log("Images fetched:", images.map(i => i.error ? "ERROR: " + i.error : "OK").join(", "));
} catch(e) {
  console.error("Image fetch error:", e.message);
  images = imageUrls.map(url => ({ url, base64: null, error: e.message }));
}

// Helper: get base64 or null
function img(idx) {
  return images[idx] && !images[idx].error ? images[idx].base64 : null;
}

const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE"; // 13.3" x 7.5" — poster format
pres.title = "Myasthenia Gravis – Comprehensive Medical Poster";

// =====================================================================
// SLIDE 1: TITLE / HERO BANNER
// =====================================================================
let s1 = pres.addSlide();

// Deep navy background
s1.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: "0A1628" } });

// Accent stripe top
s1.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 0.18, fill: { color: "00B4D8" } });
// Accent stripe bottom
s1.addShape(pres.shapes.RECTANGLE, { x: 0, y: 7.32, w: 13.3, h: 0.18, fill: { color: "00B4D8" } });

// Decorative left panel
s1.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.18, w: 0.12, h: 7.14, fill: { color: "0077B6" } });

// Molecular decoration circle (brain/neuro aesthetic)
s1.addShape(pres.shapes.OVAL, { x: 9.5, y: -1.0, w: 6, h: 6, fill: { color: "0077B6", transparency: 85 }, line: { color: "00B4D8", width: 1, transparency: 60 } });
s1.addShape(pres.shapes.OVAL, { x: 10.5, y: 2.0, w: 4, h: 4, fill: { color: "023E8A", transparency: 80 }, line: { color: "48CAE4", width: 1, transparency: 50 } });

// Title
s1.addText("MYASTHENIA GRAVIS", {
  x: 0.5, y: 1.5, w: 12, h: 1.4,
  fontSize: 62, bold: true, color: "FFFFFF",
  fontFace: "Calibri", align: "center",
  charSpacing: 8,
  glow: { size: 15, opacity: 0.4, color: "00B4D8" }
});

// Subtitle
s1.addText("A Comprehensive Clinical Overview", {
  x: 0.5, y: 3.05, w: 12, h: 0.6,
  fontSize: 22, color: "90E0EF", fontFace: "Calibri Light", align: "center", italic: true
});

// Decorative line
s1.addShape(pres.shapes.RECTANGLE, { x: 3.5, y: 3.72, w: 6.3, h: 0.04, fill: { color: "00B4D8" } });

// Tagline
s1.addText('"The Most Common Primary Disorder of Neuromuscular Transmission"', {
  x: 0.5, y: 3.9, w: 12, h: 0.55,
  fontSize: 14, color: "CAF0F8", fontFace: "Calibri", align: "center", italic: true
});

// Key stats boxes
const statBoxes = [
  { val: "20/100,000", label: "US Prevalence", x: 1.3 },
  { val: "3:1", label: "Female:Male\n(under 40)", x: 4.1 },
  { val: "85%", label: "Ocular Onset", x: 6.9 },
  { val: "10–15%", label: "Thymoma\nAssociation", x: 9.7 },
];

statBoxes.forEach(b => {
  s1.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x: b.x, y: 4.7, w: 2.4, h: 1.8,
    fill: { color: "0077B6", transparency: 30 },
    line: { color: "00B4D8", width: 1.5 },
    rectRadius: 0.12
  });
  s1.addText(b.val, {
    x: b.x + 0.05, y: 4.78, w: 2.3, h: 0.7,
    fontSize: 24, bold: true, color: "00B4D8", align: "center"
  });
  s1.addText(b.label, {
    x: b.x + 0.05, y: 5.5, w: 2.3, h: 0.8,
    fontSize: 11, color: "ADE8F4", align: "center", valign: "top"
  });
});

// Source
s1.addText("Source: Bradley & Daroff's Neurology in Clinical Practice | Harrison's Principles of Internal Medicine", {
  x: 0.5, y: 7.1, w: 12.3, h: 0.25, fontSize: 9, color: "4895EF", align: "center"
});

// =====================================================================
// SLIDE 2: PATHOPHYSIOLOGY
// =====================================================================
let s2 = pres.addSlide();
s2.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: "06101E" } });
s2.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 0.55, fill: { color: "0077B6" } });
s2.addShape(pres.shapes.RECTANGLE, { x: 0, y: 7.3, w: 13.3, h: 0.2, fill: { color: "0077B6" } });

s2.addText("PATHOPHYSIOLOGY", {
  x: 0.2, y: 0.08, w: 8, h: 0.4,
  fontSize: 20, bold: true, color: "FFFFFF", fontFace: "Calibri", charSpacing: 4
});
s2.addText("SLIDE 2 / 6", {
  x: 11.3, y: 0.1, w: 1.8, h: 0.35,
  fontSize: 10, color: "ADE8F4", align: "right"
});

// Left: NMJ mechanism image
if (img(0)) {
  s2.addImage({ data: img(0), x: 0.2, y: 0.7, w: 5.2, h: 4.0 });
}
s2.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 4.7, w: 5.2, h: 0.38, fill: { color: "023E8A" } });
s2.addText("Neuromuscular Junction: ACh Release & Autoimmune Attack", {
  x: 0.2, y: 4.72, w: 5.2, h: 0.34, fontSize: 9, color: "CAF0F8", align: "center"
});

// Right: Mechanism text
const mechItems = [
  { title: "Autoantibody Targets", body: "• Anti-AChR antibodies: ~85% of patients\n• Anti-MuSK antibodies: ~6–12% (AChR-negative)\n• Anti-LRP4 antibodies: ~2–4%\n• Seronegative MG: ~6–12%" },
  { title: "Mechanism of AChR Damage", body: "• Antibody-mediated degradation of AChR\n• Complement-mediated destruction of postsynaptic membrane\n• Functional blockade of AChR binding sites\n• Simplified folds & reduced surface area at motor end plate" },
  { title: "Thymic Role", body: "• Thymic hyperplasia: ~65% of early-onset MG\n• Thymoma: ~10–15% of all MG patients\n• Thymus produces autoreactive T cells\n• Aberrant AChR-like antigen (EAMG model)" },
  { title: "End Result", body: "• Fewer functional AChRs at NMJ\n• Reduced EPSP amplitude\n• Failure to reach action potential threshold\n• Fatigable, fluctuating muscle weakness" },
];

mechItems.forEach((item, i) => {
  const y = 0.68 + i * 1.55;
  s2.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x: 5.7, y: y, w: 7.4, h: 1.45,
    fill: { color: "0D2137", transparency: 0 },
    line: { color: "0096C7", width: 1.2 },
    rectRadius: 0.1
  });
  s2.addShape(pres.shapes.RECTANGLE, { x: 5.7, y: y, w: 0.08, h: 1.45, fill: { color: "00B4D8" } });
  s2.addText(item.title, {
    x: 5.9, y: y + 0.06, w: 7.1, h: 0.3,
    fontSize: 13, bold: true, color: "00B4D8", fontFace: "Calibri"
  });
  s2.addText(item.body, {
    x: 5.9, y: y + 0.38, w: 7.1, h: 1.0,
    fontSize: 10.5, color: "D0E8F2", fontFace: "Calibri", valign: "top"
  });
});

// =====================================================================
// SLIDE 3: CLINICAL FEATURES
// =====================================================================
let s3 = pres.addSlide();
s3.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: "06101E" } });
s3.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 0.55, fill: { color: "0077B6" } });
s3.addShape(pres.shapes.RECTANGLE, { x: 0, y: 7.3, w: 13.3, h: 0.2, fill: { color: "0077B6" } });
s3.addText("CLINICAL FEATURES & SUBTYPES", {
  x: 0.2, y: 0.08, w: 10, h: 0.4,
  fontSize: 20, bold: true, color: "FFFFFF", charSpacing: 4
});
s3.addText("SLIDE 3 / 6", { x: 11.3, y: 0.1, w: 1.8, h: 0.35, fontSize: 10, color: "ADE8F4", align: "right" });

// Three clinical images
if (img(1)) { // ptosis neostigmine
  s3.addImage({ data: img(1), x: 0.2, y: 0.65, w: 4.0, h: 2.6 });
  s3.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 3.25, w: 4.0, h: 0.4, fill: { color: "023E8A" } });
  s3.addText("Bilateral Ptosis — Neostigmine Test Response", {
    x: 0.2, y: 3.27, w: 4.0, h: 0.36, fontSize: 9, color: "CAF0F8", align: "center"
  });
}

if (img(2)) { // tensilon test
  s3.addImage({ data: img(2), x: 4.45, y: 0.65, w: 4.0, h: 2.6 });
  s3.addShape(pres.shapes.RECTANGLE, { x: 4.45, y: 3.25, w: 4.0, h: 0.4, fill: { color: "023E8A" } });
  s3.addText("Tensilon (Edrophonium) Test — Before & After", {
    x: 4.45, y: 3.27, w: 4.0, h: 0.36, fontSize: 9, color: "CAF0F8", align: "center"
  });
}

if (img(6)) { // ocular motility
  s3.addImage({ data: img(6), x: 8.7, y: 0.65, w: 4.4, h: 2.6 });
  s3.addShape(pres.shapes.RECTANGLE, { x: 8.7, y: 3.25, w: 4.4, h: 0.4, fill: { color: "023E8A" } });
  s3.addText("Ocular Motility Abnormalities — Multiple Muscle Involvement", {
    x: 8.7, y: 3.27, w: 4.4, h: 0.36, fontSize: 9, color: "CAF0F8", align: "center"
  });
}

// Bottom section: symptoms grid
const symCategories = [
  {
    icon: "👁", cat: "Ocular (85%)", color: "0096C7",
    items: ["Ptosis — often asymmetric", "Diplopia — varies with direction", "Fatigable ocular palsy", "Lid twitch on upgaze", "\"Curtain sign\""]
  },
  {
    icon: "🗣", cat: "Bulbar (30%)", color: "0096C7",
    items: ["Dysarthria — nasal voice", "Dysphagia — aspiration risk", "Jaw fatigue during chewing", "Facial weakness", "Palatal weakness"]
  },
  {
    icon: "💪", cat: "Limb/Neck (10%)", color: "0096C7",
    items: ["Proximal limb weakness", "Neck extensors (\"dropped head\")", "Respiratory muscle weakness", "Finger/ankle extensors", "Hip flexor weakness"]
  },
  {
    icon: "⚡", cat: "Key Features", color: "E63946",
    items: ["Worsens with activity, rest improves", "Least severe in morning", "Worse in heat/sunlight", "Exacerbated by illness/stress", "No sensory loss or reflex change"]
  },
];

symCategories.forEach((cat, i) => {
  const x = 0.2 + i * 3.27;
  s3.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x, y: 3.75, w: 3.1, h: 3.55,
    fill: { color: "0D2137" }, line: { color: cat.color, width: 1.5 }, rectRadius: 0.1
  });
  s3.addShape(pres.shapes.RECTANGLE, { x, y: 3.75, w: 3.1, h: 0.45, fill: { color: cat.color } });
  s3.addText(cat.cat, {
    x: x + 0.05, y: 3.78, w: 3.0, h: 0.38, fontSize: 12, bold: true, color: "FFFFFF", align: "center"
  });
  cat.items.forEach((item, j) => {
    s3.addText("• " + item, {
      x: x + 0.12, y: 4.27 + j * 0.55, w: 2.88, h: 0.5,
      fontSize: 10, color: "D0E8F2", valign: "top"
    });
  });
});

// =====================================================================
// SLIDE 4: DIAGNOSIS
// =====================================================================
let s4 = pres.addSlide();
s4.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: "06101E" } });
s4.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 0.55, fill: { color: "0077B6" } });
s4.addShape(pres.shapes.RECTANGLE, { x: 0, y: 7.3, w: 13.3, h: 0.2, fill: { color: "0077B6" } });
s4.addText("DIAGNOSIS", {
  x: 0.2, y: 0.08, w: 8, h: 0.4,
  fontSize: 20, bold: true, color: "FFFFFF", charSpacing: 4
});
s4.addText("SLIDE 4 / 6", { x: 11.3, y: 0.1, w: 1.8, h: 0.35, fontSize: 10, color: "ADE8F4", align: "right" });

// Left column: ice test image + triad image
if (img(3)) { // ice test
  s4.addImage({ data: img(3), x: 0.2, y: 0.65, w: 4.8, h: 2.7 });
  s4.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 3.35, w: 4.8, h: 0.38, fill: { color: "023E8A" } });
  s4.addText("Ice Pack Test — Variability of Positive Response in Ptosis", {
    x: 0.2, y: 3.37, w: 4.8, h: 0.34, fontSize: 9, color: "CAF0F8", align: "center"
  });
}

if (img(5)) { // triad ptosis+EMG+CT
  s4.addImage({ data: img(5), x: 0.2, y: 3.85, w: 4.8, h: 3.15 });
  s4.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 7.0, w: 4.8, h: 0.28, fill: { color: "023E8A" } });
  s4.addText("Diagnostic Triad: Ptosis + RNS Decremental + Thymic CT", {
    x: 0.2, y: 7.02, w: 4.8, h: 0.24, fontSize: 9, color: "CAF0F8", align: "center"
  });
}

// Right column: diagnosis steps
const diagSteps = [
  {
    step: "1", title: "Clinical Assessment", color: "0096C7",
    body: "• Characteristic fluctuating, fatigable weakness\n• Pattern: ocular > bulbar > limb\n• Worsens with activity, improves with rest\n• Simpson test, sustained upgaze, counting/chewing fatigue"
  },
  {
    step: "2", title: "Pharmacological Tests", color: "0096C7",
    body: "• Edrophonium (Tensilon) test: short-acting AChE inhibitor\n• Neostigmine test: 1–1.5 mg IM; more reliable\n• Ice Pack Test: cold inhibits AChE → improves ptosis\n• Sensitivity: ~80–90% for generalized MG"
  },
  {
    step: "3", title: "Serological Tests", color: "23D18B",
    body: "• Anti-AChR Ab: 85% sensitivity (40–50% ocular MG)\n• Anti-MuSK Ab: 40–50% AChR-negative GMG\n• Anti-LRP4 Ab, anti-agrin Ab (newer markers)\n• Anti-striated muscle Ab (titin, RyR): 30% GMG"
  },
  {
    step: "4", title: "Electrodiagnosis", color: "23D18B",
    body: "• Repetitive Nerve Stimulation (RNS): ≥10% decrement\n• Single-Fiber EMG (SFEMG): increased jitter (gold standard)\n• SFEMG sensitivity: >95% for any MG\n• Abnormal NMT confirmed in affected muscles"
  },
  {
    step: "5", title: "Imaging", color: "E63946",
    body: "• CT/MRI chest: mandatory to detect thymoma\n• Thymic hyperplasia vs thymoma vs atrophy\n• PET-CT if recurrence suspected post-thymectomy"
  },
];

diagSteps.forEach((step, i) => {
  const y = 0.68 + i * 1.28;
  s4.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x: 5.25, y, w: 7.85, h: 1.2,
    fill: { color: "0D2137" }, line: { color: step.color, width: 1.2 }, rectRadius: 0.1
  });
  s4.addShape(pres.shapes.OVAL, {
    x: 5.3, y: y + 0.25, w: 0.55, h: 0.55,
    fill: { color: step.color }
  });
  s4.addText(step.step, {
    x: 5.3, y: y + 0.27, w: 0.55, h: 0.5, fontSize: 13, bold: true, color: "FFFFFF", align: "center"
  });
  s4.addText(step.title, {
    x: 6.0, y: y + 0.06, w: 6.9, h: 0.3, fontSize: 12, bold: true, color: step.color
  });
  s4.addText(step.body, {
    x: 6.0, y: y + 0.38, w: 6.9, h: 0.78, fontSize: 9.5, color: "D0E8F2", valign: "top"
  });
});

// =====================================================================
// SLIDE 5: CLASSIFICATION & TREATMENT
// =====================================================================
let s5 = pres.addSlide();
s5.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: "06101E" } });
s5.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 0.55, fill: { color: "0077B6" } });
s5.addShape(pres.shapes.RECTANGLE, { x: 0, y: 7.3, w: 13.3, h: 0.2, fill: { color: "0077B6" } });
s5.addText("CLASSIFICATION & TREATMENT", {
  x: 0.2, y: 0.08, w: 10, h: 0.4, fontSize: 20, bold: true, color: "FFFFFF", charSpacing: 4
});
s5.addText("SLIDE 5 / 6", { x: 11.3, y: 0.1, w: 1.8, h: 0.35, fontSize: 10, color: "ADE8F4", align: "right" });

// MGFA Classification table
s5.addText("MGFA CLASSIFICATION", {
  x: 0.2, y: 0.65, w: 5.5, h: 0.35, fontSize: 13, bold: true, color: "00B4D8"
});

const mgfaRows = [
  ["Class I", "Ocular muscle weakness only; no other weakness"],
  ["Class IIa", "Mild generalized weakness — predominantly limb/axial"],
  ["Class IIb", "Mild generalized weakness — predominantly oropharyngeal"],
  ["Class IIIa", "Moderate generalized — predominantly limb/axial"],
  ["Class IIIb", "Moderate generalized — predominantly oropharyngeal"],
  ["Class IVa", "Severe generalized — predominantly limb/axial"],
  ["Class IVb", "Severe generalized — predominantly oropharyngeal"],
  ["Class V", "Intubation required (Myasthenic Crisis)"],
];

mgfaRows.forEach((row, i) => {
  const y = 1.07 + i * 0.45;
  const bg = i % 2 === 0 ? "0D2137" : "091725";
  s5.addShape(pres.shapes.RECTANGLE, { x: 0.2, y, w: 5.5, h: 0.43, fill: { color: bg } });
  const clr = row[0].includes("V") ? "E63946" : row[0].includes("IV") ? "F4A261" : row[0].includes("III") ? "E9C46A" : "23D18B";
  s5.addText(row[0], { x: 0.22, y: y + 0.05, w: 1.2, h: 0.33, fontSize: 10, bold: true, color: clr });
  s5.addText(row[1], { x: 1.5, y: y + 0.05, w: 4.1, h: 0.33, fontSize: 10, color: "D0E8F2" });
});

// Treatment columns
const treatments = [
  {
    title: "Symptomatic", color: "23D18B", x: 5.95,
    items: [
      "Pyridostigmine (Mestinon)",
      "• First-line; AChE inhibitor",
      "• 30–120 mg q4–6h PO",
      "• Cholinergic SE: DUMBELS",
      "• Does not alter disease course",
    ]
  },
  {
    title: "Immunosuppression", color: "0096C7", x: 8.3,
    items: [
      "Prednisone (first-line IS)",
      "• 1–1.5 mg/kg/day, then taper",
      "Azathioprine (steroid-sparing)",
      "• 2–3 mg/kg/day",
      "Mycophenolate mofetil",
      "• 1–1.5 g BID",
      "Cyclosporine, Tacrolimus",
    ]
  },
  {
    title: "Rapid Rescue", color: "E63946", x: 10.65,
    items: [
      "IVIG: 2 g/kg over 5 days",
      "Plasmapheresis: 5 exchanges",
      "• For myasthenic crisis",
      "• Pre-operative prep",
      "• Onset: 1–2 weeks",
      "Rituximab (refractory MuSK)",
      "Eculizumab (anti-C5 Ab)",
    ]
  },
];

treatments.forEach(t => {
  s5.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x: t.x, y: 0.65, w: 2.3, h: 6.5,
    fill: { color: "0D2137" }, line: { color: t.color, width: 1.5 }, rectRadius: 0.1
  });
  s5.addShape(pres.shapes.RECTANGLE, { x: t.x, y: 0.65, w: 2.3, h: 0.45, fill: { color: t.color } });
  s5.addText(t.title, {
    x: t.x + 0.05, y: 0.68, w: 2.2, h: 0.38, fontSize: 11, bold: true, color: "FFFFFF", align: "center"
  });
  t.items.forEach((item, j) => {
    s5.addText(item, {
      x: t.x + 0.1, y: 1.2 + j * 0.77, w: 2.1, h: 0.72,
      fontSize: 9.5, color: "D0E8F2", valign: "top"
    });
  });
});

// Thymectomy box
s5.addShape(pres.shapes.ROUNDED_RECTANGLE, {
  x: 5.95, y: 5.6, w: 7.0, h: 1.6,
  fill: { color: "0D2137" }, line: { color: "F4A261", width: 1.5 }, rectRadius: 0.1
});
s5.addText("⚕ THYMECTOMY", {
  x: 6.05, y: 5.66, w: 6.8, h: 0.35, fontSize: 13, bold: true, color: "F4A261"
});
s5.addText(
  "Recommended for all AChR-Ab positive patients aged 18–65 with non-thymomatous MG (MGTX trial: benefit up to 3 years).\nMandatory for thymoma. Approach: minimally invasive (VATS/robotic) preferred over open sternotomy.\nImprovement seen in 70–80%; complete stable remission in 25–35%.",
  {
    x: 6.05, y: 6.05, w: 6.8, h: 1.1,
    fontSize: 10, color: "D0E8F2", valign: "top"
  }
);

// =====================================================================
// SLIDE 6: THYMIC PATHOLOGY, CRISIS & PROGNOSIS
// =====================================================================
let s6 = pres.addSlide();
s6.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: "06101E" } });
s6.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 0.55, fill: { color: "0077B6" } });
s6.addShape(pres.shapes.RECTANGLE, { x: 0, y: 7.3, w: 13.3, h: 0.2, fill: { color: "0077B6" } });
s6.addText("THYMIC PATHOLOGY, MYASTHENIC CRISIS & PROGNOSIS", {
  x: 0.2, y: 0.08, w: 12, h: 0.4, fontSize: 18, bold: true, color: "FFFFFF", charSpacing: 3
});
s6.addText("SLIDE 6 / 6", { x: 11.3, y: 0.1, w: 1.8, h: 0.35, fontSize: 10, color: "ADE8F4", align: "right" });

// Thymic images
if (img(4)) { // CT thymoma
  s6.addImage({ data: img(4), x: 0.2, y: 0.68, w: 3.8, h: 2.7 });
  s6.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 3.38, w: 3.8, h: 0.36, fill: { color: "023E8A" } });
  s6.addText("CT: Anterior Mediastinal Thymoma in MG", {
    x: 0.2, y: 3.4, w: 3.8, h: 0.32, fontSize: 9, color: "CAF0F8", align: "center"
  });
}

// Thymic text
s6.addText("THYMIC PATHOLOGY", {
  x: 4.2, y: 0.68, w: 4.5, h: 0.35, fontSize: 13, bold: true, color: "00B4D8"
});
const thymicData = [
  ["Thymic Hyperplasia", "~65% early-onset MG; germinal center formation with AChR-specific B/T cells"],
  ["Thymoma", "10–15% MG; epithelial tumor; risk of invasive spread; mandatory resection"],
  ["Atrophic Thymus", "Elderly-onset MG (>50 yrs); may still require thymectomy"],
  ["Normal Thymus", "~10% of MG; may still respond to thymectomy"],
];
thymicData.forEach((row, i) => {
  const y = 1.1 + i * 0.62;
  s6.addShape(pres.shapes.RECTANGLE, { x: 4.2, y, w: 4.5, h: 0.58, fill: { color: i % 2 === 0 ? "0D2137" : "091725" } });
  s6.addText(row[0], { x: 4.25, y: y + 0.04, w: 1.8, h: 0.25, fontSize: 10, bold: true, color: "00B4D8" });
  s6.addText(row[1], { x: 4.25, y: y + 0.29, w: 4.38, h: 0.26, fontSize: 9.5, color: "D0E8F2" });
});

// Thymoma pathology image
// (Pathology specimen image would go here if fetched)

// Right: Myasthenic Crisis
s6.addShape(pres.shapes.ROUNDED_RECTANGLE, {
  x: 8.95, y: 0.65, w: 4.15, h: 3.35,
  fill: { color: "1A0A0A" }, line: { color: "E63946", width: 2 }, rectRadius: 0.12
});
s6.addShape(pres.shapes.RECTANGLE, { x: 8.95, y: 0.65, w: 4.15, h: 0.45, fill: { color: "E63946" } });
s6.addText("⚠ MYASTHENIC CRISIS", {
  x: 8.95, y: 0.68, w: 4.15, h: 0.38, fontSize: 13, bold: true, color: "FFFFFF", align: "center"
});
const crisisItems = [
  "Respiratory failure requiring intubation",
  "Incidence: ~15–20% of MG patients lifetime",
  "Triggers: infection, surgery, medications,\n  stress, aspiration, pregnancy",
  "Cholinergic crisis: too much AChE inhibitor\n  (DUMBELS symptoms)",
  "Management: IVIG or plasmapheresis,\n  ICU monitoring, avoid: Mg²⁺, aminoglycosides,\n  β-blockers, fluoroquinolones",
  "Mortality: <5% in modern ICU care",
];
crisisItems.forEach((item, i) => {
  s6.addText("• " + item, {
    x: 9.05, y: 1.18 + i * 0.45, w: 3.95, h: 0.42,
    fontSize: 9.5, color: i === 0 ? "FF6B6B" : "D0E8F2", valign: "top"
  });
});

// Bottom row: Antibody subtypes + prognosis
s6.addText("ANTIBODY SUBTYPES & CLINICAL PROFILES", {
  x: 0.2, y: 3.88, w: 8.5, h: 0.35, fontSize: 13, bold: true, color: "00B4D8"
});

const abRows = [
  { ab: "AChR-Ab+", freq: "85%", gender: "F>M (<40)", thymus: "Hyperplasia/Thymoma", severity: "Moderate", rx: "Standard" },
  { ab: "MuSK-Ab+", freq: "6–12%", gender: "F>>M", thymus: "Normal/Atrophic", severity: "Severe bulbar/resp", rx: "Rituximab helpful" },
  { ab: "LRP4-Ab+", freq: "2–4%", gender: "F>M", thymus: "Normal", severity: "Mild-moderate", rx: "Standard" },
  { ab: "Seronegative", freq: "6–12%", gender: "Equal", thymus: "Variable", severity: "Variable", rx: "Standard" },
];

const abHeaders = ["Subtype", "Freq", "Gender", "Thymus", "Severity", "Treatment"];
abHeaders.forEach((h, i) => {
  const xs = [0.2, 1.7, 2.8, 3.7, 5.1, 6.6];
  const ws = [1.4, 1.0, 0.85, 1.3, 1.45, 1.8];
  s6.addShape(pres.shapes.RECTANGLE, { x: xs[i], y: 4.28, w: ws[i], h: 0.32, fill: { color: "0077B6" } });
  s6.addText(h, { x: xs[i], y: 4.29, w: ws[i], h: 0.28, fontSize: 9, bold: true, color: "FFFFFF", align: "center" });
});

abRows.forEach((row, ri) => {
  const y = 4.62 + ri * 0.46;
  const vals = [row.ab, row.freq, row.gender, row.thymus, row.severity, row.rx];
  const xs = [0.2, 1.7, 2.8, 3.7, 5.1, 6.6];
  const ws = [1.4, 1.0, 0.85, 1.3, 1.45, 1.8];
  vals.forEach((v, ci) => {
    s6.addShape(pres.shapes.RECTANGLE, { x: xs[ci], y, w: ws[ci], h: 0.44, fill: { color: ri % 2 === 0 ? "0D2137" : "091725" } });
    s6.addText(v, { x: xs[ci] + 0.03, y: y + 0.05, w: ws[ci] - 0.06, h: 0.34, fontSize: 9, color: "D0E8F2", align: "center" });
  });
});

// Prognosis box
s6.addShape(pres.shapes.ROUNDED_RECTANGLE, {
  x: 8.95, y: 4.1, w: 4.15, h: 3.1,
  fill: { color: "0D2137" }, line: { color: "23D18B", width: 1.5 }, rectRadius: 0.12
});
s6.addShape(pres.shapes.RECTANGLE, { x: 8.95, y: 4.1, w: 4.15, h: 0.4, fill: { color: "23D18B" } });
s6.addText("PROGNOSIS & MONITORING", {
  x: 8.95, y: 4.13, w: 4.15, h: 0.34, fontSize: 12, bold: true, color: "062B1A", align: "center"
});
const progItems = [
  "With modern treatment: minimal morbidity",
  "Complete Stable Remission (CSR): ~10–20%",
  "Pharmacological remission: ~30–40%",
  "Ocular → generalized: 90% within 2 yrs",
  "SFEMG / QMG score for monitoring",
  "MG-ADL scale: patient-reported outcomes",
  "Annual thymus imaging post-thymectomy",
  "Avoid: quinolones, aminoglycosides, Mg²⁺,\n  d-penicillamine, statins, β-blockers",
];
progItems.forEach((item, i) => {
  s6.addText("• " + item, {
    x: 9.05, y: 4.58 + i * 0.33, w: 3.95, h: 0.3,
    fontSize: 9.5, color: "D0E8F2", valign: "top"
  });
});

// =====================================================================
// WRITE FILE
// =====================================================================
const outputPath = "/home/daytona/workspace/myasthenia-gravis-poster/Myasthenia_Gravis_Poster.pptx";
pres.writeFile({ fileName: outputPath }).then(() => {
  console.log("✅ Poster created:", outputPath);
}).catch(err => {
  console.error("❌ Error:", err);
});
Running Command

cd /home/daytona/workspace/myasthenia-gravis-poster && node create_poster.js 2>&…

Running Command

cd /home/daytona/workspace/myasthenia-gravis-poster && mkdir -p imgs && curl -s …

Running Command

cd /home/daytona/workspace/myasthenia-gravis-poster && curl -s --max-time 30 "ht…

Editing File

~/myasthenia-gravis-poster/create_poster.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/myasthenia-gravis-poster/create_poster.js'
Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.

Where is the imge

Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.
This is a shared conversation. Sign in to Orris to start your own chat.