Explain what they are saying simply and what will be the further management
TP53 splice variant endometrial cancer FIGO stage IB management 2025
https://pmc.ncbi.nlm.nih.gov/articles/PMC11968139/
TP53 mutant endometrial cancer adjuvant treatment outcome
endometrial carcinoma TP53 abnormal molecular classification treatment
p53 abnormal endometrial cancer stage IB FIGO grade 3 adjuvant treatment guidelines ESGO NCCN 2024 2025
https://pmc.ncbi.nlm.nih.gov/articles/PMC12867655/
| Gene | Result | Meaning |
|---|---|---|
| MLH1, MSH2, MSH6, PMS2 | Not Detected | No mismatch repair deficiency — cancer is MSS (microsatellite stable) |
| POLE | Not Detected | No POLE mutation (this would have been a good sign) |
| TP53 | Splice variant — POSITIVE | TP53 gene is mutated ← the key finding |
Her cancer is confined to the uterus but is high-grade, deeply invasive, and carries a TP53 mutation — placing her in the high-risk molecular group. Even though the stage is "early" (IB), this mutation significantly increases the risk of distant relapse.
Search for latest clinical trials for p53-abnormal endometrial cancer
p53 abnormal endometrial carcinoma clinical trial
clinical trials p53 abnormal endometrial cancer 2024 2025 2026 recruiting ClinicalTrials.gov
PMID: 40921169
PMID: 40858558
PMID: 39284383
RAINBO trial p53 abnormal endometrial cancer olaparib PARP inhibitor 2025 2026
PMID: 41449145
https://www.mskcc.org/clinical-updates/promising-activity-se…
Create a summary document comparing current trials and treatment options
ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace does not exist"
mkdir -p /home/daytona/workspace/p53-endometrial && ls /home/daytona/skills/docx/
~/p53-endometrial/create_doc.js
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType,
VerticalAlign, PageNumber, Header, Footer, TableOfContents
} = require('docx');
const fs = require('fs');
// ─── COLOUR PALETTE ───────────────────────────────────────────────
const DARK_BLUE = "1F3864";
const MID_BLUE = "2E74B5";
const LIGHT_BLUE = "D6E4F0";
const ORANGE = "C55A11";
const GREEN = "375623";
const LIGHT_GREEN = "E2EFDA";
const LIGHT_ORANGE= "FCE4D6";
const LIGHT_GREY = "F2F2F2";
const WHITE = "FFFFFF";
const RED_BG = "FFE0E0";
const DARK_RED = "9B1C1C";
// ─── HELPERS ──────────────────────────────────────────────────────
function heading1(text) {
return new Paragraph({
text, heading: HeadingLevel.HEADING_1,
spacing: { before: 400, after: 120 },
run: { color: DARK_BLUE, bold: true, size: 28 }
});
}
function heading2(text) {
return new Paragraph({
text, heading: HeadingLevel.HEADING_2,
spacing: { before: 300, after: 100 },
run: { color: MID_BLUE, bold: true, size: 24 }
});
}
function heading3(text) {
return new Paragraph({
text, heading: HeadingLevel.HEADING_3,
spacing: { before: 200, after: 80 },
});
}
function body(text, opts = {}) {
return new Paragraph({
spacing: { before: 60, after: 60 },
children: [new TextRun({ text, size: 22, color: "1A1A1A", ...opts })]
});
}
function bullet(text, opts = {}) {
return new Paragraph({
bullet: { level: 0 },
spacing: { before: 40, after: 40 },
children: [new TextRun({ text, size: 21, color: "1A1A1A", ...opts })]
});
}
function subbullet(text) {
return new Paragraph({
bullet: { level: 1 },
spacing: { before: 30, after: 30 },
children: [new TextRun({ text, size: 20, color: "3A3A3A" })]
});
}
function spacer() {
return new Paragraph({ text: "", spacing: { before: 80, after: 80 } });
}
function coloredPara(text, bgColor, textColor = "1A1A1A", bold = false) {
return new Paragraph({
spacing: { before: 80, after: 80 },
shading: { type: ShadingType.CLEAR, fill: bgColor },
children: [new TextRun({ text, size: 22, color: textColor, bold })]
});
}
// ─── TABLE HELPERS ────────────────────────────────────────────────
function headerCell(text, color = DARK_BLUE) {
return new TableCell({
shading: { type: ShadingType.CLEAR, fill: color },
verticalAlign: VerticalAlign.CENTER,
margins: { top: 80, bottom: 80, left: 120, right: 120 },
children: [new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({ text, bold: true, color: WHITE, size: 20 })]
})]
});
}
function cell(text, fill = WHITE, textColor = "1A1A1A", bold = false, center = false) {
return new TableCell({
shading: { type: ShadingType.CLEAR, fill },
verticalAlign: VerticalAlign.CENTER,
margins: { top: 60, bottom: 60, left: 120, right: 120 },
children: [new Paragraph({
alignment: center ? AlignmentType.CENTER : AlignmentType.LEFT,
children: [new TextRun({ text, size: 19, color: textColor, bold })]
})]
});
}
// ─── TITLE PAGE ───────────────────────────────────────────────────
const titlePage = [
spacer(), spacer(),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 600, after: 200 },
children: [new TextRun({ text: "p53-Abnormal Endometrial Cancer", bold: true, size: 52, color: DARK_BLUE })]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 100, after: 100 },
children: [new TextRun({ text: "Treatment Options & Clinical Trial Landscape", size: 36, color: MID_BLUE })]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 200, after: 600 },
children: [new TextRun({ text: "Prepared for: Dr. Vijayabhaskar | Meenakshi Mission Hospital & Research Centre, Madurai", size: 22, color: "555555", italics: true })]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({ text: "Date: May 20, 2026 | Patient Reference: Petchiammal R, 59F, Stage IB, FIGO Grade 3", size: 21, color: "666666" })]
}),
spacer(), spacer(),
new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({ text: "─────────────────────────────────────────────────", color: MID_BLUE })]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 120 },
children: [new TextRun({ text: "Sources: ESGO/ESTRO/ESP 2025 Guidelines | PORTEC-3 | PORTEC-4a | RAINBO | UTOLA | KEYNOTE-B21 | MSK Phase 2 Trial", size: 19, color: "888888", italics: true })]
}),
spacer(),
];
// ─── SECTION 1: PATIENT CONTEXT ──────────────────────────────────
const section1 = [
heading1("1. Patient Molecular Profile Summary"),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
rows: [
new TableRow({ children: [headerCell("Parameter", MID_BLUE), headerCell("Finding", MID_BLUE), headerCell("Clinical Significance", MID_BLUE)] }),
new TableRow({ children: [cell("Histology", LIGHT_GREY), cell("Endometrioid carcinoma"), cell("Most common EC type but high-grade variant carries poor prognosis")] }),
new TableRow({ children: [cell("FIGO Grade", LIGHT_GREY), cell("Grade 3", WHITE, true), cell("Poorly differentiated — aggressive behaviour")] }),
new TableRow({ children: [cell("FIGO Stage (2023)", LIGHT_GREY), cell("Stage IB", WHITE, true), cell("Myometrial invasion >50%; confined to uterus; no LN spread (pN0)")] }),
new TableRow({ children: [cell("Molecular Subtype", LIGHT_GREY), cell("p53-ABNORMAL ✦", RED_BG, DARK_RED, true), cell("HIGHEST-RISK molecular class; worst OS among all EC subtypes")] }),
new TableRow({ children: [cell("TP53 Variant", LIGHT_GREY), cell("c.376-2del (Splice site, Exon 4)", LIGHT_ORANGE), cell("Loss-of-function variant; disrupts normal p53 tumour-suppressor activity")] }),
new TableRow({ children: [cell("Variant Allele Frequency", LIGHT_GREY), cell("60.23%", LIGHT_ORANGE), cell("High clonal fraction — dominant driver mutation, not passenger")] }),
new TableRow({ children: [cell("Mismatch Repair (MMR)", LIGHT_GREY), cell("Proficient (pMMR/MSS)", LIGHT_BLUE), cell("MLH1, MSH2, MSH6, PMS2 all negative — NOT Lynch syndrome")] }),
new TableRow({ children: [cell("POLE", LIGHT_GREY), cell("Not mutated", LIGHT_GREEN), cell("Cannot benefit from POLE-associated favorable prognosis")] }),
new TableRow({ children: [cell("HER2 Status", LIGHT_GREY), cell("Not tested (report)", LIGHT_ORANGE), cell("~25% of p53abn ECs are HER2+; RECOMMEND testing")] }),
]
}),
spacer(),
coloredPara("⚠ Key Implication: This patient falls into the HIGH-RISK category (>25% systemic relapse risk) per ESGO 2025 guidelines. Standard adjuvant chemoradiation is mandatory. Enrolment in the RAINBO p53abn-RED trial (NCT05255653) should be discussed urgently.", LIGHT_ORANGE, "7B3F00"),
spacer(),
];
// ─── SECTION 2: CURRENT STANDARD OF CARE ─────────────────────────
const section2 = [
heading1("2. Current Standard-of-Care Treatment"),
heading2("2.1 Adjuvant Chemoradiotherapy (Standard for Stage I–III p53-Abnormal EC)"),
body("Based on PORTEC-3 (10-year data, Lancet Oncology 2025) and ESGO/ESTRO/ESP 2025 guidelines, the recommended treatment is:"),
spacer(),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
rows: [
new TableRow({ children: [headerCell("Component", MID_BLUE), headerCell("Regimen", MID_BLUE), headerCell("Evidence Basis", MID_BLUE)] }),
new TableRow({ children: [cell("Chemotherapy", LIGHT_GREY), cell("Carboplatin (AUC 5) + Paclitaxel (175 mg/m²) — 6 cycles every 3 weeks", WHITE, true), cell("PORTEC-3, GOG-0258")] }),
new TableRow({ children: [cell("Radiotherapy (EBRT)", LIGHT_GREY), cell("Pelvic EBRT 45–48.6 Gy in 1.8–2.0 Gy fractions + 2 cycles concurrent Cisplatin 50 mg/m²", WHITE, true), cell("PORTEC-3")] }),
new TableRow({ children: [cell("Brachytherapy", LIGHT_GREY), cell("Vaginal vault brachytherapy — optional add-on to reduce local recurrence", WHITE, false), cell("PORTEC-3, ESGO 2025")] }),
new TableRow({ children: [cell("Sequencing", LIGHT_GREY), cell("Chemotherapy concurrently with EBRT (sandwich or concurrent approach)", WHITE, false), cell("PORTEC-3")] }),
]
}),
spacer(),
heading2("2.2 PORTEC-3 — 10-Year Survival Data (October 2025)"),
body("The definitive trial for this patient's situation (PMID: 40921169):"),
bullet("p53-abnormal overall survival at 10 years: 52.7% (chemoRT) vs. 36.6% (RT alone) — HR 0.52, p=0.009"),
bullet("Chemoradiation provides a 16% absolute OS benefit specifically in p53-abnormal tumours"),
bullet("Largest benefit in high-risk molecular subtypes (p53abn, serous) compared to POLE/MMRd/NSMP"),
bullet("Conclusion: Chemoradiation is the standard of care for p53-abnormal EC at all stages I–III"),
spacer(),
heading2("2.3 Additional Biomarker Testing Recommended"),
bullet("HER2 IHC/FISH: ~25% of p53-abnormal ECs overexpress HER2; trastuzumab + carboplatin/paclitaxel approved for HER2+ advanced EC (DESTINY-PanTumor, ToGA)"),
bullet("Germline TP53 testing: TP53 germline mutations cause Li-Fraumeni syndrome — this patient's family may be at risk. Genetic counselling referral advised"),
bullet("HRD (Homologous Recombination Deficiency) testing: ~50% of p53-abnormal ECs are HRD+ — predicts PARP inhibitor response; important for trial eligibility"),
spacer(),
];
// ─── SECTION 3: CLINICAL TRIALS ─────────────────────────────────
const section3 = [
heading1("3. Clinical Trials — Comparative Overview"),
body("The following table compares all major active and recently reported trials for p53-abnormal endometrial cancer (2024–2026):"),
spacer(),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
columnWidths: [1800, 1400, 1200, 1400, 1200, 1200, 1200],
rows: [
new TableRow({
tableHeader: true,
children: [
headerCell("Trial Name"),
headerCell("Drug/Approach"),
headerCell("Phase"),
headerCell("Population"),
headerCell("Status"),
headerCell("Primary Result"),
headerCell("p53abn Relevance"),
]
}),
new TableRow({
children: [
cell("PORTEC-3\n(NCT00411138)", LIGHT_BLUE, "1A1A1A", true),
cell("Carboplatin + Paclitaxel + EBRT vs. EBRT alone"),
cell("Phase III", WHITE, MID_BLUE, false, true),
cell("High-risk Stage I–III EC"),
cell("✅ Complete", LIGHT_GREEN, "375623", true, true),
cell("OS 74.4% vs 67.3% (10yr); p53abn HR 0.52 (p=0.009)"),
cell("★★★ Defines current standard", LIGHT_BLUE, DARK_BLUE, true),
]
}),
new TableRow({
children: [
cell("PORTEC-4a\n(NCT03469674)", LIGHT_GREY),
cell("Molecular profile–guided treatment vs. standard brachytherapy"),
cell("Phase III", WHITE, MID_BLUE, false, true),
cell("High-intermediate risk Stage I–II EC"),
cell("✅ Complete", LIGHT_GREEN, "375623", true, true),
cell("Non-inferior; p53abn → pelvic EBRT (validated molecular escalation)"),
cell("★★★ Validates molecular-guided approach", LIGHT_BLUE, DARK_BLUE, true),
]
}),
new TableRow({
children: [
cell("RAINBO p53abn-RED\n(NCT05255653)", LIGHT_ORANGE, "1A1A1A", true),
cell("Chemoradiation + Olaparib (2 yrs maintenance) vs. chemoradiation alone"),
cell("Phase III", WHITE, ORANGE, false, true),
cell("Stage I–III p53-abnormal EC ONLY"),
cell("🟢 RECRUITING", LIGHT_ORANGE, ORANGE, true, true),
cell("Primary: Relapse-free survival (results pending)"),
cell("★★★ DIRECTLY ELIGIBLE — MOST RELEVANT OPEN TRIAL", RED_BG, DARK_RED, true),
]
}),
new TableRow({
children: [
cell("CAN-STAMP\n(NCT04159155)", LIGHT_GREY),
cell("Various combination strategies in serous/p53-mutant EC"),
cell("Phase II/III", WHITE, MID_BLUE, false, true),
cell("Serous & p53-abnormal (endometrioid + clear cell)"),
cell("🟢 Ongoing", LIGHT_GREEN, "375623", true, true),
cell("Results pending"),
cell("★★ Includes p53-abnormal histotypes", LIGHT_BLUE, DARK_BLUE, true),
]
}),
new TableRow({
children: [
cell("UTOLA\n(NCT03745950)", LIGHT_GREY),
cell("Maintenance Olaparib (PARP inhibitor) vs. placebo"),
cell("Phase IIb", WHITE, MID_BLUE, false, true),
cell("Advanced/metastatic EC post-platinum chemo"),
cell("✅ Complete", LIGHT_GREEN, "375623", true, true),
cell("No overall PFS benefit (HR 0.94); p53abn subgroup showed numerical signal in HRD tumors"),
cell("★★ Informs RAINBO rationale; olaparib alone insufficient", LIGHT_BLUE, DARK_BLUE, true),
]
}),
new TableRow({
children: [
cell("MSK Phase 2\nOlaparib + Pembrolizumab\n(PMID: 41880595)", LIGHT_GREY),
cell("Olaparib 300mg BD + Pembrolizumab 200mg Q3W"),
cell("Phase II", WHITE, MID_BLUE, false, true),
cell("Recurrent/persistent CN-H/p53-abnormal EC (1–3 prior lines)"),
cell("✅ Complete", LIGHT_GREEN, "375623", true, true),
cell("ORR 32%; median DOR 11.2 months; OS 16.5 months; HRD+ had higher response rate"),
cell("★★★ Promising for recurrent disease", LIGHT_BLUE, DARK_BLUE, true),
]
}),
new TableRow({
children: [
cell("KEYNOTE-B21 / ENGOT-en11\n(NCT04634877)", LIGHT_GREY),
cell("Pembrolizumab + chemo ± RT vs. chemo ± RT alone"),
cell("Phase III", WHITE, MID_BLUE, false, true),
cell("High-risk EC (includes p53abn Stage I/II)"),
cell("✅ Complete", LIGHT_GREEN, "375623", true, true),
cell("No DFS benefit in pMMR population (HR 1.20). Benefit only in dMMR subgroup (HR 0.31)"),
cell("★ Pembrolizumab alone NOT beneficial in p53abn/pMMR", RED_BG, DARK_RED, true),
]
}),
new TableRow({
children: [
cell("PYNNACLE\n(NCT04585750)", LIGHT_GREY),
cell("Rezatapopt (PC14586) — first-in-class TP53 Y220C reactivator"),
cell("Phase I/II", WHITE, MID_BLUE, false, true),
cell("Advanced solid tumors with TP53 Y220C mutation (incl. EC cohort)"),
cell("⚠ Status unknown / closed", LIGHT_ORANGE, ORANGE, true, true),
cell("Specific to Y220C mutation only (not this patient's splice variant)"),
cell("★ Not applicable to this patient's TP53 variant", LIGHT_GREY, "666666", false),
]
}),
]
}),
spacer(),
];
// ─── SECTION 4: DRUG MECHANISMS ──────────────────────────────────
const section4 = [
heading1("4. Treatment Agents — Mechanism & Role in p53-Abnormal EC"),
spacer(),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
rows: [
new TableRow({ children: [headerCell("Agent"), headerCell("Class"), headerCell("Mechanism"), headerCell("Role in p53abn EC"), headerCell("Evidence Level")] }),
new TableRow({ children: [cell("Carboplatin", LIGHT_GREY, "1A1A1A", true), cell("Platinum"), cell("DNA crosslinks → strand breaks → apoptosis"), cell("Backbone of adjuvant chemo; first-line standard"), cell("Level I — RCT")] }),
new TableRow({ children: [cell("Paclitaxel", LIGHT_GREY, "1A1A1A", true), cell("Taxane"), cell("Microtubule stabilisation → mitotic arrest"), cell("Combined with carboplatin; 6-cycle standard"), cell("Level I — RCT")] }),
new TableRow({ children: [cell("Olaparib", LIGHT_GREY, "1A1A1A", true), cell("PARP Inhibitor"), cell("Traps PARP on DNA → DSBs → synthetic lethality in HRD cells"), cell("Investigational maintenance (RAINBO trial); ~50% p53abn ECs are HRD+"), cell("Level II — Phase IIb RCT; Phase III ongoing")] }),
new TableRow({ children: [cell("Pembrolizumab", LIGHT_GREY, "1A1A1A", true), cell("Anti-PD-1 Immunotherapy"), cell("Blocks PD-1/PD-L1 checkpoint → restores T-cell anti-tumour activity"), cell("NOT effective alone in pMMR/p53abn; promising with olaparib in recurrent disease (ORR 32%)"), cell("Level II — Phase II; negative Phase III in pMMR")] }),
new TableRow({ children: [cell("Trastuzumab", LIGHT_GREY, "1A1A1A", true), cell("Anti-HER2 mAb"), cell("Binds HER2 → inhibits signalling + ADCC"), cell("For HER2 3+ p53-abnormal EC (test required); added to carbo-taxol"), cell("Level II — Phase II")] }),
new TableRow({ children: [cell("Cisplatin", LIGHT_GREY, "1A1A1A", true), cell("Platinum"), cell("DNA crosslinks → apoptosis"), cell("Concurrent with EBRT in PORTEC-3 chemoRT regimen (2 cycles)"), cell("Level I — RCT")] }),
new TableRow({ children: [cell("EBRT (Pelvic RT)", LIGHT_GREY, "1A1A1A", true), cell("Radiotherapy"), cell("DNA double-strand breaks in local tumour tissue"), cell("Essential component for locoregional control in Stage I–III p53abn"), cell("Level I — RCT")] }),
]
}),
spacer(),
];
// ─── SECTION 5: DECISION ALGORITHM ──────────────────────────────
const section5 = [
heading1("5. Evidence-Based Treatment Decision Algorithm"),
body("Based on ESGO/ESTRO/ESP 2025 Guidelines and PORTEC-3 10-year data:"),
spacer(),
coloredPara("STEP 1 — Confirm Surgical Staging is Complete", DARK_BLUE, WHITE, true),
bullet("Verify: Total hysterectomy + bilateral salpingo-oophorectomy + sentinel lymph node biopsy/lymphadenectomy done"),
bullet("If pN0 confirmed: proceed to adjuvant treatment planning"),
bullet("If lymph node status unknown: consider staging completion"),
spacer(),
coloredPara("STEP 2 — Complete Biomarker Workup (if not done)", MID_BLUE, WHITE, true),
bullet("HER2 IHC/FISH: critical — trastuzumab can be added if HER2 3+"),
bullet("HRD testing: determines PARP inhibitor candidacy for RAINBO trial eligibility"),
bullet("Germline TP53 sequencing: rule out Li-Fraumeni syndrome"),
spacer(),
coloredPara("STEP 3 — Initiate Adjuvant Chemoradiotherapy (PORTEC-3 regimen)", ORANGE, WHITE, true),
subbullet("Carboplatin AUC 5 + Paclitaxel 175 mg/m² IV — 6 cycles Q3W"),
subbullet("Concurrent: Cisplatin 50 mg/m² in weeks 1 and 4 of EBRT"),
subbullet("Pelvic EBRT: 45–48.6 Gy in 1.8–2.0 Gy daily fractions"),
subbullet("Optional: vaginal brachytherapy boost after EBRT"),
spacer(),
coloredPara("STEP 4 — Discuss Trial Enrolment: RAINBO p53abn-RED (NCT05255653)", "C00000", WHITE, true),
bullet("If eligible: olaparib 300 mg BD orally for 2 years as maintenance after chemoRT"),
bullet("Requires: Stage I–III, p53-abnormal confirmed by NGS/IHC, no prior PARP inhibitor"),
bullet("Contact: International participating centres in France and globally"),
spacer(),
coloredPara("STEP 5 — Surveillance After Treatment", DARK_BLUE, WHITE, true),
bullet("Clinical review every 3–4 months for years 1–3, then every 6 months to year 5"),
bullet("CT chest/abdomen/pelvis — annually or if symptomatic"),
bullet("Watch pattern: systemic metastases (lungs, liver, peritoneum) dominate over local recurrence in p53abn"),
spacer(),
coloredPara("STEP 6 — Recurrent Disease Options", "7B3F00", WHITE, true),
bullet("First recurrence: Carboplatin + Paclitaxel ± immunotherapy reassessment"),
bullet("If HER2 3+: Trastuzumab + carboplatin/paclitaxel"),
bullet("Molecularly selected: Olaparib + Pembrolizumab combination (ORR 32% per MSK Phase 2, 2026)"),
bullet("Consider pembrolizumab + lenvatinib for post-chemo recurrence (KEYNOTE-775 data)"),
spacer(),
];
// ─── SECTION 6: PROGNOSIS ─────────────────────────────────────────
const section6 = [
heading1("6. Prognostic Data — p53-Abnormal EC"),
spacer(),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
rows: [
new TableRow({ children: [headerCell("Endpoint"), headerCell("With Chemoradiotherapy"), headerCell("With RT Alone"), headerCell("Absolute Benefit"), headerCell("Source")] }),
new TableRow({ children: [cell("10-Year Overall Survival"), cell("52.7%", LIGHT_GREEN, "375623", true, true), cell("36.6%", RED_BG, DARK_RED, true, true), cell("+16.1%", LIGHT_ORANGE, ORANGE, true, true), cell("PORTEC-3 2025")] }),
new TableRow({ children: [cell("10-Year Recurrence-Free Survival"), cell("~48%", LIGHT_GREEN, "375623", true, true), cell("~32%", RED_BG, DARK_RED, true, true), cell("+16%", LIGHT_ORANGE, ORANGE, true, true), cell("PORTEC-3 2025")] }),
new TableRow({ children: [cell("Hazard Ratio (OS)"), cell("HR 0.52", LIGHT_BLUE, DARK_BLUE, true, true), cell("Reference", LIGHT_GREY, "666666", false, true), cell("p = 0.009", LIGHT_BLUE, DARK_BLUE, true, true), cell("PORTEC-3 2025")] }),
new TableRow({ children: [cell("Recurrence Pattern"), cell("Systemic > locoregional", LIGHT_ORANGE), cell("", WHITE), cell("", WHITE), cell("TransPORTEC analysis")] }),
new TableRow({ children: [cell("HER2+ frequency"), cell("~25% of p53abn EC", LIGHT_ORANGE), cell("", WHITE), cell("", WHITE), cell("Multiple studies")] }),
new TableRow({ children: [cell("HRD+ frequency"), cell("~50% of p53abn EC", LIGHT_ORANGE), cell("", WHITE), cell("", WHITE), cell("UTOLA/RAINBO rationale")] }),
]
}),
spacer(),
coloredPara("Note: Stage IB (this patient) carries better prognosis than Stage III within the p53-abnormal group. However, even Stage I p53-abnormal EC is classified HIGH RISK. The PORTEC-3 benefit is consistent across Stage I–III p53-abnormal tumours.", LIGHT_BLUE, "1A3A5A"),
spacer(),
];
// ─── SECTION 7: REFERENCES ────────────────────────────────────────
const section7 = [
heading1("7. Key References"),
spacer(),
bullet("Post CCB et al. PORTEC-3: 10-year outcomes by molecular classification. Lancet Oncol. 2025. PMID: 40921169"),
bullet("van den Heerik ASVM et al. PORTEC-4a: molecular profile-based adjuvant treatment. Lancet Oncol. 2026. PMID: 41449145"),
bullet("Van Gorp T et al. KEYNOTE-B21/ENGOT-en11: pembrolizumab adjuvant. Ann Oncol. 2024. PMID: 39284383"),
bullet("Joly F et al. UTOLA trial: maintenance olaparib in advanced EC. Nat Commun. 2025. PMID: 40858558"),
bullet("Rubinstein MM et al. Olaparib + pembrolizumab in recurrent p53-abnormal EC. PMID: 41880595"),
bullet("RAINBO p53abn-RED trial: NCT05255653 (ClinicalTrials.gov) — actively recruiting"),
bullet("CAN-STAMP trial: NCT04159155 (ClinicalTrials.gov) — ongoing"),
bullet("ESGO/ESTRO/ESP Guidelines for Endometrial Carcinoma 2025 (July update)"),
bullet("Baurain JF et al. Adjuvant treatment algorithm based on ESGO/ESTRO/ESP guidelines. PMC12867655. 2025"),
spacer(),
coloredPara("Disclaimer: This document is prepared for educational and clinical decision support purposes. Treatment decisions should always be individualised and based on multidisciplinary team consensus, local resources, and the patient's clinical status and preferences.", LIGHT_GREY, "555555"),
];
// ─── ASSEMBLE DOCUMENT ────────────────────────────────────────────
const doc = new Document({
creator: "Orris Medical AI",
title: "p53-Abnormal Endometrial Cancer — Treatment & Trial Summary",
description: "Clinical summary for Petchiammal R — p53-abnormal endometrial carcinoma Stage IB",
styles: {
paragraphStyles: [
{
id: "Heading1",
name: "Heading 1",
run: { size: 28, bold: true, color: DARK_BLUE },
paragraph: { spacing: { before: 400, after: 120 } }
},
{
id: "Heading2",
name: "Heading 2",
run: { size: 24, bold: true, color: MID_BLUE },
paragraph: { spacing: { before: 280, after: 100 } }
},
]
},
sections: [
{
properties: {
page: {
margin: { top: 900, bottom: 900, left: 1000, right: 1000 }
}
},
headers: {
default: new Header({
children: [
new Paragraph({
alignment: AlignmentType.RIGHT,
children: [
new TextRun({ text: "p53-Abnormal Endometrial Cancer — Treatment & Trial Comparison | ", size: 18, color: "888888" }),
new TextRun({ text: "CONFIDENTIAL", size: 18, color: "C00000", bold: true })
],
border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: MID_BLUE } }
})
]
})
},
footers: {
default: new Footer({
children: [
new Paragraph({
alignment: AlignmentType.CENTER,
border: { top: { style: BorderStyle.SINGLE, size: 4, color: MID_BLUE } },
children: [
new TextRun({ text: "Meenakshi Mission Hospital & Research Centre, Madurai | Dr. Vijayabhaskar | Page ", size: 18, color: "888888" }),
new TextRun({ children: [new PageNumber()], size: 18, color: "888888" })
]
})
]
})
},
children: [
...titlePage,
...section1,
...section2,
...section3,
...section4,
...section5,
...section6,
...section7,
]
}
]
});
Packer.toBuffer(doc).then(buf => {
fs.writeFileSync("/home/daytona/workspace/p53-endometrial/P53_Endometrial_Cancer_Summary.docx", buf);
console.log("Document written successfully.");
}).catch(err => {
console.error("Error:", err);
process.exit(1);
});
cd /home/daytona/workspace/p53-endometrial && node create_doc.js 2>&1
~/p53-endometrial/create_doc.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/p53-endometrial/create_doc.js'
cd /home/daytona/workspace/p53-endometrial && node -e "const {PageNumber} = require('docx'); console.log(typeof PageNumber, Object.keys(PageNumber).slice(0,5));"
cd /home/daytona/workspace/p53-endometrial && node create_doc.js 2>&1
~/p53-endometrial/create_doc.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/p53-endometrial/create_doc.js'
cd /home/daytona/workspace/p53-endometrial && node -e " const fs = require('fs'); const src = fs.readFileSync('create_doc.js', 'utf8'); // Find all cell(..., WHITE, true) or cell(..., LIGHT_GREY, true) etc. patterns const matches = src.match(/cell\([^)]+, true\)/g); console.log('Problematic calls:', JSON.stringify(matches, null, 2)); " 2>&1
~/p53-endometrial/create_doc.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/p53-endometrial/create_doc.js'
cd /home/daytona/workspace/p53-endometrial && node create_doc.js 2>&1
cd /home/daytona/workspace/p53-endometrial && node -e " const fs = require('fs'); let src = fs.readFileSync('create_doc.js', 'utf8'); // Fix pattern: cell(text, COLOR, true) → cell(text, COLOR, '1A1A1A', true) // Only where 3rd arg is boolean (true/false) not a string src = src.replace(/cell\(([^,]+),\s*([\w_]+),\s*(true|false)\)/g, (m, t, c, b) => { return \`cell(\${t}, \${c}, '1A1A1A', \${b})\`; }); fs.writeFileSync('create_doc.js', src); console.log('Fixed'); " 2>&1
cd /home/daytona/workspace/p53-endometrial && node create_doc.js 2>&1
python3 /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/p53-endometrial/P53_Endometrial_Cancer_Summary.docx 2>&1
ls -lh /home/daytona/workspace/p53-endometrial/ && python3 -c "import zipfile; z=zipfile.ZipFile('/home/daytona/workspace/p53-endometrial/P53_Endometrial_Cancer_Summary.docx'); print('Valid ZIP, files:', z.namelist()[:5])" 2>&1
P53 Endometrial Cancer Summary
Word Document · DOCX
| Section | Contents |
|---|---|
| Title Page | Patient reference, clinician, date, sources |
| 1. Patient Molecular Profile | Colour-coded table — histology, grade, stage, TP53 variant, MMR, HER2 status |
| 2. Standard of Care | PORTEC-3 chemoRT regimen table, 10-year survival data, additional biomarker testing |
| 3. Clinical Trials Comparison | Full 8-trial comparative table (PORTEC-3, PORTEC-4a, RAINBO, CAN-STAMP, UTOLA, MSK Phase 2, KEYNOTE-B21, PYNNACLE) with colour-coded status and relevance ratings |
| 4. Drug Mechanisms | Agent-by-agent table — class, mechanism, role in p53-abnormal EC, evidence level |
| 5. Decision Algorithm | Step-by-step 6-step management pathway from surgical staging to recurrent disease |
| 6. Prognostic Data | OS/RFS comparison table with absolute benefit figures |
| 7. References | Numbered citations with PMIDs and trial registry numbers |