as per the sample attached i need information of endocarditis
ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or not found"
mkdir -p /home/daytona/workspace/endocarditis-doc
~/endocarditis-doc/create_endocarditis.js
const {
Document, Packer, Paragraph, TextRun, HeadingLevel, AlignmentType,
BorderStyle, UnderlineType, ShadingType
} = require('docx');
const fs = require('fs');
const titleColor = "C0392B"; // dark red like sample
const headingColor = "1F3864"; // dark navy
const subheadingColor = "2E4057";
function title(text) {
return new Paragraph({
children: [
new TextRun({
text,
bold: true,
size: 32,
color: titleColor,
font: "Calibri",
})
],
heading: HeadingLevel.TITLE,
spacing: { after: 200 },
alignment: AlignmentType.CENTER,
});
}
function h1(text) {
return new Paragraph({
children: [
new TextRun({
text,
bold: true,
size: 26,
color: headingColor,
font: "Calibri",
})
],
spacing: { before: 300, after: 150 },
});
}
function h2(text) {
return new Paragraph({
children: [
new TextRun({
text,
bold: true,
size: 22,
color: subheadingColor,
font: "Calibri",
})
],
spacing: { before: 200, after: 100 },
});
}
function para(text) {
return new Paragraph({
children: [
new TextRun({ text, size: 20, font: "Calibri" })
],
spacing: { after: 100 },
});
}
function bullet(text, bold_part) {
const runs = [];
if (bold_part) {
const idx = text.indexOf(bold_part);
if (idx >= 0) {
if (idx > 0) runs.push(new TextRun({ text: text.substring(0, idx), size: 20, font: "Calibri" }));
runs.push(new TextRun({ text: bold_part, bold: true, size: 20, font: "Calibri" }));
const rest = text.substring(idx + bold_part.length);
if (rest) runs.push(new TextRun({ text: rest, size: 20, font: "Calibri" }));
} else {
runs.push(new TextRun({ text, size: 20, font: "Calibri" }));
}
} else {
runs.push(new TextRun({ text, size: 20, font: "Calibri" }));
}
return new Paragraph({
children: runs,
bullet: { level: 0 },
spacing: { after: 60 },
});
}
function subbullet(text) {
return new Paragraph({
children: [
new TextRun({ text, size: 20, font: "Calibri" })
],
bullet: { level: 1 },
spacing: { after: 60 },
});
}
function boldPara(label, text) {
return new Paragraph({
children: [
new TextRun({ text: label, bold: true, size: 20, font: "Calibri" }),
new TextRun({ text, size: 20, font: "Calibri" })
],
spacing: { after: 100 },
});
}
const doc = new Document({
numbering: {
config: [
{
reference: "bullet-list",
levels: [
{ level: 0, format: "bullet", text: "\u2022", alignment: AlignmentType.LEFT,
style: { paragraph: { indent: { left: 720, hanging: 360 } } } },
{ level: 1, format: "bullet", text: "\u25E6", alignment: AlignmentType.LEFT,
style: { paragraph: { indent: { left: 1440, hanging: 360 } } } }
]
}
]
},
sections: [{
children: [
// TITLE
title("ENDOCARDITIS – Detailed Disease Information Document"),
// ─────────────────────────────────────────
// 1. Disease Overview
// ─────────────────────────────────────────
h1("1. Disease Overview / Introduction"),
para(
"Infective endocarditis (IE) is an infection, usually bacterial, of the endocardial surface of the heart. " +
"It primarily affects the cardiac valves, although the septa, mural endocardium, and cardiovascular implantable " +
"electronic devices (pacemakers, defibrillators) may also be involved. The disease can present as an acute " +
"or subacute illness, ranging from a rapid, fulminant course over days to an insidious, smoldering illness " +
"over weeks or months."
),
para(
"The American Heart Association (AHA) estimates 10,000–20,000 new cases per year in the United States, accounting for " +
"approximately one case per 1,000 hospital admissions. Despite advances in diagnosis and treatment, IE carries " +
"a significant in-hospital mortality of 15–22% and substantial long-term morbidity from valvular damage, embolic " +
"events, and heart failure."
),
h2("Disease Classification"),
bullet("By valve type:"),
subbullet("Native valve endocarditis (NVE)"),
subbullet("Prosthetic valve endocarditis (PVE) – early (<2 months) or late (>2 months post-surgery)"),
subbullet("Cardiovascular implantable electronic device (CIED) endocarditis"),
bullet("By clinical course:"),
subbullet("Acute IE – rapid progression, high virulence organisms (e.g., S. aureus)"),
subbullet("Subacute IE – indolent course, lower-virulence organisms (e.g., viridans streptococci)"),
bullet("By acquisition:"),
subbullet("Community-acquired IE"),
subbullet("Health care-associated IE"),
subbullet("Injection drug use-associated IE"),
// ─────────────────────────────────────────
// 2. Etiology & Risk Factors
// ─────────────────────────────────────────
h1("2. Etiology & Risk Factors"),
h2("Causative Organisms"),
bullet("Staphylococcus aureus (most common overall; predominates in acute IE, injection drug users, health care-associated IE)", "Staphylococcus aureus"),
bullet("Coagulase-negative staphylococci (CoNS) – mainly prosthetic valve endocarditis"),
bullet("Viridans group streptococci (S. mutans, S. sanguis) – subacute IE, dental flora", "Viridans group streptococci"),
bullet("Streptococcus gallolyticus (formerly bovis) – associated with colorectal neoplasm"),
bullet("Enterococci (E. faecalis) – genitourinary/GI source, ≥10% of cases", "Enterococci"),
bullet("HACEK group (Haemophilus, Aggregatibacter, Cardiobacterium, Eikenella, Kingella) – ~5% of cases", "HACEK group"),
bullet("Fungi (Candida, Aspergillus) – injection drug users, prolonged IV catheters, immunosuppressed"),
bullet("Culture-negative endocarditis (~10%) – Bartonella, Coxiella burnetii (Q fever), Tropheryma whipplei"),
h2("Predisposing Risk Factors"),
bullet("Mitral valve prolapse with regurgitation (most common structural risk factor)"),
bullet("Degenerative or rheumatic valvular heart disease"),
bullet("Injection drug use"),
bullet("Previous endocarditis"),
bullet("Prosthetic heart valves or intracardiac devices (pacemakers, ICDs)"),
bullet("Congenital heart disease (uncorrected ventricular septal defect, etc.)"),
bullet("HIV infection (independent risk factor in injection drug users)"),
bullet("End-stage renal disease / long-term hemodialysis"),
bullet("Diabetes mellitus"),
bullet("Poor dental hygiene / recent dental procedures"),
bullet("Recent intravascular catheters or invasive procedures"),
// ─────────────────────────────────────────
// 3. Pathophysiology
// ─────────────────────────────────────────
h1("3. Pathophysiology / Pathogenesis"),
h2("Normal Endocardial Defence"),
para("The normal endocardial surface is resistant to bacterial colonisation due to its smooth, non-thrombogenic endothelium and the turbulent blood flow that limits bacterial adherence."),
h2("Mechanism of Endocarditis"),
bullet("Step 1 – Endothelial damage: Turbulent blood flow (valvular disease, prosthetic valves) or direct injury causes endothelial disruption"),
bullet("Step 2 – Non-bacterial thrombotic endocarditis (NBTE): Platelets and fibrin aggregate on damaged endothelium, forming a 'sterile vegetation'"),
bullet("Step 3 – Bacteremia: Transient bacteremia (dental procedures, IV drug use, invasive procedures) seeds the sterile vegetation"),
bullet("Step 4 – Microbial adherence and proliferation: Staphylococci and streptococci are especially adherent; organism load reaches 10⁹–10¹¹ CFU/g of vegetation tissue"),
bullet("Step 5 – Metastatic seeding: Bacteremia seeds organs with high blood flow (kidneys, spleen, brain), and immune complex deposition causes systemic manifestations"),
bullet("Avascular vegetation surface: Impedes antibiotic penetration and phagocytic clearance, requiring prolonged, bactericidal antibiotic therapy"),
bullet("Biofilm formation on implantable devices further protects organisms from host defences and antibiotics"),
// ─────────────────────────────────────────
// 4. Clinical Manifestations
// ─────────────────────────────────────────
h1("4. Clinical Manifestations"),
h2("Symptoms"),
bullet("Fever (most common symptom, present in >90% of cases)"),
bullet("Fatigue, malaise, weakness"),
bullet("Chills and rigors"),
bullet("Night sweats"),
bullet("Weight loss / anorexia"),
bullet("Musculoskeletal: arthralgias, myalgias, back pain (~50% of patients)"),
bullet("Headache"),
bullet("Dyspnea (heart failure from valvular damage)"),
bullet("Chest pain or pleuritic pain (septic pulmonary emboli in right-sided IE)"),
bullet("Neurologic symptoms: stroke, focal deficits, confusion (15–20% of cases)"),
h2("Signs – Classic Peripheral Stigmata"),
bullet("Petechiae – small red/purple non-blanching skin spots"),
bullet("Splinter hemorrhages – linear brownish-red lesions in nail beds"),
bullet("Osler nodes – painful, tender nodules on finger/toe pads (immune complex deposition)"),
bullet("Janeway lesions – painless, hemorrhagic macules on palms and soles (embolic)"),
bullet("Roth spots – retinal hemorrhages with pale centres (fundoscopic finding)"),
bullet("New or worsening cardiac murmur (especially aortic or mitral regurgitation)"),
bullet("Splenomegaly (more common in subacute IE)"),
bullet("Clubbing of fingers (in chronic IE)"),
bullet("Signs of heart failure: elevated JVP, pulmonary crackles, peripheral oedema"),
// ─────────────────────────────────────────
// 5. Diagnosis & Investigations
// ─────────────────────────────────────────
h1("5. Diagnosis & Investigations"),
h2("Modified Duke Criteria (Gold Standard Clinical Framework)"),
boldPara("Major Criteria: ", "(1) Positive blood cultures: typical IE organisms in ≥2 separate cultures; OR single positive culture for Coxiella burnetii / anti-phase I IgG antibody titre >1:800. (2) Evidence of endocardial involvement: positive echocardiography (vegetation, abscess, prosthetic valve dehiscence) OR new valvular regurgitation."),
boldPara("Minor Criteria: ", "(1) Predisposing heart condition or injection drug use. (2) Fever ≥38°C. (3) Vascular phenomena (arterial emboli, septic pulmonary infarcts, Janeway lesions, conjunctival haemorrhages, mycotic aneurysm). (4) Immunologic phenomena (glomerulonephritis, Osler nodes, Roth spots, rheumatoid factor). (5) Microbiological evidence that does not meet major criteria."),
boldPara("Classification: ", "Definite IE = 2 major, OR 1 major + 3 minor, OR 5 minor criteria. Sensitivity 76–100%, specificity 88–100%."),
h2("Laboratory Tests"),
bullet("CBC → leukocytosis (acute), anaemia of chronic disease"),
bullet("ESR and CRP → elevated (non-specific markers of inflammation)"),
bullet("Urinalysis → haematuria, proteinuria, casts (immune complex glomerulonephritis)"),
bullet("Serum creatinine and electrolytes"),
bullet("Rheumatoid factor (positive in ~50% of subacute IE)"),
bullet("Complement levels → low (hypocomplementaemia in immune complex disease)"),
h2("Blood Cultures (Critical)"),
bullet("At least 3 sets of blood cultures from separate venepuncture sites before antibiotics"),
bullet("Each set: one aerobic + one anaerobic bottle"),
bullet("Yield >90% in non-antibiotic-treated patients"),
bullet("For culture-negative IE: serology for Bartonella, Coxiella burnetii, Brucella; 16S rRNA PCR on valve tissue"),
h2("Imaging / Procedures"),
bullet("Transthoracic echocardiography (TTE) – first-line; sensitivity ~60–70% for vegetations", "Transthoracic echocardiography (TTE)"),
bullet("Transesophageal echocardiography (TEE) – superior sensitivity (~90%); preferred for prosthetic valves, CIED, poor TTE windows, or when complications suspected", "Transesophageal echocardiography (TEE)"),
bullet("Cardiac CT – for perivalvular complications (abscess, fistula), pre-surgical planning"),
bullet("18F-FDG PET/CT – useful in prosthetic valve and CIED endocarditis where echocardiography is limited"),
bullet("Chest X-ray / CT chest – septic pulmonary emboli in right-sided IE"),
bullet("CT or MRI brain – embolic stroke, mycotic aneurysm evaluation"),
bullet("CT abdomen – splenic infarction or abscess"),
h2("Differential Diagnosis"),
bullet("Rheumatic fever"),
bullet("Systemic lupus erythematosus (Libman-Sacks endocarditis)"),
bullet("Marantic (non-bacterial thrombotic) endocarditis"),
bullet("Septicaemia / bacteraemia without valve involvement"),
bullet("Atrial myxoma"),
bullet("Acute pericarditis / myocarditis"),
bullet("Occult malignancy"),
// ─────────────────────────────────────────
// 6. Management & Treatment
// ─────────────────────────────────────────
h1("6. Management & Treatment"),
h2("a. General Principles"),
bullet("Hospitalisation for initiation of IV antibiotic therapy and monitoring"),
bullet("Multidisciplinary 'endocarditis team': cardiologist, cardiac surgeon, infectious disease specialist, microbiologist"),
bullet("Antimicrobial therapy must be prolonged (4–6 weeks IV) due to avascular vegetations"),
bullet("Bactericidal antibiotics preferred over bacteriostatic agents"),
bullet("Empiric therapy initiated after blood cultures obtained; definitive therapy guided by susceptibility results"),
h2("b. Pharmacological Therapy – Antibiotic Regimens"),
new Paragraph({
children: [new TextRun({ text: "1. Streptococcal (viridans group) Native Valve IE", bold: true, size: 20, font: "Calibri", color: "1F3864" })],
spacing: { before: 150, after: 80 }
}),
bullet("Penicillin G IV or Ceftriaxone 2g IV once daily × 4 weeks (uncomplicated)"),
bullet("2-week regimen: Ceftriaxone + Gentamicin (selected low-risk patients)"),
bullet("Penicillin allergy: Vancomycin IV × 4 weeks"),
new Paragraph({
children: [new TextRun({ text: "2. Staphylococcal IE (Native Valve)", bold: true, size: 20, font: "Calibri", color: "1F3864" })],
spacing: { before: 150, after: 80 }
}),
bullet("MSSA (methicillin-susceptible): Nafcillin or Oxacillin 2g IV q4h × 6 weeks; OR Cefazolin 2g IV q8h × 6 weeks"),
bullet("MRSA: Vancomycin IV (targeting trough 15–20 µg/mL, or AUC-guided) × 6 weeks; OR Daptomycin 8–10 mg/kg/day IV × 6 weeks"),
bullet("Routine low-dose gentamicin addition no longer recommended due to nephrotoxicity risk"),
new Paragraph({
children: [new TextRun({ text: "3. Enterococcal IE", bold: true, size: 20, font: "Calibri", color: "1F3864" })],
spacing: { before: 150, after: 80 }
}),
bullet("Ampicillin + Ceftriaxone (preferred, avoids aminoglycoside toxicity) × 4–6 weeks"),
bullet("Ampicillin + Gentamicin × 4–6 weeks (if susceptible)"),
bullet("Vancomycin-resistant enterococci (VRE): Daptomycin or Linezolid (limited data)"),
new Paragraph({
children: [new TextRun({ text: "4. HACEK Organisms", bold: true, size: 20, font: "Calibri", color: "1F3864" })],
spacing: { before: 150, after: 80 }
}),
bullet("Ceftriaxone 2g IV once daily × 4 weeks (native valve)"),
new Paragraph({
children: [new TextRun({ text: "5. Fungal Endocarditis", bold: true, size: 20, font: "Calibri", color: "1F3864" })],
spacing: { before: 150, after: 80 }
}),
bullet("Candida: Amphotericin B (liposomal) ± Flucytosine; surgical valve replacement usually required"),
bullet("Aspergillus: Voriconazole; surgery essential (rarely cured with antifungals alone)"),
new Paragraph({
children: [new TextRun({ text: "6. Empiric Therapy (Before Culture Results)", bold: true, size: 20, font: "Calibri", color: "1F3864" })],
spacing: { before: 150, after: 80 }
}),
bullet("Native valve: Vancomycin IV (covers MRSA) + Ceftriaxone IV"),
bullet("Prosthetic valve: Vancomycin + Gentamicin + Rifampicin"),
h2("c. Surgical / Interventional Therapy"),
para("Surgical indications (urgent/emergency valve surgery):"),
bullet("Heart failure from valvular dysfunction (haemodynamic instability)"),
bullet("Uncontrolled infection: periannular extension, abscess, fistula, or persistent bacteremia >7–10 days despite appropriate antibiotics"),
bullet("Prevention of embolism: large mobile vegetations >10 mm, especially after ≥1 embolic event"),
bullet("Fungal endocarditis or multidrug-resistant organisms"),
bullet("Prosthetic valve endocarditis with dehiscence or obstruction"),
bullet("CIED-related endocarditis: device removal recommended in most cases"),
h2("d. Anticoagulation"),
bullet("Anticoagulation is generally withheld in native valve IE due to risk of haemorrhagic transformation of embolic strokes"),
bullet("Patients on existing anticoagulation (e.g., mechanical valve): continue under close monitoring; withhold if intracranial haemorrhage occurs"),
// ─────────────────────────────────────────
// 7. Prevention & Control
// ─────────────────────────────────────────
h1("7. Prevention & Control"),
h2("Primary Prevention"),
bullet("Maintain excellent dental hygiene (regular brushing, flossing, dental checkups)"),
bullet("Minimise unnecessary intravascular catheters and invasive procedures"),
bullet("Strict aseptic technique for all vascular access procedures"),
bullet("Harm reduction programmes for injection drug users"),
bullet("Prompt treatment of bacteraemia and skin/soft tissue infections"),
h2("Antibiotic Prophylaxis (AHA 2007 Guidelines)"),
para("Prophylaxis is now recommended ONLY for high-risk cardiac conditions undergoing high-risk procedures:"),
bullet("High-risk conditions: prosthetic heart valves, previous IE, congenital heart disease with unrepaired cyanotic defects or recent surgical repair, and cardiac transplant recipients with valvulopathy"),
bullet("High-risk procedures: dental procedures involving manipulation of gingival tissue or periapical region of teeth or perforation of oral mucosa"),
bullet("Prophylaxis regimen: Amoxicillin 2g PO 30–60 minutes before procedure; penicillin-allergic patients: Clindamycin, Azithromycin, or Clarithromycin"),
bullet("Prophylaxis is NOT routinely recommended for GI or GU procedures"),
h2("Secondary Prevention"),
bullet("Completion of full antibiotic course and close follow-up echocardiography"),
bullet("Regular cardiac surveillance for valvular disease progression"),
bullet("Repeat echocardiography at 1, 3, and 12 months post-treatment"),
bullet("Gastrointestinal screening (colonoscopy) for patients with S. gallolyticus or E. faecalis endocarditis"),
// ─────────────────────────────────────────
// 8. Patient Education & Counselling
// ─────────────────────────────────────────
h1("8. Patient Education & Counselling"),
h2("Disease Awareness"),
para("Explain that endocarditis is a serious infection of the heart valves that requires prolonged hospitalisation and IV antibiotics. Emphasise that early recognition of symptoms is critical for preventing life-threatening complications like stroke and heart failure."),
h2("Medication Adherence"),
bullet("Complete the full 4–6 week antibiotic course; do not stop early even if feeling better"),
bullet("Report any signs of antibiotic side effects (rash, diarrhoea, hearing changes) immediately"),
bullet("Attend all follow-up appointments and repeat echocardiograms"),
h2("Lifestyle Counselling"),
bullet("Maintain rigorous oral hygiene: brush twice daily, use floss, and attend regular dental checks"),
bullet("Inform all healthcare providers (dentists, surgeons) about prior endocarditis history and any prosthetic valves"),
bullet("Stop intravenous drug use; access harm reduction and addiction services"),
bullet("Avoid skin piercing, tattooing, or procedures with non-sterile equipment"),
bullet("Carry a medical alert card indicating cardiac condition and endocarditis risk"),
h2("Self-Monitoring – Report Immediately"),
bullet("New or worsening fever"),
bullet("Chills, night sweats, or unexplained weight loss"),
bullet("Sudden onset neurological symptoms (weakness, speech difficulty, vision loss)"),
bullet("Worsening shortness of breath or chest pain"),
bullet("New painful skin nodules (Osler nodes) or unusual skin spots"),
// ─────────────────────────────────────────
// 9. Conclusion / Future Directions
// ─────────────────────────────────────────
h1("9. Conclusion / Future Directions"),
h2("Key Takeaways"),
bullet("S. aureus has overtaken viridans streptococci as the leading cause of IE in industrialised nations"),
bullet("The modified Duke criteria guide clinical diagnosis; echocardiography (especially TEE) is the pivotal imaging tool"),
bullet("Treatment requires prolonged bactericidal IV antibiotics tailored to the causative organism and its susceptibilities"),
bullet("Surgical intervention is required in ~50% of cases and is life-saving in haemodynamic instability, perivalvular extension, and fungal IE"),
bullet("A multidisciplinary endocarditis team improves outcomes"),
bullet("Antibiotic prophylaxis is reserved for high-risk patients only"),
h2("Gaps in Current Knowledge"),
bullet("Optimal duration of therapy for specific organisms and valve types"),
bullet("Role of novel imaging (18F-FDG PET/CT) in routine diagnosis"),
bullet("Management of multidrug-resistant and culture-negative IE"),
bullet("Optimal timing of surgery in neurological complications"),
h2("Future Research Needs"),
bullet("Novel anti-biofilm agents and bactericidal strategies"),
bullet("Oral step-down antibiotic therapy to reduce hospitalisation duration"),
bullet("Vaccines against S. aureus and S. mutans for high-risk patients"),
bullet("AI-driven risk stratification for surgical timing"),
bullet("Improvement in rapid diagnostic platforms (PCR, metagenomics)"),
// ─────────────────────────────────────────
// 10. References
// ─────────────────────────────────────────
h1("10. References"),
h2("Books"),
new Paragraph({
children: [
new TextRun({ text: "1. Fowler VG, Bayer AS, Baddour LM. ", size: 20, font: "Calibri" }),
new TextRun({ text: "Infective Endocarditis. In: Goldman-Cecil Medicine, 27th ed. ", italics: true, size: 20, font: "Calibri" }),
new TextRun({ text: "Elsevier; 2024. Chapter 61.", size: 20, font: "Calibri" }),
],
spacing: { after: 80 }
}),
new Paragraph({
children: [
new TextRun({ text: "2. Libby P, Bonow RO, Mann DL, et al. ", size: 20, font: "Calibri" }),
new TextRun({ text: "Braunwald's Heart Disease: A Textbook of Cardiovascular Medicine, 12th ed. ", italics: true, size: 20, font: "Calibri" }),
new TextRun({ text: "Elsevier; 2022.", size: 20, font: "Calibri" }),
],
spacing: { after: 80 }
}),
new Paragraph({
children: [
new TextRun({ text: "3. Mandell GL, Bennett JE, Dolin R. ", size: 20, font: "Calibri" }),
new TextRun({ text: "Principles and Practice of Infectious Diseases, 9th ed. ", italics: true, size: 20, font: "Calibri" }),
new TextRun({ text: "Elsevier; 2019.", size: 20, font: "Calibri" }),
],
spacing: { after: 80 }
}),
h2("Guidelines"),
new Paragraph({
children: [
new TextRun({ text: "4. Baddour LM, Wilson WR, Bayer AS, et al. ", size: 20, font: "Calibri" }),
new TextRun({ text: "Infective endocarditis in adults: diagnosis, antimicrobial therapy, and management of complications. AHA Scientific Statement. ", italics: true, size: 20, font: "Calibri" }),
new TextRun({ text: "Circulation. 2015;132:1435–1486.", size: 20, font: "Calibri" }),
],
spacing: { after: 80 }
}),
new Paragraph({
children: [
new TextRun({ text: "5. Delgado V, Ajmone Marsan N, de Waha S, et al. ", size: 20, font: "Calibri" }),
new TextRun({ text: "2023 ESC Guidelines for the management of endocarditis. ", italics: true, size: 20, font: "Calibri" }),
new TextRun({ text: "Eur Heart J. 2023;44(39):3948–4042.", size: 20, font: "Calibri" }),
],
spacing: { after: 80 }
}),
h2("Standard Articles"),
new Paragraph({
children: [
new TextRun({ text: "6. Murdoch DR, Corey GR, Hoen B, et al. Clinical presentation, etiology, and outcome of infective endocarditis in the 21st century: International Collaboration on Endocarditis — Prospective Cohort Study. ", size: 20, font: "Calibri" }),
new TextRun({ text: "Arch Intern Med. ", italics: true, size: 20, font: "Calibri" }),
new TextRun({ text: "2009;169:463–473.", size: 20, font: "Calibri" }),
],
spacing: { after: 80 }
}),
new Paragraph({
children: [
new TextRun({ text: "7. Wilson W, Taubert KA, Gewitz M, et al. Prevention of infective endocarditis: guidelines from the American Heart Association. ", size: 20, font: "Calibri" }),
new TextRun({ text: "Circulation. ", italics: true, size: 20, font: "Calibri" }),
new TextRun({ text: "2007;116:1736–1754.", size: 20, font: "Calibri" }),
],
spacing: { after: 80 }
}),
]
}]
});
Packer.toBuffer(doc).then(buffer => {
fs.writeFileSync('/home/daytona/workspace/endocarditis-doc/Endocarditis_Detailed_Disease_Information.docx', buffer);
console.log('Document created successfully!');
}).catch(err => {
console.error('Error:', err);
process.exit(1);
});
cd /home/daytona/workspace/endocarditis-doc && node create_endocarditis.js 2>&1
python3 /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/endocarditis-doc/Endocarditis_Detailed_Disease_Information.docx 2>&1
ls -lh /home/daytona/workspace/endocarditis-doc/Endocarditis_Detailed_Disease_Information.docx