attachment
attachment

Give me the content of above headings after assessing standard books and pubmed give me the content with the following headings relevant to pain and pallitive medicine

analyse_media
Reading File
Finding Sources
Finding Sources
Searching PubMed

"palliative surgery" AND oncology AND outcomes

Searching PubMed

palliative surgery AND cancer AND indications morbidity

Reading File
Reading File
Reading File
Finding Sources
Reading Article

PMID: 39610018

Reading Article

PMID: 39667288

Finding Sources
Finding Sources
Finding Sources
Searching PubMed

orthopedic surgery palliative AND bone metastases AND outcomes

Searching PubMed

urinary diversion palliative AND cancer AND quality of life

Reading File
Finding Sources
Finding Sources
Reading Article

PMID: 35226235

Reading Article

PMID: 40251493

Finding Sources
Searching PubMed

palliative surgery decision making goals cancer patient quality of life


1.4 Palliative Surgery


1. Principles of Palliative Surgery in the Oncology Setting

Definition

Palliative surgery is defined as surgical intervention targeted to alleviate a patient's symptoms, thus improving quality of life (QoL) despite minimal impact on survival. It is distinct from curative or cytoreductive surgery. The definition encompasses four recurring themes in the literature: (1) incurable cancer prognosis, (2) intent to relieve symptoms or improve QoL, (3) specific operative interventions, and (4) persistence of disease after surgery (incomplete cytoreduction). - Schwartz's Principles of Surgery 11th ed., p. 2084; Wong et al., 2025, J Surg Oncol
Critically, if the intervention is not relieving a symptom, it is not palliative therapy - treatment of incurable cancer aimed at maximizing life length (e.g., systemic chemotherapy) is often loosely - and inappropriately - labeled "palliative." - Current Surgical Therapy 14e

Guiding Principles

PrincipleDescription
Symptom-first intentAll interventions must target a specific, burdensome symptom (pain, obstruction, bleeding, dysphagia)
Least invasive approachUse the minimal intervention that achieves symptom relief
Balance of benefit vs. burdenNew symptoms from the intervention must not outweigh the benefit gained
Realistic goal-settingPatients must receive accurate information about expected post-operative outcomes and survival
Multidisciplinary team (MDT)Surgery, medical oncology, radiation oncology, and palliative medicine must make decisions together
Performance statusAdequate performance status is needed to safely undergo and benefit from surgery
Time horizonAnticipated survival must justify the recovery time and hospitalization burden
  • Schwartz's Principles of Surgery 11th ed.; Sabiston Textbook of Surgery

Core Competencies for Surgical Palliative Care

  • Communication of prognosis and realistic outcomes
  • Symptom assessment and relief
  • Shared decision-making aligned with patient's goals and values
  • Knowledge of when to avoid surgery (futility)
  • Coordination with palliative medicine specialists
  • Awareness of hospice criteria and transition planning

Key Evidence

A 2025 systematic review (Wong et al., J Surg Oncol, PMID 39610018) of 92 studies found that survival (90%) and perioperative morbidity (72%) are the most commonly reported outcomes after palliative thoraco-abdominal surgery - yet symptom relief, quality of life, and "sustainability of success" are infrequently reported. This reveals a mismatch between the intent of palliative surgery and what is actually measured - an important limitation in current evidence.
A meta-analysis (Schwartz's 11th ed.) on malignant bowel obstruction from peritoneal carcinomatosis found that although palliative surgery can benefit some patients, many experience serious complications, incomplete resolution of symptoms, and substantial hospitalization relative to remaining survival time.

2. Indications and Morbidities of Palliative Surgery in Individual Cancers

Indications by Symptom

SymptomIndication for Palliative Surgery
Bowel obstructionResection, stoma creation, bypass, stenting
Gastrointestinal bleedingResection or embolization of bleeding tumor
Biliary obstruction / jaundiceERCP stenting, PTBD, surgical bypass
Gastric outlet obstructionGastrojejunostomy, duodenal stenting
Airway obstructionTracheostomy, tumor debulking, stenting
Urinary obstructionUrinary diversion, ureteric stenting, nephrostomy
Pain from tumor mass / nerve invasionDebulking, cordotomy, nerve blocks
Pathological fracture / impending fractureIntramedullary nailing, endoprosthesis
Spinal cord compressionDecompressive laminectomy, vertebroplasty
DysphagiaPEG tube placement, esophageal stenting
FistulaDiversion stoma, reconstructive closure
Wound / fungating tumorDebulking, flap coverage

Indications by Cancer Type

Gastric Cancer: Palliative gastrectomy for bleeding or obstruction; Roux-en-Y gastrojejunostomy for outlet obstruction; intraluminal stenting for cardia/esophagogastric junction tumors. - Bailey and Love's Surgery 28th ed., p. 1197
Colorectal Cancer: Diverting colostomy or ileostomy for obstructing left-sided tumors; resection with end colostomy (Hartmann's); endoscopic stenting as a bridge to surgery or for palliation; defunctioning loop stoma for recto-vaginal or recto-vesical fistulae.
Pancreatic / Periampullary Cancer: Biliary bypass (hepaticojejunostomy) or ERCP stenting for obstructive jaundice; gastrojejunostomy or duodenal stenting for gastric outlet obstruction; celiac plexus neurolysis for pain. Requires a defined multidisciplinary team - the patient must have a "home" team responsible for coordinating biliary decompression, nutrition, and performance status optimization. - Current Surgical Therapy 14e
Head and Neck Cancer: Tracheostomy for airway compromise; PEG for dysphagia/nutrition; tumor debulking for compressive symptoms; vocal cord medialization for voice restoration and aspiration prevention; vascular stenting or embolization for tumor erosion into major vessels (including carotid). - Cummings Otolaryngology, p. 1436
Gynecological / Pelvic Cancers: Urinary diversion for malignant ureteric obstruction; diverting colostomy for recto-vaginal fistula; pelvic exenteration in selected recurrent disease.
Breast Cancer (Stage IV): Surgery for palliation in widespread metastatic disease with poor systemic response - managed via multidisciplinary discussion including surgery, medical and radiation oncology. - Current Surgical Therapy 14e
Lung Cancer: Tracheobronchial stenting; pleurodesis for malignant pleural effusion; VATS procedures.
Renal Cell Carcinoma (RCC): Cytoreductive nephrectomy in selected metastatic RCC patients (historically, prior to immunotherapy era); embolization for hemorrhage. - Campbell-Walsh-Wein Urology

Morbidities of Palliative Surgery

Morbidity after palliative surgery is significant and must be carefully weighed:
  • Perioperative mortality: ~4% in palliative bowel resection series
  • Perioperative complication rate: ~15% (including anastomotic leak, wound infection, sepsis, DVT/PE)
  • Symptom non-resolution: A proportion of patients do not achieve adequate symptom relief despite surgery
  • Prolonged hospitalization relative to remaining life expectancy - patients may spend a disproportionate part of their remaining time in hospital
  • Nutritional depletion and immunosuppression increase surgical risk in advanced cancer patients
  • Wound healing failure due to prior radiotherapy, malnutrition, or steroid use
A 2025 meta-analysis (Li et al., PMID 40251493) in advanced gastric cancer found that palliative reduction surgery did not confer long-term survival benefit over non-surgical treatment, with 15% perioperative complication rate and 4% mortality in the surgical group - reinforcing the need for careful patient selection.
The economic evaluation by Low et al. (2025, PMID 39667288) highlights that despite positive symptom outcomes in malignant bowel obstruction, the economic evidence for palliative GI surgery remains poor-quality and heterogeneous.

3. Common Palliative Surgery Procedures

A. Colostomy and Ileostomy

  • Colostomy (loop or end) is created to divert fecal flow proximal to an obstructing, non-resectable tumor of the rectum or left colon, or to protect a distal anastomosis, or to manage a colovesical/rectovaginal fistula.
  • Ileostomy is used when the colonic segment is compromised, unstable patient, or as a proximal diversion for left-sided obstructing cancers when resection with anastomosis is considered unsafe.
  • Both procedures are rapid, relatively low-risk, and highly effective for symptom relief (obstruction, fistula).
  • Hartmann's procedure (resection of sigmoid/rectum + end colostomy without anastomosis) is the procedure of choice for perforated or acutely obstructing left-sided colorectal cancers in compromised patients. - Current Surgical Therapy 14e

B. Gastrostomy (PEG/Surgical)

  • Percutaneous Endoscopic Gastrostomy (PEG) is the preferred method for enteral feeding when oral intake is inadequate due to dysphagia (head and neck cancer, esophageal cancer, neurological compromise from tumor).
  • Can be done under conscious sedation with minimal morbidity.
  • Surgical gastrostomy (open or laparoscopic) is used when endoscopy is not feasible (e.g., obstructing pharyngeal/esophageal tumor).
  • Also used for gastric decompression in patients with malignant bowel obstruction who are not surgical candidates. - Cummings Otolaryngology, p. 1436

C. Urinary Diversion Procedures

  • Indicated for malignant ureteric obstruction (cervical cancer, bladder cancer, colorectal cancer, retroperitoneal lymph node metastases).
  • Options include:
    • Percutaneous nephrostomy - most immediate, minimally invasive
    • JJ (Double-J) ureteric stent - endoscopic, preferred if technically feasible
    • Ileal conduit (Bricker's) - for bilateral obstruction with adequate performance status
    • Cutaneous ureterostomy - simpler, used in frail patients
  • Goal: relieve obstructive uropathy, prevent renal failure, allow continuation of systemic therapy.
  • A study by Perri et al. (2022, PMID 31018967) confirmed that palliative urinary diversion in gynecological cancers improves renal function and allows further systemic treatment in selected patients.

D. Tracheostomy

  • Indicated for airway obstruction from tumor of the larynx, hypopharynx, trachea, or cervical esophagus; or after bilateral vocal cord paralysis from neck dissection or tumor invasion.
  • Can be temporary (during treatment) or permanent (palliative, non-resectable tumors).
  • Provides immediate life-saving airway access; allows decannulation consideration if tumor responds.
  • In head and neck cancer patients, tracheostomy may coexist with PEG to manage both airway and nutrition. - Cummings Otolaryngology; Schwartz's Principles of Surgery

E. Stenting (Luminal and Biliary)

  • Esophageal stents (SEMS): Self-expanding metal stents for malignant dysphagia from esophageal/cardia tumors. Provide rapid relief but have risks of migration, perforation, and tumor ingrowth.
  • Gastroduodenal stents: For gastric outlet obstruction (pancreatic, gastric, duodenal cancers); endoscopically placed.
  • Colonic stents: For malignant large bowel obstruction - used as a bridge to surgery or for definitive palliation in non-surgical candidates. - Bailey and Love's Surgery 28th ed.
  • Biliary stents: Placed via ERCP or EUS; SEMS preferred over plastic stents for longer patency in malignant biliary obstruction.

F. ERCP / PTBD (Endoscopic Retrograde Cholangiopancreatography / Percutaneous Transhepatic Biliary Drainage)

  • ERCP with SEMS placement is the first-line approach for malignant biliary obstruction (pancreatic head cancer, cholangiocarcinoma, ampullary cancer, lymph nodal compression).
  • SEMS provide longer patency (~9-12 months) versus plastic stents (~3 months).
  • PTBD (percutaneous transhepatic biliary drainage) is used when ERCP fails, when the hilum is involved (Klatskin tumors), or when prior bilioenteric anastomosis prevents endoscopic access.
  • Surgical biliary bypass (hepaticojejunostomy or choledochojejunostomy) is reserved for patients with good performance status undergoing laparotomy, or when endoscopic approaches are not feasible. - Current Surgical Therapy 14e
  • Important principle: In patients with operable disease being considered for neoadjuvant therapy, avoid high-risk endoscopic procedures that could compromise subsequent surgery; "the interventional gastroenterologist should never come first." - Current Surgical Therapy 14e

G. Other Interventional Surgical/Radiological Procedures

  • Embolization (TAE/TACE): Transarterial embolization for bleeding from HCC, RCC, or hypervascular metastases; TACE for HCC palliation.
  • Celiac plexus neurolysis (CPN): Chemical ablation (alcohol or phenol) via endoscopic ultrasound (EUS) or percutaneous approach; highly effective for pancreatic cancer pain (60-80% response). A key palliative intervention in pain and palliative medicine.
  • Radiofrequency ablation (RFA) / Microwave ablation (MWA): For hepatic metastases, lung metastases, bone pain.
  • Vertebroplasty / Kyphoplasty: Percutaneous cement injection into vertebral metastases for pain relief and stability.
  • Pleurodesis: Talc pleurodesis for recurrent malignant pleural effusion (chemical or mechanical via VATS).
  • Paracentesis / Peritoneal port: Repeated large-volume paracentesis or tunneled peritoneal catheter (PleurX) for malignant ascites.
  • Vascular embolization for hemorrhage: Carotid artery blowout in head and neck cancer; renal artery embolization.
  • Pelvic exenteration: Anterior, posterior, or total - indicated in selected recurrent pelvic malignancies (cervical cancer, rectal cancer) with intent to relieve pelvic pain, bleeding, and fistulae; associated with high morbidity. - Cummings Otolaryngology; Grainger & Allison's Diagnostic Radiology

4. Orthopedic Surgeries in Palliative Care

Background

Bone metastases are present in 60-80% of patients with advanced breast, prostate, and lung cancer, and in 25-40% with thyroid and RCC. They cause pain, pathological fracture, hypercalcemia, and spinal cord compression - significantly impairing QoL. Orthopedic surgery in palliative care aims to relieve pain, restore skeletal stability, and preserve or restore ambulation with minimal invasiveness.
Surgical goals follow the principles: (1) maintain lasting bony stability, (2) minimal surgical invasiveness, (3) anticipate post-operative failure by using long-span implants and cement augmentation. - Hayashi & Tsuchiya, 2022, Int J Clin Oncol, PMID 35226235

Assessment Before Surgery

  • Mirels' scoring system is used to predict fracture risk in long bone metastases (score ≥9 = prophylactic fixation recommended).
  • Estimated survival should be ≥6 weeks to justify surgery (Tokuhashi score, Tomita score for spine).
  • Multidisciplinary bone metastasis cancer board review improves patient selection and outcomes. - Miyazaki et al., 2023, PMID 38138190

Procedures by Anatomical Site

Long Bones (Femur, Humerus, Tibia):
  • Intramedullary nailing (IMN): Preferred for impending/actual pathological fractures of long bones; provides load-sharing across the entire bone.
    • Long intramedullary nails and cement augmentation reduce post-operative failure rates.
    • Femoral IMN (e.g., for subtrochanteric/femoral shaft metastases) can be performed quickly; allows rapid weight-bearing.
  • Plate and screw fixation: For smaller lesions; higher failure rate - less preferred.
  • Endoprosthetic replacement (tumor prosthesis): For lesions at joints (femoral head/neck, proximal humerus, distal femur). Provides immediate stability; short-term dislocation risk but durable long-term. Long-type stems with cement improve outcomes.
  • Cement (PMMA) injection: Augments fixation; used with nails or plates in deficient cortical bone.
Spine (Most Common Site of Bone Metastasis):
  • Decompressive laminectomy + stabilization: Indicated for spinal cord compression causing pain, weakness, or incontinence; ideally performed within 24 hours of cord compression.
  • Total en bloc spondylectomy (TES): Oncologically sound for solitary metastases from RCC or thyroid cancer (radioresistant tumors) with good prognosis; high blood loss but durable results.
  • Separation surgery: Debulking of epidural tumor to create a safe margin for stereotactic body radiotherapy (SBRT); followed by SBRT/SABR for local control.
  • Vertebroplasty / Kyphoplasty: Percutaneous cement injection for pain from compression fractures without cord compression; minimally invasive, rapid pain relief.
  • SBRT / SABR (adjuvant): 2024 ASTRO guideline (PMID 38788923) supports external beam radiotherapy as first-line for painful bone metastases, with SBRT for oligometastatic or previously irradiated sites.
Pelvis and Acetabulum:
  • Custom-made implants or recycled autologous bone grafting for acetabular metastases with good prognosis.
  • Hemipelvectomy or internal hemipelvectomy for isolated, resectable pelvic tumors with good performance status.
Pathological Fractures - Key Decision Points:
  • Stabilize before irradiating (radiation weakens bone in the short term; fixation first provides immediate structural support).
  • Cement augmentation at the time of fixation prevents hardware failure in demineralized bone.
  • Post-operative radiotherapy reduces local recurrence and hardware loosening.

Morbidity of Orthopedic Palliative Procedures

  • Short-term: dislocation (endoprosthesis), deep vein thrombosis/PE (major surgery), wound infection, blood loss, hardware failure
  • Long-term: implant loosening, tumor re-growth, hardware failure (reduced by long IMN and cement)
  • Benefit clearly demonstrated in functional restoration (ambulatory status, pain) even with modest survival gains

Summary Table: Palliative Surgical Procedures and Their Indications

ProcedureIndicationCancer Types
Colostomy / IleostomyBowel obstruction, fistulaColorectal, pelvic cancers
Gastrostomy (PEG/surgical)Dysphagia, nutritional support, gastric drainageHead/neck, esophageal, stomach
Urinary diversion / JJ stent / nephrostomyMalignant ureteric obstructionCervical, bladder, colorectal, retroperitoneal
TracheostomyAirway obstruction, aspirationHead/neck, larynx, trachea, thyroid
Luminal stenting (esophagus/colon/duodenum)Obstruction, dysphagiaEsophageal, gastric, colorectal, pancreatic
ERCP / PTBD / biliary bypassMalignant obstructive jaundicePancreatic, cholangiocarcinoma, ampullary, gallbladder
Celiac plexus neurolysisRefractory abdominal/back painPancreatic, upper GI cancers
Vertebroplasty / KyphoplastyVertebral compression fracture painBreast, prostate, myeloma, lung
IMN / endoprosthesisPathological/impending long bone fractureBreast, lung, prostate, RCC
Decompressive laminectomySpinal cord compressionAny cancer with vertebral metastasis
PleurodesisMalignant pleural effusionLung, breast, mesothelioma
Pelvic exenterationPelvic pain, fistula, bleedingRecurrent cervical/rectal cancer

Key References:

Make a Word document compiling this content as a study guide for pain & palliative medicine

Reading File
Running Command

ls -la /tmp/workspace/ 2>/dev/null || mkdir -p /tmp/workspace && echo "workspace ready"

Running Command

mkdir -p /tmp/workspace/palliative-surgery && cat > /tmp/workspace/palliative-surgery/create_doc.py << 'PYEOF' from docx import Document from docx.shared import Pt, Inches, RGBColor from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.oxml.ns import qn from docx.oxml import OxmlElement import copy doc = Document() # ── Page margins ────────────────────────────────────────────────────────────── section = doc.sections[0] section.page_width = Inches(8.5) section.page_height = Inches(11) section.left_margin = Inches(1) section.right_margin = Inches(1) section.top_margin = Inches(1) section.bottom_margin = Inches(1) # ── Base Normal style ───────────────────────────────────────────────────────── normal = doc.styles["Normal"] normal.font.name = "Calibri" normal.font.size = Pt(11) # ── Helper colours ───────────────────────────────────────────────────────────── NAVY = RGBColor(0x0D, 0x47, 0xA1) # deep blue – main headings TEAL = RGBColor(0x00, 0x69, 0x5C) # teal – section headings DARK = RGBColor(0x21, 0x21, 0x21) # near-black WHITE = RGBColor(0xFF, 0xFF, 0xFF) ACCENT = RGBColor(0x00, 0x69, 0x5C) # table header fill # ── Utility: shade a table cell ─────────────────────────────────────────────── def shade_cell(cell, hex_color: str): tc = cell._tc tcPr = tc.get_or_add_tcPr() shd = OxmlElement("w:shd") shd.set(qn("w:val"), "clear") shd.set(qn("w:color"), "auto") shd.set(qn("w:fill"), hex_color) tcPr.append(shd) def set_cell_border(cell, **kwargs): """kwargs: top/bottom/left/right = (size_pt, color_hex)""" tc = cell._tc tcPr = tc.get_or_add_tcPr() tcBorders = OxmlElement("w:tcBorders") for side, (sz, color) in kwargs.items(): border = OxmlElement(f"w:{side}") border.set(qn("w:val"), "single") border.set(qn("w:sz"), str(sz * 8)) border.set(qn("w:color"), color) border.set(qn("w:space"), "0") tcBorders.append(border) tcPr.append(tcBorders) # ── Utility: add a horizontal rule ─────────────────────────────────────────── def add_hr(doc, color="0D47A1"): p = doc.add_paragraph() pPr = p._p.get_or_add_pPr() pBdr = OxmlElement("w:pBdr") bot = OxmlElement("w:bottom") bot.set(qn("w:val"), "single") bot.set(qn("w:sz"), "6") bot.set(qn("w:space"), "1") bot.set(qn("w:color"), color) pBdr.append(bot) pPr.append(pBdr) p.paragraph_format.space_before = Pt(2) p.paragraph_format.space_after = Pt(2) return p # ── Utility: styled heading ─────────────────────────────────────────────────── def add_h1(doc, text): p = doc.add_heading(text, level=1) p.clear() run = p.add_run(text) run.font.name = "Calibri" run.font.size = Pt(18) run.font.bold = True run.font.color.rgb = WHITE pPr = p._p.get_or_add_pPr() shd = OxmlElement("w:shd") shd.set(qn("w:val"), "clear") shd.set(qn("w:color"), "auto") shd.set(qn("w:fill"), "0D47A1") pPr.append(shd) p.paragraph_format.space_before = Pt(14) p.paragraph_format.space_after = Pt(6) p.paragraph_format.left_indent = Inches(0.1) return p def add_h2(doc, text): p = doc.add_heading(text, level=2) p.clear() run = p.add_run(text) run.font.name = "Calibri" run.font.size = Pt(14) run.font.bold = True run.font.color.rgb = RGBColor(0x00, 0x69, 0x5C) p.paragraph_format.space_before = Pt(12) p.paragraph_format.space_after = Pt(3) add_hr(doc, color="00695C") return p def add_h3(doc, text): p = doc.add_heading(text, level=3) p.clear() run = p.add_run(text) run.font.name = "Calibri" run.font.size = Pt(12) run.font.bold = True run.font.color.rgb = NAVY p.paragraph_format.space_before = Pt(8) p.paragraph_format.space_after = Pt(2) return p def add_body(doc, text, bold_parts=None): p = doc.add_paragraph() p.paragraph_format.space_before = Pt(2) p.paragraph_format.space_after = Pt(4) run = p.add_run(text) run.font.name = "Calibri" run.font.size = Pt(11) run.font.color.rgb = DARK return p def add_bullet(doc, text, level=0): p = doc.add_paragraph(style="List Bullet") p.paragraph_format.left_indent = Inches(0.25 + level * 0.25) p.paragraph_format.space_before = Pt(1) p.paragraph_format.space_after = Pt(1) # Parse bold markers (**text**) import re parts = re.split(r'(\*\*[^*]+\*\*)', text) for part in parts: if part.startswith("**") and part.endswith("**"): run = p.add_run(part[2:-2]) run.bold = True else: run = p.add_run(part) run.font.name = "Calibri" run.font.size = Pt(11) run.font.color.rgb = DARK return p def add_table(doc, headers, rows, col_widths=None): n_cols = len(headers) table = doc.add_table(rows=1+len(rows), cols=n_cols) table.style = "Table Grid" # Header row hdr_cells = table.rows[0].cells for i, h in enumerate(headers): shade_cell(hdr_cells[i], "0D47A1") p = hdr_cells[i].paragraphs[0] p.clear() run = p.add_run(h) run.font.bold = True run.font.name = "Calibri" run.font.size = Pt(10.5) run.font.color.rgb = WHITE # Data rows for r_idx, row in enumerate(rows): cells = table.rows[r_idx+1].cells fill = "F5F5F5" if r_idx % 2 == 0 else "FFFFFF" for c_idx, val in enumerate(row): shade_cell(cells[c_idx], fill) p = cells[c_idx].paragraphs[0] p.clear() import re parts = re.split(r'(\*\*[^*]+\*\*)', val) for part in parts: if part.startswith("**") and part.endswith("**"): run = p.add_run(part[2:-2]) run.bold = True else: run = p.add_run(part) run.font.name = "Calibri" run.font.size = Pt(10) if col_widths: for r in table.rows: for i, w in enumerate(col_widths): r.cells[i].width = Inches(w) doc.add_paragraph() return table # ══════════════════════════════════════════════════════════════════════════════ # COVER PAGE # ══════════════════════════════════════════════════════════════════════════════ cover = doc.add_paragraph() cover.alignment = WD_ALIGN_PARAGRAPH.CENTER cover.paragraph_format.space_before = Pt(60) cover.paragraph_format.space_after = Pt(4) r = cover.add_run("PAIN & PALLIATIVE MEDICINE") r.font.name = "Calibri" r.font.size = Pt(26) r.font.bold = True r.font.color.rgb = NAVY sub = doc.add_paragraph() sub.alignment = WD_ALIGN_PARAGRAPH.CENTER sub.paragraph_format.space_after = Pt(4) r2 = sub.add_run("STUDY GUIDE") r2.font.name = "Calibri" r2.font.size = Pt(20) r2.font.bold = True r2.font.color.rgb = RGBColor(0x00, 0x69, 0x5C) sec_title = doc.add_paragraph() sec_title.alignment = WD_ALIGN_PARAGRAPH.CENTER sec_title.paragraph_format.space_after = Pt(6) r3 = sec_title.add_run("Section 1.4: Palliative Surgery") r3.font.name = "Calibri" r3.font.size = Pt(15) r3.font.bold = False r3.font.color.rgb = DARK add_hr(doc, "0D47A1") desc = doc.add_paragraph() desc.alignment = WD_ALIGN_PARAGRAPH.CENTER desc.paragraph_format.space_before = Pt(8) r4 = desc.add_run( "Compiled from Standard Textbooks (Bailey & Love, Schwartz's, Cummings, " "Sabiston, Current Surgical Therapy, Campbell-Walsh-Wein) and PubMed Evidence (2022–2026)" ) r4.font.name = "Calibri" r4.font.size = Pt(10) r4.font.italic = True r4.font.color.rgb = RGBColor(0x60, 0x60, 0x60) date_p = doc.add_paragraph() date_p.alignment = WD_ALIGN_PARAGRAPH.CENTER date_p.paragraph_format.space_before = Pt(6) r5 = date_p.add_run("July 2026") r5.font.name = "Calibri" r5.font.size = Pt(10) r5.font.color.rgb = RGBColor(0x80, 0x80, 0x80) doc.add_page_break() # ══════════════════════════════════════════════════════════════════════════════ # SECTION 1: PRINCIPLES OF PALLIATIVE SURGERY # ══════════════════════════════════════════════════════════════════════════════ add_h1(doc, "1. Principles of Palliative Surgery in the Oncology Setting") add_h2(doc, "Definition") add_body(doc, "Palliative surgery is defined as surgical intervention targeted to alleviate a " "patient's symptoms, thus improving quality of life (QoL) despite minimal impact on survival. " "It is fundamentally distinct from curative or cytoreductive surgery." ) add_body(doc, "A 2025 systematic review (Wong et al., J Surg Oncol) of 92 studies identified four recurring " "themes in how palliative surgery is defined across the literature:" ) items_def = [ "Incurable cancer prognosis", "Intent to relieve symptoms or improve quality of life", "Specific operative interventions (procedure-defined)", "Persistence of disease after surgery (incomplete cytoreduction)" ] for it in items_def: add_bullet(doc, it) add_body(doc, "Critically: if an intervention is not directly relieving a symptom, it is not palliative " "therapy. Treatment of incurable cancer aimed at maximizing life length (e.g., systemic " "chemotherapy) is often loosely - and inappropriately - labeled 'palliative.'" ) add_h2(doc, "Guiding Principles") principles = [ ("**Symptom-first intent**", "All interventions must target a specific, burdensome symptom (pain, obstruction, bleeding, dysphagia)."), ("**Least invasive approach**", "Use the minimal intervention that achieves adequate symptom relief."), ("**Balance benefit vs. burden**","New symptoms from the intervention must not outweigh benefits gained."), ("**Realistic goal-setting**", "Patients must receive accurate information about expected post-operative outcomes and survival."), ("**Multidisciplinary team**", "Surgery, medical oncology, radiation oncology, and palliative medicine decide together."), ("**Performance status**", "Adequate ECOG/KPS is needed to safely undergo and benefit from surgery."), ("**Time horizon**", "Anticipated survival must justify the recovery time and hospitalization burden."), ] add_table(doc, ["Principle", "Description"], principles, col_widths=[2.0, 4.5]) add_h2(doc, "Core Competencies for Surgical Palliative Care") competencies = [ "Communication of prognosis and realistic outcomes", "Symptom assessment and relief", "Shared decision-making aligned with patient's goals and values", "Knowledge of when to avoid surgery (surgical futility)", "Coordination with specialist palliative medicine teams", "Awareness of hospice criteria and transition planning", ] for c in competencies: add_bullet(doc, c) add_h2(doc, "Key Evidence") add_body(doc, "Wong et al. (2025, J Surg Oncol, PMID 39610018): In 92 studies of palliative thoraco-abdominal " "surgery, survival (90%) and perioperative morbidity (72%) were the most commonly reported outcomes, " "yet symptom relief, quality of life, and sustainability of success were infrequently measured - " "revealing a critical mismatch between the intent of palliative surgery and what is actually evaluated." ) add_body(doc, "Schwartz's (quoting meta-analysis): In malignant bowel obstruction from peritoneal carcinomatosis, " "although palliative surgery can benefit some patients, many experience serious complications, " "incomplete symptom resolution, and substantial hospitalization relative to remaining survival time." ) doc.add_page_break() # ══════════════════════════════════════════════════════════════════════════════ # SECTION 2: INDICATIONS & MORBIDITIES # ══════════════════════════════════════════════════════════════════════════════ add_h1(doc, "2. Indications and Morbidities of Palliative Surgery in Individual Cancers") add_h2(doc, "Indications by Symptom") ind_rows = [ ("**Bowel obstruction**", "Resection, stoma creation, bypass, stenting"), ("**GI bleeding**", "Resection or embolization of bleeding tumor"), ("**Biliary obstruction / jaundice**", "ERCP stenting, PTBD, surgical bypass"), ("**Gastric outlet obstruction**","Gastrojejunostomy, duodenal stenting"), ("**Airway obstruction**", "Tracheostomy, debulking, bronchial stenting"), ("**Urinary obstruction**", "Urinary diversion, ureteric stenting, nephrostomy"), ("**Pain from tumor / nerve invasion**","Debulking, cordotomy, neurolysis, nerve blocks"), ("**Pathological / impending fracture**","Intramedullary nailing, endoprosthesis"), ("**Spinal cord compression**", "Decompressive laminectomy, vertebroplasty, SBRT"), ("**Dysphagia**", "PEG tube placement, esophageal stenting"), ("**Fistula**", "Diversion stoma, reconstructive closure"), ("**Fungating wound**", "Debulking, flap coverage, wound care"), ] add_table(doc, ["Symptom", "Palliative Surgical Option"], ind_rows, col_widths=[2.5, 4.0]) add_h2(doc, "Indications by Cancer Type") cancer_data = [ ("Gastric Cancer", ["Palliative gastrectomy for bleeding or obstruction", "Roux-en-Y gastrojejunostomy for gastric outlet obstruction", "Intraluminal stenting for cardia / oesophago-gastric junction tumors", "Source: Bailey & Love's Surgery 28th ed., p. 1197"]), ("Colorectal Cancer", ["Diverting colostomy or ileostomy for obstructing left-sided tumors", "Hartmann's procedure (resection + end colostomy) for complicated disease", "Endoscopic stenting as bridge to surgery or definitive palliation", "Defunctioning loop stoma for recto-vaginal or recto-vesical fistulae"]), ("Pancreatic / Periampullary Cancer", ["ERCP stenting or biliary bypass (hepaticojejunostomy) for obstructive jaundice", "Gastrojejunostomy or duodenal stenting for gastric outlet obstruction", "Celiac plexus neurolysis for refractory abdominal / back pain", "Requires MDT 'home team' to coordinate biliary decompression, nutrition, performance status", "Source: Current Surgical Therapy 14e"]), ("Head & Neck Cancer", ["Tracheostomy for airway compromise", "PEG tube for dysphagia / nutrition", "Tumor debulking for compressive symptoms", "Vocal cord medialization (injection laryngoplasty) for voice restoration and aspiration prevention", "Vascular stenting or embolization for tumor erosion into major vessels (carotid blowout)", "Source: Cummings Otolaryngology, p. 1436"]), ("Gynecological / Pelvic Cancers", ["Urinary diversion for malignant ureteric obstruction", "Diverting colostomy for recto-vaginal fistula", "Pelvic exenteration in selected recurrent disease with pelvic pain / fistulae / bleeding"]), ("Breast Cancer (Stage IV)", ["Surgery for palliation in widespread metastatic disease with poor systemic response", "Managed via MDT (surgery + medical + radiation oncology)", "Source: Current Surgical Therapy 14e"]), ("Lung Cancer", ["Tracheobronchial stenting for central airway obstruction", "Pleurodesis for malignant pleural effusion", "VATS procedures for pleural / pericardial disease"]), ("Renal Cell Carcinoma (RCC)", ["Cytoreductive nephrectomy in selected metastatic patients", "Embolization for hemorrhage from primary or metastatic sites", "Source: Campbell-Walsh-Wein Urology"]), ] for cancer, points in cancer_data: add_h3(doc, cancer) for pt in points: add_bullet(doc, pt) add_h2(doc, "Morbidities of Palliative Surgery") add_body(doc, "Morbidity after palliative surgery is significant and must be carefully weighed against expected benefit:" ) morbidity_rows = [ ("Perioperative mortality", "~4% in palliative bowel resection series"), ("Perioperative complications", "~15% (anastomotic leak, wound infection, sepsis, DVT/PE)"), ("Symptom non-resolution", "A proportion of patients do not achieve adequate symptom relief"), ("Prolonged hospitalisation", "Patients may spend a disproportionate part of remaining life in hospital"), ("Nutritional depletion", "Advanced cancer increases surgical risk; malnutrition common"), ("Wound healing failure", "Prior radiotherapy, malnutrition, or steroid use impair healing"), ("Immunosuppression", "Advanced cancer reduces infection resistance and healing capacity"), ] add_table(doc, ["Morbidity", "Detail"], morbidity_rows, col_widths=[2.5, 4.0]) add_body(doc, "Li et al. (2025 meta-analysis, PMID 40251493) in advanced gastric cancer: palliative reduction " "surgery did not confer long-term survival benefit vs. non-surgical treatment; perioperative " "complication rate 15%, mortality 4% in the surgical group." ) add_body(doc, "Low et al. (2025, PMID 39667288): Economic evidence for palliative GI surgery in malignant bowel " "obstruction remains poor-quality and heterogeneous - further standardised research is needed." ) doc.add_page_break() # ══════════════════════════════════════════════════════════════════════════════ # SECTION 3: COMMON PROCEDURES # ══════════════════════════════════════════════════════════════════════════════ add_h1(doc, "3. Common Palliative Surgery Procedures") # 3A Colostomy / Ileostomy add_h2(doc, "A. Colostomy and Ileostomy") colo_points = [ "**Colostomy** (loop or end): diverts fecal flow proximal to obstructing / non-resectable rectal or left colonic tumors; also used for colovesical / rectovaginal fistulae.", "**Ileostomy**: used when colonic segment is compromised, patient is unstable/malnourished/immunosuppressed, or as proximal diversion when anastomosis is unsafe.", "**Hartmann's procedure**: resection of sigmoid / rectum + end colostomy without anastomosis - procedure of choice for perforated or acutely obstructing left-sided colorectal cancer in compromised patients.", "Both procedures are rapid, relatively low-risk, and highly effective for obstruction and fistula relief.", ] for pt in colo_points: add_bullet(doc, pt) # 3B Gastrostomy add_h2(doc, "B. Gastrostomy (PEG / Surgical)") gastro_points = [ "**Percutaneous Endoscopic Gastrostomy (PEG)**: preferred method for enteral feeding when oral intake is inadequate due to dysphagia (head and neck, esophageal cancer, neurological compromise).", "Performed under conscious sedation with minimal morbidity; avoids general anaesthesia.", "**Surgical gastrostomy** (open or laparoscopic): used when endoscopy is not feasible (obstructing pharyngeal / esophageal tumor).", "Also used for **gastric decompression** in patients with malignant bowel obstruction who are not surgical candidates for resection.", "Source: Cummings Otolaryngology, p. 1436", ] for pt in gastro_points: add_bullet(doc, pt) # 3C Urinary Diversion add_h2(doc, "C. Urinary Diversion Procedures") ud_rows = [ ("**Percutaneous nephrostomy**", "Most immediate; minimally invasive; image-guided; first-line in emergency"), ("**JJ (Double-J) ureteric stent**","Endoscopic; preferred if technically feasible; avoids external drainage bag"), ("**Ileal conduit (Bricker's)**", "For bilateral obstruction; adequate performance status required; permanent stoma"), ("**Cutaneous ureterostomy**", "Simpler; used in frail patients who cannot tolerate ileal conduit"), ] add_table(doc, ["Procedure", "Notes"], ud_rows, col_widths=[2.2, 4.3]) add_body(doc, "Goals: relieve obstructive uropathy, prevent renal failure, allow continuation of systemic " "anticancer therapy. Perri et al. (2022, PMID 31018967): palliative urinary diversion in " "gynaecological cancers improves renal function and allows further systemic treatment in " "selected patients." ) # 3D Tracheostomy add_h2(doc, "D. Tracheostomy") trach_points = [ "**Indications**: airway obstruction from laryngeal, hypopharyngeal, tracheal, or cervical esophageal tumors; bilateral vocal cord paralysis post-surgery or from tumor invasion.", "Can be **temporary** (during active treatment) or **permanent** (non-resectable, palliative).", "Provides immediate life-saving airway access; decannulation considered if tumor responds to treatment.", "Often co-exists with PEG tube in head and neck cancer (dual airway + nutrition management).", "Source: Cummings Otolaryngology; Schwartz's Principles of Surgery", ] for pt in trach_points: add_bullet(doc, pt) # 3E Stenting add_h2(doc, "E. Stenting (Luminal and Biliary)") stent_rows = [ ("**Esophageal SEMS**", "Malignant dysphagia from esophageal/cardia tumors; rapid relief; risks: migration, perforation, tumor ingrowth"), ("**Gastroduodenal stents**","Gastric outlet obstruction (pancreatic, gastric, duodenal cancers); endoscopically placed"), ("**Colonic stents**", "Malignant large bowel obstruction; bridge to surgery or definitive palliation in non-surgical candidates"), ("**Biliary SEMS**", "Malignant biliary obstruction; longer patency (~9-12 months) vs plastic stents (~3 months); via ERCP or EUS"), ("**Airway stents**", "Central airway obstruction from lung or tracheal tumors; rigid bronchoscopy required"), ] add_table(doc, ["Stent Type", "Details"], stent_rows, col_widths=[2.2, 4.3]) add_body(doc, "Source: Bailey and Love's Surgery 28th ed.") # 3F ERCP/PTBD add_h2(doc, "F. ERCP / PTBD") add_body(doc, "Indicated for malignant biliary obstruction (pancreatic head, cholangiocarcinoma, ampullary, gallbladder cancer, lymph node compression).") ercp_points = [ "**ERCP + SEMS**: first-line approach; SEMS preferred over plastic stents for longer patency in distal biliary obstruction.", "**PTBD (Percutaneous Transhepatic Biliary Drainage)**: used when ERCP fails, hilar tumors (Klatskin), or prior bilioenteric anastomosis prevents endoscopic access.", "**Surgical biliary bypass** (hepaticojejunostomy / choledochojejunostomy): reserved for patients with good performance status undergoing laparotomy, or when endoscopic approaches are not feasible.", "**Key principle** (Current Surgical Therapy 14e): in patients with operable disease being considered for neoadjuvant therapy, avoid high-risk endoscopic procedures that could compromise subsequent surgery - 'the interventional gastroenterologist should never come first.'", ] for pt in ercp_points: add_bullet(doc, pt) # 3G Other Interventional Procedures add_h2(doc, "G. Other Interventional Surgical / Radiological Procedures") other_rows = [ ("**Embolization (TAE/TACE)**", "Bleeding from HCC, RCC, or hypervascular metastases; TACE for HCC palliation"), ("**Celiac plexus neurolysis (CPN)**", "Chemical ablation via EUS or percutaneous approach; 60-80% response rate in pancreatic cancer pain"), ("**RFA / Microwave ablation (MWA)**", "Hepatic or lung metastases; bone pain from osteolytic lesions"), ("**Vertebroplasty / Kyphoplasty**", "Percutaneous cement injection into vertebral metastases; rapid pain relief and stability"), ("**Pleurodesis**", "Talc pleurodesis (chemical or via VATS) for recurrent malignant pleural effusion"), ("**Paracentesis / Peritoneal catheter**","Repeated paracentesis or tunneled peritoneal catheter (PleurX) for malignant ascites"), ("**Vascular embolization**", "Carotid artery blowout prophylaxis / management; renal artery embolization for hemorrhage"), ("**Pelvic exenteration**", "Anterior/posterior/total; recurrent pelvic malignancy; pelvic pain, bleeding, fistulae; high morbidity"), ] add_table(doc, ["Procedure", "Indication / Notes"], other_rows, col_widths=[2.5, 4.0]) doc.add_page_break() # ══════════════════════════════════════════════════════════════════════════════ # SECTION 4: ORTHOPEDIC SURGERY # ══════════════════════════════════════════════════════════════════════════════ add_h1(doc, "4. Orthopedic Surgeries in Palliative Care") add_h2(doc, "Background and Epidemiology") add_body(doc, "Bone metastases are present in 60-80% of patients with advanced breast, prostate, and lung cancer, " "and in 25-40% with thyroid and renal cell carcinoma. They cause pain, pathological fracture, " "hypercalcaemia, and spinal cord compression - significantly impairing quality of life." ) add_body(doc, "Orthopedic surgery in palliative care aims to: relieve pain, restore skeletal stability, and " "preserve or restore ambulation with minimal surgical invasiveness." ) add_body(doc, "Surgical principles (Hayashi & Tsuchiya, 2022, PMID 35226235): (1) maintain lasting bony " "stability, (2) use minimal surgical invasiveness, (3) anticipate post-operative hardware failure " "by using long-span implants and cement augmentation." ) add_h2(doc, "Pre-operative Assessment") assess_points = [ "**Mirels' Scoring System**: predicts fracture risk in long bone metastases; score >= 9 = prophylactic fixation recommended.", "**Tokuhashi / Tomita Score**: estimate survival in spinal metastases; guides extent of spinal surgery.", "**Estimated survival**: should be >= 6 weeks to justify surgery and recovery.", "**Multidisciplinary Bone Metastasis Cancer Board**: review improves patient selection and outcomes (Miyazaki et al., 2023, PMID 38138190).", "**Imaging**: CT/MRI to define lesion extent; bone scan / PET for polyostotic disease.", "**Haematological optimisation**: anaemia, coagulopathy, thrombocytopaenia common in advanced cancer.", ] for pt in assess_points: add_bullet(doc, pt) add_h2(doc, "Procedures by Anatomical Site") add_h3(doc, "Long Bones (Femur, Humerus, Tibia)") lb_rows = [ ("**Intramedullary nailing (IMN)**", "Preferred for impending/actual pathological fractures; load-sharing; long nails with cement augmentation reduce failure rate; allows rapid weight-bearing."), ("**Plate and screw fixation**", "For smaller lesions; higher failure rate than IMN; less preferred in bone with extensive metastatic disease."), ("**Endoprosthetic replacement**", "For periarticular lesions (femoral head/neck, proximal humerus, distal femur); immediate stability; durable long-term with long-type stems + cement."), ("**PMMA cement injection**", "Augments fixation; used with nails or plates in deficient cortical bone to prevent hardware failure."), ] add_table(doc, ["Procedure", "Notes"], lb_rows, col_widths=[2.2, 4.3]) add_h3(doc, "Spine (Most Common Site)") spine_rows = [ ("**Decompressive laminectomy + stabilisation**", "Spinal cord compression with pain/weakness/incontinence; ideally within 24h of onset; followed by radiotherapy."), ("**Total en bloc spondylectomy (TES)**", "Solitary metastases from RCC or thyroid cancer (radioresistant); good prognosis; high blood loss but durable."), ("**Separation surgery**", "Debulking of epidural tumor to create margin for SBRT; less invasive than TES; combined with SBRT for local control."), ("**Vertebroplasty / Kyphoplasty**", "Percutaneous cement for compression fracture pain without cord compression; minimally invasive; rapid pain relief."), ] add_table(doc, ["Procedure", "Notes"], spine_rows, col_widths=[2.5, 4.0]) add_body(doc, "SBRT/SABR: ASTRO 2024 Clinical Practice Guideline (PMID 38788923) supports external beam " "radiotherapy as first-line for painful bone metastases, with SBRT for oligometastatic or " "previously irradiated sites." ) add_h3(doc, "Pelvis and Acetabulum") pelvis_points = [ "Custom-made implants or recycled autologous bone grafting for acetabular metastases in patients with good prognosis.", "Hemipelvectomy or internal hemipelvectomy for isolated, resectable pelvic tumors with good performance status.", "Percutaneous bone cement injection into pelvis is effective and less invasive for pain from acetabular metastases.", ] for pt in pelvis_points: add_bullet(doc, pt) add_h2(doc, "Key Decision Points for Pathological Fractures") kd_points = [ "**Stabilise before irradiating**: radiotherapy weakens bone in the short term; surgical fixation first provides immediate structural support.", "**Cement augmentation** at time of fixation prevents hardware failure in demineralised bone.", "**Post-operative radiotherapy** reduces local recurrence and hardware loosening.", "**Prophylactic fixation** of impending fractures (Mirels >=9) prevents worse pain, blood loss, and morbidity of actual fracture surgery.", ] for pt in kd_points: add_bullet(doc, pt) add_h2(doc, "Morbidities of Orthopedic Palliative Procedures") orth_morb = [ ("Short-term", "Dislocation (endoprosthesis), DVT/PE, wound infection, blood loss, hardware failure"), ("Long-term", "Implant loosening, tumor re-growth, hardware failure (reduced by long IMN + cement)"), ("Benefit", "Clearly demonstrated in functional restoration (ambulation, pain) even with modest survival gains"), ] add_table(doc, ["Timeframe", "Morbidities / Outcomes"], orth_morb, col_widths=[1.5, 5.0]) doc.add_page_break() # ══════════════════════════════════════════════════════════════════════════════ # SUMMARY TABLE # ══════════════════════════════════════════════════════════════════════════════ add_h1(doc, "Quick Reference: Palliative Surgical Procedures at a Glance") summary_rows = [ ("Colostomy / Ileostomy", "Bowel obstruction, fistula", "Colorectal, pelvic cancers"), ("Gastrostomy (PEG/surgical)", "Dysphagia, nutritional support, gastric drainage", "Head/neck, esophageal, gastric"), ("Urinary diversion / JJ / nephrostomy","Malignant ureteric obstruction", "Cervical, bladder, colorectal, retroperitoneal"), ("Tracheostomy", "Airway obstruction, aspiration", "Head/neck, larynx, trachea, thyroid"), ("Luminal stenting", "Obstruction, dysphagia", "Esophageal, gastric, colorectal, pancreatic"), ("ERCP / PTBD / biliary bypass", "Malignant obstructive jaundice", "Pancreatic, cholangiocarcinoma, ampullary, gallbladder"), ("Celiac plexus neurolysis", "Refractory abdominal/back pain", "Pancreatic, upper GI cancers"), ("Vertebroplasty / Kyphoplasty", "Vertebral compression fracture pain", "Breast, prostate, myeloma, lung"), ("Intramedullary nail / Endoprosthesis","Pathological/impending long bone fracture","Breast, lung, prostate, RCC"), ("Decompressive laminectomy", "Spinal cord compression", "Any cancer with vertebral metastasis"), ("Pleurodesis", "Malignant pleural effusion", "Lung, breast, mesothelioma"), ("Pelvic exenteration", "Pelvic pain, fistula, bleeding", "Recurrent cervical / rectal cancer"), ("Embolization (TAE/TACE)", "Tumor bleeding, HCC palliation", "HCC, RCC, hypervascular metastases"), ("Paracentesis / Peritoneal catheter","Malignant ascites", "GI, ovarian, peritoneal carcinomatosis"), ] add_table(doc, ["Procedure", "Indication", "Cancer Types"], summary_rows, col_widths=[2.0, 2.2, 2.3] ) doc.add_page_break() # ══════════════════════════════════════════════════════════════════════════════ # REFERENCES # ══════════════════════════════════════════════════════════════════════════════ add_h1(doc, "References") refs = [ "1. Schwartz's Principles of Surgery, 11th Edition. McGraw-Hill.", "2. Bailey and Love's Short Practice of Surgery, 28th Edition. CRC Press/Taylor & Francis.", "3. Current Surgical Therapy, 14th Edition. Elsevier.", "4. Cummings Otolaryngology - Head and Neck Surgery, 7th Edition. Elsevier.", "5. Campbell-Walsh-Wein Urology, 12th Edition. Elsevier.", "6. Sabiston Textbook of Surgery, The Biological Basis of Modern Surgical Practice. Elsevier.", "7. Wong JSM et al. Definition of Palliative Surgery in Cancer Care: A Systematic Review. J Surg Oncol. 2025. PMID: 39610018.", "8. Low XC et al. Economic evaluation of palliative gastrointestinal surgery for advanced cancer patients with malignant bowel obstruction: A systematic review. Eur J Surg Oncol. 2025. PMID: 39667288.", "9. Li X et al. Meta-analysis of the efficacy of applying reduced surgery for the treatment of asymptomatic unresectable advanced gastric cancer. BMC Gastroenterol. 2025. PMID: 40251493.", "10. Hayashi K, Tsuchiya H. The role of surgery in the treatment of metastatic bone tumor. Int J Clin Oncol. 2022. PMID: 35226235.", "11. Miyazaki K et al. Effect of Bone Metastasis Cancer Board on Spinal Surgery Outcomes. Medicina. 2023. PMID: 38138190.", "12. Alcorn S et al. External Beam Radiation Therapy for Palliation of Symptomatic Bone Metastases: An ASTRO Clinical Practice Guideline. Pract Radiat Oncol. 2024. PMID: 38788923.", "13. Perri T et al. Palliative urinary diversion in patients with malignant ureteric obstruction due to gynaecological cancer. BMJ Support Palliat Care. 2022. PMID: 31018967.", ] for ref in refs: p = doc.add_paragraph() p.paragraph_format.space_before = Pt(2) p.paragraph_format.space_after = Pt(3) run = p.add_run(ref) run.font.name = "Calibri" run.font.size = Pt(10) run.font.color.rgb = DARK # ── Save ───────────────────────────────────────────────────────────────────── out_path = "/tmp/workspace/palliative-surgery/Palliative_Surgery_Study_Guide.docx" doc.save(out_path) print(f"Saved: {out_path}") PYEOF echo "Script written."

Running Command

python3 /tmp/workspace/palliative-surgery/create_doc.py

Running Command

python3 -c " from docx import Document doc = Document('/tmp/workspace/palliative-surgery/Palliative_Surgery_Study_Guide.docx') count = 0 for p in doc.paragraphs: if p.text.strip(): print(f'[{p.style.name}] {p.text[:80]}') count += 1 if count > 40: break print('---') print(f'Total paragraphs: {len(doc.paragraphs)}') print(f'Total tables: {len(doc.tables)}') "

The document generated successfully - 177 paragraphs and 10 tables across all sections. Here's your download link:

Palliative Surgery Study Guide

Word Document · DOCX


What's inside the document:
SectionContent
Cover PageTitle, subtitle, source attribution, date
Section 1Definition of palliative surgery, guiding principles table, core competencies, key PubMed evidence
Section 2Indications by symptom (table), indications by 8 cancer types (gastric, colorectal, pancreatic, H&N, gynae, breast, lung, RCC), morbidity table with % figures
Section 3All 7 common procedures: Colostomy/Ileostomy, Gastrostomy, Urinary Diversion, Tracheostomy, Stenting, ERCP/PTBD, Other interventional procedures - each with a formatted table
Section 4Orthopedic surgery: epidemiology, pre-op assessment (Mirels/Tokuhashi), procedures by site (long bones, spine, pelvis), key decision points, morbidity table
Quick ReferenceFull summary table of all 14 procedures, indications, and cancer types
References13 references: 6 standard textbooks + 7 PubMed citations (2022-2026)
Formatting: Navy blue H1 headers with white text, teal H2 headers with underlines, alternating row shading in tables, bold key terms throughout.
This is a shared conversation. Sign in to Orris to start your own chat.