Ovarian tumurs

Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Finding Sources
Loading Image
Searching PubMed

ovarian cancer classification management

I now have thorough, multi-source content to compose a comprehensive answer on ovarian tumors. Here it is:

Ovarian Tumors

Overview and Classification

The ovary contains three fundamental cell populations - surface epithelium, stromal cells, and germ cells - each giving rise to distinct tumor types. Ovarian tumors can be benign, borderline (low malignant potential), or frankly malignant.
CategoryExamplesFrequency
EpithelialSerous, mucinous, endometrioid, clear cell~90% of ovarian malignancies
Germ CellDysgerminoma, teratoma, yolk sac tumor, choriocarcinoma~5% of malignancies
Sex Cord-StromalGranulosa cell tumor, Sertoli-Leydig cell tumor, fibroma~7% of neoplasms
MetastaticKrukenberg tumor (from gastric/GI primary)Secondary
  • Harrison's Principles of Internal Medicine 22E, p. 753
  • Schwartz's Principles of Surgery 11th Ed.

1. Epithelial Ovarian Tumors

These are by far the most common ovarian neoplasms. They may be benign (50%), malignant (33%), or borderline (16%).

Histologic Subtypes

  • Serous: Most common (60-70% of epithelial cancers); can be low-grade or high-grade
  • Mucinous: ~10%
  • Endometrioid: 10-15%
  • Clear cell: 10-15%

Type I vs. Type II Ovarian Cancers (Molecular Classification)

FeatureType IType II
HistologyLow-grade serous, mucinous, endometrioid, clear cellHigh-grade serous (70%), high-grade endometrioid, carcinosarcoma
Key mutationsKRAS, BRAF, PTEN, PIK3CA, ARID1ATP53, BRCA1/2
BehaviorIndolent, slow-growingAggressive, often advanced at diagnosis
AgeYounger women (30-50 for borderline)Women in 50s-60s
  • Schwartz's Principles of Surgery, p. 1843

Borderline Tumors (Low Malignant Potential)

  • Found in women aged 30-50 years
  • Indolent behavior; 10-year survival approaches 98%
  • Mutations in BRAF or KRAS
  • Managed primarily by surgery; targeted RAS/RAF pathway therapy has a role in recurrence

2. Germ Cell Tumors

These arise from totipotent germ cells and are the ovarian counterparts of testicular tumors. They peak in adolescence.
TumorKey FeaturesTumor Markers
DysgerminomaMost common malignant GCT; bilateral in 10-15%; ovarian counterpart of testicular seminoma; highly curableLDH, placental ALP
Yolk sac tumor (endodermal sinus)Aggressive; characteristic Schiller-Duval bodiesAFP
Immature teratomaContains incompletely differentiated neural tissueAFP (variable)
ChoriocarcinomaRare; highly aggressiveBeta-hCG
Mature teratoma (dermoid cyst)Most common GCT overall; benign; tissues from all 3 germ layers; can undergo malignant transformation (squamous cell) in older womenNone
Embryonal carcinomaRare; aggressiveAFP, beta-hCG
Treatment of malignant GCTs: Unilateral oophorectomy (fertility-sparing since bilateral involvement is uncommon, except in dysgerminoma). Chemotherapy: BEP (Bleomycin + Etoposide + Cisplatin) - analogous to testicular cancer. Even with advanced disease, cure is expected.
Dysgerminoma is highly radiosensitive, but BEP chemotherapy is preferred to preserve fertility.
  • Harrison's Principles of Internal Medicine 22E, p. 755

3. Sex Cord-Stromal Tumors

About 7% of ovarian neoplasms. These arise from the mesenchymal components (steroid-producing cells and fibroblasts). Most are indolent, unilateral solid masses. They can present with hormonal effects.
  • Granulosa cell tumor: Secretes estrogen; may cause precocious puberty in children, postmenopausal bleeding in older women
  • Sertoli-Leydig cell tumor: Secretes androgens; may cause virilization
  • Thecoma/fibroma: Fibroma classically associated with Meigs' syndrome (fibroma + ascites + pleural effusion)
  • Call-Exner bodies: Histologic hallmark of granulosa cell tumors

4. Metastatic Ovarian Tumors - Krukenberg Tumor

Bilateral ovarian masses from mucin-secreting gastrointestinal cancers (most commonly gastric, also colorectal, appendix, breast). Microscopically characterized by signet-ring cells within a cellular stroma.

Epidemiology and Risk Factors

  • Ovarian cancer affects ~1 in 70-72 women; median age at diagnosis is 62 years
  • ~19,710 new cases expected in the US in 2024 with >13,270 deaths
  • ~70% present with advanced (Stage III/IV) disease
  • 5-year survival: Stage I: 90-95%, Stage II: 70-80%, Stage III: 25-40%, Stage IV: 10-15%
Risk factors:
  • Nulliparity, early menarche, late menopause
  • Obesity, infertility treatments
  • BRCA1 mutation: 39% lifetime risk; BRCA2 mutation: 11-17% lifetime risk
  • Lynch syndrome (mismatch repair gene mutations): 9-12% lifetime risk
  • 18-24% of ovarian carcinomas arise in setting of hereditary predisposition
  • Up to 50% of BRCA-positive patients have NO family history
Protective factors: Oral contraceptives (risk reduction persists up to 30 years post-cessation), multiparity, tubal ligation, hysterectomy, breastfeeding, aspirin use

Clinical Features (Symptoms)

Symptoms are nonspecific and frequently delayed:
  • Abdominal distension, bloating
  • Pelvic or abdominal pain
  • Difficulty eating / feeling full quickly (early satiety)
  • Urinary urgency or frequency
  • Weight gain, increased girth (ascites)
  • Shortness of breath (pleural effusion)
  • Gastrointestinal disturbance or change in bowel habit
Over half of women initially present to a non-gynecology specialty due to vague symptoms from metastatic disease.

Investigations

Tumor markers by tumor type:
MarkerAssociated Tumor
CA-125Epithelial ovarian cancer (elevated in 50% of Stage I, >90% of advanced disease)
AFP (alpha-fetoprotein)Yolk sac tumor, immature teratoma
Beta-hCGDysgerminoma (minority), choriocarcinoma, embryonal carcinoma
LDHDysgerminoma
InhibinGranulosa cell tumor
CEA, CA-19-9Mucinous tumors
Note: CA-125 is non-specific - also elevated in pancreatic, breast, lung, colon cancer, endometriosis, PID, ascites, and liver disease.
Risk of Malignancy Index (RMI):
RMI = U × M × CA-125
  • U = ultrasound score (1 point each for multilocular, solid components, metastases, ascites, bilateral lesions; U = 0 if no features, 1 if 1 feature, 3 if 2-5 features)
  • M = menopausal status (1 = premenopausal; 3 = postmenopausal)
  • CA-125 in U/mL
IOTA Ultrasound Rules (Benign vs. Malignant):
Benign (B-rules)Malignant (M-rules)
Unilocular cystsIrregular solid tumor
Solid components <7 mmAscites
Acoustic shadowing≥4 papillary structures
Smooth multilocular tumor <100 mmIrregular multilocular tumor ≥100 mm
No blood flowBlood flow present
  • Bailey and Love's Surgery 28th Ed., p. 1614
Imaging: Ultrasound is first-line. Staging CT or MRI is performed pre-operatively to determine extent.

Laparoscopic Ovarian Cystectomy

Laparoscopic ovarian cystectomy showing surgical instruments manipulating ovarian tissue
Ovarian cystectomy - Bailey and Love's Surgery 28th Ed.

Staging (FIGO)

StageDescription
IGrowth limited to the ovaries
IIPelvic extension (uterus, bladder, sigmoid colon, rectum) or primary peritoneal cancer
IIIPeritoneal implants outside pelvis or retroperitoneal/pelvic lymph node involvement
IVDistant metastases

Management

Surgery

  • Primary cytoreductive surgery (debulking) is the cornerstone for epithelial ovarian cancer
  • Via midline laparotomy if malignancy suspected: total abdominal hysterectomy + bilateral salpingo-oophorectomy, omentectomy, peritoneal washings, lymph node sampling, biopsies
  • Appendicectomy for mucinous tumors
  • Fertility-sparing (unilateral oophorectomy) considered in young women with Stage IA/IB disease or borderline tumors, and routinely for malignant germ cell tumors

Chemotherapy

  • First-line: Paclitaxel + Carboplatin (IV or IP)
  • 70% of advanced-stage patients show tumor reduction; 40-50% achieve complete remission
  • PARP inhibitors (olaparib, niraparib, rucaparib) - maintenance therapy after primary chemotherapy for patients with homologous recombination deficiency (BRCA mutations); substantially delay recurrence and improve survival
Recent meta-analysis (2026) confirms PARP inhibitors provide benefit across clinical risk groups in newly diagnosed advanced ovarian cancer [PMID: 41042468].

Recurrent Disease

  • Platinum doublets (carboplatin + liposomal doxorubicin, gemcitabine, or taxane) if treatment-free interval
  • Agents with >15% response rates: gemcitabine, topotecan, liposomal doxorubicin, bevacizumab
  • Additional surgery does not extend survival in randomized trials

Genetic Screening

  • NCCN recommends genetic testing for all women diagnosed with ovarian cancer
  • Germline BRCA testing is critical - up to 20% of ovarian cancer patients are BRCA1/2 carriers
  • Testing recommended regardless of family history (up to 50% of BRCA-positive patients have no family history)
  • High-risk women may be offered risk-reducing bilateral salpingo-oophorectomy

Key Points to Remember

  1. Most common malignant ovarian tumor: High-grade serous epithelial carcinoma
  2. Most common ovarian tumor overall: Mature cystic teratoma (dermoid cyst)
  3. Most common malignant GCT: Dysgerminoma
  4. Bilateral involvement classic in: Dysgerminoma (10-15%), Krukenberg tumor, Brenner tumor, metastases
  5. Meigs' syndrome: Fibroma + ascites + pleural effusion (resolves after tumor removal)
  6. Type I cancers: Slow, peripheral mutations (KRAS, BRAF) - arising from endometriosis or borderline tumors
  7. Type II cancers: Aggressive, TP53 + BRCA mutations - likely originating in fallopian tube epithelium

Make this into pdf

Reading File
Running Command

ls /home/daytona/workspace/ 2>/dev/null || mkdir -p /home/daytona/workspace

Running Command

mkdir -p /home/daytona/workspace/ovarian-tumors && python3 -c "from reportlab.li…

Writing File

~/ovarian-tumors/generate_pdf.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm, mm
from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table,
                                 TableStyle, HRFlowable, PageBreak, KeepTogether)
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
from reportlab.platypus import Image as RLImage
import urllib.request, os, io

OUTPUT = "/home/daytona/workspace/ovarian-tumors/Ovarian_Tumors.pdf"

# ── Colors ──────────────────────────────────────────────────────────────────
TEAL       = colors.HexColor("#00838F")
TEAL_LIGHT = colors.HexColor("#E0F7FA")
NAVY       = colors.HexColor("#0D3B66")
GOLD       = colors.HexColor("#F4A261")
GREY_BG    = colors.HexColor("#F5F5F5")
WHITE      = colors.white
BLACK      = colors.black
RED_SOFT   = colors.HexColor("#C62828")
GREEN_SOFT = colors.HexColor("#2E7D32")

# ── Styles ───────────────────────────────────────────────────────────────────
def build_styles():
    base = getSampleStyleSheet()

    H1 = ParagraphStyle("H1", parent=base["Heading1"],
                         fontSize=20, textColor=WHITE,
                         spaceAfter=4, spaceBefore=0,
                         fontName="Helvetica-Bold", alignment=TA_CENTER)

    H2 = ParagraphStyle("H2", parent=base["Heading2"],
                         fontSize=13, textColor=WHITE,
                         spaceAfter=2, spaceBefore=8,
                         fontName="Helvetica-Bold", alignment=TA_LEFT,
                         leftIndent=0)

    H3 = ParagraphStyle("H3", parent=base["Heading3"],
                         fontSize=11, textColor=NAVY,
                         spaceAfter=3, spaceBefore=6,
                         fontName="Helvetica-Bold")

    BODY = ParagraphStyle("BODY", parent=base["Normal"],
                           fontSize=9.5, leading=14,
                           textColor=colors.HexColor("#212121"),
                           spaceAfter=4, fontName="Helvetica",
                           alignment=TA_JUSTIFY)

    BULLET = ParagraphStyle("BULLET", parent=BODY,
                              leftIndent=14, bulletIndent=4,
                              spaceAfter=2)

    CAPTION = ParagraphStyle("CAPTION", parent=BODY,
                               fontSize=8, textColor=colors.grey,
                               alignment=TA_CENTER, spaceAfter=4)

    NOTE = ParagraphStyle("NOTE", parent=BODY,
                            fontSize=8.5, textColor=colors.HexColor("#555555"),
                            leftIndent=10, italic=True)

    HEADER_CELL = ParagraphStyle("HEADER_CELL", parent=base["Normal"],
                                  fontSize=9, textColor=WHITE,
                                  fontName="Helvetica-Bold", alignment=TA_CENTER)

    CELL = ParagraphStyle("CELL", parent=base["Normal"],
                           fontSize=8.5, textColor=BLACK,
                           fontName="Helvetica", alignment=TA_LEFT, leading=12)

    return H1, H2, H3, BODY, BULLET, CAPTION, NOTE, HEADER_CELL, CELL

H1, H2, H3, BODY, BULLET, CAPTION, NOTE, HEADER_CELL, CELL = build_styles()

# ── Helpers ──────────────────────────────────────────────────────────────────
def section_header(title, color=TEAL):
    """Coloured banner heading."""
    tbl = Table([[Paragraph(title, H2)]], colWidths=[17.5*cm])
    tbl.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), color),
        ("ROWBACKGROUNDS", (0,0), (-1,-1), [color]),
        ("TOPPADDING",    (0,0), (-1,-1), 5),
        ("BOTTOMPADDING", (0,0), (-1,-1), 5),
        ("LEFTPADDING",   (0,0), (-1,-1), 8),
        ("RIGHTPADDING",  (0,0), (-1,-1), 8),
        ("ROUNDEDCORNERS", [4]),
    ]))
    return tbl

def styled_table(headers, rows, col_widths, alt_color=GREY_BG):
    data = [[Paragraph(h, HEADER_CELL) for h in headers]]
    for row in rows:
        data.append([Paragraph(str(c), CELL) for c in row])
    t = Table(data, colWidths=col_widths, repeatRows=1)
    style = [
        ("BACKGROUND",    (0,0), (-1,0),  TEAL),
        ("TEXTCOLOR",     (0,0), (-1,0),  WHITE),
        ("FONTNAME",      (0,0), (-1,0),  "Helvetica-Bold"),
        ("FONTSIZE",      (0,0), (-1,0),  9),
        ("ROWBACKGROUNDS",(0,1), (-1,-1), [WHITE, alt_color]),
        ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#BDBDBD")),
        ("TOPPADDING",    (0,0), (-1,-1), 4),
        ("BOTTOMPADDING", (0,0), (-1,-1), 4),
        ("LEFTPADDING",   (0,0), (-1,-1), 6),
        ("RIGHTPADDING",  (0,0), (-1,-1), 6),
        ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ]
    t.setStyle(TableStyle(style))
    return t

def bullet(text):
    return Paragraph(f"• {text}", BULLET)

def sp(n=1):
    return Spacer(1, n*4*mm)

# ── Download image ────────────────────────────────────────────────────────────
IMG_URL = "https://cdn.orris.care/cdss_images/494ad2f1fa40d73d8d1bdcf68f185edda859c0e02a3071a98d6766bbf112d2a6.png"
IMG_PATH = "/home/daytona/workspace/ovarian-tumors/cystectomy.png"
try:
    urllib.request.urlretrieve(IMG_URL, IMG_PATH)
except Exception:
    IMG_PATH = None

# ── Build story ───────────────────────────────────────────────────────────────
story = []
W = 17.5*cm   # usable width

# ── Title banner ──────────────────────────────────────────────────────────────
title_tbl = Table([[Paragraph("OVARIAN TUMORS", H1)]], colWidths=[W])
title_tbl.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,-1), NAVY),
    ("TOPPADDING",    (0,0), (-1,-1), 14),
    ("BOTTOMPADDING", (0,0), (-1,-1), 14),
    ("LEFTPADDING",   (0,0), (-1,-1), 10),
    ("RIGHTPADDING",  (0,0), (-1,-1), 10),
]))
story.append(title_tbl)
story.append(Paragraph("A Comprehensive Clinical Reference", ParagraphStyle("sub",
    fontSize=10, textColor=TEAL, alignment=TA_CENTER, spaceAfter=6, fontName="Helvetica-Oblique")))
story.append(Paragraph("Sources: Harrison's 22E · Schwartz's Surgery 11E · Bailey & Love 28E · Berek & Novak's Gynecology",
    ParagraphStyle("src", fontSize=7.5, textColor=colors.grey, alignment=TA_CENTER, spaceAfter=2)))
story.append(HRFlowable(width=W, thickness=1.5, color=TEAL, spaceAfter=8))

# ── 1. Classification ─────────────────────────────────────────────────────────
story.append(section_header("1. Classification of Ovarian Tumors"))
story.append(sp())
story.append(styled_table(
    ["Category", "Examples", "Frequency"],
    [
        ["Epithelial", "Serous, Mucinous, Endometrioid, Clear cell, Brenner", "~90% of ovarian malignancies"],
        ["Germ Cell", "Dysgerminoma, Mature teratoma (dermoid), Yolk sac tumor, Immature teratoma, Choriocarcinoma", "~5% of malignancies"],
        ["Sex Cord-Stromal", "Granulosa cell tumor, Sertoli-Leydig cell tumor, Fibroma, Thecoma", "~7% of neoplasms"],
        ["Metastatic", "Krukenberg tumor (gastric/GI primary); signet-ring cells bilaterally", "Secondary"],
    ],
    [3.5*cm, 8.5*cm, 5.5*cm]
))
story.append(sp())

# ── 2. Epithelial Tumors ──────────────────────────────────────────────────────
story.append(section_header("2. Epithelial Ovarian Tumors"))
story.append(sp(0.5))
story.append(Paragraph(
    "Epithelial tumors are the most common ovarian neoplasms. They may be <b>benign (50%)</b>, "
    "<b>malignant (33%)</b>, or <b>borderline/low malignant potential (16%)</b>. "
    "Subtypes: serous (60–70%), mucinous (10%), endometrioid (10–15%), clear cell (10–15%).", BODY))
story.append(sp(0.5))

story.append(Paragraph("<b>Type I vs. Type II Molecular Classification</b>", H3))
story.append(styled_table(
    ["Feature", "Type I", "Type II"],
    [
        ["Histology", "Low-grade serous, mucinous, endometrioid, clear cell", "High-grade serous (70%), high-grade endometrioid, carcinosarcoma"],
        ["Key Mutations", "KRAS, BRAF, PTEN, PIK3CA, ARID1A", "TP53, BRCA1/2 (rare TP53 in Type I)"],
        ["Behavior", "Indolent, slow-growing, peripheral", "Aggressive, often advanced at diagnosis"],
        ["Likely Origin", "Endometriosis / borderline tumors", "Fallopian tube intraepithelial carcinoma (STIC)"],
        ["Age", "Younger women (30–50 for borderline)", "Women in 50s–60s"],
    ],
    [3*cm, 7.25*cm, 7.25*cm]
))
story.append(sp(0.5))

story.append(Paragraph("<b>Borderline Tumors (Low Malignant Potential)</b>", H3))
for b in [
    "Found in women aged 30–50 years; 10-year survival approaches 98%",
    "Mutations in <b>BRAF</b> or <b>KRAS</b>; micropapillary histology / microinvasion = more aggressive",
    "Managed primarily by surgery; targeted RAS/RAF pathway therapy considered in recurrence",
]:
    story.append(bullet(b))
story.append(sp())

# ── 3. Germ Cell Tumors ───────────────────────────────────────────────────────
story.append(section_header("3. Germ Cell Tumors"))
story.append(sp(0.5))
story.append(Paragraph(
    "Arise from totipotent germ cells; peak incidence in <b>adolescents</b>. "
    "Ovarian counterparts of testicular GCTs. Can produce hCG or AFP.", BODY))
story.append(sp(0.5))
story.append(styled_table(
    ["Tumor", "Key Features", "Tumor Markers"],
    [
        ["Mature Teratoma\n(Dermoid Cyst)", "Most common GCT overall; benign; tissues from all 3 germ layers; malignant transformation (SCC) possible in older women", "None"],
        ["Dysgerminoma", "Most common malignant GCT; bilateral 10–15%; ovarian counterpart of testicular seminoma; highly curable; radiosensitive", "LDH, placental ALP"],
        ["Yolk Sac Tumor\n(Endodermal Sinus)", "Aggressive; Schiller-Duval bodies histologically", "AFP ↑"],
        ["Immature Teratoma", "Contains immature neural tissue; malignant", "AFP (variable)"],
        ["Choriocarcinoma", "Rare; highly aggressive", "Beta-hCG ↑↑"],
        ["Embryonal Carcinoma", "Rare; aggressive; mixed elements", "AFP, Beta-hCG"],
    ],
    [3.5*cm, 9*cm, 5*cm]
))
story.append(sp(0.5))
story.append(Paragraph("<b>Treatment of Malignant GCTs:</b>", H3))
for b in [
    "Unilateral oophorectomy (fertility-sparing; bilateral involvement uncommon except in dysgerminoma)",
    "Chemotherapy: <b>BEP</b> (Bleomycin + Etoposide + Cisplatin) — analogous to testicular cancer",
    "Cure expected even in advanced disease",
    "Dysgerminoma: BEP preferred over radiation (radiation causes infertility)",
]:
    story.append(bullet(b))
story.append(sp())

# ── 4. Sex Cord-Stromal Tumors ────────────────────────────────────────────────
story.append(section_header("4. Sex Cord-Stromal Tumors"))
story.append(sp(0.5))
story.append(Paragraph("~7% of ovarian neoplasms. Arise from mesenchymal components. Most are indolent, unilateral solid masses.", BODY))
story.append(sp(0.5))
story.append(styled_table(
    ["Tumor", "Hormone Produced", "Clinical Effect / Hallmark"],
    [
        ["Granulosa Cell Tumor", "Estrogen", "Precocious puberty (children); postmenopausal bleeding; Call-Exner bodies (histology)"],
        ["Sertoli-Leydig Cell Tumor", "Androgens", "Virilization (hirsutism, clitoromegaly, voice change)"],
        ["Fibroma", "None", "Meigs' syndrome: fibroma + ascites + pleural effusion"],
        ["Thecoma", "Estrogen", "Postmenopausal bleeding; often mixed with fibroma"],
    ],
    [4*cm, 4*cm, 9.5*cm]
))
story.append(sp(0.5))
story.append(Paragraph("🔑 <b>Meigs' syndrome</b> = Benign ovarian fibroma + ascites + right-sided pleural effusion "
    "(resolves after tumor removal).", NOTE))
story.append(sp())

# ── 5. Epidemiology ───────────────────────────────────────────────────────────
story.append(section_header("5. Epidemiology & Risk Factors"))
story.append(sp(0.5))

epi_data = [
    ["Lifetime risk", "~1 in 70–72 women (1.6%)"],
    ["Median age at diagnosis", "62 years"],
    ["US incidence (2024)", "~19,710 new cases; >13,270 deaths"],
    ["Stage at presentation", "~70% present with advanced (Stage III/IV) disease"],
    ["5-year survival", "Stage I: 90–95% | Stage II: 70–80% | Stage III: 25–40% | Stage IV: 10–15%"],
]
epi_tbl = Table([[Paragraph(r[0], ParagraphStyle("k", fontSize=9, fontName="Helvetica-Bold", textColor=NAVY)),
                  Paragraph(r[1], CELL)] for r in epi_data],
                colWidths=[5*cm, 12.5*cm])
epi_tbl.setStyle(TableStyle([
    ("ROWBACKGROUNDS", (0,0), (-1,-1), [WHITE, GREY_BG]),
    ("GRID",          (0,0), (-1,-1), 0.3, colors.HexColor("#E0E0E0")),
    ("TOPPADDING",    (0,0), (-1,-1), 5),
    ("BOTTOMPADDING", (0,0), (-1,-1), 5),
    ("LEFTPADDING",   (0,0), (-1,-1), 8),
]))
story.append(epi_tbl)
story.append(sp(0.5))

story.append(Paragraph("<b>Risk Factors</b>", H3))
for b in ["Nulliparity, early menarche, late menopause",
           "Obesity, infertility treatments, talc exposure",
           "BRCA1 mutation: <b>39%</b> lifetime risk; BRCA2 mutation: <b>11–17%</b> lifetime risk",
           "Lynch syndrome (mismatch repair genes): 9–12% lifetime risk",
           "18–24% of ovarian carcinomas arise in hereditary predisposition setting",
           "Up to 50% of BRCA-positive patients have NO family history of cancer"]:
    story.append(bullet(b))

story.append(sp(0.5))
story.append(Paragraph("<b>Protective Factors</b>", H3))
for b in ["Oral contraceptives (risk reduction persists up to 30 years after cessation)",
           "Multiparity, tubal ligation, hysterectomy",
           "Breastfeeding, aspirin use"]:
    story.append(bullet(b))
story.append(sp())

# ── 6. Clinical Features ──────────────────────────────────────────────────────
story.append(section_header("6. Clinical Features (Symptoms)"))
story.append(sp(0.5))
story.append(Paragraph(
    "Symptoms are <b>nonspecific</b> and frequently delayed. Over half of women initially present to "
    "a non-gynecology specialty due to vague symptoms from metastatic disease.", BODY))
story.append(sp(0.5))

symp_cols = [[
    [bullet("Abdominal distension / bloating"),
     bullet("Pelvic or abdominal pain"),
     bullet("Difficulty eating / early satiety"),
     bullet("Urinary urgency or frequency")],
    [bullet("Weight gain, increased girth (ascites)"),
     bullet("Shortness of breath (pleural effusion)"),
     bullet("GI disturbance / change in bowel habit"),
     bullet("Palpable pelvic/abdominal mass")]
]]
symp_tbl = Table([[symp_cols[0][0], symp_cols[0][1]]], colWidths=[W/2, W/2])
story.append(symp_tbl)
story.append(sp())

# ── 7. Investigations ─────────────────────────────────────────────────────────
story.append(section_header("7. Investigations & Tumor Markers"))
story.append(sp(0.5))
story.append(styled_table(
    ["Marker", "Associated Tumor", "Notes"],
    [
        ["CA-125", "Epithelial ovarian cancer", "Elevated in 50% stage I, >90% advanced; non-specific (also raised in endometriosis, PID, liver disease)"],
        ["AFP (alpha-fetoprotein)", "Yolk sac tumor, Immature teratoma", "Also elevated in hepatocellular carcinoma"],
        ["Beta-hCG", "Choriocarcinoma, Dysgerminoma (minority), Embryonal carcinoma", "Also elevated in pregnancy"],
        ["LDH", "Dysgerminoma", "Non-specific"],
        ["Inhibin", "Granulosa cell tumor", "Useful for monitoring response"],
        ["CEA / CA-19-9", "Mucinous tumors", "Also GI malignancies"],
        ["Placental ALP", "Dysgerminoma", "Confirmatory"],
    ],
    [3.5*cm, 5.5*cm, 8.5*cm]
))
story.append(sp(0.5))

story.append(Paragraph("<b>Risk of Malignancy Index (RMI)</b>", H3))
story.append(Paragraph("<b>RMI = U × M × CA-125</b>", ParagraphStyle("formula",
    fontSize=11, fontName="Helvetica-Bold", textColor=TEAL, spaceAfter=4, spaceBefore=4)))
rmi_rows = [
    ["U (Ultrasound)", "Score 1 pt each for: multilocular, solid components, metastases, ascites, bilateral lesions. U=0 (no features), U=1 (1 feature), U=3 (2–5 features)"],
    ["M (Menopausal status)", "1 = premenopausal; 3 = postmenopausal"],
    ["CA-125", "Level in U/mL"],
    ["Interpretation", "RMI <25 = low risk | RMI 25–250 = moderate | RMI >250 = high risk → refer to oncology"],
]
rmi_tbl = Table([[Paragraph(r[0], ParagraphStyle("k2", fontSize=9, fontName="Helvetica-Bold", textColor=NAVY)),
                  Paragraph(r[1], CELL)] for r in rmi_rows],
                colWidths=[4.5*cm, 13*cm])
rmi_tbl.setStyle(TableStyle([
    ("ROWBACKGROUNDS", (0,0), (-1,-1), [TEAL_LIGHT, WHITE]),
    ("GRID",          (0,0), (-1,-1), 0.3, colors.HexColor("#B2EBF2")),
    ("TOPPADDING",    (0,0), (-1,-1), 5), ("BOTTOMPADDING", (0,0), (-1,-1), 5),
    ("LEFTPADDING",   (0,0), (-1,-1), 8),
]))
story.append(rmi_tbl)
story.append(sp(0.5))

story.append(Paragraph("<b>IOTA Ultrasound Rules</b>", H3))
story.append(styled_table(
    ["Benign Features (B-rules)", "Malignant Features (M-rules)"],
    [
        ["Unilocular cysts", "Irregular solid tumor"],
        ["Solid components <7 mm", "Ascites"],
        ["Acoustic shadowing", "≥4 papillary structures"],
        ["Smooth multilocular tumor <100 mm", "Irregular multilocular tumor ≥100 mm"],
        ["No blood flow", "Blood flow present (Doppler)"],
    ],
    [W/2, W/2]
))
story.append(sp())

# ── 8. Staging ────────────────────────────────────────────────────────────────
story.append(section_header("8. FIGO Staging"))
story.append(sp(0.5))
story.append(styled_table(
    ["Stage", "Description"],
    [
        ["Stage I", "Growth limited to the ovaries"],
        ["Stage II", "Pelvic extension (uterus, bladder, sigmoid colon, rectum) or primary peritoneal cancer"],
        ["Stage III", "Peritoneal implants outside pelvis and/or retroperitoneal/pelvic lymph node involvement"],
        ["Stage IV", "Distant metastases (e.g. liver parenchyma, pleural effusion with positive cytology)"],
    ],
    [2.5*cm, 15*cm]
))
story.append(sp())

# ── 9. Management ─────────────────────────────────────────────────────────────
story.append(section_header("9. Management"))
story.append(sp(0.5))

story.append(Paragraph("<b>Surgical Staging / Cytoreduction</b>", H3))
for b in [
    "Midline laparotomy if malignancy suspected preoperatively",
    "Total abdominal hysterectomy + bilateral salpingo-oophorectomy",
    "Infracolic omentectomy",
    "Peritoneal washings × 4 (diaphragm, right/left abdomen, pelvis)",
    "Pelvic and para-aortic lymph node sampling",
    "Biopsies of all suspicious lesions + random blind peritoneal biopsies",
    "Appendicectomy for mucinous tumors",
    "<b>Fertility-sparing</b> (unilateral oophorectomy): Stage IA/IB, borderline tumors, malignant GCTs",
]:
    story.append(bullet(b))

story.append(sp(0.5))
story.append(Paragraph("<b>Chemotherapy</b>", H3))
story.append(styled_table(
    ["Setting", "Regimen"],
    [
        ["First-line (epithelial)", "Paclitaxel + Carboplatin (IV or intraperitoneal)"],
        ["Maintenance (BRCA/HRD+)", "PARP inhibitors: Olaparib, Niraparib, Rucaparib (oral)"],
        ["Recurrent (platinum-sensitive)", "Carboplatin + liposomal doxorubicin / gemcitabine / taxane"],
        ["Malignant GCTs", "BEP: Bleomycin + Etoposide + Cisplatin"],
        ["Agents with >15% response rate (refractory)", "Gemcitabine, Topotecan, Liposomal doxorubicin, Bevacizumab"],
    ],
    [6*cm, 11.5*cm]
))
story.append(sp(0.5))
story.append(Paragraph(
    "PARP inhibitors substantially delay recurrence and improve overall survival in BRCA/HRD-positive patients "
    "(confirmed in recent 2026 meta-analysis, PMID: 41042468). 70% of advanced-stage patients show tumor reduction "
    "with optimal debulking + platinum-based chemotherapy; 40–50% achieve complete remission.", NOTE))
story.append(sp())

# ── 10. Genetics & Screening ──────────────────────────────────────────────────
story.append(section_header("10. Genetics & Screening"))
story.append(sp(0.5))
for b in [
    "NCCN recommends genetic testing for <b>all</b> women diagnosed with ovarian cancer (since 2007)",
    "Up to 20% of ovarian cancer patients carry BRCA1/2 germline mutations",
    "Testing recommended regardless of family history (50% of BRCA+ have no family history)",
    "<b>BRCA1</b>: 39% lifetime ovarian cancer risk | <b>BRCA2</b>: 11–17% risk",
    "Lynch syndrome (MLH1, MSH2, MSH6, PMS2): 9–12% lifetime ovarian cancer risk",
    "High-risk women may be offered prophylactic bilateral salpingo-oophorectomy",
    "No national screening programme currently reduces ovarian cancer mortality",
]:
    story.append(bullet(b))
story.append(sp())

# ── 11. Key Points ────────────────────────────────────────────────────────────
story.append(section_header("11. High-Yield Key Points", color=NAVY))
story.append(sp(0.5))
story.append(styled_table(
    ["#", "Key Point"],
    [
        ["1", "Most common malignant ovarian tumor → High-grade serous carcinoma (Type II)"],
        ["2", "Most common ovarian tumor overall → Mature cystic teratoma (dermoid cyst)"],
        ["3", "Most common malignant GCT → Dysgerminoma"],
        ["4", "Bilateral involvement classic in → Dysgerminoma (10–15%), Krukenberg tumor, metastases"],
        ["5", "Meigs' syndrome → Benign fibroma + ascites + pleural effusion (resolves post-resection)"],
        ["6", "Call-Exner bodies → Granulosa cell tumor (estrogen-secreting)"],
        ["7", "Type I ovarian cancers → Slow, peripheral mutations (KRAS/BRAF) from endometriosis"],
        ["8", "Type II ovarian cancers → Aggressive, TP53 + BRCA, origin in fallopian tube (STIC)"],
        ["9", "PARP inhibitors (olaparib/niraparib) → maintenance therapy for BRCA/HRD+ patients"],
        ["10", "Chemotherapy for malignant GCTs → BEP (same as testicular cancer)"],
    ],
    [1*cm, 16.5*cm]
))
story.append(sp(0.5))

# ── Image ─────────────────────────────────────────────────────────────────────
if IMG_PATH and os.path.exists(IMG_PATH):
    story.append(HRFlowable(width=W, thickness=0.5, color=TEAL, spaceAfter=6))
    img = RLImage(IMG_PATH, width=9*cm, height=6.5*cm)
    img_tbl = Table([[img]], colWidths=[W])
    img_tbl.setStyle(TableStyle([("ALIGN", (0,0), (-1,-1), "CENTER")]))
    story.append(img_tbl)
    story.append(Paragraph("Figure: Laparoscopic ovarian cystectomy — Bailey and Love's Short Practice of Surgery 28th Ed.", CAPTION))

story.append(sp())
story.append(HRFlowable(width=W, thickness=0.5, color=colors.grey, spaceAfter=4))
story.append(Paragraph(
    "References: Harrison's Principles of Internal Medicine 22E (2025) · "
    "Schwartz's Principles of Surgery 11E · Bailey and Love's Short Practice of Surgery 28E · "
    "Berek & Novak's Gynecology · PMID: 41042468 (PARP inhibitors meta-analysis, 2026)",
    ParagraphStyle("refs", fontSize=7.5, textColor=colors.grey, alignment=TA_CENTER)))

# ── Build PDF ─────────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    leftMargin=1.8*cm, rightMargin=1.8*cm,
    topMargin=1.8*cm,  bottomMargin=1.8*cm,
    title="Ovarian Tumors - Clinical Reference",
    author="Orris Medical AI",
)

def add_page_number(canvas, doc):
    canvas.saveState()
    canvas.setFont("Helvetica", 8)
    canvas.setFillColor(colors.grey)
    canvas.drawCentredString(A4[0]/2, 1*cm, f"Page {doc.page} | Ovarian Tumors — Clinical Reference")
    canvas.restoreState()

doc.build(story, onFirstPage=add_page_number, onLaterPages=add_page_number)
print(f"PDF saved to: {OUTPUT}")
Running Command

cd /home/daytona/workspace/ovarian-tumors && python3 generate_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/ovarian-tumors/Ovarian_Tumors.pdf

Your PDF is ready (3.4 MB, A4, fully formatted):

Ovarian Tumors

PDF Document · PDF

What's included in the PDF:
  1. Classification table - all 4 categories with examples and frequency
  2. Epithelial tumors - histologic subtypes, Type I vs. Type II molecular classification, borderline tumors
  3. Germ cell tumors - full table with markers, plus treatment (BEP chemotherapy)
  4. Sex cord-stromal tumors - granulosa cell, Sertoli-Leydig, fibroma/Meigs' syndrome
  5. Epidemiology & risk factors - BRCA risks, protective factors, 5-year survival by stage
  6. Clinical features - symptom overview
  7. Investigations - tumor marker reference table, RMI formula, IOTA ultrasound rules
  8. FIGO staging table
  9. Management - surgical steps, chemotherapy regimens (including PARP inhibitors)
  10. Genetics & screening - BRCA/Lynch counselling
  11. 10 high-yield key points for exam/revision
  12. Laparoscopic cystectomy image with caption
  13. Page numbers and references throughout
This is a shared conversation. Sign in to Orris to start your own chat.