Discus enfometrial biopsy in health and diseases write long answer and make pdf of detailed answer
mkdir -p /home/daytona/workspace/endometrial-biopsy && ls /home/daytona/workspac…
~/endometrial-biopsy/generate_pdf.py
#!/usr/bin/env python3
"""Generate a comprehensive PDF on Endometrial Biopsy in Health and Disease."""
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_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import BaseDocTemplate, Frame, PageTemplate
from reportlab.lib.colors import HexColor
OUTPUT_PATH = "/home/daytona/workspace/endometrial-biopsy/Endometrial_Biopsy_Health_Disease.pdf"
# Color palette
DARK_BLUE = HexColor('#1a3c6e')
MED_BLUE = HexColor('#2e6da4')
LIGHT_BLUE = HexColor('#d6e8f7')
ACCENT_RED = HexColor('#b03a2e')
DARK_GRAY = HexColor('#2c2c2c')
MID_GRAY = HexColor('#555555')
LIGHT_GRAY = HexColor('#f5f5f5')
TABLE_HEADER = HexColor('#1a3c6e')
TABLE_ALT = HexColor('#eaf3fc')
def header_footer(canvas, doc):
canvas.saveState()
w, h = A4
# Header bar
canvas.setFillColor(DARK_BLUE)
canvas.rect(0, h - 1.2*cm, w, 1.2*cm, fill=1, stroke=0)
canvas.setFillColor(colors.white)
canvas.setFont('Helvetica-Bold', 9)
canvas.drawString(1.5*cm, h - 0.8*cm, 'ENDOMETRIAL BIOPSY IN HEALTH AND DISEASE')
canvas.setFont('Helvetica', 8)
canvas.drawRightString(w - 1.5*cm, h - 0.8*cm, 'Comprehensive Clinical Review')
# Footer
canvas.setFillColor(DARK_BLUE)
canvas.rect(0, 0, w, 0.9*cm, fill=1, stroke=0)
canvas.setFillColor(colors.white)
canvas.setFont('Helvetica', 8)
canvas.drawString(1.5*cm, 0.3*cm, 'Sources: Berek & Novak\'s Gynecology | Bailey & Love\'s Surgery | Pfenninger & Fowler\'s Procedures')
canvas.drawRightString(w - 1.5*cm, 0.3*cm, f'Page {doc.page}')
canvas.restoreState()
def build_styles():
styles = getSampleStyleSheet()
s = {}
s['title'] = ParagraphStyle('title', fontName='Helvetica-Bold', fontSize=26,
textColor=colors.white, alignment=TA_CENTER, spaceAfter=4)
s['subtitle'] = ParagraphStyle('subtitle', fontName='Helvetica', fontSize=13,
textColor=HexColor('#d6e8f7'), alignment=TA_CENTER, spaceAfter=6)
s['h1'] = ParagraphStyle('h1', fontName='Helvetica-Bold', fontSize=15,
textColor=colors.white, spaceAfter=6, spaceBefore=14,
backColor=DARK_BLUE, leftIndent=-12, rightIndent=-12,
borderPadding=(6,12,6,12))
s['h2'] = ParagraphStyle('h2', fontName='Helvetica-Bold', fontSize=12,
textColor=DARK_BLUE, spaceAfter=4, spaceBefore=10,
borderPadding=(2,0,2,0))
s['h3'] = ParagraphStyle('h3', fontName='Helvetica-Bold', fontSize=10.5,
textColor=ACCENT_RED, spaceAfter=3, spaceBefore=7)
s['body'] = ParagraphStyle('body', fontName='Helvetica', fontSize=10,
textColor=DARK_GRAY, leading=15, spaceAfter=5,
alignment=TA_JUSTIFY)
s['bullet'] = ParagraphStyle('bullet', fontName='Helvetica', fontSize=10,
textColor=DARK_GRAY, leading=14, spaceAfter=3,
leftIndent=16, bulletIndent=4)
s['sub_bullet'] = ParagraphStyle('sub_bullet', fontName='Helvetica', fontSize=9.5,
textColor=MID_GRAY, leading=13, spaceAfter=2,
leftIndent=30, bulletIndent=18)
s['note'] = ParagraphStyle('note', fontName='Helvetica-Oblique', fontSize=9,
textColor=MID_GRAY, leading=13, spaceAfter=4,
leftIndent=8, rightIndent=8)
s['source'] = ParagraphStyle('source', fontName='Helvetica-Oblique', fontSize=8,
textColor=MED_BLUE, spaceAfter=6)
s['warning'] = ParagraphStyle('warning', fontName='Helvetica-Bold', fontSize=10,
textColor=ACCENT_RED, leading=14, spaceAfter=4)
s['toc'] = ParagraphStyle('toc', fontName='Helvetica', fontSize=10,
textColor=DARK_GRAY, leading=16, spaceAfter=1)
return s
def make_section_header(text, styles):
return [
Spacer(1, 0.2*cm),
Paragraph(f' {text}', styles['h1']),
Spacer(1, 0.15*cm),
]
def make_table(headers, data, col_widths=None):
table_data = [headers] + data
t = Table(table_data, colWidths=col_widths)
style = TableStyle([
('BACKGROUND', (0,0), (-1,0), TABLE_HEADER),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('FONTSIZE', (0,0), (-1,0), 9.5),
('ALIGN', (0,0), (-1,-1), 'LEFT'),
('VALIGN', (0,0), (-1,-1), 'TOP'),
('FONTNAME', (0,1), (-1,-1), 'Helvetica'),
('FONTSIZE', (0,1), (-1,-1), 9),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, TABLE_ALT]),
('GRID', (0,0), (-1,-1), 0.5, HexColor('#c0c0c0')),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 7),
('RIGHTPADDING', (0,0), (-1,-1), 7),
('ROWBACKGROUNDS', (0,0), (-1,0), [TABLE_HEADER]),
])
t.setStyle(style)
return t
def build_content(styles):
story = []
W = A4[0] - 3*cm # usable width
# ============================================================
# COVER PAGE
# ============================================================
story.append(Spacer(1, 3.5*cm))
# Blue title box
cover_data = [
[Paragraph('ENDOMETRIAL BIOPSY', styles['title'])],
[Paragraph('in Health and Disease', styles['subtitle'])],
[Paragraph('A Comprehensive Clinical and Pathological Review', styles['subtitle'])],
]
cover_table = Table(cover_data, colWidths=[W])
cover_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), DARK_BLUE),
('TOPPADDING', (0,0), (-1,-1), 10),
('BOTTOMPADDING', (0,0), (-1,-1), 10),
('LEFTPADDING', (0,0), (-1,-1), 20),
('RIGHTPADDING', (0,0), (-1,-1), 20),
('ROUNDEDCORNERS', [8,8,8,8]),
]))
story.append(cover_table)
story.append(Spacer(1, 1.5*cm))
story.append(HRFlowable(width='100%', thickness=2, color=MED_BLUE))
story.append(Spacer(1, 0.5*cm))
cover_info = [
['Scope', 'Definition | Indications | Technique | Histology | Pathological Findings | Management'],
['Sources', 'Berek & Novak\'s Gynecology | Bailey & Love\'s Surgery 28e | Pfenninger & Fowler\'s Procedures'],
['Level', 'Advanced Clinical Reference'],
['Date', 'July 2026'],
]
info_table = Table(cover_info, colWidths=[3*cm, W-3*cm])
info_table.setStyle(TableStyle([
('FONTNAME', (0,0), (0,-1), 'Helvetica-Bold'),
('FONTNAME', (1,0), (1,-1), 'Helvetica'),
('FONTSIZE', (0,0), (-1,-1), 10),
('TEXTCOLOR', (0,0), (0,-1), DARK_BLUE),
('TEXTCOLOR', (1,0), (1,-1), DARK_GRAY),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LINEBELOW', (0,0), (-1,-2), 0.5, HexColor('#dddddd')),
]))
story.append(info_table)
story.append(PageBreak())
# ============================================================
# TABLE OF CONTENTS
# ============================================================
story += make_section_header('TABLE OF CONTENTS', styles)
toc_items = [
('1.', 'Introduction and Background'),
('2.', 'Anatomy and Histology of the Normal Endometrium'),
('3.', 'Indications for Endometrial Biopsy'),
('4.', 'Contraindications'),
('5.', 'Equipment and Instruments'),
('6.', 'Pre-procedure Preparation and Patient Education'),
('7.', 'Procedure Technique (Step-by-Step)'),
('8.', 'Post-procedure Care and Complications'),
('9.', 'Histological Interpretation of Results'),
('10.', 'Endometrial Biopsy in Disease States'),
(' 10.1', 'Endometrial Hyperplasia'),
(' 10.2', 'Endometrial Carcinoma'),
(' 10.3', 'Endometrial Polyps'),
(' 10.4', 'Abnormal Uterine Bleeding (AUB)'),
(' 10.5', 'Lynch Syndrome Surveillance'),
(' 10.6', 'Tamoxifen Use'),
(' 10.7', 'Infertility and Dating of Endometrium'),
('11.', 'Role of Adjunct Investigations'),
('12.', 'Management Algorithms Based on Biopsy Results'),
('13.', 'Clinical Pearls and Summary'),
('14.', 'References and Sources'),
]
for num, title in toc_items:
story.append(Paragraph(f'<b>{num}</b> {title}', styles['toc']))
story.append(PageBreak())
# ============================================================
# SECTION 1: INTRODUCTION
# ============================================================
story += make_section_header('1. INTRODUCTION AND BACKGROUND', styles)
story.append(Paragraph(
'Endometrial biopsy (EMB) is one of the most important and frequently performed office-based gynecological '
'procedures. It involves obtaining a small sample of the endometrial tissue lining the uterus for histological '
'examination. The procedure has largely replaced formal dilation and curettage (D&C) for outpatient evaluation '
'of abnormal uterine bleeding and suspected endometrial pathology, offering comparable diagnostic accuracy with '
'significantly less cost, risk, and inconvenience.', styles['body']))
story.append(Paragraph(
'The diagnostic accuracy of office-based endometrial biopsy is reported to be 90% to 98% when compared with '
'subsequent findings at D&C or hysterectomy. The narrow plastic cannulas used for aspiration biopsy are '
'relatively inexpensive, can often be used without a tenaculum, cause less uterine cramping, and are successful '
'in obtaining adequate tissue samples in more than 95% of cases.', styles['body']))
story.append(Paragraph(
'Classic studies demonstrated that traditional D&C sampled less than one-half of the endometrium in more than '
'half of all patients, leading to questions about its diagnostic adequacy and driving adoption of aspiration '
'biopsy as the gold standard for office-based evaluation. Hysteroscopy with targeted biopsies remains more '
'sensitive than D&C in evaluating focal uterine pathology such as polyps and submucous myomas.', styles['body']))
story.append(Paragraph(
'<i>Source: Berek & Novak\'s Gynecology; Pfenninger & Fowler\'s Procedures for Primary Care</i>', styles['source']))
# ============================================================
# SECTION 2: ANATOMY & HISTOLOGY
# ============================================================
story += make_section_header('2. ANATOMY AND HISTOLOGY OF THE NORMAL ENDOMETRIUM', styles)
story.append(Paragraph(
'The endometrium is the inner mucosal lining of the uterine cavity. It consists of two functionally distinct '
'layers:', styles['body']))
story.append(Paragraph('Stratum Functionalis (Functional Layer)', styles['h2']))
story.append(Paragraph(
'The superficial layer that undergoes cyclical proliferation, secretory transformation, and shedding during '
'menstruation. It contains endometrial glands, stroma, and spiral arteries that respond to hormonal '
'stimulation. This is the primary layer sampled during endometrial biopsy.', styles['body']))
story.append(Paragraph('Stratum Basalis (Basal Layer)', styles['h2']))
story.append(Paragraph(
'The deeper layer adjacent to the myometrium. It does not shed during menstruation and serves as the '
'regenerative reserve for the functional layer. It contains the basal portions of glands and relatively '
'hormone-insensitive stroma.', styles['body']))
story.append(Paragraph('Cyclical Histological Changes', styles['h2']))
cycle_data = [
['Phase', 'Days', 'Histological Features'],
['Early Proliferative', '1-7 (post-menses)', 'Thin, compact stroma; straight tubular glands; low columnar epithelium'],
['Mid Proliferative', '8-10', 'Increased gland tortuosity; stromal edema; mitoses in glands and stroma'],
['Late Proliferative', '11-14', 'Tall columnar epithelium; pseudostratified nuclei; prominent mitoses'],
['Early Secretory', '15-19', 'Sub-nuclear vacuoles in gland epithelium; confirms ovulation'],
['Mid Secretory', '20-24', 'Luminal secretions; stromal edema; spiral artery development'],
['Late Secretory', '25-28', 'Stromal predecidual change; prominent spiral arteries'],
['Menstrual', '1-4', 'Stromal breakdown; gland fragmentation; hemorrhage'],
]
story.append(make_table(cycle_data[0:1], cycle_data[1:], col_widths=[3.5*cm, 3.5*cm, W-7*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
'Dating of the endometrium based on biopsy in the secretory phase is used in the evaluation of infertility '
'and luteal phase defects. EMB performed on day 22 or 23 of the menstrual cycle (after the first day of the '
'last menstrual period) allows confirmation of ovulation when secretory glands are identified.', styles['body']))
# ============================================================
# SECTION 3: INDICATIONS
# ============================================================
story += make_section_header('3. INDICATIONS FOR ENDOMETRIAL BIOPSY', styles)
story.append(Paragraph(
'Endometrial biopsy is indicated in a broad range of clinical situations where endometrial pathology is '
'suspected. According to Bailey & Love\'s Surgery 28th Edition and Berek & Novak\'s Gynecology, '
'the following are established indications:', styles['body']))
story.append(Paragraph('Primary Indications', styles['h2']))
primary_indications = [
'All women with postmenopausal uterine bleeding',
'Abnormal perimenopausal bleeding (menometrorrhagia, oligomenorrhea, intermenstrual bleeding)',
'Suspected endometrial pathology on clinical or ultrasound assessment',
'All women >45 years old in whom medical treatment has been unsuccessful',
'Women with persistent intermenstrual bleeding regardless of age',
'Endometrial thickness >4 mm in postmenopausal women on transvaginal ultrasound',
'Persistently thickened or abnormal appearing endometrium in premenopausal women',
'Endometrial thickness >7 mm in women with known polycystic ovarian syndrome (PCOS)',
'Irregular or unscheduled bleeding while on hormone replacement therapy (HRT) after initial 3 months',
'Anovulatory bleeding in women older than 45 years or in younger obese women',
]
for item in primary_indications:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('High-Risk Group Indications', styles['h2']))
story.append(Paragraph(
'Younger women with major risk factors for endometrial hyperplasia or cancer should undergo EMB even '
'without classic symptoms:', styles['body']))
high_risk = [
'Polycystic Ovarian Syndrome (PCOS) with chronic anovulation',
'Obesity (>21 pounds overweight carries 3x risk; >50 pounds carries significantly higher risk)',
'Diabetes mellitus',
'Treatment with tamoxifen for breast cancer',
'Irregular bleeding with unopposed estrogen therapy',
'Family history of endometrial or colorectal cancer (especially Lynch Syndrome / HNPCC)',
'Known carriers of HNPCC mismatch repair gene mutation',
'Nulliparity with infertility or failure to ovulate',
'Late menopause (after age 55)',
'Age >50 years',
'Atypical glandular cells on Pap smear',
]
for item in high_risk:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('Special Surveillance Indications', styles['h2']))
story.append(Paragraph(
'Women with Lynch syndrome (hereditary non-polyposis colorectal cancer / HNPCC) carry a lifetime risk of '
'developing endometrial cancer as high as 60%. Unlike sporadic cases diagnosed in the sixth-seventh '
'decades, mean age at diagnosis in Lynch syndrome is the fifth decade. International guidelines recommend '
'annual screening from age 35 years with transvaginal ultrasound AND endometrial biopsy.', styles['body']))
story.append(Paragraph(
'Lynch syndrome requires histologically confirmed colorectal cancer in three relatives, at least one '
'first-degree relative, two successive generations affected, and one case diagnosed before age 50.', styles['body']))
story.append(Paragraph('<i>Sources: Bailey & Love\'s Surgery 28e; Berek & Novak\'s Gynecology; Pfenninger & Fowler\'s Procedures</i>', styles['source']))
# ============================================================
# SECTION 4: CONTRAINDICATIONS
# ============================================================
story += make_section_header('4. CONTRAINDICATIONS', styles)
story.append(Paragraph('Absolute Contraindications', styles['h2']))
abs_contra = [
'Pregnancy (confirmed or suspected)',
'Bleeding diathesis or coagulopathy (uncorrected)',
]
for item in abs_contra:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('Relative Contraindications', styles['h2']))
rel_contra = [
'Use of anticoagulant therapy (warfarin, NOACs, heparin)',
'Active vaginal, cervical, uterine, or pelvic infection',
'Cervical stenosis (requires dilation prior to biopsy)',
'Morbid obesity (technical difficulty)',
'Significant pelvic relaxation with uterine prolapse',
]
for item in rel_contra:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph(
'<i>Note: Relative contraindications must be weighed against clinical necessity. Active infection should '
'ideally be treated before the procedure.</i>', styles['note']))
# ============================================================
# SECTION 5: EQUIPMENT
# ============================================================
story += make_section_header('5. EQUIPMENT AND INSTRUMENTS', styles)
story.append(Paragraph(
'A variety of instruments are available for EMB. The more commonly used devices include aspiration cannulas, '
'metal curettes, and brush samplers. Equipment common to all methods:', styles['body']))
story.append(Paragraph('Common Equipment', styles['h2']))
common_equip = [
'Large Graves vaginal speculum',
'Povidone-iodine solution (in non-allergic patients)',
'Cotton balls and ring forceps',
'Uterine sound',
'Single-tooth tenaculum',
'Endocervical curette without basket (e.g., Kevorkian curette)',
'Buffered formalin specimen containers with patient labels',
'Cervical dilators (kept available)',
'Sterile and non-sterile gloves',
'Scissors',
]
for item in common_equip:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('Types of Endometrial Samplers', styles['h2']))
sampler_data = [
['Device', 'Type', 'Key Features'],
['Pipelle', 'Disposable flexible plastic aspirator with internal plunger', 'Most popular; minimal discomfort; no tenaculum often needed; 95%+ adequacy'],
['Piper Curet / Endocell', 'Disposable flexible aspirator variants', 'Similar to Pipelle; widely available'],
['Novak Curette', 'Reusable stainless steel curette with syringe suction (20 mL)', 'Reliable; slightly more discomfort; good tissue yield'],
['Randall Curette', 'Reusable stainless steel curette', 'Used less commonly; adequate sampling'],
['Cannula Curette / Uterine Explora', 'Disposable aspirator with syringe suction', 'Provides good negative pressure; easy to use'],
['Tis-U-Trap', 'Disposable clear plastic tissue collection chamber with external pump', 'Direct tissue collection; easy visualization of sample; no transfer needed'],
['Vabra Aspirator', 'Stainless steel curette (2-4mm) with electric vacuum pump', 'Large sample; noisier; more uncomfortable; less commonly used now'],
['Tao Brush', 'Brush sampler', 'Cytological sample; less common'],
]
story.append(make_table(sampler_data[0:1], sampler_data[1:], col_widths=[3.5*cm, 6*cm, W-9.5*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph('<i>Source: Pfenninger & Fowler\'s Procedures for Primary Care, 3rd Edition</i>', styles['source']))
# ============================================================
# SECTION 6: PRE-PROCEDURE
# ============================================================
story += make_section_header('6. PRE-PROCEDURE PREPARATION AND PATIENT EDUCATION', styles)
story.append(Paragraph(
'Proper patient preparation is essential for a safe and successful endometrial biopsy. The following '
'pre-procedure steps should be followed:', styles['body']))
pre_proc = [
'Review previous Pap smear results before the procedure; obtain one if not recently done.',
'Confirm the patient is NOT pregnant (urine or serum hCG if appropriate).',
'Perform bimanual examination to assess uterine size and position (extreme anteversion or retroflexion increases perforation risk).',
'Explain the procedure, indications, risks, expected side effects, and post-procedure care to obtain informed consent.',
'Analgesic premedication: Ibuprofen 600-800 mg orally 30-60 minutes before the procedure (unless NSAID-allergic); other NSAIDs have similar efficacy.',
'Anxious patients: Diazepam 10 mg orally 1 hour before the procedure (patient must have a driver).',
'Antibiotic prophylaxis against bacterial endocarditis is NOT recommended (AHA guidelines) as the procedure is unlikely to cause significant bacteremia.',
'Timing: In reproductive-age women, ideally perform on day 22 or 23 of the menstrual cycle. Avoid biopsy during active menses.',
'Postmenopausal women: Can be scheduled any time; avoid during significant bleeding episodes to optimize sample size.',
'Prepare cervical dilators in case of cervical stenosis.',
]
for i, item in enumerate(pre_proc, 1):
story.append(Paragraph(f'{i}. {item}', styles['bullet']))
story.append(Paragraph('<i>Source: Pfenninger & Fowler\'s Procedures for Primary Care, 3rd Edition</i>', styles['source']))
# ============================================================
# SECTION 7: PROCEDURE
# ============================================================
story += make_section_header('7. PROCEDURE TECHNIQUE (STEP-BY-STEP)', styles)
story.append(Paragraph(
'The following steps apply to endometrial biopsy using aspiration devices (Pipelle-type). Confirm patient '
'is not pregnant before beginning.', styles['body']))
story.append(Paragraph('Standard Steps (Common to All Methods)', styles['h2']))
steps = [
'Place the patient in stirrups in dorsal lithotomy position. Perform bimanual examination to determine size and position of the uterus (non-sterile gloves).',
'Insert a large Graves speculum vaginally. Visualize the cervix; remove any mucus or debris.',
'Change into sterile gloves.',
'Prepare the cervix and vagina with povidone-iodine-soaked cotton balls using ring forceps.',
'Perform endocervical curettage if cervical neoplasm is suspected.',
'If using a device that requires a tenaculum: Apply a single-tooth tenaculum to the anterior or posterior cervical lip. Apply gentle counter-traction to straighten the cervical canal.',
'Using the uterine sound (or the sampler itself), gently advance through the cervical os and measure the depth of the uterine cavity. Normal range: 6.5-10 cm.',
'Insert the endometrial sampler gently through the cervical os to the uterine fundus. Note the depth measurement.',
]
for i, step in enumerate(steps, 1):
story.append(Paragraph(f'{i}. {step}', styles['bullet']))
story.append(Paragraph('Pipelle-Specific Technique', styles['h2']))
pipelle_steps = [
'With the Pipelle sheath at the fundus, retract the plunger fully to create suction.',
'Rotate the Pipelle 360 degrees while moving it in and out with a firm, circumferential motion to sample all endometrial surfaces.',
'Maintain suction throughout the sampling. Do not remove the tip from the uterine cavity while suction is active (to avoid losing sample).',
'After 4-5 passes, release the plunger and withdraw the Pipelle from the uterus.',
'Deposit the collected tissue into formalin-filled specimen container. Label appropriately.',
'Remove the tenaculum (if applied) and speculum.',
'Observe patient briefly; allow to recover from any cramping before discharge.',
]
for i, step in enumerate(pipelle_steps, 1):
story.append(Paragraph(f'{i}. {step}', styles['bullet']))
story.append(Paragraph('Tis-U-Trap / Vabra Aspirator Technique', styles['h2']))
vabra_steps = [
'Apply tenaculum. Sound the uterine cavity.',
'Attach the curette to the external suction pump.',
'Insert curette through the cervical os to the fundus.',
'Activate pump to 55 cm H2O.',
'Initiate suction by covering the suction hole with a finger.',
'Curette the entire endometrium with circumferential in-and-out movements.',
'Once sufficient tissue accumulates, halt suction and withdraw curette.',
'Cap the trap; add formalin; transport to pathology.',
]
for i, step in enumerate(vabra_steps, 1):
story.append(Paragraph(f'{i}. {step}', styles['bullet']))
story.append(Paragraph('Managing Cervical Stenosis', styles['h2']))
story.append(Paragraph(
'Cervical stenosis is encountered more commonly in postmenopausal and nulliparous women. Options include: '
'(1) paracervical block, (2) serial cervical dilation with dilators, (3) misoprostol cervical priming '
'(400 mcg vaginally or sublingually 3-4 hours pre-procedure), and (4) use of the smallest available '
'cannula. Significant stenosis may require formal D&C under anaesthesia.', styles['body']))
story.append(Paragraph('<i>Source: Pfenninger & Fowler\'s Procedures for Primary Care, 3rd Edition; Berek & Novak\'s Gynecology</i>', styles['source']))
# ============================================================
# SECTION 8: POST-PROCEDURE & COMPLICATIONS
# ============================================================
story += make_section_header('8. POST-PROCEDURE CARE AND COMPLICATIONS', styles)
story.append(Paragraph('Post-procedure Instructions', styles['h2']))
post_proc = [
'Mild cramping is expected for several hours; NSAIDs for pain relief.',
'Light spotting/bleeding for 1-2 days is normal.',
'Avoid intercourse, tampons, or douching for 24-48 hours.',
'Report heavy bleeding (soaking a pad per hour), fever, chills, or severe pelvic pain.',
'Follow-up for results in 1-2 weeks.',
]
for item in post_proc:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('Complications', styles['h2']))
comp_data = [
['Complication', 'Frequency', 'Management'],
['Uterine perforation', '1-2 per 1,000 procedures', 'Usually self-limiting; observation; laparoscopy if symptomatic'],
['Vasovagal syncope', 'Uncommon (up to 5%)', 'Trendelenburg position; atropine if bradycardic; IV access'],
['Infection / endometritis', 'Rare (<1%)', 'Oral antibiotics; IV antibiotics if severe'],
['Cervical laceration (tenaculum)', 'Rare', 'Direct pressure; silver nitrate; suture if needed'],
['Inadequate sample', '5-10% of attempts', 'Repeat biopsy; consider D&C or hysteroscopy'],
['Severe cramping/pain', 'Common (mild-moderate)', 'NSAIDs; paracervical block pre-procedure'],
['Hemorrhage', 'Very rare', 'Pressure; packing; surgical evaluation if persistent'],
]
story.append(make_table(comp_data[0:1], comp_data[1:], col_widths=[4.5*cm, 3.5*cm, W-8*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
'Complications following endometrial biopsy are exceedingly rare. The procedure is generally very well '
'tolerated in an office setting without anaesthesia. The American Heart Association does NOT recommend '
'antibiotic prophylaxis against bacterial endocarditis before EMB.', styles['body']))
# ============================================================
# SECTION 9: HISTOLOGICAL INTERPRETATION
# ============================================================
story += make_section_header('9. HISTOLOGICAL INTERPRETATION OF RESULTS', styles)
story.append(Paragraph(
'Pathological examination of EMB specimens can yield a range of findings from normal to frankly malignant. '
'Interpretation requires correlation with clinical history, hormonal status, and imaging findings.', styles['body']))
story.append(Paragraph('Normal Findings', styles['h2']))
normal_findings = [
'Proliferative endometrium: Consistent with first half of cycle; well-organized tubular glands, stromal mitoses',
'Secretory endometrium: Confirms ovulation; sub-nuclear vacuoles, stromal edema, predecidual change',
'Atrophic endometrium: Common in postmenopausal women; thin, inactive glands, scant stroma',
'Insufficient tissue: May be normal (atrophic) or may require repeat sampling if clinically indicated',
]
for item in normal_findings:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('Pathological Findings', styles['h2']))
path_data = [
['Finding', 'Description', 'Clinical Significance'],
['Disordered proliferative endometrium', 'Irregularly distributed glands, variable size, no secretory changes', 'Anovulatory cycles; increased cancer risk with persistence'],
['Simple hyperplasia (without atypia)', 'Increased gland-to-stroma ratio; cystically dilated glands; no cytologic atypia', 'Low malignant potential (~1%); responds to progestins'],
['Complex hyperplasia (without atypia)', 'Glandular crowding; irregular gland shapes; no cytologic atypia', 'Moderate risk (~3%); usually responds to medical therapy'],
['Simple atypical hyperplasia', 'Cytologic atypia in simple architecture', 'Significant malignant potential (~8%)'],
['Complex atypical hyperplasia / EIN', 'Crowded, irregular glands WITH cytologic atypia (nuclear enlargement, loss of polarity, prominent nucleoli)', '25-50% concurrent carcinoma; 30% progression risk'],
['Endometrial adenocarcinoma (G1)', 'Back-to-back glands, desmoplastic stroma; <5% solid growth', 'Well-differentiated; generally favorable prognosis'],
['Endometrial adenocarcinoma (G2)', 'Back-to-back glands; 6-50% solid growth', 'Moderately differentiated'],
['Endometrial adenocarcinoma (G3)', 'Predominantly solid growth (>50%)', 'Poorly differentiated; aggressive'],
['Endometrial polyp', 'Thick-walled vessels, irregular glands, fibrous stroma', 'Benign but may harbor carcinoma'],
['Endometritis', 'Plasma cells in stroma', 'Infectious or autoimmune etiology; treat with antibiotics'],
['Decidualized stroma', 'Large polygonal stromal cells', 'Pregnancy or progestin effect'],
]
story.append(make_table(path_data[0:1], path_data[1:], col_widths=[4*cm, 5.5*cm, W-9.5*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
'The WHO classification of endometrial hyperplasia uses four categories (simple, complex, simple atypical, '
'complex atypical). The newer WHO 2014 / EIN classification system uses three categories: '
'<b>Benign hyperplasia</b>, <b>EIN (Endometrial Intraepithelial Neoplasia)</b>, and '
'<b>Endometrial adenocarcinoma</b>. Many pathologists continue to use the original four-tier WHO system.', styles['body']))
story.append(Paragraph('<i>Source: Berek & Novak\'s Gynecology</i>', styles['source']))
# ============================================================
# SECTION 10: DISEASE STATES
# ============================================================
story += make_section_header('10. ENDOMETRIAL BIOPSY IN DISEASE STATES', styles)
# 10.1 Hyperplasia
story.append(Paragraph('10.1 Endometrial Hyperplasia', styles['h2']))
story.append(Paragraph(
'Endometrial hyperplasia results from unopposed estrogenic stimulation, leading to abnormal proliferation '
'of endometrial glands. Sources of excess estrogen include obesity (peripheral conversion of androgens to '
'estrone in adipose tissue), exogenous estrogen, PCOS, and estrogen-secreting ovarian tumors.', styles['body']))
story.append(Paragraph(
'<b>Risk of malignant progression:</b>', styles['body']))
prog_data = [
['Hyperplasia Type', 'Risk of Progression to Carcinoma'],
['Simple hyperplasia without atypia', '~1%'],
['Complex hyperplasia without atypia', '~3%'],
['Simple atypical hyperplasia', '~8%'],
['Complex atypical hyperplasia / EIN', '~29-30% (and 40-50% concurrent carcinoma at hysterectomy)'],
]
story.append(make_table(prog_data[0:1], prog_data[1:], col_widths=[9*cm, W-9*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph('<b>Management based on biopsy result:</b>', styles['body']))
mgmt = [
'Simple / Complex hyperplasia without atypia: Progestin therapy (megestrol acetate 40-160 mg/day or levonorgestrel-IUS); follow-up biopsy in 3-6 months.',
'EIN / Atypical hyperplasia desiring fertility: Progestin therapy with 3-monthly biopsy surveillance. Risk of recurrence approaches 50%.',
'EIN / Atypical hyperplasia NOT desiring fertility: Hysterectomy recommended (definitive treatment; rules out concurrent carcinoma).',
'Concurrent carcinoma found at hysterectomy in ~40-50% of EIN cases - surgical staging required.',
]
for item in mgmt:
story.append(Paragraph(f'• {item}', styles['bullet']))
# 10.2 Endometrial Carcinoma
story.append(Paragraph('10.2 Endometrial Carcinoma', styles['h2']))
story.append(Paragraph(
'Endometrial carcinoma is the most common gynecological malignancy in developed countries. Most patients '
'present with abnormal perimenopausal or postmenopausal uterine bleeding when the tumor is still confined '
'to the uterus. Office EMB is the accepted first diagnostic step.', styles['body']))
story.append(Paragraph('<b>Histological Types (FIGO Classification):</b>', styles['body']))
histo_types = [
'Endometrioid adenocarcinoma (~80%): Glands resembling normal endometrium; columnar cells; basally oriented nuclei; graded 1-3',
'Mucinous carcinoma: Abundant intracytoplasmic mucin; usually low-grade',
'Papillary serous carcinoma: Aggressive; not estrogen-driven; slit-like papillary architecture; high-grade nuclei',
'Clear cell carcinoma: Aggressive; glycogen-rich clear cells; hobnail cells; poor prognosis',
'Squamous carcinoma: Rare; pure squamous differentiation',
'Undifferentiated carcinoma: Absence of glandular architecture; aggressive',
'Mixed carcinoma: Two or more histological types',
]
for item in histo_types:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('<b>FIGO Grading System:</b>', styles['body']))
grade_data = [
['Grade', 'Criteria', 'Prognosis'],
['Grade 1', '<= 5% solid growth pattern', 'Favorable; usually confined to uterus at diagnosis'],
['Grade 2', '6-50% solid growth pattern', 'Intermediate'],
['Grade 3', '>50% solid growth pattern', 'Poor; more likely to have deep invasion/spread'],
]
story.append(make_table(grade_data[0:1], grade_data[1:], col_widths=[2.5*cm, 7*cm, W-9.5*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
'Criteria for diagnosing invasion on histology include: desmoplastic stroma, back-to-back glands without '
'intervening stroma ("back-to-back pattern"), extensive papillary pattern, and squamous epithelial '
'differentiation - when occupying at least one-half of a low-power field (>4.2 mm diameter).', styles['body']))
story.append(Paragraph(
'Note: A Pap smear is an unreliable diagnostic test for endometrial cancer - only 30-50% of patients '
'have abnormal Pap results. EMB or D&C is mandatory for diagnosis.', styles['warning']))
# 10.3 Endometrial Polyps
story.append(Paragraph('10.3 Endometrial Polyps', styles['h2']))
story.append(Paragraph(
'Endometrial polyps account for 2-12% of postmenopausal bleeding and are often difficult to identify '
'with standard office EMB or D&C. They are characterized histologically by thick-walled vessels, '
'irregular glands, and fibrous stroma. Hysteroscopy with targeted biopsy is more sensitive for polyp '
'detection. Unrecognized and untreated polyps may be a source of continued or recurrent bleeding, '
'potentially leading to unnecessary surgical intervention.', styles['body']))
# 10.4 AUB
story.append(Paragraph('10.4 Abnormal Uterine Bleeding (AUB)', styles['h2']))
story.append(Paragraph(
'Endometrial biopsy is a cornerstone in evaluating abnormal uterine bleeding. The initial workup '
'includes pelvic ultrasound and EMB. Key decision points:', styles['body']))
aub_points = [
'Endometrial thickness <4 mm (postmenopausal): May not require biopsy in the absence of additional bleeding episodes (Washington Manual)',
'Endometrial thickness >4-5 mm (postmenopausal): Biopsy required to exclude malignancy',
'Premenopausal women with AUB: Biopsy mandatory if >45 years, obese, not responding to medical therapy, or history of chronic anovulation',
'Perimenopausal women: Biopsy to exclude hyperplasia or cancer, especially with risk factors',
]
for item in aub_points:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('Causes of Postmenopausal Bleeding:', styles['h3']))
pmb_data = [
['Cause', 'Approximate Frequency'],
['Endometrial atrophy', '60-80%'],
['Estrogen replacement therapy effect', '15-25%'],
['Endometrial polyps', '2-12%'],
['Endometrial hyperplasia', '5-10%'],
['Endometrial cancer', '~10%'],
]
story.append(make_table(pmb_data[0:1], pmb_data[1:], col_widths=[10*cm, W-10*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
'Endometrial atrophy is the most common cause of postmenopausal bleeding (60-80%). These women have '
'typically been menopausal for about 10 years. EMB often yields insufficient tissue or only blood and '
'mucus, and bleeding usually ceases after the biopsy itself.', styles['body']))
# 10.5 Lynch Syndrome
story.append(Paragraph('10.5 Lynch Syndrome (HNPCC) Surveillance', styles['h2']))
story.append(Paragraph(
'Lynch syndrome / HNPCC confers a lifetime endometrial cancer risk of up to 60%. These cancers '
'appear in the fifth decade (vs. sixth-seventh decades in sporadic cases), but the 5-year survival '
'rate is similar to sporadic disease. Annual surveillance from age 35 with transvaginal ultrasound '
'AND endometrial biopsy is recommended by international guidelines. Surveillance is based on expert '
'opinion, as definitive evidence of effectiveness is still accumulating.', styles['body']))
# 10.6 Tamoxifen
story.append(Paragraph('10.6 Tamoxifen and Endometrial Monitoring', styles['h2']))
story.append(Paragraph(
'Tamoxifen (a selective estrogen receptor modulator used in breast cancer treatment) acts as a partial '
'estrogen agonist on the endometrium, increasing risk of endometrial polyps, hyperplasia, and carcinoma. '
'However, current evidence does NOT support routine screening with transvaginal ultrasonography or '
'endometrial biopsy in asymptomatic tamoxifen users. EMB is indicated when abnormal bleeding develops '
'in a tamoxifen-treated patient.', styles['body']))
# 10.7 Infertility
story.append(Paragraph('10.7 Infertility and Luteal Phase Defect', styles['h2']))
story.append(Paragraph(
'Dating of the endometrium by biopsy in the secretory phase has been used historically to diagnose '
'luteal phase deficiency (LPD) in infertile women. Secretory transformation (sub-nuclear vacuoles, '
'stromal edema, predecidual change) confirms ovulation has occurred. An "out-of-phase" biopsy (more '
'than 2 days behind expected date) suggests LPD. However, the clinical utility of this dating method '
'has been questioned in modern reproductive medicine, and it is no longer routinely recommended for '
'infertility assessment as a standalone test.', styles['body']))
story.append(Paragraph('<i>Sources: Berek & Novak\'s Gynecology; Bailey & Love\'s Surgery 28e; Washington Manual of Medical Therapeutics</i>', styles['source']))
# ============================================================
# SECTION 11: ADJUNCT INVESTIGATIONS
# ============================================================
story += make_section_header('11. ROLE OF ADJUNCT INVESTIGATIONS', styles)
story.append(Paragraph(
'Endometrial biopsy does not always stand alone. The following adjunct investigations complement '
'or, in some cases, may substitute for EMB:', styles['body']))
adjuncts = [
['Investigation', 'Role', 'When to Use'],
['Transvaginal Ultrasound (TVUS)', 'Measure endometrial stripe thickness; identify polyps/myomas; assess cavity', 'First-line assessment; endometrial thickness <4mm postmenopausal may avoid need for biopsy'],
['Sonohysterography (SHG)', 'Saline infusion into cavity highlights intracavitary lesions', 'Useful when polyps or myomas suspected; distinguishes focal vs. diffuse disease'],
['Hysteroscopy + biopsy', 'Direct visualization of endometrial cavity; targeted sampling', 'When EMB inadequate/cervical stenosis/recurrent bleeding after negative EMB; more accurate for polyps/myomas'],
['Dilation & Curettage (D&C)', 'Formal surgical sampling under anaesthesia', 'When office EMB fails; cervical stenosis; patient intolerance; heavy bleeding precluding adequate office sample'],
['MRI pelvis', 'Assess myometrial invasion depth; staging of known carcinoma', 'Pre-operative staging of endometrial cancer; not for initial diagnosis'],
['Pap smear / cervical cytology', 'Cervical cancer screening', 'Inadequate for endometrial cancer detection (only 30-50% sensitivity)'],
]
story.append(make_table(adjuncts[0:1], adjuncts[1:], col_widths=[4*cm, 5.5*cm, W-9.5*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
'An endometrial thickness of less than 5 mm in a postmenopausal woman on TVUS is generally consistent '
'with atrophy. However, this finding alone does not eliminate the need for endometrial biopsy in a '
'symptomatic patient with persistent or recurrent bleeding.', styles['body']))
# ============================================================
# SECTION 12: MANAGEMENT ALGORITHMS
# ============================================================
story += make_section_header('12. MANAGEMENT ALGORITHMS BASED ON BIOPSY RESULTS', styles)
story.append(Paragraph('Algorithm: Postmenopausal Bleeding', styles['h2']))
algo1 = [
'Postmenopausal bleeding',
' --> Transvaginal ultrasound',
' --> Endometrial thickness < 4 mm AND single episode: Observe / reassure (low risk)',
' --> Endometrial thickness > 4 mm OR recurrent bleeding: Proceed to ENDOMETRIAL BIOPSY',
' --> Biopsy: Normal / Atrophic: Reassure; treat cause',
' --> Biopsy: Insufficient: Repeat biopsy; consider hysteroscopy + D&C',
' --> Biopsy: Hyperplasia without atypia: Progestin therapy; repeat EMB in 3-6 months',
' --> Biopsy: EIN / Atypical hyperplasia: Hysterectomy (or progestin surveillance if unfit/desires fertility)',
' --> Biopsy: Endometrial carcinoma: Surgical staging (TAH+BSO +/- lymph node dissection)',
]
for line in algo1:
indent = line.count(' --> ') * 20
text = line.lstrip(' ->')
story.append(Paragraph(f'{" " * indent}{"-->" if "-->" in line else ""} {text}', styles['bullet']))
story.append(Paragraph('Algorithm: Premenopausal AUB', styles['h2']))
algo2 = [
'• Age < 45: Attempt medical therapy (NSAIDs, combined OCP, progestin) first',
'• Age < 45 + risk factors (obesity, PCOS, chronic anovulation, family history): Proceed to EMB',
'• Age >= 45 with AUB: EMB is MANDATORY regardless of medical therapy response',
'• Medical therapy failure at any age: Proceed to EMB',
'• Normal EMB + continuing symptoms: Sonohysterography or hysteroscopy to exclude polyp/myoma',
]
for item in algo2:
story.append(Paragraph(item, styles['bullet']))
story.append(Paragraph('Management of Endometrial Hyperplasia (Summary Table)', styles['h2']))
hyp_mgmt = [
['Diagnosis', 'Fertility Desired?', 'Management', 'Follow-up'],
['Simple/Complex hyperplasia (no atypia)', 'Yes or No', 'Progestin therapy (oral or levonorgestrel-IUS)', 'EMB in 3-6 months'],
['EIN / Atypical hyperplasia', 'Yes', 'High-dose progestin (megestrol 40-160 mg/day); counsel re: risk', 'EMB every 3 months; hysterectomy on completion of childbearing'],
['EIN / Atypical hyperplasia', 'No', 'Hysterectomy (definitive; excludes concurrent carcinoma)', 'Post-surgical histology review'],
['Endometrial cancer found', 'N/A', 'TAH + BSO + surgical staging', 'Oncology follow-up'],
]
story.append(make_table(hyp_mgmt[0:1], hyp_mgmt[1:], col_widths=[4.5*cm, 2.5*cm, 5*cm, W-12*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
'Important caveat: Approximately 40-50% of women with atypical hyperplasia or EIN have concurrent '
'endometrial carcinoma at hysterectomy. Progestin therapy in this setting must be considered temporary '
'and not a long-term solution. Periodic EMB or TVUS is advisable during monitoring.', styles['note']))
# ============================================================
# SECTION 13: CLINICAL PEARLS
# ============================================================
story += make_section_header('13. CLINICAL PEARLS AND SUMMARY', styles)
pearls = [
'EMB has 90-98% diagnostic accuracy vs. D&C or hysterectomy for endometrial malignancy.',
'Adequate tissue is obtained in >95% of cases with flexible aspiration devices (Pipelle).',
'EMB largely replaces D&C for outpatient endometrial evaluation - D&C was shown to miss >50% of endometrium in >50% of patients.',
'A Pap smear is INADEQUATE to screen for or diagnose endometrial cancer (sensitivity only 30-50%).',
'Endometrial atrophy is the single most common cause of postmenopausal bleeding (60-80%).',
'An endometrial thickness < 4 mm on TVUS in a postmenopausal woman with a single bleeding episode has a very low risk of carcinoma but does not eliminate the need for biopsy if bleeding recurs.',
'Tamoxifen increases endometrial cancer risk but routine screening is NOT recommended in asymptomatic users.',
'Lynch syndrome warrants annual EMB from age 35 - lifetime endometrial cancer risk up to 60%.',
'EIN / Complex atypical hyperplasia has 40-50% concurrent carcinoma rate at hysterectomy.',
'Premedication with ibuprofen 600-800 mg orally 30-60 min before procedure significantly reduces cramping.',
'Uterine perforation with EMB is rare: approximately 1-2 per 1,000 procedures.',
'Hysteroscopy is more accurate than EMB or D&C for identifying polyps and submucous myomas.',
'Recurrent bleeding after a negative EMB requires hysteroscopy + D&C to exclude missed focal pathology.',
'In reproductive-age women, EMB is ideally timed to day 22-23 of the menstrual cycle for luteal phase dating.',
]
for i, pearl in enumerate(pearls, 1):
story.append(Paragraph(f'{i}. {pearl}', styles['bullet']))
# ============================================================
# SECTION 14: REFERENCES
# ============================================================
story += make_section_header('14. REFERENCES AND SOURCES', styles)
refs = [
'Berek JS, Novak E. Berek & Novak\'s Gynecology, 15th Edition. Lippincott Williams & Wilkins. Chapters 10, 37.',
'Williams NS, O\'Connell PR, McCaskie AW. Bailey and Love\'s Short Practice of Surgery, 28th Edition. CRC Press; 2023. Chapter 87 (Gynaecology).',
'Pfenninger JL, Fowler GC. Pfenninger and Fowler\'s Procedures for Primary Care, 3rd Edition. Elsevier; 2011. Chapter 143 (Endometrial Biopsy).',
'Washington Manual of Medical Therapeutics. Diagnostic Testing for Abnormal Uterine Bleeding.',
'Textbook of Family Medicine, 9th Edition. Chapter on Gynecologic Problems (Abnormal Uterine Bleeding; Postmenopausal Bleeding).',
'Sabiston Textbook of Surgery: The Biological Basis of Modern Surgical Practice. Chapter on Gynaecologic Surgery.',
'World Health Organization (WHO) Classification of Tumours of Female Reproductive Organs, 2014.',
'FIGO Committee on Gynecologic Oncology. Revised FIGO staging for carcinoma of the endometrium. Int J Gynaecol Obstet 2009;105:103-104.',
'Kurman RJ, Kaminski PE, Norris HJ. The behavior of endometrial hyperplasia: A long-term study of "untreated" hyperplasia in 170 patients. Cancer 1985;56:403-412.',
'Dijkhuizen FP et al. The accuracy of endometrial sampling in the diagnosis of patients with endometrial carcinoma and hyperplasia. Cancer 2000;89:1765-1772.',
]
for i, ref in enumerate(refs, 1):
story.append(Paragraph(f'{i}. {ref}', styles['bullet']))
story.append(Spacer(1, 1*cm))
story.append(HRFlowable(width='100%', thickness=1, color=MED_BLUE))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(
'This document is for educational and clinical reference purposes. Always correlate findings with '
'the patient\'s complete clinical presentation, imaging, and multidisciplinary team input.',
styles['note']))
return story
def main():
doc = BaseDocTemplate(
OUTPUT_PATH,
pagesize=A4,
leftMargin=1.5*cm,
rightMargin=1.5*cm,
topMargin=1.6*cm,
bottomMargin=1.4*cm,
)
frame = Frame(
doc.leftMargin,
doc.bottomMargin,
doc.width,
doc.height,
id='main'
)
template = PageTemplate(id='main', frames=frame, onPage=header_footer)
doc.addPageTemplates([template])
styles = build_styles()
story = build_content(styles)
doc.build(story)
print(f"PDF generated: {OUTPUT_PATH}")
if __name__ == '__main__':
main()
cd /home/daytona/workspace/endometrial-biopsy && python3 generate_pdf.py 2>&1
~/endometrial-biopsy/generate_pdf.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/endometrial-biopsy/generate_pdf.py'
~/endometrial-biopsy/generate_pdf.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/endometrial-biopsy/generate_pdf.py'
cd /home/daytona/workspace/endometrial-biopsy && python3 generate_pdf.py 2>&1
ls -lh /home/daytona/workspace/endometrial-biopsy/
Endometrial Biopsy Health Disease
PDF Document · PDF
Effect of exogenous harmoneson the endometrium and make detailed pdf
~/endometrial-biopsy/generate_hormones_pdf.py
#!/usr/bin/env python3
"""Generate a comprehensive PDF on Effects of Exogenous Hormones on the Endometrium."""
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, PageBreak, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import BaseDocTemplate, Frame, PageTemplate
from reportlab.lib.colors import HexColor
OUTPUT_PATH = "/home/daytona/workspace/endometrial-biopsy/Exogenous_Hormones_Endometrium.pdf"
# ── Color palette ─────────────────────────────────────────────────────────────
DARK_TEAL = HexColor('#0d4f5c')
MED_TEAL = HexColor('#1a7a8a')
LIGHT_TEAL = HexColor('#d0ecf0')
ACCENT_GOLD = HexColor('#b5860d')
DARK_GRAY = HexColor('#2c2c2c')
MID_GRAY = HexColor('#555555')
LIGHT_GRAY = HexColor('#f5f5f5')
TABLE_HDR = HexColor('#0d4f5c')
TABLE_ALT = HexColor('#e8f5f8')
WARN_RED = HexColor('#a93226')
W_PAGE = A4[0] - 3.0*cm # usable content width
# ── Page header / footer ─────────────────────────────────────────────────────
def header_footer(canvas, doc):
canvas.saveState()
w, h = A4
canvas.setFillColor(DARK_TEAL)
canvas.rect(0, h - 1.2*cm, w, 1.2*cm, fill=1, stroke=0)
canvas.setFillColor(colors.white)
canvas.setFont('Helvetica-Bold', 9)
canvas.drawString(1.5*cm, h - 0.8*cm, 'EFFECTS OF EXOGENOUS HORMONES ON THE ENDOMETRIUM')
canvas.setFont('Helvetica', 8)
canvas.drawRightString(w - 1.5*cm, h - 0.8*cm, 'Comprehensive Clinical & Pharmacological Review')
# footer
canvas.setFillColor(DARK_TEAL)
canvas.rect(0, 0, w, 0.9*cm, fill=1, stroke=0)
canvas.setFillColor(colors.white)
canvas.setFont('Helvetica', 8)
canvas.drawString(1.5*cm, 0.3*cm,
"Goodman & Gilman's | Berek & Novak's Gynecology | Robbins Pathology | Harrison's | Ganong's Physiology")
canvas.drawRightString(w - 1.5*cm, 0.3*cm, f'Page {doc.page}')
canvas.restoreState()
# ── Styles ───────────────────────────────────────────────────────────────────
def S():
s = {}
s['title'] = ParagraphStyle('title', fontName='Helvetica-Bold', fontSize=26,
textColor=colors.white, alignment=TA_CENTER, spaceAfter=4)
s['subtitle'] = ParagraphStyle('subtitle', fontName='Helvetica', fontSize=13,
textColor=HexColor('#cce8ed'), alignment=TA_CENTER, spaceAfter=6)
s['h1'] = ParagraphStyle('h1', fontName='Helvetica-Bold', fontSize=14,
textColor=colors.white, spaceAfter=6, spaceBefore=12,
backColor=DARK_TEAL,
borderPadding=(6,12,6,12))
s['h2'] = ParagraphStyle('h2', fontName='Helvetica-Bold', fontSize=11.5,
textColor=DARK_TEAL, spaceAfter=4, spaceBefore=9)
s['h3'] = ParagraphStyle('h3', fontName='Helvetica-Bold', fontSize=10.5,
textColor=ACCENT_GOLD, spaceAfter=3, spaceBefore=6)
s['body'] = ParagraphStyle('body', fontName='Helvetica', fontSize=10,
textColor=DARK_GRAY, leading=15, spaceAfter=5,
alignment=TA_JUSTIFY)
s['bullet'] = ParagraphStyle('bullet', fontName='Helvetica', fontSize=10,
textColor=DARK_GRAY, leading=14, spaceAfter=3,
leftIndent=16, bulletIndent=4)
s['sub'] = ParagraphStyle('sub', fontName='Helvetica', fontSize=9.5,
textColor=MID_GRAY, leading=13, spaceAfter=2,
leftIndent=30)
s['note'] = ParagraphStyle('note', fontName='Helvetica-Oblique', fontSize=9,
textColor=MID_GRAY, leading=13, spaceAfter=4,
leftIndent=8, rightIndent=8)
s['source'] = ParagraphStyle('source', fontName='Helvetica-Oblique', fontSize=8,
textColor=MED_TEAL, spaceAfter=5)
s['warn'] = ParagraphStyle('warn', fontName='Helvetica-Bold', fontSize=10,
textColor=WARN_RED, leading=14, spaceAfter=4)
s['toc'] = ParagraphStyle('toc', fontName='Helvetica', fontSize=10,
textColor=DARK_GRAY, leading=17, spaceAfter=1)
s['box'] = ParagraphStyle('box', fontName='Helvetica', fontSize=9.5,
textColor=DARK_GRAY, leading=14, spaceAfter=3,
leftIndent=10, rightIndent=10)
return s
def sec(text, styles):
return [Spacer(1, 0.2*cm),
Paragraph(f' {text}', styles['h1']),
Spacer(1, 0.15*cm)]
def cp(text, bold=False, color=None, size=9):
"""Cell paragraph."""
font = 'Helvetica-Bold' if bold else 'Helvetica'
col = color if color else DARK_GRAY
style = ParagraphStyle('cell', fontName=font, fontSize=size,
textColor=col, leading=size*1.45, spaceAfter=0)
return Paragraph(str(text), style)
def tbl(headers, rows, widths=None):
data = [[cp(h, bold=True, color=colors.white, size=9.5) for h in headers]] + \
[[cp(c) for c in row] for row in rows]
t = Table(data, colWidths=widths)
t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), TABLE_HDR),
('ROWBACKGROUNDS',(0,1), (-1,-1), [colors.white, TABLE_ALT]),
('GRID', (0,0), (-1,-1), 0.5, HexColor('#b0c8cc')),
('VALIGN', (0,0), (-1,-1), 'TOP'),
('ALIGN', (0,0), (-1,-1), 'LEFT'),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 7),
('RIGHTPADDING', (0,0), (-1,-1), 7),
]))
return t
def box_table(content_para, bg=LIGHT_TEAL):
"""A shaded highlight box."""
t = Table([[content_para]], colWidths=[W_PAGE])
t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), bg),
('LEFTPADDING', (0,0), (-1,-1), 12),
('RIGHTPADDING', (0,0), (-1,-1), 12),
('TOPPADDING', (0,0), (-1,-1), 8),
('BOTTOMPADDING',(0,0), (-1,-1), 8),
('BOX', (0,0), (-1,-1), 1, MED_TEAL),
]))
return t
# ── Content ───────────────────────────────────────────────────────────────────
def content(styles):
story = []
# ── COVER ────────────────────────────────────────────────────────────────
story.append(Spacer(1, 3*cm))
cov = Table([
[Paragraph('EFFECTS OF EXOGENOUS HORMONES', styles['title'])],
[Paragraph('on the Endometrium', styles['subtitle'])],
[Paragraph('Pharmacology · Histopathology · Clinical Implications · Management', styles['subtitle'])],
], colWidths=[W_PAGE])
cov.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), DARK_TEAL),
('TOPPADDING', (0,0), (-1,-1), 10),
('BOTTOMPADDING',(0,0), (-1,-1), 10),
('LEFTPADDING', (0,0), (-1,-1), 20),
('RIGHTPADDING', (0,0), (-1,-1), 20),
]))
story.append(cov)
story.append(Spacer(1, 1.2*cm))
story.append(HRFlowable(width='100%', thickness=2, color=MED_TEAL))
story.append(Spacer(1, 0.5*cm))
def ci(lbl, val):
return [Paragraph(lbl, ParagraphStyle('cl', fontName='Helvetica-Bold', fontSize=10,
textColor=DARK_TEAL, leading=14)),
Paragraph(val, ParagraphStyle('cv', fontName='Helvetica', fontSize=10,
textColor=DARK_GRAY, leading=14))]
info_t = Table([
ci('Topics Covered', 'Estrogen therapy · Progestins · Combined HRT · OCPs · SERMs (Tamoxifen/Raloxifene) · LNG-IUS · GnRH analogues · Androgens'),
ci('Sources', "Goodman & Gilman's Pharmacology | Berek & Novak's Gynecology | Robbins & Kumar Pathology | Harrison's 22e | Ganong's Physiology | Lippincott Pharmacology"),
ci('Level', 'Advanced Clinical & Pharmacological Reference'),
ci('Date', 'July 2026'),
], colWidths=[3.2*cm, W_PAGE - 3.2*cm])
info_t.setStyle(TableStyle([
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING',(0,0), (-1,-1), 5),
('LINEBELOW', (0,0), (-1,-3), 0.5, HexColor('#cccccc')),
]))
story.append(info_t)
story.append(PageBreak())
# ── TABLE OF CONTENTS ────────────────────────────────────────────────────
story += sec('TABLE OF CONTENTS', styles)
toc = [
('1.', 'Introduction: The Endometrium and Hormonal Sensitivity'),
('2.', 'Physiology Recap: Normal Endometrial Response to Ovarian Hormones'),
('3.', 'Exogenous Estrogens'),
(' 3.1', 'Types and Routes of Administration'),
(' 3.2', 'Histological Effects on Endometrium'),
(' 3.3', 'Clinical Consequences: Hyperplasia and Carcinoma Risk'),
('4.', 'Exogenous Progestogens (Progestins)'),
(' 4.1', 'Mechanism of Action on Endometrium'),
(' 4.2', 'Histological Effects'),
(' 4.3', 'Therapeutic Uses and Endometrial Protection'),
('5.', 'Combined Hormone Replacement Therapy (HRT)'),
(' 5.1', 'Cyclic HRT Regimens'),
(' 5.2', 'Continuous Combined HRT'),
(' 5.3', 'Endometrial Safety of HRT Regimens'),
('6.', 'Combined Oral Contraceptive Pills (COCPs)'),
(' 6.1', 'Effects on Endometrial Architecture'),
(' 6.2', 'Protective Effect Against Endometrial Cancer'),
('7.', 'Progestin-Only Contraceptives'),
(' 7.1', 'Mini-Pill and Implants'),
(' 7.2', 'Depot MPA (DMPA)'),
(' 7.3', 'Levonorgestrel-Releasing IUD (LNG-IUS)'),
('8.', 'Selective Estrogen Receptor Modulators (SERMs)'),
(' 8.1', 'Tamoxifen: Endometrial Agonist Effects'),
(' 8.2', 'Raloxifene: Neutral Endometrial Profile'),
(' 8.3', 'Bazedoxifene'),
('9.', 'GnRH Analogues'),
('10.', 'Androgens and Danazol'),
('11.', 'Mifepristone (RU-486): Anti-Progestin Effects'),
('12.', 'Insulin and Metabolic Hormones: Indirect Endometrial Effects'),
('13.', 'Endometrial Pathology Classification in the Context of Hormones'),
('14.', 'Endometrial Monitoring in Hormone Users: Clinical Guidelines'),
('15.', 'Summary Comparison Table'),
('16.', 'References and Sources'),
]
for num, title in toc:
story.append(Paragraph(f'<b>{num}</b> {title}', styles['toc']))
story.append(PageBreak())
# ── SECTION 1 ─────────────────────────────────────────────────────────────
story += sec('1. INTRODUCTION: THE ENDOMETRIUM AND HORMONAL SENSITIVITY', styles)
story.append(Paragraph(
'The endometrium is one of the most hormonally responsive tissues in the human body. It expresses '
'high concentrations of both estrogen receptors (ER-alpha and ER-beta) and progesterone receptors '
'(PR-A and PR-B), making it exquisitely sensitive to any hormonal stimulus - whether endogenous '
'or exogenous. This sensitivity is the biological basis for its cyclical regeneration and shedding, '
'and also for its vulnerability to pathological transformation when exposed to prolonged or '
'imbalanced hormonal signals.', styles['body']))
story.append(Paragraph(
'Exogenous hormones - whether administered for contraception, menopausal hormone therapy, '
'cancer treatment, or other indications - exert profound and clinically significant effects on '
'endometrial structure, function, and oncogenic risk. Understanding these effects is essential '
'for safe prescribing, appropriate monitoring, and timely intervention when pathological changes develop.', styles['body']))
story.append(Paragraph(
'There is strong evidence that lifelong cumulative exposure to estrogen stimulation, particularly '
'if unopposed by progesterone, increases the risk of developing endometrial cancer. Conversely, '
'progestins exert a protective effect, inducing secretory transformation and ultimately '
'decidualization and atrophy of the endometrium.', styles['body']))
story.append(Paragraph('<i>Source: Robbins & Kumar Basic Pathology; Ganong\'s Review of Medical Physiology</i>', styles['source']))
# ── SECTION 2 ─────────────────────────────────────────────────────────────
story += sec('2. PHYSIOLOGY RECAP: NORMAL ENDOMETRIAL RESPONSE TO OVARIAN HORMONES', styles)
story.append(Paragraph(
'To understand the effects of exogenous hormones, a recap of normal endometrial physiology is essential:', styles['body']))
story.append(Paragraph('Estrogen Phase (Follicular / Proliferative - Days 1-14)', styles['h2']))
story.append(Paragraph(
'Rising endogenous estradiol from developing ovarian follicles drives endometrial proliferation. '
'Glands elongate and become tortuous, stroma becomes edematous, and mitoses increase throughout. '
'The endometrium thickens from 1-2 mm to 10-14 mm by the time of ovulation. Estrogen also '
'upregulates its own receptors and progesterone receptors, priming the endometrium for the luteal phase.', styles['body']))
story.append(Paragraph('Progesterone Phase (Luteal / Secretory - Days 15-28)', styles['h2']))
story.append(Paragraph(
'After ovulation, progesterone from the corpus luteum induces secretory transformation: '
'sub-nuclear glycogen vacuoles appear in gland cells, luminal secretions develop, stromal edema '
'increases, and predecidual change occurs around spiral arteries. Progesterone also '
'<b>downregulates</b> estrogen receptors, limiting further proliferation - this is the key '
'protective mechanism that exogenous progestins aim to replicate.', styles['body']))
story.append(Paragraph('Key Principle', styles['h3']))
story.append(box_table(Paragraph(
'The normal endometrium is protected from hyperplasia by the monthly opposition of progesterone. '
'Any state of unopposed estrogen - whether from exogenous estrogen alone, anovulation, '
'or inadequate progestin exposure - creates a risk for endometrial hyperplasia and carcinoma.', styles['box'])))
story.append(Spacer(1, 0.2*cm))
# ── SECTION 3 ─────────────────────────────────────────────────────────────
story += sec('3. EXOGENOUS ESTROGENS', styles)
story.append(Paragraph('3.1 Types and Routes of Administration', styles['h2']))
est_data = [
['Estrogen Type', 'Common Preparations', 'Route'],
['Conjugated equine estrogens (CEE)', 'Premarin', 'Oral'],
['Estradiol (17β-estradiol)', 'Estrace, Climara, Vivelle', 'Oral, transdermal patch, gel, spray'],
['Estrone', 'Ogen', 'Oral'],
['Estriol', 'Used in Europe', 'Oral, vaginal'],
['Ethinyl estradiol (synthetic)', 'Component of COCPs', 'Oral'],
['Mestranol (prodrug of EE)', 'Historical OCPs', 'Oral (converted to ethinyl estradiol)'],
]
story.append(tbl(est_data[0], est_data[1:], widths=[5*cm, 5*cm, W_PAGE-10*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
'Oral estrogens expose the liver to higher first-pass concentrations, increasing SHBG, '
'binding globulins, angiotensinogen, and potentially bile cholesterol. Transdermal estrogen '
'causes smaller beneficial changes in lipid profiles (~50% of those seen with the oral route) '
'but achieves adequate systemic levels with lower hepatic exposure.', styles['body']))
story.append(Paragraph('<i>Source: Goodman & Gilman\'s Pharmacological Basis of Therapeutics</i>', styles['source']))
story.append(Paragraph('3.2 Histological Effects on the Endometrium', styles['h2']))
story.append(Paragraph(
'When estrogen is administered alone (without progestogen opposition), the following progressive '
'histological sequence occurs in the endometrium:', styles['body']))
hist_seq = [
('Short-term / low dose', 'Proliferative endometrium: glandular and stromal proliferation, increased mitoses. Clinically similar to normal late-follicular phase endometrium.'),
('Prolonged / moderate dose', 'Disordered proliferative endometrium: irregular gland distribution, variable gland sizes, patchy breakdown. Estrogen withdrawal or breakthrough bleeding may occur.'),
('Prolonged / sustained', 'Simple endometrial hyperplasia: increased gland-to-stroma ratio, cystically dilated glands ("Swiss cheese" pattern). No cytologic atypia.'),
('Chronic high-dose unopposed', 'Complex hyperplasia: marked glandular crowding, irregular shapes, back-to-back architecture without atypia. ~3% malignant potential.'),
('Chronic + additional factors', 'Atypical hyperplasia / EIN: cytologic atypia added (nuclear enlargement, loss of polarity, prominent nucleoli). ~29-30% malignant potential.'),
('Sustained carcinogenic exposure', 'Type I Endometrial Adenocarcinoma (endometrioid type): estrogen-dependent; typically G1; favourable prognosis.'),
]
for phase, desc in hist_seq:
story.append(Paragraph(f'<b>{phase}:</b> {desc}', styles['bullet']))
story.append(Paragraph(
'Chronic treatment with estrogens causes the endometrium to hypertrophy. When estrogen therapy '
'is discontinued, sloughing takes place with withdrawal bleeding. Breakthrough bleeding may '
'occur during prolonged treatment.', styles['body']))
story.append(Paragraph('<i>Source: Ganong\'s Review of Medical Physiology, 26th Ed.</i>', styles['source']))
story.append(Paragraph('3.3 Clinical Consequences: Hyperplasia and Carcinoma Risk', styles['h2']))
story.append(Paragraph(
'Menopausal estrogen therapy without progestins increases the risk of endometrial cancer '
'<b>four- to eightfold</b>. This risk increases with higher doses and more prolonged use. '
'The risk can be reduced to essentially baseline levels by the addition of at least 10 days of '
'progestin treatment per cycle.', styles['body']))
story.append(Paragraph(
'In the Women\'s Health Initiative (WHI) trial, approximately 34% of women assigned to '
'unopposed estrogen for 3 years developed atypical endometrial hyperplasia, compared with '
'only 1% of women assigned to placebo. Use of a progestogen, which opposes the effects of '
'estrogen on the endometrium, is essential to protect the endometrium.', styles['body']))
story.append(Paragraph(
'Type I endometrial carcinoma (accounting for 75-85% of all cases) occurs in younger, '
'perimenopausal women with a history of exposure to unopposed estrogen, either endogenous '
'or exogenous. These tumors begin as hyperplastic endometrium and progress to carcinoma. '
'They tend to be better differentiated (G1) and carry a more favorable prognosis than '
'estrogen-independent (Type II) carcinomas.', styles['body']))
story.append(Paragraph('<i>Source: Berek & Novak\'s Gynecology; Harrison\'s Principles of Internal Medicine 22e; Robbins Pathology</i>', styles['source']))
# ── SECTION 4 ─────────────────────────────────────────────────────────────
story += sec('4. EXOGENOUS PROGESTOGENS (PROGESTINS)', styles)
story.append(Paragraph('4.1 Mechanism of Action on the Endometrium', styles['h2']))
story.append(Paragraph(
'Progestogens act on progesterone receptors (PR-A and PR-B) in the endometrial glands and '
'stroma to produce the following key effects:', styles['body']))
prog_mech = [
'Downregulation of estrogen receptors, blunting estrogenic proliferative drive',
'Induction of 17β-hydroxysteroid dehydrogenase, which converts estradiol (E2) to the weaker estrone (E1)',
'Induction of secretory transformation of glandular epithelium',
'Promotion of stromal decidualization',
'Induction of endometrial atrophy with prolonged use',
'Reduction of glandular mitotic activity',
'Upregulation of apoptotic pathways in endometrial cells',
]
for item in prog_mech:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('4.2 Histological Effects', styles['h2']))
prog_hist = [
['Effect', 'Histological Appearance', 'Clinical Meaning'],
['Secretory transformation', 'Sub-nuclear vacuoles, luminal secretions, stromal edema', 'Confirms progestin activity; normal appearance'],
['Decidualization', 'Large polygonal stromal cells with pale cytoplasm and central nuclei', 'Strong progestin effect; protects against hyperplasia'],
['Endometrial atrophy', 'Thin, inactive, tubular glands; scant stroma; no mitoses', 'Prolonged progestin use; leads to amenorrhea'],
['Stromal pseudodecidualization', 'Decidua-like change without true pregnancy changes', 'Seen with depot MPA, implants, LNG-IUS'],
['Glandular exhaustion', 'Small, inactive glands with dilated lumens; scanty secretions', 'Common with norethisterone, MPA high-dose'],
]
story.append(tbl(prog_hist[0], prog_hist[1:], widths=[3.5*cm, 5*cm, W_PAGE - 8.5*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph('4.3 Therapeutic Uses and Endometrial Protection', styles['h2']))
prog_uses = [
'Prevention of endometrial hyperplasia in women receiving estrogen replacement therapy (HRT)',
'Treatment of simple and complex endometrial hyperplasia (without atypia): oral MPA 10 mg/day or LNG-IUS',
'Treatment of EIN/atypical hyperplasia in women wishing to preserve fertility: megestrol acetate 40-160 mg/day with 3-monthly biopsy surveillance',
'Treatment of well-differentiated stage I endometrial carcinoma in poor surgical candidates',
'Prevention of unscheduled endometrial bleeding in HRT users',
'Management of abnormal uterine bleeding in anovulatory cycles',
'Medical preparation of endometrium before surgical procedures',
]
for item in prog_uses:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('<i>Source: Berek & Novak\'s Gynecology; Goodman & Gilman\'s</i>', styles['source']))
# ── SECTION 5 ─────────────────────────────────────────────────────────────
story += sec('5. COMBINED HORMONE REPLACEMENT THERAPY (HRT)', styles)
story.append(Paragraph(
'Following epidemiological studies in the 1970s-80s showing that unopposed estrogen therapy '
'dramatically increased endometrial carcinoma risk, combined HRT (estrogen + progestogen) '
'became standard practice for postmenopausal women with an intact uterus.', styles['body']))
story.append(Paragraph('5.1 Cyclic (Sequential) HRT Regimens', styles['h2']))
story.append(Paragraph(
'In cyclic regimens, estrogen is given throughout the cycle and a progestogen is added '
'for 12-14 days per cycle, followed by a hormone-free interval during which withdrawal '
'bleeding occurs. A classic regimen:', styles['body']))
cyc_steps = [
'Days 1-25: Estrogen (e.g., conjugated equine estrogen or estradiol)',
'Days 12-25 (or last 12-14 days): Progestogen added (e.g., MPA 10 mg/day)',
'Days 26-30 (approx.): Hormone-free interval - withdrawal bleeding occurs from endometrial shedding',
]
for step in cyc_steps:
story.append(Paragraph(f'• {step}', styles['bullet']))
story.append(Paragraph(
'Cyclic regimens produce predictable monthly withdrawal bleeding. The endometrium '
'undergoes proliferative transformation during the estrogen phase, secretory transformation '
'during the combined phase, and shedding during the hormone-free interval.', styles['body']))
story.append(Paragraph('5.2 Continuous Combined HRT', styles['h2']))
story.append(Paragraph(
'In continuous combined regimens, both estrogen and progestogen are administered daily '
'without interruption. This does not lead to regular endometrial shedding but may cause '
'intermittent spotting or breakthrough bleeding, especially in the first year of use. '
'With prolonged use, the endometrium becomes atrophic and amenorrhea is achieved. '
'This is the preferred regimen for women who are at least 1-2 years postmenopausal.', styles['body']))
story.append(Paragraph(
'Common continuous combined formulations include: conjugated estrogens + MPA (Prempro), '
'ethinyl estradiol + norethindrone acetate, estradiol + norgestimate, and estradiol + drospirenone.', styles['body']))
story.append(Paragraph('5.3 Endometrial Safety of HRT Regimens', styles['h2']))
hrt_safety = [
['Regimen', 'Endometrial Risk', 'Monitoring'],
['Unopposed estrogen (intact uterus)', 'VERY HIGH: 4-8x increased endometrial cancer risk', 'CONTRAINDICATED; EMB required if given'],
['Cyclic estrogen + progestogen (10-14 days/cycle)', 'Near baseline risk', 'EMB for any unscheduled bleeding'],
['Continuous combined estrogen + progestogen', 'Baseline or slightly reduced risk', 'EMB if persistent irregular bleeding after 6 months'],
['Estrogen alone (post-hysterectomy)', 'No endometrial concern', 'No endometrial monitoring needed'],
['Progestogen every 3 months', 'Long-term endometrial safety not firmly established', 'Regular EMB recommended'],
['Tibolone', 'Tissue-selective; neutral endometrial effect', 'Monitoring if bleeding occurs'],
['CEE + bazedoxifene (SERM)', 'Neutral endometrial effect (bazedoxifene opposes estrogen in uterus)', 'No progestin needed; monitor for bleeding'],
]
story.append(tbl(hrt_safety[0], hrt_safety[1:], widths=[4*cm, 5.5*cm, W_PAGE-9.5*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
'Regardless of the specific agent or regimen, menopausal hormone therapy with estrogens should '
'use the <b>lowest dose and shortest duration</b> necessary to achieve therapeutic goals, '
're-evaluated regularly.', styles['body']))
story.append(Paragraph('<i>Source: Goodman & Gilman\'s Pharmacological Basis of Therapeutics; Harrison\'s 22e; Berek & Novak\'s</i>', styles['source']))
# ── SECTION 6 ─────────────────────────────────────────────────────────────
story += sec('6. COMBINED ORAL CONTRACEPTIVE PILLS (COCPs)', styles)
story.append(Paragraph('6.1 Effects on Endometrial Architecture', styles['h2']))
story.append(Paragraph(
'Combined oral contraceptive pills contain both an estrogen (typically ethinyl estradiol) '
'and a progestogen. Their primary mechanism of action is suppression of ovulation via '
'inhibition of GnRH pulsatility, FSH suppression, and blunting of the LH surge. However, '
'they also produce significant endometrial changes:', styles['body']))
cocp_effects = [
'Endometrial stromal decidualization and pseudodecidualization due to progestin dominance',
'Glandular suppression: sparse, tubular, inactive glands; reduced secretory activity',
'Thinning of the endometrium overall (progestin effect dominates estrogen)',
'Reduced endometrial vascularity and altered prostaglandin synthesis (contributes to reduced menstrual flow)',
'The endometrium becomes non-receptive to implantation ("hostile endometrium") - this is a backup mechanism if ovulation is not suppressed',
'With triphasic preparations, the endometrium mimics some aspects of cyclic variation, reducing breakthrough bleeding',
]
for item in cocp_effects:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('6.2 Protective Effect Against Endometrial Cancer', styles['h2']))
story.append(Paragraph(
'Combined OCPs confer significant protection against endometrial cancer. Epidemiological studies '
'consistently show a <b>40-50% reduction</b> in endometrial cancer risk in ever-users of '
'combined OCPs compared with non-users. The protection:', styles['body']))
ocp_prot = [
'Increases with duration of use (approximately 20% risk reduction per 5 years of use)',
'Persists for at least 20 years after cessation',
'Is attributed to the progestogen component suppressing estrogen-driven proliferation',
'Is observed with both monophasic and multiphasic preparations',
'Benefits extend to women with PCOS who are at elevated endometrial cancer risk',
]
for item in ocp_prot:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph(
'There is NOT a widespread association between combined OCP use and endometrial cancer '
'(in contrast to earlier concerns). The sequential oral contraceptives of the 1960s '
'(estrogen-dominant phase followed by estrogen+progestogen phase) DID cause endometrial '
'changes and have been removed from the market.', styles['body']))
story.append(Paragraph('<i>Source: Goodman & Gilman\'s; Berek & Novak\'s Gynecology</i>', styles['source']))
# ── SECTION 7 ─────────────────────────────────────────────────────────────
story += sec('7. PROGESTIN-ONLY CONTRACEPTIVES', styles)
story.append(Paragraph('7.1 Mini-Pill and Subdermal Implants', styles['h2']))
story.append(Paragraph(
'Progestin-only pills (POP, "mini-pill") and levonorgestrel subdermal implants block ovulation '
'in only 60-80% of cycles. Their effectiveness is attributed largely to:', styles['body']))
pop_effects = [
'Endometrial alterations that impair implantation (progestin-induced stromal decidualization, glandular suppression)',
'Thickening and increased viscosity of cervical mucus (reduces sperm penetration)',
'Altered fallopian tube motility',
]
for item in pop_effects:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph(
'Irregular, unpredictable bleeding is the most significant side effect due to '
'endometrial instability caused by the progestin-driven suppression without complete '
'ovarian suppression and variable estrogen levels.', styles['body']))
story.append(Paragraph('7.2 Depot Medroxyprogesterone Acetate (DMPA - Depo-Provera)', styles['h2']))
story.append(Paragraph(
'DMPA (150 mg IM every 3 months) achieves plasma MPA levels high enough to prevent ovulation '
'in virtually all patients by decreasing GnRH pulse frequency. Its effects on the endometrium include:', styles['body']))
dmpa_eff = [
'Initial irregular or unpredictable spotting/bleeding (first 3-6 months) due to atrophic, fragile endometrium',
'Progressive endometrial atrophy with continued use - ultimately leading to amenorrhea in ~50% of users at 1 year and ~80% at 2 years',
'Histology: sparse, inactive glands; pseudodecidual stromal change; thin endometrium',
'The atrophic state is reversible on discontinuation, though return of fertility may be delayed 6-12 months',
'DMPA protects against endometrial cancer by maintaining endometrial atrophy',
]
for item in dmpa_eff:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('7.3 Levonorgestrel-Releasing Intrauterine System (LNG-IUS / Mirena)', styles['h2']))
story.append(Paragraph(
'The LNG-IUS releases levonorgestrel locally at 20 mcg/day (Mirena), producing high local '
'endometrial progestin concentrations with low systemic absorption. Endometrial effects:', styles['body']))
lng_eff = [
'Profound endometrial atrophy: glands become narrow, inactive, and atrophic; stroma undergoes decidualization',
'Suppression of endometrial proliferation and vascularity - leads to reduction of menstrual blood loss by 80-90%',
'Amenorrhea in 20-50% of users within 1 year',
'Effective treatment for endometrial hyperplasia (without atypia): comparable response rates to oral progestins with better compliance',
'Off-label use in women on estrogen HRT as the progestogen component to protect the endometrium',
'The endometrium does NOT undergo monthly shedding; the progestin effect prevents full proliferative transformation',
'Contraceptive mechanism: primarily endometrial (impaired implantation) + cervical mucus thickening',
]
for item in lng_eff:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('<i>Source: Goodman & Gilman\'s; Berek & Novak\'s Gynecology; Pfenninger & Fowler\'s</i>', styles['source']))
# ── SECTION 8 ─────────────────────────────────────────────────────────────
story += sec('8. SELECTIVE ESTROGEN RECEPTOR MODULATORS (SERMs)', styles)
story.append(Paragraph(
'SERMs are synthetic ligands that bind to estrogen receptors (ER) and exert tissue-selective '
'agonist or antagonist effects depending on the tissue distribution of ER subtypes and the '
'relative abundance of transcriptional coactivators and corepressors. This tissue selectivity '
'results in different effects in the breast, bone, liver, and endometrium.', styles['body']))
story.append(Paragraph('8.1 Tamoxifen: Endometrial Agonist Effects', styles['h2']))
story.append(Paragraph(
'Tamoxifen is a partial estrogen agonist/antagonist - a competitive inhibitor of estrogen '
'binding to ER. It acts as an <b>ER antagonist in breast tissue</b> (inhibits breast cancer '
'cell proliferation) but as an <b>ER partial agonist in the endometrium</b>.', styles['body']))
story.append(Paragraph('Mechanism in endometrium:', styles['h3']))
story.append(Paragraph(
'When tamoxifen (or its active metabolite 4-hydroxytamoxifen) binds to ER, it causes a '
'conformational change in helix 12 of the ligand-binding domain. Unlike pure agonists '
'that allow coactivator docking, tamoxifen allows partial coactivator binding in some '
'tissues - particularly in the endometrium where coactivator concentrations favor '
'partial agonist activity, resulting in pro-proliferative signaling.', styles['body']))
story.append(Paragraph('Endometrial effects of tamoxifen:', styles['h3']))
tam_eff = [
'Endometrial hypertrophy and thickening (increased endometrial stripe on TVUS)',
'Endometrial polyp formation (2-10% of users)',
'Endometrial hyperplasia (simple and complex; with or without atypia)',
'Endometrial adenocarcinoma: tamoxifen users have a 2-3 times increased risk of endometrial cancer (Berek & Novak\'s)',
'Increased vaginal bleeding and discharge',
'Sarcomatous endometrial changes (malignant mixed mullerian tumors) - rare but reported',
]
for item in tam_eff:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph(
'Due to its estrogenic activity in the endometrium, endometrial hyperplasia and malignancies '
'have been reported with tamoxifen therapy. Risks of tamoxifen (VTE, endometrial cancer) '
'must be weighed against benefits (breast cancer prevention/treatment).', styles['body']))
story.append(Paragraph(
'Key clinical point: Routine screening with TVUS or EMB is NOT recommended in '
'asymptomatic tamoxifen users. EMB is indicated only when abnormal bleeding develops.', styles['warn']))
story.append(Paragraph('8.2 Raloxifene: Neutral Endometrial Profile', styles['h2']))
story.append(Paragraph(
'Raloxifene is a second-generation SERM used for osteoporosis prevention and treatment, and '
'for breast cancer risk reduction in postmenopausal women. Unlike tamoxifen:', styles['body']))
ral_eff = [
'Raloxifene does NOT have estrogenic activity in the endometrium - it acts as a pure ER antagonist in endometrial tissue',
'Does NOT increase the risk of endometrial cancer',
'Does NOT cause endometrial hyperplasia or polyps',
'Associated with less vaginal discharge and fewer severe hot flashes than tamoxifen',
'Maintains anti-estrogen effects in breast tissue while being bone-protective',
'Does NOT increase endometrial thickness on TVUS',
]
for item in ral_eff:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('8.3 Bazedoxifene', styles['h2']))
story.append(Paragraph(
'Bazedoxifene is a third-generation SERM used in combination with conjugated estrogens '
'(Duavee in the US) for menopausal symptoms. Bazedoxifene acts as an ER antagonist in '
'the endometrium and breast, opposing the proliferative effects of the coadministered '
'estrogen. This "tissue selective estrogen complex" (TSEC) allows estrogen benefits '
'(hot flash relief, bone protection, vaginal health) without requiring a separate progestin '
'and without endometrial stimulation. Clinical trials confirm a neutral endometrial safety profile.', styles['body']))
story.append(Paragraph('<i>Source: Goodman & Gilman\'s; Lippincott Pharmacology; Berek & Novak\'s; Harrison\'s 22e</i>', styles['source']))
# ── SECTION 9 ─────────────────────────────────────────────────────────────
story += sec('9. GnRH ANALOGUES', styles)
story.append(Paragraph(
'GnRH (gonadotropin-releasing hormone) analogues include both GnRH agonists '
'(e.g., leuprolide, goserelin, nafarelin) and GnRH antagonists (e.g., ganirelix, cetrorelix, '
'elagolix). Both classes produce medical castration by reducing ovarian estrogen production.', styles['body']))
story.append(Paragraph('GnRH Agonists', styles['h2']))
gnrh_ag = [
'Continuous administration leads to pituitary receptor downregulation and profound gonadotropin suppression',
'Estradiol levels fall to postmenopausal range (<20 pg/mL) within 4-8 weeks',
'Endometrial effect: progressive endometrial atrophy - thin, inactive endometrium with markedly reduced vascularity',
'Amenorrhea is achieved in virtually all users within 1-3 months',
'Histology: tubular, inactive glands; thin, sparse stroma; no mitoses',
'Used for: endometriosis, uterine fibroids (preoperative shrinkage), adenomyosis, central precocious puberty, IVF downregulation',
'Used short-term to treat heavy menstrual bleeding (as bridge to surgery) in GnRH analogue + add-back regimens',
'Long-term use is limited by hypoestrogenic side effects (bone loss, vasomotor symptoms, vaginal atrophy)',
]
for item in gnrh_ag:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('Add-back Therapy', styles['h2']))
story.append(Paragraph(
'GnRH analogues are often used with "add-back" therapy consisting of combined estrogen/progestogen '
'or progestogen alone to mitigate hypoestrogenic side effects while maintaining the therapeutic '
'endometrial atrophy. The "estrogen threshold theory" suggests that a low, stable estradiol level '
'(around 20-50 pg/mL) can alleviate symptoms without re-stimulating endometriosis or the endometrium.', styles['body']))
story.append(Paragraph('<i>Source: Berek & Novak\'s Gynecology; Goodman & Gilman\'s</i>', styles['source']))
# ── SECTION 10 ─────────────────────────────────────────────────────────────
story += sec('10. ANDROGENS AND DANAZOL', styles)
story.append(Paragraph(
'Danazol is a synthetic androgen derived from 17α-ethinyltestosterone. It was historically used '
'for endometriosis and heavy menstrual bleeding but is now rarely used due to significant '
'androgenic side effects.', styles['body']))
story.append(Paragraph('Danazol - Endometrial Effects', styles['h2']))
dan_eff = [
'Suppresses the hypothalamic-pituitary-ovarian axis, reducing estrogen and progesterone secretion',
'Binds directly to androgen and progesterone receptors in the endometrium',
'Produces profound endometrial atrophy and amenorrhea',
'Histology: inactive, atrophic glands; minimal stromal response; no mitoses',
'Highly effective in reducing menstrual blood loss and inducing amenorrhea',
'Used for endometriosis (regression of ectopic endometrium) and heavy menstrual bleeding',
'Androgenic side effects (hirsutism, voice deepening, weight gain, alopecia) limit use',
'Hepatotoxicity is a concern with long-term use',
]
for item in dan_eff:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('<i>Source: Berek & Novak\'s Gynecology; Goodman & Gilman\'s</i>', styles['source']))
# ── SECTION 11 ─────────────────────────────────────────────────────────────
story += sec('11. MIFEPRISTONE (RU-486): ANTI-PROGESTIN EFFECTS', styles)
story.append(Paragraph(
'Mifepristone is a synthetic anti-progestin (also has anti-glucocorticoid activity). '
'It competitively blocks progesterone receptors in the endometrium.', styles['body']))
mife_eff = [
'Blocks progesterone-mediated secretory transformation, resulting in unopposed estrogen stimulation of the endometrium',
'Can lead to endometrial hyperplasia with prolonged/repeated use: a systematic review found endometrial hyperplasia in 10 of 36 (28%) women screened with endometrial biopsies',
'Used medically for early pregnancy termination (combined with misoprostol)',
'Investigational use in endometriosis and uterine fibroids',
'Endometrial monitoring is necessary in any long-term mifepristone use',
]
for item in mife_eff:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('<i>Source: Berek & Novak\'s Gynecology</i>', styles['source']))
# ── SECTION 12 ─────────────────────────────────────────────────────────────
story += sec('12. INSULIN AND METABOLIC HORMONES: INDIRECT ENDOMETRIAL EFFECTS', styles)
story.append(Paragraph(
'While not "exogenous hormones" in the traditional sense, insulin and insulin-sensitizing agents '
'have significant indirect effects on endometrial cancer risk:', styles['body']))
insulin_eff = [
'Hyperinsulinemia (as in type 2 diabetes, obesity, PCOS) stimulates ovarian androgen production and peripheral estrogen conversion',
'Insulin acts as a growth factor via IGF-1 receptors on endometrial cells, independently promoting proliferation',
'Obesity: peripheral aromatization of androstenedione to estrone in adipose tissue creates sustained, unopposed estrogen exposure',
'Diabetes mellitus carries ~2.8x increased relative risk of endometrial cancer',
'Metformin (used to treat insulin resistance in PCOS/diabetes): has anti-proliferative effects on endometrial cancer cells in vitro and may reduce endometrial cancer risk',
'Thiazolidinediones: may also modulate endometrial proliferation via PPAR-γ receptors',
]
for item in insulin_eff:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('<i>Source: Berek & Novak\'s Gynecology; Robbins Pathology</i>', styles['source']))
# ── SECTION 13 ─────────────────────────────────────────────────────────────
story += sec('13. ENDOMETRIAL PATHOLOGY CLASSIFICATION IN THE CONTEXT OF HORMONES', styles)
story.append(Paragraph(
'Two major classification systems are used for hormone-induced and related endometrial pathology:', styles['body']))
story.append(Paragraph('WHO Four-Tier Classification (Traditional)', styles['h2']))
who4 = [
['Class', 'WHO Category', 'Cytologic Atypia', 'Malignant Potential', 'Hormone Causation'],
['I', 'Simple hyperplasia', 'Absent', '~1%', 'Unopposed estrogen (mild/short)'],
['II', 'Complex hyperplasia', 'Absent', '~3%', 'Sustained unopposed estrogen'],
['III','Simple atypical hyperplasia', 'Present', '~8%', 'Chronic unopposed estrogen + genetic factors'],
['IV', 'Complex atypical hyperplasia','Present', '~29%', 'Chronic unopposed estrogen + PTEN loss etc.'],
]
story.append(tbl(who4[0], who4[1:], widths=[1.5*cm, 3.5*cm, 2.5*cm, 2.5*cm, W_PAGE-10*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph('WHO 2014 / EIN Three-Tier Classification (Modern)', styles['h2']))
who3 = [
['Category', 'Description', 'Treatment'],
['Benign endometrial hyperplasia', 'Formerly "simple/complex hyperplasia without atypia"; low malignant potential', 'Progestin therapy; LNG-IUS'],
['EIN (Endometrial Intraepithelial Neoplasia)', 'Formerly "atypical hyperplasia"; premalignant; 40-50% have concurrent carcinoma', 'Hysterectomy (or progestin if fertility desired)'],
['Endometrial adenocarcinoma G1', 'Well-differentiated; formerly sometimes misclassified as complex atypical hyperplasia', 'Surgical staging'],
]
story.append(tbl(who3[0], who3[1:], widths=[4.5*cm, 6*cm, W_PAGE-10.5*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph('Type I vs Type II Endometrial Carcinoma', styles['h2']))
type12 = [
['Feature', 'Type I (Endometrioid)', 'Type II (Non-endometrioid)'],
['Proportion', '75-85% of cases', '15-25% of cases'],
['Hormone link', 'Estrogen-dependent; arises from hyperplasia', 'Estrogen-independent; arises from atrophy'],
['Patient profile', 'Younger, perimenopausal, obese', 'Older, postmenopausal, thin'],
['Histology', 'Endometrioid (G1-G2)', 'Serous, clear cell, G3 endometrioid'],
['Molecular', 'PTEN, KRAS, microsatellite instability, MMR gene mutations', 'TP53 mutations, HER2 amplification'],
['Prognosis', 'Generally favorable (stage I, G1)', 'Poor; high extrauterine spread at diagnosis'],
['Exogenous hormone link', 'Unopposed estrogen, tamoxifen, PCOS', 'Not hormone-related'],
]
story.append(tbl(type12[0], type12[1:], widths=[3.5*cm, 5.5*cm, W_PAGE-9*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph('<i>Source: Berek & Novak\'s Gynecology; Robbins & Kumar Basic Pathology</i>', styles['source']))
# ── SECTION 14 ─────────────────────────────────────────────────────────────
story += sec('14. ENDOMETRIAL MONITORING IN HORMONE USERS: CLINICAL GUIDELINES', styles)
mon_data = [
['Hormone / Agent', 'Monitoring Recommendation'],
['Unopposed estrogen (intact uterus)', 'CONTRAINDICATED without progestogen; if used, annual EMB mandatory'],
['Cyclic combined HRT', 'EMB for any unscheduled bleeding; annual assessment of clinical symptoms'],
['Continuous combined HRT', 'EMB if irregular bleeding persists >6 months after initiation'],
['Tamoxifen (breast cancer treatment/prevention)', 'No routine TVUS or EMB in asymptomatic users; EMB immediately if any vaginal bleeding develops'],
['Raloxifene / Bazedoxifene', 'No specific endometrial monitoring needed (neutral profile)'],
['Progestin-only (pill, implant, DMPA)', 'Irregular bleeding common and expected; EMB only if atypical features or risk factors'],
['LNG-IUS', 'Minimal monitoring; EMB if unexpected heavy bleeding or abnormal findings'],
['GnRH analogues', 'Monitor for hypoestrogenic effects; endometrial atrophy expected; no cancer risk'],
['Lynch syndrome on any HRT', 'Annual TVUS + EMB from age 35 regardless of hormone use'],
['Mifepristone (long-term use)', 'Periodic EMB due to risk of hyperplasia (~28%)'],
]
story.append(tbl(mon_data[0], mon_data[1:], widths=[5.5*cm, W_PAGE-5.5*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph('<i>Source: Berek & Novak\'s Gynecology; Goodman & Gilman\'s; Harrison\'s 22e</i>', styles['source']))
# ── SECTION 15 ─────────────────────────────────────────────────────────────
story += sec('15. SUMMARY COMPARISON TABLE: EXOGENOUS HORMONES AND ENDOMETRIAL EFFECTS', styles)
sum_data = [
['Hormone/Drug', 'Category', 'Net Endometrial Effect', 'Cancer Risk', 'Key Histology'],
['Estrogen alone (HRT)', 'Estrogen', 'Proliferation, hypertrophy, hyperplasia', '4-8x INCREASED', 'Hyperplastic glands, mitoses, ↑ gland-to-stroma ratio'],
['Estrogen + progestin (HRT)', 'Combined', 'Controlled proliferation; secretory change; shedding (cyclic) or atrophy (continuous)', 'Near baseline or reduced', 'Secretory glands; decidualization; atrophy with long-term use'],
['Combined OCP', 'Combined', 'Atrophy; hostile endometrium; reduced vascularity', '40-50% REDUCED', 'Thin; inactive glands; pseudodecidual stroma'],
['Progestin-only pill', 'Progestin', 'Partial suppression; decidualization; thinning', 'Reduced', 'Irregular decidualization; partly atrophic'],
['DMPA (depot MPA)', 'Progestin', 'Progressive atrophy → amenorrhea', 'Reduced', 'Atrophic thin glands; pseudodecidual stroma'],
['LNG-IUS', 'Progestin (local)', 'Profound local atrophy; amenorrhea', 'Reduced (protective)', 'Narrow atrophic glands; decidualized stroma'],
['Tamoxifen', 'SERM (agonist in uterus)', 'Hypertrophy; polyps; hyperplasia risk', '2-3x INCREASED', 'Polypoid change; hyperplastic features; complex glands'],
['Raloxifene', 'SERM (antagonist in uterus)', 'Neutral; no proliferation', 'No increase', 'Atrophic or unchanged'],
['CEE + Bazedoxifene', 'TSEC', 'Neutral endometrial effect', 'No increase', 'Atrophic; no stimulation'],
['GnRH agonist', 'GnRH analogue', 'Profound atrophy; amenorrhea', 'Reduced (no estrogen)', 'Thin, atrophic, inactive endometrium'],
['Danazol', 'Androgen / anti-estrogen', 'Atrophy; amenorrhea', 'Reduced', 'Inactive, atrophic glands; minimal stroma'],
['Mifepristone', 'Anti-progestin', 'Unopposed estrogen effect → hyperplasia risk', 'INCREASED (long-term)', 'Proliferative; may develop simple hyperplasia'],
]
story.append(tbl(sum_data[0], sum_data[1:], widths=[3.5*cm, 3*cm, 4.5*cm, 2.5*cm, W_PAGE-13.5*cm]))
story.append(Spacer(1, 0.2*cm))
# ── SECTION 16 ─────────────────────────────────────────────────────────────
story += sec('16. REFERENCES AND SOURCES', styles)
refs = [
"Brunton LL, Knollmann BC. Goodman & Gilman's The Pharmacological Basis of Therapeutics, 14th Edition. McGraw-Hill. Chapters 13, 14, 19 (Menopausal hormones; Contraceptives; SERMs).",
"Berek JS, Novak E. Berek & Novak's Gynecology, 15th Edition. Lippincott Williams & Wilkins. Chapters 10, 37 (Endometrial physiology, AUB, Cancer).",
"Kumar V, Abbas AK, Aster JC. Robbins & Kumar Basic Pathology, 11th Edition. Elsevier. Chapter 7 (Female Genital System - Endometrial Hyperplasia & Carcinoma).",
"Fauci AS et al. Harrison's Principles of Internal Medicine, 22nd Edition. McGraw-Hill Medical (2025). Chapters on Osteoporosis/HRT; Breast Cancer Chemoprevention.",
"Barrett KE et al. Ganong's Review of Medical Physiology, 26th Edition. McGraw-Hill. Chapter 4 (Effects on female genitalia).",
"Whalen RE, Bhavnani BR. Lippincott Illustrated Reviews: Pharmacology, 7th Edition. Wolters Kluwer. Chapter on Reproductive Endocrinology (SERMs; Contraceptives).",
"Boron WF, Boulpaep EL. Medical Physiology. 3rd Edition. Elsevier. Chapter on Hormone Replacement Therapy.",
"Schindler AE. Hormonal contraceptives and endometrial protection. Gynecol Endocrinol. 2010.",
"Doherty MT et al. Effect of levonorgestrel on endometrial histology. Int J Gynaecol Obstet. 2014.",
"ACOG Practice Bulletin No. 149: Endometrial Cancer. Obstet Gynecol. 2015.",
]
for i, ref in enumerate(refs, 1):
story.append(Paragraph(f'{i}. {ref}', styles['bullet']))
story.append(Spacer(1, 1*cm))
story.append(HRFlowable(width='100%', thickness=1, color=MED_TEAL))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(
'This document is intended for educational and clinical reference purposes only. '
'Always correlate findings with the complete clinical context, current institutional guidelines, '
'and individualized patient assessment before making prescribing or monitoring decisions.',
styles['note']))
return story
def main():
doc = BaseDocTemplate(
OUTPUT_PATH,
pagesize=A4,
leftMargin=1.5*cm,
rightMargin=1.5*cm,
topMargin=1.6*cm,
bottomMargin=1.4*cm,
)
frame = Frame(doc.leftMargin, doc.bottomMargin, doc.width, doc.height, id='main')
template = PageTemplate(id='main', frames=frame, onPage=header_footer)
doc.addPageTemplates([template])
doc.build(content(S()))
print(f"PDF generated: {OUTPUT_PATH}")
if __name__ == '__main__':
main()
cd /home/daytona/workspace/endometrial-biopsy && python3 generate_hormones_pdf.p…
ls -lh /home/daytona/workspace/endometrial-biopsy/
Exogenous Hormones Endometrium
PDF Document · PDF
Role of e6 and e7 in cervical cancer and make detailed pdf
~/endometrial-biopsy/generate_e6e7_pdf.py
#!/usr/bin/env python3
"""Generate a comprehensive PDF: Role of HPV E6 and E7 in Cervical Cancer."""
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import ParagraphStyle
from reportlab.lib.units import cm
from reportlab.platypus import (
Paragraph, Spacer, Table, TableStyle,
HRFlowable, PageBreak
)
from reportlab.lib.enums import TA_CENTER, TA_JUSTIFY
from reportlab.platypus import BaseDocTemplate, Frame, PageTemplate
from reportlab.lib.colors import HexColor
OUTPUT_PATH = "/home/daytona/workspace/endometrial-biopsy/HPV_E6_E7_Cervical_Cancer.pdf"
# ── Palette ───────────────────────────────────────────────────────────────────
DEEP_PURPLE = HexColor('#3b0a6e')
MED_PURPLE = HexColor('#6a33aa')
LIGHT_PURPLE = HexColor('#ede4f9')
ACCENT_CORAL = HexColor('#c0392b')
ACCENT_GREEN = HexColor('#1a7a4a')
DARK_GRAY = HexColor('#2c2c2c')
MID_GRAY = HexColor('#555555')
TABLE_HDR = HexColor('#3b0a6e')
TABLE_ALT = HexColor('#f2ecfd')
W_PAGE = A4[0] - 3.0*cm
# ── Header/Footer ─────────────────────────────────────────────────────────────
def hf(canvas, doc):
canvas.saveState()
w, h = A4
canvas.setFillColor(DEEP_PURPLE)
canvas.rect(0, h - 1.2*cm, w, 1.2*cm, fill=1, stroke=0)
canvas.setFillColor(colors.white)
canvas.setFont('Helvetica-Bold', 9)
canvas.drawString(1.5*cm, h - 0.8*cm, 'ROLE OF HPV E6 AND E7 IN CERVICAL CANCER')
canvas.setFont('Helvetica', 8)
canvas.drawRightString(w - 1.5*cm, h - 0.8*cm, 'Molecular Oncology & Clinical Review')
canvas.setFillColor(DEEP_PURPLE)
canvas.rect(0, 0, w, 0.9*cm, fill=1, stroke=0)
canvas.setFillColor(colors.white)
canvas.setFont('Helvetica', 8)
canvas.drawString(1.5*cm, 0.3*cm,
"Robbins Pathology | Robbins & Cotran | Sherris Microbiology | Berek & Novak's | Dermatology 5e | Henry's Clinical Diagnosis")
canvas.drawRightString(w - 1.5*cm, 0.3*cm, f'Page {doc.page}')
canvas.restoreState()
# ── Style factory ─────────────────────────────────────────────────────────────
def S():
s = {}
s['title'] = ParagraphStyle('title', fontName='Helvetica-Bold', fontSize=26, textColor=colors.white, alignment=TA_CENTER, spaceAfter=4)
s['subtitle'] = ParagraphStyle('subtitle', fontName='Helvetica', fontSize=13, textColor=HexColor('#d5bff9'), alignment=TA_CENTER, spaceAfter=6)
s['h1'] = ParagraphStyle('h1', fontName='Helvetica-Bold', fontSize=14, textColor=colors.white, spaceAfter=6, spaceBefore=12, backColor=DEEP_PURPLE, borderPadding=(6,12,6,12))
s['h2'] = ParagraphStyle('h2', fontName='Helvetica-Bold', fontSize=11.5, textColor=DEEP_PURPLE, spaceAfter=4, spaceBefore=9)
s['h3'] = ParagraphStyle('h3', fontName='Helvetica-Bold', fontSize=10.5, textColor=MED_PURPLE, spaceAfter=3, spaceBefore=6)
s['h4'] = ParagraphStyle('h4', fontName='Helvetica-Bold', fontSize=10, textColor=ACCENT_CORAL, spaceAfter=2, spaceBefore=5)
s['body'] = ParagraphStyle('body', fontName='Helvetica', fontSize=10, textColor=DARK_GRAY, leading=15, spaceAfter=5, alignment=TA_JUSTIFY)
s['bullet'] = ParagraphStyle('bullet', fontName='Helvetica', fontSize=10, textColor=DARK_GRAY, leading=14, spaceAfter=3, leftIndent=16, bulletIndent=4)
s['sub'] = ParagraphStyle('sub', fontName='Helvetica', fontSize=9.5, textColor=MID_GRAY, leading=13, spaceAfter=2, leftIndent=30)
s['note'] = ParagraphStyle('note', fontName='Helvetica-Oblique', fontSize=9, textColor=MID_GRAY, leading=13, spaceAfter=4, leftIndent=8, rightIndent=8)
s['source'] = ParagraphStyle('source', fontName='Helvetica-Oblique', fontSize=8, textColor=MED_PURPLE, spaceAfter=5)
s['warn'] = ParagraphStyle('warn', fontName='Helvetica-Bold', fontSize=10, textColor=ACCENT_CORAL, leading=14, spaceAfter=4)
s['key'] = ParagraphStyle('key', fontName='Helvetica-Bold', fontSize=10, textColor=ACCENT_GREEN, leading=14, spaceAfter=4)
s['toc'] = ParagraphStyle('toc', fontName='Helvetica', fontSize=10, textColor=DARK_GRAY, leading=17, spaceAfter=1)
s['box'] = ParagraphStyle('box', fontName='Helvetica', fontSize=9.5, textColor=DARK_GRAY, leading=14, spaceAfter=0, leftIndent=8, rightIndent=8)
return s
def sec(text, styles):
return [Spacer(1, 0.2*cm), Paragraph(f' {text}', styles['h1']), Spacer(1, 0.15*cm)]
def cp(text, bold=False, color=None, size=9):
font = 'Helvetica-Bold' if bold else 'Helvetica'
col = color if color else DARK_GRAY
style = ParagraphStyle('cell', fontName=font, fontSize=size, textColor=col, leading=size*1.45, spaceAfter=0)
return Paragraph(str(text), style)
def tbl(headers, rows, widths=None):
data = [[cp(h, bold=True, color=colors.white, size=9.5) for h in headers]] + \
[[cp(c) for c in row] for row in rows]
t = Table(data, colWidths=widths)
t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), TABLE_HDR),
('ROWBACKGROUNDS',(0,1), (-1,-1), [colors.white, TABLE_ALT]),
('GRID', (0,0), (-1,-1), 0.5, HexColor('#c0a8e8')),
('VALIGN', (0,0), (-1,-1), 'TOP'),
('ALIGN', (0,0), (-1,-1), 'LEFT'),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 7),
('RIGHTPADDING', (0,0), (-1,-1), 7),
]))
return t
def highlight(para, bg=LIGHT_PURPLE, border=MED_PURPLE):
t = Table([[para]], colWidths=[W_PAGE])
t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), bg),
('LEFTPADDING', (0,0), (-1,-1), 12),
('RIGHTPADDING', (0,0), (-1,-1), 12),
('TOPPADDING', (0,0), (-1,-1), 8),
('BOTTOMPADDING',(0,0), (-1,-1), 8),
('BOX', (0,0), (-1,-1), 1.2, border),
]))
return t
# ── Content ───────────────────────────────────────────────────────────────────
def content(styles):
story = []
# COVER
story.append(Spacer(1, 2.8*cm))
cov = Table([
[Paragraph('ROLE OF HPV E6 AND E7', styles['title'])],
[Paragraph('in Cervical Cancer', styles['subtitle'])],
[Paragraph('Molecular Mechanisms · Oncogenesis · Pathology · Diagnosis · Prevention · Therapy', styles['subtitle'])],
], colWidths=[W_PAGE])
cov.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), DEEP_PURPLE),
('TOPPADDING', (0,0), (-1,-1), 10),
('BOTTOMPADDING',(0,0), (-1,-1), 10),
('LEFTPADDING', (0,0), (-1,-1), 20),
('RIGHTPADDING', (0,0), (-1,-1), 20),
]))
story.append(cov)
story.append(Spacer(1, 1.2*cm))
story.append(HRFlowable(width='100%', thickness=2, color=MED_PURPLE))
story.append(Spacer(1, 0.5*cm))
def ci(lbl, val):
return [Paragraph(lbl, ParagraphStyle('cl', fontName='Helvetica-Bold', fontSize=10, textColor=DEEP_PURPLE, leading=14)),
Paragraph(val, ParagraphStyle('cv', fontName='Helvetica', fontSize=10, textColor=DARK_GRAY, leading=14))]
info_t = Table([
ci('Oncoproteins', 'HPV E6 (p53 degradation, telomerase activation) | HPV E7 (pRB inactivation, CDK inhibitor blockade, cyclin activation)'),
ci('Key Cancers', 'Cervical SCC & Adenocarcinoma | Oropharyngeal | Anogenital'),
ci('High-Risk Types', 'HPV-16 (most common invasive cancer) | HPV-18 | HPV-31, 33, 35, 45, 52, 58'),
ci('Prevention', 'Gardasil-9 (9-valent vaccine) | Pap smear | HPV DNA testing'),
ci('Sources', "Robbins & Kumar Basic Pathology | Robbins, Cotran & Kumar | Sherris Medical Microbiology | Berek & Novak's | Dermatology 5e | Henry's Clinical Diagnosis"),
ci('Date', 'July 2026'),
], colWidths=[3.2*cm, W_PAGE - 3.2*cm])
info_t.setStyle(TableStyle([
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING',(0,0), (-1,-1), 5),
('LINEBELOW', (0,0), (-1,-5), 0.5, HexColor('#cccccc')),
]))
story.append(info_t)
story.append(PageBreak())
# TABLE OF CONTENTS
story += sec('TABLE OF CONTENTS', styles)
toc = [
('1.', 'Introduction: HPV and Cervical Cancer - Historical Perspective'),
('2.', 'HPV Virology: Genome Structure and Gene Products'),
('3.', 'HPV Classification: High-Risk vs Low-Risk Types'),
('4.', 'HPV Life Cycle and Infection of the Transformation Zone'),
('5.', 'Viral Integration: The Critical Event in Carcinogenesis'),
('6.', 'The E6 Oncoprotein: Structure and Mechanisms of Action'),
(' 6.1', 'E6 Binding to p53 via E6AP: Ubiquitin-Mediated Degradation'),
(' 6.2', 'E6 Activation of TERT (Telomerase)'),
(' 6.3', 'Additional E6 Targets: PDZ Domain Proteins, Focal Adhesion'),
(' 6.4', 'High-Risk vs Low-Risk E6: Differential p53 Affinity'),
('7.', 'The E7 Oncoprotein: Structure and Mechanisms of Action'),
(' 7.1', 'E7 Binding to Retinoblastoma Protein (pRB)'),
(' 7.2', 'Liberation of E2F Transcription Factors'),
(' 7.3', 'E7 Inactivation of CDK Inhibitors p21 and p27'),
(' 7.4', 'E7 Binding and Activation of Cyclins A and E'),
(' 7.5', 'E7 and Centrosome Abnormalities / Chromosomal Instability'),
('8.', 'Synergistic Hallmarks of Cancer Promoted by E6 + E7'),
('9.', 'Additional HPV Proteins: E5, E1, E2, L1, L2'),
('10.', 'Pathological Spectrum: From HPV Infection to Invasive Cancer'),
(' 10.1', 'Normal Cervical Epithelium and Transformation Zone'),
(' 10.2', 'Koilocytosis and LSIL / CIN 1'),
(' 10.3', 'HSIL / CIN 2 and CIN 3'),
(' 10.4', 'Invasive Squamous Cell Carcinoma'),
(' 10.5', 'Cervical Adenocarcinoma'),
('11.', 'Epigenetic Effects of HPV E6 and E7'),
('12.', 'Immune Evasion Mechanisms of HPV'),
('13.', 'Risk Factors for Progression from HPV Infection to Invasive Cancer'),
('14.', 'Molecular Diagnostics: Detecting E6/E7 and HPV'),
('15.', 'Therapeutic Targeting of E6 and E7'),
('16.', 'Prevention: HPV Vaccines and Screening'),
('17.', 'Summary: E6/E7 Oncogenic Pathway Diagram (Textual)'),
('18.', 'References and Sources'),
]
for num, title in toc:
story.append(Paragraph(f'<b>{num}</b> {title}', styles['toc']))
story.append(PageBreak())
# SECTION 1
story += sec('1. INTRODUCTION: HPV AND CERVICAL CANCER - HISTORICAL PERSPECTIVE', styles)
story.append(Paragraph(
'Human Papillomavirus (HPV) is the primary cause of cervical cancer, one of the most common '
'cancers worldwide and the leading cause of cancer death in women in many resource-limited countries. '
'The causal link between HPV and cervical cancer - and specifically the roles of the E6 and E7 '
'oncoproteins - represents one of the most important discoveries in cancer biology.', styles['body']))
story.append(Paragraph(
'The story began in the mid-1930s when Shope demonstrated that benign rabbit papillomas due to '
'filterable agents could advance to malignant squamous cell carcinomas - accelerated by external '
'cofactors like coal tar. The first evidence linking HPV to human malignancy came from '
'epidermodysplasia verruciformis (EV), where susceptibility to HPV-5 and HPV-8 resulted in '
'squamous cell carcinoma in about one-third of affected patients.', styles['body']))
story.append(Paragraph(
'Cytologic changes of HPV were first recognized by Koss and Durfee in 1956 (koilocytosis), '
'though their malignant significance was not appreciated until Meisels et al. reported these '
'changes in mild dysplasia 20 years later. The formal causal role of HPV in cervical cancer '
'was established by German researcher Harald zur Hausen, who earned the <b>2008 Nobel Prize in '
'Physiology or Medicine</b> for this discovery. Today, HPV DNA is found in more than 95% of '
'cervical carcinoma specimens when tested by PCR.', styles['body']))
story.append(Paragraph('<i>Sources: Sherris & Ryan\'s Medical Microbiology 8e; Berek & Novak\'s Gynecology; Robbins & Kumar Basic Pathology</i>', styles['source']))
# SECTION 2
story += sec('2. HPV VIROLOGY: GENOME STRUCTURE AND GENE PRODUCTS', styles)
story.append(Paragraph(
'HPV is a small, non-enveloped, double-stranded circular DNA virus (~8 kb genome) belonging '
'to the Papillomaviridae family. It has a strict tropism for squamous epithelial cells and '
'replicates exclusively in differentiating keratinocytes. More than 200 HPV types have been '
'identified, with at least 30-40 primarily infecting the anogenital tract.', styles['body']))
story.append(Paragraph('Genomic Organization', styles['h2']))
gene_data = [
['Gene', 'Category', 'Function'],
['E1', 'Early', 'Viral DNA replication; helicase activity; origin binding'],
['E2', 'Early', 'Transcriptional regulator; REPRESSES E6/E7 transcription; viral genome replication. LOST upon integration.'],
['E4', 'Early', 'Disrupts keratinocyte cytoskeleton (keratin network); facilitates virion release from cornified cells'],
['E5', 'Early', 'Stimulates epidermal growth factor receptor (EGFR) signaling; promotes proliferation in benign papillomas'],
['E6', 'Early / Oncoprotein', 'MAJOR ONCOPROTEIN: degrades p53 via ubiquitin-proteasome; activates TERT (telomerase); disrupts PDZ domain proteins'],
['E7', 'Early / Oncoprotein', 'MAJOR ONCOPROTEIN: binds and inactivates pRB; liberates E2F transcription factors; inhibits p21/p27; activates Cyclins A/E; causes chromosomal instability'],
['L1', 'Late', 'Major capsid protein (VLP basis of vaccines); mediates viral attachment and entry'],
['L2', 'Late', 'Minor capsid protein; assists virion assembly and endosomal escape'],
]
story.append(tbl(gene_data[0], gene_data[1:], widths=[1.8*cm, 3.5*cm, W_PAGE-5.3*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
'HPV does NOT encode its own DNA polymerase, RNA polymerase, or transcription machinery - it is '
'entirely dependent on co-opting the host cell\'s replication and transcription apparatus. '
'The E gene products (particularly E6 and E7) manipulate host cell cycle control to ensure '
'a proliferative environment suitable for viral DNA amplification.', styles['body']))
story.append(Paragraph('<i>Sources: Robbins & Cotran Pathologic Basis of Disease; Henry\'s Clinical Diagnosis; Dermatology 5e</i>', styles['source']))
# SECTION 3
story += sec('3. HPV CLASSIFICATION: HIGH-RISK VS LOW-RISK TYPES', styles)
story.append(Paragraph(
'HPV types are classified by their oncogenic potential based on their ability to cause '
'malignant transformation, which correlates with the biochemical affinity of their E6 and E7 '
'proteins for p53 and pRB respectively.', styles['body']))
risk_data = [
['Category', 'HPV Types', 'Associated Lesions', 'Cancer Risk'],
['Low-risk (LR)', 'HPV-6, 11 (most common)\nAlso 1, 2, 4, 7', 'Benign condylomata acuminata (genital warts); low-grade LSIL; laryngeal papillomatosis (RRP)', 'Minimal to none; E6/E7 have LOW affinity for p53/RB'],
['High-risk (HR) - Group 1 (definite carcinogens)', 'HPV-16, 18, 31, 33, 35, 39, 45, 51, 52, 56, 58, 59, 68', 'High-grade CIN 2/3 (HSIL); invasive cervical, anal, vulvar, vaginal, penile, oropharyngeal cancers', 'HIGH; E6/E7 have high affinity for p53/RB; drive malignant transformation'],
['HPV-16', 'Most common invasive cervical cancer type; found in 16% with normal cytology; most common in CIN 2/3', 'Squamous cell carcinoma predominantly', 'Dominant; ~50-60% of invasive cervical SCC'],
['HPV-18', 'Second most common; found in 23% of invasive cancers; <2% normal cytology', 'Adenocarcinoma more than SCC; aggressive biology', 'High; ~10-15% invasive cancers; together HPV-16+18 cause ~70-80% worldwide'],
]
story.append(tbl(risk_data[0], risk_data[1:], widths=[3.5*cm, 4*cm, 4*cm, W_PAGE-11.5*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
'HPV-16 and HPV-18 together are responsible for approximately 70-80% of all cervical cancers '
'worldwide. The nine-valent vaccine (Gardasil-9) targets HPV types 16, 18, 31, 33, 45, 52, '
'and 58 in addition to low-risk types 6 and 11, providing protection against >90% of '
'HPV-associated squamous cell cancers worldwide.', styles['body']))
story.append(Paragraph('<i>Sources: Berek & Novak\'s Gynecology; Robbins Pathology; Harrison\'s 22e; Henry\'s Clinical Diagnosis</i>', styles['source']))
# SECTION 4
story += sec('4. HPV LIFE CYCLE AND INFECTION OF THE TRANSFORMATION ZONE', styles)
story.append(Paragraph(
'HPV has a predilection for infecting squamous-columnar junctions - particularly the cervical '
'transformation zone (the squamocolumnar junction). This region is particularly vulnerable '
'because it contains metaplastic squamous cells undergoing active differentiation, providing '
'the necessary cellular environment for viral gene expression.', styles['body']))
story.append(Paragraph('Life Cycle Steps', styles['h2']))
lc_steps = [
('Infection of basal cells', 'HPV infects basal keratinocytes at micro-abrasions in the epithelium (transformation zone). The virion enters via endocytosis after L1 binding to heparan sulfate proteoglycans and alpha-6 integrin co-receptor.'),
('Establishment phase', 'In the basal layer, the viral genome is maintained as an extrachromosomal episome (20-50 copies/cell). Early proteins E1 and E2 control replication and gene expression. E6, E7 are expressed at LOW levels - just enough to keep the basal cell cycling.'),
('Amplification in differentiating cells', 'As cells migrate suprabasally and differentiate, E6 and E7 (supported by E5) maintain the cell cycle active against the normal differentiation-induced arrest. This allows viral DNA to be amplified to thousands of copies per cell.'),
('Virion assembly', 'In the terminally differentiated superficial layers, L1 and L2 capsid proteins are expressed and assemble around amplified viral genomes. E4 disrupts keratin filaments to facilitate release.'),
('Virus shedding', 'Infectious virions are shed from the epithelial surface without cell lysis, in cornified squames. This "stealth" strategy minimizes immune detection.'),
('Persistence vs clearance', 'In most women (<30 years), immune-mediated clearance occurs. In persistent infections (high-risk HPV), viral integration into the host genome is a key transforming event.'),
]
for step, desc in lc_steps:
story.append(Paragraph(f'<b>{step}:</b> {desc}', styles['bullet']))
story.append(Paragraph('<i>Source: Dermatology 5e; Sherris & Ryan\'s Medical Microbiology 8e</i>', styles['source']))
# SECTION 5
story += sec('5. VIRAL INTEGRATION: THE CRITICAL EVENT IN CARCINOGENESIS', styles)
story.append(Paragraph(
'A fundamental distinction exists between HPV behavior in benign vs malignant lesions:', styles['body']))
story.append(Paragraph(
'<b>Episomal (benign):</b> In condylomata and low-grade CIN, the HPV genome exists as a '
'circular extrachromosomal episome. E2 is intact and REPRESSES E6/E7 transcription, '
'maintaining relatively low oncoprotein levels compatible with productive viral replication.', styles['bullet']))
story.append(Paragraph(
'<b>Integrated (malignant):</b> In high-grade CIN and invasive cancers, the HPV genome '
'linearizes and integrates randomly into the host chromosome. Integration is clonal - '
'meaning a single integration event precedes clonal expansion of the transformed cell.', styles['bullet']))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph('Consequences of Integration', styles['h2']))
int_conseq = [
'Integration always interrupts the E1/E2 open reading frame, destroying the E2 repressor function',
'Loss of E2 repression → markedly increased, unregulated transcription of E6 and E7 oncoproteins',
'E6 and E7 genes are selectively retained at the integration site - they are consistently expressed in carcinomas',
'Integration causes genomic instability: chromosomal rearrangements, deletions, amplifications at and near the integration site',
'Cells harboring integrated HPV genome show significantly more genomic instability than cells with episomal HPV',
'In precancerous lesions (CIN 1), the HPV genome is predominantly episomal; in CIN 3 and invasive cancer, integration predominates',
'As CIN lesions progress, koilocytes disappear, HPV copy numbers decrease, and capsid antigen disappears - virus can no longer replicate productively in less differentiated cells',
]
for item in int_conseq:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(highlight(Paragraph(
'⚡ KEY CONCEPT: The loss of E2 repressor function upon viral integration is the '
'molecular trigger that unleashes uncontrolled E6 and E7 expression, driving the '
'cell toward malignant transformation.', styles['box']), bg=HexColor('#f0e6fd')))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph('<i>Sources: Robbins, Cotran & Kumar Pathologic Basis of Disease; Dermatology 5e; Berek & Novak\'s Gynecology; Henry\'s</i>', styles['source']))
# SECTION 6
story += sec('6. THE E6 ONCOPROTEIN: STRUCTURE AND MECHANISMS OF ACTION', styles)
story.append(Paragraph(
'E6 is a small protein (~150 amino acids, ~16 kDa) with two zinc-binding domains. '
'It is one of the most potent oncoproteins known, targeting multiple pathways critical '
'for cell survival, proliferation, and immortalization. E6 from high-risk HPV types '
'has fundamentally different biochemical activities compared to low-risk HPV E6 proteins.', styles['body']))
story.append(Paragraph('6.1 E6 Binding to p53 via E6AP: Ubiquitin-Mediated Degradation', styles['h2']))
story.append(Paragraph(
'The most critical and well-characterized activity of high-risk HPV E6 is the targeting '
'of the p53 tumor suppressor protein for ubiquitin-proteasome mediated degradation:', styles['body']))
e6_p53 = [
'E6 does NOT degrade p53 directly. Instead, it binds to the cellular E3 ubiquitin ligase E6AP (encoded by the UBE3A gene)',
'The E6-E6AP complex then binds to and ubiquitinates p53, targeting it for rapid proteasomal degradation',
'This tri-molecular complex (E6 + E6AP + p53) is unique to high-risk HPV types; low-risk E6 proteins bind p53 but cannot form the tri-molecular complex efficiently',
'E6 from high-risk HPV types (16, 18) has a HIGHER AFFINITY for p53 than E6 from low-risk types (6, 11) - this differential affinity is a key determinant of oncogenic potential',
]
for item in e6_p53:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('Consequences of p53 Degradation', styles['h3']))
p53_conseq = [
'p53 is the "guardian of the genome" - it normally detects DNA damage and activates G1 arrest or apoptosis',
'Without p53, cells with damaged DNA cannot arrest at the G1/S checkpoint',
'Apoptosis in response to DNA damage is suppressed - cells with mutations survive and proliferate',
'Loss of p53 function allows accumulation of oncogenic mutations',
'p53 normally upregulates p21 (CDKN1A); loss of p53 indirectly contributes to reduced p21 levels',
'HPV+ tumors rarely carry TP53 gene mutations, because E6-mediated degradation functionally inactivates p53 protein',
]
for item in p53_conseq:
story.append(Paragraph(f' - {item}', styles['sub']))
story.append(Paragraph('6.2 E6 Activation of TERT (Telomerase)', styles['h2']))
story.append(Paragraph(
'A second major activity of high-risk HPV E6 is the transcriptional activation of TERT '
'(telomerase reverse transcriptase), the catalytic subunit of telomerase:', styles['body']))
tert_pts = [
'Normal somatic cells do not express telomerase; telomeres shorten with each division, triggering senescence',
'E6 activates TERT expression, restoring telomerase activity and preventing telomere shortening',
'Telomerase activation contributes to cellular IMMORTALIZATION - removal of the normal proliferative lifespan limit',
'This is the mechanistic basis for why HPV-transformed cell lines (HeLa, SiHa, CaSki) are immortalized',
'E6-mediated TERT activation is synergistic with E7-mediated cell cycle deregulation in achieving full immortalization',
]
for item in tert_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('6.3 Additional E6 Targets: PDZ Domain Proteins and Focal Adhesion', styles['h2']))
pdz_pts = [
'High-risk E6 proteins contain a C-terminal PDZ-binding motif (absent in low-risk types)',
'PDZ domain-containing proteins are scaffolding proteins involved in cell polarity and tight junction assembly (e.g., Dlg1, SCRIB, MAGI)',
'E6 binds and degrades these PDZ proteins, disrupting cell polarity, cell-cell adhesion, and contact inhibition',
'Loss of cell polarity promotes invasion - a feature critical for progression to invasive carcinoma',
'E6 also interacts with focal adhesion kinase (FAK) and integrins, contributing to altered cell migration and invasion',
]
for item in pdz_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('6.4 High-Risk vs Low-Risk E6: Differential p53 Affinity', styles['h2']))
e6_compare = [
['Property', 'High-Risk E6 (HPV-16, 18)', 'Low-Risk E6 (HPV-6, 11)'],
['p53 binding affinity', 'HIGH', 'LOW'],
['E6AP recruitment', 'YES - forms tri-molecular complex', 'NO (or very inefficiently)'],
['p53 ubiquitination/degradation', 'YES - rapid and efficient', 'NO (or minimal)'],
['TERT activation', 'YES', 'NO'],
['PDZ domain binding motif', 'Present (C-terminal PBM)', 'Absent'],
['Cellular immortalization', 'YES (with E7)', 'NO'],
['Malignant transformation', 'YES', 'NO'],
]
story.append(tbl(e6_compare[0], e6_compare[1:], widths=[5*cm, 4.5*cm, W_PAGE-9.5*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph('<i>Sources: Robbins & Kumar Basic Pathology; Robbins, Cotran & Kumar; Dermatology 5e; Scott-Brown\'s Otorhinolaryngology</i>', styles['source']))
# SECTION 7
story += sec('7. THE E7 ONCOPROTEIN: STRUCTURE AND MECHANISMS OF ACTION', styles)
story.append(Paragraph(
'E7 is a small zinc-binding phosphoprotein (~98 amino acids, ~10 kDa) that functions '
'primarily as a cell cycle accelerator. Its activities are centered on pushing cells through '
'the G1/S checkpoint and maintaining a proliferative state in cells that would normally '
'undergo growth arrest upon differentiation.', styles['body']))
story.append(Paragraph('7.1 E7 Binding to the Retinoblastoma Protein (pRB)', styles['h2']))
story.append(Paragraph(
'The hallmark function of E7 is binding to the retinoblastoma tumor suppressor protein (pRB):', styles['body']))
rb_pts = [
'pRB normally acts as a transcriptional repressor by sequestering E2F transcription factors. When pRB is bound to E2F, E2F-target genes (cyclin E, DHFR, thymidylate synthase, DNA replication genes) are silenced',
'E7 specifically binds to the UNDERPHOSPHORYLATED ("active") form of pRB - the form that is active as an E2F repressor',
'E7 contains a conserved LXCXE motif that directly contacts pRB in its A/B pocket domain',
'High-risk E7 (HPV-16, 18) has HIGHER affinity for pRB than low-risk E7 (HPV-6, 11)',
'E7 from high-risk types also binds and inactivates pRB family members p107 and p130',
]
for item in rb_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('7.2 Liberation of E2F Transcription Factors', styles['h2']))
story.append(Paragraph(
'When E7 displaces E2F from pRB, E2F is free to transcriptionally activate genes required '
'for S-phase entry and DNA replication:', styles['body']))
e2f_pts = [
'E2F target genes include: Cyclin E, Cyclin A, PCNA, thymidine kinase, CDC2, CDK2, E2F1 itself (positive feedback loop)',
'Cells are forced into S phase regardless of external mitogenic signals or growth arrest cues',
'This is equivalent to having constitutively hyperphosphorylated (inactive) pRB, mimicking a RB-null state',
'In RB-mutated tumors (retinoblastoma, osteosarcoma), the same pathway is deregulated by gene deletion. HPV E7 achieves the equivalent biochemically.',
]
for item in e2f_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('7.3 E7 Inactivation of CDK Inhibitors p21 and p27', styles['h2']))
story.append(Paragraph(
'E7 inactivates two critical cyclin-dependent kinase inhibitors (CKIs):', styles['body']))
cki_pts = [
'p21 (CDKN1A): normally induced by p53 in response to DNA damage to arrest G1; also expressed during differentiation. E7 directly binds and inactivates p21, bypassing the p53-mediated G1 arrest mechanism',
'p27 (CDKN1B): normally inhibits CDK2-Cyclin E and CDK2-Cyclin A complexes. E7 inactivates p27, promoting S-phase entry',
'Combined inactivation of p21 (downstream of p53) and direct pRB binding creates a double-lock bypass of G1 checkpoint control',
]
for item in cki_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('7.4 E7 Binding and Activation of Cyclins A and E', styles['h2']))
story.append(Paragraph(
'E7 proteins from high-risk HPV types (16, 18, 31) go beyond simply removing pRB-mediated brakes - they also directly ACTIVATE cell cycle drivers:', styles['body']))
cyclin_pts = [
'E7 binds and activates Cyclin A and Cyclin E, which form active kinase complexes with CDK2',
'CDK2-Cyclin E drives G1/S transition; CDK2-Cyclin A drives S phase progression',
'This creates a constitutive pro-proliferative signal that is not dependent solely on growth factor signaling',
'High-risk E7 proteins bind cyclins; low-risk E7 proteins do NOT - contributing to differential oncogenic potential',
]
for item in cyclin_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('7.5 E7 and Centrosome Abnormalities / Chromosomal Instability', styles['h2']))
story.append(Paragraph(
'A particularly important oncogenic mechanism of E7 is its ability to induce centrosome '
'abnormalities:', styles['body']))
centro_pts = [
'E7 expression causes centrosome duplication errors, producing multipolar spindles during mitosis',
'Multipolar spindles lead to chromosomal missegregation and aneuploidy',
'This genomic instability facilitates acquisition of further oncogenic mutations',
'E6 and E7 act synergistically to amplify centrosome abnormalities and chromosomal instability',
'E7 also binds histone deacetylases (HDACs), causing epigenetic changes that silence tumor suppressor genes',
]
for item in centro_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('<i>Sources: Robbins, Cotran & Kumar; Robbins & Kumar Basic Pathology; Dermatology 5e</i>', styles['source']))
# SECTION 8
story += sec('8. SYNERGISTIC HALLMARKS OF CANCER PROMOTED BY E6 + E7', styles)
story.append(Paragraph(
'Together, E6 and E7 promote virtually all of Hanahan and Weinberg\'s "hallmarks of cancer." '
'Their combined activities create a permissive cellular environment for malignant transformation:', styles['body']))
hallmarks = [
['Hallmark of Cancer', 'E6 Contribution', 'E7 Contribution'],
['Sustained proliferative signaling', 'Indirect (via p53 loss, TERT)', 'Direct (pRB inactivation, CDK inhibitor loss, Cyclin A/E activation)'],
['Evasion of growth suppressors', 'Degrades p53 (master growth suppressor)', 'Inactivates pRB (major G1 brake)'],
['Resistance to cell death (apoptosis)', 'Eliminates p53-driven apoptosis', 'Inactivates p21 (anti-apoptotic via CDK inhibition)'],
['Replicative immortality', 'Activates TERT; removes telomere shortening limit', 'Bypasses senescence by deregulating cell cycle'],
['Genomic instability & mutation', 'Loss of p53 allows DNA damage accumulation', 'Centrosome defects cause chromosomal instability'],
['Invasion and metastasis', 'Degrades PDZ polarity proteins; disrupts tight junctions', 'Epigenetic silencing of invasion suppressors (via HDAC binding)'],
['Evading immune destruction', 'Suppresses innate immune signaling (interferon response)','Reduces MHC class I expression on infected cells'],
]
story.append(tbl(hallmarks[0], hallmarks[1:], widths=[4*cm, 4.5*cm, W_PAGE-8.5*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
'Importantly, HPV infection alone is NOT sufficient for cancer development. Cancer generally '
'develops several decades after initial infection, indicating that additional genetic or '
'epigenetic alterations are required. When human keratinocytes are transfected with HPV-16, '
'-18, or -31 DNA in vitro, they become immortalized but do not form tumors in nude mice unless '
'additional oncogenic mutations are introduced (e.g., activated RAS).', styles['body']))
story.append(Paragraph('<i>Sources: Robbins, Cotran & Kumar; Robbins & Kumar Basic Pathology</i>', styles['source']))
# SECTION 9
story += sec('9. ADDITIONAL HPV PROTEINS: E5, E1, E2, L1, L2', styles)
story.append(Paragraph(
'While E6 and E7 are the primary oncoproteins, other HPV proteins play roles in the '
'viral life cycle and early oncogenesis:', styles['body']))
other_proteins = [
('E5', 'Associates with and stimulates epidermal growth factor receptor (EGFR) signaling. E5 promotes proliferation in early/benign papillomas. It prevents downregulation of EGFR by blocking lysosomal degradation. Contributes to early oncogenic signaling but is not required in established cancers (often lost after integration).'),
('E2', 'Negative regulator of E6/E7 transcription. In episomal HPV, E2 binds to LCR (Long Control Region) and REPRESSES E6/E7 promoter activity, keeping oncoprotein levels low. Integration disrupts E2, removing this brake. E2 also mediates episomal genome replication and segregation.'),
('E1', 'ATP-dependent DNA helicase. Unwinds viral DNA at the origin of replication. Required for viral DNA replication. Works in concert with E2.'),
('L1', 'Major viral capsid protein (~55 kDa). Forms virus-like particles (VLPs) - the basis of all HPV vaccines. Mediates initial viral attachment to heparan sulfate proteoglycans on cell surface. L1 VLPs generate neutralizing antibodies.'),
('L2', 'Minor viral capsid protein. Assists in virion assembly. Plays role in endosomal escape and nuclear targeting of viral DNA. L2 cross-reactive antibodies provide broader cross-type protection.'),
]
for protein, desc in other_proteins:
story.append(Paragraph(f'<b>E{protein if protein[0] != "L" else protein} ({protein}):</b> {desc}', styles['bullet']))
story.append(Paragraph('<i>Sources: Dermatology 5e; Sherris & Ryan\'s Medical Microbiology; Robbins & Cotran</i>', styles['source']))
# SECTION 10
story += sec('10. PATHOLOGICAL SPECTRUM: FROM HPV INFECTION TO INVASIVE CANCER', styles)
story.append(Paragraph('10.1 Normal Cervical Epithelium and Transformation Zone', styles['h2']))
story.append(Paragraph(
'The cervical transformation zone (TZ) - where the endocervical columnar epithelium meets '
'the exocervical squamous epithelium - is the site of metaplastic squamous differentiation '
'and is uniquely vulnerable to HPV infection. Nearly all cervical cancers originate here.', styles['body']))
story.append(Paragraph('10.2 Koilocytosis and LSIL / CIN 1', styles['h2']))
story.append(Paragraph(
'Low-grade squamous intraepithelial lesion (LSIL) / CIN 1 represents productive HPV infection '
'with active viral replication. Key features:', styles['body']))
lsil_pts = [
'Koilocytes: pathognomonic viral cytopathic effect - enlarged irregular hyperchromatic nuclei surrounded by a clear perinuclear halo (vacuolization of cytoplasm due to HPV E4 protein disrupting cytokeratins)',
'Dysplastic changes confined to the lower third of the squamous epithelium',
'Normal maturation pattern maintained in upper two-thirds',
'High HPV copy numbers; viral genome in episomal form; E6/E7 expressed at low levels',
'Most LSIL lesions REGRESS spontaneously (>60% within 2 years)',
'250-fold increased risk of high-grade CIN associated with detection of HPV',
]
for item in lsil_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('10.3 HSIL / CIN 2 and CIN 3', styles['h2']))
story.append(Paragraph(
'High-grade squamous intraepithelial lesion (HSIL) represents progressive cellular '
'transformation with increasing E6/E7 expression:', styles['body']))
hsil_pts = [
'CIN 2: immature dysplastic cells extend into the lower two-thirds of the epithelium; koilocytes diminish',
'CIN 3 (carcinoma in situ): dysplastic cells span the full thickness of the epithelium; no maturation; koilocytes absent',
'HPV copy numbers decrease; viral genome transitioning to/already in integrated form',
'Capsid antigen disappears - virus cannot replicate productively in highly dysplastic cells',
'Mitoses are frequent and may be atypical; significant nuclear pleomorphism',
'Risk factors for progression: persistent high-risk HPV infection, cigarette smoking, immunocompromise (HIV)',
'About 20% of HSIL develops de novo without a preceding LSIL',
]
for item in hsil_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('10.4 Invasive Squamous Cell Carcinoma', styles['h2']))
story.append(Paragraph(
'Invasion through the basement membrane marks the transition to invasive cancer. HPV DNA '
'(predominantly integrated) is present in >95% of specimens. E6 and E7 are the dominant '
'expressed viral genes. Additional somatic mutations in cellular oncogenes and tumor '
'suppressors (KRAS, MYC, PIK3CA, etc.) have accumulated. SCC accounts for approximately '
'70% of cervical cancers.', styles['body']))
story.append(Paragraph('10.5 Cervical Adenocarcinoma', styles['h2']))
story.append(Paragraph(
'Adenocarcinoma (arising from endocervical glandular cells) accounts for ~25% of cervical '
'cancers. HPV-18 is disproportionately associated with adenocarcinoma (vs HPV-16 which '
'predominantly causes SCC). E6 and E7 drive transformation in glandular cells through '
'the same pRB and p53 mechanisms. Adenocarcinoma is rising in incidence, partly because '
'it is less well-detected by standard Pap smear cytology.', styles['body']))
story.append(Paragraph('<i>Sources: Robbins & Kumar Basic Pathology; Berek & Novak\'s Gynecology; Henry\'s Clinical Diagnosis</i>', styles['source']))
# SECTION 11
story += sec('11. EPIGENETIC EFFECTS OF HPV E6 AND E7', styles)
story.append(Paragraph(
'Beyond direct protein interactions, E6 and E7 drive widespread epigenetic changes that '
'contribute to carcinogenesis:', styles['body']))
epigenetic_pts = [
'E7 binds histone deacetylases (HDACs), altering chromatin structure and silencing tumor suppressor genes',
'HPV infection induces DNA methylation of promoters of TSGs (tumor suppressor genes) involved in cell proliferation and differentiation (e.g., RASSF1, APC, CDH1, MLH1)',
'Promoter methylation of RASSF1 (RAS association domain family 1) - a pro-apoptotic gene - is commonly observed',
'Methylation of mismatch repair gene MLH1 contributes to microsatellite instability',
'E6 and E7 can activate the PI3K/AKT pathway via epigenetic mechanisms, further promoting survival',
'Epigenetic changes may serve as biomarkers: the ConfirmMDX test detects methylation of GSPT1, APC, and RASSF1 for cancer field effect detection',
]
for item in epigenetic_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('<i>Sources: Henry\'s Clinical Diagnosis; Robbins, Cotran & Kumar</i>', styles['source']))
# SECTION 12
story += sec('12. IMMUNE EVASION MECHANISMS OF HPV', styles)
story.append(Paragraph(
'HPV has evolved multiple strategies to evade host immune surveillance:', styles['body']))
immune_pts = [
'No viremic phase: HPV infection is localized to squamous epithelium with no systemic dissemination - avoiding systemic immune surveillance',
'Low viral protein expression in basal/spinous layers (where Langerhans cells patrol) - virion proteins are only expressed in immunologically privileged terminally differentiated superficial layers',
'Virus shed from superficial cornified layers without cell lysis - no danger signals released',
'E6 and E7 suppress innate antiviral interferon (IFN) responses by targeting interferon regulatory factors',
'E7 reduces MHC class I expression on infected cells, impairing cytotoxic T lymphocyte (CTL) recognition',
'E5 prevents downregulation of MHC class I by blocking lysosomal acidification',
'Despite these evasion strategies, up to 2/3 of cutaneous warts regress spontaneously within 2 years, and HPV infection is cleared in most young women via cell-mediated immunity',
'Persistent HPV infection (failure of immune clearance) is the strongest risk factor for cancer progression',
'Patients with suppressed cell-mediated immunity (HIV, organ transplant recipients) have dramatically increased HPV persistence and cervical cancer risk',
]
for item in immune_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('<i>Sources: Dermatology 5e; Sherris & Ryan\'s Medical Microbiology</i>', styles['source']))
# SECTION 13
story += sec('13. RISK FACTORS FOR PROGRESSION FROM HPV INFECTION TO INVASIVE CANCER', styles)
story.append(Paragraph(
'HPV infection is necessary but NOT sufficient for cervical cancer. Additional cofactors '
'are required for progression:', styles['body']))
rf_data = [
['Risk Factor', 'Mechanism / Effect', 'Evidence Level'],
['Persistent high-risk HPV infection', 'Sustained E6/E7 expression; DNA integration; genomic instability', 'Strong causal'],
['HPV type 16 or 18 specifically', 'Higher affinity E6/E7 for p53/RB; greater oncogenic potential', 'Strong causal'],
['Cigarette smoking', 'Carcinogens (tobacco-specific nitrosamines) accumulate in cervical mucus; DNA adducts; immunosuppression in cervical epithelium', 'Strong'],
['HIV infection / immunocompromise', 'Impaired CD4+ T cell surveillance; HPV persistence; accelerated CIN progression', 'Strong'],
['High parity (multiple births)', 'Increased exposure of transformation zone; hormonal effects on cervical ectropion', 'Moderate'],
['Long-term oral contraceptive use', 'Hormonal effects may promote HPV expression; increase ectropion', 'Moderate'],
['Early age at first intercourse', 'Immature transformation zone more susceptible to HPV infection', 'Moderate'],
['Multiple sexual partners', 'Increased HPV exposure probability', 'Moderate'],
['Co-infection with other STIs', 'Chlamydia, HSV-2, HIV - promote inflammation and immune dysregulation', 'Moderate'],
['Nutritional deficiencies', 'Low folate, vitamin A, vitamin C - impair DNA repair and immune function', 'Weak-Moderate'],
['Genetic susceptibility', 'HLA alleles affecting HPV peptide presentation to T cells', 'Moderate'],
]
story.append(tbl(rf_data[0], rf_data[1:], widths=[4*cm, 5.5*cm, W_PAGE-9.5*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph('<i>Sources: Henry\'s Clinical Diagnosis; Robbins & Kumar; Berek & Novak\'s</i>', styles['source']))
# SECTION 14
story += sec('14. MOLECULAR DIAGNOSTICS: DETECTING E6/E7 AND HPV', styles)
diag_data = [
['Test', 'Method', 'What It Detects', 'Clinical Use'],
['Pap smear (Papanicolaou)', 'Light microscopy of cervical cytology', 'Koilocytes, dysplastic cells (LSIL/HSIL/carcinoma)', 'Primary cervical cancer screening; 50-year proven track record; reduced mortality 75%'],
['HPV DNA test (e.g., Hybrid Capture 2, cobas HPV)', 'Nucleic acid hybridization or PCR', 'High-risk HPV DNA (types 16, 18, and 12 other HR types)', 'Co-testing with Pap; reflex testing for ASC-US; highly sensitive (>95%)'],
['HPV genotyping', 'PCR-based type-specific detection', 'Specific HPV genotypes (especially 16 and 18)', 'Risk stratification; HPV-16/18 positive patients have highest cancer risk'],
['E6/E7 mRNA test (APTIMA HPV)', 'Transcription-mediated amplification', 'E6 and E7 mRNA transcripts (active oncogene expression)', 'Higher specificity than DNA tests; indicates transcriptionally active oncogenic infection; fewer false positives'],
['p16/Ki-67 dual stain', 'Immunocytochemistry', 'p16INK4a (upregulated by pRB inactivation by E7) + Ki-67 (proliferation marker)', 'Triage of ASC-US and LSIL; p16 overexpression is surrogate marker of pRB pathway inactivation by E7'],
['Colposcopy + biopsy', 'Direct visualization + histology', 'Acetowhite epithelium, punctation, mosaicism; CIN grade on biopsy', 'Follow-up of abnormal cytology or positive HPV test; allows targeted biopsy'],
['Methylation assays (ConfirmMDX)', 'Bisulfite-treated PCR', 'Methylation of RASSF1, APC, GSTP1 (cancer field effect)', 'Follow-up of negative biopsy with persistent HPV; detect field effect of early cancer'],
]
story.append(tbl(diag_data[0], diag_data[1:], widths=[3.5*cm, 3.5*cm, 3.5*cm, W_PAGE-10.5*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
'Clinical significance of p16 overexpression: E7 inactivation of pRB relieves the normal '
'negative feedback by which pRB suppresses p16 (CDKN2A) expression. When pRB is inactivated, '
'p16 accumulates to very high levels - this makes p16 immunohistochemistry a reliable surrogate '
'marker for high-risk HPV E7 activity in cervical lesions.', styles['body']))
story.append(Paragraph('<i>Sources: Robbins & Kumar; Henry\'s Clinical Diagnosis; Berek & Novak\'s</i>', styles['source']))
# SECTION 15
story += sec('15. THERAPEUTIC TARGETING OF E6 AND E7', styles)
story.append(Paragraph(
'Given their central roles in cervical carcinogenesis and the fact that they are virally '
'encoded (not found in normal human cells), E6 and E7 are attractive therapeutic targets:', styles['body']))
therapy_pts = [
('Small molecule inhibitors of E6-p53 interaction', 'Several small molecules disrupting the E6/E6AP/p53 complex are in preclinical and early clinical development. Restoring p53 function in HPV-positive cervical cancer cells induces apoptosis.'),
('E6/E7-targeted therapeutic vaccines', 'Unlike prophylactic vaccines (which target L1 VLPs), therapeutic vaccines aim to generate cytotoxic T lymphocyte (CTL) responses against E6 and E7 peptides in already-infected or cancerous cells. Multiple vaccine platforms in trials (peptide vaccines, DNA vaccines, viral vectors, mRNA).'),
('HPV E6/E7 as tumor antigens for adoptive T cell therapy', 'T cells engineered to recognize HPV E6 and E7 peptides (CAR-T or TCR-engineered T cells) have shown early promise in clinical trials for HPV-positive cancers.'),
('Antisense oligonucleotides and siRNA', 'Silencing E6/E7 mRNA transcription using antisense or RNAi approaches is being studied as a targeted approach to suppress oncoprotein expression.'),
('HDACi and epigenetic therapy', 'Since E7 binds HDACs and causes epigenetic silencing, HDAC inhibitors may restore expression of silenced tumor suppressors in HPV-driven cancers.'),
('CDK inhibitors', 'Since E7 bypasses CDK inhibitor p21/p27 and activates CDK2-Cyclin complexes, CDK4/6 inhibitors (e.g., palbociclib) are being explored in HPV+ cancers.'),
('Standard treatment (surgery/CRT)', 'Cervical cancers expressing E6/E7 remain dependent on their continued expression - downregulation of E6/E7 in established cancer cell lines (SiHa, HeLa) leads to p53 restoration, pRB reactivation, growth arrest, and apoptosis.'),
]
for title, desc in therapy_pts:
story.append(Paragraph(f'<b>{title}:</b> {desc}', styles['bullet']))
story.append(Paragraph('<i>Sources: Robbins, Cotran & Kumar; Berek & Novak\'s</i>', styles['source']))
# SECTION 16
story += sec('16. PREVENTION: HPV VACCINES AND SCREENING', styles)
story.append(Paragraph('HPV Vaccines', styles['h2']))
story.append(Paragraph(
'All approved HPV vaccines are based on recombinant virus-like particles (VLPs) composed '
'of the L1 major capsid protein. VLPs mimic the outer shell of HPV without containing viral '
'DNA - they are non-infectious but highly immunogenic, generating neutralizing antibodies.', styles['body']))
vax_data = [
['Vaccine', 'Types Covered', 'Dose Schedule', 'Indication'],
['Gardasil (quadrivalent - discontinued in US)', 'HPV 6, 11, 16, 18', '3 doses (0, 2, 6 months)', 'Historical; cervical cancer, genital warts prevention'],
['Cervarix (bivalent)', 'HPV 16, 18', '3 doses (0, 1, 6 months)', 'Cervical cancer prevention; approved in many countries'],
['Gardasil-9 (nine-valent) - CURRENT STANDARD', 'HPV 6, 11, 16, 18, 31, 33, 45, 52, 58', '2 doses (0, 6-12 months) if started <15 yrs; 3 doses (0, 2, 6 months) if ≥15 yrs or immunocompromised', 'Cervical, vaginal, vulvar, anal cancer + genital warts; approved ages 9-45'],
]
story.append(tbl(vax_data[0], vax_data[1:], widths=[4.5*cm, 3.5*cm, 3*cm, W_PAGE-11*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
'The nine-valent vaccine targets HPV types responsible for up to 90% of all HPV-associated '
'squamous cell cancers worldwide. Clinical trials showed 96.7% efficacy against high-grade '
'cervical/vulvar/vaginal disease caused by the five additional types (31, 33, 45, 52, 58). '
'No evidence of waning protection after 10 years of follow-up. Vaccination of males is '
'critical due to their role in HPV spread and the toll of HPV-related anal and '
'oropharyngeal cancers in men.', styles['body']))
story.append(Paragraph(
'⚠ Important: Vaccination does NOT supplant the need for ongoing cervical cancer screening. '
'Many at-risk women are already infected, and vaccines protect against most but not ALL '
'oncogenic HPV genotypes.', styles['warn']))
story.append(Paragraph('Screening Programs', styles['h2']))
screen_pts = [
'Pap smear has reduced cervical cancer mortality by 75% in the US since its introduction - cervical cancer was the leading cause of cancer death in women 50 years ago',
'High-risk HPV testing: most useful in women ≥30 years (lower background incidence improves predictive value); a negative HPV test at age 30+ means very low risk for next 5 years',
'Co-testing (Pap + HPV DNA): current recommended approach for primary screening in women 30-65 years',
'Primary HPV testing (without Pap): emerging as a preferred strategy in many guidelines due to higher sensitivity',
'p16/Ki-67 dual stain: emerging triage tool for HPV-positive/cytologically abnormal women',
'In low-resource settings: visual inspection with acetic acid (VIA) followed by cryotherapy provides effective screen-and-treat',
]
for item in screen_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('<i>Sources: Robbins & Kumar; Harrison\'s 22e; Berek & Novak\'s; Henry\'s Clinical Diagnosis</i>', styles['source']))
# SECTION 17
story += sec('17. SUMMARY: E6/E7 ONCOGENIC PATHWAY (TEXTUAL DIAGRAM)', styles)
story.append(Paragraph('Complete Carcinogenic Sequence', styles['h2']))
pathway = [
'1. HIGH-RISK HPV (types 16, 18, 31, 33...) infects basal cells of the cervical transformation zone via micro-abrasions',
'2. EPISOMAL PHASE: viral genome maintained as circular episome; E2 represses E6/E7 → low-level oncoprotein expression',
'3. INTEGRATION EVENT: E1/E2 ORF disrupted; E2 lost; E6 and E7 now unrepressed → overexpressed',
'',
' ┌─────────────────────────┐ ┌─────────────────────────────┐',
' │ E6 ONCOPROTEIN │ │ E7 ONCOPROTEIN │',
' ├─────────────────────────┤ ├─────────────────────────────┤',
' │ E6 + E6AP → degrades p53│ │ E7 binds pRB (LXCXE motif) │',
' │ ↓ No G1 arrest │ │ ↓ Releases E2F │',
' │ ↓ No apoptosis │ │ ↓ S-phase entry │',
' │ E6 activates TERT │ │ E7 inactivates p21 & p27 │',
' │ ↓ Immortalization │ │ E7 activates Cyclins A & E │',
' │ E6 degrades PDZ proteins│ │ E7 → centrosome defects │',
' │ ↓ Loss of cell polarity │ │ ↓ Chromosomal instability │',
' └─────────────────────────┘ └─────────────────────────────┘',
' │ │',
' └──────────────┬────────────────────┘',
' ▼',
' COMBINED EFFECTS: Immortalization + Uncontrolled Proliferation + Genomic Instability',
' ▼',
' + Additional somatic mutations (cofactors: smoking, immunocompromise, co-infections)',
' ▼',
' CERVICAL INTRAEPITHELIAL NEOPLASIA (CIN 1 → CIN 2 → CIN 3)',
' ▼',
' INVASIVE CERVICAL CARCINOMA (SCC ~70% | Adenocarcinoma ~25%)',
]
for line in pathway:
if line == '':
story.append(Spacer(1, 0.1*cm))
else:
story.append(Paragraph(line, ParagraphStyle('path', fontName='Courier', fontSize=8.5,
textColor=DARK_GRAY, leading=12, spaceAfter=1)))
story.append(Spacer(1, 0.3*cm))
summary_tbl = [
['Feature', 'E6', 'E7'],
['Primary target', 'p53 (tumor suppressor)', 'pRB (tumor suppressor)'],
['Molecular mechanism', 'Ubiquitin-proteasome degradation via E6AP', 'Direct binding via LXCXE motif; E2F liberation'],
['Secondary targets', 'TERT (telomerase); PDZ proteins; focal adhesion', 'p21; p27; Cyclins A & E; HDACs; centrosomes'],
['Net functional result', 'Abrogates DNA damage response & apoptosis; immortalization; invasion', 'Forces G1/S transition; bypasses CDK inhibitors; genomic instability'],
['High-risk type hallmark', 'Higher p53 affinity than low-risk; PDZ binding motif', 'Higher pRB affinity; binds Cyclins A/E (absent in low-risk)'],
['Clinical marker', 'E6/E7 mRNA assay (APTIMA); gene expression', 'p16 overexpression (surrogate for pRB inactivation)'],
]
story.append(tbl(summary_tbl[0], summary_tbl[1:], widths=[3.5*cm, 5.5*cm, W_PAGE-9*cm]))
story.append(Spacer(1, 0.2*cm))
# SECTION 18
story += sec('18. REFERENCES AND SOURCES', styles)
refs = [
"Kumar V, Abbas AK, Aster JC. Robbins & Kumar Basic Pathology, 11th Edition. Elsevier. Chapter 6 (Neoplasia - Oncogenic DNA Viruses: HPV); Chapter 17 (Female Genital Tract - Cervical Neoplasia).",
"Kumar V, Abbas AK, Aster JC, Cotran RS. Robbins, Cotran & Kumar Pathologic Basis of Disease, 10th Edition. Elsevier. Chapter 7 (Neoplasia - HPV) and Chapter (Female Genital Tract).",
"Ryan KJ, Ray CG. Sherris & Ryan's Medical Microbiology, 8th Edition. McGraw-Hill. Chapter (Papillomaviruses - Replication in squamous epithelium; E6/E7 oncogenesis).",
"Berek JS, Novak E. Berek & Novak's Gynecology, 15th Edition. Lippincott Williams & Wilkins. Chapter 16 (Intraepithelial Disease of the Cervix, Vagina, and Vulva - HPV; E6/E7 oncoproteins).",
"Griffiths C, Barker J, Bleiker T, Chalmers R, Creamer D. Dermatology 2-Volume Set, 5th Edition. Elsevier. Chapter 79 (Papillomaviruses - Life Cycle; Oncogenic Potential; E6/E7 functions).",
"McPherson RA, Pincus MR. Henry's Clinical Diagnosis and Management by Laboratory Methods, 24th Edition. Elsevier. Chapter (Cervical Cancer - HPV E6/E7; CIN progression).",
"Fauci AS et al. Harrison's Principles of Internal Medicine, 22nd Edition. McGraw-Hill (2025). Chapter (HPV - Prevention; Vaccines; Gardasil-9).",
"zur Hausen H. Papillomaviruses and cancer: from basic studies to clinical application. Nat Rev Cancer. 2002;2(5):342-350. (Nobel Prize discovery paper).",
"Scheffner M, Werness BA, Huibregtse JM, et al. The E6 oncoprotein encoded by human papillomavirus types 16 and 18 promotes the degradation of p53. Cell. 1990;63(6):1129-1136.",
"Dyson N, Howley PM, Munger K, et al. The human papillomavirus-16 E7 oncoprotein is able to bind to the retinoblastoma gene product. Science. 1989;243(4893):934-937.",
]
for i, ref in enumerate(refs, 1):
story.append(Paragraph(f'{i}. {ref}', styles['bullet']))
story.append(Spacer(1, 1*cm))
story.append(HRFlowable(width='100%', thickness=1, color=MED_PURPLE))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(
'This document is for educational and research reference purposes. The discovery that HPV E6 '
'and E7 drive cervical carcinogenesis by targeting p53 and pRB earned the 2008 Nobel Prize in '
'Physiology or Medicine for Harald zur Hausen. This knowledge underpins both the development '
'of highly effective HPV vaccines and rational therapeutic strategies.',
styles['note']))
return story
def main():
doc = BaseDocTemplate(OUTPUT_PATH, pagesize=A4,
leftMargin=1.5*cm, rightMargin=1.5*cm,
topMargin=1.6*cm, bottomMargin=1.4*cm)
frame = Frame(doc.leftMargin, doc.bottomMargin, doc.width, doc.height, id='main')
template = PageTemplate(id='main', frames=frame, onPage=hf)
doc.addPageTemplates([template])
doc.build(content(S()))
print(f"PDF generated: {OUTPUT_PATH}")
if __name__ == '__main__':
main()
cd /home/daytona/workspace/endometrial-biopsy && python3 generate_e6e7_pdf.py 2>…
ls -lh /home/daytona/workspace/endometrial-biopsy/
HPV E6 E7 Cervical Cancer
PDF Document · PDF
| Activity | Detail |
|---|---|
| p53 degradation | E6 + E6AP (ubiquitin ligase) → tri-molecular complex → ubiquitinates p53 → proteasomal degradation |
| Consequence | No G1 arrest; no apoptosis; DNA damage accumulates; mutations survive |
| TERT activation | E6 transcriptionally activates TERT (telomerase catalytic subunit) → cellular immortalization |
| PDZ protein degradation | Degrades Dlg1, SCRIB, MAGI → loss of cell polarity → promotes invasion |
| High-risk specificity | High-risk E6 has higher affinity for p53; forms tri-molecular complex; has PDZ-binding motif. Low-risk E6 CANNOT do this. |
| Activity | Detail |
|---|---|
| pRB binding | E7 binds underphosphorylated pRB via LXCXE motif → displaces E2F transcription factors |
| E2F liberation | Free E2F activates Cyclin E, Cyclin A, PCNA, thymidine kinase → forced S-phase entry |
| p21 + p27 inactivation | Bypasses both the p53-downstream G1 brake (p21) and CDK2 inhibitor (p27) |
| Cyclin A + E activation | High-risk E7 directly binds and activates Cyclins A & E → CDK2 constitutively active |
| Centrosome defects | Centrosome duplication errors → multipolar spindles → chromosomal missegregation → aneuploidy |
| HDAC binding | E7 binds histone deacetylases → epigenetic silencing of TSGs |
Placental site trophoblastictumors and make detailed pdf
~/endometrial-biopsy/generate_pstt_pdf.py
#!/usr/bin/env python3
"""Generate a comprehensive PDF: Placental Site Trophoblastic Tumor (PSTT)."""
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import ParagraphStyle
from reportlab.lib.units import cm
from reportlab.platypus import (
Paragraph, Spacer, Table, TableStyle,
HRFlowable, PageBreak
)
from reportlab.lib.enums import TA_CENTER, TA_JUSTIFY
from reportlab.platypus import BaseDocTemplate, Frame, PageTemplate
from reportlab.lib.colors import HexColor
OUTPUT_PATH = "/home/daytona/workspace/endometrial-biopsy/PSTT_Placental_Site_Trophoblastic_Tumor.pdf"
# ── Palette ───────────────────────────────────────────────────────────────────
DARK_WINE = HexColor('#5c0a2e')
MED_WINE = HexColor('#8b1a4a')
LIGHT_PINK = HexColor('#fce8f0')
ACCENT_TEAL = HexColor('#0d6e6e')
ACCENT_GOLD = HexColor('#b5860d')
DARK_GRAY = HexColor('#2c2c2c')
MID_GRAY = HexColor('#555555')
TABLE_HDR = HexColor('#5c0a2e')
TABLE_ALT = HexColor('#fdf0f5')
W_PAGE = A4[0] - 3.0*cm
# ── Header/Footer ─────────────────────────────────────────────────────────────
def hf(canvas, doc):
canvas.saveState()
w, h = A4
canvas.setFillColor(DARK_WINE)
canvas.rect(0, h-1.2*cm, w, 1.2*cm, fill=1, stroke=0)
canvas.setFillColor(colors.white)
canvas.setFont('Helvetica-Bold', 9)
canvas.drawString(1.5*cm, h-0.8*cm, 'PLACENTAL SITE TROPHOBLASTIC TUMOR (PSTT)')
canvas.setFont('Helvetica', 8)
canvas.drawRightString(w-1.5*cm, h-0.8*cm, 'Gestational Trophoblastic Disease - Comprehensive Review')
canvas.setFillColor(DARK_WINE)
canvas.rect(0, 0, w, 0.9*cm, fill=1, stroke=0)
canvas.setFillColor(colors.white)
canvas.setFont('Helvetica', 8)
canvas.drawString(1.5*cm, 0.3*cm,
"Robbins & Kumar Basic Pathology | Robbins, Cotran & Kumar | Berek & Novak's Gynecology | Harrison's 22e")
canvas.drawRightString(w-1.5*cm, 0.3*cm, f'Page {doc.page}')
canvas.restoreState()
# ── Styles ────────────────────────────────────────────────────────────────────
def S():
s = {}
s['title'] = ParagraphStyle('t', fontName='Helvetica-Bold', fontSize=24, textColor=colors.white, alignment=TA_CENTER, spaceAfter=4)
s['subtitle'] = ParagraphStyle('st', fontName='Helvetica', fontSize=12, textColor=HexColor('#f9c9db'), alignment=TA_CENTER, spaceAfter=5)
s['h1'] = ParagraphStyle('h1', fontName='Helvetica-Bold', fontSize=13.5, textColor=colors.white, spaceAfter=5, spaceBefore=10, backColor=DARK_WINE, borderPadding=(5,10,5,10))
s['h2'] = ParagraphStyle('h2', fontName='Helvetica-Bold', fontSize=11, textColor=DARK_WINE, spaceAfter=4, spaceBefore=8)
s['h3'] = ParagraphStyle('h3', fontName='Helvetica-Bold', fontSize=10.5, textColor=MED_WINE, spaceAfter=3, spaceBefore=5)
s['h4'] = ParagraphStyle('h4', fontName='Helvetica-Bold', fontSize=10, textColor=ACCENT_TEAL, spaceAfter=2, spaceBefore=4)
s['body'] = ParagraphStyle('b', fontName='Helvetica', fontSize=10, textColor=DARK_GRAY, leading=15, spaceAfter=5, alignment=TA_JUSTIFY)
s['bullet'] = ParagraphStyle('bu', fontName='Helvetica', fontSize=10, textColor=DARK_GRAY, leading=14, spaceAfter=3, leftIndent=16)
s['sub'] = ParagraphStyle('su', fontName='Helvetica', fontSize=9.5, textColor=MID_GRAY, leading=13, spaceAfter=2, leftIndent=30)
s['note'] = ParagraphStyle('n', fontName='Helvetica-Oblique', fontSize=9, textColor=MID_GRAY, leading=13, spaceAfter=4, leftIndent=8, rightIndent=8)
s['source'] = ParagraphStyle('sr', fontName='Helvetica-Oblique', fontSize=8, textColor=MED_WINE, spaceAfter=5)
s['warn'] = ParagraphStyle('w', fontName='Helvetica-Bold', fontSize=10, textColor=HexColor('#a93226'), leading=14, spaceAfter=4)
s['key'] = ParagraphStyle('k', fontName='Helvetica-Bold', fontSize=10, textColor=ACCENT_TEAL, leading=14, spaceAfter=4)
s['toc'] = ParagraphStyle('tc', fontName='Helvetica', fontSize=10, textColor=DARK_GRAY, leading=17, spaceAfter=1)
s['box'] = ParagraphStyle('bx', fontName='Helvetica', fontSize=9.5, textColor=DARK_GRAY, leading=14, spaceAfter=0)
return s
def sec(text, styles):
return [Spacer(1, 0.2*cm), Paragraph(f' {text}', styles['h1']), Spacer(1, 0.12*cm)]
def cp(text, bold=False, color=None, size=9):
f = 'Helvetica-Bold' if bold else 'Helvetica'
c = color if color else DARK_GRAY
return Paragraph(str(text), ParagraphStyle('cell', fontName=f, fontSize=size, textColor=c, leading=size*1.45, spaceAfter=0))
def tbl(headers, rows, widths=None):
data = [[cp(h, bold=True, color=colors.white, size=9.5) for h in headers]] + \
[[cp(c) for c in row] for row in rows]
t = Table(data, colWidths=widths)
t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), TABLE_HDR),
('ROWBACKGROUNDS',(0,1), (-1,-1), [colors.white, TABLE_ALT]),
('GRID', (0,0), (-1,-1), 0.5, HexColor('#d8a0b8')),
('VALIGN', (0,0), (-1,-1), 'TOP'),
('ALIGN', (0,0), (-1,-1), 'LEFT'),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 7),
('RIGHTPADDING', (0,0), (-1,-1), 7),
]))
return t
def hl(para, bg=LIGHT_PINK, border=MED_WINE):
t = Table([[para]], colWidths=[W_PAGE])
t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), bg),
('LEFTPADDING', (0,0), (-1,-1), 12),
('RIGHTPADDING', (0,0), (-1,-1), 12),
('TOPPADDING', (0,0), (-1,-1), 8),
('BOTTOMPADDING', (0,0), (-1,-1), 8),
('BOX', (0,0), (-1,-1), 1.2, border),
]))
return t
# ── Story ─────────────────────────────────────────────────────────────────────
def content(styles):
story = []
# COVER
story.append(Spacer(1, 2.8*cm))
cov = Table([
[Paragraph('PLACENTAL SITE', styles['title'])],
[Paragraph('TROPHOBLASTIC TUMOR (PSTT)', styles['title'])],
[Paragraph('and Gestational Trophoblastic Disease', styles['subtitle'])],
[Paragraph('Pathology · Immunohistochemistry · Clinical Features · Diagnosis · Treatment · Prognosis', styles['subtitle'])],
], colWidths=[W_PAGE])
cov.setStyle(TableStyle([
('BACKGROUND', (0,0),(-1,-1), DARK_WINE),
('TOPPADDING', (0,0),(-1,-1), 8),
('BOTTOMPADDING',(0,0),(-1,-1), 8),
('LEFTPADDING', (0,0),(-1,-1), 18),
('RIGHTPADDING', (0,0),(-1,-1), 18),
]))
story.append(cov)
story.append(Spacer(1, 1.2*cm))
story.append(HRFlowable(width='100%', thickness=2, color=MED_WINE))
story.append(Spacer(1, 0.5*cm))
def ci(lbl, val):
return [Paragraph(lbl, ParagraphStyle('cl', fontName='Helvetica-Bold', fontSize=10, textColor=DARK_WINE, leading=14)),
Paragraph(val, ParagraphStyle('cv', fontName='Helvetica', fontSize=10, textColor=DARK_GRAY, leading=14))]
info = Table([
ci('Tumor Type', 'Malignant; arises from intermediate (extravillous) trophoblasts; <2% of all gestational trophoblastic neoplasms'),
ci('Cell of Origin', 'Intermediate trophoblast (implantation site-type) - cells that invade maternal decidua and myometrium'),
ci('Key Markers', 'hPL (human placental lactogen) HIGH | hCG LOW | CD146 | HSD3B1 | p63 NEGATIVE'),
ci('Key Features', 'Relatively chemotherapy-insensitive | Surgery (hysterectomy) is primary treatment | hCG low but reliable marker'),
ci('Sources', "Robbins & Kumar Basic Pathology | Robbins, Cotran & Kumar | Berek & Novak's Gynecology | Harrison's 22e"),
ci('Date', 'July 2026'),
], colWidths=[3.2*cm, W_PAGE-3.2*cm])
info.setStyle(TableStyle([
('TOPPADDING', (0,0),(-1,-1), 5),
('BOTTOMPADDING',(0,0),(-1,-1), 5),
('LINEBELOW', (0,0),(-1,-5), 0.5, HexColor('#cccccc')),
]))
story.append(info)
story.append(PageBreak())
# TOC
story += sec('TABLE OF CONTENTS', styles)
toc = [
('1.','Overview of Gestational Trophoblastic Disease (GTD)'),
('2.','Classification and Spectrum of GTD'),
('3.','Trophoblast Biology: Cell Types and Normal Function'),
('4.','Placental Site Trophoblastic Tumor (PSTT) - Introduction'),
('5.','Epidemiology and Risk Factors'),
('6.','Pathogenesis and Cell of Origin'),
('7.','Gross Pathology'),
('8.','Microscopic Pathology / Histology'),
('9.','Immunohistochemistry (IHC) Profile'),
('10.','Molecular and Genetic Features'),
('11.','Clinical Presentation'),
('12.','Diagnostic Investigations'),
(' 12.1','Serum hCG and hPL'),
(' 12.2','Imaging'),
(' 12.3','Histopathological Diagnosis'),
('13.','FIGO Staging of GTN'),
('14.','WHO Prognostic Scoring System'),
('15.','Differential Diagnosis'),
(' 15.1','Epithelioid Trophoblastic Tumor (ETT)'),
(' 15.2','Choriocarcinoma'),
(' 15.3','Exaggerated Placental Site Reaction'),
(' 15.4','Other Differentials'),
('16.','Treatment'),
(' 16.1','Surgical Management (Hysterectomy)'),
(' 16.2','Chemotherapy'),
(' 16.3','Management of Metastatic Disease'),
('17.','Prognosis and Prognostic Factors'),
('18.','Context: Complete Hydatidiform Mole, Partial Mole, and GTN Overview'),
('19.','Comparison Table: GTD Entities'),
('20.','Follow-Up and Surveillance'),
('21.','Fertility After GTN Treatment'),
('22.','References and Sources'),
]
for num, title in toc:
story.append(Paragraph(f'<b>{num}</b> {title}', styles['toc']))
story.append(PageBreak())
# SECTION 1
story += sec('1. OVERVIEW OF GESTATIONAL TROPHOBLASTIC DISEASE (GTD)', styles)
story.append(Paragraph(
'Gestational trophoblastic disease (GTD) encompasses a spectrum of tumors and tumorlike '
'conditions characterized by proliferation of placental tissue, either villous or trophoblastic. '
'These are among the rare human tumors that can be cured even in the presence of widespread '
'dissemination. GTD arises from abnormal proliferation of placental trophoblasts and includes '
'both benign and malignant entities.', styles['body']))
story.append(Paragraph(
'The malignant subset, collectively termed <b>gestational trophoblastic neoplasia (GTN)</b>, '
'includes invasive mole, choriocarcinoma, placental site trophoblastic tumor (PSTT), and '
'epithelioid trophoblastic tumor (ETT). Although GTN commonly follows molar pregnancy, it can '
'occur after any gestational event, including spontaneous or induced abortion, ectopic pregnancy, '
'or even a term delivery.', styles['body']))
story.append(Paragraph(
'All forms of GTD elaborate <b>human chorionic gonadotropin (hCG)</b> to varying degrees, '
'making hCG the critical serological marker for diagnosis, monitoring of treatment response, '
'and detection of relapse. The hallmark of GTD management is that even metastatic disease is '
'frequently curable with appropriate chemotherapy.', styles['body']))
story.append(Paragraph('<i>Sources: Robbins & Kumar Basic Pathology; Berek & Novak\'s Gynecology; Robbins, Cotran & Kumar</i>', styles['source']))
# SECTION 2
story += sec('2. CLASSIFICATION AND SPECTRUM OF GTD', styles)
gtd_data = [
['Entity', 'Category', 'Precursor', 'hCG', 'Key Feature'],
['Complete hydatidiform mole', 'Benign / premalignant', 'Androgenic diploid (46XX/XY)', 'Very high (>100,000 IU/L)', '2.5% risk of choriocarcinoma; 15% persistent GTN'],
['Partial hydatidiform mole', 'Benign / premalignant', 'Triploid (69,XXY)', 'Moderately elevated', 'Increased persistent GTN; rare choriocarcinoma'],
['Invasive mole', 'Malignant (GTN)', 'Complete mole (15%)', 'Elevated', 'Myometrial invasion; does not metastasize distantly'],
['Gestational Choriocarcinoma', 'Malignant (GTN)', 'Any pregnancy (50% mole)', 'Very high', 'Highly aggressive; highly chemosensitive; ~100% remission with chemo'],
['Placental Site Trophoblastic Tumor (PSTT)', 'Malignant (GTN)', 'Usually normal term pregnancy (~50%)', 'LOW (hPL high)', '<2% of GTN; intermediate trophoblast; RELATIVELY chemoresistant; surgery preferred'],
['Epithelioid Trophoblastic Tumor (ETT)', 'Malignant (GTN)', 'Any pregnancy; often long interval', 'LOW', 'Mononuclear trophoblast; p63+; may be cervical; chemoresistant like PSTT'],
]
story.append(tbl(gtd_data[0], gtd_data[1:], widths=[4*cm, 2.5*cm, 2.5*cm, 2*cm, W_PAGE-11*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph('<i>Sources: Berek & Novak\'s Gynecology; Robbins & Kumar Basic Pathology; Robbins, Cotran & Kumar</i>', styles['source']))
# SECTION 3
story += sec('3. TROPHOBLAST BIOLOGY: CELL TYPES AND NORMAL FUNCTION', styles)
story.append(Paragraph(
'Understanding PSTT requires knowledge of normal trophoblast cell types, as the tumor specifically '
'recapitulates the behavior of one particular trophoblast lineage.', styles['body']))
story.append(Paragraph('Three Main Trophoblast Cell Types', styles['h2']))
troph_data = [
['Cell Type', 'Location', 'Key Features', 'Markers', 'Role in GTD'],
['Cytotrophoblast (CT)', 'Inner layer of trophoblast shell; basal cells of villi', 'Mononuclear; proliferative stem cells; give rise to other types', 'hCG (low), p63+', 'Precursor population; present in molar villi'],
['Syncytiotrophoblast (ST)', 'Outer multinucleated layer of placenta', 'Multinucleated giant cells; cover chorionic villi; interface with maternal blood', 'hCG (HIGH), hPL (moderate)', 'Dominant cell in choriocarcinoma; produce most hCG'],
['Intermediate Trophoblast (IT) - also called Extravillous Trophoblast (EVT)', 'Invade maternal decidua and myometrium at implantation site', 'Mononuclear or binucleated; polygonal; abundant eosinophilic cytoplasm; invade vessels without necrosis', 'hPL (HIGH), CD146, HSD3B1; hCG LOW; p63 NEGATIVE (implantation site IT)', 'CELL OF ORIGIN OF PSTT'],
]
story.append(tbl(troph_data[0], troph_data[1:], widths=[3.5*cm, 3.5*cm, 4*cm, 2.5*cm, W_PAGE-13.5*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
'Intermediate trophoblasts are physiologically responsible for invading the maternal decidua '
'and spiral arteries during normal implantation, transforming these vessels into low-resistance '
'conduits for placental blood flow. PSTT represents the neoplastic counterpart of this '
'implantation-site intermediate trophoblast.', styles['body']))
story.append(Paragraph('<i>Sources: Robbins, Cotran & Kumar; Robbins & Kumar Basic Pathology</i>', styles['source']))
# SECTION 4
story += sec('4. PLACENTAL SITE TROPHOBLASTIC TUMOR (PSTT) - INTRODUCTION', styles)
story.append(hl(Paragraph(
'PSTT is defined as a neoplastic proliferation of extravillous (intermediate) trophoblasts '
'that arise at the implantation site of the placenta. It is one of the rarest forms of '
'gestational trophoblastic neoplasia, comprising less than 2% of all GTN cases. Despite '
'its rarity, it is clinically important because it does not respond well to standard '
'chemotherapy regimens used for choriocarcinoma, requiring a different management approach.', styles['box'])))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
'PSTT was first described as a distinct entity by Kurman et al. in 1976, who termed it '
'"trophoblastic pseudotumor" because of its deceptively bland appearance. It was later '
'recognized as a true malignant neoplasm capable of metastasis and death, and renamed '
'"placental site trophoblastic tumor."', styles['body']))
# SECTION 5
story += sec('5. EPIDEMIOLOGY AND RISK FACTORS', styles)
story.append(Paragraph(
'PSTT is extremely rare - only a few hundred cases have been reported in the world literature. '
'Key epidemiological features:', styles['body']))
epi_pts = [
'Comprises <2% of all gestational trophoblastic neoplasms',
'Can occur after any type of pregnancy: normal term delivery (~50%), spontaneous abortion, induced abortion, or hydatidiform mole',
'The interval from the antecedent pregnancy to diagnosis ranges from months to years (mean ~18 months after antecedent pregnancy)',
'Unlike choriocarcinoma where 50% follow molar pregnancy, PSTT most commonly follows a term delivery',
'Occurs predominantly in women of reproductive age but has been reported across a wide age range',
'No definitive risk factors identified; unlike complete mole, no clear geographical variation',
'Rarely, PSTT may arise after primary ectopic pregnancy',
'Concurrent normal pregnancy has been reported in very rare cases',
]
for item in epi_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('<i>Sources: Berek & Novak\'s Gynecology; Robbins & Kumar Basic Pathology</i>', styles['source']))
# SECTION 6
story += sec('6. PATHOGENESIS AND CELL OF ORIGIN', styles)
story.append(Paragraph(
'PSTT arises from <b>implantation-site intermediate trophoblasts (ISITs)</b> - the specialized '
'trophoblastic cells that normally infiltrate the decidua and myometrium during placentation:', styles['body']))
path_pts = [
'During normal implantation, ISITs invade the decidua, inner myometrium, and spiral arteries in a controlled, regulated fashion',
'ISITs characteristically invade vessels WITHOUT causing local destruction or hemorrhage - a feature shared by PSTT cells and distinguished from choriocarcinoma',
'ISITs show a "tropism for maternal vessels" - they replace the smooth muscle of vessel walls with trophoblastic cells, a process essential for creating low-resistance uteroplacental blood flow',
'In PSTT, this normal invasive behavior becomes neoplastic - cells proliferate uncontrollably and invade beyond the normal boundaries',
'The tumor grows as sheets of infiltrating mononuclear cells permeating between myometrial fibers - a pattern distinct from the vascular destruction seen in choriocarcinoma',
'PSTT cells produce predominantly hPL (human placental lactogen) rather than hCG, reflecting the differentiation state of their normal ISIT counterparts',
'Molecular studies show that PSTT cells are diploid and usually have an XX karyotype, consistent with trophoblast differentiation',
]
for item in path_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('<i>Sources: Robbins & Kumar Basic Pathology; Robbins, Cotran & Kumar</i>', styles['source']))
# SECTION 7
story += sec('7. GROSS PATHOLOGY', styles)
story.append(Paragraph(
'The gross appearance of PSTT reflects its origin at the implantation site and '
'infiltrative growth pattern:', styles['body']))
gross_pts = [
'PSTT presents as a <b>uterine mass</b> - usually a well-circumscribed but non-encapsulated endometrial/myometrial nodule or polypoid mass',
'Location: arises from the endometrium at the implantation site; may extend into the myometrium',
'Size: variable; typically 1-10 cm; usually smaller than choriocarcinoma at comparable clinical stage',
'Color: tan-brown to yellow-white; fleshy consistency',
'Cut surface: solid, with areas of necrosis in larger tumors; less hemorrhagic than choriocarcinoma (because ISITs invade without vascular destruction)',
'The tumor may perforate the myometrium, causing intraperitoneal bleeding, or erode into uterine vessels causing vaginal hemorrhage',
'Bulky necrotic tumor involving the uterine wall may serve as a nidus for infection',
'Chorionic villi are ABSENT on gross and microscopic examination - distinguishing it from molar disease',
'Contrast with choriocarcinoma: choriocarcinoma is typically hemorrhagic, necrotic, and destructive; PSTT is more infiltrative and less hemorrhagic',
]
for item in gross_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('<i>Sources: Berek & Novak\'s Gynecology; Robbins, Cotran & Kumar; Robbins & Kumar Basic Pathology</i>', styles['source']))
# SECTION 8
story += sec('8. MICROSCOPIC PATHOLOGY / HISTOLOGY', styles)
story.append(Paragraph(
'The histological appearance of PSTT is distinctive and reflects its intermediate '
'trophoblast cell of origin:', styles['body']))
story.append(Paragraph('Cellular Characteristics', styles['h2']))
histo_pts = [
'Tumor is composed predominantly of <b>polygonal mononuclear cells</b> with occasional binucleated cells',
'Cells have <b>abundant eosinophilic to clear cytoplasm</b> - the clear cytoplasm is due to glycogen accumulation',
'Nuclei are irregular, hyperchromatic with prominent nucleoli; nuclear pleomorphism is present but generally less severe than in choriocarcinoma',
'Mitotic figures are present but usually <5 per 10 high-power fields in localized disease; higher mitotic activity correlates with aggressive behavior',
'<b>No chorionic villi</b> - a critical distinguishing feature; villi are absent in all forms of GTN',
'Multinucleated syncytiotrophoblast cells are scanty or absent (unlike choriocarcinoma where they are prominent)',
]
for item in histo_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('Growth Pattern', styles['h2']))
growth_pts = [
'Tumor cells infiltrate between individual smooth muscle fibers of the myometrium in "single-file" or "streaming" patterns - without destroying the muscle cells (unlike choriocarcinoma)',
'This non-destructive infiltration is a hallmark - cells permeate through tissue in the same way normal ISITs invade during placentation',
'<b>Vascular invasion</b> is characteristic: tumor cells infiltrate and replace the smooth muscle of vessel walls, similar to normal trophoblastic vessel transformation',
'Fibrinoid material (eosinophilic acellular material) is characteristically deposited between tumor cells and adjacent tissues - reflects the normal fibrinoid deposition by ISITs',
'Areas of infarction-type necrosis may be present in larger tumors',
'The tumor-myometrium interface shows an infiltrative pattern without a well-defined capsule',
]
for item in growth_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('Key Histological Contrasts', styles['h2']))
hist_comp = [
['Feature', 'PSTT', 'Choriocarcinoma', 'ETT'],
['Cell type', 'Intermediate trophoblast (IT)', 'Cytotrophoblast + Syncytiotrophoblast (biphasic)', 'Mononuclear IT (chorion laeve-type)'],
['Cell morphology', 'Polygonal mononuclear/binucleated; eosinophilic cytoplasm', 'Anaplastic cyto + multinucleated syncytio', 'Mononuclear; clear/eosinophilic cytoplasm; nests with necrosis'],
['Chorionic villi', 'ABSENT', 'ABSENT', 'ABSENT'],
['Hemorrhage/necrosis', 'Minimal; infiltrative without destruction', 'Extensive; highly hemorrhagic and necrotic', 'Geographic "map-like" necrosis'],
['Syncytiotrophoblast', 'Rare/absent', 'Prominent (essential for diagnosis)', 'Rare/absent'],
['Mitoses', 'Low-moderate', 'High', 'Variable'],
['Fibrinoid material', 'Characteristic', 'Present but less prominent', 'Hyaline-like material'],
]
story.append(tbl(hist_comp[0], hist_comp[1:], widths=[3.5*cm, 4*cm, 4*cm, W_PAGE-11.5*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph('<i>Sources: Robbins & Kumar Basic Pathology; Robbins, Cotran & Kumar; Berek & Novak\'s</i>', styles['source']))
# SECTION 9
story += sec('9. IMMUNOHISTOCHEMISTRY (IHC) PROFILE', styles)
story.append(Paragraph(
'Immunohistochemistry is essential for confirming the diagnosis of PSTT and distinguishing '
'it from other trophoblastic tumors and non-trophoblastic neoplasms:', styles['body']))
ihc_data = [
['Marker', 'PSTT', 'Choriocarcinoma', 'ETT', 'Normal ISIT', 'Significance'],
['hPL (human placental lactogen)', 'DIFFUSELY POSITIVE (key marker)', 'Focal/weak', 'Focal', 'Strongly +', 'Confirms intermediate trophoblast origin'],
['hCG', 'Focal/weak or negative', 'DIFFUSELY POSITIVE', 'Focal/weak', 'Weak/focal', 'Low hCG distinguishes PSTT from choriocarcinoma'],
['CD146 (Mel-CAM, MUC18)', 'Positive', 'Variable', 'Variable', 'Positive', 'Trophoblast marker; positive in PSTT'],
['HSD3B1 (3β-HSD)', 'Positive', '-', '-', 'Positive', 'Intermediate trophoblast marker'],
['p63', 'NEGATIVE', 'Negative (ST) / + (CT)', 'POSITIVE (key differentiator)', 'Negative', 'p63 positivity distinguishes ETT from PSTT'],
['Inhibin-α', 'Variable (focal)', 'Positive', 'Focal', 'Positive', 'Trophoblast marker'],
['Ki-67 (proliferation index)', 'Low-moderate (<10% in localized)', 'High', 'Variable', '-', 'High Ki-67 correlates with aggressive PSTT'],
['Cytokeratin (AE1/AE3, CAM5.2)', 'Positive', 'Positive', 'Positive', 'Positive', 'Confirms epithelial/trophoblastic nature'],
['Vimentin', 'Positive', 'Negative', 'Positive', 'Positive', 'Useful in differential diagnosis'],
['PLAP (placental alkaline phosphatase)', 'Focal', 'Positive', 'Focal', 'Focal', 'Non-specific trophoblast marker'],
]
story.append(tbl(ihc_data[0], ihc_data[1:], widths=[3.5*cm, 2.5*cm, 2.5*cm, 2*cm, 2*cm, W_PAGE-12.5*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(hl(Paragraph(
'⚡ KEY IHC RULE: The combination of hPL POSITIVE + p63 NEGATIVE is the hallmark of PSTT. '
'ETT is hPL focal/weak + p63 POSITIVE. Choriocarcinoma is hCG STRONGLY POSITIVE + biphasic morphology.', styles['box'])))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph('<i>Sources: Robbins & Kumar Basic Pathology; Robbins, Cotran & Kumar; Berek & Novak\'s Gynecology</i>', styles['source']))
# SECTION 10
story += sec('10. MOLECULAR AND GENETIC FEATURES', styles)
story.append(Paragraph(
'PSTT has distinct molecular features compared to other trophoblastic tumors:', styles['body']))
mol_pts = [
'PSTT cells are DIPLOID - usually with an XX karyotype (unlike molar pregnancies which show excess paternal genetic material)',
'The diploid XX karyotype reflects derivation from mononuclear intermediate trophoblasts at the implantation site',
'Molecular genotyping can establish the gestational origin of PSTT by identifying paternal alleles in tumor tissue - useful when the antecedent pregnancy is uncertain',
'PSTT can be distinguished from non-gestational tumors (e.g., epithelioid smooth muscle tumors) by DNA genotyping showing paternal chromosomal contributions',
'TP53 mutations occur in a subset of PSTT and correlate with aggressive behavior',
'Unlike Type I endometrial carcinoma, PSTT does not arise from PTEN loss or estrogen stimulation',
'Telomerase activity is demonstrated in PSTT, similar to other malignancies',
'Rare cases associated with long interval from antecedent pregnancy may show accumulation of additional somatic mutations',
]
for item in mol_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('<i>Sources: Robbins, Cotran & Kumar; Berek & Novak\'s Gynecology</i>', styles['source']))
# SECTION 11
story += sec('11. CLINICAL PRESENTATION', styles)
story.append(Paragraph(
'The clinical presentation of PSTT is often insidious, and the diagnosis may be delayed '
'because of the long interval from the antecedent pregnancy and the relatively nonspecific '
'symptoms:', styles['body']))
story.append(Paragraph('Symptoms', styles['h2']))
symp_pts = [
'<b>Abnormal uterine bleeding</b>: most common symptom - irregular vaginal bleeding or menorrhagia; may be heavy',
'<b>Amenorrhea</b>: may occur due to tumor-related hormonal effects; can be mistaken for pregnancy',
'<b>Uterine enlargement</b>: asymmetric or generalized uterine enlargement on examination',
'<b>Serum hCG mildly elevated</b>: often <1,000 mIU/mL (compared to thousands-millions in choriocarcinoma); occasionally normal',
'<b>hPL elevated</b>: serum hPL may be elevated; useful when measured',
'<b>Nephrotic syndrome</b>: rare but described paraneoplastic manifestation; resolves with treatment',
'<b>Virilization</b>: extremely rare; due to androgen production by tumor',
'<b>Hyperprolactinemia</b>: occasional; hPL has lactogenic activity',
'<b>No hyperemesis</b>: unlike complete mole with very high hCG, PSTT does not cause hyperemesis gravidarum',
]
for item in symp_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('Metastatic Presentations', styles['h2']))
story.append(Paragraph(
'PSTT tends to remain confined to the uterus in most cases, metastasizing late in its course. '
'When metastases occur, sites include:', styles['body']))
met_pts = [
'Lungs (most common metastatic site - similar to other GTN)',
'Liver',
'Abdominal/pelvic lymph nodes',
'Brain (rare but reported)',
'Vagina',
'Symptoms of metastases may include hemoptysis, neurological deficits, or abnormal lymphadenopathy',
]
for item in met_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('<i>Sources: Berek & Novak\'s Gynecology; Robbins, Cotran & Kumar</i>', styles['source']))
# SECTION 12
story += sec('12. DIAGNOSTIC INVESTIGATIONS', styles)
story.append(Paragraph('12.1 Serum hCG and hPL', styles['h2']))
story.append(Paragraph(
'The hormonal profile of PSTT is its most distinctive clinical feature and directly reflects '
'its cell of origin:', styles['body']))
hcg_pts = [
'Serum hCG: characteristically LOW or mildly elevated - usually <1,000 mIU/mL, occasionally <100 mIU/mL; may even be within normal range in some cases',
'The low hCG level reflects the paucity of syncytiotrophoblast cells (the primary hCG producers) in PSTT',
'Intermediate trophoblasts produce predominantly hPL, not hCG',
'Serum hPL may be elevated and is a useful marker - but its measurement is not routinely available at all centres',
'hCG is still the recommended monitoring marker; even a low, stable, or rising low-level hCG is significant',
'Serial hCG monitoring is essential for detecting recurrence',
'A "phantom hCG" (false positive due to heterophilic antibodies) should be excluded if hCG is persistently low-level with no tumor found',
]
for item in hcg_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('12.2 Imaging', styles['h2']))
img_pts = [
'Transvaginal ultrasound (TVUS): uterine mass - may show increased vascularity on Doppler; non-specific appearance; helps define extent of myometrial involvement',
'MRI pelvis: best modality for assessing depth of myometrial invasion, extent of local disease, and parametrial involvement; superior to CT for local staging',
'CT chest/abdomen/pelvis: essential for staging - detects pulmonary metastases (most common distant site), lymphadenopathy, hepatic lesions',
'PET-CT: emerging role in detecting metabolically active disease, especially in cases with unexplained hCG elevation after apparently normal imaging',
'Brain MRI: warranted if neurological symptoms, high-risk features, or brain metastasis suspected',
]
for item in img_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('12.3 Histopathological Diagnosis', styles['h2']))
story.append(Paragraph(
'Definitive diagnosis requires histopathological examination with IHC. Tissue can be '
'obtained by:', styles['body']))
dx_pts = [
'Endometrial curettage (D&C): may obtain diagnostic material; however, the sample may be small or miss the tumor if superficial curettage is performed',
'Hysteroscopy-directed biopsy: allows targeted sampling of visible uterine lesion',
'Hysterectomy specimen: provides definitive diagnosis in most cases; recommended for localized disease',
'Biopsy of metastatic sites: may be necessary if the uterine primary cannot be sampled',
'IHC panel: hPL, hCG, p63, CD146, Ki-67 is essential for classification',
]
for item in dx_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('<i>Sources: Berek & Novak\'s Gynecology; Robbins, Cotran & Kumar</i>', styles['source']))
# SECTION 13
story += sec('13. FIGO STAGING OF GTN (INCLUDING PSTT)', styles)
story.append(Paragraph(
'The FIGO anatomical staging system for gestational trophoblastic neoplasia is used for PSTT:', styles['body']))
figo_data = [
['FIGO Stage', 'Definition'],
['Stage I', 'Disease confined to the uterus'],
['Stage II', 'GTN extends outside the uterus but is limited to the genital structures (adnexa, vagina, broad ligament)'],
['Stage III', 'GTN extends to the lungs, with or without known genital tract involvement'],
['Stage IV', 'All other metastatic sites (brain, liver, kidney, GI tract)'],
]
story.append(tbl(figo_data[0], figo_data[1:], widths=[3*cm, W_PAGE-3*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
'Note: The WHO prognostic scoring system is used for risk stratification in choriocarcinoma and '
'invasive mole. PSTT is treated differently - standard PSTT management is primarily surgical '
'for Stage I disease. The WHO scoring system has limited applicability to PSTT because PSTT '
'does not respond to chemotherapy as predictably as choriocarcinoma.', styles['body']))
story.append(Paragraph('<i>Source: Berek & Novak\'s Gynecology</i>', styles['source']))
# SECTION 14
story += sec('14. WHO PROGNOSTIC SCORING SYSTEM (CONTEXT FOR GTN)', styles)
story.append(Paragraph(
'The WHO prognostic scoring system (modified) is used for risk stratification of choriocarcinoma '
'and invasive mole (NOT primarily PSTT, but provided here for context within GTN management):', styles['body']))
who_data = [
['Prognostic Factor', '0 points', '1 point', '2 points', '4 points'],
['Age', '<40 years', '≥40 years', '-', '-'],
['Antecedent pregnancy', 'Mole', 'Abortion', 'Term pregnancy', '-'],
['Interval from index pregnancy (months)', '<4', '4-6', '7-12', '>12'],
['Pretreatment hCG (mIU/mL)', '<10³', '10³-10⁴', '10⁴-10⁵', '>10⁵'],
['Largest tumor size (cm)', '<3', '3-4', '≥5', '-'],
['Site of metastases', 'Lung, vagina', 'Spleen, kidney', 'GI tract', 'Brain, liver'],
['Number of metastases', '0', '1-4', '5-8', '>8'],
['Prior chemotherapy', 'None', '-', 'Single drug', '≥2 drugs'],
]
story.append(tbl(who_data[0], who_data[1:], widths=[4.5*cm, 2.5*cm, 2.5*cm, 2.5*cm, W_PAGE-12*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
'Total score ≤6 = Low risk (single-agent chemotherapy); Total score ≥7 = High risk '
'(combination chemotherapy: EMA-CO or EP-EMA regimen). For PSTT specifically: hysterectomy '
'is the treatment of choice for localized disease regardless of this score.', styles['body']))
# SECTION 15
story += sec('15. DIFFERENTIAL DIAGNOSIS', styles)
story.append(Paragraph('15.1 Epithelioid Trophoblastic Tumor (ETT)', styles['h2']))
story.append(Paragraph(
'ETT is the closest differential to PSTT, both arising from intermediate trophoblast cells. '
'However, ETT arises from <b>chorion laeve-type intermediate trophoblasts</b> (smooth chorion, '
'not implantation site), giving it distinct features:', styles['body']))
ett_diff = [
'ETT most commonly presents following pregnancy with amenorrhea and sometimes produces a palpable mass',
'Most ETTs are intrauterine or cervical in location; extrauterine ETT also occurs',
'ETT cells are MONONUCLEAR with abundant CLEAR cytoplasm, growing in nests surrounded by hyaline-like material',
'Geographic "map-like" necrosis is characteristic of ETT (vs. infarction-type necrosis in PSTT)',
'KEY IHC DIFFERENTIATOR: ETT is p63 POSITIVE; PSTT is p63 NEGATIVE',
'Both PSTT and ETT are relatively chemoresistant; surgical management is preferred for localized disease',
]
for item in ett_diff:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('15.2 Choriocarcinoma', styles['h2']))
chorio_diff = [
'Choriocarcinoma has BIPHASIC morphology: sheets of anaplastic cytotrophoblast + multinucleated syncytiotrophoblast - NO villi',
'hCG is STRONGLY and DIFFUSELY POSITIVE (vs. low/focal in PSTT)',
'Extensive hemorrhage and necrosis are hallmarks (vs. PSTT which infiltrates without destruction)',
'Highly chemosensitive - nearly 100% remission even with metastases (vs. PSTT which is chemoresistant)',
'Can arise after any pregnancy; 50% after molar pregnancy (vs. PSTT usually after term delivery)',
]
for item in chorio_diff:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('15.3 Exaggerated Placental Site (EPS) Reaction', styles['h2']))
story.append(Paragraph(
'EPS is a NON-NEOPLASTIC exuberant infiltration of intermediate trophoblasts at the '
'implantation site. Key distinctions from PSTT:', styles['body']))
eps_diff = [
'EPS is usually found incidentally in curettage specimens from early pregnancy or molar evacuation',
'Histologically similar to PSTT but NO mitoses (vs. PSTT which has mitotic activity)',
'No mass lesion; no clinical symptoms attributable to trophoblastic tumor',
'Interspersed decidual cells and inflammatory cells are present (vs. PSTT which shows predominantly tumor)',
'Not associated with elevated hCG or hPL',
'No treatment required - incidental and benign',
]
for item in eps_diff:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('15.4 Other Differentials', styles['h2']))
other_diff_data = [
['Differential', 'Key Distinguishing Features'],
['Epithelioid leiomyosarcoma', 'No trophoblastic markers (hPL, hCG negative); smooth muscle markers positive (SMA, desmin); no gestational context'],
['Epithelioid smooth muscle tumor (PEComa)', 'HMB-45 positive, SMA positive; trophoblast markers negative'],
['Endometrial carcinoma (clear cell type)', 'Cytokeratin+, EMA+, hPL/hCG negative; p53 mutations; older patients'],
['Metastatic carcinoma to uterus', 'CK7, CK20, other lineage markers positive; hPL/hCG negative; clinical history'],
['Intraplacental choriocarcinoma', 'Found within placental tissue; biphasic; villi present in surrounding tissue'],
]
story.append(tbl(other_diff_data[0], other_diff_data[1:], widths=[5*cm, W_PAGE-5*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph('<i>Sources: Robbins, Cotran & Kumar; Berek & Novak\'s Gynecology</i>', styles['source']))
# SECTION 16
story += sec('16. TREATMENT', styles)
story.append(Paragraph('16.1 Surgical Management (Hysterectomy)', styles['h2']))
story.append(Paragraph(
'Surgery is the cornerstone of PSTT management, in stark contrast to choriocarcinoma where '
'chemotherapy achieves near-universal cure. This is because PSTT is relatively resistant to '
'standard chemotherapy regimens:', styles['body']))
surg_pts = [
'<b>Total abdominal hysterectomy (TAH) with bilateral salpingo-oophorectomy (BSO)</b> is the treatment of choice for Stage I PSTT',
'The ovaries may be preserved in young women with Stage I disease, as PSTT does not commonly spread to the ovaries',
'Lymph node dissection: pelvic lymph node sampling is recommended because PSTT has a greater tendency for lymph node metastasis compared to choriocarcinoma',
'Patients with localized disease treated surgically have a GOOD PROGNOSIS',
'For women who desire fertility preservation with Stage I, very small lesion: hysteroscopic resection has been attempted in selected cases with close monitoring - this is experimental and carries high recurrence risk',
'Surgical excision of resectable metastatic sites may be indicated (e.g., pulmonary resection) as part of combined modality treatment',
]
for item in surg_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('16.2 Chemotherapy', styles['h2']))
story.append(Paragraph(
'PSTT is <b>relatively insensitive to standard GTN chemotherapy</b> regimens. This is its '
'most important clinical distinction from choriocarcinoma:', styles['body']))
chemo_pts = [
'Standard single-agent regimens (methotrexate, actinomycin D) used for low-risk choriocarcinoma have POOR efficacy in PSTT',
'EMA-CO (etoposide, methotrexate, actinomycin D, cyclophosphamide, vincristine) - the standard for high-risk GTN - also has reduced efficacy in PSTT',
'EP-EMA (etoposide, cisplatin + etoposide, methotrexate, actinomycin D) is currently the preferred chemotherapy regimen for metastatic PSTT',
'BEP (bleomycin, etoposide, cisplatin) has also been used in metastatic PSTT',
'Chemotherapy is used for: metastatic disease (Stages II-IV), recurrent PSTT after surgery, or when surgery is not feasible',
'10-15% of patients with disseminated PSTT die of disease despite aggressive treatment',
'The relative chemoresistance of PSTT is thought to be due to differences in drug transport, DNA repair mechanisms, or cell cycle kinetics of intermediate trophoblasts',
]
for item in chemo_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('16.3 Management of Metastatic Disease', styles['h2']))
story.append(Paragraph(
'Metastatic PSTT is treated with a multimodality approach:', styles['body']))
met_tx = [
'EP-EMA combination chemotherapy is the preferred regimen',
'Surgical resection of isolated metastases (especially pulmonary) combined with chemotherapy',
'Radiation therapy: plays a limited role; may be used for brain metastases or hemorrhagic complications at specific sites',
'Response monitoring: serial hCG levels + imaging',
'Second-line regimens (for chemotherapy-refractory disease): no established standard; clinical trials recommended',
'Overall, the prognosis for metastatic PSTT is significantly worse than for metastatic choriocarcinoma',
]
for item in met_tx:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('<i>Sources: Berek & Novak\'s Gynecology; Robbins, Cotran & Kumar</i>', styles['source']))
# SECTION 17
story += sec('17. PROGNOSIS AND PROGNOSTIC FACTORS', styles)
story.append(Paragraph(
'The prognosis of PSTT is highly dependent on stage at presentation:', styles['body']))
prog_data = [
['Stage / Scenario', 'Prognosis', 'Survival'],
['Stage I (confined to uterus)', 'GOOD - surgical cure achievable', '>95% long-term survival with hysterectomy'],
['Stage II-III (regional/pulmonary spread)', 'Intermediate', 'Variable; combined surgery + chemotherapy; ~60-80% survival'],
['Stage IV (distant metastases) / Disseminated disease', 'POOR', '10-15% mortality even with aggressive treatment'],
['Recurrent PSTT after surgery', 'Guarded', 'Depends on metastatic sites; EP-EMA chemotherapy'],
]
story.append(tbl(prog_data[0], prog_data[1:], widths=[5*cm, 3.5*cm, W_PAGE-8.5*cm]))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph('Adverse Prognostic Factors', styles['h2']))
prog_factors = [
'Long interval (>2 years) from antecedent pregnancy to diagnosis - most important adverse prognostic factor',
'Deep myometrial invasion or extrauterine spread at time of diagnosis',
'High mitotic index (>5 mitoses per 10 HPF)',
'High Ki-67 proliferation index',
'Metastatic disease at presentation',
'Cervical involvement',
'Antecedent non-molar pregnancy (the tumor has had longer to accumulate mutations)',
'p53 mutations (in molecular studies)',
]
for item in prog_factors:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph(
'Favorable prognosis: patients with PSTT limited to endometrium and myometrium have an '
'<b>indolent clinical course</b> and generally excellent outcome after surgical resection.', styles['key']))
story.append(Paragraph('<i>Sources: Robbins & Kumar Basic Pathology; Robbins, Cotran & Kumar; Berek & Novak\'s</i>', styles['source']))
# SECTION 18
story += sec('18. CONTEXT: COMPLETE MOLE, PARTIAL MOLE, AND GTN OVERVIEW', styles)
story.append(Paragraph(
'To fully understand PSTT, it must be placed in the broader context of GTD:', styles['body']))
story.append(Paragraph('Hydatidiform Mole', styles['h2']))
mole_pts = [
'Complete mole: diploid 46XX (androgenesis - all paternal); no embryonic development; ALL chorionic villi edematous; risk: 2.5% choriocarcinoma, 15% persistent GTN; hCG often >100,000 IU/L',
'Partial mole: triploid 69XXY (one egg + two sperm); some normal villi; embryonic parts may be present; risk: increased persistent GTN but rare choriocarcinoma',
'Both types produce characteristic vesicular ultrasound pattern (snowstorm appearance)',
'Treatment: suction curettage; oxytocin; Rh immune globulin for Rh-negative patients',
]
for item in mole_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('Gestational Choriocarcinoma', styles['h2']))
chorio_pts = [
'Follows any gestational event; 50% from molar pregnancy; 25% from normal term delivery; 25% from abortion or ectopic',
'Histology: BIPHASIC - sheets of anaplastic cytotrophoblast + syncytiotrophoblast; NO villi; extensive hemorrhage and necrosis',
'Highly vascular with hematogenous spread: lungs (50%), vagina (30-40%), brain, liver, kidneys',
'Extremely sensitive to chemotherapy: nearly 100% remission even with distant metastases',
'Chemotherapy: methotrexate or actinomycin D for low-risk; EMA-CO for high-risk',
]
for item in chorio_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
# SECTION 19
story += sec('19. COMPARISON TABLE: ALL GTD ENTITIES', styles)
comp = [
['Feature', 'Complete Mole', 'Partial Mole', 'Choriocarcinoma', 'PSTT', 'ETT'],
['Origin', 'Villous trophoblast (androgenic)', 'Villous trophoblast (triploid)', 'Cytotrophoblast + Syncytiotrophoblast', 'Implantation site IT (intermediate trophoblast)', 'Chorion laeve IT'],
['Chorionic villi', 'Present (all edematous)', 'Present (focal)', 'ABSENT', 'ABSENT', 'ABSENT'],
['Karyotype', 'Diploid (46XX/XY) paternal', 'Triploid (69XXY)', 'Variable', 'Diploid (usually 46XX)', 'Variable'],
['hCG level', 'Very high', 'Moderately elevated', 'Very high (often >100,000)', 'LOW / mildly elevated', 'Low/focal'],
['hPL', '-', '-', 'Focal', 'HIGH (key marker)', 'Focal/weak'],
['p63 IHC', 'CT+', '-', 'CT+', 'NEGATIVE', 'POSITIVE'],
['Hemorrhage', 'Variable (evacuation)', 'Variable', 'Extensive', 'Minimal (infiltrative)', 'Moderate/geographic necrosis'],
['Cancer risk', '2.5% chorio; 15% GTN', 'Rare chorio; increased GTN', 'IS the cancer', '<2% of GTN; 10-15% die disseminated', 'Rare; similar to PSTT'],
['Treatment', 'Suction curettage', 'Suction curettage', 'Chemotherapy (MTX/AcD/EMA-CO)', 'HYSTERECTOMY + EP-EMA', 'Hysterectomy + EP-EMA'],
['Chemosensitivity', 'N/A', 'N/A', 'VERY HIGH (~100% remission)', 'LOW (relatively resistant)', 'LOW (relatively resistant)'],
]
story.append(tbl(comp[0], comp[1:], widths=[3*cm, 2.5*cm, 2.5*cm, 3*cm, 3*cm, W_PAGE-14*cm]))
story.append(Spacer(1, 0.2*cm))
# SECTION 20
story += sec('20. FOLLOW-UP AND SURVEILLANCE', styles)
story.append(Paragraph(
'After treatment of PSTT, structured surveillance is essential:', styles['body']))
fu_pts = [
'Serial serum hCG monitoring: even though baseline hCG is low in PSTT, any rise in hCG after treatment indicates recurrence',
'After hysterectomy for Stage I PSTT: hCG monitoring every 2 weeks for 3 months, then monthly for 1 year',
'CT chest/abdomen/pelvis: at completion of treatment; follow-up imaging as clinically indicated',
'Long-term surveillance is important because PSTT can recur years after initial treatment (unlike choriocarcinoma which recurs early)',
'Physical examination including pelvic examination at each follow-up visit',
'Patients with GTN in general: after achieving normal hCG for 3 consecutive weeks (weekly) and then normal for 6 consecutive months (monthly), the risk of developing recurrent GTN approaches zero',
'Contraception: effective contraception recommended during surveillance period to allow accurate hCG interpretation',
]
for item in fu_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('<i>Source: Berek & Novak\'s Gynecology</i>', styles['source']))
# SECTION 21
story += sec('21. FERTILITY AFTER GTN TREATMENT', styles)
story.append(Paragraph(
'Fertility is an important consideration in young women with GTN:', styles['body']))
fert_pts = [
'After achieving remission with chemotherapy for choriocarcinoma or low-grade GTN: patients can anticipate normal future reproduction',
'Multiple studies confirm that chemotherapy for GTN does NOT significantly increase rates of congenital anomalies, spontaneous abortion, or premature birth in subsequent pregnancies',
'Women are generally advised to wait 6-12 months after completing treatment before attempting pregnancy (to allow hCG to remain normal and confirm complete remission)',
'PSTT specific: hysterectomy is the standard treatment for localized disease, which eliminates natural fertility; uterine conservation with hysteroscopic resection has been attempted in very selected young women with small Stage I lesions, but this is not standard of care',
'For younger women with PSTT requiring hysterectomy: gestational surrogacy using their own oocytes may be discussed if ovaries are preserved',
'The long-term fertility concern is particularly relevant given that PSTT patients are often younger (reproductive-age women after term delivery)',
]
for item in fert_pts:
story.append(Paragraph(f'• {item}', styles['bullet']))
story.append(Paragraph('<i>Source: Berek & Novak\'s Gynecology</i>', styles['source']))
# SECTION 22
story += sec('22. REFERENCES AND SOURCES', styles)
refs = [
"Kumar V, Abbas AK, Aster JC. Robbins & Kumar Basic Pathology, 11th Edition. Elsevier. Chapter 17 (Female Genital Tract - Gestational Trophoblastic Disease; PSTT; Choriocarcinoma).",
"Kumar V, Abbas AK, Aster JC, Cotran RS. Robbins, Cotran & Kumar Pathologic Basis of Disease, 10th Edition. Elsevier. Chapter 22 (Female Genital Tract - GTD; PSTT; ETT; Choriocarcinoma).",
"Berek JS, Novak E. Berek & Novak's Gynecology, 15th Edition. Lippincott Williams & Wilkins. Chapter 41 (Gestational Trophoblastic Disease - PSTT, ETT, GTN Management).",
"Fauci AS et al. Harrison's Principles of Internal Medicine, 22nd Edition. McGraw-Hill (2025). Chapter on Gestational Trophoblastic Tumors.",
"Kurman RJ, Scully RE, Norris HJ. Trophoblastic pseudotumor of the uterus: an exaggerated form of syncytial endometritis simulating a malignant tumor. Cancer. 1976;38(3):1214-1226. [First description of PSTT].",
"Shih IM, Kurman RJ. Placental site trophoblastic tumor - past present and future. Annu Rev Pathol. 2006;1:171-189.",
"Lybol C, Westermann AM, et al. Relapse rates and risk factors for relapse in PSTT. Gynecol Oncol. 2012.",
"Schmid P, Nagai Y, et al. Prognostic markers and long-term outcome of placental-site trophoblastic tumours: a retrospective observational study. Lancet. 2009;374(9683):48-55.",
"FIGO Committee on Gynecologic Oncology. Current FIGO staging for cancer of the vagina, fallopian tube, ovary, and gestational trophoblastic neoplasia. Int J Gynaecol Obstet. 2009;105(1):3-4.",
"Berkowitz RS, Goldstein DP. Current management of gestational trophoblastic diseases. Gynecol Oncol. 2009;112(3):654-662.",
]
for i, ref in enumerate(refs, 1):
story.append(Paragraph(f'{i}. {ref}', styles['bullet']))
story.append(Spacer(1, 0.8*cm))
story.append(HRFlowable(width='100%', thickness=1, color=MED_WINE))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(
'This document is for educational and clinical reference purposes. PSTT is a rare and '
'diagnostically challenging entity. Correct classification using IHC (hPL positive, p63 negative) '
'is critical to avoid inappropriate chemotherapy alone, and to ensure that surgical management '
'(hysterectomy) is prioritized for localized disease.',
styles['note']))
return story
def main():
doc = BaseDocTemplate(OUTPUT_PATH, pagesize=A4,
leftMargin=1.5*cm, rightMargin=1.5*cm,
topMargin=1.6*cm, bottomMargin=1.4*cm)
frame = Frame(doc.leftMargin, doc.bottomMargin, doc.width, doc.height, id='main')
template = PageTemplate(id='main', frames=frame, onPage=hf)
doc.addPageTemplates([template])
doc.build(content(S()))
print(f"PDF generated: {OUTPUT_PATH}")
if __name__ == '__main__':
main()
cd /home/daytona/workspace/endometrial-biopsy && python3 generate_pstt_pdf.py 2>…
ls -lh /home/daytona/workspace/endometrial-biopsy/PSTT_Placental_Site_Trophoblas…
PSTT Placental Site Trophoblastic Tumor
PDF Document · PDF