Lymphoma in detail from Harrison , for neet ss, medical postgraduate pdf, notes

Reading File
Finding Sources
Finding Sources
Harrison's 22E is available. Now let me search specifically within Harrison's for lymphoma sections.
Finding Sources
Finding Sources
The main lymphoma chapter is in block12. Let me read the Non-Hodgkin's and Hodgkin's lymphoma sections comprehensively.
Reading File
Reading File
Excellent content coming through. Let me now read more of the NHL and HL sections, including treatment and staging:
Reading File
Reading File
Excellent data. Now let me read the NLPHL, HL treatment advanced stage, and fetch the NHL subtypes paragraphs around line 2295-2400 and the images from Harrison's:
Reading File
Reading File
Reading File
Reading File
I now have comprehensive content from Harrison's 22E. Let me compile the full notes. I have enough data to write excellent NEET SS / PG-level notes.

Pdf notes

Reading File
I'll create a comprehensive PDF of lymphoma notes from Harrison's. Let me build it now.
Running Command

mkdir -p /home/daytona/workspace/lymphoma-notes && ls /home/daytona/workspace/lymphoma-notes/

Writing File

~/lymphoma-notes/lymphoma_notes.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm, mm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table,
                                 TableStyle, HRFlowable, PageBreak, KeepTogether)
from reportlab.platypus.tableofcontents import TableOfContents
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
import os

OUTPUT = "/home/daytona/workspace/lymphoma-notes/Lymphoma_Harrison_NEET_SS_Notes.pdf"

# ─── Color palette ──────────────────────────────────────────────────────────
DARK_BLUE   = colors.HexColor("#1a2f5a")
MED_BLUE    = colors.HexColor("#2563a8")
LIGHT_BLUE  = colors.HexColor("#dbeafe")
ACCENT_TEAL = colors.HexColor("#0d9488")
ACCENT_PURPLE= colors.HexColor("#7c3aed")
HIGHLIGHT   = colors.HexColor("#fef9c3")
HIGHLIGHT2  = colors.HexColor("#fce7f3")
HIGHLIGHT3  = colors.HexColor("#dcfce7")
RED_ACCENT  = colors.HexColor("#dc2626")
ORANGE      = colors.HexColor("#ea580c")
GRAY_BG     = colors.HexColor("#f1f5f9")
GRAY_LINE   = colors.HexColor("#cbd5e1")
WHITE       = colors.white
BLACK       = colors.black

doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    rightMargin=1.8*cm, leftMargin=1.8*cm,
    topMargin=2*cm, bottomMargin=2*cm,
    title="Lymphoma – Harrison's 22E | NEET SS / PG Notes",
    author="Orris AI – Harrison's Principles of Internal Medicine 22E"
)

W, H = A4
CW = W - 3.6*cm  # content width

styles = getSampleStyleSheet()

# Custom styles
def ms(name, parent="Normal", **kw):
    return ParagraphStyle(name, parent=styles[parent], **kw)

cover_title  = ms("CoverTitle",  fontSize=28, textColor=WHITE, alignment=TA_CENTER, leading=36, fontName="Helvetica-Bold")
cover_sub    = ms("CoverSub",    fontSize=14, textColor=colors.HexColor("#bfdbfe"), alignment=TA_CENTER, leading=20)
cover_ref    = ms("CoverRef",    fontSize=10, textColor=colors.HexColor("#93c5fd"), alignment=TA_CENTER)

h1style = ms("H1", fontSize=16, textColor=WHITE, fontName="Helvetica-Bold",
             spaceAfter=4, spaceBefore=12, leading=20, leftIndent=0)
h2style = ms("H2", fontSize=13, textColor=DARK_BLUE, fontName="Helvetica-Bold",
             spaceAfter=4, spaceBefore=10, leading=17,
             borderPad=4, leftIndent=0)
h3style = ms("H3", fontSize=11, textColor=ACCENT_TEAL, fontName="Helvetica-Bold",
             spaceAfter=3, spaceBefore=6, leading=15)
h4style = ms("H4", fontSize=10, textColor=ACCENT_PURPLE, fontName="Helvetica-Bold",
             spaceAfter=2, spaceBefore=4, leading=13)

body = ms("Body", fontSize=9.5, leading=14, spaceAfter=4, alignment=TA_JUSTIFY)
bullet = ms("Bullet", fontSize=9.5, leading=13, spaceAfter=2,
            leftIndent=12, bulletIndent=0)
subbullet = ms("SubBullet", fontSize=9, leading=12, spaceAfter=2,
               leftIndent=24, bulletIndent=12)
highlight_box = ms("HLBox", fontSize=9.5, leading=13, spaceAfter=3,
                   backColor=HIGHLIGHT, leftIndent=6, rightIndent=6,
                   borderPad=5)
imp_box = ms("ImpBox", fontSize=9.5, leading=13, spaceAfter=3,
             backColor=HIGHLIGHT2, leftIndent=6, rightIndent=6, borderPad=5)
green_box = ms("GreenBox", fontSize=9.5, leading=13, spaceAfter=3,
               backColor=HIGHLIGHT3, leftIndent=6, rightIndent=6, borderPad=5)
small_italic = ms("SmItalic", fontSize=8.5, leading=11, textColor=colors.HexColor("#64748b"), fontName="Helvetica-Oblique")

def b(text): return f"<b>{text}</b>"
def i(text): return f"<i>{text}</i>"
def bi(text): return f"<b><i>{text}</i></b>"
def c(text, col): return f'<font color="{col}">{text}</font>'
def red(t): return c(t, "#dc2626")
def blue(t): return c(t, "#1d4ed8")
def teal(t): return c(t, "#0d9488")
def purple(t): return c(t, "#7c3aed")
def orange(t): return c(t, "#ea580c")

# ─── Helper builders ────────────────────────────────────────────────────────
def section_header(title, color=DARK_BLUE, bg=LIGHT_BLUE):
    data = [[Paragraph(f"<b>{title}</b>", ParagraphStyle("SH", fontSize=13, textColor=WHITE,
             fontName="Helvetica-Bold", leading=18, alignment=TA_LEFT))]]
    t = Table(data, colWidths=[CW])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), color),
        ("TOPPADDING", (0,0), (-1,-1), 7),
        ("BOTTOMPADDING", (0,0), (-1,-1), 7),
        ("LEFTPADDING", (0,0), (-1,-1), 12),
        ("ROUNDEDCORNERS", [6,6,6,6]),
    ]))
    return t

def subsection_header(title, color=ACCENT_TEAL):
    data = [[Paragraph(f"<b>{title}</b>", ParagraphStyle("SSH", fontSize=11.5, textColor=WHITE,
             fontName="Helvetica-Bold", leading=16))]]
    t = Table(data, colWidths=[CW])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), color),
        ("TOPPADDING", (0,0), (-1,-1), 5),
        ("BOTTOMPADDING", (0,0), (-1,-1), 5),
        ("LEFTPADDING", (0,0), (-1,-1), 10),
    ]))
    return t

def info_table(rows, col_widths=None, header_bg=DARK_BLUE):
    if col_widths is None:
        col_widths = [CW/len(rows[0])]*len(rows[0])
    header = rows[0]
    data = []
    for i, row in enumerate(rows):
        data.append([Paragraph(str(cell), ParagraphStyle(f"TC{i}", fontSize=8.5, leading=12,
                     fontName="Helvetica-Bold" if i==0 else "Helvetica",
                     textColor=WHITE if i==0 else BLACK)) for cell in row])
    t = Table(data, colWidths=col_widths)
    style = [
        ("BACKGROUND", (0,0), (-1,0), header_bg),
        ("BACKGROUND", (0,1), (-1,-1), GRAY_BG),
        ("ROWBACKGROUNDS", (0,1), (-1,-1), [WHITE, GRAY_BG]),
        ("GRID", (0,0), (-1,-1), 0.4, GRAY_LINE),
        ("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), "TOP"),
    ]
    t.setStyle(TableStyle(style))
    return t

def two_col(left_items, right_items, left_title="", right_title="",
            lbg=LIGHT_BLUE, rbg=HIGHLIGHT3):
    def build_cell(title, items, bg):
        paras = []
        if title:
            paras.append(Paragraph(f"<b>{title}</b>",
                ParagraphStyle("CT", fontSize=9.5, fontName="Helvetica-Bold",
                               textColor=DARK_BLUE, leading=14, spaceAfter=4)))
        for item in items:
            paras.append(Paragraph(f"• {item}",
                ParagraphStyle("CI", fontSize=9, leading=13, spaceAfter=2)))
        data = [[paras]]
        t = Table(data, colWidths=[(CW/2)-4])
        t.setStyle(TableStyle([
            ("BACKGROUND", (0,0), (-1,-1), bg),
            ("TOPPADDING", (0,0), (-1,-1), 7),
            ("BOTTOMPADDING", (0,0), (-1,-1), 7),
            ("LEFTPADDING", (0,0), (-1,-1), 8),
            ("RIGHTPADDING", (0,0), (-1,-1), 8),
            ("VALIGN", (0,0), (-1,-1), "TOP"),
        ]))
        return t
    outer = Table([[build_cell(left_title, left_items, lbg),
                    build_cell(right_title, right_items, rbg)]],
                  colWidths=[CW/2, CW/2], hAlign="LEFT")
    outer.setStyle(TableStyle([("LEFTPADDING",(0,0),(-1,-1),0),
                                ("RIGHTPADDING",(0,0),(-1,-1),0),
                                ("TOPPADDING",(0,0),(-1,-1),0),
                                ("BOTTOMPADDING",(0,0),(-1,-1),0)]))
    return outer

def mnemonic_box(title, content, bg=colors.HexColor("#fffbeb")):
    paras = [Paragraph(f"<b>🔑 {title}</b>",
        ParagraphStyle("MT", fontSize=10, fontName="Helvetica-Bold",
                       textColor=colors.HexColor("#92400e"), leading=14, spaceAfter=4))]
    if isinstance(content, list):
        for c in content:
            paras.append(Paragraph(c, ParagraphStyle("MC", fontSize=9.5, leading=13)))
    else:
        paras.append(Paragraph(content, ParagraphStyle("MC", fontSize=9.5, leading=13)))
    data = [[paras]]
    t = Table(data, colWidths=[CW])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), bg),
        ("TOPPADDING", (0,0), (-1,-1), 8),
        ("BOTTOMPADDING", (0,0), (-1,-1), 8),
        ("LEFTPADDING", (0,0), (-1,-1), 12),
        ("RIGHTPADDING", (0,0), (-1,-1), 12),
        ("BOX", (0,0), (-1,-1), 1.5, colors.HexColor("#f59e0b")),
    ]))
    return t

def key_point(text):
    data = [[Paragraph(f"⭐ <b>{text}</b>",
        ParagraphStyle("KP", fontSize=9.5, leading=13,
                       textColor=colors.HexColor("#7c2d12")))]]
    t = Table(data, colWidths=[CW])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), colors.HexColor("#fff7ed")),
        ("LEFTPADDING", (0,0), (-1,-1), 10),
        ("TOPPADDING", (0,0), (-1,-1), 5),
        ("BOTTOMPADDING", (0,0), (-1,-1), 5),
        ("LEFTBORDER", (0,0), (0,-1), 4),
        ("LINEABOVE", (0,0), (-1,0), 0.3, GRAY_LINE),
    ]))
    return t

# ═══════════════════════════════════════════════════════════════════════════
# BUILD DOCUMENT
# ═══════════════════════════════════════════════════════════════════════════
story = []
P = Paragraph
SP = Spacer
HR = HRFlowable

def sp(h=6): return SP(0, h)

# ─── COVER PAGE ─────────────────────────────────────────────────────────────
# Blue banner background via table
cover_data = [[P("", cover_title)]]
cover_tbl = Table([[
    P("LYMPHOMA", ParagraphStyle("CT1", fontSize=32, textColor=WHITE,
       fontName="Helvetica-Bold", alignment=TA_CENTER, leading=40)),
]], colWidths=[CW])
cover_tbl.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,-1), DARK_BLUE),
    ("TOPPADDING", (0,0), (-1,-1), 40),
    ("BOTTOMPADDING", (0,0), (-1,-1), 40),
    ("LEFTPADDING", (0,0), (-1,-1), 20),
    ("RIGHTPADDING", (0,0), (-1,-1), 20),
]))
story.append(sp(60))
story.append(cover_tbl)
story.append(sp(16))
story.append(P("Complete Notes for NEET SS / Medical Postgraduate Examinations",
    ParagraphStyle("CS1", fontSize=14, textColor=DARK_BLUE, alignment=TA_CENTER,
                   fontName="Helvetica-Bold", leading=20)))
story.append(sp(6))
story.append(P("Based on Harrison's Principles of Internal Medicine, 22nd Edition (2025)",
    ParagraphStyle("CS2", fontSize=11, textColor=colors.HexColor("#475569"),
                   alignment=TA_CENTER, leading=16)))
story.append(sp(6))
story.append(HR(width=CW*0.6, color=GRAY_LINE, thickness=1, hAlign="CENTER"))
story.append(sp(8))

topics = ["Non-Hodgkin's Lymphoma (NHL) | Hodgkin's Lymphoma (HL)",
          "WHO Classification | Epidemiology | Etiology",
          "Clinical Features | Staging | Prognostic Indices",
          "NHL Subtypes: FL, DLBCL, MCL, BL, MZL, T-cell",
          "HL Subtypes | Reed-Sternberg Cell | Immunophenotype",
          "Treatment Protocols: CHOP, ABVD, R-CHOP, BEACOPP",
          "High-Yield NEET SS Points | Mnemonics"]
for t in topics:
    story.append(P(f"• {t}",
        ParagraphStyle("CT3", fontSize=10, textColor=colors.HexColor("#334155"),
                       alignment=TA_CENTER, leading=16)))
story.append(sp(20))

info_row = [["Source", "Chapters", "Level", "Year"],
            ["Harrison's IM 22E", "113 (NHL), 114 (HL)", "NEET SS / PG", "2025"]]
story.append(info_table(info_row, [CW*0.25, CW*0.3, CW*0.25, CW*0.2]))
story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════
# SECTION 1 – OVERVIEW
# ═══════════════════════════════════════════════════════════════════════════
story.append(section_header("SECTION 1: OVERVIEW & CLASSIFICATION", DARK_BLUE))
story.append(sp(8))

story.append(P("""
Lymphomas are cancers of <b>mature lymphocytes</b> (B, T, or NK cells). They are broadly divided into:
<b>Non-Hodgkin's Lymphoma (NHL)</b> and <b>Hodgkin's Lymphoma (HL)</b>. The key differentiator
is the <b>Reed-Sternberg (RS) cell</b>, which is pathognomonic for HL.
""", body))
story.append(sp(6))

story.append(two_col(
    ["Cancers of mature B, T, NK cells",
     "~80,550 new cases/year (USA, 2023)",
     "7th most common cancer-related death",
     "Variable prognosis – depends on histology",
     "Majority have advanced-stage disease at diagnosis",
     "5-year survival: 74%"],
    ["Malignancy of mature B lymphocytes",
     "~8,830 new cases/year (USA, 2023)",
     "~10% of all lymphomas",
     "Cure rate >85% with modern therapy",
     "Bimodal age distribution (20s and 80s)",
     "Late toxicities now a major challenge"],
    "Non-Hodgkin's Lymphoma (NHL)", "Hodgkin's Lymphoma (HL)"
))
story.append(sp(10))

# WHO Classification Table
story.append(subsection_header("WHO-BIOM Classification of Lymphoid Malignancies (Table 113-1)", ACCENT_TEAL))
story.append(sp(6))
who_data = [
    ["B-CELL NEOPLASMS", "T-CELL / NK-CELL NEOPLASMS"],
    ["Lymphoplasmacytic lymphoma (Waldenström's macroglobulinemia)", "T-cell granular lymphocytic leukemia"],
    ["Hairy cell leukemia", "Adult T-cell leukemia/lymphoma (HTLV-1+)"],
    ["Splenic marginal zone B-cell lymphoma", "Extranodal NK/T-cell lymphoma, nasal type"],
    ["Extranodal marginal zone B-cell lymphoma (MALT type)", "Enteropathy-associated T-cell lymphoma"],
    ["Nodal marginal zone B-cell lymphoma", "Hepatosplenic T-cell lymphoma"],
    ["Follicular lymphoma (FL)", "Subcutaneous panniculitis-like T-cell lymphoma"],
    ["Mantle cell lymphoma (MCL)", "Mycosis fungoides / Sézary syndrome"],
    ["Diffuse large B-cell lymphoma (DLBCL)", "Peripheral T-cell lymphoma NOS"],
    ["High-grade B-cell lymphoma with MYC and BCL2 rearrangements (Double-hit)", "Angioimmunoblastic T-cell lymphoma"],
    ["Burkitt's lymphoma/Burkitt's cell leukemia", "Anaplastic large-cell lymphoma ALK+ / ALK-"],
    ["Primary mediastinal large B-cell lymphoma", ""],
    ["Primary effusion lymphoma (HHV-8+)", ""],
    ["Plasmablastic lymphoma", ""],
]
story.append(info_table(who_data,
    col_widths=[CW*0.52, CW*0.48],
    header_bg=DARK_BLUE))
story.append(sp(6))
story.append(P(i("Abbreviations: DLBCL – diffuse large B-cell lymphoma; HHV – human herpesvirus; HTLV – human T-cell lymphotropic virus; MALT – mucosa-associated lymphoid tissue; NK – natural killer; NOS – not otherwise specified"), small_italic))
story.append(sp(8))
story.append(mnemonic_box("NEET SS Tip: B vs T Frequency",
    ["• B-cell NHLs are far more common in Western countries (>85% of NHLs).",
     "• T-cell NHLs are more common in <b>Asia</b> than Western countries.",
     "• Follicular lymphoma (FL) is the most common indolent NHL in adults.",
     "• DLBCL is the most common aggressive NHL overall.",
     "• In children: DLBCL and Burkitt's lymphoma predominate."]))
story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════
# SECTION 2 – EPIDEMIOLOGY & ETIOLOGY
# ═══════════════════════════════════════════════════════════════════════════
story.append(section_header("SECTION 2: EPIDEMIOLOGY & ETIOLOGY", DARK_BLUE))
story.append(sp(8))

story.append(subsection_header("2A. Non-Hodgkin's Lymphoma – Epidemiology", ACCENT_TEAL))
story.append(sp(6))
story.append(P("• 80,550 new cases/year (USA 2023) – ~4% of all cancers.", bullet))
story.append(P("• Incidence is nearly <b>10× the incidence of HL</b>.", bullet))
story.append(P("• Incidence <b>doubled over the past 20-40 years</b>; rising 1.5-2%/year.", bullet))
story.append(P("• Slight male predominance; higher in Caucasians vs African Americans.", bullet))
story.append(P("• 5-year survival rate: 74% (higher in Caucasians).", bullet))
story.append(P("• Geographic variation: T-cell NHLs more common in Asia; FL more common in Western countries.", bullet))
story.append(sp(8))

story.append(subsection_header("2B. Infectious Agents Associated with NHL (Table 113-2)", ACCENT_PURPLE))
story.append(sp(6))
inf_data = [
    ["Infectious Agent", "Associated NHL Subtype", "Mechanism/Notes"],
    ["Epstein-Barr Virus (EBV)", "Burkitt's lymphoma (Central Africa); CNS lymphoma in immunosuppressed", "Oncogenic transformation"],
    ["EBV", "Extranodal NK/T-cell lymphoma (nasal type)", "Asia, South America"],
    ["HTLV-1", "Adult T-cell leukemia/lymphoma (ATL)", "Ingestion of breast milk; long latency >56 yrs to oncogenesis"],
    ["HIV", "Aggressive B-cell NHL (DLBCL, BL)", "Via IL-6 overexpression by infected macrophages"],
    ["Helicobacter pylori", "Gastric MALT lymphoma", "Chronic antigenic stimulation → neoplasia; antibiotic Rx causes regression"],
    ["Borrelia species", "MALT lymphoma of skin (Europe)", ""],
    ["Chlamydia psittaci", "MALT lymphoma of eyes", ""],
    ["Campylobacter jejuni", "MALT lymphoma of small intestine", ""],
    ["Hepatitis C virus (HCV)", "Lymphoplasmacytic lymphoma; Splenic MZL", "Chronic infection"],
    ["HHV-8", "Primary effusion lymphoma; Multicentric Castleman's disease", "HIV-infected persons"],
]
story.append(info_table(inf_data,
    col_widths=[CW*0.28, CW*0.42, CW*0.3],
    header_bg=ACCENT_PURPLE))
story.append(sp(8))

story.append(subsection_header("2C. Other Predisposing Conditions", ACCENT_TEAL))
story.append(sp(4))
story.append(two_col(
    ["Primary immunodeficiencies (inherited)",
     "HIV infection / AIDS",
     "Organ transplantation (iatrogenic immunosuppression)",
     "Autoimmune conditions (RA, Sjögren's, SLE)",
     "Agricultural chemical exposures",
     "Prior treatment for Hodgkin's lymphoma"],
    ["Helicobacter pylori (gastric MALT)",
     "Celiac disease → enteropathy-associated T-cell lymphoma",
     "Dermatitis herpetiformis",
     "HTLV-1 infection (ATL)",
     "Hepatitis C (splenic MZL, lymphoplasmacytic)",
     "Borrelia, Chlamydia, Campylobacter (site-specific MALT)"],
    "Immunodeficiency/Systemic", "Infectious/Specific Associations"
))
story.append(sp(8))

story.append(subsection_header("2D. Hodgkin's Lymphoma – Epidemiology", DARK_BLUE))
story.append(sp(6))
story.append(P("• ~8,830 new cases/year (USA 2023); ~10% of all lymphomas.", bullet))
story.append(P("• More common in <b>whites</b> than blacks; more common in <b>males</b> than females.", bullet))
story.append(P("• <b>Bimodal age distribution:</b> Peak 1 – patients in their 20s; Peak 2 – patients in their 80s.", bullet))
story.append(P("• <b>EBV association:</b> Monoclonal/oligoclonal EBV proliferation in 20-40% of HL cases.", bullet))
story.append(P("• In <b>HIV-associated HL</b>: EBV detected in nearly ALL cases (vs 1/3 non-HIV HL).", bullet))
story.append(P("• HIV infection is a <b>risk factor</b> for developing HL.", bullet))
story.append(sp(8))

story.append(mnemonic_box("NEET SS High-Yield: Infectious Associations",
    ["• <b>H. pylori → Gastric MALT</b> lymphoma (antibiotic Rx → regression)",
     "• <b>EBV → Burkitt's</b> (Africa, immunosuppressed) + <b>NK/T-cell</b> (Asia)",
     "• <b>HTLV-1 → ATL</b> (Japan, Caribbean; breast milk transmission; long latency)",
     "• <b>HIV → Aggressive B-cell NHL</b> (DLBCL, BL, primary effusion lymphoma)",
     "• <b>HHV-8 → Primary effusion lymphoma</b> (body cavity lymphoma)",
     "• <b>HCV → Lymphoplasmacytic + Splenic MZL</b>"]))
story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════
# SECTION 3 – STAGING
# ═══════════════════════════════════════════════════════════════════════════
story.append(section_header("SECTION 3: STAGING & PROGNOSTIC INDICES", DARK_BLUE))
story.append(sp(8))

story.append(subsection_header("3A. Ann Arbor Staging System (Table 113-6)", ACCENT_TEAL))
story.append(sp(6))
staging_data = [
    ["Stage", "Description"],
    ["I", "Involvement of a SINGLE lymph node region (I)\nor a single extranodal site (IE)"],
    ["II", "Involvement of TWO OR MORE lymph node regions on the SAME SIDE of the diaphragm (II)\nor with limited contiguous extralymphatic tissue (IIE)"],
    ["III", "Involvement of lymph node regions on BOTH SIDES of the diaphragm (III)\nMay include spleen (IIIS), extralymphatic tissue (IIIE), or both (IIIES)"],
    ["IV", "DIFFUSE or DISSEMINATED involvement of one or more extralymphatic organs\n(with or without lymphatic involvement)"],
]
story.append(info_table(staging_data, col_widths=[CW*0.12, CW*0.88]))
story.append(sp(6))
story.append(P("<b>B symptoms</b> (suffix B): Fevers, Night sweats, Weight loss >10% body weight over 6 months prior to diagnosis.", imp_box))
story.append(P("<b>A symptoms</b> (suffix A): Absence of the above B symptoms.", imp_box))
story.append(sp(6))
story.append(mnemonic_box("Staging Limitation in NHL",
    "The Ann Arbor staging system is <b>less useful in NHL</b> because NHL disseminates widely "
    "in a non-stepwise, non-contiguous fashion. Majority of NHL patients have advanced-stage "
    "disease at diagnosis. Histology and clinical parameters (IPI) are more prognostically important than stage."))
story.append(sp(8))

story.append(subsection_header("3B. International Prognostic Index (IPI) – for Aggressive NHL", ACCENT_PURPLE))
story.append(sp(6))
story.append(P("""The IPI was developed from >2000 patients with aggressive NHL treated with anthracycline-containing regimens.
Each factor scores 1 point (0-5 total).""", body))
story.append(sp(4))
ipi_data = [
    ["IPI Factor", "Adverse Value", "Favorable Value"],
    ["Age", "> 60 years", "≤ 60 years"],
    ["Serum LDH", "> Normal", "≤ Normal"],
    ["Performance Status (ECOG)", "2, 3, or 4", "0 or 1"],
    ["Stage (Ann Arbor)", "III or IV", "I or II"],
    ["Extranodal sites", "> 1 site", "0 or 1 site"],
]
story.append(info_table(ipi_data, col_widths=[CW*0.4, CW*0.3, CW*0.3], header_bg=ACCENT_PURPLE))
story.append(sp(6))
ipi_risk_data = [
    ["IPI Score", "Risk Group", "5-Year Overall Survival"],
    ["0 or 1", "Low", "73%"],
    ["2", "Low-Intermediate", "51%"],
    ["3", "High-Intermediate", "43%"],
    ["4 or 5", "High", "26%"],
]
story.append(info_table(ipi_risk_data, col_widths=[CW*0.2, CW*0.4, CW*0.4]))
story.append(sp(8))

story.append(subsection_header("3C. FLIPI – Follicular Lymphoma International Prognostic Index", ACCENT_TEAL))
story.append(sp(4))
flipi_data = [
    ["FLIPI Factor", "Adverse"],
    ["Age", "> 60 years"],
    ["Stage", "III or IV"],
    ["Hemoglobin", "< 12 g/dL"],
    ["Serum LDH", "> Normal"],
    ["Number of nodal sites", "> 4"],
]
story.append(info_table(flipi_data, col_widths=[CW*0.5, CW*0.5]))
story.append(sp(4))
story.append(P("• Low risk (0-1 factors): 10-yr OS ~71%  |  Intermediate (2): ~51%  |  High (≥3): ~36%", bullet))
story.append(sp(4))
story.append(P("<b>Prognostic Significance:</b> Patients with high-risk FLIPI AND no complete metabolic response by PET/CT to primary therapy AND relapse within 2 years of completion of first-line therapy → very poor prognosis.", imp_box))
story.append(sp(8))

story.append(subsection_header("3D. Staging Evaluation for NHL (Table 113-5)", DARK_BLUE))
story.append(sp(4))
story.append(two_col(
    ["Physical examination",
     "Documentation of B symptoms",
     "Complete blood counts (CBC)",
     "Liver function tests",
     "Serum uric acid",
     "Serum calcium",
     "Serum protein electrophoresis"],
    ["Serum β2-microglobulin",
     "Chest X-ray",
     "CT scan: chest, abdomen, pelvis",
     "Bone marrow biopsy",
     "PET/CT scan (large-cell, aggressive lymphomas)",
     "Lumbar puncture (lymphoblastic, Burkitt's, DLBCL with +ve marrow)"],
    "Clinical/Lab", "Imaging/Procedures"
))
story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════
# SECTION 4 – NHL SUBTYPES
# ═══════════════════════════════════════════════════════════════════════════
story.append(section_header("SECTION 4: NON-HODGKIN'S LYMPHOMA – SUBTYPES", DARK_BLUE))
story.append(sp(8))

# ── 4A: Follicular Lymphoma ──
story.append(subsection_header("4A. Follicular Lymphoma (FL) – Most Common Indolent NHL", ACCENT_TEAL))
story.append(sp(6))
fl_data = [
    ["Feature", "Details"],
    ["Prevalence", "2nd most common NHL; most common indolent B-cell NHL in adults"],
    ["Cell origin", "Germinal center B cells (centrocytes and centroblasts)"],
    ["Cytogenetics", "t(14;18) translocation → BCL2 overexpression (anti-apoptotic) – found in ~85%"],
    ["Immunophenotype", "CD19+, CD20+, CD10+, BCL2+, BCL6+; CD5-, CD23-"],
    ["Clinical features", "Painless lymphadenopathy; waxing & waning; usually advanced (stage III/IV) at Dx"],
    ["Bone marrow", "Positive in 85% at diagnosis"],
    ["Natural history", "Indolent but INCURABLE with standard therapy; median OS 15-20 years"],
    ["Transformation", "Histologic transformation to DLBCL (~30% over lifetime; associated with worse prognosis)"],
    ["1st line treatment", "Bendamustine + Rituximab (BR) – standard of care for medium/high-volume disease"],
    ["Alternative", "R-CHOP, R-CVP, Rituximab alone (low volume), Obinutuzumab + chemo, R-Lenalidomide"],
    ["Relapsed/Refractory", "CAR-T (axi-cel, tisa-cel) approved 3rd line+; Mosunetuzumab (CD20×CD3 bispecific)"],
    ["Maintenance", "Maintenance rituximab post-induction improves response duration"],
    ["HSCT", "Auto-HSCT: 40% long-term remission; Allo-HSCT: 60% (more toxicity)"],
]
story.append(info_table(fl_data, col_widths=[CW*0.32, CW*0.68]))
story.append(sp(8))

# ── 4B: DLBCL ──
story.append(subsection_header("4B. Diffuse Large B-Cell Lymphoma (DLBCL) – Most Common Aggressive NHL", ACCENT_PURPLE))
story.append(sp(6))
dlbcl_data = [
    ["Feature", "Details"],
    ["Prevalence", "Most common NHL overall (~30-35% of all NHLs)"],
    ["Cell origin", "Mature B cells (post-germinal center or germinal center)"],
    ["GC vs ABC", "Germinal Center (GC-type): better prognosis | Activated B-Cell (ABC-type): worse prognosis"],
    ["Immunophenotype", "CD19+, CD20+, CD22+, CD79a+; variable CD10, BCL6, MUM1"],
    ["Clinical features", "Rapidly growing nodal/extranodal mass; B symptoms common; elevated LDH"],
    ["Double-hit lymphoma", "MYC rearrangement + BCL2 or BCL6 rearrangement → extremely aggressive; treated with DA-EPOCH-R"],
    ["Standard treatment", "R-CHOP (Rituximab + Cyclophosphamide, Doxorubicin, Vincristine, Prednisone) × 6 cycles"],
    ["CNS prophylaxis", "High-risk: intrathecal MTX or systemic high-dose MTX (IPI ≥4, double-hit, kidney/adrenal involvement)"],
    ["Relapsed/Refractory", "Salvage chemo → Auto-HSCT (if chemo-sensitive); CAR-T (axi-cel, liso-cel, tisa-cel) as 3rd-line"],
    ["Cure rate", "~60-70% with R-CHOP; lower in high-IPI disease"],
    ["Primary CNS DLBCL", "High-dose MTX-based regimens; EBV-associated in immunosuppressed patients"],
]
story.append(info_table(dlbcl_data, col_widths=[CW*0.32, CW*0.68]))
story.append(sp(8))

# ── 4C: Mantle Cell Lymphoma ──
story.append(subsection_header("4C. Mantle Cell Lymphoma (MCL)", colors.HexColor("#b45309")))
story.append(sp(6))
mcl_data = [
    ["Feature", "Details"],
    ["Cytogenetics", "t(11;14) → Cyclin D1 (BCL1) overexpression – PATHOGNOMONIC"],
    ["Immunophenotype", "CD19+, CD20+, CD5+, CD23-, Cyclin D1+, SOX11+"],
    ["Differentials", "Unlike CLL/SLL: CD23-; Unlike FL: CD10-"],
    ["Clinical", "Typically advanced stage; often involves GI tract (lymphomatous polyposis), bone marrow, blood"],
    ["Behavior", "Considered aggressive despite appearing indolent; generally INCURABLE"],
    ["Treatment", "Rituximab-containing regimens (R-CHOP, R-HDAC, BR); HSCT for younger fit patients; BTK inhibitors (ibrutinib, acalabrutinib) for relapsed"],
]
story.append(info_table(mcl_data, col_widths=[CW*0.32, CW*0.68], header_bg=colors.HexColor("#b45309")))
story.append(sp(8))

# ── 4D: Burkitt's Lymphoma ──
story.append(subsection_header("4D. Burkitt's Lymphoma (BL)", RED_ACCENT))
story.append(sp(6))
bl_data = [
    ["Feature", "Details"],
    ["Cytogenetics", "t(8;14) (most common, 80%) → MYC overexpression | Also t(2;8), t(8;22)"],
    ["Immunophenotype", "CD19+, CD20+, CD10+, BCL6+; BCL2-, TdT-; Ki-67 ~100%"],
    ["Variants", "Endemic (African/EBV-associated, jaw/facial bones), Sporadic (abdomen), Immunodeficiency-related (HIV+)"],
    ["Starry sky pattern", "Classic histology: sheets of lymphocytes with interspersed tingible body macrophages"],
    ["Clinical", "Fastest growing human tumor; highly aggressive; jaw involvement in endemic form"],
    ["Treatment", "Short, intensive chemo: CODOX-M/IVAC, hyper-CVAD, or R-EPOCH; NOT standard R-CHOP"],
    ["Tumor lysis syndrome", "High risk – prophylaxis with hydration, allopurinol/rasburicase mandatory"],
    ["Cure rate", "~90% with intensive regimens in localized disease; lower in advanced"],
]
story.append(info_table(bl_data, col_widths=[CW*0.32, CW*0.68], header_bg=RED_ACCENT))
story.append(sp(6))
story.append(mnemonic_box("Burkitt's MYC Translocations",
    ["• t(8;<b>14</b>) – <b>IgH</b> locus (chr 14) – most common (80%)",
     "• t(<b>2</b>;8) – Igκ locus (chr 2)",
     "• t(8;<b>22</b>) – Igλ locus (chr 22)",
     "Mnemonic: <b>14-2-22 = 'One Four, Two, Two-Two'</b>"]))
story.append(PageBreak())

# ── 4E: Marginal Zone ──
story.append(subsection_header("4E. Marginal Zone Lymphomas (MZL)", ACCENT_TEAL))
story.append(sp(6))
mzl_data = [
    ["Type", "Site", "Association", "Key Features"],
    ["MALT (Extranodal MZL)", "Stomach (most common), lungs, thyroid, eyes, skin, salivary glands", "H. pylori (gastric), Borrelia (skin), C. psittaci (eyes), HCV", "Antibiotic treatment for H. pylori causes regression; t(11;18) predicts no response to antibiotics"],
    ["Splenic MZL", "Spleen, peripheral blood", "HCV, HBV", "Villous lymphocytes on blood smear; treat HCV if present"],
    ["Nodal MZL", "Lymph nodes", "—", "Rarest type; similar to FL but without t(14;18)"],
]
story.append(info_table(mzl_data, col_widths=[CW*0.22, CW*0.28, CW*0.25, CW*0.25]))
story.append(sp(8))

# ── 4F: T-cell Lymphomas ──
story.append(subsection_header("4F. Key T-Cell / NK-Cell Lymphomas", colors.HexColor("#be185d")))
story.append(sp(6))
tcl_data = [
    ["Subtype", "Key Features", "Treatment"],
    ["Peripheral T-cell lymphoma NOS (PTCL-NOS)", "Most common T-cell NHL; poor prognosis; CD4+ or CD8+", "CHOP-based ± etoposide (CHOEP); HSCT"],
    ["Angioimmunoblastic T-cell lymphoma (AITL)", "CD4+; hypergammaglobulinemia; B symptoms; skin rash; EBV-associated; constitutional symptoms", "CHOP-based; HSCT"],
    ["Anaplastic large-cell lymphoma (ALCL) ALK+", "CD30+, ALK+; younger patients; best prognosis of T-cell NHLs; bimodal age", "CHOP + brentuximab vedotin (BV); excellent response"],
    ["ALCL ALK-", "CD30+, ALK-; older patients; worse prognosis than ALK+", "BV + CHP (replace vincristine with BV)"],
    ["Adult T-cell leukemia/lymphoma (ATL)", "HTLV-1; Japan/Caribbean; hypercalcemia; skin lesions; lytic bone lesions; Flower cells", "Zidovudine + IFN-α; poor prognosis"],
    ["Extranodal NK/T-cell lymphoma, nasal type", "EBV+; Asia/Latin America; midline facial destruction; angioinvasive", "Non-anthracycline (SMILE/DDGP); radiation for localized"],
    ["Mycosis fungoides/Sézary syndrome", "Cutaneous T-cell lymphoma; Pautrier microabscesses (histology); Sézary cells (cerebriform nuclei)", "Skin-directed therapy; PUVA; systemic for advanced"],
    ["Hepatosplenic T-cell lymphoma", "Young males; γδ T-cell; isochromosome 7q; hepatosplenomegaly without lymphadenopathy; very poor prognosis", "Intensive chemo; HSCT"],
    ["Enteropathy-associated T-cell lymphoma (EATL)", "Associated with celiac disease; jejunum; poor prognosis", "Aggressive chemo; HSCT"],
]
story.append(info_table(tcl_data, col_widths=[CW*0.32, CW*0.42, CW*0.26], header_bg=colors.HexColor("#be185d")))
story.append(sp(8))

story.append(mnemonic_box("T-cell Lymphoma NEET Points",
    ["• <b>ALK+ ALCL</b> = Best prognosis T-cell NHL (young patients)",
     "• <b>ATL</b> = HTLV-1 + Hypercalcemia + Flower cells",
     "• <b>Nasal NK/T-cell</b> = EBV + Midline destruction + Asia (use non-anthracycline regimen)",
     "• <b>Hepatosplenic T-cell</b> = γδ T-cell + i(7q) + No lymphadenopathy + Very poor prognosis",
     "• <b>EATL</b> = Celiac disease association",
     "• <b>Mycosis fungoides</b> = Pautrier microabscesses + Sézary syndrome (leukemic phase)"]))
story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════
# SECTION 5 – HODGKIN'S LYMPHOMA
# ═══════════════════════════════════════════════════════════════════════════
story.append(section_header("SECTION 5: HODGKIN'S LYMPHOMA (HL)", DARK_BLUE))
story.append(sp(8))

story.append(P("""Hodgkin's lymphoma is a <b>malignancy of mature B lymphocytes</b>. It represents ~10% of all lymphomas.
The majority of HL is <b>classical HL (cHL)</b>. A minor subtype, <b>Nodular Lymphocyte-Predominant HL (NLPHL)</b>,
is now recognized as biologically distinct from cHL. Cure rates now exceed <b>85%</b> with modern therapy.""", body))
story.append(sp(8))

story.append(subsection_header("5A. Reed-Sternberg (HRS) Cell – Pathognomonic of cHL", RED_ACCENT))
story.append(sp(6))
rs_data = [
    ["Feature", "Details"],
    ["Cell origin", "Clonal B lymphocyte (germinal center B cell that has lost B-cell program)"],
    ["Morphology", "Large cells with abundant cytoplasm; BILOBED and/or MULTIPLE NUCLEI; prominent eosinophilic 'owl-eye' nucleoli"],
    ["CD15", "Positive in 85% of cases (Leu-M1)"],
    ["CD30", "Positive in 100% of cases (Ki-1) – MOST CONSISTENT MARKER"],
    ["PAX-5", "Positive (but dim/weak) – vestigial B-cell marker"],
    ["CD19, CD20", "Low to absent expression (despite B-cell origin)"],
    ["CD45 (LCA)", "NEGATIVE (key differentiator from NHL)"],
    ["Tumor cellularity", "HRS cells comprise <1% of tumor; rest is inflammatory infiltrate (polyclonal T cells, eosinophils, plasma cells, histiocytes)"],
    ["EBV (LMP-1)", "Positive in ~1/3 of non-HIV HL; nearly 100% of HIV-associated HL"],
]
story.append(info_table(rs_data, col_widths=[CW*0.3, CW*0.7], header_bg=RED_ACCENT))
story.append(sp(6))
story.append(mnemonic_box("RS Cell Immunophenotype Memory Aid",
    ["<b>Positive:</b> CD15, CD30, PAX-5 (weak)",
     "<b>Negative:</b> CD45, CD19, CD20 (weak/absent)",
     "Mnemonic: 'RS cells are <b>CD15+, CD30+</b> but CD45−'",
     "CD30 = 100% positive → target for <b>Brentuximab Vedotin</b> (anti-CD30 ADC)"]))
story.append(sp(8))

story.append(subsection_header("5B. cHL Subtypes (Table 114-1)", ACCENT_TEAL))
story.append(sp(6))
hl_sub_data = [
    ["Subtype", "Frequency", "RS Cells", "Background", "EBV", "Clinical"],
    ["Nodular Sclerosis (NS)", "~70% (most common in US)", "Lacunar cells", "Bands of collagen/fibrosis; nodular pattern", "~15-25%", "Young adults; mediastinal mass; Stage II"],
    ["Mixed Cellularity (MC)", "~20-25%", "Classic RS cells (abundant)", "Mixed inflammatory cells (eosinophils, plasma cells, lymphocytes)", "~70%", "Older patients, HIV+, developing countries; more advanced stage"],
    ["Lymphocyte-Rich (LR)", "~5%", "RS cells (rare)", "Predominantly lymphocytes; nodular or diffuse", "~15-25%", "Good prognosis; similar to NS"],
    ["Lymphocyte-Depleted (LD)", "~1-2% (rarest)", "Abundant RS + variants", "Few lymphocytes; fibrosis or diffuse RS", "~80-90%", "Elderly, HIV+, developing countries; advanced stage; worst prognosis"],
]
story.append(info_table(hl_sub_data, col_widths=[CW*0.22, CW*0.14, CW*0.17, CW*0.2, CW*0.1, CW*0.17]))
story.append(sp(6))
story.append(P("• Together, <b>Nodular Sclerosis + Mixed Cellularity</b> account for nearly <b>95%</b> of cHL cases.", key_point("").getFlowableToWrap if hasattr(key_point(""), "getFlowableToWrap") else bullet))
story.append(P("⭐ <b>Nodular sclerosis</b> = young adults + mediastinum = most common HL subtype in USA/Western countries", imp_box))
story.append(P("⭐ <b>Mixed cellularity / Lymphocyte-depleted</b> = elderly + HIV+ + developing countries", imp_box))
story.append(sp(8))

story.append(subsection_header("5C. Nodular Lymphocyte-Predominant HL (NLPHL)", ACCENT_PURPLE))
story.append(sp(6))
nlphl_data = [
    ["Feature", "NLPHL", "cHL"],
    ["Frequency", "<5% of all HL", ">95% of all HL"],
    ["Malignant cell", "L&H ('Popcorn') cell = Lymphocyte & Histiocyte cell", "Reed-Sternberg (HRS) cell"],
    ["CD20", "POSITIVE (strong)", "Absent/low"],
    ["CD19, CD79a, BCL2, CD45", "POSITIVE", "Negative"],
    ["CD30", "NEGATIVE", "Positive (100%)"],
    ["CD15", "NEGATIVE", "Positive (85%)"],
    ["EBV", "Negative", "Positive in 20-40%"],
    ["Sex", "75% male", "Slight male predominance"],
    ["Natural history", "Chronic relapsing; can transform to DLBCL (specifically T-cell/histiocyte-rich B-cell lymphoma)", "Curable in >85%"],
    ["Early stage treatment", "Definitive radiotherapy (15-year non-relapse survival ~82%)", "ABVD ± radiation"],
    ["Advanced treatment", "R-CHOP (100% response in small series; may be curative) OR watchful waiting", "ABVD or BEACOPP"],
]
story.append(info_table(nlphl_data, col_widths=[CW*0.3, CW*0.35, CW*0.35]))
story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════
# SECTION 6 – HL TREATMENT
# ═══════════════════════════════════════════════════════════════════════════
story.append(section_header("SECTION 6: TREATMENT OF HODGKIN'S LYMPHOMA", DARK_BLUE))
story.append(sp(8))

story.append(subsection_header("6A. Early-Stage cHL Treatment", ACCENT_TEAL))
story.append(sp(6))
story.append(P("""<b>Standard regimen: ABVD</b> (Adriamycin/Doxorubicin, Bleomycin, Vinblastine, Dacarbazine)
– given every other week (2 treatments per cycle).""", body))
story.append(sp(4))
es_data = [
    ["Disease Group", "Regimen", "Outcomes"],
    ["Favorable/Low-risk early stage", "4-6 cycles ABVD alone (without RT)", "PFS 88-92%; OS 97-100% at 5-7 years"],
    ["Favorable + very good risk (≤2 nodal areas)", "ABVD × 2 cycles + low-dose RT (20 Gy) [German study]", "Equivalent to ABVD × 4 + 30 Gy RT"],
    ["Unfavorable/High-risk early stage", "ABVD × 4 cycles + involved-field RT\n OR ABVD × 6 cycles alone", "Combined modality for bulky disease; chemo alone if RT contraindicated"],
    ["Bulky disease + negative interim PET/CT", "May omit radiation therapy after chemotherapy", "PET-adapted approach"],
    ["Alternative regimens", "Stanford V; escalated BEACOPP", "NOT superior to ABVD in early-stage"],
]
story.append(info_table(es_data, col_widths=[CW*0.28, CW*0.42, CW*0.3]))
story.append(sp(6))
story.append(P("⭐ <b>Role of interim PET/CT:</b> Negative PET/CT after 2-3 cycles of ABVD → excellent outcomes; may allow de-escalation or omission of RT.", imp_box))
story.append(sp(8))

story.append(subsection_header("6B. Advanced-Stage cHL Treatment", ACCENT_PURPLE))
story.append(sp(6))
story.append(P("Advanced-stage disease: <b>NO benefit from adding radiation therapy</b> after complete response to chemotherapy.", body))
story.append(sp(4))
as_data = [
    ["Regimen", "Details", "Notes"],
    ["ABVD (standard)", "Adriamycin + Bleomycin + Vinblastine + Dacarbazine\n× 6 cycles", "Most widely used; OS ~80% at 5-yrs; pulmonary toxicity with bleomycin"],
    ["BV-AVD (preferred if fit)", "Brentuximab vedotin + Doxorubicin + Vinblastine + Dacarbazine\n(replace bleomycin with BV)", "Improved OS vs ABVD in ECHELON-1 trial; now preferred in many centers"],
    ["Escalated BEACOPP", "Bleomycin, Etoposide, Adriamycin, Cyclophosphamide, Vincristine, Procarbazine, Prednisone", "Higher PFS but similar OS vs ABVD; more toxicity (myelosuppression, infertility)"],
    ["N-AVD (nivolumab-based)", "Nivolumab (PD-1 inhibitor) + AVD", "SWOG trial; potential for PD-1-based frontline therapy"],
]
story.append(info_table(as_data, col_widths=[CW*0.22, CW*0.42, CW*0.36]))
story.append(sp(8))

story.append(subsection_header("6C. ABVD Components – NEET Favorite", RED_ACCENT))
story.append(sp(4))
abvd_data = [
    ["Letter", "Drug", "Class", "Key Toxicity"],
    ["A", "Adriamycin (Doxorubicin)", "Anthracycline", "Cardiotoxicity (dilated cardiomyopathy)"],
    ["B", "Bleomycin", "Antitumor antibiotic", "Pulmonary fibrosis (dose-limiting); Raynaud's phenomenon"],
    ["V", "Vinblastine", "Vinca alkaloid", "Myelosuppression (marrow toxicity)"],
    ["D", "Dacarbazine (DTIC)", "Alkylating agent", "Nausea/vomiting; myelosuppression"],
]
story.append(info_table(abvd_data, col_widths=[CW*0.08, CW*0.28, CW*0.27, CW*0.37], header_bg=RED_ACCENT))
story.append(sp(4))
story.append(P("⭐ <b>ABVD advantage over MOPP:</b> Preserves fertility (very low infertility risk); less leukemogenic.", imp_box))
story.append(sp(8))

story.append(subsection_header("6D. BEACOPP Components", ACCENT_TEAL))
story.append(sp(4))
beacopp_data = [
    ["Letter", "Drug"],
    ["B", "Bleomycin"],
    ["E", "Etoposide"],
    ["A", "Adriamycin (Doxorubicin)"],
    ["C", "Cyclophosphamide"],
    ["O", "Oncovin (Vincristine)"],
    ["P", "Procarbazine"],
    ["P", "Prednisone"],
]
story.append(info_table(beacopp_data, col_widths=[CW*0.1, CW*0.9]))
story.append(sp(8))

story.append(subsection_header("6E. Relapsed/Refractory HL", DARK_BLUE))
story.append(sp(4))
rr_data = [
    ["Approach", "Details"],
    ["Salvage chemotherapy", "ICE (Ifosfamide, Carboplatin, Etoposide); ESHAP; GVD (Gemcitabine, Vinorelbine, Doxil)"],
    ["Brentuximab vedotin (BV)", "Anti-CD30 antibody-drug conjugate (ADC); highly active in relapsed cHL; used as bridge to HSCT or as maintenance post-HSCT"],
    ["PD-1 inhibitors", "Nivolumab (Opdivo) and Pembrolizumab (Keytruda) – approved for relapsed/refractory cHL after HSCT failure; ~70% response rate"],
    ["Autologous HSCT", "Standard of care for chemosensitive relapsed HL; long-term remission ~50%"],
    ["Allogeneic HSCT", "For multiply relapsed disease; graft-vs-lymphoma effect; higher TRM"],
]
story.append(info_table(rr_data, col_widths=[CW*0.3, CW*0.7]))
story.append(sp(8))

story.append(subsection_header("6F. Late Toxicities of HL Treatment", ORANGE))
story.append(sp(4))
story.append(P("The <b>new challenge</b> in HL treatment is late therapy-related toxicity (given the high cure rate):", body))
story.append(sp(4))
late_tox = [
    ["Late Toxicity", "Cause", "Notes"],
    ["Secondary malignancies", "Radiation + chemotherapy", "Breast cancer, lung cancer, thyroid cancer (most common after mediastinal RT)"],
    ["Cardiovascular disease", "Radiation (mediastinal/thoracic)", "Premature coronary artery disease, pericardial disease, valvular disease"],
    ["Stroke", "Radiation to neck/chest", "Carotid atherosclerosis"],
    ["Hypothyroidism", "Thoracic radiation", "Very common; monitor TSH regularly; can occur years later"],
    ["Lhermitte's syndrome", "Thoracic radiation", "~15% of patients; 'electric shock' sensation to lower limbs on neck flexion; self-limited"],
    ["Infertility (men)", "Alkylating agents (MOPP, BEACOPP)", "Nearly 100% permanent with alkylating agent chemo; VERY RARE with ABVD"],
    ["Infertility (women)", "Alkylating agents", "Age-dependent; younger women more likely to recover"],
    ["Pulmonary fibrosis", "Bleomycin (in ABVD)", "Monitor with PFTs; hold bleomycin if deterioration"],
]
story.append(info_table(late_tox, col_widths=[CW*0.27, CW*0.28, CW*0.45], header_bg=ORANGE))
story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════
# SECTION 7 – NHL TREATMENT
# ═══════════════════════════════════════════════════════════════════════════
story.append(section_header("SECTION 7: TREATMENT OF NON-HODGKIN'S LYMPHOMA", DARK_BLUE))
story.append(sp(8))

story.append(subsection_header("7A. R-CHOP – Backbone of Aggressive B-cell NHL", ACCENT_TEAL))
story.append(sp(6))
rchop_data = [
    ["Drug", "Class", "Route", "Key Toxicity"],
    ["Rituximab (R)", "Anti-CD20 monoclonal antibody", "IV", "Infusion reactions; HBV reactivation; PML (rare)"],
    ["Cyclophosphamide (C)", "Alkylating agent", "IV/PO", "Hemorrhagic cystitis (prevent with mesna); myelosuppression"],
    ["Doxorubicin/Hydroxydaunorubicin (H)", "Anthracycline", "IV", "Cardiotoxicity (dilated CMP); cumulative dose-dependent"],
    ["Oncovin/Vincristine (O)", "Vinca alkaloid", "IV", "Peripheral neuropathy; constipation/ileus; SIADH"],
    ["Prednisone (P)", "Corticosteroid", "PO", "Hyperglycemia; mood changes; fluid retention; infection"],
]
story.append(info_table(rchop_data, col_widths=[CW*0.28, CW*0.25, CW*0.1, CW*0.37]))
story.append(sp(6))
story.append(P("• R-CHOP × 6 cycles is <b>standard of care for DLBCL</b> and R-CHOP or BR for FL requiring treatment.", bullet))
story.append(P("• Addition of <b>Rituximab</b> to CHOP improved CR rate and OS in B-cell NHL dramatically.", bullet))
story.append(sp(8))

story.append(subsection_header("7B. Novel Agents & Targeted Therapies in NHL", ACCENT_PURPLE))
story.append(sp(6))
novel_data = [
    ["Agent", "Class/Target", "Indication"],
    ["Rituximab", "Anti-CD20 mAb (chimeric)", "All CD20+ B-cell NHLs (FL, DLBCL, MCL, MZL)"],
    ["Obinutuzumab", "Anti-CD20 mAb (humanized, type II)", "FL (GALLIUM trial: superior PFS vs rituximab + chemo)"],
    ["Brentuximab Vedotin (BV)", "Anti-CD30 ADC (MMAE payload)", "ALK+ / ALK- ALCL; cHL (relapsed); BV-AVD frontline HL"],
    ["Ibrutinib / Acalabrutinib", "BTK inhibitor", "MCL (1st/2nd line); CLL; Waldenström's"],
    ["Lenalidomide", "Immunomodulatory (IMiD)", "Relapsed FL, MCL; R2 (rituximab + lenalidomide) for FL"],
    ["Tazemetostat", "EZH2 inhibitor", "Relapsed FL (EZH2 mutated or wild-type)"],
    ["Idelalisib / Copanlisib", "PI3K-delta / PI3K-alpha inhibitor", "Relapsed FL (limited use due to toxicity/lack of confirmatory RCT)"],
    ["Nivolumab / Pembrolizumab", "PD-1 checkpoint inhibitor", "Relapsed/refractory cHL after ASCT; CNS lymphoma"],
    ["CAR-T (Axi-cel, Tisa-cel)", "Anti-CD19 CAR-T cells", "Relapsed/refractory DLBCL (2nd line+ ); relapsed FL (3rd line+)"],
    ["Liso-cel", "Anti-CD19 CAR-T (4-1BB)", "Relapsed/refractory DLBCL"],
    ["Mosunetuzumab", "CD20×CD3 bispecific antibody", "Relapsed FL (3rd line+); off-the-shelf option vs CAR-T"],
    ["Polatuzumab vedotin", "Anti-CD79b ADC", "Relapsed DLBCL (Pola-BR regimen)"],
    ["Zanubrutinib", "BTK inhibitor (next-gen)", "MCL, WM, MZL"],
]
story.append(info_table(novel_data, col_widths=[CW*0.28, CW*0.35, CW*0.37]))
story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════
# SECTION 8 – HIGH-YIELD NEET SS TABLES
# ═══════════════════════════════════════════════════════════════════════════
story.append(section_header("SECTION 8: HIGH-YIELD COMPARISON TABLES", DARK_BLUE))
story.append(sp(8))

story.append(subsection_header("8A. Immunophenotype Quick Reference", ACCENT_TEAL))
story.append(sp(6))
immuno_data = [
    ["Lymphoma", "CD20", "CD10", "CD5", "CD23", "BCL2", "CD30", "CD15", "CD45", "Other"],
    ["Follicular (FL)", "+", "+", "-", "-/+", "+", "-", "-", "+", "BCL6+; t(14;18)"],
    ["DLBCL", "+", "+/-", "-", "-", "+/-", "-", "-", "+", "MUM1 in ABC type"],
    ["Mantle Cell (MCL)", "+", "-", "+", "-", "+", "-", "-", "+", "Cyclin D1+; SOX11+; t(11;14)"],
    ["Burkitt's (BL)", "+", "+", "-", "-", "-", "-", "-", "+", "Ki67~100%; t(8;14)"],
    ["Marginal Zone (MZL)", "+", "-", "-", "-", "+/-", "-", "-", "+", "CD43+/-"],
    ["CLL/SLL", "+", "-", "+", "+", "+", "-", "-", "+", "ZAP70+; CD38+"],
    ["Lymphoplasmacytic", "+", "-", "-", "-", "+", "-", "-", "+", "MYD88 L265P; IgM paraprotein"],
    ["Classical HL (HRS)", "- (weak)", "-", "-", "-", "-", "+", "+", "-", "PAX5+ (weak); EBV LMP1"],
    ["NLPHL (L&H cell)", "+", "+", "-", "-", "+", "-", "-", "+", "OCT2+; BOB1+"],
    ["ALCL ALK+", "-", "-", "-", "-", "-", "+", "-", "+/-", "ALK1+; EMA+"],
    ["ATL", "-", "-", "+", "-", "-", "+/-", "-", "+", "HTLV-1+; CD4+; CD25+"],
]
story.append(info_table(immuno_data,
    col_widths=[CW*0.2, CW*0.065, CW*0.065, CW*0.065, CW*0.065, CW*0.065, CW*0.065, CW*0.065, CW*0.065, CW*0.24],
    header_bg=DARK_BLUE))
story.append(sp(8))

story.append(subsection_header("8B. Cytogenetics / Molecular Markers – NEET Favorites", ACCENT_PURPLE))
story.append(sp(6))
cyto_data = [
    ["Translocation / Marker", "Gene Effect", "Lymphoma"],
    ["t(14;18)(q32;q21)", "BCL2 overexpression (anti-apoptotic)", "Follicular lymphoma (FL) – ~85%"],
    ["t(11;14)(q13;q32)", "Cyclin D1 (BCL1) overexpression", "Mantle cell lymphoma (MCL) – pathognomonic"],
    ["t(8;14)(q24;q32)", "MYC overexpression via IgH enhancer", "Burkitt's lymphoma (most common, 80%)"],
    ["t(2;8)(p12;q24)", "MYC + Igκ", "Burkitt's (10%)"],
    ["t(8;22)(q24;q11)", "MYC + Igλ", "Burkitt's (10%)"],
    ["t(11;18)(q21;q21)", "API2-MALT1 fusion", "Gastric MALT lymphoma (predicts no response to antibiotics)"],
    ["t(2;5)(p23;q35)", "NPM-ALK fusion protein", "ALCL ALK+ (pathognomonic)"],
    ["MYD88 L265P mutation", "NF-κB activation", "Lymphoplasmacytic lymphoma / Waldenström's (~90%)"],
    ["BCL6 rearrangements", "Germinal center transcription factor", "DLBCL, FL"],
    ["MYC + BCL2 rearrangements", "'Double-hit' – extremely aggressive", "High-grade B-cell lymphoma (Double-hit)"],
    ["MYC + BCL2 + BCL6", "'Triple-hit' – extremely aggressive", "High-grade B-cell lymphoma (Triple-hit)"],
    ["Isochromosome 7q [i(7q)]", "Chromosomal aberration", "Hepatosplenic T-cell lymphoma"],
    ["11q aberrations (no MYC)", "Burkitt's-like behavior", "High-grade B-cell lymphoma with 11q aberration"],
]
story.append(info_table(cyto_data, col_widths=[CW*0.32, CW*0.33, CW*0.35]))
story.append(PageBreak())

story.append(subsection_header("8C. Indolent vs Aggressive NHL – Key Differences", ACCENT_TEAL))
story.append(sp(6))
ind_agg_data = [
    ["Feature", "Indolent NHL", "Aggressive NHL"],
    ["Examples", "FL, MALT, SLL/CLL, Splenic MZL, Lymphoplasmacytic", "DLBCL, MCL, BL, PTCL, ATL, ALCL"],
    ["Growth rate", "Slow (months to years)", "Rapid (days to weeks)"],
    ["Presentation", "Painless LAD; waxing-waning; asymptomatic often", "Rapidly enlarging mass; B symptoms common"],
    ["Stage at Dx", "Usually advanced (III/IV)", "Variable; localized or advanced"],
    ["Bone marrow +ve", "Common (esp. FL ~85%)", "Less frequent"],
    ["LDH", "Normal or mildly elevated", "Often markedly elevated"],
    ["Curability", "Generally INCURABLE with standard chemo (but long OS ~15-20 yrs for FL)", "POTENTIALLY CURABLE with aggressive chemo (60-80%)"],
    ["Watchful waiting", "Applicable for asymptomatic indolent disease", "NOT applicable – requires immediate treatment"],
    ["Transformation", "Can transform to aggressive NHL (histologic transformation)", "Does not transform"],
    ["Main prognostic index", "FLIPI (for FL)", "IPI (for aggressive NHL)"],
]
story.append(info_table(ind_agg_data, col_widths=[CW*0.22, CW*0.39, CW*0.39]))
story.append(sp(8))

story.append(subsection_header("8D. Primary CNS Lymphoma (PCNSL)", DARK_BLUE))
story.append(sp(6))
pcnsl_data = [
    ["Feature", "Details"],
    ["Histology", "DLBCL (most common type of CNS lymphoma)"],
    ["EBV association", "Majority of PCNSL in immunosuppressed patients are EBV-positive"],
    ["Imaging", "MRI: ring-enhancing or homogeneously enhancing periventricular lesion (frontal lobes, basal ganglia)"],
    ["Diagnosis", "Brain biopsy; vitreoretinal biopsy if ocular involvement; CSF cytology"],
    ["Treatment", "High-dose Methotrexate (HD-MTX) ± whole brain radiation (WBRT)"],
    ["Steroids", "Avoid steroids before biopsy – cause rapid regression (diagnostic difficulty); 'ghost tumor'"],
    ["Prognosis", "Poor; median OS ~12-18 months without treatment; better with HD-MTX in immunocompetent"],
]
story.append(info_table(pcnsl_data, col_widths=[CW*0.3, CW*0.7]))
story.append(sp(8))

# ─── Section 9: Mnemonics ────────────────────────────────────────────────────
story.append(PageBreak())
story.append(section_header("SECTION 9: MNEMONICS & EXAM PEARLS", DARK_BLUE))
story.append(sp(8))

mnemonics = [
    ("ABVD = A Beautiful Vinblastin Death", "A=Adriamycin(Doxorubicin) | B=Bleomycin | V=Vinblastine | D=Dacarbazine"),
    ("BEACOPP = BE A COP Please", "B=Bleomycin | E=Etoposide | A=Adriamycin | C=Cyclo | O=Oncovin | P=Procarbazine | P=Prednisone"),
    ("R-CHOP = Really CHOPping B cells", "R=Rituximab | C=Cyclophosphamide | H=Hydroxydaunorubicin (Doxorubicin) | O=Oncovin (Vincristine) | P=Prednisone"),
    ("RS Cell = CD15 & CD30 positive; CD45 NEGATIVE", "Remember: RS cells are CD15+, CD30+ but CD45− (key to differentiate from NHL)"),
    ("IPI = APLES", "A=Age>60 | P=Performance status≥2 | L=LDH>Normal | E=Extranodal sites>1 | S=Stage III/IV"),
    ("FLIPI = ASHLN", "A=Age>60 | S=Stage III/IV | H=Hemoglobin<12 | L=LDH>normal | N=Nodal sites>4"),
    ("Burkitt's t(8;14) Rule: 8 breaks and joins 14, 2, or 22", "t(8;14) = IgH (chr 14) = most common | t(2;8) = Igκ | t(8;22) = Igλ"),
    ("MCL = 'Mantle Cyclin D1': t(11;14) → Cyclin D1", "CD5+, CD23−, Cyclin D1+, SOX11+; t(11;14)"),
    ("FL = 'Follows BCL2': t(14;18) → BCL2", "Most common indolent NHL; follicular pattern; CD10+, BCL2+"),
    ("NLPHL 'Popcorn cells' = L&H cells", "CD20+, CD45+, CD30−, CD15−; <5% HL; chronic relapsing; R-CHOP curative intent"),
    ("ATL = HTLV-1 + Flower cells + HyperCalcemia", "Japan/Caribbean; breast milk transmission; CD4+, CD25+; treat with Zidovudine + IFN-α"),
    ("NK/T-cell nasal = EBV + Asia + Midline destruction", "Non-anthracycline regimen (SMILE); do NOT use CHOP"),
]

for title, content in mnemonics:
    story.append(mnemonic_box(title, content))
    story.append(sp(6))

story.append(PageBreak())
story.append(section_header("SECTION 10: SUMMARY QUICK-REFERENCE TABLE", DARK_BLUE))
story.append(sp(8))
summary_data = [
    ["Lymphoma Type", "Key Marker/Cytogenetics", "1st-Line Treatment", "Prognosis"],
    ["Follicular (FL)", "t(14;18); BCL2+; CD10+", "BR or R-CHOP (if treatment needed); watchful waiting if asymptomatic", "Indolent; OS 15-20 yrs; incurable but long survival"],
    ["DLBCL", "Variable; GCB vs ABC; double-hit (MYC+BCL2)", "R-CHOP × 6 cycles", "Curable ~60-70%; poor if double-hit"],
    ["Mantle Cell (MCL)", "t(11;14); Cyclin D1+; CD5+", "R-CHOP or BR + HSCT in fit young patients; BTK inhibitors (relapsed)", "Aggressive-indolent; generally incurable"],
    ["Burkitt's (BL)", "t(8;14); MYC; Ki67~100%", "CODOX-M/IVAC or hyper-CVAD + R; tumor lysis prophylaxis", "~90% cure in localized; worse in advanced"],
    ["Gastric MALT", "t(11;18); H. pylori", "H. pylori eradication antibiotics; RT for refractory", "Excellent if early stage"],
    ["Classical HL", "CD15+, CD30+; RS cells", "ABVD (early: ±RT; advanced: alone) or BV-AVD", "Cure >85%; late toxicities main challenge"],
    ["NLPHL", "CD20+, CD45+; L&H/popcorn cell", "RT (early); R-CHOP (advanced)", "Good; chronic relapsing; rare transformation to DLBCL"],
    ["ATL", "HTLV-1+; CD4+, CD25+", "Zidovudine + IFN-α; CHOP-based", "Very poor; median OS <1 year"],
    ["NK/T-cell nasal", "EBV+; CD56+", "SMILE or DDGP; RT for localized", "Poor in advanced; better if localized"],
    ["ALCL ALK+", "t(2;5); NPM-ALK; CD30+", "BV+CHP (A+AVD replacement) or CHOP", "Best prognosis T-cell lymphoma"],
    ["PCNSL (CNS DLBCL)", "EBV in immunosupp.; ring enhancement on MRI", "HD-MTX ± WBRT; NO steroids before biopsy", "Poor; OS ~12-18 months without treatment"],
]
story.append(info_table(summary_data, col_widths=[CW*0.2, CW*0.28, CW*0.32, CW*0.2]))
story.append(sp(10))

story.append(P("<b>Source:</b> Harrison's Principles of Internal Medicine, 22nd Edition (2025, McGraw-Hill Medical), Chapters 113 (Non-Hodgkin's Lymphoma) and 114 (Hodgkin's Lymphoma). Authors: Caron A. Jacobson, Dan L. Longo.", small_italic))
story.append(sp(4))
story.append(HR(width=CW, color=GRAY_LINE, thickness=0.5))
story.append(sp(4))
story.append(P("These notes are prepared for NEET SS / Medical Postgraduate examination preparation based on Harrison's 22E. For clinical decisions, always refer to current institutional guidelines.", small_italic))

# ─── Build ──────────────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF created: {OUTPUT}")
Running Command

cd /home/daytona/workspace/lymphoma-notes && python lymphoma_notes.py 2>&1

Running Command

ls -lh /home/daytona/workspace/lymphoma-notes/

Your PDF is ready. Here's the download link:

Lymphoma Harrison NEET SS Notes

PDF Document · PDF


What's inside (10 sections):

SectionContent
1Overview & WHO Classification (B-cell + T-cell subtypes table)
2Epidemiology & Etiology – Infectious agents table (H. pylori, EBV, HTLV-1, HIV, HCV, HHV-8)
3Ann Arbor Staging, IPI score table (5-yr OS by risk group), FLIPI, staging workup
4NHL Subtypes: FL, DLBCL, MCL, Burkitt's, MZL, all T-cell/NK lymphomas with full tables
5Hodgkin's Lymphoma: RS cell immunophenotype, 4 cHL subtypes, NLPHL vs cHL comparison
6HL Treatment: ABVD components & toxicities, BV-AVD, BEACOPP, relapsed/refractory approach, late toxicities
7NHL Treatment: R-CHOP components, targeted agents (CAR-T, bispecifics, BTK inhibitors)
8High-yield tables: Immunophenotype reference, cytogenetics/translocations, Indolent vs Aggressive NHL, PCNSL
912 Mnemonics (ABVD, BEACOPP, R-CHOP, IPI=APLES, FLIPI=ASHLN, translocations etc.)
10Master summary quick-reference table (all major lymphomas in one view)
This is a shared conversation. Sign in to Orris to start your own chat.