Create a summary document on myeloma diagnosis and staging I can share with colleagues

Reading File
Asking for Preferences

Create a summary document on multiple myeloma diagnosis and staging I can share with colleagues

Finding Sources
Searching PubMed

"multiple myeloma" AND "diagnosis" AND "staging"

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

ls -la /home/daytona/workspace/ && mkdir -p /home/daytona/workspace/myeloma-summary

Writing File

~/myeloma-summary/build_doc.js

const {
  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
  HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType,
  VerticalAlign, PageNumber, Header, Footer, TableOfContents,
  PageBreak, UnderlineType
} = require('docx');
const fs = require('fs');

// ─── Colour palette ───────────────────────────────────────────────
const DARK_BLUE  = "1B3A6B";
const MID_BLUE   = "2E5FA3";
const LIGHT_BLUE = "D6E4F7";
const ACCENT     = "C0392B";  // red accent for key labels
const GREY_HEADER= "4A4A4A";
const TABLE_HDR  = "1B3A6B";
const TABLE_ALT  = "EBF2FC";
const WHITE      = "FFFFFF";

// ─── Helper: section heading ──────────────────────────────────────
function sectionHeading(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_1,
    spacing: { before: 320, after: 120 },
    children: [
      new TextRun({
        text,
        color: DARK_BLUE,
        size: 28,
        bold: true,
        font: "Calibri",
      }),
    ],
    border: { bottom: { color: MID_BLUE, size: 8, style: BorderStyle.SINGLE } },
  });
}

// ─── Helper: sub-heading ─────────────────────────────────────────
function subHeading(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_2,
    spacing: { before: 240, after: 80 },
    children: [
      new TextRun({
        text,
        color: MID_BLUE,
        size: 24,
        bold: true,
        font: "Calibri",
      }),
    ],
  });
}

// ─── Helper: body paragraph ──────────────────────────────────────
function body(text, options = {}) {
  return new Paragraph({
    spacing: { before: 60, after: 60, line: 276 },
    children: [
      new TextRun({
        text,
        size: 21,
        font: "Calibri",
        color: "2C2C2C",
        bold: options.bold || false,
        italics: options.italic || false,
      }),
    ],
  });
}

// ─── Helper: bullet ──────────────────────────────────────────────
function bullet(text, level = 0, bold = false, color = "2C2C2C") {
  return new Paragraph({
    bullet: { level },
    spacing: { before: 40, after: 40, line: 260 },
    children: [
      new TextRun({ text, size: 21, font: "Calibri", color, bold }),
    ],
  });
}

// ─── Helper: labelled bullet (Label: text) ────────────────────────
function labelBullet(label, text, level = 0) {
  return new Paragraph({
    bullet: { level },
    spacing: { before: 40, after: 40, line: 260 },
    children: [
      new TextRun({ text: label + ": ", size: 21, font: "Calibri", bold: true, color: DARK_BLUE }),
      new TextRun({ text, size: 21, font: "Calibri", color: "2C2C2C" }),
    ],
  });
}

// ─── Helper: note box (shaded paragraph) ─────────────────────────
function noteBox(text) {
  return new Paragraph({
    spacing: { before: 100, after: 100, line: 260 },
    shading: { type: ShadingType.CLEAR, fill: LIGHT_BLUE },
    border: {
      left: { color: MID_BLUE, size: 16, style: BorderStyle.SINGLE },
    },
    indent: { left: 200 },
    children: [
      new TextRun({ text, size: 20, font: "Calibri", color: DARK_BLUE, italics: true }),
    ],
  });
}

function spacer(pt = 120) {
  return new Paragraph({ spacing: { before: pt, after: 0 }, children: [new TextRun("")] });
}

// ─── Helper: table row (header) ──────────────────────────────────
function tHeaderRow(cells) {
  return new TableRow({
    tableHeader: true,
    children: cells.map(c =>
      new TableCell({
        shading: { type: ShadingType.CLEAR, fill: TABLE_HDR },
        verticalAlign: VerticalAlign.CENTER,
        margins: { top: 80, bottom: 80, left: 120, right: 120 },
        children: [new Paragraph({
          alignment: AlignmentType.CENTER,
          children: [new TextRun({ text: c, bold: true, color: WHITE, size: 20, font: "Calibri" })],
        })],
      })
    ),
  });
}

// ─── Helper: table row (data) ────────────────────────────────────
function tDataRow(cells, shade = false) {
  return new TableRow({
    children: cells.map((c, i) =>
      new TableCell({
        shading: shade ? { type: ShadingType.CLEAR, fill: TABLE_ALT } : undefined,
        verticalAlign: VerticalAlign.CENTER,
        margins: { top: 60, bottom: 60, left: 120, right: 120 },
        children: [new Paragraph({
          alignment: i === 0 ? AlignmentType.LEFT : AlignmentType.CENTER,
          children: [new TextRun({
            text: c,
            size: 19,
            font: "Calibri",
            color: "2C2C2C",
            bold: i === 0,
          })],
        })],
      })
    ),
  });
}

// ─── Helper: full-width table ────────────────────────────────────
function makeTable(headerCells, dataRows) {
  return new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    margins: { top: 60, bottom: 60, left: 80, right: 80 },
    rows: [
      tHeaderRow(headerCells),
      ...dataRows.map((r, i) => tDataRow(r, i % 2 === 0)),
    ],
  });
}

// ═════════════════════════════════════════════════════════════════
//  DOCUMENT CONTENT
// ═════════════════════════════════════════════════════════════════

const doc = new Document({
  title: "Multiple Myeloma – Diagnosis and Staging",
  description: "Clinical summary for haematology colleagues",
  styles: {
    paragraphStyles: [
      {
        id: "Normal",
        name: "Normal",
        run: { font: "Calibri", size: 21 },
      },
    ],
  },

  sections: [
    {
      headers: {
        default: new Header({
          children: [
            new Paragraph({
              border: { bottom: { color: MID_BLUE, size: 6, style: BorderStyle.SINGLE } },
              alignment: AlignmentType.RIGHT,
              spacing: { after: 80 },
              children: [
                new TextRun({ text: "Multiple Myeloma: Diagnosis & Staging", size: 18, font: "Calibri", color: GREY_HEADER }),
              ],
            }),
          ],
        }),
      },
      footers: {
        default: new Footer({
          children: [
            new Paragraph({
              border: { top: { color: MID_BLUE, size: 6, style: BorderStyle.SINGLE } },
              alignment: AlignmentType.CENTER,
              spacing: { before: 60 },
              children: [
                new TextRun({ text: "Page ", size: 17, font: "Calibri", color: GREY_HEADER }),
                new TextRun({ children: [PageNumber.CURRENT], size: 17, font: "Calibri", color: GREY_HEADER }),
                new TextRun({ text: "  |  Sources: Harrison's 22E (2025), Goldman-Cecil Medicine, Robbins Pathology, Tietz Lab Medicine  |  June 2026", size: 17, font: "Calibri", color: GREY_HEADER }),
              ],
            }),
          ],
        }),
      },

      children: [
        // ── TITLE BLOCK ─────────────────────────────────────────
        new Paragraph({
          spacing: { before: 400, after: 60 },
          alignment: AlignmentType.CENTER,
          children: [
            new TextRun({
              text: "MULTIPLE MYELOMA",
              bold: true,
              size: 52,
              font: "Calibri",
              color: DARK_BLUE,
            }),
          ],
        }),
        new Paragraph({
          spacing: { before: 0, after: 60 },
          alignment: AlignmentType.CENTER,
          children: [
            new TextRun({
              text: "Diagnosis & Staging Reference Summary",
              size: 28,
              font: "Calibri",
              color: MID_BLUE,
              bold: false,
            }),
          ],
        }),
        new Paragraph({
          spacing: { before: 0, after: 300 },
          alignment: AlignmentType.CENTER,
          border: { bottom: { color: MID_BLUE, size: 10, style: BorderStyle.SINGLE } },
          children: [
            new TextRun({
              text: "For internal use — compiled June 2026 | Based on IMWG 2014 criteria & IMS/IMWG 2025 consensus",
              size: 18,
              font: "Calibri",
              color: GREY_HEADER,
              italics: true,
            }),
          ],
        }),

        spacer(80),

        // ── 1. OVERVIEW ──────────────────────────────────────────
        sectionHeading("1.  Overview & Epidemiology"),
        body("Multiple myeloma (MM) is a clonal plasma cell malignancy characterised by uncontrolled proliferation of plasma cells in the bone marrow, overproduction of a monoclonal immunoglobulin (M protein), and end-organ damage. It is the second most common haematological malignancy."),
        spacer(60),
        makeTable(
          ["Parameter", "Value"],
          [
            ["Annual new cases (US, 2024)", "~35,780"],
            ["Median age at diagnosis", "69 years"],
            ["Male : Female ratio", "Slightly higher in males"],
            ["Racial disparity", "Blacks have ~2× incidence of whites (17.1 vs 8.1 per 100,000 in men)"],
            ["Disease accounts for", "~1.8% of all malignancies"],
          ]
        ),
        spacer(80),
        noteBox("MM is uncommon under age 40. Incidence is highest in Black and Pacific Islander populations; lowest in Asian populations."),

        spacer(120),

        // ── 2. PATHOGENESIS ──────────────────────────────────────
        sectionHeading("2.  Key Pathogenic Mechanisms"),
        body("MM cells bind to bone marrow stromal cells (BMSCs) and extracellular matrix via adhesion molecules, triggering growth, survival, and drug-resistance signalling (Ras/Raf/MAPK, PI3K/Akt, PKC pathways)."),
        spacer(60),
        subHeading("Molecular Drivers"),
        bullet("Chromosomal translocations fusing the IgH locus (14q32) to oncogenes: cyclin D1, cyclin D3"),
        bullet("t(4;14), t(14;16), t(14;20) — high-risk translocations"),
        bullet("del(17p) / TP53 mutation — associated with aggressive disease"),
        bullet("1q amplification (amp1q) + 1p deletion — additional high-risk markers"),
        bullet("IL-6 from BMSCs is the principal plasma cell growth and survival cytokine"),
        spacer(60),
        subHeading("Key Consequences"),
        labelBullet("Bone disease", "RANKL upregulation → osteoclast activation; osteoblast suppression → lytic lesions, hypercalcaemia, pathological fractures"),
        labelBullet("Immune deficiency", "Suppression of normal B cells and antibody production → recurrent bacterial infections despite elevated total immunoglobulin"),
        labelBullet("Renal injury", "Light chain casts in distal tubules (myeloma kidney), light chain deposition disease, AL amyloidosis, hypercalcaemia-related injury"),

        spacer(120),

        // ── 3. DISEASE SPECTRUM ──────────────────────────────────
        sectionHeading("3.  The Plasma Cell Disorder Spectrum"),
        body("MM exists on a continuum. Understanding where a patient sits on this spectrum determines management."),
        spacer(80),
        makeTable(
          ["Condition", "Bone Marrow Plasma Cells", "M Protein", "End-Organ Damage (CRAB/SLiM)", "Action"],
          [
            ["MGUS", "< 10%", "IgG/A < 30 g/L; FLC ratio < 100", "Absent", "Observe; risk-stratify"],
            ["Smoldering MM (SMM)", "10–59%", "≥ 30 g/L or urine ≥ 500 mg/24h", "Absent", "Observe or treat if high risk"],
            ["Active MM (requires treatment)", "≥ 10% clonal OR plasmacytoma", "Any level", "CRAB or SLiM criteria present", "Treat immediately"],
            ["Solitary plasmacytoma", "< 10% (single lesion)", "Often absent or small", "Absent", "Local radiotherapy"],
          ]
        ),

        spacer(120),

        // ── 4. DIAGNOSTIC CRITERIA ───────────────────────────────
        sectionHeading("4.  Diagnostic Criteria — IMWG 2014 (Updated)"),
        body("Diagnosis of active MM requires BOTH: (1) ≥10% clonal bone marrow plasma cells or biopsy-proven plasmacytoma AND (2) at least one myeloma-defining event (MDE):"),
        spacer(80),

        subHeading("4a.  CRAB Criteria (Classic End-Organ Damage)"),
        makeTable(
          ["CRAB", "Definition", "Clinical Significance"],
          [
            ["C — Hypercalcaemia", "Serum Ca > 0.25 mmol/L above ULN, or > 2.75 mmol/L (11 mg/dL)", "Osteoclast-mediated bone resorption"],
            ["R — Renal insufficiency", "Creatinine clearance < 40 mL/min or serum creatinine > 177 µmol/L (2 mg/dL)", "Light chain cast nephropathy most common cause"],
            ["A — Anaemia", "Hb < 100 g/L or > 20 g/L below LLN", "Marrow infiltration + cytokine suppression of erythropoiesis"],
            ["B — Bone lesions", "≥ 1 lytic lesion on skeletal survey, CT, or PET-CT", "Punched-out lesions; vertebrae, skull, ribs most common"],
          ]
        ),
        spacer(80),

        subHeading("4b.  SLiM Biomarker Criteria (Myeloma-Defining Events without overt organ damage)"),
        makeTable(
          ["SLiM", "Criterion", "Threshold"],
          [
            ["S — Sixty percent", "Clonal bone marrow plasma cells", "≥ 60%"],
            ["Li — Light chain ratio", "Involved : uninvolved serum FLC ratio", "≥ 100 (involved FLC must be ≥ 100 mg/L)"],
            ["M — MRI lesions", "Focal lesions on MRI (each ≥ 5 mm)", "≥ 2 lesions"],
          ]
        ),
        spacer(60),
        noteBox("Any one SLiM criterion, even without CRAB features, indicates active MM requiring treatment. The addition of SLiM criteria reduced the proportion of 'smoldering' patients who were actually at high risk of rapid progression."),

        spacer(120),

        // ── 5. LABORATORY WORKUP ─────────────────────────────────
        sectionHeading("5.  Diagnostic Workup"),

        subHeading("5a.  Bone Marrow Assessment"),
        bullet("Bone marrow aspirate + trephine biopsy"),
        bullet("Morphology: >10% clonal plasma cells in 96% of MM; may be focal — repeat biopsy if high suspicion but low %"),
        bullet("Immunophenotype by flow cytometry or IHC: CD38⁺, CD138⁺, CD45⁻, CD19⁻, CD56⁺ in most MM"),
        bullet("κ/λ light chain ratio: >4:1 (κ clonal) or <1:2 (λ clonal) confirms clonality"),
        bullet("FISH / DNA sequencing: del(17p), t(4;14), t(14;16), t(14;20), 1q gain/1p del, hyperdiploidy — mandatory for risk stratification"),
        spacer(40),

        subHeading("5b.  Paraprotein Studies"),
        makeTable(
          ["Test", "Purpose", "Notes"],
          [
            ["Serum protein electrophoresis (SPEP)", "Detect and quantify M spike", "M protein present in 80%; immunofixation detects 93%"],
            ["Serum immunofixation electrophoresis (SIFE)", "Characterise M protein isotype", "IgG 52%, IgA 21%, light chain only 16%, IgD 2%"],
            ["24-h urine protein electrophoresis + IFE", "Detect Bence Jones protein", "κ light chain in 65%, λ in 35% of MM"],
            ["Serum free light chain (FLC) assay", "Quantify involved/uninvolved FLC, calculate ratio", "Can substitute for 24-h urine in initial screen"],
            ["Serum immunoglobulin quantification (IgG, IgA, IgM)", "Assess immune paresis", "Normal Ig often suppressed despite elevated M protein"],
          ]
        ),
        spacer(40),
        noteBox("Combining SPEP + SIFE + urine IFE detects M protein in 97% of MM cases. Nonsecretory MM (3%) requires FLC assay or PET-CT for disease monitoring."),
        spacer(40),

        subHeading("5c.  Blood & Chemistry Panel"),
        bullet("FBC with differential — normocytic normochromic anaemia in ~75% at diagnosis; eventually in nearly all"),
        bullet("Serum creatinine and eGFR — renal impairment in ~20–25% at presentation"),
        bullet("Corrected serum calcium — hypercalcaemia in ~15% at diagnosis"),
        bullet("Serum LDH — elevated = adverse prognosis; marker of high tumour burden"),
        bullet("β₂-Microglobulin + serum albumin — required for ISS staging"),
        bullet("ESR — often elevated; non-specific"),
        bullet("Serum alkaline phosphatase — typically NORMAL in MM (osteoblast suppression)"),
        spacer(40),

        subHeading("5d.  Imaging"),
        makeTable(
          ["Modality", "Role", "Key Findings / Notes"],
          [
            ["Whole-body low-dose CT (WBLDCT)", "First-line skeletal survey; replaces plain X-rays", "Punched-out lytic lesions; sensitivity > plain film"],
            ["18F-FDG PET-CT", "Standard for distinguishing SMM from active MM; detect extramedullary disease", "Now preferred over skeletal survey; shows active metabolic lesions"],
            ["MRI (spine + pelvis)", "Assess marrow infiltration, spinal cord compression, SLiM lesions", "Most sensitive for diffuse or focal marrow disease; mandatory if SMM or solitary plasmacytoma"],
            ["Plain skeletal survey", "Historical; largely replaced", "80% sensitivity; misses ~30% of lesions visible on CT/PET"],
          ]
        ),

        spacer(120),

        // ── 6. STAGING ───────────────────────────────────────────
        sectionHeading("6.  Staging Systems"),

        subHeading("6a.  International Staging System (ISS)"),
        body("Based on serum β₂-microglobulin (β₂M) and albumin. Simple and widely applicable."),
        spacer(60),
        makeTable(
          ["ISS Stage", "Criteria", "Median Survival (months)", "Proportion of patients"],
          [
            ["Stage I", "β₂M < 3.5 mg/L AND Albumin ≥ 35 g/L", "62", "~28%"],
            ["Stage II", "Neither Stage I nor Stage III", "44", "~39%"],
            ["Stage III", "β₂M ≥ 5.5 mg/L", "29", "~33%"],
          ]
        ),
        spacer(80),

        subHeading("6b.  Revised International Staging System (R-ISS) — Current Standard"),
        body("The R-ISS incorporates ISS stage with cytogenetic risk (FISH) and serum LDH, improving prognostic precision."),
        spacer(60),
        makeTable(
          ["R-ISS Stage", "Criteria", "5-Year Overall Survival"],
          [
            ["Stage I", "ISS I + standard-risk cytogenetics + normal LDH", "~82%"],
            ["Stage II", "Neither Stage I nor Stage III", "~62%"],
            ["Stage III", "ISS III + high-risk cytogenetics (del17p, t(4;14), t(14;16)) OR elevated LDH", "~40%"],
          ]
        ),
        spacer(60),
        noteBox("The Durie-Salmon staging system is no longer used in clinical practice; it does not predict outcomes with modern therapy."),
        spacer(80),

        subHeading("6c.  Cytogenetic Risk Stratification (FISH / DNA Sequencing)"),
        makeTable(
          ["Risk Category", "Cytogenetic Features", "Expected Survival"],
          [
            ["Standard Risk (75–80%)", "t(11;14), del(13), hyperdiploidy — no additional high-risk features", "8–10+ years with modern therapy"],
            ["High Risk (20–25%)", "del(17p) [≥20% cutoff] and/or TP53 mutation", "3–4 years"],
            ["High Risk (20–25%)", "t(4;14), t(14;16), t(14;20) with 1q gain and/or 1p del", "3–4 years"],
            ["High Risk (20–25%)", "Biallelic del(1p) or del(1p) + amp(1q)", "3–4 years"],
            ["Adverse Biochemical", "β₂M > 5.5 mg/L with normal creatinine", "Adverse even without high-risk cytogenetics"],
          ]
        ),
        spacer(60),
        noteBox("2025 IMS/IMWG Consensus (Avet-Loiseau et al., J Clin Oncol 2025): high-risk MM is now defined by a combination of cytogenetic, clinical, and MRD parameters. Chromosome 13q del and t(11;14) are NOT high-risk markers."),

        spacer(120),

        // ── 7. SMOLDERING MYELOMA RISK ───────────────────────────
        sectionHeading("7.  Smoldering MM — Risk of Progression"),
        body("Identifying high-risk SMM is clinically important as early intervention may now be considered."),
        spacer(60),
        makeTable(
          ["Risk Feature", "Threshold", "Risk Category"],
          [
            ["Serum M protein", "≥ 30 g/L", "Progression risk factor"],
            ["Serum FLC ratio", "≥ 20", "Progression risk factor"],
            ["Bone marrow plasma cells", "≥ 20%", "Progression risk factor"],
            ["0–1 risk factors", "—", "Low/Intermediate risk — observe every 3–4 months"],
            ["2–3 risk factors", "—", "High risk — consider lenalidomide ± dexamethasone for ~2 years"],
          ]
        ),
        spacer(60),
        noteBox("High-risk SMM patients (all 3 features) have a 76% chance of progression to MM within 5 years; low-risk patients (1 feature only) have ~25% risk."),

        spacer(120),

        // ── 8. CLINICAL FEATURES ─────────────────────────────────
        sectionHeading("8.  Clinical Features at Presentation"),
        makeTable(
          ["System", "Feature", "Frequency / Notes"],
          [
            ["Musculoskeletal", "Bone pain (especially back, chest)", "~70% at diagnosis; vertebral collapse → height loss"],
            ["Haematological", "Anaemia (normocytic/normochromic)", "~75% at diagnosis; eventually in almost all"],
            ["Renal", "Renal insufficiency", "~20–25%; myeloma cast nephropathy most common cause"],
            ["Metabolic", "Hypercalcaemia", "~15%; lethargy, confusion, constipation, polyuria"],
            ["Immunological", "Recurrent bacterial infections", "Immune paresis; neutropenia in advanced disease"],
            ["Neurological", "Radiculopathy, spinal cord compression", "Thoracic/lumbosacral most common; cord compression in ~10%"],
            ["Haematological", "Hyperviscosity symptoms", "Mainly IgA/IgG3 or IgM; blurred vision, headache, confusion"],
            ["Renal/Systemic", "AL amyloidosis", "Nephrotic syndrome, cardiomyopathy, peripheral neuropathy"],
          ]
        ),
        spacer(60),
        noteBox("Serum alkaline phosphatase is typically NORMAL despite extensive bone involvement — a useful distinguishing feature from bone metastases, where ALP is usually elevated."),

        spacer(120),

        // ── 9. DIFFERENTIAL DIAGNOSIS ────────────────────────────
        sectionHeading("9.  Differential Diagnosis"),
        makeTable(
          ["Condition", "Key Distinguishing Features"],
          [
            ["MGUS", "BM plasma cells < 10%; M protein < 30 g/L (IgG/A) or < 3 g/L (IgM); no CRAB/SLiM"],
            ["Waldenström macroglobulinaemia", "IgM paraprotein; lymphoplasmacytic lymphoma; MYD88 L265P mutation; hyperviscosity common"],
            ["AL amyloidosis (primary)", "Monoclonal plasma cells but BM < 10%; end-organ damage via amyloid deposition; Congo red positive"],
            ["Bone metastases", "Elevated ALP; multiple primary tumour sites; osteoblastic or mixed lesions on imaging"],
            ["Reactive plasmacytosis", "BM plasma cells < 10%; polyclonal; occurs with infection, connective tissue disease"],
            ["Plasmacytoma (solitary)", "Single lesion, BM < 10%; highly radiosensitive; 10-year median survival"],
            ["POEMS syndrome", "Polyneuropathy, organomegaly, endocrinopathy, M-protein, skin changes; sclerotic bone lesions; elevated VEGF"],
          ]
        ),

        spacer(120),

        // ── 10. RESPONSE CRITERIA ────────────────────────────────
        sectionHeading("10.  Response Assessment (IMWG Criteria)"),
        body("Response is assessed after each treatment cycle and at key decision points. Deeper responses correlate with improved survival."),
        spacer(60),
        makeTable(
          ["Response Category", "Criteria"],
          [
            ["Stringent Complete Response (sCR)", "CR + normal FLC ratio + absence of clonal plasma cells by IHC or flow cytometry"],
            ["Complete Response (CR)", "Negative serum and urine immunofixation; < 5% plasma cells in BM; no soft tissue plasmacytomas"],
            ["Very Good Partial Response (VGPR)", "M protein detectable by immunofixation but not SPEP; ≥ 90% reduction in serum M protein"],
            ["Partial Response (PR)", "≥ 50% reduction in serum M protein; ≥ 90% reduction in 24-h urine M protein"],
            ["Minimal Residual Disease (MRD) Negative", "No evidence of clonal plasma cells by NGS or flow cytometry (sensitivity 10⁻⁵)"],
            ["Stable Disease (SD)", "Does not meet PR or PD criteria"],
            ["Progressive Disease (PD)", "≥ 25% increase in M protein, FLC, or new bone lesions / hypercalcaemia"],
          ]
        ),
        spacer(60),
        noteBox("MRD negativity is increasingly used as a surrogate endpoint in clinical trials and correlates strongly with prolonged progression-free and overall survival, though therapy is not yet routinely changed based on MRD status alone."),

        spacer(120),

        // ── REFERENCES ───────────────────────────────────────────
        sectionHeading("References & Sources"),
        body("This document was compiled from the following authoritative sources:"),
        spacer(40),
        bullet("Harrison's Principles of Internal Medicine, 22nd Edition (2025, McGraw-Hill) — Chapter 116"),
        bullet("Goldman-Cecil Medicine, International Edition (2-volume set) — Chapter 173"),
        bullet("Robbins & Cotran Pathologic Basis of Disease, 10th Edition — Chapter 10"),
        bullet("Robbins & Kumar Basic Pathology — Chapter 10"),
        bullet("Tietz Textbook of Laboratory Medicine, 7th Edition — Chapters 10 & 11"),
        bullet("Henry's Clinical Diagnosis and Management by Laboratory Methods — Chapter 15"),
        spacer(40),
        subHeading("Recent Guidelines"),
        bullet("Avet-Loiseau H et al. IMS/IMWG Consensus on High-Risk Multiple Myeloma. J Clin Oncol. 2025;Aug 20. PMID: 40489728"),
        bullet("Nanni C et al. EANM guidelines on 18F-FDG PET/CT in plasma cell disorders. Eur J Nucl Med Mol Imaging. 2024 Dec. PMID: 39207486"),
        bullet("Rajkumar SV et al. IMWG updated criteria for the diagnosis of multiple myeloma. Lancet Oncol. 2014;15(6):536–546."),
        spacer(60),
        new Paragraph({
          spacing: { before: 120, after: 0 },
          alignment: AlignmentType.CENTER,
          border: { top: { color: MID_BLUE, size: 6, style: BorderStyle.SINGLE } },
          children: [
            new TextRun({
              text: "This summary is intended for clinical reference use by trained medical professionals. Always refer to the most current institutional protocols and guidelines for clinical decision-making.",
              size: 17,
              font: "Calibri",
              color: GREY_HEADER,
              italics: true,
            }),
          ],
        }),
      ],
    },
  ],
});

Packer.toBuffer(doc).then(buffer => {
  fs.writeFileSync("/home/daytona/workspace/myeloma-summary/Multiple_Myeloma_Diagnosis_Staging.docx", buffer);
  console.log("Document written successfully.");
}).catch(err => {
  console.error("Error:", err);
  process.exit(1);
});
Running Command

cd /home/daytona/workspace/myeloma-summary && node build_doc.js 2>&1

Running Command

python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/myeloma-summary/Multiple_Myeloma_Diagnosis_Staging.docx 2>&1 && ls -lh /home/daytona/workspace/myeloma-summary/

Running Command

ls -lh /home/daytona/workspace/myeloma-summary/ && python3 -c "import zipfile; z = zipfile.ZipFile('/home/daytona/workspace/myeloma-summary/Multiple_Myeloma_Diagnosis_Staging.docx'); print('Valid ZIP. Files:', z.namelist()[:8])"

Your document is ready for download:

Multiple Myeloma Diagnosis Staging

Word Document · DOCX


Here's what the document covers across 10 sections with colour-coded tables and formatted headings:
SectionContent
1. Overview & EpidemiologyIncidence, demographics, racial disparities (US 2024 data)
2. PathogenesisMolecular drivers (IgH translocations, IL-6, RANKL), bone/renal/immune consequences
3. Disease SpectrumMGUS → SMM → Active MM → Plasmacytoma with clear management cues
4. Diagnostic CriteriaFull IMWG 2014 criteria: CRAB criteria table + SLiM biomarker table
5. Diagnostic WorkupBone marrow (IHC/flow), paraprotein studies (SPEP, SIFE, FLC), labs, imaging (WBLDCT, PET-CT, MRI)
6. StagingISS table, R-ISS table (current standard), cytogenetic risk stratification by FISH/DNA sequencing
7. Smoldering MM Risk3-factor risk model; progression thresholds
8. Clinical FeaturesSystem-by-system table with frequency data
9. Differential DiagnosisMGUS, Waldenström's, AL amyloidosis, bone mets, POEMS, plasmacytoma
10. Response CriteriaIMWG response categories from sCR → MRD-negative → PD
Sources: Harrison's 22E (2025), Goldman-Cecil Medicine, Robbins Pathology, Tietz Lab Medicine, plus the 2025 IMS/IMWG high-risk consensus (PMID 40489728) and 2024 EANM PET-CT guidelines (PMID 39207486).
This is a shared conversation. Sign in to Orris to start your own chat.