Cervical cancer
"cervical cancer"[MeSH Terms] AND ("screening" OR "treatment" OR "prevention")
cervical cancer 2025 2026 updated guidelines screening treatment
| Risk Factor | Notes |
|---|---|
| HPV infection | Necessary, not sufficient |
| Early onset of sexual activity | |
| Multiple sexual partners | |
| Immunocompromise (HIV) | |
| Smoking | |
| Long-term oral contraceptive use | RR ~1.6-2.2 with 5-10+ years use; risk returns to baseline ~10 yrs after stopping |
| No cervical screening | |
| Lower socioeconomic status | |
| Lack of condom use |
| Cervical Cytology/Histopathology | Classification |
|---|---|
| Very mild / Mild dysplasia | CIN 1 - Low-grade SIL (LSIL) |
| Moderate dysplasia | CIN 2 - High-grade SIL (HSIL) |
| Severe dysplasia / Carcinoma in situ | CIN 3 - HSIL |
| Invasive carcinoma | Invasive cancer |
| Stage | Description | Usual Treatment |
|---|---|---|
| IA1 | Microscopic invasion <3 mm depth | Conization or hysterectomy |
| IA2 | Microscopic invasion 3-5 mm | Radical hysterectomy or CRT |
| IB1 | Invasion ≥5 mm, tumor <2 cm | Radical hysterectomy or CRT |
| IB2 | Tumor ≥2 cm and <4 cm | Radical hysterectomy or CRT |
| IB3 | Tumor ≥4 cm, confined to cervix | Radical hysterectomy or CRT |
| IIA1 | Beyond uterus, upper 2/3 vagina, <4 cm | Radical hysterectomy or CRT |
| IIA2 | Beyond uterus, upper 2/3 vagina, ≥4 cm | CRT |
| IIB | Parametrial involvement (not to pelvic wall) | CRT |
| IIIA | Lower 1/3 vagina involved | CRT |
| IIIB | Pelvic wall extension, hydronephrosis, or regional nodes | CRT |
| IIIC | Pelvic or para-aortic lymph node metastasis | CRT |
| IVA | Bladder or bowel mucosa involvement | CRT |
| IVB | Distant metastases | Chemotherapy |
| Stage | Primary Treatment |
|---|---|
| Stage 0 (CIS) | Conization, hysterectomy |
| Stage IA1 (no LVSI) | Conization or simple hysterectomy |
| Stage IA1 (with LVSI) | Radical hysterectomy |
| Stage IA2 - IIA2 | Radical hysterectomy or chemoradiation (CRT) |
| Stage IIB - IVA | Chemoradiation (definitive RT + weekly cisplatin) |
| Stage IVB | Systemic chemotherapy |
Create a quick reference PDF on cervical cancer screening guidelines
ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace not found"
mkdir -p /home/daytona/workspace/cervical-cancer-pdf && python3 -c "from reportl…
~/cervical-cancer-pdf/generate_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm, cm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, KeepTogether
)
from reportlab.platypus.flowables import BalancedColumns
from reportlab.lib.colors import HexColor
OUTPUT = "/home/daytona/workspace/cervical-cancer-pdf/Cervical_Cancer_Screening_Guidelines.pdf"
# ── Colour palette ───────────────────────────────────────────────
TEAL = HexColor("#006B6B")
TEAL_LITE = HexColor("#E0F4F4")
PINK = HexColor("#C0395A")
PINK_LITE = HexColor("#FDE8EE")
GOLD = HexColor("#E8A020")
GOLD_LITE = HexColor("#FEF6E4")
GREY_DARK = HexColor("#2C2C2C")
GREY_MID = HexColor("#555555")
GREY_LITE = HexColor("#F5F5F5")
WHITE = colors.white
# ── Document setup ───────────────────────────────────────────────
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
leftMargin=18*mm, rightMargin=18*mm,
topMargin=18*mm, bottomMargin=18*mm,
title="Cervical Cancer Screening Guidelines – Quick Reference",
author="Orris Medical Reference",
)
W, H = A4
content_w = W - 36*mm # usable width
# ── Styles ───────────────────────────────────────────────────────
styles = getSampleStyleSheet()
def S(name, **kw):
return ParagraphStyle(name, **kw)
title_style = S("title",
fontSize=22, leading=26, textColor=WHITE, fontName="Helvetica-Bold",
alignment=TA_CENTER, spaceAfter=4)
subtitle_style = S("subtitle",
fontSize=11, leading=14, textColor=HexColor("#DDFAFA"), fontName="Helvetica",
alignment=TA_CENTER)
section_hdr = S("sec_hdr",
fontSize=12, leading=15, textColor=WHITE, fontName="Helvetica-Bold",
alignment=TA_LEFT, spaceBefore=2, spaceAfter=2)
body = S("body",
fontSize=9, leading=13, textColor=GREY_DARK, fontName="Helvetica",
alignment=TA_JUSTIFY, spaceAfter=4)
body_bold = S("body_bold",
fontSize=9, leading=13, textColor=GREY_DARK, fontName="Helvetica-Bold",
alignment=TA_LEFT)
bullet_style = S("bullet",
fontSize=9, leading=13, textColor=GREY_DARK, fontName="Helvetica",
leftIndent=10, bulletIndent=0, spaceAfter=2)
footnote_style = S("footnote",
fontSize=7.5, leading=10, textColor=GREY_MID, fontName="Helvetica-Oblique",
alignment=TA_LEFT)
cell_hdr = S("cell_hdr",
fontSize=8.5, leading=11, textColor=WHITE, fontName="Helvetica-Bold",
alignment=TA_CENTER)
cell_body = S("cell_body",
fontSize=8.5, leading=11, textColor=GREY_DARK, fontName="Helvetica",
alignment=TA_LEFT)
cell_center = S("cell_center",
fontSize=8.5, leading=11, textColor=GREY_DARK, fontName="Helvetica",
alignment=TA_CENTER)
warning_style = S("warning",
fontSize=8.5, leading=12, textColor=HexColor("#7A1A00"), fontName="Helvetica",
alignment=TA_LEFT)
# ── Helper: coloured section banner ─────────────────────────────
def banner(text, bg=TEAL, text_col=WHITE, font_size=11):
tbl = Table([[Paragraph(text, S("bh",
fontSize=font_size, leading=font_size+3,
textColor=text_col, fontName="Helvetica-Bold",
alignment=TA_LEFT))]],
colWidths=[content_w])
tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 8),
("RIGHTPADDING", (0,0), (-1,-1), 8),
("ROUNDEDCORNERS", [4,4,4,4]),
]))
return tbl
def spacer(h=4): return Spacer(1, h*mm)
def hr(col=TEAL, thickness=0.5):
return HRFlowable(width="100%", thickness=thickness, color=col, spaceAfter=3, spaceBefore=3)
# ════════════════════════════════════════════════════════════════
# BUILD STORY
# ════════════════════════════════════════════════════════════════
story = []
# ── HEADER BANNER ────────────────────────────────────────────────
header_data = [[
Paragraph("Cervical Cancer Screening Guidelines", title_style),
Paragraph("Quick Reference Card | Based on USPSTF · ACOG · ACS Recommendations | 2025", subtitle_style),
]]
header_tbl = Table([[
Paragraph("Cervical Cancer Screening Guidelines", title_style),
]], colWidths=[content_w])
header_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), TEAL),
("TOPPADDING", (0,0), (-1,-1), 10),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 12),
("RIGHTPADDING", (0,0), (-1,-1), 12),
]))
sub_tbl = Table([[
Paragraph("Quick Reference Card • USPSTF / ACOG / ACS Recommendations • 2025", subtitle_style),
]], colWidths=[content_w])
sub_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), PINK),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 12),
("RIGHTPADDING", (0,0), (-1,-1), 12),
]))
story += [header_tbl, sub_tbl, spacer(4)]
# ── SECTION 1: WHO SHOULD BE SCREENED ───────────────────────────
story.append(banner("1. WHO SHOULD BE SCREENED?", bg=TEAL))
story.append(spacer(2))
who_data = [
[Paragraph("Population", cell_hdr),
Paragraph("Screening?", cell_hdr),
Paragraph("Notes", cell_hdr)],
[Paragraph("Women 21–65 years with a cervix", cell_body),
Paragraph("YES", S("yes", fontSize=8.5, fontName="Helvetica-Bold",
textColor=HexColor("#006600"), alignment=TA_CENTER)),
Paragraph("Routine screening applies regardless of sexual history", cell_body)],
[Paragraph("Women <21 years", cell_body),
Paragraph("NO", S("no", fontSize=8.5, fontName="Helvetica-Bold",
textColor=PINK, alignment=TA_CENTER)),
Paragraph("Do not screen, even if sexually active", cell_body)],
[Paragraph("Women >65 years", cell_body),
Paragraph("STOP*", S("stop", fontSize=8.5, fontName="Helvetica-Bold",
textColor=GOLD, alignment=TA_CENTER)),
Paragraph("Discontinue if adequate prior negative screening & no high-risk history", cell_body)],
[Paragraph("Post-hysterectomy (cervix removed, benign indication)", cell_body),
Paragraph("NO", S("no2", fontSize=8.5, fontName="Helvetica-Bold",
textColor=PINK, alignment=TA_CENTER)),
Paragraph("Stop routine cytology/HPV testing", cell_body)],
[Paragraph("Immunocompromised / HIV+", cell_body),
Paragraph("YES†", S("yes2", fontSize=8.5, fontName="Helvetica-Bold",
textColor=HexColor("#006600"), alignment=TA_CENTER)),
Paragraph("More frequent screening — annual Pap; specialist guidance required", cell_body)],
[Paragraph("Vaccinated against HPV", cell_body),
Paragraph("YES", S("yes3", fontSize=8.5, fontName="Helvetica-Bold",
textColor=HexColor("#006600"), alignment=TA_CENTER)),
Paragraph("Vaccination does NOT replace screening — continue per age-based schedule", cell_body)],
]
who_tbl = Table(who_data, colWidths=[content_w*0.36, content_w*0.14, content_w*0.50])
who_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), TEAL),
("BACKGROUND", (0,1), (-1,1), GREY_LITE),
("BACKGROUND", (0,2), (-1,2), WHITE),
("BACKGROUND", (0,3), (-1,3), GREY_LITE),
("BACKGROUND", (0,4), (-1,4), WHITE),
("BACKGROUND", (0,5), (-1,5), GREY_LITE),
("BACKGROUND", (0,6), (-1,6), WHITE),
("BOX", (0,0), (-1,-1), 0.5, TEAL),
("INNERGRID", (0,0), (-1,-1), 0.3, HexColor("#CCCCCC")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
story += [who_tbl, spacer(2),
Paragraph("* Adequate negative screening = 3 consecutive negative Pap tests OR 2 consecutive negative co-tests in the prior 10 years, with the most recent within 5 years.", footnote_style),
Paragraph("† HIV+ women: Pap every 6 months in first year after diagnosis, then annually.", footnote_style),
spacer(4)]
# ── SECTION 2: SCREENING SCHEDULE ────────────────────────────────
story.append(banner("2. SCREENING SCHEDULE BY AGE GROUP", bg=TEAL))
story.append(spacer(2))
sched_data = [
[Paragraph("Age Group", cell_hdr),
Paragraph("Preferred Test", cell_hdr),
Paragraph("Interval", cell_hdr),
Paragraph("Alternative", cell_hdr)],
[Paragraph("21–29 years", cell_body),
Paragraph("Pap smear (cytology) alone", cell_body),
Paragraph("Every 3 years", S("bold_cell", fontSize=8.5, fontName="Helvetica-Bold",
textColor=TEAL, alignment=TA_LEFT)),
Paragraph("HPV testing alone NOT recommended in this age group", cell_body)],
[Paragraph("30–65 years\n(Option A)", cell_body),
Paragraph("Pap smear alone", cell_body),
Paragraph("Every 3 years", S("bold_cell2", fontSize=8.5, fontName="Helvetica-Bold",
textColor=TEAL, alignment=TA_LEFT)),
Paragraph("Acceptable but not preferred", cell_body)],
[Paragraph("30–65 years\n(Option B — Preferred)", cell_body),
Paragraph("High-risk HPV test alone\n(primary HPV testing)", cell_body),
Paragraph("Every 5 years", S("bold_cell3", fontSize=8.5, fontName="Helvetica-Bold",
textColor=TEAL, alignment=TA_LEFT)),
Paragraph("ACS preferred strategy from age 25 (2020 guideline update)", cell_body)],
[Paragraph("30–65 years\n(Option C)", cell_body),
Paragraph("Co-test: Pap + HPV", cell_body),
Paragraph("Every 5 years", S("bold_cell4", fontSize=8.5, fontName="Helvetica-Bold",
textColor=TEAL, alignment=TA_LEFT)),
Paragraph("ACOG & USPSTF acceptable; widely used in clinical practice", cell_body)],
[Paragraph(">65 years", cell_body),
Paragraph("DISCONTINUE if criteria met (see Section 1)", cell_body),
Paragraph("—", cell_center),
Paragraph("Continue if inadequate prior screening or new high-risk factors", cell_body)],
]
sched_tbl = Table(sched_data,
colWidths=[content_w*0.22, content_w*0.28, content_w*0.16, content_w*0.34])
sched_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), TEAL),
("BACKGROUND", (0,1), (-1,1), GREY_LITE),
("BACKGROUND", (0,2), (-1,2), WHITE),
("BACKGROUND", (0,3), (-1,3), TEAL_LITE),
("BACKGROUND", (0,4), (-1,4), WHITE),
("BACKGROUND", (0,5), (-1,5), GREY_LITE),
("BOX", (0,0), (-1,-1), 0.5, TEAL),
("INNERGRID", (0,0), (-1,-1), 0.3, HexColor("#CCCCCC")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
story += [sched_tbl, spacer(4)]
# ── SECTION 3: HPV & PAP — WHAT DO RESULTS MEAN ──────────────────
story.append(banner("3. INTERPRETING RESULTS & FOLLOW-UP", bg=PINK))
story.append(spacer(2))
res_data = [
[Paragraph("HPV Result", cell_hdr),
Paragraph("Pap / Cytology", cell_hdr),
Paragraph("Action", cell_hdr)],
[Paragraph("Negative", cell_body),
Paragraph("Negative (NILM)", cell_body),
Paragraph("Routine screening — repeat per schedule", cell_body)],
[Paragraph("Negative", cell_body),
Paragraph("ASC-US", cell_body),
Paragraph("Routine screening — no immediate action needed", cell_body)],
[Paragraph("Positive — HPV 16 or 18", cell_body),
Paragraph("Any result", cell_body),
Paragraph("Refer directly for COLPOSCOPY", S("col", fontSize=8.5, fontName="Helvetica-Bold",
textColor=PINK, alignment=TA_LEFT))],
[Paragraph("Positive — other high-risk HPV", cell_body),
Paragraph("Negative or ASC-US", cell_body),
Paragraph("Repeat co-test in 1 year OR refer for colposcopy", cell_body)],
[Paragraph("Positive — other high-risk HPV", cell_body),
Paragraph("ASC-H, LSIL, HSIL, AGC", cell_body),
Paragraph("Refer for COLPOSCOPY", S("col2", fontSize=8.5, fontName="Helvetica-Bold",
textColor=PINK, alignment=TA_LEFT))],
[Paragraph("Not done / Primary Pap", cell_body),
Paragraph("ASC-US (reflex HPV+)", cell_body),
Paragraph("Colposcopy if HPV+; routine if HPV−", cell_body)],
[Paragraph("Not done / Primary Pap", cell_body),
Paragraph("LSIL", cell_body),
Paragraph("Colposcopy (or 1-year repeat in ages 21-24)", cell_body)],
[Paragraph("Not done / Primary Pap", cell_body),
Paragraph("HSIL / AGC / AIS", cell_body),
Paragraph("Immediate colposcopy ± endocervical sampling", cell_body)],
]
res_tbl = Table(res_data,
colWidths=[content_w*0.26, content_w*0.26, content_w*0.48])
res_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), PINK),
("BACKGROUND", (0,1), (-1,1), GREY_LITE),
("BACKGROUND", (0,2), (-1,2), WHITE),
("BACKGROUND", (0,3), (-1,3), PINK_LITE),
("BACKGROUND", (0,4), (-1,4), WHITE),
("BACKGROUND", (0,5), (-1,5), PINK_LITE),
("BACKGROUND", (0,6), (-1,6), WHITE),
("BACKGROUND", (0,7), (-1,7), GREY_LITE),
("BACKGROUND", (0,8), (-1,8), PINK_LITE),
("BOX", (0,0), (-1,-1), 0.5, PINK),
("INNERGRID", (0,0), (-1,-1), 0.3, HexColor("#CCCCCC")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
abbrev = ("ASC-US = Atypical Squamous Cells of Undetermined Significance • ASC-H = cannot exclude HSIL • "
"LSIL = Low-grade SIL • HSIL = High-grade SIL • AGC = Atypical Glandular Cells • "
"AIS = Adenocarcinoma in Situ • NILM = Negative for Intraepithelial Lesion or Malignancy")
story += [res_tbl, spacer(2),
Paragraph(abbrev, footnote_style),
spacer(4)]
# ── SECTION 4: HISTOLOGY FOLLOW-UP ────────────────────────────────
story.append(banner("4. COLPOSCOPY / HISTOLOGY FINDINGS & MANAGEMENT", bg=PINK))
story.append(spacer(2))
histo_data = [
[Paragraph("CIN Grade", cell_hdr),
Paragraph("Dysplasia Level", cell_hdr),
Paragraph("Cytology Equivalent", cell_hdr),
Paragraph("Recommended Management", cell_hdr)],
[Paragraph("CIN 1", cell_body),
Paragraph("Mild", cell_body),
Paragraph("LSIL", cell_center),
Paragraph("Observation — repeat testing at 1 & 2 years. Treat only if persistent ≥2 years", cell_body)],
[Paragraph("CIN 2", cell_body),
Paragraph("Moderate", cell_body),
Paragraph("HSIL", cell_center),
Paragraph("Treatment preferred (LEEP/excision). Observation acceptable in women <25 or those desiring future fertility", cell_body)],
[Paragraph("CIN 3 / CIS", cell_body),
Paragraph("Severe / In situ", cell_body),
Paragraph("HSIL", cell_center),
Paragraph("Excisional treatment (LEEP or cold knife conization). Hysterectomy if no further childbearing desired", cell_body)],
[Paragraph("AIS", cell_body),
Paragraph("Glandular precursor", cell_body),
Paragraph("AGC / AIS", cell_center),
Paragraph("Excision (cold knife cone preferred). Hysterectomy recommended after childbearing complete", cell_body)],
]
histo_tbl = Table(histo_data,
colWidths=[content_w*0.14, content_w*0.16, content_w*0.18, content_w*0.52])
histo_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), PINK),
("BACKGROUND", (0,1), (-1,1), GREY_LITE),
("BACKGROUND", (0,2), (-1,2), WHITE),
("BACKGROUND", (0,3), (-1,3), GREY_LITE),
("BACKGROUND", (0,4), (-1,4), WHITE),
("BOX", (0,0), (-1,-1), 0.5, PINK),
("INNERGRID", (0,0), (-1,-1), 0.3, HexColor("#CCCCCC")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
story += [histo_tbl, spacer(4)]
# ── SECTION 5: HPV VACCINATION ────────────────────────────────────
story.append(banner("5. HPV VACCINATION (PRIMARY PREVENTION)", bg=GOLD))
story.append(spacer(2))
vax_left = [
Paragraph("<b>Vaccine Available (US):</b> Gardasil 9 (9-valent)", body),
Paragraph("<b>HPV types covered:</b> 6, 11, 16, 18, 31, 33, 45, 52, 58<br/>"
"(16 & 18 cause ~70% of cervical cancers)", body),
Paragraph("<b>Routine schedule:</b> Ages 11–12 (can start age 9)", body),
Paragraph("<b>Dosing:</b>", body),
Paragraph("• <b>2 doses</b> (0, 6–12 months) if starting <15 years", bullet_style),
Paragraph("• <b>3 doses</b> (0, 1–2, 6 months) if starting ≥15 years or immunocompromised", bullet_style),
Paragraph("<b>Catch-up vaccination:</b> Up to age 45 (shared decision-making)", body),
Paragraph("<b>Efficacy:</b> >97% against targeted HPV types in unexposed individuals", body),
]
vax_right = [
Paragraph("<b>Cancer reduction (vs. unvaccinated):</b>", body),
Paragraph("• <b>87%</b> reduction if vaccinated at age 12–13", bullet_style),
Paragraph("• <b>62%</b> reduction if vaccinated at age 14–16", bullet_style),
Paragraph("• <b>34%</b> reduction if vaccinated at age 16–18", bullet_style),
Paragraph("<b>Male vaccination:</b> Recommended — prevents transmission and HPV-related head/neck & anal cancers", body),
Paragraph("<b>Pregnancy:</b> Delay vaccination until after delivery", body),
Paragraph("<b>Post-treatment:</b> Vaccination after CIN 2/3 treatment may reduce recurrence risk", body),
Paragraph("<b>Key point:</b> Vaccinated individuals MUST continue cervical cancer screening",
S("key", fontSize=9, leading=13, fontName="Helvetica-Bold",
textColor=HexColor("#7A4A00"), alignment=TA_LEFT, spaceAfter=4)),
]
vax_col_data = [[vax_left, vax_right]]
# wrap lists in a table with background
left_inner = Table([[item] for item in vax_left], colWidths=[(content_w/2)-5])
left_inner.setStyle(TableStyle([
("LEFTPADDING", (0,0), (-1,-1), 2),
("RIGHTPADDING", (0,0), (-1,-1), 2),
("TOPPADDING", (0,0), (-1,-1), 1),
("BOTTOMPADDING", (0,0), (-1,-1), 1),
]))
right_inner = Table([[item] for item in vax_right], colWidths=[(content_w/2)-5])
right_inner.setStyle(TableStyle([
("LEFTPADDING", (0,0), (-1,-1), 2),
("RIGHTPADDING", (0,0), (-1,-1), 2),
("TOPPADDING", (0,0), (-1,-1), 1),
("BOTTOMPADDING", (0,0), (-1,-1), 1),
]))
vax_outer = Table([[left_inner, right_inner]], colWidths=[content_w/2, content_w/2])
vax_outer.setStyle(TableStyle([
("BACKGROUND", (0,0), (0,0), GOLD_LITE),
("BACKGROUND", (1,0), (1,0), HexColor("#FFFBF0")),
("BOX", (0,0), (-1,-1), 0.5, GOLD),
("INNERGRID", (0,0), (-1,-1), 0.3, GOLD),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING", (0,0), (-1,-1), 6),
("LEFTPADDING", (0,0), (-1,-1), 8),
("RIGHTPADDING", (0,0), (-1,-1), 8),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
story += [vax_outer, spacer(4)]
# ── SECTION 6: SPECIAL POPULATIONS ───────────────────────────────
story.append(banner("6. SPECIAL POPULATIONS", bg=HexColor("#5C4A8C")))
story.append(spacer(2))
sp_data = [
[Paragraph("Population", cell_hdr),
Paragraph("Modification", cell_hdr)],
[Paragraph("Pregnancy", cell_body),
Paragraph("Screen as per age-based schedule; colposcopy deferred until 6 weeks postpartum unless high-grade lesion suspected. Endocervical curettage (ECC) contraindicated.", cell_body)],
[Paragraph("DES-exposed daughters", cell_body),
Paragraph("Annual cytology + colposcopy indefinitely; higher risk of clear cell adenocarcinoma.", cell_body)],
[Paragraph("Immunocompromised / solid organ transplant", cell_body),
Paragraph("Annual Pap smear. Consider semi-annual for first year after HIV diagnosis.", cell_body)],
[Paragraph("Prior CIN 2+ or cervical cancer", cell_body),
Paragraph("Continue screening for at least 25 years after treatment; do not stop at age 65.", cell_body)],
[Paragraph("Transgender men (cervix present)", cell_body),
Paragraph("Same age-based recommendations as for women with a cervix.", cell_body)],
[Paragraph("History of hysterectomy (cervix absent)", cell_body),
Paragraph("Discontinue Pap testing if hysterectomy was for benign indications. Continue vaginal cuff cytology if history of high-grade dysplasia.", cell_body)],
]
sp_tbl = Table(sp_data, colWidths=[content_w*0.30, content_w*0.70])
sp_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), HexColor("#5C4A8C")),
("BACKGROUND", (0,1), (-1,1), GREY_LITE),
("BACKGROUND", (0,2), (-1,2), WHITE),
("BACKGROUND", (0,3), (-1,3), GREY_LITE),
("BACKGROUND", (0,4), (-1,4), WHITE),
("BACKGROUND", (0,5), (-1,5), GREY_LITE),
("BACKGROUND", (0,6), (-1,6), WHITE),
("BOX", (0,0), (-1,-1), 0.5, HexColor("#5C4A8C")),
("INNERGRID", (0,0), (-1,-1), 0.3, HexColor("#CCCCCC")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
story += [sp_tbl, spacer(4)]
# ── SECTION 7: RISK FACTORS REMINDER ─────────────────────────────
story.append(banner("7. KEY RISK FACTORS FOR CERVICAL CANCER", bg=GREY_DARK))
story.append(spacer(2))
rf_items = [
("HPV infection", "Necessary cause — present in >99% of cervical cancers (HPV 16/18 cause ~70%)"),
("Early sexual debut", "Increases lifetime HPV exposure window"),
("Multiple sexual partners", "Greater HPV acquisition risk"),
("Immunosuppression (HIV)", "Impairs HPV clearance; dramatically increases risk"),
("Smoking", "Promotes viral persistence and cervical carcinogenesis"),
("Long-term OCP use (>5 years)", "RR ~1.6–2.2; risk returns to baseline ~10 years after stopping"),
("No cervical screening", "Leading modifiable cause of cervical cancer death"),
("Low socioeconomic status", "Barrier to screening and treatment access"),
]
rf_data = [[Paragraph("Risk Factor", cell_hdr), Paragraph("Mechanism / Notes", cell_hdr)]]
for rf, note in rf_items:
rf_data.append([
Paragraph(rf, S("rfb", fontSize=8.5, fontName="Helvetica-Bold",
textColor=GREY_DARK, alignment=TA_LEFT)),
Paragraph(note, cell_body)
])
rf_tbl = Table(rf_data, colWidths=[content_w*0.32, content_w*0.68])
rf_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), GREY_DARK),
*[("BACKGROUND", (0,i), (-1,i), GREY_LITE if i%2==1 else WHITE) for i in range(1, len(rf_data))],
("BOX", (0,0), (-1,-1), 0.5, GREY_DARK),
("INNERGRID", (0,0), (-1,-1), 0.3, HexColor("#CCCCCC")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
story += [rf_tbl, spacer(3)]
# ── FOOTER ────────────────────────────────────────────────────────
story.append(hr(col=TEAL))
story.append(Paragraph(
"Sources: USPSTF Cervical Cancer Screening Guidelines (2018) • ACOG Practice Bulletin No. 168 • "
"American Cancer Society Guidelines (2020) • Goldman-Cecil Medicine • Berek & Novak's Gynecology "
"| This quick reference is for educational purposes only. Clinical decisions should be guided by "
"current institutional protocols and individual patient circumstances.",
footnote_style))
# ── BUILD ──────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF created: {OUTPUT}")
cd /home/daytona/workspace/cervical-cancer-pdf && python3 generate_pdf.py 2>&1
ls -lh /home/daytona/workspace/cervical-cancer-pdf/Cervical_Cancer_Screening_Gui…
Cervical Cancer Screening Guidelines
PDF Document · PDF
| Section | Content |
|---|---|
| 1. Who Should Be Screened? | Age cut-offs, exceptions (HIV+, post-hysterectomy, vaccinated women) |
| 2. Screening Schedule by Age | USPSTF/ACOG/ACS intervals - Pap, primary HPV, co-testing |
| 3. Interpreting Results & Follow-up | HPV + Pap result combinations mapped to next action |
| 4. Colposcopy / Histology | CIN 1/2/3, AIS findings with recommended management |
| 5. HPV Vaccination | Gardasil 9, dosing schedule, efficacy data by age at vaccination |
| 6. Special Populations | Pregnancy, HIV, DES exposure, transgender men, prior CIN 2+ |
| 7. Key Risk Factors | HPV, OCP, smoking, immunosuppression with mechanism notes |