Make systematic detail document to follow to take daily ICU round in oncology ICU and evaluate the patient

Reading File
Finding Sources
Finding Sources
Finding Sources
Searching PubMed

"oncology" AND "intensive care unit" AND "rounds" AND "patient evaluation"

Searching the Web

oncology ICU daily rounds checklist systematic evaluation 2024

Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading Web Page

https://anesthguide.com/topic/checklist-for-icu-rounds

Finding Sources
Finding Sources
Searching PubMed

"cancer" AND "intensive care" AND "outcomes"

Searching the Web

oncology ICU specific complications assessment chemotherapy toxicity ventilation 2024 guidelines

Reading File
Reading File
Reading File
Running Command

ls -la /home/daytona/workspace/ && mkdir -p /home/daytona/workspace/oncology-icu-rounds

Writing File

~/oncology-icu-rounds/generate_rounds_doc.js

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

// ─── Helper Functions ─────────────────────────────────────────────────────────

function h1(text) {
  return new Paragraph({
    text,
    heading: HeadingLevel.HEADING_1,
    spacing: { before: 360, after: 120 },
  });
}

function h2(text) {
  return new Paragraph({
    text,
    heading: HeadingLevel.HEADING_2,
    spacing: { before: 280, after: 80 },
  });
}

function h3(text) {
  return new Paragraph({
    text,
    heading: HeadingLevel.HEADING_3,
    spacing: { before: 200, after: 60 },
  });
}

function body(text, options = {}) {
  return new Paragraph({
    children: [new TextRun({ text, size: 22, ...options })],
    spacing: { before: 60, after: 60 },
  });
}

function bullet(text, level = 0) {
  return new Paragraph({
    children: [new TextRun({ text, size: 22 })],
    bullet: { level },
    spacing: { before: 40, after: 40 },
  });
}

function subbullet(text) {
  return bullet(text, 1);
}

function boldPara(text) {
  return new Paragraph({
    children: [new TextRun({ text, bold: true, size: 22 })],
    spacing: { before: 80, after: 40 },
  });
}

function divider() {
  return new Paragraph({
    border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: '2E74B5' } },
    spacing: { before: 100, after: 100 },
    children: [],
  });
}

function pageBreak() {
  return new Paragraph({ pageBreakBefore: true, children: [] });
}

function tableRow(cells, header = false) {
  return new TableRow({
    tableHeader: header,
    children: cells.map(({ text, width = 2000, shade = null, bold = false, colspan = 1 }) =>
      new TableCell({
        width: { size: width, type: WidthType.DXA },
        columnSpan: colspan,
        shading: shade ? { type: ShadingType.SOLID, color: shade } : undefined,
        verticalAlign: VerticalAlign.CENTER,
        children: [
          new Paragraph({
            children: [new TextRun({ text, bold: bold || header, size: 20, color: header ? 'FFFFFF' : '000000' })],
            alignment: AlignmentType.LEFT,
            spacing: { before: 40, after: 40 },
          }),
        ],
      })
    ),
  });
}

function checkboxRow(label, detail = '') {
  return new TableRow({
    children: [
      new TableCell({
        width: { size: 400, type: WidthType.DXA },
        children: [new Paragraph({ children: [new TextRun({ text: '☐', size: 22 })] })],
      }),
      new TableCell({
        width: { size: 3600, type: WidthType.DXA },
        children: [new Paragraph({ children: [new TextRun({ text: label, bold: true, size: 22 })] })],
      }),
      new TableCell({
        width: { size: 5500, type: WidthType.DXA },
        children: [new Paragraph({ children: [new TextRun({ text: detail, size: 20, color: '595959' })] })],
      }),
    ],
  });
}

function checkboxTable(rows) {
  return new Table({
    width: { size: 9500, type: WidthType.DXA },
    borders: {
      top: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      bottom: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      left: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      right: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      insideH: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      insideV: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
    },
    rows: [
      tableRow([
        { text: '', width: 400, shade: '2E74B5' },
        { text: 'ITEM', width: 3600, shade: '2E74B5', bold: true },
        { text: 'DETAILS / TARGETS', width: 5500, shade: '2E74B5', bold: true },
      ], true),
      ...rows.map(([label, detail]) => checkboxRow(label, detail)),
    ],
  });
}

function infoTable(rows, colWidths = [2500, 7000]) {
  return new Table({
    width: { size: 9500, type: WidthType.DXA },
    borders: {
      top: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      bottom: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      left: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      right: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      insideH: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      insideV: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
    },
    rows: rows.map(([a, b]) =>
      new TableRow({
        children: [
          new TableCell({
            width: { size: colWidths[0], type: WidthType.DXA },
            shading: { type: ShadingType.SOLID, color: 'DEEAF1' },
            children: [new Paragraph({ children: [new TextRun({ text: a, bold: true, size: 20 })] })],
          }),
          new TableCell({
            width: { size: colWidths[1], type: WidthType.DXA },
            children: [new Paragraph({ children: [new TextRun({ text: b, size: 20 })] })],
          }),
        ],
      })
    ),
  });
}

// ─── DOCUMENT BUILD ───────────────────────────────────────────────────────────

const children = [

  // ─── COVER ────────────────────────────────────────────────────────────────
  new Paragraph({
    children: [new TextRun({ text: '', size: 48 })],
    spacing: { before: 800 },
  }),
  new Paragraph({
    children: [new TextRun({ text: 'ONCOLOGY ICU', bold: true, size: 56, color: '2E74B5' })],
    alignment: AlignmentType.CENTER,
  }),
  new Paragraph({
    children: [new TextRun({ text: 'Daily Rounds — Systematic Evaluation Guide', bold: true, size: 36, color: '404040' })],
    alignment: AlignmentType.CENTER,
    spacing: { after: 200 },
  }),
  new Paragraph({
    children: [new TextRun({ text: 'A structured approach to patient assessment in the oncology critical care unit', size: 24, color: '595959', italics: true })],
    alignment: AlignmentType.CENTER,
    spacing: { after: 400 },
  }),
  infoTable([
    ['Institution', ''],
    ['Unit', 'Oncology ICU'],
    ['Revision Date', 'June 2026'],
    ['Version', '1.0'],
    ['Approved By', ''],
  ]),
  pageBreak(),

  // ─── SECTION 0: HOW TO USE ─────────────────────────────────────────────────
  h1('HOW TO USE THIS DOCUMENT'),
  body('This guide provides a systematic, organ-by-system framework for conducting daily ICU rounds on oncology patients. It combines the standard ICU "FAST-HUGS" philosophy with oncology-specific overlays: chemotherapy toxicity monitoring, immunosuppression assessment, cancer-specific metabolic emergencies, and goals-of-care documentation.'),
  body(''),
  boldPara('Round Structure Recommendation:'),
  bullet('Bedside team: Attending physician, fellow/resident, bedside nurse, pharmacist, dietitian, social worker (as available)'),
  bullet('Duration: 8–15 minutes per patient (prioritize unstable patients first)'),
  bullet('Sequence: Review overnight events → Examination → System review → Plan → Goals'),
  bullet('Document each decision with rationale; update orders in real time'),
  divider(),

  // ─── SECTION 1: PATIENT SNAPSHOT ──────────────────────────────────────────
  h1('SECTION 1 — PATIENT SNAPSHOT'),
  body('Complete at the start of each round. This orients the entire team to oncologic and ICU context.'),
  new Paragraph({ spacing: { after: 80 }, children: [] }),
  infoTable([
    ['Patient Name / ID', ''],
    ['Age / Sex', ''],
    ['Primary Malignancy', '(type, stage, histology)'],
    ['Date of Diagnosis', ''],
    ['Metastatic Sites', ''],
    ['Current Treatment Regimen', '(chemo / targeted / immunotherapy / radiation / SCT)'],
    ['Last Treatment Dose', '(drug, date, cycle number)'],
    ['Reason for ICU Admission', ''],
    ['ICU Day #', ''],
    ['Code Status / Goals of Care', ''],
    ['Primary Oncologist', ''],
    ['Next-of-Kin / Surrogate', ''],
  ]),
  new Paragraph({ spacing: { after: 120 }, children: [] }),
  divider(),

  // ─── SECTION 2: OVERNIGHT EVENTS ──────────────────────────────────────────
  h1('SECTION 2 — OVERNIGHT EVENTS & 24-HOUR SUMMARY'),
  checkboxTable([
    ['New clinical events', 'Deterioration, arrhythmia, new fever, bleeding, mental status change'],
    ['Interventions performed', 'Intubation, line placement, bronchoscopy, procedure, dialysis started'],
    ['Medications changed', 'New antibiotics, vasopressors added/weaned, analgesics adjusted'],
    ['Lab alerts acted on', 'Critical K+, lactate, culture positivity, coagulation abnormality'],
    ['Imaging / consults ordered', 'CT, echo, specialty consultation results'],
    ['Family communication', 'Updates given, concerns raised, meetings held'],
  ]),
  new Paragraph({ spacing: { after: 120 }, children: [] }),
  divider(),

  // ─── SECTION 3: VITAL SIGNS ────────────────────────────────────────────────
  h1('SECTION 3 — VITAL SIGNS & MONITORING TRENDS'),
  body('Trend at minimum over the last 24 hours. Flag any value outside oncology-specific targets.'),
  new Table({
    width: { size: 9500, type: WidthType.DXA },
    borders: {
      top: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      bottom: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      left: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      right: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      insideH: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      insideV: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
    },
    rows: [
      tableRow([
        { text: 'Parameter', width: 2200, shade: '2E74B5' },
        { text: 'Current Value', width: 2000, shade: '2E74B5' },
        { text: 'Target / Comment', width: 5300, shade: '2E74B5' },
      ], true),
      tableRow([{ text: 'Temperature (°C)', width: 2200 }, { text: '', width: 2000 }, { text: '> 38.3°C = new fever (evaluate source; if neutropenic → immediate cultures + empirical antibiotics)', width: 5300 }]),
      tableRow([{ text: 'Heart Rate (bpm)', width: 2200 }, { text: '', width: 2000 }, { text: 'Target 60–100; investigate new tachycardia (sepsis, arrhythmia, PE, pain, fluid deficit)', width: 5300 }]),
      tableRow([{ text: 'Blood Pressure (mmHg)', width: 2200 }, { text: '', width: 2000 }, { text: 'MAP ≥ 65 mmHg; reassess vasopressor need; avoid over-resuscitation in ARDS', width: 5300 }]),
      tableRow([{ text: 'Respiratory Rate (/min)', width: 2200 }, { text: '', width: 2000 }, { text: 'Target 12–20; > 25 indicates respiratory distress; correlate with ABG', width: 5300 }]),
      tableRow([{ text: 'SpO2 (%)', width: 2200 }, { text: '', width: 2000 }, { text: 'Target ≥ 94% (88–92% if COPD); trend FiO2 requirement', width: 5300 }]),
      tableRow([{ text: 'GCS / RASS Score', width: 2200 }, { text: '', width: 2000 }, { text: 'RASS target −2 to 0 for most; document CAM-ICU if applicable', width: 5300 }]),
      tableRow([{ text: 'Urine Output (mL/hr)', width: 2200 }, { text: '', width: 2000 }, { text: 'Target ≥ 0.5 mL/kg/hr; critical in TLS, nephrotoxic chemo, contrast use', width: 5300 }]),
      tableRow([{ text: 'Capillary Blood Glucose', width: 2200 }, { text: '', width: 2000 }, { text: 'Target 140–180 mg/dL; strict control in SCT and steroid-treated patients', width: 5300 }]),
      tableRow([{ text: 'Weight (kg)', width: 2200 }, { text: '', width: 2000 }, { text: 'Daily weight; > 1 kg/day change suggests fluid shift', width: 5300 }]),
    ],
  }),
  new Paragraph({ spacing: { after: 120 }, children: [] }),
  divider(),

  // ─── SECTION 4: SYSTEM REVIEW ─────────────────────────────────────────────
  h1('SECTION 4 — SYSTEM-BY-SYSTEM REVIEW'),

  // 4A Respiratory
  h2('4A. RESPIRATORY SYSTEM'),
  checkboxTable([
    ['Airway status', 'Intubated / Extubated / Tracheostomy / Natural airway; secure? Plan for today?'],
    ['Ventilator settings', 'Mode (AC/VC, PRVC, SIMV, PSV, CPAP/PEEP); FiO2; PEEP; Vt (6 mL/kg IBW); RR; Plateau P < 30 cmH2O; Driving P < 15 cmH2O'],
    ['Weaning assessment', 'SBT candidate? SAT completed? RSBI < 105? Cuff leak present?'],
    ['ABG interpretation', 'pH; PaO2; PaCO2; HCO3; P/F ratio; Classify: hypoxic / hypercapnic / mixed'],
    ['Chest imaging', 'CXR compared to prior; consolidation / effusion / pneumothorax / new infiltrate'],
    ['Pleural drainage', 'Chest tube/pigtail: output, appearance, suction setting, leak check'],
    ['Oncology-specific respiratory', 'Radiation pneumonitis? Checkpoint inhibitor pneumonitis (ICI)? Bleomycin toxicity? Leukostasis? DAH? PCP pneumonia?'],
    ['NIV / HFNO trial', 'If on HFNO: flow (L/min), FiO2; assess tolerance and response'],
  ]),
  new Paragraph({ spacing: { after: 60 }, children: [] }),
  boldPara('Oncology Respiratory Notes:'),
  bullet('ICI pneumonitis: Grade 1 — observe; Grade 2 — hold ICI, start pred 1 mg/kg/day; Grade 3–4 — hold ICI, methylprednisolone 1–2 mg/kg/day IV, consider bronchoscopy/BAL'),
  bullet('Radiation pneumonitis: typically 1–6 months post-radiation; treat with corticosteroids'),
  bullet('Bleomycin pulmonary toxicity: cumulative dose > 400 units is higher risk; avoid high FiO2 if bleomycin was used'),
  bullet('PCP pneumonia (Pneumocystis jirovecii): suspect in lymphoma/leukemia, SCT, steroids > 20 mg/day > 1 month; treat with TMP-SMX 15–20 mg/kg/day IV + adjuvant prednisone if PaO2 < 70 mmHg'),
  bullet('Leukostasis: WBC > 100,000/µL in AML/CLL; emergency leukapheresis + hydroxyurea'),
  divider(),

  // 4B Cardiovascular
  h2('4B. CARDIOVASCULAR SYSTEM'),
  checkboxTable([
    ['Hemodynamics', 'MAP, CO/CI, SVR if Swan or PiCCO/PICCO available; passive leg raise response'],
    ['Vasopressors / inotropes', 'Norepinephrine (mcg/kg/min); Vasopressin (units/hr); Dopamine; Dobutamine; weaning plan?'],
    ['Fluid balance', '24 hr balance (in vs out); cumulative balance since admission; 4-hour trends'],
    ['Fluid responsiveness', 'Pulse pressure variation > 13% = likely responsive (if no arrhythmia, no sRV failure)'],
    ['Rhythm', 'Continuous telemetry; 12-lead ECG if new event; rate control if AF'],
    ['Cardiac monitoring', 'QTc interval (target < 500 ms); troponin if suspected cardiac toxicity'],
    ['DVT / PE', 'Prophylaxis: LMWH dose-adjusted for renal function; therapeutic anticoagulation if active VTE; IVC filter if anticoagulation contraindicated'],
    ['Oncology cardiac toxicity', 'Anthracycline cardiomyopathy (cumulative doxorubicin > 550 mg/m²)? Trastuzumab cardiotoxicity? TKI-related HTN? 5-FU vasospasm? ICI myocarditis?'],
    ['Pericardial effusion', 'Check for effusion in malignant pericarditis; tamponade signs (Beck triad)?'],
  ]),
  new Paragraph({ spacing: { after: 60 }, children: [] }),
  boldPara('QTc Monitoring Targets (Oncology-Specific):'),
  bullet('Arsenic trioxide, crizotinib, vandetanib, osimertinib, vemurafenib: high QT-prolonging risk'),
  bullet('Stop or hold drug if QTc > 500 ms or increase > 60 ms from baseline'),
  bullet('Correct K+, Mg²+, Ca²+ before and during therapy'),
  divider(),

  // 4C Neurology
  h2('4C. NEUROLOGICAL SYSTEM'),
  checkboxTable([
    ['Consciousness', 'GCS (E/V/M); orientation (person/place/time); baseline vs today'],
    ['Sedation', 'RASS score; agent used (propofol mcg/kg/min; dexmedetomidine mcg/kg/hr; midazolam mg/hr); SAT performed?'],
    ['Analgesia', 'Numeric pain scale (0–10) or CPOT; opioid dose; adjuncts; multimodal plan'],
    ['Delirium', 'CAM-ICU positive/negative; ICDSC score; hyperactive vs hypoactive; non-pharm measures: reorientation, sleep hygiene, mobility'],
    ['Seizures', 'New seizure activity? AED levels if on therapy; EEG if suspected subclinical'],
    ['Focal deficit', 'New focal weakness / aphasia / ataxia? → urgent CT head or MRI; rule out CNS metastasis, PRES, stroke'],
    ['PRES', 'Posterior reversible encephalopathy: cisplatin, bevacizumab, calcineurin inhibitors; BP control; hold offending agent'],
    ['CNS status', 'Known brain metastases? Dexamethasone dose and indication? Radiation to brain?'],
    ['ICP signs', 'Headache, papilledema, Cushings triad (HTN + bradycardia + irregular respirations)?'],
  ]),
  divider(),

  // 4D Renal
  h2('4D. RENAL SYSTEM & FLUID-ELECTROLYTE BALANCE'),
  checkboxTable([
    ['Renal function', 'Creatinine + eGFR (compare to baseline); BUN; BUN/Cr ratio'],
    ['Urine output', 'Hourly UO; oliguria = < 0.5 mL/kg/hr; anuria = < 100 mL/day'],
    ['Fluid balance', 'Cumulative in/out; weight trend; peripheral/pulmonary edema'],
    ['Electrolytes', 'Na, K, Ca (ionized), Mg, Phosphate; replace deficits; oncology: hypercalcemia of malignancy, TLS electrolytes'],
    ['Acid-base', 'ABG or VBG: pH, bicarb, anion gap, lactate; HAGMA → TLS, cisplatin nephrotoxicity?'],
    ['Nephrotoxin review', 'Cisplatin, ifosfamide, methotrexate (high-dose), contrast agents, aminoglycosides, vancomycin (AUC monitoring)'],
    ['Renal replacement therapy', 'CRRT: modality (CVVHDF), effluent rate (target 20–25 mL/kg/hr), anticoagulation, filter life; dose drug adjustments?'],
    ['Diuresis strategy', 'Forced diuresis if high-dose MTX, cisplatin; furosemide target UO ≥ 100 mL/hr in TLS'],
    ['Foley catheter', 'Necessary? Indication still valid? CAUTI risk; urine culture if new fever'],
  ]),
  new Paragraph({ spacing: { after: 60 }, children: [] }),
  boldPara('Tumor Lysis Syndrome (TLS) — Daily Assessment:'),
  infoTable([
    ['TLS Risk', 'High risk: ALL (esp. hyperleukocytosis), Burkitt lymphoma, DLBCL, AML (WBC > 100K)'],
    ['Cairo-Bishop Criteria (Lab TLS)', 'Uric acid ≥ 8 mg/dL; K+ ≥ 6 mEq/L; Phosphate ≥ 6.5 mg/dL; Ca²+ ≤ 7 mg/dL — 2 or more, within 3 days before to 7 days after chemo'],
    ['Clinical TLS', 'Lab TLS + creatinine ≥ 1.5x ULN, cardiac arrhythmia, or seizure'],
    ['Daily Labs (repeat q4–8h)', 'CBC, electrolytes, creatinine, Ca, phosphate, Mg, uric acid, LDH, urinalysis'],
    ['IV Fluids', 'NS or 1/2NS at 2–3x maintenance; target UO ≥ 100–150 mL/hr; avoid urinary alkalinization routinely'],
    ['Hyperuricemia Rx', 'Allopurinol 100 mg/m² q8h (prevention); Rasburicase 0.2 mg/kg IV (treatment; contraindicated in G6PD deficiency)'],
    ['Hyperkalemia Rx', 'Calcium gluconate; insulin/dextrose; sodium bicarbonate; kayexalate/patiromer; dialysis if severe'],
    ['Hypocalcemia Rx', 'ONLY treat if symptomatic (tetany, QTc prolongation) — calcium gluconate IV; avoid overcorrection (worsens Ca-Phos precipitation)'],
    ['Hyperphosphatemia Rx', 'Sevelamer; aluminum hydroxide; restrict dietary phosphate; dialysis'],
    ['Dialysis Indications', 'Refractory hyperkalemia, severe acidosis, volume overload, creatinine rapidly rising'],
  ]),
  divider(),

  // 4E GI
  h2('4E. GASTROINTESTINAL SYSTEM & NUTRITION'),
  checkboxTable([
    ['Bowel function', 'Last bowel movement; ileus? Distension? Bowel sounds; NGT output if present'],
    ['Mucositis', 'Grade 1–4 (WHO scale); oral rinses; pain management; TPN if Grade 3–4 prevents enteral nutrition'],
    ['Nausea / Vomiting', 'Chemotherapy-induced (CINV): antiemetic regimen adequate? Ondansetron, dexamethasone, NK1 antagonist, lorazepam?'],
    ['GI bleeding', 'Hematemesis, melena, hematochezia; check Hgb trend; endoscopy indication?'],
    ['Stress ulcer prophylaxis', 'PPI or H2-blocker: indicated if ventilated > 48h, or coagulopathic; de-escalate when enteral feeds established'],
    ['Enteral nutrition (EN)', 'Route (NGT/PEG/NJT); formula; rate (mL/hr); GRV if checked; HOB ≥ 30–45°; goal calories met?'],
    ['Parenteral nutrition (PN)', 'TPN if EN not feasible (> 3 days NPO, severe mucositis, bowel obstruction); lipid-inclusive regimen; line dedicated?'],
    ['Caloric goals', 'Target: 25–30 kcal/kg/day; Protein: 1.5–2 g/kg/day (higher in catabolic/SCT patients)'],
    ['Blood glucose control', 'Target 140–180 mg/dL; insulin infusion protocol if > 180 mg/dL × 2 readings; avoid hypoglycemia < 70 mg/dL'],
    ['Liver function', 'Bilirubin, ALT, AST, ALP, GGT; veno-occlusive disease (VOD) in SCT patients? Assess for drug-induced hepatotoxicity'],
  ]),
  new Paragraph({ spacing: { after: 60 }, children: [] }),
  boldPara('Hepatic Veno-Occlusive Disease (VOD) / Sinusoidal Obstruction Syndrome (SOS):'),
  bullet('Post-SCT: weight gain, jaundice, right upper quadrant pain, hepatomegaly'),
  bullet('Baltimore criteria: bilirubin ≥ 2 mg/dL + 2 of: hepatomegaly, ascites, weight gain > 5%'),
  bullet('Treatment: defibrotide 6.25 mg/kg IV q6h x 21 days; supportive care; avoid hepatotoxins'),
  divider(),

  // 4F Hematology
  h2('4F. HEMATOLOGY & COAGULATION'),
  checkboxTable([
    ['CBC', 'Hgb (transfusion if < 7 g/dL or < 8 if symptomatic); Platelets (transfuse if < 10K, or < 20K if febrile, or < 50K if bleeding/procedure); WBC / ANC'],
    ['ANC (Absolute Neutrophil Count)', '< 500/µL = profound neutropenia; < 1000/µL = neutropenia; duration of neutropenia'],
    ['Coagulation panel', 'PT, INR, aPTT, fibrinogen, D-dimer; trend daily if DIC suspected'],
    ['DIC assessment', 'Low plts + elevated D-dimer + low fibrinogen + prolonged PT/aPTT = DIC; treat underlying cause; cryoprecipitate for fibrinogen < 100'],
    ['Transfusion record', 'pRBC, platelets, FFP, cryoprecipitate given; reaction? Type & screen current?'],
    ['Thromboprophylaxis', 'LMWH (enoxaparin 40 mg SC daily; adjust if CrCl < 30); mechanical (SCDs); contraindicated if plts < 50K'],
    ['HIT screening', 'New thrombocytopenia on heparin? 4T score; anti-PF4 antibody; switch to argatroban/bivalirudin if HIT confirmed'],
    ['Bleeding risk assessment', 'Active bleeding? Procedure planned? Anticoagulation hold required?'],
    ['G-CSF / GM-CSF', 'Indication (primary/secondary prophylaxis, active neutropenia); current dose; expected nadir timing'],
  ]),
  divider(),

  // 4G Infectious Disease
  h2('4G. INFECTION & ANTIMICROBIAL STEWARDSHIP'),
  checkboxTable([
    ['Fever evaluation', '> 38.3°C once or > 38.0°C × 1h: in neutropenic patient = emergency; send blood cultures (x2 peripheral + each lumen of CVC) within 30 min'],
    ['Active cultures', 'Blood (peripheral + central); urine (if Foley or symptoms); sputum / BAL; wound; stool (if diarrhea → C. diff)'],
    ['Empirical antibiotic regimen', 'Febrile neutropenia first-line: antipseudomonal beta-lactam (piperacillin-tazobactam 4.5g q6h, or cefepime 2g q8h, or meropenem 1g q8h)'],
    ['Vancomycin indication', 'MRSA suspected: line infection, skin/soft tissue, mucositis with gram-positive risk, hemodynamic instability, relapsed ALL/AML'],
    ['Antifungal coverage', 'Azole prophylaxis (fluconazole in standard risk); echinocandin (caspofungin) for invasive candida; voriconazole for aspergillosis (halo sign on CT)'],
    ['Antiviral coverage', 'Acyclovir for HSV/VZV reactivation; ganciclovir/valganciclovir for CMV (monitor CMV PCR in SCT); oseltamivir for influenza if positive'],
    ['Antibiotic day count', 'Day of antibiotics; de-escalate based on culture sensitivities; procalcitonin trend to guide cessation'],
    ['Source control', 'Remove infected lines; drain collections; debride wounds; consult surgery if indicated'],
    ['HAI bundle compliance', 'CVC: daily necessity review, dressing check, chlorhexidine bathing; VAP bundle: HOB 30–45°, oral decontamination; CAUTI: Foley necessity reviewed?'],
    ['Isolation precautions', 'Neutropenic precautions (protective environment: positive pressure room, HEPA filtration, masks); contact isolation if MRSA, VRE, C. diff, CPE'],
  ]),
  new Paragraph({ spacing: { after: 60 }, children: [] }),
  boldPara('Febrile Neutropenia — Time-to-Antibiotic Target: < 60 minutes from fever recognition'),
  bullet('Low-risk (MASCC score ≥ 21, expected neutropenia < 7 days): oral fluoroquinolone; consider outpatient'),
  bullet('High-risk (MASCC < 21, ANC < 100, expected nadir > 7 days, mucositis, hemodynamic instability): IV antibiotics, admit ICU if unstable'),
  bullet('Do NOT delay antibiotics to await culture results in neutropenic fever'),
  bullet('Add antifungal empirically if fever persists > 72–96h despite broad-spectrum antibiotics'),
  divider(),

  // 4H Oncology-Specific
  h2('4H. ONCOLOGY-SPECIFIC ASSESSMENTS'),

  h3('Chemotherapy Toxicity Review'),
  checkboxTable([
    ['Active agents / regimen', 'List all current and recent chemo/targeted/immunotherapy agents'],
    ['Cycle day / nadir timing', 'Expected nadir: Day 10–14 for most regimens; Day 7 for anthracycline-based'],
    ['Cardiotoxicity', 'Anthracyclines (cumulative dose?); trastuzumab (EF check q3 months?); 5-FU (ECG changes?); ICI myocarditis (troponin, echo)?'],
    ['Pulmonary toxicity', 'Bleomycin (cumulative dose); methotrexate pneumonitis; ICI pneumonitis (see 4A)'],
    ['Nephrotoxicity', 'Cisplatin (Mg wasting, tubular toxicity); high-dose MTX (leucovorin rescue, urinary alkalinization, MTX levels); ifosfamide (Fanconi syndrome)'],
    ['Neurotoxicity', 'Peripheral neuropathy (vinca alkaloids, taxanes, bortezomib); PRES (cisplatin, bevacizumab); encephalopathy (ifosfamide → treat with methylene blue)'],
    ['Gastrointestinal', 'Mucositis grade; diarrhea (ICI colitis vs. infection); hepatotoxicity; pancreatitis (L-asparaginase)'],
    ['Immune-related AEs (irAE)', 'Grade irAE in each organ: lung, gut, liver, endocrine, skin, neuro; hold ICI per grade; steroids per protocol'],
    ['Targeted therapy specific', 'VEGF-TKI: HTN, fistula, wound healing; ALK/EGFR inhibitor: interstitial lung disease; CDK4/6 inhibitor: myelosuppression; BCR-ABL: pleural effusion (dasatinib)'],
    ['CAR-T / SCT specific', 'CRS (cytokine release syndrome): Grade 1–4; tocilizumab 8 mg/kg IV if Grade 2+; ICANS (immune effector cell–associated neurotoxicity syndrome); GVHD grading'],
  ]),

  h3('Metabolic Oncologic Emergencies'),
  infoTable([
    ['Hypercalcemia of Malignancy', 'Ca > 12 mg/dL: IV NS 200–300 mL/hr; zoledronic acid 4 mg IV (onset 24–48h); calcitonin 4 IU/kg q12h for rapid effect; denosumab if renal failure; dialysis if refractory'],
    ['SIADH', 'Hyponatremia (Na < 135) + concentrated urine + euvolemia; restrict free water < 1L/day; tolvaptan if severe; 3% NaCl if symptomatic (seizure)'],
    ['Adrenal Insufficiency', 'Suspect in long-term steroid use or bilateral adrenal metastases; random cortisol + ACTH stim test; hydrocortisone 50–100 mg q8h IV if crisis'],
    ['Tumor Lysis Syndrome', 'See Section 4D above for full protocol'],
    ['Spinal Cord Compression', 'Back pain + weakness + sensory level + bowel/bladder dysfunction; urgent MRI spine; dexamethasone 10 mg IV bolus then 4 mg q6h; radiation/surgery'],
    ['SVC Syndrome', 'Facial/arm swelling, plethora, JVD, dyspnea; CT chest with contrast; stent or radiation; anticoagulation if thrombotic component'],
    ['Leukostasis', 'WBC > 100K + respiratory/neuro symptoms; leukapheresis + hydroxyurea; avoid RBC transfusion (increases viscosity); urgent hematology consult'],
  ]),
  divider(),

  // 4I Lines & Devices
  h2('4I. LINES, TUBES & DEVICES'),
  checkboxTable([
    ['CVC / PICC / Port', 'Type, site, days in situ; necessity review; insertion site inspection (erythema, discharge, tenderness); dressing change due?'],
    ['Arterial line', 'Site; waveform quality; zeroed; distal perfusion check; necessity review'],
    ['Endotracheal tube', 'ETT size, position (CXR cm at lip); cuff pressure 20–30 cmH2O; suction plan'],
    ['Tracheostomy', 'Type, size; stoma care; inner cannula change; cuff check'],
    ['Urinary catheter', 'Days in place; CAUTI prevention; consider removal if not clinically required'],
    ['Nasogastric / Nasoenteric tube', 'Position confirmed (CXR or pH); feeds running; mark tube at nostril'],
    ['Chest tube', 'Drainage character (mL/shift); air leak; suction vs. water seal; removal criteria met?'],
    ['Wound / Drains', 'Surgical drains: type, output, character; wound assessment'],
    ['ICP Monitor', 'If present: ICP readings; CPP target (50–70 mmHg); CSF drainage'],
    ['Renal replacement therapy (CRRT)', 'Access site; circuit pressure alarms; filter down time; anticoagulation (citrate/heparin); effluent targets'],
  ]),
  divider(),

  // 4J Skin & Mobility
  h2('4J. SKIN, MOBILITY & REHABILITATION'),
  checkboxTable([
    ['Pressure injury assessment', 'Braden scale; high-risk areas: sacrum, heels, occiput, elbows; turn q2h; specialty mattress if Braden ≤ 12'],
    ['Wound assessment', 'Surgical / radiation skin damage; chemotherapy extravasation site (assess for necrosis); GVHD skin manifestations'],
    ['Early mobilization', 'ICU mobility scale (0–8); PT/OT consult; passive range of motion at minimum; sedation interruption to allow activity'],
    ['VTE prevention (mechanical)', 'Sequential compression devices (SCDs) when pharmacologic prophylaxis contraindicated; check lower extremity perfusion'],
    ['Oral hygiene', 'Chlorhexidine rinse q12h (VAP bundle); mucositis care protocol; lip moisturizer'],
    ['Ophthalmologic care', 'Lubricating eye drops q4h in unconscious patients; eyelid taping if incomplete closure'],
  ]),
  divider(),

  // ─── SECTION 5: LAB REVIEW ────────────────────────────────────────────────
  h1('SECTION 5 — DAILY LABORATORY REVIEW'),
  body('Check and trend the following labs each morning. Flag any critical values immediately.'),
  new Table({
    width: { size: 9500, type: WidthType.DXA },
    borders: {
      top: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      bottom: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      left: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      right: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      insideH: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      insideV: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
    },
    rows: [
      tableRow([
        { text: 'Lab Group', width: 2200, shade: '2E74B5' },
        { text: 'Tests', width: 3600, shade: '2E74B5' },
        { text: 'Oncology Action Threshold', width: 3700, shade: '2E74B5' },
      ], true),
      tableRow([{ text: 'CBC with differential', width: 2200 }, { text: 'WBC, ANC, Hgb, Hct, Platelets', width: 3600 }, { text: 'ANC < 500: neutropenic precautions + empiric ATB if febrile; Hgb < 7: transfuse; Plt < 10K: transfuse', width: 3700 }]),
      tableRow([{ text: 'Metabolic panel', width: 2200 }, { text: 'Na, K, Cl, CO2, BUN, Cr, Glucose', width: 3600 }, { text: 'K > 5.5 or < 3.0: treat; Cr rise > 0.3 mg/dL: AKI workup; Glucose > 180: insulin protocol', width: 3700 }]),
      tableRow([{ text: 'Liver function', width: 2200 }, { text: 'AST, ALT, ALP, GGT, bilirubin (total/direct), albumin', width: 3600 }, { text: 'ALT > 3x ULN: review hepatotoxic agents; bilirubin rising: VOD, biliary obstruction, hemolysis?', width: 3700 }]),
      tableRow([{ text: 'TLS panel', width: 2200 }, { text: 'Uric acid, LDH, phosphate, ionized Ca, Mg', width: 3600 }, { text: 'Uric acid > 8: rasburicase; Phosphate > 6.5: sevelamer; Ca < 7 (symptomatic): calcium gluconate', width: 3700 }]),
      tableRow([{ text: 'Coagulation', width: 2200 }, { text: 'PT, INR, aPTT, fibrinogen, D-dimer, thromboelastography (TEG) if available', width: 3600 }, { text: 'DIC: low fibrinogen < 100 → cryoprecipitate; INR > 2 with bleeding → FFP', width: 3700 }]),
      tableRow([{ text: 'Inflammatory / Infection', width: 2200 }, { text: 'CRP, procalcitonin, ferritin (CRS), ESR', width: 3600 }, { text: 'Ferritin > 10,000: HLH or CRS (CAR-T); PCT trend to guide antibiotic de-escalation', width: 3700 }]),
      tableRow([{ text: 'ABG / Lactate', width: 2200 }, { text: 'pH, PaO2, PaCO2, HCO3, SpO2, lactate', width: 3600 }, { text: 'Lactate > 2: sepsis workup; P/F < 300: moderate ARDS; P/F < 100: severe ARDS', width: 3700 }]),
      tableRow([{ text: 'Drug levels / Monitoring', width: 2200 }, { text: 'Vancomycin AUC/MIC (target AUC 400–600); MTX levels (with leucovorin rescue); cyclosporin / tacrolimus trough', width: 3600 }, { text: 'Adjust dosing accordingly; consult pharmacy', width: 3700 }]),
      tableRow([{ text: 'Endocrine', width: 2200 }, { text: 'Thyroid function (q1–4 weeks on ICI); morning cortisol; HbA1c (at admission)', width: 3600 }, { text: 'ICI hypothyroidism: levothyroxine; ICI adrenalitis: hydrocortisone replacement', width: 3700 }]),
    ],
  }),
  new Paragraph({ spacing: { after: 120 }, children: [] }),
  divider(),

  // ─── SECTION 6: MEDICATION REVIEW ────────────────────────────────────────
  h1('SECTION 6 — DAILY MEDICATION RECONCILIATION'),
  checkboxTable([
    ['Renal dose adjustments', 'eGFR trend; dose-adjust: LMWH, antibiotics (vancomycin, piperacillin-taz, carbapenems), antivirals, electrolyte replacement'],
    ['Hepatic dose adjustments', 'Total bilirubin; dose-adjust: vincristine (hold if bili > 3), doxorubicin, paclitaxel, irinotecan; avoid NSAIDs'],
    ['Drug-drug interactions', 'Azole antifungals + TKIs (CYP3A4 inhibition); warfarin + antibiotics; QT-prolonging combinations'],
    ['Anticoagulation review', 'Type, dose, indication; therapeutic range; hold before procedures; reversal agents available?'],
    ['Antiemetics', 'Scheduled vs. PRN; 5-HT3 antagonist; dexamethasone; lorazepam; aprepitant; metoclopramide'],
    ['Corticosteroids', 'Indication (irAE, edema, CINV, adrenal insufficiency); dose; taper plan; PCP prophylaxis if > 20 mg/day > 4 weeks'],
    ['PPI / H2 blocker', 'Indication still valid? De-escalate if on enteral feeds without ventilation or coagulopathy'],
    ['Vasopressors', 'Type, rate, trend; escalating or weaning; assess response; avoid excessive fluid boluses'],
    ['Blood products', 'Irradiated / leukoreduced / CMV-negative products for SCT, lymphoma, immunosuppressed; consent?'],
    ['Insulin protocol', 'Active infusion protocol? POC glucose frequency; hypoglycemia management plan'],
    ['Formulary / Formulary substitutions', 'Brand-to-generic substitutions safe? Oncology drugs: confirm exact formulation (e.g., liposomal vs. conventional doxorubicin)'],
  ]),
  divider(),

  // ─── SECTION 7: GOALS OF CARE ─────────────────────────────────────────────
  h1('SECTION 7 — GOALS OF CARE & COMMUNICATION'),
  checkboxTable([
    ['Code status', 'Full code / DNR / DNI / DNR-DNI; documented and visible on chart; consistent with patient wishes'],
    ['Family meeting', 'Last meeting date; key messages communicated; interpreter needed?'],
    ['Prognosis discussion', 'Has oncologist provided updated prognosis? ICU team aligned with oncology on expected course?'],
    ['Comfort measures', 'Symptom burden addressed: pain, dyspnea, anxiety, nausea; palliative care consult placed?'],
    ['Futility review', 'If patient not responding to maximal ICU therapy: ethics consult; palliative care involvement; trial of therapy timeframe set?'],
    ['Advance directives', 'Living will / healthcare proxy documented; surrogate decision-maker identified'],
    ['Spiritual / Psychosocial support', 'Chaplaincy; social work consult; family visitation plan; cultural considerations'],
    ['Chemotherapy continuation', 'Can therapy be safely continued in ICU? Risk/benefit discussion with oncology; dose modification needed?'],
  ]),
  divider(),

  // ─── SECTION 8: DAILY PLAN ────────────────────────────────────────────────
  h1('SECTION 8 — DAILY PLAN & ORDERS'),
  body('Complete a structured problem list with plan for each active issue. Communicate clearly to the bedside nurse.'),
  infoTable([
    ['Problem #1', ''],
    ['Plan', ''],
    ['Problem #2', ''],
    ['Plan', ''],
    ['Problem #3', ''],
    ['Plan', ''],
    ['Problem #4', ''],
    ['Plan', ''],
    ['Labs to order today', ''],
    ['Imaging to order today', ''],
    ['Procedures today', ''],
    ['Consults requested', ''],
    ['Anticipated transfers / disposition', ''],
    ['Target for tomorrow', ''],
  ]),
  divider(),

  // ─── SECTION 9: BUNDLE COMPLIANCE ────────────────────────────────────────
  h1('SECTION 9 — ICU QUALITY BUNDLE COMPLIANCE (Daily Confirmation)'),
  body('The ABCDEF Bundle (Liberation Bundle) adapted for oncology ICU:'),
  new Table({
    width: { size: 9500, type: WidthType.DXA },
    borders: {
      top: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      bottom: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      left: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      right: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      insideH: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
      insideV: { style: BorderStyle.SINGLE, size: 1, color: 'CCCCCC' },
    },
    rows: [
      tableRow([
        { text: 'Bundle Element', width: 500, shade: '2E74B5' },
        { text: 'Component', width: 2500, shade: '2E74B5' },
        { text: 'Today Done?', width: 1500, shade: '2E74B5' },
        { text: 'Notes', width: 5000, shade: '2E74B5' },
      ], true),
      tableRow([{ text: 'A', width: 500, shade: 'DEEAF1' }, { text: 'Assess / Manage Pain', width: 2500 }, { text: '☐ Yes  ☐ No', width: 1500 }, { text: 'CPOT or NRS ≤ 3 target; multimodal; opioid-sparing preferred', width: 5000 }]),
      tableRow([{ text: 'B', width: 500, shade: 'DEEAF1' }, { text: 'Both SAT & SBT', width: 2500 }, { text: '☐ Yes  ☐ No', width: 1500 }, { text: 'SAT: hold sedation, assess wake-up; SBT: PS 5/PEEP 5 for 30–120 min if SAT passed; document result', width: 5000 }]),
      tableRow([{ text: 'C', width: 500, shade: 'DEEAF1' }, { text: 'Choice of Analgesia/Sedation', width: 2500 }, { text: '☐ Yes  ☐ No', width: 1500 }, { text: 'Light sedation (RASS −1 to 0) preferred; avoid benzodiazepines; propofol or dexmedetomidine favored', width: 5000 }]),
      tableRow([{ text: 'D', width: 500, shade: 'DEEAF1' }, { text: 'Delirium Assess/Manage', width: 2500 }, { text: '☐ Yes  ☐ No', width: 1500 }, { text: 'CAM-ICU or ICDSC; non-pharm first; haloperidol 0.5–2 mg q6h if agitated; quetiapine if prolonged', width: 5000 }]),
      tableRow([{ text: 'E', width: 500, shade: 'DEEAF1' }, { text: 'Early Mobility/Exercise', width: 2500 }, { text: '☐ Yes  ☐ No', width: 1500 }, { text: 'ICU mobility scale; PROM if immobile; OOB to chair if feasible; PT/OT consult', width: 5000 }]),
      tableRow([{ text: 'F', width: 500, shade: 'DEEAF1' }, { text: 'Family Engagement', width: 2500 }, { text: '☐ Yes  ☐ No', width: 1500 }, { text: 'Family updated today; invited to rounds; care team meeting scheduled?', width: 5000 }]),
    ],
  }),
  new Paragraph({ spacing: { after: 120 }, children: [] }),

  boldPara('Additional Oncology ICU Quality Metrics:'),
  checkboxTable([
    ['Neutropenic protective isolation compliance', 'Positive pressure room; HEPA filtered; mask on entry; no fresh flowers/plants/raw produce'],
    ['Chemotherapy safe handling', 'PPE for handling hazardous drugs; closed system transfer; waste disposal per protocol'],
    ['CRS monitoring (CAR-T patients)', 'Fever + hypotension + hypoxia: Grade 1–4 CRS; tocilizumab 8 mg/kg IV (Grade 2+); ICU-level monitoring for Grade 3–4'],
    ['GVHD surveillance (SCT patients)', 'Skin (erythema, bullae); gut (diarrhea volume); liver (bilirubin); grading and treatment escalation per protocol'],
    ['Radiation recall monitoring', 'New skin inflammation at prior radiation site with chemotherapy rechallenge'],
    ['Second primary infection prophylaxis', 'Acyclovir/valacyclovir for HSV/VZV; fluconazole or voriconazole per protocol; PCP prophylaxis (TMP-SMX or dapsone/atovaquone)'],
  ]),
  divider(),

  // ─── SECTION 10: HANDOFF ──────────────────────────────────────────────────
  h1('SECTION 10 — END-OF-ROUND HANDOFF & COMMUNICATION'),
  infoTable([
    ['SBAR Summary Situation', '(Patient X is a __ year old with __ cancer, ICU day __, admitted for __)'],
    ['Background', '(Disease course, recent chemo, relevant comorbidities)'],
    ['Assessment', '(Current status: stable/improving/deteriorating; active problems)'],
    ['Recommendation', '(Today\'s plan; key actions; overnight watch items)'],
    ['Anticipated deterioration triggers', '(If X happens → do Y; notify attending if Z occurs)'],
    ['Upcoming procedures', '(Timing, consent status, NPO requirements, blood product availability)'],
    ['Family contact plan', '(Who to call; what they know; what is pending)'],
  ]),

  new Paragraph({ spacing: { after: 200 }, children: [] }),
  new Paragraph({
    children: [new TextRun({ text: 'Document prepared for: Oncology ICU Daily Rounds | Version 1.0 | June 2026', size: 18, color: '808080', italics: true })],
    alignment: AlignmentType.CENTER,
  }),
];

// ─── CREATE DOCUMENT ──────────────────────────────────────────────────────────

const doc = new Document({
  creator: 'Orris Medical AI',
  title: 'Oncology ICU Daily Rounds - Systematic Evaluation Guide',
  description: 'A systematic document for conducting daily ICU rounds on oncology patients',
  styles: {
    default: {
      document: {
        run: { font: 'Calibri', size: 22 },
      },
      heading1: {
        run: { bold: true, size: 28, color: '2E74B5' },
        paragraph: { spacing: { before: 360, after: 120 } },
      },
      heading2: {
        run: { bold: true, size: 24, color: '1F4E79' },
        paragraph: { spacing: { before: 280, after: 80 } },
      },
      heading3: {
        run: { bold: true, size: 22, color: '2E74B5', italics: true },
        paragraph: { spacing: { before: 200, after: 60 } },
      },
    },
  },
  sections: [
    {
      properties: {
        page: {
          margin: {
            top: 720,
            right: 720,
            bottom: 720,
            left: 720,
          },
        },
      },
      headers: {
        default: new Header({
          children: [
            new Paragraph({
              children: [
                new TextRun({ text: 'ONCOLOGY ICU — DAILY ROUNDS SYSTEMATIC GUIDE', bold: true, size: 18, color: '2E74B5' }),
                new TextRun({ text: '\t\t', size: 18 }),
                new TextRun({ text: 'Page: ', size: 18, color: '808080' }),
              ],
              alignment: AlignmentType.LEFT,
              border: { bottom: { style: BorderStyle.SINGLE, size: 4, color: '2E74B5' } },
            }),
          ],
        }),
      },
      footers: {
        default: new Footer({
          children: [
            new Paragraph({
              children: [
                new TextRun({ text: 'Oncology ICU Daily Rounds Guide | Confidential — For Clinical Use Only | Version 1.0 — June 2026', size: 16, color: '808080', italics: true }),
              ],
              alignment: AlignmentType.CENTER,
              border: { top: { style: BorderStyle.SINGLE, size: 4, color: '2E74B5' } },
            }),
          ],
        }),
      },
      children,
    },
  ],
});

Packer.toBuffer(doc).then((buffer) => {
  fs.writeFileSync('/home/daytona/workspace/oncology-icu-rounds/Oncology_ICU_Daily_Rounds_Guide.docx', buffer);
  console.log('Document created successfully!');
}).catch(err => {
  console.error('Error creating document:', err);
  process.exit(1);
});
Running Command

cd /home/daytona/workspace/oncology-icu-rounds && node generate_rounds_doc.js 2>&1

Running Command

python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/oncology-icu-rounds/Oncology_ICU_Daily_Rounds_Guide.docx 2>&1

Running Command

ls -lh /home/daytona/workspace/oncology-icu-rounds/ && python3 -c "import zipfile; z = zipfile.ZipFile('/home/daytona/workspace/oncology-icu-rounds/Oncology_ICU_Daily_Rounds_Guide.docx'); print('ZIP OK, files:', z.namelist()[:8])"

The document is valid (proper ZIP/DOCX structure, 28KB). Here is your complete guide:

Oncology ICU Daily Rounds Guide

Word Document · DOCX


What's Inside the Document

The guide is structured into 10 sections with color-coded tables, checkboxes, and oncology-specific action thresholds:

Section 1 - Patient Snapshot

A summary table capturing malignancy type/stage, current regimen, cycle day, reason for admission, and code status - to orient the entire rounding team in 30 seconds.

Section 2 - Overnight Events & 24-Hour Summary

Checkbox table for overnight clinical events, interventions performed, medication changes, lab alerts acted on, and family communication.

Section 3 - Vital Signs & Monitoring Trends

Tabular review of all vital parameters with oncology-specific targets (e.g., fever threshold in neutropenic patients, urine output target for TLS).

Section 4 - System-by-System Review (9 subsystems)

SubsystemKey Oncology Overlays
4A RespiratoryICI pneumonitis grading, bleomycin FiO2 precaution, PCP treatment, leukostasis
4B CardiovascularAnthracycline cardiomyopathy, QTc monitoring for targeted agents, ICI myocarditis
4C NeurologyPRES (cisplatin/bevacizumab), CNS metastases, ifosfamide encephalopathy (methylene blue)
4D Renal / FluidsFull TLS protocol (Cairo-Bishop criteria, rasburicase, dialysis indications), cisplatin nephrotoxicity
4E GI / NutritionMucositis grading, VOD/SOS in SCT (defibrotide), CINV antiemetics, TPN indications
4F HematologyANC thresholds, DIC assessment, G-CSF use, HIT screening, transfusion triggers
4G InfectionFebrile neutropenia < 60 min antibiotic rule, MASCC risk scoring, antifungal escalation, HAI bundles
4H Oncology-SpecificChemotherapy toxicity review, metabolic emergencies (hypercalcemia, SIADH, spinal cord compression, SVC, leukostasis), CRS/ICANS grading for CAR-T, GVHD
4I-J Lines, Skin & MobilityCAUTI/CLABSI prevention, pressure injury (Braden), early mobility (ICU scale)

Section 5 - Daily Lab Review

Nine lab groups with oncology action thresholds - including TLS panel (uric acid, LDH, phosphate, ionized Ca), ferritin for HLH/CRS, drug level monitoring (vancomycin AUC, MTX levels, calcineurin inhibitor troughs).

Section 6 - Medication Reconciliation

Renal/hepatic dose adjustments, drug-drug interactions (azoles + TKIs), irradiated/CMV-negative blood products for immunocompromised patients, antiemetic adequacy.

Section 7 - Goals of Care

Code status, family meeting documentation, chemotherapy continuation risk-benefit, palliative care integration, ethics consultation trigger points.

Section 8 - Daily Problem List & Orders

Structured problem-plan format with space for labs, imaging, procedures, consults, and next-day targets.

Section 9 - ABCDEF Bundle + Oncology Add-Ons

Liberation bundle (A-Pain, B-SAT/SBT, C-Sedation choice, D-Delirium, E-Mobility, F-Family) plus neutropenic isolation compliance, CRS monitoring for CAR-T, GVHD surveillance, chemotherapy safe handling.

Section 10 - SBAR Handoff Template

Structured handoff covering situation, background, assessment, recommendation, anticipated deterioration triggers, upcoming procedures, and family contact plan.
This is a shared conversation. Sign in to Orris to start your own chat.