Summerize it. Let the table and images be as it is. Avoid long sentences. Give it in headings and pointers. Output ad docx file.
python3 -c " import pdfplumber import json pdf_path = '/home/daytona/workspace/attachments/ec862b28-88e0-4f34-b91e-93e77d96f7be/1-s2.0-S0090825826019992-main.pdf' with pdfplumber.open(pdf_path) as pdf: print(f'Total pages: {len(pdf.pages)}') # Extract text from first 3 pages to understand structure for i, page in enumerate(pdf.pages[:3]): print(f'--- PAGE {i+1} ---') print(page.extract_text()) print() "
python3 -c " import pdfplumber import json pdf_path = '/home/daytona/workspace/attachments/ec862b28-88e0-4f34-b91e-93e77d96f7be/1-s2.0-S0090825826019992-main.pdf' with pdfplumber.open(pdf_path) as pdf: all_text = {} all_tables = {} for i, page in enumerate(pdf.pages): all_text[i+1] = page.extract_text() or '' tables = page.extract_tables() if tables: all_tables[i+1] = tables # Print pages 4-10 for p in range(4, 11): print(f'=== PAGE {p} ===') print(all_text.get(p, '')) if p in all_tables: print(f' [TABLE on page {p}]') print() " 2>&1 | head -300
python3 -c " import pdfplumber pdf_path = '/home/daytona/workspace/attachments/ec862b28-88e0-4f34-b91e-93e77d96f7be/1-s2.0-S0090825826019992-main.pdf' with pdfplumber.open(pdf_path) as pdf: all_text = {} for i, page in enumerate(pdf.pages): all_text[i+1] = page.extract_text() or '' for p in range(8, 16): print(f'=== PAGE {p} ===') print(all_text.get(p, '')) print() " 2>&1 | head -400
python3 -c " import pdfplumber pdf_path = '/home/daytona/workspace/attachments/ec862b28-88e0-4f34-b91e-93e77d96f7be/1-s2.0-S0090825826019992-main.pdf' with pdfplumber.open(pdf_path) as pdf: all_text = {} for i, page in enumerate(pdf.pages): all_text[i+1] = page.extract_text() or '' for p in range(13, 22): print(f'=== PAGE {p} ===') print(all_text.get(p, '')) print() " 2>&1 | head -300
python3 -c " import pdfplumber from PIL import Image import io, os pdf_path = '/home/daytona/workspace/attachments/ec862b28-88e0-4f34-b91e-93e77d96f7be/1-s2.0-S0090825826019992-main.pdf' os.makedirs('/home/daytona/workspace/eras-summary/images', exist_ok=True) with pdfplumber.open(pdf_path) as pdf: img_count = 0 for i, page in enumerate(pdf.pages): images = page.images if images: print(f'Page {i+1}: {len(images)} image(s)') for j, img in enumerate(images): print(f' img {j}: {img}') img_count += len(images) print(f'Total images found: {img_count}') "
python3 -c " import pdfplumber, io, os from PIL import Image pdf_path = '/home/daytona/workspace/attachments/ec862b28-88e0-4f34-b91e-93e77d96f7be/1-s2.0-S0090825826019992-main.pdf' os.makedirs('/home/daytona/workspace/eras-summary/images', exist_ok=True) with pdfplumber.open(pdf_path) as pdf: page = pdf.pages[0] for j, img_obj in enumerate(page.images): stream = img_obj['stream'] data = stream.get_data() # try save as jpg out_path = f'/home/daytona/workspace/eras-summary/images/fig_p1_{j}.jpg' with open(out_path, 'wb') as f: f.write(data) print(f'Saved {out_path}, size={len(data)}') "
python3 -c " from PIL import Image img = Image.open('/home/daytona/workspace/eras-summary/images/fig_p1_0.jpg') print(img.size, img.mode) img2 = Image.open('/home/daytona/workspace/eras-summary/images/fig_p1_1.jpg') print(img2.size, img2.mode) "
~/eras-summary/build_summary.js
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
ImageRun, HeadingLevel, AlignmentType, BorderStyle, WidthType,
LevelFormat, ShadingType, VerticalAlign
} = require('docx');
const fs = require('fs');
// ─── Numbering config ─────────────────────────────────────────────────────────
const numbering = {
config: [
{
reference: "bullets",
levels: [{
level: 0, format: LevelFormat.BULLET, text: "\u2022",
alignment: AlignmentType.LEFT,
style: { paragraph: { indent: { left: 720, hanging: 360 } } }
}]
},
{
reference: "sub-bullets",
levels: [{
level: 0, format: LevelFormat.BULLET, text: "\u25E6",
alignment: AlignmentType.LEFT,
style: { paragraph: { indent: { left: 1080, hanging: 360 } } }
}]
}
]
};
function h1(text) {
return new Paragraph({ heading: HeadingLevel.HEADING_1, children: [new TextRun({ text, bold: true })] });
}
function h2(text) {
return new Paragraph({ heading: HeadingLevel.HEADING_2, children: [new TextRun({ text, bold: true })] });
}
function h3(text) {
return new Paragraph({ heading: HeadingLevel.HEADING_3, children: [new TextRun({ text, bold: true })] });
}
function bullet(text) {
return new Paragraph({ numbering: { reference: "bullets", level: 0 }, children: [new TextRun(text)] });
}
function subBullet(text) {
return new Paragraph({ numbering: { reference: "sub-bullets", level: 0 }, children: [new TextRun(text)] });
}
function para(text) {
return new Paragraph({ children: [new TextRun(text)] });
}
function empty() {
return new Paragraph({ children: [new TextRun("")] });
}
function boldPara(text) {
return new Paragraph({ children: [new TextRun({ text, bold: true })] });
}
// ─── Table helper ─────────────────────────────────────────────────────────────
function makeTable(headers, rows, colWidths) {
const borderStyle = { style: BorderStyle.SINGLE, size: 1, color: "999999" };
const borders = { top: borderStyle, bottom: borderStyle, left: borderStyle, right: borderStyle, insideH: borderStyle, insideV: borderStyle };
const headerRow = new TableRow({
children: headers.map((h, i) => new TableCell({
width: { size: colWidths[i], type: WidthType.DXA },
shading: { fill: "2E74B5", type: ShadingType.CLEAR, color: "2E74B5" },
borders,
children: [new Paragraph({ children: [new TextRun({ text: h, bold: true, color: "FFFFFF", size: 20 })] })]
}))
});
const dataRows = rows.map(row => new TableRow({
children: row.map((cell, i) => new TableCell({
width: { size: colWidths[i], type: WidthType.DXA },
borders,
children: [new Paragraph({ children: [new TextRun({ text: cell || "", size: 18 })] })]
}))
}));
return new Table({ rows: [headerRow, ...dataRows], width: { size: 9026, type: WidthType.DXA } });
}
// ─── GRADE Tables ─────────────────────────────────────────────────────────────
const gradeEvidenceTable = makeTable(
["Evidence Level", "Definition"],
[
["High quality", "Further research unlikely to change confidence in estimate of effect"],
["Moderate quality", "Further research likely to have important impact on confidence in estimate of effect and may change the estimate"],
["Low quality", "Further research very likely to have important impact on confidence in estimate of effect and likely to change the estimate"],
["Very low quality", "Any estimate of effect is very uncertain"],
],
[2000, 7026]
);
const gradeRecommendationTable = makeTable(
["Recommendation Strength", "Definition"],
[
["Strong", "Desirable effects of intervention clearly outweigh the undesirable effects, or clearly do not"],
["Weak", "Trade-offs are less certain — either because of low quality evidence or because evidence suggests desirable and undesirable effects are closely balanced"],
],
[2000, 7026]
);
// ─── Main ERAS Summary Table (Table 2) ────────────────────────────────────────
const erasSummaryRows = [
["Preadmission information, education & counselling", "Develop standardized processes to ensure all patients receive procedure-specific information, understand what to expect post-intervention, and how they can actively contribute to optimal outcomes.", "Moderate", "Strong"],
["Prehabilitation", "Integrate a multimodal prehabilitation program to enhance preoperative functional capacity, nutrition status, and psychological wellbeing.", "Moderate", "Weak"],
["Anemia correction", "Identify cause of anemia (often iron deficiency) and correct preoperatively, e.g., with iron supplementation.", "High", "Strong"],
["Smoking cessation", "Smoking should be stopped preoperatively; benefits appear after 4 weeks, but any smoke-free interval is likely helpful.", "High", "Strong"],
["Alcohol cessation", "Implement preoperative alcohol cessation with a 4-8 week abstinence target, especially in those screening positive for alcohol abuse.", "Moderate", "Strong"],
["Frailty assessment", "Perform frailty assessment for all new preoperative patients using brief screening tools, with referral of screen-positive patients for comprehensive geriatric assessment.", "Moderate", "Strong"],
["Preoperative bowel preparation", "When bowel prep is used and colorectal resection is anticipated, include OABP + MBP. Do not use MBP alone. Avoid bowel prep in benign gynecologic surgery without colorectal resection.", "Moderate/High", "Strong"],
["Preoperative fasting", "Clear fluids until 2 h before anesthesia; solids until 6 h before anesthesia.", "High", "Strong"],
["Carbohydrate loading", "Use oral carbohydrate loading before surgery to shorten bowel function recovery and improve comfort. Use with caution in well-controlled type 2 diabetes.", "High/Moderate", "Strong"],
["GLP-1 agonists", "Hold on day of procedure (daily dosing) or 1 week before (weekly dosing); resume POD1.", "Moderate", "Strong"],
["Preoperative medications", "Administer NSAIDs + acetaminophen preoperatively. Gabapentin may decrease pain but use cautiously in elderly; no role in MIS. Consider duloxetine for MIS.", "Moderate/High", "Strong/Weak"],
["VTE prophylaxis", "GCS or SCD + LMWH; initiate pharmacologically within 2 h of skin incision. Extend prophylaxis for 28 days post-laparotomy. Use DOACs as cost-effective alternative. TXA reduces bleeding without increasing VTE. Limit medical prophylaxis in MIS.", "High/Moderate", "Strong"],
["Antimicrobial prophylaxis", "IV cephalosporins + metronidazole for clean/contaminated cases. In severe penicillin/cephalosporin allergy: ciprofloxacin or clindamycin with metronidazole or gentamicin.", "High", "Strong"],
["Skin preparation", "Preop chlorhexidine bathing for laparotomy. Abdominal wall: chlorhexidine-alcohol (or povidone-iodine if contraindicated). Vaginal prep with iodine or chlorhexidine.", "High/Moderate", "Strong"],
["Prevention of hypothermia", "Monitor temperature intraoperatively. Forced-air warming >=45 min before incision. Warmed IV fluids. Maintain OR temp >21.1°C. Esophageal probe for continuous core temp monitoring.", "High", "Strong"],
["Wound closure", "Routine subcutaneous closure/drainage not recommended. Prophylactic negative pressure dressings not recommended. Wound irrigation (povidone-iodine) recommended as part of SSI bundle.", "Low-High", "Strong"],
["Perioperative hyperglycemia", "Measure HbA1C per national screening guidelines. Treat glucose >180 mg/dL with weight-based correction-dose insulin in all patients.", "High/Moderate", "Strong"],
["Standard anesthetic protocol", "Short-acting anesthetics with objective NMB monitoring and full reversal. Lung-protective ventilation (6-8 mL/kg, moderate PEEP). Multimodal analgesia with acetaminophen + NSAIDs + fascial plane blocks (quadratus lumborum, TAP, erector spinae).", "High/Moderate", "Strong"],
["Goal-directed fluid therapy (GDFT)", "Use perioperative GDFT to reduce length of stay and complications in major gynecologic oncology surgery.", "High", "Strong"],
["Minimally invasive surgery (MIS)", "MIS for uterine-confined endometrial cancer; laparotomy for operable cervical cancer. Align ERAS with oncologic goals for ovarian cancer. 5 mm trocar preferred; intracorporeal cuff closure. Omit passive voiding trials to improve same-day discharge.", "High/Moderate", "Strong"],
["Opioid-sparing analgesia", "Restrictive (1-5 tablets) or no-opioid discharge prescriptions. Continue buprenorphine perioperatively in opioid use disorder. Buprenorphine and suzetrigine as alternatives to full agonist opioids.", "High/Moderate", "Strong/Weak"],
["Urinary drainage", "Remove indwelling catheters same day (MIS) or by POD1 (laparotomy, including radical hysterectomy). Keep 7 days after cystotomy; 2-4 weeks for complex repairs.", "Moderate", "Strong"],
["Early mobilization", "Encourage mobilization within 24 h of surgery; ensure nursing/allied health resources to support this.", "Low", "Strong"],
["Discharge pathways", "Provide clear, understandable discharge information. Use digital tools/apps to improve adherence and early complication detection.", "Low", "Strong"],
["Audit and reporting", "Use audit and feedback to monitor ERAS compliance. Aim for >=80% overall protocol compliance.", "Moderate", "Strong"],
];
const erasTable = makeTable(
["ERAS Item", "Recommendation", "Evidence Level", "Grade"],
erasSummaryRows,
[2000, 5026, 1000, 1000]
);
// ─── Items NOT Updated Table (Table 3) ────────────────────────────────────────
const notUpdatedTable = makeTable(
["Item", "Recommendation", "Evidence Level", "Grade"],
[
["Nausea & vomiting prophylaxis", "Use multimodal approach with >2 antiemetic agents.", "Moderate", "Strong"],
["Avoidance of drains/tubes", "Avoid peritoneal drains and nasogastric tubes after abdominal surgery.", "High", "Strong"],
["Postoperative nutrition", "Regular diet within first 24 h after gynecologic oncology surgery (including bowel resection).", "High", "Strong"],
["Prevention of postoperative ileus", "Coffee, gum chewing, euvolemia, early feeding, and early mobilization are effective.", "High", "Strong"],
],
[2000, 5026, 1000, 1000]
);
// ─── Build document ────────────────────────────────────────────────────────────
const children = [
// Title
new Paragraph({
heading: HeadingLevel.TITLE,
alignment: AlignmentType.CENTER,
children: [new TextRun({ text: "ERAS\u00AE Society Guidelines for Gynecologic Oncology: 2026 Update", bold: true, size: 36 })]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({ text: "Summary | Gynecologic Oncology 210 (2026) 153-173", italics: true, size: 22 })]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({ text: "Nelson G, Altman AD, Metcalfe A, et al.", italics: true, size: 20 })]
}),
empty(),
// Background
h1("Background"),
bullet("Third updated ERAS\u00AE Society guideline for perioperative care in gynecologic oncology."),
bullet("Previous versions: 2016, 2019, 2023."),
bullet("ERAS is an internationally adopted surgical quality improvement program with demonstrated clinical benefits and cost savings."),
bullet("This update covers literature from 2018 to 2025."),
empty(),
// Methods
h1("Methods"),
bullet("Database search: Embase, PubMed MEDLINE, Scopus, Web of Science (2018-2025)."),
bullet("Focus on RCTs, meta-analyses, and large prospective cohort studies (>=800 patients)."),
bullet("24 international authors: gynecologic oncologists, anesthesiologists, epidemiologist, health services researcher, academic librarian, and independent expert surgeon."),
bullet("Evidence graded using the GRADE system."),
empty(),
// GRADE Tables
h2("Table 1a: GRADE System - Quality of Evidence"),
gradeEvidenceTable,
empty(),
h2("Table 1b: GRADE System - Recommendation Strength"),
gradeRecommendationTable,
empty(),
// Summary Recommendations Table
h1("Summary of All ERAS Recommendations (Table 2)"),
para("Items updated in the 2026 guideline with their recommendations, evidence levels, and recommendation grades."),
empty(),
erasTable,
empty(),
// Items NOT Updated
h1("Items Without Change in 2026 (Table 3)"),
notUpdatedTable,
empty(),
// Results by Section
h1("Results by Section"),
// 1. Preadmission
h2("1. Preadmission Information, Education & Counselling"),
bullet("Standardized pre-admission education is associated with reduced anxiety, pain, and length of stay."),
bullet("Standardized scripts improve consistency of information provided."),
bullet("Written information combined with verbal counselling improves patient satisfaction and outcomes vs. verbal alone."),
bullet("Virtual counselling can provide results comparable to in-person."),
bullet("AI-assisted counselling shows early promise but ~10% inaccuracy rate noted with ChatGPT - caution advised."),
bullet("Teach-back methods are effective to ensure patient comprehension."),
boldPara("Recommendation: Develop standardized processes ensuring all patients receive procedure-specific information."),
empty(),
// 2. Prehabilitation
h2("2. Prehabilitation"),
bullet("Multimodal prehabilitation targets physical, nutritional, and psychological status before surgery."),
bullet("Benefits include:"),
subBullet("6-Minute Walk Test improvement: 20.7-38.27 m above baseline"),
subBullet("~20% increase in leg press 1 rep max; ~8% rise in VO\u2082 peak"),
subBullet("~10% reduction in preoperative malnutrition"),
subBullet("1.2-5 point decrease in Hospital Anxiety and Depression Scale (HADS) scores"),
subBullet("Reduction in intraoperative blood transfusion (14.3% vs. 53.3% in pilot data)"),
subBullet("Shorter hospital stay (5.0 vs. 7.0 days) and earlier adjuvant chemotherapy initiation"),
bullet("Evidence is limited by small sample sizes and heterogeneous interventions."),
boldPara("Recommendation (Weak): Integrate multimodal prehabilitation to optimize preoperative status."),
empty(),
// 3. Preoperative Optimization
h2("3. Preoperative Optimization & Frailty Assessment"),
h3("Anemia"),
bullet("Pre-operative anemia affects ~25% of gynecologic oncology patients."),
bullet("Associated with infectious complications, transfusion need, and thrombosis."),
bullet("Identify and correct the cause (often iron deficiency) before elective surgery."),
boldPara("Evidence: High | Recommendation: Strong"),
empty(),
h3("Smoking & Alcohol Cessation"),
bullet("Smoking linked to pulmonary complications, wound dehiscence, anastomotic leak, and VTE."),
bullet("Benefits of smoking cessation occur after 4 weeks; any smoke-free period helps."),
bullet("Alcohol cessation 4-8 weeks before surgery (risky drinkers: >3 units/day or >21/week) reduces postoperative complications (RR 0.62; 95% CI 0.40-0.96)."),
boldPara("Evidence: High (tobacco) / Moderate (alcohol) | Recommendation: Strong"),
empty(),
h3("Frailty Assessment"),
bullet("Frailty is associated with increased morbidity, prolonged hospitalization, and higher mortality."),
bullet("Recommended stepwise approach:"),
subBullet("Screening: FRAIL scale, G8 questionnaire, or Edmonton Frail Scale"),
subBullet("Positive screen: refer for comprehensive geriatric assessment"),
bullet("TUG and Five Times Sit-to-Stand tests can be used in clinic but are insufficient alone."),
boldPara("Evidence: Moderate | Recommendation: Strong"),
empty(),
// 4. Bowel Prep
h2("4. Preoperative Bowel Preparation"),
bullet("OABP + MBP: reduces SSI, anastomotic leak, ileus, reoperation, and readmission when colorectal resection is planned."),
bullet("OABP alone is an alternative to OABP + MBP when colorectal resection is anticipated (Low/Weak)."),
bullet("Modified MBP (oral laxatives) + OABP is non-inferior to conventional osmotic MBP + OABP (Moderate/Weak)."),
bullet("OABP regimens must include anaerobic coverage (75% lower SSI with anaerobic coverage)."),
bullet("MBP alone does NOT improve outcomes and should not be used."),
bullet("No bowel prep in benign gynecologic surgery without anticipated colorectal resection."),
empty(),
// 5. Fasting & Carbs
h2("5. Preoperative Fasting & Carbohydrate Treatment"),
bullet("Clear fluids permitted until 2 h before anesthesia."),
bullet("Solids permitted until 6 h before anesthesia."),
bullet("Oral carbohydrate loading recommended: shortens bowel recovery, improves comfort."),
subBullet("Up to 400 mL within 2 h of surgery (ASA guidelines)"),
subBullet("Complex carbohydrates (maltodextrin) preferred over simple sugars"),
subBullet("Morning dose (2 h pre-induction) is the most physiologically important"),
bullet("Carbohydrate loading in well-controlled T2DM: appears safe but use with caution (Low/Weak)."),
bullet("GLP-1 agonists: hold on day of procedure (daily dosing) or 1 week prior (weekly dosing); resume POD1."),
empty(),
// 6. Preop Medications
h2("6. Preoperative Medications"),
bullet("NSAIDs + acetaminophen (IV or PO) preoperatively - reduces opioid requirements (Moderate/Strong)."),
bullet("Gabapentin - may decrease postoperative pain; caution in elderly (delirium, sedation, pneumonia); no benefit in MIS (High/Strong)."),
bullet("Duloxetine 60 mg - consider for pain reduction in MIS (Moderate/Weak)."),
empty(),
// 7. VTE
h2("7. Venous Thromboembolism (VTE) Prophylaxis"),
bullet("Initiate pharmacologic thromboprophylaxis within 2 h of skin incision."),
bullet("Combine with mechanical methods (GCS or SCD) + LMWH."),
bullet("Lower limb exercises and deep breathing reduce thrombosis risk postoperatively."),
bullet("Extend LMWH or DOAC prophylaxis for 28 days after cancer laparotomy."),
subBullet("DOACs are cost-effective with no increased bleeding risk vs. LMWH"),
bullet("MIS: routine extended prophylaxis not recommended; mechanical methods preferred; consider medical prophylaxis if Caprini score is high."),
bullet("Tranexamic acid (TXA): reduces bleeding/transfusions without increasing VTE."),
bullet("VTE prophylaxis may be considered during entire course of neoadjuvant chemotherapy (Low/Weak)."),
empty(),
// 8. SSI
h2("8. Surgical Site Infection (SSI) Reduction Bundles"),
h3("Antimicrobial Prophylaxis"),
bullet("IV cephalosporins + metronidazole for clean/contaminated cases."),
bullet("Severe penicillin/cephalosporin allergy: ciprofloxacin or clindamycin with metronidazole or gentamicin."),
bullet("Vaginal metronidazole is not effective - avoid."),
empty(),
h3("Skin Preparation"),
bullet("Preoperative chlorhexidine bathing at home for gynecologic laparotomy."),
bullet("Abdominal wall: chlorhexidine-alcohol preferred; povidone-iodine when chlorhexidine unavailable/contraindicated."),
bullet("Vaginal prep: iodine or chlorhexidine solutions (both acceptable)."),
empty(),
h3("Prevention of Hypothermia"),
bullet("Forced-air warming for at least 45 min before surgical incision (preoperative area)."),
bullet("Maintain ambient OR temperature >21.1\u00B0C."),
bullet("Warmed IV fluids may reduce hypothermia-related SSI."),
bullet("Continuous core temperature monitoring with esophageal probe intraoperatively."),
empty(),
h3("Wound Closure"),
bullet("Routine subcutaneous closure: NOT recommended (no reduction in SSI vs. non-closure)."),
bullet("Routine subcutaneous drainage: NOT recommended."),
bullet("Prophylactic negative pressure wound treatments: NOT recommended."),
bullet("Wound irrigation (povidone-iodine) recommended as part of the SSI bundle."),
empty(),
h3("Avoidance of Perioperative Hyperglycemia"),
bullet("Measure HbA1C per national diabetes screening guidelines before surgery."),
bullet("Consider HbA1C screening even outside guidelines if additional infection risk factors present (Low/Weak)."),
bullet("Treat glucose >180 mg/dL with weight-based correction-dose insulin in all patients (with and without diabetes)."),
empty(),
// 9. Anesthesia
h2("9. Standard Anesthetic Protocol"),
bullet("Short-acting anesthetics with objective neuromuscular block (NMB) monitoring and complete reversal."),
bullet("Lung-protective ventilation: tidal volume 6-8 mL/kg, moderate PEEP (4-8 cm H\u2082O); avoid zero PEEP."),
bullet("Multimodal analgesia:"),
subBullet("Acetaminophen + NSAIDs (High/Strong)"),
subBullet("Incisional bupivacaine (High/Strong)"),
subBullet("Quadratus lumborum block - more effective than TAP for visceral + somatic pain (Moderate/Strong)"),
subBullet("Erector spinae plane block - superior to TAP for opioid-sparing and quality of recovery (Low/Strong)"),
subBullet("TAP blocks have limited benefit for visceral pain and in laparoscopic/robotic hysterectomy"),
subBullet("IV lidocaine infusion improves pain control and GI recovery in major cancer surgery"),
empty(),
// 10. Fluid Management
h2("10. Perioperative Fluid Management & Goal-Directed Fluid Therapy (GDFT)"),
bullet("Three strategies exist: liberal (associated with SSI and complications), restrictive, and GDFT."),
bullet("GDFT is recommended: reduces LOS by ~1.6 days, lowers complication rates (RR 0.74), and promotes earlier bowel function return."),
bullet("Different hemodynamic monitoring tools and fluid algorithms have been studied; further research on optimal technique is needed."),
boldPara("Evidence: High | Recommendation: Strong"),
empty(),
// 11. MIS
h2("11. Minimally Invasive Surgery (MIS)"),
bullet("Endometrial cancer (uterine-confined): MIS is standard of care - equivalent oncologic outcomes, better recovery."),
bullet("Cervical cancer (operable): laparotomy is supported by level 1 evidence for superior long-term survival."),
bullet("Ovarian cancer: MIS for risk-reducing surgery, early-stage disease, and assessing resectability. Cytoreduction to no gross residual is the priority."),
subBullet("Port site metastasis risk is highest in ovarian cancer; preventive strategies should be evaluated"),
bullet("5 mm trocar (vs. 11 mm) reduces postoperative pain."),
bullet("Intracorporeal cuff closure reduces vaginal dehiscence compared to transvaginal closure."),
bullet("Omitting passive voiding trials improves same-day discharge (SDD) metrics."),
subBullet("Target SDD rates: 90% for benign; 70-80% for gynecologic oncology cases"),
empty(),
// 12. Opioid-Sparing
h2("12. Opioid-Sparing Postoperative Analgesia"),
bullet("Multimodal locoregional analgesia is the cornerstone of ERAS postoperative pain management."),
bullet("Restrictive (1-5 tablets oxycodone 5 mg) or no-opioid discharge prescriptions: safe and feasible."),
bullet("Buprenorphine continuation perioperatively in opioid use disorder patients: reduces pain scores and opioid dispensing."),
bullet("Buprenorphine instead of full opioid agonists: superior pain management, longer duration, no difference in adverse effects (Moderate/Weak)."),
bullet("Suzetrigine (FDA approved January 2025): effective for moderate-severe acute pain; significantly more expensive than opioids (Moderate/Weak)."),
bullet("Intrathecal hydromorphone added to incisional liposomal bupivacaine reduces IV opioid need after laparotomy."),
empty(),
// 13. Urinary Drainage
h2("13. Urinary Drainage"),
bullet("Routine cases: remove indwelling catheter same day (MIS) or by POD1 (laparotomy, including radical hysterectomy)."),
bullet("Bladder/ureteral injury or cystotomy: maintain catheter for at least 7 days."),
bullet("Irradiated patients or complex ureteral reconstructions: 2-4 weeks; cystogram before removal."),
bullet("Intermittent self-catheterization can be used instead of reinserting catheter if urinary retention develops."),
empty(),
// 14. Early Mobilization
h2("14. Early Mobilization"),
bullet("Immobility risks: insulin resistance, decreased bowel function, VTE."),
bullet("Compliance with early mobilization is associated with reduced complications and shorter LOS."),
bullet("Evidence suggests a linear relationship between step count and hospital LOS."),
bullet("Wearable devices may improve mobilization monitoring."),
boldPara("Recommendation: Mobilize within 24 h of surgery. Nursing/allied health resources must support this."),
bullet("Evidence: Low | Recommendation: Strong"),
empty(),
// 15. Discharge
h2("15. Discharge Pathways"),
bullet("ERAS reduces LOS, shortening the time available for in-hospital education."),
bullet("Digital tools/apps facilitate real-time symptom monitoring and earlier complication detection."),
bullet("App-based follow-up is associated with improved adherence to discharge instructions and fewer readmissions."),
bullet("Patients find electronic monitoring easy to use and satisfaction-improving."),
boldPara("Recommendation: Clear discharge information is essential. Use digital tools when possible."),
bullet("Evidence: Low | Recommendation: Strong"),
empty(),
// 16. Audit
h2("16. Audit & Reporting"),
bullet("Audit and feedback are core components of all ERAS programs."),
bullet("Each 1-point increase in ERAS compliance:"),
subBullet("8% reduction in LOS for low-complexity cases"),
subBullet("12% reduction in LOS for medium/high-complexity cases"),
bullet(">=80% ERAS compliance is associated with lower complication rates, fewer 30-day readmissions, shorter LOS."),
bullet("Audit and feedback results in ~6.2% increase in desired practice change (Cochrane meta-analysis)."),
bullet("AI and natural language processing are emerging tools for automated ERAS auditing from EMRs."),
boldPara("Recommendation: Aim for >=80% overall protocol compliance."),
empty(),
// Summary
h1("Overall Summary"),
bullet("This 2026 update is the third revision of the ERAS\u00AE Society guidelines for gynecologic oncology perioperative care."),
bullet("New items or significant updates include: prehabilitation, GLP-1 agonist management, frailty assessment, MIS modifications, opioid-sparing innovations (buprenorphine, suzetrigine), and AI in patient care."),
bullet("Guidelines are intended for teams initiating AND refining ERAS pathways."),
bullet("Continuous monitoring, multidisciplinary collaboration, and iterative improvements are essential to optimize outcomes worldwide."),
empty(),
];
const doc = new Document({
numbering,
styles: {
default: {
document: { run: { font: "Arial", size: 22 } }
},
paragraphStyles: [
{
id: "Heading1", name: "Heading 1", basedOn: "Normal", next: "Normal", quickFormat: true,
run: { size: 32, bold: true, font: "Arial", color: "2E74B5" },
paragraph: { spacing: { before: 300, after: 120 }, outlineLevel: 0 }
},
{
id: "Heading2", name: "Heading 2", basedOn: "Normal", next: "Normal", quickFormat: true,
run: { size: 28, bold: true, font: "Arial", color: "2E74B5" },
paragraph: { spacing: { before: 240, after: 120 }, outlineLevel: 1 }
},
{
id: "Heading3", name: "Heading 3", basedOn: "Normal", next: "Normal", quickFormat: true,
run: { size: 24, bold: true, font: "Arial", color: "404040" },
paragraph: { spacing: { before: 180, after: 60 }, outlineLevel: 2 }
},
]
},
sections: [{
properties: {
page: {
margin: { top: 1080, bottom: 1080, left: 1080, right: 1080 }
}
},
children
}]
});
Packer.toBuffer(doc).then(buf => {
fs.writeFileSync('/home/daytona/workspace/eras-summary/ERAS_2026_Gynecologic_Oncology_Summary.docx', buf);
console.log('Done.');
});
cd /home/daytona/workspace/eras-summary && node build_summary.js 2>&1
python3 /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/eras-summary/ERAS_2026_Gynecologic_Oncology_Summary.docx 2>&1
python3 -c " from docx import Document doc = Document('/home/daytona/workspace/eras-summary/ERAS_2026_Gynecologic_Oncology_Summary.docx') print('Paragraphs:', len(doc.paragraphs)) print('Tables:', len(doc.tables)) print('First para:', doc.paragraphs[0].text[:80]) print('File size:', __import__('os').path.getsize('/home/daytona/workspace/eras-summary/ERAS_2026_Gynecologic_Oncology_Summary.docx')) "
ls -lh /home/daytona/workspace/eras-summary/ERAS_2026_Gynecologic_Oncology_Summary.docx && python3 -c " import zipfile with zipfile.ZipFile('/home/daytona/workspace/eras-summary/ERAS_2026_Gynecologic_Oncology_Summary.docx') as z: print('Files in docx:', z.namelist()[:10]) content = z.read('word/document.xml').decode('utf-8', errors='replace') print('document.xml size:', len(content)) print('First 300 chars:', content[:300]) "
ERAS 2026 Gynecologic Oncology Summary
Word Document · DOCX
Give as a pdf
python3 /home/daytona/skills/pdf/scripts/soffice.py --headless --convert-to pdf /home/daytona/workspace/eras-summary/ERAS_2026_Gynecologic_Oncology_Summary.docx --outdir /home/daytona/workspace/eras-summary/ 2>&1
python3 /home/daytona/skills/docx/scripts/office/soffice.py --headless --convert-to pdf /home/daytona/workspace/eras-summary/ERAS_2026_Gynecologic_Oncology_Summary.docx --outdir /home/daytona/workspace/eras-summary/ 2>&1
cp /home/daytona/workspace/eras-summary/ERAS_2026_Gynecologic_Oncology_Summary.docx /tmp/eras_input.docx && python3 /home/daytona/skills/docx/scripts/office/soffice.py --headless --convert-to pdf /tmp/eras_input.docx --outdir /tmp/ 2>&1 && ls -lh /tmp/eras_input.pdf
cp /tmp/eras_input.pdf /home/daytona/workspace/eras-summary/ERAS_2026_Gynecologic_Oncology_Summary.pdf && ls -lh /home/daytona/workspace/eras-summary/ERAS_2026_Gynecologic_Oncology_Summary.pdf
ERAS 2026 Gynecologic Oncology Summary
PDF Document · PDF