patient with ef 20 % management

Reading File
Finding Sources
Searching PubMed

"heart failure" AND "reduced ejection fraction" AND management

Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
I now have comprehensive information from multiple authoritative textbooks. Let me compile the full response.

Management of Heart Failure with EF 20% (Severely Reduced EF / HFrEF)

An EF of 20% represents severely reduced ejection fraction (HFrEF, defined as EF <40%). This is ACC/AHA Stage C (symptomatic structural heart disease) or Stage D if refractory. The goals are to reduce mortality, prevent hospitalizations, reverse ventricular remodeling, and improve functional status.

1. The "Four Pillars" - Foundational Pharmacotherapy

These four drug classes have proven mortality benefit and should be initiated in all eligible patients (NYHA class II-IV):

A. ARNI (Sacubitril/Valsartan) - FIRST LINE

  • Mechanism: Neprilysin inhibitor + ARB; augments natriuretic peptides, reduces fibrosis and hypertrophy, causes vasodilation and natriuresis
  • Preferred over ACE inhibitor whenever tolerated - shown to be superior in PARADIGM-HF
  • Starting dose: Sacubitril/valsartan 24/26 mg twice daily; target 97/103 mg twice daily
  • CRITICAL: Must have a 36-hour washout if switching FROM an ACE inhibitor (risk of angioedema)
  • If ARNI not tolerated: use ACE inhibitor (e.g., enalapril 2.5 mg twice daily, target 10-20 mg twice daily; or lisinopril 2.5-5 mg OD, target 20-35 mg OD) OR ARB (candesartan 4-8 mg OD, target 32 mg OD)

B. Beta-Blocker

  • Drugs with proven mortality benefit: bisoprolol, carvedilol, metoprolol succinate (extended-release), nebivolol
  • Initiate at low doses and uptitrate slowly (months required before full benefit seen)
  • Mechanism: attenuates excess catecholamine toxicity on the myocardium; reduces heart rate, promotes reverse remodeling
  • Typically causes a slight rise in EF over months

C. Mineralocorticoid Receptor Antagonist (MRA)

  • Spironolactone 25-50 mg/day or eplerenone 25-50 mg/day
  • Reduces mortality, morbidity, and hospitalizations in moderate-to-severe HF (RALES trial)
  • Monitor potassium closely (K+ <5.0 mmol/L) and renal function (Cr <2.5 mg/dL)
  • Avoid if GFR <30

D. SGLT2 Inhibitor

  • Dapagliflozin 10 mg OD or empagliflozin 10 mg OD
  • Reduces cardiovascular death, HF hospitalization, and slows eGFR decline
  • Benefits occur regardless of diabetes status
  • Works even when added on top of ARNI + beta-blocker + MRA
These four together form the current standard "quadruple therapy" for HFrEF. - Goldman-Cecil Medicine, p. 3051

2. Diuretics (Symptom Relief)

  • Loop diuretics (furosemide, torasemide) are the mainstay for fluid overload and dyspnea relief
  • Sodium restriction (dietary) + diuresis = cornerstone of symptomatic management
  • Thiazides may suffice in very mild cases; loop agents required in most with EF 20%
  • Sodium loss causes secondary K+ loss - supplement potassium or add ACE inhibitor/MRA
  • SGLT2 inhibitors also cause natriuresis and complement loop diuretics

3. Additional Agents in Selected Patients

DrugIndication
IvabradineHeart rate >70 bpm despite maximum beta-blocker, sinus rhythm; reduces hospitalizations
Hydralazine + Isosorbide dinitrate (BiDil)Self-identified Black patients; alternative when ARNI/ACE inhibitor/ARB not tolerated
DigoxinHF with atrial fibrillation (rate control); can reduce symptoms/hospitalizations when added to diuretic + ACE inhibitor, but does NOT reduce mortality
VericiguatRecent HF hospitalization or IV diuretics despite optimal quadruple therapy; 2.5 mg OD starting, target 10 mg OD; reduces HF hospitalizations (but not mortality)
  • Katzung's Basic and Clinical Pharmacology, p. 831-842; Goldman-Cecil Medicine, p. 3433-3441

4. Device Therapy

Implantable Cardioverter-Defibrillator (ICD)

  • Indicated in patients with EF ≤35% despite at least 3 months of optimal medical therapy, NYHA class II-III, expected survival >1 year
  • Reduces sudden cardiac death (the most common mode of death in HFrEF)
  • Also indicated in EF ≤30% with NYHA class I (non-ischemic or ischemic)

Cardiac Resynchronization Therapy (CRT)

  • Indicated when EF ≤35% + QRS ≥150 ms (especially LBBB morphology) + NYHA class II-IV
  • Restores synchronized biventricular contraction, reduces mitral regurgitation
  • Improves EF, symptoms, quality of life, and mortality
  • About 30% of HFrEF patients have significant QRS prolongation making them candidates
In many patients with EF 20% and wide QRS, CRT-D (combined device) is preferable.
  • Goldman-Cecil Medicine, p. 3631-3660

5. Advanced / Stage D Heart Failure

If the patient has refractory symptoms despite optimal medical + device therapy (Stage D):
OptionNotes
Left Ventricular Assist Device (LVAD)Destination therapy or bridge to transplant; significantly improves survival and quality of life in end-stage HF
Heart TransplantationGold standard for eligible patients (<65-70 yr, no comorbidities excluding transplant); 1-year survival ~85%, 5-year ~75%
Chronic inotropes (dobutamine, milrinone)Bridge to transplant/LVAD or palliative intent only; NOT for long-term use
Palliative/Hospice careFor patients not transplant/LVAD candidates; focus on symptom relief and quality of life

6. General/Non-Pharmacologic Measures

  • Sodium restriction (<2 g/day) and fluid restriction if hyponatremic
  • Daily weight monitoring (alert if >2 kg gain in 2 days)
  • Cardiac rehabilitation and supervised exercise training (improves functional capacity and outcomes)
  • Smoking cessation, alcohol abstinence (alcohol is a direct cardiomyotoxin)
  • Treat underlying causes: revascularize if ischemic etiology, manage hypertension, control AF rate/rhythm
  • Avoid: NSAIDs, non-dihydropyridine calcium channel blockers (diltiazem, verapamil), Class I antiarrhythmics, thiazolidinediones

7. Monitoring

  • Electrolytes (K+, Na+, Mg2+) and renal function after initiation/uptitration of ACE/ARNI/MRA
  • BNP/NT-proBNP as guide to decongestion and treatment response
  • Repeat echocardiogram at 3-6 months to assess EF response ("HFimpEF" if EF improves to ≥50%)
  • Thyroid function, iron studies (iron deficiency is common and treatable with IV iron, improves outcomes)

Summary Algorithm

EF 20% (HFrEF)
│
├── CONGESTION? → Loop diuretic (furosemide)
│
├── START QUADRUPLE THERAPY (uptitrate all):
│     1. ARNI (sacubitril/valsartan) or ACE-I/ARB
│     2. Beta-blocker (bisoprolol/carvedilol/metoprolol)
│     3. MRA (spironolactone/eplerenone)
│     4. SGLT2i (dapagliflozin/empagliflozin)
│
├── DEVICE ASSESSMENT at 3 months (if EF still ≤35%):
│     • QRS ≥150 ms + LBBB → CRT-D
│     • No CRT indication → ICD alone
│
├── STILL SYMPTOMATIC?
│     • Ivabradine (if HR >70, sinus rhythm)
│     • Vericiguat (post-hospitalization)
│     • Hydralazine/nitrate (Black patients, or ARNI/ACE intolerant)
│     • Digoxin (AF or persistent symptoms)
│
└── REFRACTORY (Stage D):
      • LVAD (destination therapy or bridge to transplant)
      • Heart transplantation
      • Chronic inotropes (palliative only)
      • Hospice/palliative care

Sources: Goldman-Cecil Medicine (International Ed.), Katzung's Basic and Clinical Pharmacology 16th Ed., Braunwald's Heart Disease. Recent 2025 iCARDIO Alliance Global Implementation Guidelines on Heart Failure (PMID 40533340) confirm that quadruple therapy (ARNI + beta-blocker + MRA + SGLT2i) remains the foundation of HFrEF management.

Create a patient education handout on HFrEF management and diet

Reading File
Running Command

ls /home/daytona/workspace/ && mkdir -p /home/daytona/workspace/hfref-handout

Writing File

~/hfref-handout/create_handout.js

const {
  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
  HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType,
  VerticalAlign, TableLayoutType
} = require('docx');
const fs = require('fs');

// Color palette
const DARK_BLUE   = "1A3C6E";
const MED_BLUE    = "2E6DA4";
const LIGHT_BLUE  = "D6E8FA";
const RED_WARN    = "C0392B";
const GREEN_OK    = "1E7E34";
const YELLOW_BG   = "FFF9C4";
const ORANGE_BG   = "FFE0B2";
const GREY_RULE   = "CCCCCC";
const WHITE       = "FFFFFF";

function heading1(text) {
  return new Paragraph({
    children: [new TextRun({ text, bold: true, size: 32, color: WHITE, font: "Calibri" })],
    heading: HeadingLevel.HEADING_1,
    shading: { type: ShadingType.SOLID, color: DARK_BLUE },
    spacing: { before: 240, after: 120 },
    indent: { left: 120, right: 120 },
  });
}

function heading2(text) {
  return new Paragraph({
    children: [new TextRun({ text, bold: true, size: 26, color: WHITE, font: "Calibri" })],
    shading: { type: ShadingType.SOLID, color: MED_BLUE },
    spacing: { before: 200, after: 80 },
    indent: { left: 100, right: 100 },
  });
}

function heading3(text) {
  return new Paragraph({
    children: [new TextRun({ text, bold: true, size: 22, color: DARK_BLUE, font: "Calibri" })],
    spacing: { before: 160, after: 60 },
    border: { bottom: { style: BorderStyle.SINGLE, size: 4, color: MED_BLUE } },
  });
}

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

function bullet(text, bold_prefix = "") {
  return new Paragraph({
    children: [
      bold_prefix ? new TextRun({ text: bold_prefix + " ", bold: true, size: 20, font: "Calibri" }) : new TextRun(""),
      new TextRun({ text, size: 20, font: "Calibri" }),
    ],
    bullet: { level: 0 },
    spacing: { before: 40, after: 40 },
  });
}

function subbullet(text) {
  return new Paragraph({
    children: [new TextRun({ text, size: 19, font: "Calibri", color: "444444" })],
    bullet: { level: 1 },
    spacing: { before: 30, after: 30 },
  });
}

function warningBox(lines) {
  const children = lines.map(l =>
    new Paragraph({
      children: [new TextRun({ text: l, size: 20, font: "Calibri", color: RED_WARN, bold: true })],
      spacing: { before: 40, after: 40 },
      indent: { left: 120, right: 120 },
    })
  );
  return new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [new TableRow({ children: [new TableCell({
      shading: { type: ShadingType.SOLID, color: "FDECEA" },
      borders: { top: { style: BorderStyle.SINGLE, size: 8, color: RED_WARN },
                 bottom: { style: BorderStyle.SINGLE, size: 8, color: RED_WARN },
                 left: { style: BorderStyle.SINGLE, size: 8, color: RED_WARN },
                 right: { style: BorderStyle.SINGLE, size: 8, color: RED_WARN } },
      children,
    })]})],
  });
}

function infoBox(lines, bgColor = LIGHT_BLUE) {
  const children = lines.map(l =>
    new Paragraph({
      children: [new TextRun({ text: l, size: 20, font: "Calibri" })],
      spacing: { before: 40, after: 40 },
      indent: { left: 120, right: 120 },
    })
  );
  return new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [new TableRow({ children: [new TableCell({
      shading: { type: ShadingType.SOLID, color: bgColor },
      borders: { top: { style: BorderStyle.SINGLE, size: 6, color: MED_BLUE },
                 bottom: { style: BorderStyle.SINGLE, size: 6, color: MED_BLUE },
                 left: { style: BorderStyle.SINGLE, size: 6, color: MED_BLUE },
                 right: { style: BorderStyle.SINGLE, size: 6, color: MED_BLUE } },
      children,
    })]})],
  });
}

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

function twoColRow(left, right, leftBold = false) {
  return new TableRow({
    children: [
      new TableCell({
        width: { size: 40, type: WidthType.PERCENTAGE },
        shading: { type: ShadingType.SOLID, color: LIGHT_BLUE },
        children: [new Paragraph({
          children: [new TextRun({ text: left, size: 19, font: "Calibri", bold: leftBold })],
          spacing: { before: 40, after: 40 },
          indent: { left: 80 },
        })],
      }),
      new TableCell({
        width: { size: 60, type: WidthType.PERCENTAGE },
        children: [new Paragraph({
          children: [new TextRun({ text: right, size: 19, font: "Calibri" })],
          spacing: { before: 40, after: 40 },
          indent: { left: 80 },
        })],
      }),
    ],
  });
}

function foodRow(food, reason, good = true) {
  return new TableRow({
    children: [
      new TableCell({
        width: { size: 50, type: WidthType.PERCENTAGE },
        shading: { type: ShadingType.SOLID, color: good ? "E8F5E9" : "FDECEA" },
        children: [new Paragraph({
          children: [new TextRun({ text: food, size: 19, font: "Calibri", bold: true, color: good ? GREEN_OK : RED_WARN })],
          spacing: { before: 40, after: 40 },
          indent: { left: 80 },
        })],
      }),
      new TableCell({
        width: { size: 50, type: WidthType.PERCENTAGE },
        children: [new Paragraph({
          children: [new TextRun({ text: reason, size: 19, font: "Calibri" })],
          spacing: { before: 40, after: 40 },
          indent: { left: 80 },
        })],
      }),
    ],
  });
}

// ─── Document ───────────────────────────────────────────────────────────────
const doc = new Document({
  styles: {
    default: { document: { run: { font: "Calibri", size: 20 } } }
  },
  sections: [{
    properties: { page: { margin: { top: 720, bottom: 720, left: 800, right: 800 } } },
    children: [

      // ── TITLE BANNER ──────────────────────────────────────────────────────
      new Paragraph({
        children: [new TextRun({ text: "❤  YOUR HEART HEALTH GUIDE", bold: true, size: 40, color: WHITE, font: "Calibri" })],
        alignment: AlignmentType.CENTER,
        shading: { type: ShadingType.SOLID, color: DARK_BLUE },
        spacing: { before: 0, after: 0 },
        indent: { left: 0, right: 0 },
      }),
      new Paragraph({
        children: [new TextRun({ text: "Managing Heart Failure with Reduced Ejection Fraction (HFrEF)", bold: true, size: 24, color: LIGHT_BLUE, font: "Calibri" })],
        alignment: AlignmentType.CENTER,
        shading: { type: ShadingType.SOLID, color: DARK_BLUE },
        spacing: { before: 0, after: 160 },
      }),

      spacer(),

      // ── WHAT IS HFrEF ─────────────────────────────────────────────────────
      heading1("UNDERSTANDING YOUR CONDITION"),
      spacer(),

      body("Your doctor has told you that you have Heart Failure with Reduced Ejection Fraction, or HFrEF. Here is what this means:"),
      spacer(),

      infoBox([
        "💓  Your heart is a pump. A normal heart pumps out about 55–70% of its blood with each beat.",
        "",
        "📉  Your ejection fraction (EF) is lower than normal — meaning your heart muscle is weaker",
        "      and not pumping as efficiently as it should.",
        "",
        "✅  The GOOD NEWS: With the right medicines, diet, and lifestyle, you CAN live better and longer.",
      ]),

      spacer(),
      heading2("COMMON SYMPTOMS TO KNOW"),
      spacer(),

      bullet("Shortness of breath — especially lying flat or with activity", "😮‍💨"),
      bullet("Swollen feet, ankles, or legs (fluid build-up)", "🦵"),
      bullet("Feeling very tired or weak even at rest", "😴"),
      bullet("Rapid or irregular heartbeat", "💗"),
      bullet("Persistent cough or wheezing (sometimes with pink/frothy mucus)", "😮"),
      bullet("Sudden weight gain (>2 kg / ~4.5 lbs in 2 days = call your doctor!)", "⚖️"),

      spacer(),

      // ── MEDICATIONS ───────────────────────────────────────────────────────
      heading1("YOUR MEDICINES"),
      spacer(),
      body("You will likely be prescribed medicines from 4 key groups. All 4 work together — do NOT stop any of them without talking to your doctor first.", { bold: true }),
      spacer(),

      // Medicine table
      new Table({
        width: { size: 100, type: WidthType.PERCENTAGE },
        rows: [
          new TableRow({
            tableHeader: true,
            children: [
              new TableCell({
                shading: { type: ShadingType.SOLID, color: DARK_BLUE },
                children: [new Paragraph({ children: [new TextRun({ text: "Medicine Type", bold: true, size: 20, color: WHITE, font: "Calibri" })], indent: { left: 80 } })],
              }),
              new TableCell({
                shading: { type: ShadingType.SOLID, color: DARK_BLUE },
                children: [new Paragraph({ children: [new TextRun({ text: "Common Examples", bold: true, size: 20, color: WHITE, font: "Calibri" })], indent: { left: 80 } })],
              }),
              new TableCell({
                shading: { type: ShadingType.SOLID, color: DARK_BLUE },
                children: [new Paragraph({ children: [new TextRun({ text: "What It Does", bold: true, size: 20, color: WHITE, font: "Calibri" })], indent: { left: 80 } })],
              }),
            ],
          }),
          new TableRow({ children: [
            new TableCell({ shading: { type: ShadingType.SOLID, color: LIGHT_BLUE }, children: [new Paragraph({ children: [new TextRun({ text: "1.  ARNI / ACE Inhibitor / ARB", bold: true, size: 19, font: "Calibri", color: DARK_BLUE })], spacing: { before: 60, after: 60 }, indent: { left: 80 } })] }),
            new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "Sacubitril/valsartan (Entresto), Enalapril, Lisinopril, Ramipril, Candesartan", size: 19, font: "Calibri" })], spacing: { before: 60, after: 60 }, indent: { left: 80 } })] }),
            new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "Reduces strain on the heart, helps it pump better, and lowers risk of death", size: 19, font: "Calibri" })], spacing: { before: 60, after: 60 }, indent: { left: 80 } })] }),
          ]}),
          new TableRow({ children: [
            new TableCell({ shading: { type: ShadingType.SOLID, color: LIGHT_BLUE }, children: [new Paragraph({ children: [new TextRun({ text: "2.  Beta-Blocker", bold: true, size: 19, font: "Calibri", color: DARK_BLUE })], spacing: { before: 60, after: 60 }, indent: { left: 80 } })] }),
            new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "Bisoprolol, Carvedilol, Metoprolol", size: 19, font: "Calibri" })], spacing: { before: 60, after: 60 }, indent: { left: 80 } })] }),
            new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "Slows the heart rate, protects the heart from stress hormones, reduces risk of sudden death", size: 19, font: "Calibri" })], spacing: { before: 60, after: 60 }, indent: { left: 80 } })] }),
          ]}),
          new TableRow({ children: [
            new TableCell({ shading: { type: ShadingType.SOLID, color: LIGHT_BLUE }, children: [new Paragraph({ children: [new TextRun({ text: "3.  Water Pill (MRA)", bold: true, size: 19, font: "Calibri", color: DARK_BLUE })], spacing: { before: 60, after: 60 }, indent: { left: 80 } })] }),
            new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "Spironolactone, Eplerenone", size: 19, font: "Calibri" })], spacing: { before: 60, after: 60 }, indent: { left: 80 } })] }),
            new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "Removes extra fluid and salt from the body, lowers blood pressure, reduces swelling", size: 19, font: "Calibri" })], spacing: { before: 60, after: 60 }, indent: { left: 80 } })] }),
          ]}),
          new TableRow({ children: [
            new TableCell({ shading: { type: ShadingType.SOLID, color: LIGHT_BLUE }, children: [new Paragraph({ children: [new TextRun({ text: "4.  SGLT2 Inhibitor", bold: true, size: 19, font: "Calibri", color: DARK_BLUE })], spacing: { before: 60, after: 60 }, indent: { left: 80 } })] }),
            new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "Dapagliflozin (Farxiga), Empagliflozin (Jardiance)", size: 19, font: "Calibri" })], spacing: { before: 60, after: 60 }, indent: { left: 80 } })] }),
            new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "Reduces heart failure hospitalizations, protects kidneys, improves survival — works even without diabetes", size: 19, font: "Calibri" })], spacing: { before: 60, after: 60 }, indent: { left: 80 } })] }),
          ]}),
          new TableRow({ children: [
            new TableCell({ shading: { type: ShadingType.SOLID, color: LIGHT_BLUE }, children: [new Paragraph({ children: [new TextRun({ text: "5.  Loop Diuretic", bold: true, size: 19, font: "Calibri", color: DARK_BLUE })], spacing: { before: 60, after: 60 }, indent: { left: 80 } })] }),
            new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "Furosemide (Lasix), Torasemide", size: 19, font: "Calibri" })], spacing: { before: 60, after: 60 }, indent: { left: 80 } })] }),
            new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "Relieves fluid build-up (swelling, breathlessness) quickly — controls symptoms", size: 19, font: "Calibri" })], spacing: { before: 60, after: 60 }, indent: { left: 80 } })] }),
          ]}),
        ],
      }),

      spacer(),
      warningBox([
        "⚠️  IMPORTANT MEDICINE RULES:",
        "",
        "• Never stop or skip your heart medicines without talking to your doctor — even if you feel fine.",
        "• Do NOT take NSAIDs (ibuprofen, naproxen, diclofenac) — they can worsen heart failure.",
        "• Avoid calcium channel blockers like verapamil or diltiazem unless your doctor specifically prescribes them.",
        "• Tell ALL your doctors (including dentists) that you have heart failure.",
      ]),

      spacer(),

      // ── DIET ──────────────────────────────────────────────────────────────
      heading1("DIET — WHAT TO EAT & AVOID"),
      spacer(),

      heading2("🧂  SALT (SODIUM) — YOUR #1 PRIORITY"),
      spacer(),
      body("Too much salt causes your body to hold extra water, which forces your heart to work harder and makes you swell and feel breathless."),
      spacer(),

      infoBox([
        "🎯  TARGET: Less than 2,000 mg (2 grams) of sodium per day.",
        "",
        "📌  For reference: 1 teaspoon of table salt = about 2,300 mg sodium — already over your daily limit!",
        "📌  Most processed and packaged foods are very high in hidden salt.",
      ], YELLOW_BG),

      spacer(),
      heading3("Foods HIGH in Salt — LIMIT OR AVOID"),
      spacer(),

      new Table({
        width: { size: 100, type: WidthType.PERCENTAGE },
        rows: [
          new TableRow({ tableHeader: true, children: [
            new TableCell({ shading: { type: ShadingType.SOLID, color: RED_WARN }, children: [new Paragraph({ children: [new TextRun({ text: "❌  High-Salt Foods", bold: true, size: 20, color: WHITE, font: "Calibri" })], indent: { left: 80 } })] }),
            new TableCell({ shading: { type: ShadingType.SOLID, color: RED_WARN }, children: [new Paragraph({ children: [new TextRun({ text: "Why to Avoid", bold: true, size: 20, color: WHITE, font: "Calibri" })], indent: { left: 80 } })] }),
          ]}),
          foodRow("Table salt, soy sauce, fish sauce, pickles", "Pure sodium — add directly to fluid load", false),
          foodRow("Processed meats (sausage, bacon, ham, canned meat)", "Very high hidden salt — even small portions can exceed limits", false),
          foodRow("Canned soups, canned vegetables, instant noodles", "1 can of soup can contain 800–1,200 mg sodium alone", false),
          foodRow("Cheese, salted butter, most fast foods", "High sodium; fast foods often exceed 1,500 mg per meal", false),
          foodRow("Chips, crackers, salted nuts, packaged snacks", "Loaded with sodium and may cause water retention quickly", false),
          foodRow("Bread (some loaves), breakfast cereals", "Often surprisingly high — always check the label", false),
        ],
      }),

      spacer(),
      heading3("Better Choices — EAT MORE OF THESE"),
      spacer(),

      new Table({
        width: { size: 100, type: WidthType.PERCENTAGE },
        rows: [
          new TableRow({ tableHeader: true, children: [
            new TableCell({ shading: { type: ShadingType.SOLID, color: GREEN_OK }, children: [new Paragraph({ children: [new TextRun({ text: "✅  Heart-Friendly Foods", bold: true, size: 20, color: WHITE, font: "Calibri" })], indent: { left: 80 } })] }),
            new TableCell({ shading: { type: ShadingType.SOLID, color: GREEN_OK }, children: [new Paragraph({ children: [new TextRun({ text: "Why They Help", bold: true, size: 20, color: WHITE, font: "Calibri" })], indent: { left: 80 } })] }),
          ]}),
          foodRow("Fresh fruits (apples, pears, berries, mangoes)", "Natural, low in sodium, rich in potassium and antioxidants", true),
          foodRow("Fresh or frozen vegetables (no added salt)", "High fibre, potassium, low sodium — support heart health", true),
          foodRow("Lean proteins (skinless chicken, fish, tofu, eggs)", "Low saturated fat; fish provides omega-3 fatty acids", true),
          foodRow("Whole grains (oats, brown rice, wholegrain bread)", "High fibre, steady energy, lower blood pressure", true),
          foodRow("Legumes (lentils, chickpeas, kidney beans — rinse canned ones)", "Good protein, low fat, high potassium", true),
          foodRow("Olive oil (in moderation)", "Healthier fat; used in Mediterranean diet shown to help the heart", true),
          foodRow("Herbs and spices (pepper, cumin, turmeric, garlic)", "Flavour without sodium — great salt replacer", true),
        ],
      }),

      spacer(),
      heading2("💧  FLUID INTAKE"),
      spacer(),
      body("If you have significant swelling or breathlessness, your doctor may recommend limiting fluids:"),
      spacer(),
      bullet("General target: 1.5 to 2 litres of total fluid per day (includes soups, juice, tea, coffee)", ""),
      bullet("All liquids count — water, juice, milk, ice cream, jelly/gelatin", ""),
      bullet("If your fluid restriction is strict, use small cups; spread intake throughout the day", ""),
      bullet("Ice chips (a small amount) can help with thirst without adding large fluid volumes", ""),
      spacer(),

      heading2("⚖️  POTASSIUM — KNOW YOUR LEVEL"),
      spacer(),
      body("Some heart failure medicines (MRAs like spironolactone, ACE inhibitors, ARBs) raise your potassium level. High potassium can cause dangerous heart rhythms. Your doctor will check this with blood tests."),
      spacer(),
      bullet("If your potassium is HIGH: avoid bananas, oranges, potatoes, tomatoes, coconut water, dried fruits"),
      bullet("If your potassium is LOW: your doctor may recommend supplements or potassium-rich foods"),
      bullet("ALWAYS confirm with your doctor before making changes to potassium intake"),
      spacer(),

      heading2("🍺  ALCOHOL"),
      spacer(),
      body("Alcohol weakens the heart muscle directly. If alcohol caused or contributed to your heart failure, it must be completely avoided. Even in other causes, it is best to strictly limit or stop alcohol entirely."),
      spacer(),

      heading2("☕  CAFFEINE"),
      spacer(),
      body("Moderate caffeine (1–2 cups of coffee or tea per day) is generally acceptable. Avoid energy drinks — they contain large amounts of caffeine and stimulants that can trigger abnormal heart rhythms."),
      spacer(),

      // ── DAILY MONITORING ──────────────────────────────────────────────────
      heading1("DAILY MONITORING — YOUR HOME CHECKS"),
      spacer(),

      infoBox([
        "Every morning BEFORE eating and AFTER urinating, weigh yourself on the same scale.",
        "",
        "📓  Keep a diary of: your weight, blood pressure (if you have a home monitor), how you feel,",
        "      any swelling, and how many times you woke up at night to urinate.",
        "",
        "🚨  Call your doctor or go to emergency if you notice:",
        "      • Weight gain of more than 2 kg (about 4–5 lbs) in 2 days",
        "      • Sudden increase in shortness of breath",
        "      • New or worsening swelling in legs or abdomen",
        "      • Dizziness, fainting, or rapid heartbeat",
        "      • Chest pain",
      ], ORANGE_BG),

      spacer(),

      // ── LIFESTYLE ─────────────────────────────────────────────────────────
      heading1("LIFESTYLE TIPS"),
      spacer(),

      heading3("Exercise"),
      bullet("Light regular activity (walking, gentle cycling) improves how you feel and your heart's strength"),
      bullet("Start slow — even 5–10 minutes a day — and build up gradually"),
      bullet("Stop if you feel very breathless, dizzy, or have chest pain — rest and tell your doctor"),
      bullet("Cardiac rehabilitation programs (supervised exercise) are strongly recommended — ask your doctor"),
      spacer(),

      heading3("Sleep Position"),
      bullet("If you feel breathless lying flat, try sleeping with the head of the bed raised (extra pillow or wedge)"),
      spacer(),

      heading3("Smoking"),
      body("If you smoke, stopping is one of the most important things you can do for your heart. Ask your doctor or nurse about stop-smoking programmes.", { bold: false }),
      spacer(),

      heading3("Stress and Mental Health"),
      bullet("Stress and anxiety can worsen heart failure symptoms"),
      bullet("Talk to your doctor if you feel low, anxious, or overwhelmed — support is available"),
      spacer(),

      // ── WHEN TO SEEK HELP ──────────────────────────────────────────────────
      heading1("WHEN TO SEEK HELP IMMEDIATELY"),
      spacer(),

      warningBox([
        "🚨  GO TO EMERGENCY or CALL YOUR DOCTOR RIGHT AWAY if you have:",
        "",
        "• Sudden severe shortness of breath (especially at rest or waking you from sleep)",
        "• Chest pain or pressure",
        "• Coughing up pink or frothy phlegm",
        "• Fainting or near-fainting",
        "• Very fast or irregular heartbeat",
        "• Weight gain >2 kg in 2 days",
        "• Extreme tiredness with confusion",
      ]),

      spacer(),

      // ── FOLLOW UP ─────────────────────────────────────────────────────────
      heading1("YOUR FOLLOW-UP PLAN"),
      spacer(),

      new Table({
        width: { size: 100, type: WidthType.PERCENTAGE },
        rows: [
          new TableRow({ tableHeader: true, children: [
            new TableCell({ shading: { type: ShadingType.SOLID, color: MED_BLUE }, children: [new Paragraph({ children: [new TextRun({ text: "Appointment / Test", bold: true, size: 20, color: WHITE, font: "Calibri" })], indent: { left: 80 } })] }),
            new TableCell({ shading: { type: ShadingType.SOLID, color: MED_BLUE }, children: [new Paragraph({ children: [new TextRun({ text: "How Often", bold: true, size: 20, color: WHITE, font: "Calibri" })], indent: { left: 80 } })] }),
            new TableCell({ shading: { type: ShadingType.SOLID, color: MED_BLUE }, children: [new Paragraph({ children: [new TextRun({ text: "Notes", bold: true, size: 20, color: WHITE, font: "Calibri" })], indent: { left: 80 } })] }),
          ]}),
          twoColRow && new TableRow({ children: [
            new TableCell({ shading: { type: ShadingType.SOLID, color: LIGHT_BLUE }, children: [new Paragraph({ children: [new TextRun({ text: "Cardiology clinic", size: 19, font: "Calibri" })], indent: { left: 80 }, spacing: { before: 60, after: 60 } })] }),
            new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "Every 3–6 months", size: 19, font: "Calibri" })], indent: { left: 80 }, spacing: { before: 60, after: 60 } })] }),
            new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "Medicine review, echo if needed", size: 19, font: "Calibri" })], indent: { left: 80 }, spacing: { before: 60, after: 60 } })] }),
          ]}),
          new TableRow({ children: [
            new TableCell({ shading: { type: ShadingType.SOLID, color: LIGHT_BLUE }, children: [new Paragraph({ children: [new TextRun({ text: "Blood tests (kidney function, potassium)", size: 19, font: "Calibri" })], indent: { left: 80 }, spacing: { before: 60, after: 60 } })] }),
            new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "Every 1–3 months initially", size: 19, font: "Calibri" })], indent: { left: 80 }, spacing: { before: 60, after: 60 } })] }),
            new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "More frequent when medicines are started or changed", size: 19, font: "Calibri" })], indent: { left: 80 }, spacing: { before: 60, after: 60 } })] }),
          ]}),
          new TableRow({ children: [
            new TableCell({ shading: { type: ShadingType.SOLID, color: LIGHT_BLUE }, children: [new Paragraph({ children: [new TextRun({ text: "Echocardiogram (heart ultrasound)", size: 19, font: "Calibri" })], indent: { left: 80 }, spacing: { before: 60, after: 60 } })] }),
            new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "3–6 months after optimising medicines", size: 19, font: "Calibri" })], indent: { left: 80 }, spacing: { before: 60, after: 60 } })] }),
            new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "Checks if EF is improving", size: 19, font: "Calibri" })], indent: { left: 80 }, spacing: { before: 60, after: 60 } })] }),
          ]}),
          new TableRow({ children: [
            new TableCell({ shading: { type: ShadingType.SOLID, color: LIGHT_BLUE }, children: [new Paragraph({ children: [new TextRun({ text: "Influenza & Pneumonia vaccines", size: 19, font: "Calibri" })], indent: { left: 80 }, spacing: { before: 60, after: 60 } })] }),
            new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "Yearly (flu) / Once (pneumonia)", size: 19, font: "Calibri" })], indent: { left: 80 }, spacing: { before: 60, after: 60 } })] }),
            new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "Infections can trigger heart failure flares", size: 19, font: "Calibri" })], indent: { left: 80 }, spacing: { before: 60, after: 60 } })] }),
          ]}),
        ],
      }),

      spacer(),

      // ── QUICK REFERENCE CARD ──────────────────────────────────────────────
      heading1("QUICK REFERENCE — AT A GLANCE"),
      spacer(),

      new Table({
        width: { size: 100, type: WidthType.PERCENTAGE },
        rows: [
          new TableRow({ children: [
            new TableCell({
              shading: { type: ShadingType.SOLID, color: "E8F5E9" },
              children: [
                new Paragraph({ children: [new TextRun({ text: "✅  DO", bold: true, size: 22, color: GREEN_OK, font: "Calibri" })], alignment: AlignmentType.CENTER, spacing: { before: 60, after: 60 } }),
                new Paragraph({ children: [new TextRun({ text: "• Take ALL medicines every day", size: 19, font: "Calibri" })], spacing: { before: 40, after: 40 }, indent: { left: 100 } }),
                new Paragraph({ children: [new TextRun({ text: "• Weigh yourself every morning", size: 19, font: "Calibri" })], spacing: { before: 40, after: 40 }, indent: { left: 100 } }),
                new Paragraph({ children: [new TextRun({ text: "• Limit salt to <2,000 mg/day", size: 19, font: "Calibri" })], spacing: { before: 40, after: 40 }, indent: { left: 100 } }),
                new Paragraph({ children: [new TextRun({ text: "• Stay active with light exercise", size: 19, font: "Calibri" })], spacing: { before: 40, after: 40 }, indent: { left: 100 } }),
                new Paragraph({ children: [new TextRun({ text: "• Attend all appointments", size: 19, font: "Calibri" })], spacing: { before: 40, after: 40 }, indent: { left: 100 } }),
                new Paragraph({ children: [new TextRun({ text: "• Get annual flu vaccine", size: 19, font: "Calibri" })], spacing: { before: 40, after: 60 }, indent: { left: 100 } }),
              ],
            }),
            new TableCell({
              shading: { type: ShadingType.SOLID, color: "FDECEA" },
              children: [
                new Paragraph({ children: [new TextRun({ text: "❌  DO NOT", bold: true, size: 22, color: RED_WARN, font: "Calibri" })], alignment: AlignmentType.CENTER, spacing: { before: 60, after: 60 } }),
                new Paragraph({ children: [new TextRun({ text: "• Stop medicines without advice", size: 19, font: "Calibri" })], spacing: { before: 40, after: 40 }, indent: { left: 100 } }),
                new Paragraph({ children: [new TextRun({ text: "• Eat salty/processed foods", size: 19, font: "Calibri" })], spacing: { before: 40, after: 40 }, indent: { left: 100 } }),
                new Paragraph({ children: [new TextRun({ text: "• Drink alcohol", size: 19, font: "Calibri" })], spacing: { before: 40, after: 40 }, indent: { left: 100 } }),
                new Paragraph({ children: [new TextRun({ text: "• Take ibuprofen/naproxen", size: 19, font: "Calibri" })], spacing: { before: 40, after: 40 }, indent: { left: 100 } }),
                new Paragraph({ children: [new TextRun({ text: "• Smoke", size: 19, font: "Calibri" })], spacing: { before: 40, after: 40 }, indent: { left: 100 } }),
                new Paragraph({ children: [new TextRun({ text: "• Ignore worsening symptoms", size: 19, font: "Calibri" })], spacing: { before: 40, after: 60 }, indent: { left: 100 } }),
              ],
            }),
          ]}),
        ],
      }),

      spacer(),

      // ── FOOTER NOTE ───────────────────────────────────────────────────────
      new Paragraph({
        children: [new TextRun({ text: "This handout is for educational purposes and does not replace advice from your doctor or healthcare team. Always follow your personalised care plan.", size: 17, font: "Calibri", italics: true, color: "666666" })],
        alignment: AlignmentType.CENTER,
        spacing: { before: 200 },
        border: { top: { style: BorderStyle.SINGLE, size: 4, color: GREY_RULE } },
      }),

    ],
  }],
});

Packer.toBuffer(doc).then(buffer => {
  fs.writeFileSync("/home/daytona/workspace/hfref-handout/HFrEF_Patient_Education_Handout.docx", buffer);
  console.log("SUCCESS: File written.");
}).catch(err => {
  console.error("ERROR:", err);
  process.exit(1);
});
Running Command

cd /home/daytona/workspace/hfref-handout && node create_handout.js 2>&1

Running Command

python3 /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/works…

Running Command

ls -lh /home/daytona/workspace/hfref-handout/ && python3 -c "import zipfile; z=z…

Your patient education handout is ready for download:

HFrEF Patient Education Handout

Word Document · DOCX


Here is what the handout covers across 8 colour-coded sections:
1. Understanding Your Condition - Plain-language explanation of what HFrEF means and what ejection fraction is, with a reassuring note that management improves outcomes.
2. Common Symptoms - A clear list of what to expect (breathlessness, swelling, fatigue, cough, weight gain).
3. Your Medicines - A formatted table covering the 5 drug groups: ARNI/ACE-I/ARB, Beta-blocker, MRA (spironolactone), SGLT2 inhibitor, and Loop diuretic - with brand name examples and plain-language explanations. Includes a red warning box listing drugs to avoid (NSAIDs, verapamil/diltiazem).
4. Diet Section
  • Salt target (<2,000 mg/day) with a practical reference point
  • Red table of high-salt foods to avoid (processed meats, canned soups, fast food, sauces, chips)
  • Green table of heart-friendly foods (fresh produce, lean protein, whole grains, herbs/spices)
  • Fluid restriction guidance
  • Potassium awareness (critical for patients on MRAs/ACE-I)
  • Alcohol and caffeine advice
5. Daily Monitoring - Weight diary instructions with clear thresholds for calling the doctor (>2 kg in 2 days).
6. Lifestyle Tips - Exercise, sleep position, smoking cessation, stress management.
7. When to Seek Help Immediately - Bold red emergency warning box.
8. Follow-Up Plan & Quick Reference Card - A DO / DO NOT two-column table for easy daily reference.
This is a shared conversation. Sign in to Orris to start your own chat.