Cell injury notes and mnemonic

Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Finding Sources
Reading File
I now have comprehensive information from Robbins Pathology (both Basic and Pathologic Basis of Disease) to compile thorough cell injury notes with mnemonics. Let me write the complete answer.

Cell Injury - Notes & Mnemonics

Sources: Robbins & Kumar Basic Pathology; Robbins, Cotran & Kumar Pathologic Basis of Disease

1. Overview

Cells maintain homeostasis through constant adaptation. When stress exceeds adaptive capacity, cell injury occurs. Injury is reversible up to a point; if the stimulus is severe or persistent, the cell crosses the "point of no return" and dies.
Progression: Normal → Adaptation → Reversible Injury → Irreversible Injury → Cell Death

2. Causes of Cell Injury

Mnemonic: "HIT PING"
LetterCauseKey Details
HHypoxia / IschemiaMost common cause; ↓O₂ delivery → ↓ATP → ion pump failure
IImmunologic reactionsAutoimmune, allergy, chronic inflammation
TToxins / Chemical agentsCO, arsenic, cyanide, alcohol, drugs
PPhysical agentsTrauma, radiation, burns, electric shock, pressure changes
IInfectious agentsViruses, bacteria, fungi, parasites
NNutritional imbalancesProtein-calorie deficiency; vitamin deficiencies; obesity
GGenetic abnormalitiesDown syndrome, sickle cell, enzyme defects, misfolded proteins

3. Reversible vs. Irreversible Cell Injury

Reversible Cell Injury

The cell can recover if the injurious stimulus is removed.
Morphologic features - mnemonic: "FEMALE"
  • F - Fatty change (lipid vacuoles in cytoplasm - especially liver)
  • E - Eosinophilia (↑eosinophilic staining, ↓cytoplasmic RNA)
  • M - Membrane blebbing (plasma membrane blebs + loss of microvilli)
  • A - ATP-dependent Na⁺-K⁺ pump failure → cell swelling
  • L - Loose ribosomes (detach from ER) + ER dilation
  • E - Electron microscopy shows mitochondrial swelling, myelin figures, chromatin clumping
Key change: Cellular swelling (hydropic change / vacuolar degeneration) - the hallmark. Cells swell due to failure of the Na⁺/K⁺-ATPase pump.

Irreversible Cell Injury ("Point of No Return")

Two key ultrastructural markers of irreversibility:
  1. Densely flocculent amorphous densities in mitochondria (calcium phospholipid deposits)
  2. Gross membrane disruption (plasma membrane + lysosomal rupture)

4. Mechanisms of Cell Injury

Mnemonic: "MR. ODE"
LetterMechanism
MMitochondrial damage → ↓ATP, cytochrome c release → apoptosis
RReactive oxygen species (ROS) / Oxidative stress → lipid peroxidation, DNA + protein damage
OOxygen deprivation (hypoxia/ischemia) → ATP depletion → failure of energy-dependent functions
DDNA damage → caspase activation → apoptosis
EER stress → unfolded protein response (UPR) → if unresolved, apoptosis

ATP Depletion Cascade (ischemia):

↓O₂ → ↓Oxidative phosphorylation → ↓ATP
         ↓
Na⁺/K⁺-ATPase fails → Na⁺ enters cell, K⁺ exits
         ↓
Water influx → Cell swelling + ER swelling
         ↓
Ca²⁺ influx → activates phospholipases, proteases, ATPases
         ↓
Mitochondrial permeability ↑ → cytochrome c → apoptosis

Ischemia-Reperfusion Injury:

Paradoxically, restoring blood flow worsens injury by:
  • Burst of ROS generation
  • Increased inflammation (neutrophil influx)

5. Cell Death Pathways

Necrosis vs. Apoptosis - Mnemonic: "NECROSIS = No Energy, Cell Rupture, Outpour, Swelling, Inflammation, Scary"

FeatureNecrosisApoptosis
CausePathologic (ischemia, toxins)Physiologic OR pathologic
Cell sizeSwellsShrinks
NucleusKaryolysis, karyorrhexis, pyknosisFragmentation (ladder pattern)
MembraneDisrupted - contents leakIntact - apoptotic bodies form
InflammationYES (inflammatory response)NO (phagocytes clean up silently)
MechanismPassive, uncontrolledActive, caspase-mediated, ATP-dependent

Nuclear Changes in Necrosis - Mnemonic: "PKL" (Pickle)

  • Pyknosis - nuclear shrinkage + condensation
  • Karyorrhexis - nuclear fragmentation
  • Karyolysis - nuclear dissolution (DNA digested by DNases)

6. Types of Necrosis

Mnemonic: "CLFC Gas" (Coag, Liq, Fat, Caseous, Gangrenous, Fibrinoid)
TypeLocationGross AppearanceKey Cause
CoagulativeAll solid organs (except brain)Firm, preserved architectureIschemia (MI, renal infarct)
LiquefactiveBrain; bacterial abscessesPus, liquid massBrain ischemia; bacterial infections
Fat necrosisPancreas, breastChalky-white (saponification)Pancreatitis; trauma
CaseousLymph nodes, lung (TB)Cheese-like, crumblyTB (M. tuberculosis)
GangrenousLimbsDry (coagulative) or wet (+ liquefactive)Ischemia ± infection
FibrinoidBlood vessel wallsBright pink, smudgedImmune complex deposition, malignant HTN

7. Apoptosis Pathways

Intrinsic (Mitochondrial) Pathway

  • Triggered by: DNA damage, growth factor withdrawal, misfolded proteins (ER stress)
  • Key players: BCL-2 family (anti-apoptotic: BCL-2, BCL-XL; pro-apoptotic: BAX, BAK)
  • BAX/BAK form pores → cytochrome c leaks from mitochondria → binds APAF-1 → apoptosome → activates caspase-9 → executes caspase cascade

Extrinsic (Death Receptor) Pathway

  • Triggered by: FasL binding Fas (CD95); TNF binding TNFR1
  • Activates caspase-8 → executes caspase cascade
  • Role: elimination of self-reactive lymphocytes; CTL-mediated killing
Mnemonic for pathways: "In-Mit, Ex-Death"
  • Intrinsic = Mitochondrial
  • Extrinsic = Death receptor

8. Cellular Adaptations to Stress

Mnemonic: "HAMM" (Hypertrophy, Atrophy, Metaplasia, hyperplasia (extra M))
AdaptationDefinitionExample
Hypertrophy↑ cell size, ↑ organ sizeCardiac hypertrophy in hypertension
Hyperplasia↑ cell numberEndometrial hyperplasia with estrogen
Atrophy↓ cell size + metabolic activityDisuse atrophy, denervation atrophy
MetaplasiaChange in cell phenotypeBarrett esophagus (squamous→columnar)

9. Autophagy

  • Triggered by: nutrient deprivation
  • Process: cellular organelles sequestered into autophagosomes → fuse with lysosomes → digested
  • Function: energy source during starvation; quality control (removes damaged organelles)
  • If stress unrelieved: autophagy triggers apoptosis
  • Dysregulated in: cancer, IBD, neurodegenerative diseases

10. Other Cell Death Types

TypeKey Feature
NecroptosisRegulated necrosis - features of both necrosis + apoptosis; mediated by RIPK3/MLKL
PyroptosisDeath with release of pro-inflammatory cytokines (IL-1β, IL-18); key in inflammasome activation
FerroptosisIron-dependent, ROS-driven lipid peroxidation

Quick Summary Mnemonic: "CRIME AVAN"

For a rapid rundown of all major cell injury concepts:
  • C - Causes (HIT PING)
  • R - Reversible injury (cellular swelling, fatty change)
  • I - Irreversible = flocculent mitochondrial densities + membrane rupture
  • M - Mechanisms (MR. ODE)
  • E - End-point = Necrosis or Apoptosis
  • A - Adaptations (HAMM)
  • V - Various necrosis types (CLFC Gas)
  • A - Apoptosis pathways (In-Mit, Ex-Death)
  • N - Nuclear changes in necrosis (PKL = Pyknosis, Karyorrhexis, Karyolysis)

Robbins & Kumar Basic Pathology, pp. 17-20 | Robbins, Cotran & Kumar Pathologic Basis of Disease, pp. 47-65

Pls continue

Reading File
Finding Sources
Finding Sources
Finding Sources
Reading File
Finding Sources
Reading File
Reading File
Reading File
I now have all the content needed. Here's the continuation:

11. Intracellular Accumulations

When a cell cannot metabolize, transport, or excrete a substance properly, it accumulates. Four main mechanisms:
  1. Excessive production of normal substance (e.g., fatty change in liver with alcohol)
  2. Defective transport/secretion (e.g., α1-antitrypsin mutation - protein trapped in ER)
  3. Defective catabolism (e.g., lysosomal storage diseases - enzyme deficiency)
  4. Deposition of exogenous material (e.g., carbon pigment in lungs)
Mnemonic: "FLAP-G" - types of accumulated substances:
LetterSubstanceKey ExampleNotes
FFat (Lipids)Fatty liver (steatosis)Alcohol, obesity, diabetes, anoxia
LLipofuscinAging heart/liver/brain"Wear-and-tear" pigment; brown granules; lipid peroxidation byproduct
AAbnormal proteinsRussell bodies (immunoglobulins in plasma cells); hyaline droplets in renal tubulesNephrotic syndrome - albumin resorption
PPigmentsCarbon (anthracosis), Hemosiderin, MelaninPrussian blue stain for hemosiderin (iron)
GGlycogenGlycogen storage diseases; poorly controlled diabetesAccumulates in renal tubules, cardiac myocytes, β-islet cells

Key Pigments Table

PigmentColorOriginSignificance
LipofuscinBrown-yellowEndogenous; lipid peroxidation productAging marker; "wear-and-tear"
HemosiderinGolden-brownEndogenous; hemoglobin breakdownIron overload; hemochromatosis
MelaninBrown-blackEndogenous; tyrosine → DOPA pathwayAddison's disease, melanoma
CarbonBlackExogenous; inhaledAnthracosis; blackens lymph nodes
BilirubinYellow-greenEndogenous; heme breakdownJaundice
Mnemonic for pigments: "Large Hippos Munch Carrots Boldly" - Lipofuscin, Hemosiderin, Melanin, Carbon, Bilirubin

12. Pathologic Calcification

Abnormal deposition of calcium salts in tissues. Two types - "Dead vs. High":

Dystrophic Calcification ("D" = Dead tissue)

  • Calcium deposited in injured/dead/necrotic tissue
  • Serum calcium = NORMAL
  • Mechanism: dying cell mitochondria accumulate Ca²⁺ → calcium phosphate crystals form around membrane phospholipids
  • Examples:
    • Atherosclerotic plaques
    • Areas of caseous necrosis (TB) - lymph node becomes "stone"
    • Aged/damaged heart valves (calcific aortic stenosis)
    • Fat necrosis (breast, pancreas)
  • Appearance: basophilic deposits on H&E; gritty white granules grossly

Metastatic Calcification ("M" = Moved to normal tissue)

  • Calcium deposited in normal, viable tissue
  • Serum calcium = ELEVATED (hypercalcemia)
  • Preferentially affects: vasculature, kidneys, lungs, gastric mucosa
Causes of hypercalcemia - Mnemonic: "PVDRR"
LetterCause
PPTH excess (primary hyperparathyroidism / PTH-rP from tumors)
VVitamin D excess / sarcoidosis (macrophages activate Vit D precursor)
DDestruction of bone (multiple myeloma, Paget's disease, metastases)
RRenal failure → phosphate retention → secondary hyperparathyroidism
RRare (immobilization, milk-alkali syndrome)

Key Distinction

FeatureDystrophicMetastatic
Serum Ca²⁺NormalElevated
TissueNecrotic/deadNormal/viable
MechanismLocal cell deathSystemic hypercalcemia
ExamplesTB, atherosclerosis, damaged valvesHyperparathyroidism, renal failure

13. Cellular Aging

Aging = progressive decline in homeostatic mechanisms after reproductive years.
Mnemonic: "DTAP-S" (like the vaccine - helps you remember 5 mechanisms)
LetterMechanismKey Detail
DDNA damageMutations accumulate (base substitutions, deletions); ROS + UV accelerate damage; Werner syndrome = premature aging (DNA repair gene mutation)
TTelomere shorteningEach cell division loses a bit of telomere; when critically short → chromosome ends sensed as broken DNA → replicative senescence (cell cycle arrest)
AAltered protein homeostasis↓ chaperone activity + ↓ proteasome function → accumulation of misfolded proteins → apoptosis
PPersistent inflammation ("inflammaging")Accumulated damaged cells/lipids/DNA → inflammasome activation → low-level chronic inflammation → atherosclerosis, T2DM
SSignaling pathway changes↓ IGF-1, ↓ mTOR signaling → ↑ DNA repair; calorie restriction + exercise slow aging via these pathways

Telomeres in Detail

Normal somatic cell: each division → telomere shortens
                         ↓
Eventually: critically short telomeres → "broken DNA" signal
                         ↓
Cell cycle arrest → REPLICATIVE SENESCENCE
                         ↓
Loss of ability to replace damaged cells → tissue dysfunction

Stem cells: telomerase ACTIVE → telomeres maintained → unlimited division
Cancer cells: telomerase REACTIVATED → immortality
Telomerase deficiency diseases: Aplastic anemia, pulmonary fibrosis, liver fibrosis, premature hair graying, nail abnormalities

Factors That Modify Aging

Slows AgingAccelerates Aging
Calorie restrictionChronic stress
ExerciseChronic inflammation
IGF-1 inhibitionObesity
mTOR inhibition (rapamycin)UV/radiation exposure

14. Free Radicals & Oxidative Stress (Mechanism Deep Dive)

ROS = Reactive Oxygen Species - central to many forms of cell injury.
Sources of ROS:
  • Normal oxidative phosphorylation (mitochondria leak ~1-3%)
  • Activated neutrophils/macrophages (respiratory burst - NADPH oxidase)
  • Reperfusion injury
  • Radiation, drugs, toxins
  • Xanthine oxidase (ischemia-reperfusion)
Effects of ROS - Mnemonic: "PLD":
  • Peroxidation of lipids (membrane damage)
  • Lesions in DNA (strand breaks, mutations)
  • Denature proteins (cross-linking, fragmentation)
Anti-oxidant defenses:
  • Enzymatic: SOD (superoxide → H₂O₂), Catalase (H₂O₂ → H₂O), Glutathione peroxidase
  • Non-enzymatic: Vitamins E, C, A; Glutathione; Selenium; Ceruloplasmin, Transferrin (bind free iron/copper)

15. Ischemia-Reperfusion Injury - Extra Detail

Why reperfusion worsens injury:
  1. Burst of ROS on reoxygenation (especially from xanthine oxidase + mitochondria)
  2. Neutrophil influx → further ROS + proteases + inflammation
  3. Calcium overload - intracellular Ca²⁺ surges on reperfusion → activates destructive enzymes
  4. Mitochondrial permeability transition pore (mPTP) opens → cytochrome c → apoptosis
Clinical relevance: Myocardial reperfusion after stenting; stroke thrombolysis; organ transplantation

16. Master Comparison Table

FeatureReversible InjuryNecrosisApoptosis
ATPDepletedSeverely depletedRequired
Cell sizeSwellsSwellsShrinks
MembraneIntact (blebs)DisruptedIntact → apoptotic bodies
OrganellesSwollen, intactDestroyedFragmented
Nuclear changesChromatin clumpingPKL (Pyknosis→Karyorrhexis→Karyolysis)Ladder fragmentation
InflammationNoYESNO
Biochemical↓ ATP, ↑ Ca²⁺, ↓ pHSame + lysosomal ruptureCaspase cascade, DNA laddering
Reversible?YESNoNo
Physiologic?NoNoYES (normal)

17. High-Yield One-Liners for Exams

Question stemAnswer
Earliest ultrastructural change in cell injuryMitochondrial swelling
Hallmark of reversible injury (gross/light microscopy)Cellular swelling (hydropic change)
"Point of no return" markerFlocculent amorphous densities in mitochondria
Necrosis type in brain infarctionLiquefactive
Necrosis type in myocardial infarctionCoagulative
Necrosis type in tuberculosisCaseous
Necrosis type in pancreatitisFat necrosis (saponification)
Necrosis type in malignant hypertension (vessel wall)Fibrinoid
Anti-apoptotic proteinsBCL-2, BCL-XL
Pro-apoptotic proteinsBAX, BAK
"Executioner" caspasesCaspase-3, -6, -7
Initiator caspase (intrinsic)Caspase-9
Initiator caspase (extrinsic)Caspase-8
Wear-and-tear pigmentLipofuscin
Iron storage pigmentHemosiderin (Prussian blue +ve)
Dystrophic vs. metastatic calcification key differentiatorSerum Ca²⁺ (normal vs. elevated)
Enzyme that maintains telomere lengthTelomerase
Premature aging + DNA repair defectWerner syndrome
Calorie restriction acts via↓ IGF-1, ↓ mTOR signaling
Cell death + inflammasome + IL-1β releasePyroptosis
Regulated necrosis via RIPK3/MLKLNecroptosis
Iron-dependent lipid peroxidation deathFerroptosis

18. Final Mega-Mnemonic: "CARDIAC PLAN"

For a rapid whole-topic recall of cell injury:
  • C - Causes: HIT PING (Hypoxia, Immune, Toxins, Physical, Infectious, Nutritional, Genetic)
  • A - Adaptations: HAMM (Hypertrophy, Atrophy, Metaplasia, hyperplasia + More)
  • R - Reversible features: FEMALE (Fatty change, Eosinophilia, Membrane blebs, ATP-pump fails→swelling, Loose ribosomes/ER, Electron microscopy changes)
  • D - Death types: Necrosis vs Apoptosis vs Pyroptosis vs Necroptosis vs Ferroptosis
  • I - Irreversible markers: Flocculent mitochondrial densities + gross membrane rupture
  • A - Accumulations: FLAP-G (Fat, Lipofuscin, Abnormal proteins, Pigments, Glycogen)
  • C - Calcification: Dystrophic (Dead tissue, normal Ca²⁺) vs Metastatic (normal tissue, high Ca²⁺)
  • P - PKL (nuclear changes in necrosis: Pyknosis → Karyorrhexis → Karyolysis)
  • L - Lipid peroxidation (ROS → PLD: Peroxidize lipids, Lesion DNA, Denature proteins)
  • A - Aging: DTAP-S (DNA damage, Telomere shortening, Altered protein homeostasis, Persistent inflammation, Signaling changes)
  • N - Necrosis types: CLFC Gas (Coagulative, Liquefactive, Fat, Caseous, Gangrenous, Fibrinoid)

Robbins & Kumar Basic Pathology, pp. 17-42 | Robbins, Cotran & Kumar Pathologic Basis of Disease, pp. 47-70

Generate a study guide PDF with flashcards of all cell injury mnemonics

Reading File
Running Command

ls -la /home/daytona/workspace/ 2>/dev/null || mkdir -p /home/daytona/workspace && echo "workspace ready"

Running Command

mkdir -p /home/daytona/workspace/cell-injury && echo "dir created"

Writing File

~/cell-injury/generate_pdf.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm, mm
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    PageBreak, HRFlowable, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.pdfgen import canvas
from reportlab.platypus import BaseDocTemplate, Frame, PageTemplate

# ─── Colour palette ───────────────────────────────────────────────────────────
NAVY      = colors.HexColor("#1a2e4a")
TEAL      = colors.HexColor("#0d7377")
MINT      = colors.HexColor("#e8f8f5")
CORAL     = colors.HexColor("#e74c3c")
CORAL_LT  = colors.HexColor("#fdecea")
GOLD      = colors.HexColor("#f39c12")
GOLD_LT   = colors.HexColor("#fef9e7")
PURPLE    = colors.HexColor("#6c3483")
PURPLE_LT = colors.HexColor("#f5eef8")
BLUE_LT   = colors.HexColor("#eaf4fb")
GREY_LT   = colors.HexColor("#f4f6f7")
GREY_MID  = colors.HexColor("#bdc3c7")
WHITE     = colors.white
BLACK     = colors.black

OUTPUT = "/home/daytona/workspace/cell-injury/Cell_Injury_Study_Guide.pdf"
W, H = A4   # 595 x 842 pt

# ─── Styles ───────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()

def s(name, **kw):
    base = styles[name] if name in styles else styles["Normal"]
    return ParagraphStyle(name + "_custom", parent=base, **kw)

TITLE_S   = s("Title",   fontSize=26, textColor=WHITE,   alignment=TA_CENTER, spaceAfter=4,   fontName="Helvetica-Bold")
SUBTITLE_S= s("Normal",  fontSize=13, textColor=MINT,    alignment=TA_CENTER, spaceAfter=2,   fontName="Helvetica")
H1_S      = s("Heading1",fontSize=16, textColor=NAVY,    spaceAfter=6,        fontName="Helvetica-Bold")
H2_S      = s("Heading2",fontSize=13, textColor=TEAL,    spaceAfter=4,        fontName="Helvetica-Bold")
BODY_S    = s("Normal",  fontSize=10, textColor=BLACK,   spaceAfter=4,        leading=15, fontName="Helvetica")
SMALL_S   = s("Normal",  fontSize=9,  textColor=colors.HexColor("#555555"), spaceAfter=3, leading=13, fontName="Helvetica")
BOLD_S    = s("Normal",  fontSize=10, textColor=BLACK,   spaceAfter=4,        leading=15, fontName="Helvetica-Bold")
CENTER_S  = s("Normal",  fontSize=10, textColor=BLACK,   alignment=TA_CENTER, spaceAfter=4, leading=14, fontName="Helvetica")
FC_Q_S    = s("Normal",  fontSize=12, textColor=NAVY,    alignment=TA_CENTER, spaceAfter=6, leading=17, fontName="Helvetica-Bold")
FC_A_S    = s("Normal",  fontSize=10, textColor=BLACK,   alignment=TA_LEFT,   spaceAfter=4, leading=15, fontName="Helvetica")
TAG_S     = s("Normal",  fontSize=8,  textColor=WHITE,   alignment=TA_CENTER, fontName="Helvetica-Bold")
NOTE_S    = s("Normal",  fontSize=9,  textColor=PURPLE,  spaceAfter=3,        leading=13, fontName="Helvetica-Oblique")

# ─── Helpers ──────────────────────────────────────────────────────────────────

def section_banner(text, bg=NAVY, fg=WHITE, size=14):
    """Full-width coloured banner for section headings."""
    data = [[Paragraph(f"<font color='white'><b>{text}</b></font>",
                       s("Normal", fontSize=size, textColor=fg, alignment=TA_CENTER,
                         fontName="Helvetica-Bold", spaceAfter=0))]]
    t = Table(data, colWidths=[16.5*cm])
    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), 10),
        ("RIGHTPADDING", (0,0),(-1,-1), 10),
        ("ROUNDEDCORNERS",(0,0),(-1,-1), [4,4,4,4]),
    ]))
    return t


def mnemonic_box(mnemonic, meaning, rows, bg_header=TEAL, bg_body=MINT):
    """Coloured mnemonic display box."""
    elems = []

    # Header row: mnemonic + meaning
    header = Table(
        [[Paragraph(f"<b>{mnemonic}</b>", s("Normal", fontSize=13, textColor=WHITE,
                                             fontName="Helvetica-Bold", spaceAfter=0)),
          Paragraph(meaning, s("Normal", fontSize=10, textColor=WHITE,
                               fontName="Helvetica-Oblique", spaceAfter=0))]],
        colWidths=[5*cm, 11.5*cm]
    )
    header.setStyle(TableStyle([
        ("BACKGROUND",   (0,0),(-1,-1), bg_header),
        ("TOPPADDING",   (0,0),(-1,-1), 7),
        ("BOTTOMPADDING",(0,0),(-1,-1), 7),
        ("LEFTPADDING",  (0,0),(-1,-1), 10),
        ("RIGHTPADDING", (0,0),(-1,-1), 10),
        ("VALIGN",       (0,0),(-1,-1), "MIDDLE"),
    ]))
    elems.append(header)

    # Body rows
    body_data = []
    for letter, item, detail in rows:
        body_data.append([
            Paragraph(f"<b>{letter}</b>", s("Normal", fontSize=12, textColor=bg_header,
                                             fontName="Helvetica-Bold", spaceAfter=0,
                                             alignment=TA_CENTER)),
            Paragraph(f"<b>{item}</b>", BOLD_S),
            Paragraph(detail, SMALL_S),
        ])
    body = Table(body_data, colWidths=[1.2*cm, 5*cm, 10.3*cm])
    body.setStyle(TableStyle([
        ("BACKGROUND",    (0,0),(-1,-1), bg_body),
        ("ROWBACKGROUNDS",(0,0),(-1,-1), [bg_body, WHITE]),
        ("TOPPADDING",    (0,0),(-1,-1), 5),
        ("BOTTOMPADDING", (0,0),(-1,-1), 5),
        ("LEFTPADDING",   (0,0),(-1,-1), 8),
        ("RIGHTPADDING",  (0,0),(-1,-1), 6),
        ("VALIGN",        (0,0),(-1,-1), "TOP"),
        ("GRID",          (0,0),(-1,-1), 0.3, GREY_MID),
    ]))
    elems.append(body)
    return elems


def flashcard(question, answer_lines, tag="MNEMONIC", tag_color=TEAL):
    """Two-row flashcard: question (front) + answer (back) side by side."""
    q_cell = [
        Paragraph(f"<font color='{tag_color.hexval() if hasattr(tag_color,'hexval') else '#0d7377'}'>"
                  f"<b>[ {tag} ]</b></font>",
                  s("Normal", fontSize=8, textColor=tag_color, fontName="Helvetica-Bold",
                    spaceAfter=4, alignment=TA_CENTER)),
        Paragraph(question, FC_Q_S),
    ]
    ans_paras = [Paragraph(f"<b><font color='#0d7377'>A:</font></b> " + line, FC_A_S)
                 for line in answer_lines]
    a_cell = [Paragraph("<b><font color='#6c3483'>ANSWER</font></b>",
                         s("Normal", fontSize=8, textColor=PURPLE, fontName="Helvetica-Bold",
                           spaceAfter=4))] + ans_paras

    t = Table([[q_cell, a_cell]], colWidths=[8*cm, 8.5*cm])
    t.setStyle(TableStyle([
        ("BACKGROUND",   (0,0),(0,0), BLUE_LT),
        ("BACKGROUND",   (1,0),(1,0), GOLD_LT),
        ("BOX",          (0,0),(0,0), 1, TEAL),
        ("BOX",          (1,0),(1,0), 1, GOLD),
        ("TOPPADDING",   (0,0),(-1,-1), 10),
        ("BOTTOMPADDING",(0,0),(-1,-1), 10),
        ("LEFTPADDING",  (0,0),(-1,-1), 10),
        ("RIGHTPADDING", (0,0),(-1,-1), 10),
        ("VALIGN",       (0,0),(-1,-1), "TOP"),
    ]))
    return t


def two_col_table(headers, rows, col_widths=None, header_bg=NAVY):
    if col_widths is None:
        col_widths = [16.5*cm / len(headers)] * len(headers)
    data = [[Paragraph(f"<b><font color='white'>{h}</font></b>",
                        s("Normal", fontSize=9, textColor=WHITE, fontName="Helvetica-Bold",
                          alignment=TA_CENTER)) for h in headers]]
    for r in rows:
        data.append([Paragraph(str(c), SMALL_S) for c in r])
    t = Table(data, colWidths=col_widths)
    t.setStyle(TableStyle([
        ("BACKGROUND",    (0,0),(-1,0),  header_bg),
        ("ROWBACKGROUNDS",(0,1),(-1,-1), [GREY_LT, WHITE]),
        ("GRID",          (0,0),(-1,-1), 0.3, GREY_MID),
        ("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"),
    ]))
    return t

# ─── Page numbering ────────────────────────────────────────────────────────────

class NumberedCanvas(canvas.Canvas):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self._saved_page_states = []

    def showPage(self):
        self._saved_page_states.append(dict(self.__dict__))
        self._startPage()

    def save(self):
        num_pages = len(self._saved_page_states)
        for state in self._saved_page_states:
            self.__dict__.update(state)
            self.draw_page_number(num_pages)
            super().showPage()
        super().save()

    def draw_page_number(self, page_count):
        page = self._pageNumber
        self.setFont("Helvetica", 8)
        self.setFillColor(colors.HexColor("#888888"))
        self.drawRightString(W - 1.5*cm, 1*cm, f"Page {page} / {page_count}")
        self.drawString(1.5*cm, 1*cm, "Cell Injury — Study Guide & Mnemonics  |  Robbins Pathology")


# ─── Cover page ───────────────────────────────────────────────────────────────

def cover_page():
    elems = []
    elems.append(Spacer(1, 2.5*cm))

    # Big coloured title block
    title_data = [[
        Paragraph("CELL INJURY", s("Normal", fontSize=36, textColor=WHITE,
                                    fontName="Helvetica-Bold", alignment=TA_CENTER, spaceAfter=0)),
    ],[
        Paragraph("Study Guide &amp; Mnemonic Flashcards", s("Normal", fontSize=16,
                  textColor=MINT, fontName="Helvetica", alignment=TA_CENTER, spaceAfter=0)),
    ],[
        Paragraph("Pathology  ·  Robbins &amp; Kumar  ·  Robbins Cotran", s("Normal", fontSize=11,
                  textColor=GREY_MID, fontName="Helvetica-Oblique", alignment=TA_CENTER, spaceAfter=0)),
    ]]
    cover = Table(title_data, colWidths=[16.5*cm])
    cover.setStyle(TableStyle([
        ("BACKGROUND",   (0,0),(-1,-1), NAVY),
        ("TOPPADDING",   (0,0),(-1,-1), 18),
        ("BOTTOMPADDING",(0,0),(-1,-1), 18),
        ("LEFTPADDING",  (0,0),(-1,-1), 20),
        ("RIGHTPADDING", (0,0),(-1,-1), 20),
    ]))
    elems.append(cover)
    elems.append(Spacer(1, 0.8*cm))

    # Toc-style overview
    toc_items = [
        ("1", "Causes of Cell Injury",         "HIT PING"),
        ("2", "Reversible Injury Features",    "FEMALE"),
        ("3", "Mechanisms of Cell Injury",     "MR. ODE"),
        ("4", "Nuclear Changes in Necrosis",   "PKL"),
        ("5", "Types of Necrosis",             "CLFC Gas"),
        ("6", "Apoptosis Pathways",            "In-Mit  ·  Ex-Death"),
        ("7", "Cellular Adaptations",          "HAMM"),
        ("8", "Intracellular Accumulations",   "FLAP-G"),
        ("9", "Pigments",                      "Large Hippos Munch Carrots Boldly"),
        ("10","Calcification Types",           "Dystrophic = Dead  ·  Metastatic = High Ca²⁺"),
        ("11","Causes of Hypercalcemia",       "PVDRR"),
        ("12","Cellular Aging Mechanisms",     "DTAP-S"),
        ("13","Mega Master Mnemonic",          "CARDIAC PLAN"),
    ]
    toc_data = [[Paragraph(f"<b>{n}</b>", CENTER_S),
                 Paragraph(topic, BODY_S),
                 Paragraph(f"<i>{mnem}</i>", s("Normal", fontSize=9, textColor=TEAL,
                                                fontName="Helvetica-Oblique", spaceAfter=0))]
                for n, topic, mnem in toc_items]
    toc = Table(toc_data, colWidths=[1*cm, 8*cm, 7.5*cm])
    toc.setStyle(TableStyle([
        ("ROWBACKGROUNDS",(0,0),(-1,-1), [GREY_LT, WHITE]),
        ("GRID",          (0,0),(-1,-1), 0.3, GREY_MID),
        ("TOPPADDING",    (0,0),(-1,-1), 5),
        ("BOTTOMPADDING", (0,0),(-1,-1), 5),
        ("LEFTPADDING",   (0,0),(-1,-1), 8),
        ("RIGHTPADDING",  (0,0),(-1,-1), 8),
        ("VALIGN",        (0,0),(-1,-1), "MIDDLE"),
    ]))
    elems.append(Paragraph("Contents", H1_S))
    elems.append(toc)
    elems.append(PageBreak())
    return elems


# ─── Build story ──────────────────────────────────────────────────────────────

story = []
story += cover_page()

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 1 – CAUSES
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_banner("1.  Causes of Cell Injury  —  HIT PING"))
story.append(Spacer(1, 0.3*cm))
story += mnemonic_box(
    "HIT PING",
    "The 7 major categories of cell injury causes",
    [
        ("H", "Hypoxia / Ischemia",    "Most common cause. ↓O₂ → ↓ATP → ion pump failure → swelling. Ischemia also ↓nutrients."),
        ("I", "Immunologic reactions", "Autoimmune diseases, allergy, chronic immune responses → inflammation → tissue damage."),
        ("T", "Toxins / Chemicals",    "CO, arsenic, cyanide, mercury, alcohol, drugs, pesticides, asbestos."),
        ("P", "Physical agents",       "Trauma, radiation, burns, deep cold, electric shock, sudden pressure changes."),
        ("I", "Infectious agents",     "Viruses, bacteria, fungi, parasites, rickettsiae — diverse mechanisms."),
        ("N", "Nutritional imbalances","Protein-calorie deficiency; vitamin deficiencies; obesity (T2DM, atherosclerosis)."),
        ("G", "Genetic abnormalities", "Down syndrome, sickle cell anemia, enzyme defects, misfolded proteins."),
    ]
)
story.append(Spacer(1, 0.4*cm))

# Flashcard 1
story.append(KeepTogether([
    Paragraph("Flashcard 1", H2_S),
    flashcard(
        "What are the 7 causes of cell injury?",
        ["HIT PING",
         "H – Hypoxia/Ischemia",
         "I – Immunologic",
         "T – Toxins/Chemicals",
         "P – Physical agents",
         "I – Infectious agents",
         "N – Nutritional",
         "G – Genetic"],
        tag="CAUSES"
    ),
]))
story.append(Spacer(1, 0.5*cm))
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 2 – REVERSIBLE INJURY
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_banner("2.  Reversible Cell Injury  —  FEMALE", bg=TEAL))
story.append(Spacer(1, 0.3*cm))
story += mnemonic_box(
    "FEMALE",
    "Morphologic features of reversible cell injury",
    [
        ("F", "Fatty change",           "Lipid vacuoles accumulate — especially in liver, heart, kidney. Due to disrupted lipid metabolism."),
        ("E", "Eosinophilia (↑)",       "Increased eosinophilic staining due to ↓cytoplasmic RNA. Becomes more pronounced → necrosis."),
        ("M", "Membrane blebbing",      "Plasma membrane blebs form; microvilli lost; intercellular attachments loosen."),
        ("A", "ATP pump failure → swelling", "Na⁺/K⁺-ATPase fails → Na⁺ enters, water follows → cell swelling = hydropic change / vacuolar degeneration."),
        ("L", "Loose ribosomes / ER dilation", "Ribosomes detach from rough ER; smooth ER dilates; polysomes dissociate."),
        ("E", "Electron microscopy changes", "Mitochondrial swelling, amorphous densities, myelin figures (phospholipid whorls), chromatin clumping."),
    ],
    bg_header=TEAL
)
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(
    "<b>Key point:</b> Cellular swelling (hydropic change) is the <i>hallmark</i> of reversible injury. "
    "The 'point of no return' = flocculent amorphous densities in mitochondria + gross membrane disruption.",
    NOTE_S
))
story.append(Spacer(1, 0.4*cm))

story.append(KeepTogether([
    Paragraph("Flashcard 2", H2_S),
    flashcard(
        "What are the morphologic features of REVERSIBLE cell injury?",
        ["FEMALE",
         "F – Fatty change",
         "E – Eosinophilia (↑)",
         "M – Membrane blebbing",
         "A – ATP pump fails → swelling",
         "L – Loose ribosomes / ER dilation",
         "E – EM changes (mito swelling, myelin figures)"],
        tag="REVERSIBLE INJURY", tag_color=TEAL
    ),
]))
story.append(Spacer(1, 0.3*cm))
story.append(KeepTogether([
    Paragraph("Flashcard 3", H2_S),
    flashcard(
        "What marks the 'point of no return' in cell injury?",
        ["1. Flocculent amorphous densities in mitochondria (Ca²⁺ phosphate deposits)",
         "2. Gross membrane disruption (plasma membrane + lysosomes rupture)",
         "→ Both indicate IRREVERSIBLE injury"],
        tag="IRREVERSIBLE", tag_color=CORAL
    ),
]))
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 3 – MECHANISMS
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_banner("3.  Mechanisms of Cell Injury  —  MR. ODE", bg=PURPLE))
story.append(Spacer(1, 0.3*cm))
story += mnemonic_box(
    "MR. ODE",
    "5 core mechanisms of cell injury",
    [
        ("M", "Mitochondrial damage",  "↓ATP production; cytochrome c release → caspase activation → apoptosis. Often a late event in necrosis."),
        ("R", "ROS / Oxidative stress","Reactive oxygen species → lipid peroxidation, DNA strand breaks, protein denaturation."),
        ("O", "Oxygen deprivation",    "Hypoxia/ischemia → ↓oxidative phosphorylation → ↓ATP → energy-dependent failure cascade."),
        ("D", "DNA damage",            "Radiation, chemicals → strand breaks → if unrepaired → caspase activation → apoptosis."),
        ("E", "ER stress",             "Misfolded proteins accumulate → Unfolded Protein Response (UPR) → if unresolved → apoptosis."),
    ],
    bg_header=PURPLE, bg_body=PURPLE_LT
)
story.append(Spacer(1, 0.3*cm))

# ATP cascade box
atp_data = [
    [Paragraph("<b>ATP Depletion Cascade (Ischemia)</b>", s("Normal", fontSize=10, textColor=NAVY, fontName="Helvetica-Bold"))],
    [Paragraph(
        "↓O₂  →  ↓Oxidative phosphorylation  →  ↓ATP<br/>"
        "→  Na⁺/K⁺-ATPase fails  →  Na⁺ in, K⁺ out, H₂O in  →  <b>Cell swelling</b><br/>"
        "→  Ca²⁺ influx  →  Activates phospholipases, proteases, ATPases<br/>"
        "→  ↑Mitochondrial permeability  →  Cytochrome c  →  <b>Apoptosis</b><br/>"
        "If reperfusion:  ROS burst + neutrophil influx  →  <b>Ischemia-Reperfusion Injury</b>",
        SMALL_S
    )],
]
atp_box = Table(atp_data, colWidths=[16.5*cm])
atp_box.setStyle(TableStyle([
    ("BACKGROUND",   (0,0),(-1,-1), GOLD_LT),
    ("BOX",          (0,0),(-1,-1), 1, GOLD),
    ("TOPPADDING",   (0,0),(-1,-1), 8),
    ("BOTTOMPADDING",(0,0),(-1,-1), 8),
    ("LEFTPADDING",  (0,0),(-1,-1), 10),
    ("RIGHTPADDING", (0,0),(-1,-1), 10),
]))
story.append(atp_box)
story.append(Spacer(1, 0.4*cm))

story.append(KeepTogether([
    Paragraph("Flashcard 4", H2_S),
    flashcard(
        "What are the 5 core mechanisms of cell injury?",
        ["MR. ODE",
         "M – Mitochondrial damage",
         "R – ROS / Oxidative stress",
         "O – Oxygen deprivation (hypoxia/ischemia)",
         "D – DNA damage",
         "E – ER stress (misfolded proteins)"],
        tag="MECHANISMS", tag_color=PURPLE
    ),
]))
story.append(Spacer(1, 0.3*cm))
story.append(KeepTogether([
    Paragraph("Flashcard 5", H2_S),
    flashcard(
        "ROS damage cells via which 3 effects? (PLD)",
        ["P – Peroxidation of lipids (membrane damage)",
         "L – Lesions in DNA (strand breaks, mutations)",
         "D – Denature proteins (cross-linking, fragmentation)"],
        tag="ROS / OXIDATIVE STRESS", tag_color=CORAL
    ),
]))
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 4 – NUCLEAR CHANGES
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_banner("4.  Nuclear Changes in Necrosis  —  PKL", bg=CORAL))
story.append(Spacer(1, 0.3*cm))
story += mnemonic_box(
    "PKL  (Pickle)",
    "Sequence of nuclear changes in necrosis",
    [
        ("P", "Pyknosis",     "Nuclear SHRINKAGE + condensation. Dark, small, solid nucleus."),
        ("K", "Karyorrhexis", "Nuclear FRAGMENTATION. Nucleus breaks into pieces."),
        ("L", "Karyolysis",   "Nuclear DISSOLUTION. DNA digested by DNases; nucleus fades away."),
    ],
    bg_header=CORAL, bg_body=CORAL_LT
)
story.append(Spacer(1, 0.4*cm))
story.append(KeepTogether([
    Paragraph("Flashcard 6", H2_S),
    flashcard(
        "What are the 3 nuclear changes in necrosis, in order?",
        ["PKL  (remember: Pickle)",
         "P – Pyknosis     →  Shrinkage + condensation",
         "K – Karyorrhexis →  Fragmentation",
         "L – Karyolysis   →  Dissolution (fades away)"],
        tag="NECROSIS — NUCLEAR", tag_color=CORAL
    ),
]))
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 5 – TYPES OF NECROSIS
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_banner("5.  Types of Necrosis  —  CLFC Gas", bg=NAVY))
story.append(Spacer(1, 0.3*cm))
story += mnemonic_box(
    "CLFC Gas",
    "6 morphologic types of tissue necrosis",
    [
        ("C", "Coagulative",  "Firm, preserved architecture. Cause: ischemia (MI, renal infarct). All solid organs EXCEPT brain."),
        ("L", "Liquefactive", "Liquid, pus-like mass. Brain infarcts + bacterial abscesses. Architecture destroyed."),
        ("F", "Fat necrosis", "Chalky-white saponification (Ca²⁺ + fatty acids). Pancreatitis, breast trauma."),
        ("C", "Caseous",      "Cheese-like, crumbly, granuloma centre. TB (M. tuberculosis). Lymph nodes, lung."),
        ("G", "Gangrenous",   "Dry = coagulative (ischemia); Wet = + liquefactive (+ infection). Limbs."),
        ("s", "Fibrinoid",    "Bright pink smudged vessel walls. Immune complex deposition, malignant HTN, vasculitis."),
    ]
)
story.append(Spacer(1, 0.3*cm))
story.append(two_col_table(
    ["Type", "Location", "Gross Appearance", "Cause"],
    [
        ["Coagulative",  "All solid organs (not brain)", "Firm, pale, preserved architecture", "Ischemia (MI, renal infarct)"],
        ["Liquefactive", "Brain; abscesses",             "Liquid, pus/fluid-filled cavity",    "Brain ischemia; bacteria"],
        ["Fat",          "Pancreas, breast",             "Chalky-white (saponification)",       "Pancreatitis; trauma"],
        ["Caseous",      "Lungs, lymph nodes (TB)",      "Cheese-like, crumbly, soft",         "M. tuberculosis"],
        ["Gangrenous",   "Limbs",                        "Dry (shrivelled) or Wet (putrid)",   "Ischemia ± infection"],
        ["Fibrinoid",    "Blood vessel walls",           "Bright pink, smudged (H&E)",         "Immune complexes, malignant HTN"],
    ],
    col_widths=[2.5*cm, 3.5*cm, 5*cm, 5.5*cm]
))
story.append(Spacer(1, 0.4*cm))
story.append(KeepTogether([
    Paragraph("Flashcard 7", H2_S),
    flashcard(
        "Name the 6 types of necrosis.",
        ["CLFC Gas",
         "C – Coagulative    (ischemia / MI)",
         "L – Liquefactive   (brain / abscess)",
         "F – Fat necrosis   (pancreatitis)",
         "C – Caseous        (TB)",
         "G – Gangrenous     (limbs)",
         "s – Fibrinoid      (vasculitis / malignant HTN)"],
        tag="NECROSIS TYPES"
    ),
]))
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 6 – APOPTOSIS
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_banner("6.  Apoptosis Pathways  —  In-Mit  ·  Ex-Death", bg=TEAL))
story.append(Spacer(1, 0.3*cm))
story += mnemonic_box(
    "In-Mit",
    "Intrinsic = Mitochondrial pathway",
    [
        ("T", "Trigger",    "DNA damage, growth factor withdrawal, ER stress (misfolded proteins)."),
        ("K", "Key players","BCL-2 family: anti-apoptotic (BCL-2, BCL-XL) vs pro-apoptotic (BAX, BAK)."),
        ("M", "Mechanism",  "BAX/BAK form pores → cytochrome c leaks → binds APAF-1 → apoptosome → Caspase-9 → executes caspases 3/7."),
    ],
    bg_header=TEAL
)
story.append(Spacer(1, 0.2*cm))
story += mnemonic_box(
    "Ex-Death",
    "Extrinsic = Death receptor pathway",
    [
        ("T", "Trigger",    "FasL binds Fas (CD95); TNF binds TNFR1. Signals from neighboring cells."),
        ("R", "Roles",      "Elimination of self-reactive lymphocytes; cytotoxic T lymphocyte killing."),
        ("M", "Mechanism",  "Death receptor engagement → FADD recruitment → Caspase-8 activation → executes caspases 3/7."),
    ],
    bg_header=CORAL, bg_body=CORAL_LT
)
story.append(Spacer(1, 0.3*cm))
story.append(two_col_table(
    ["Feature", "Necrosis", "Apoptosis"],
    [
        ["Trigger",         "Pathologic only",           "Physiologic OR pathologic"],
        ["Cell size",       "Swells",                    "Shrinks"],
        ["Membrane",        "Disrupted — contents leak", "Intact → apoptotic bodies form"],
        ["Inflammation",    "YES — always",              "NO — phagocytes silently clear"],
        ["ATP needed",      "No (passive)",              "YES (active process)"],
        ["Initiator caspase","—",                        "Caspase-9 (intrinsic) / Caspase-8 (extrinsic)"],
        ["Executor caspases","—",                        "Caspase-3, -6, -7"],
        ["DNA",             "Random degradation",        "Ladder pattern (180 bp fragments)"],
    ],
    col_widths=[4.5*cm, 6*cm, 6*cm]
))
story.append(Spacer(1, 0.4*cm))
story.append(KeepTogether([
    Paragraph("Flashcard 8", H2_S),
    flashcard(
        "Two pathways of apoptosis — what triggers each?",
        ["In-Mit  =  Intrinsic / Mitochondrial pathway",
         "Trigger: DNA damage, growth factor withdrawal, ER stress",
         "Key: BCL-2 family → cytochrome c → Caspase-9",
         "",
         "Ex-Death  =  Extrinsic / Death receptor pathway",
         "Trigger: FasL-Fas, TNF-TNFR1",
         "Key: Caspase-8 activation"],
        tag="APOPTOSIS", tag_color=TEAL
    ),
]))
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 7 – ADAPTATIONS
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_banner("7.  Cellular Adaptations to Stress  —  HAMM", bg=PURPLE))
story.append(Spacer(1, 0.3*cm))
story += mnemonic_box(
    "HAMM",
    "4 types of cellular adaptation",
    [
        ("H", "Hypertrophy",  "↑ cell SIZE (not number). Response to ↑ workload. Cardiac hypertrophy in HTN. Occurs in non-dividing tissues."),
        ("A", "Atrophy",      "↓ cell size + metabolic activity. Causes: ↓nutrients, disuse, denervation, ↓blood supply, aging, ↓hormonal stimulation."),
        ("M", "Metaplasia",   "Change in cell phenotype. Barrett esophagus (squamous → columnar). Reversible; can predispose to malignancy."),
        ("M", "More (Hyperplasia)", "↑ cell NUMBER. Hormones/growth factors. Endometrial hyperplasia (estrogen). Only in dividing cells."),
    ],
    bg_header=PURPLE, bg_body=PURPLE_LT
)
story.append(Spacer(1, 0.4*cm))
story.append(KeepTogether([
    Paragraph("Flashcard 9", H2_S),
    flashcard(
        "What are the 4 cellular adaptations to stress?",
        ["HAMM",
         "H – Hypertrophy   (↑ cell SIZE — cardiac hypertrophy in HTN)",
         "A – Atrophy       (↓ cell size — disuse, ↓nutrients)",
         "M – Metaplasia    (phenotype change — Barrett esophagus)",
         "M – More cells    (Hyperplasia — endometrial hyperplasia)"],
        tag="ADAPTATIONS", tag_color=PURPLE
    ),
]))
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 8 – INTRACELLULAR ACCUMULATIONS
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_banner("8.  Intracellular Accumulations  —  FLAP-G", bg=TEAL))
story.append(Spacer(1, 0.3*cm))
story += mnemonic_box(
    "FLAP-G",
    "5 types of intracellular accumulations",
    [
        ("F", "Fat (Steatosis)",       "Triglycerides in liver, heart, kidney. Causes: alcohol, obesity, diabetes, anoxia, toxins."),
        ("L", "Lipofuscin",            "'Wear-and-tear' pigment. Brown-yellow granules. Aging cells (heart, liver, brain). Lipid peroxidation product."),
        ("A", "Abnormal proteins",     "Russell bodies (Ig in plasma cells); hyaline droplets in renal tubules (nephrotic syndrome); alcoholic hyaline; neurofibrillary tangles."),
        ("P", "Pigments",              "Carbon (anthracosis), Hemosiderin (Prussian blue +ve), Melanin, Bilirubin. See LHMCB mnemonic."),
        ("G", "Glycogen",              "Glycogen storage diseases (lysosomal enzyme defects); poorly controlled DM (renal tubules, myocytes, β-islet cells)."),
    ],
    bg_header=TEAL
)
story.append(Spacer(1, 0.3*cm))
story += mnemonic_box(
    "LHMCB",
    "Large Hippos Munch Carrots Boldly — 5 key pigments",
    [
        ("L", "Lipofuscin",   "Brown-yellow, endogenous, aging. Lipid peroxidation byproduct."),
        ("H", "Hemosiderin",  "Golden-brown, endogenous, iron overload. Prussian blue stain positive."),
        ("M", "Melanin",      "Brown-black, endogenous, tyrosine→DOPA. Addison's disease, melanoma."),
        ("C", "Carbon",       "Black, exogenous, inhaled. Anthracosis — blackens pulmonary lymph nodes."),
        ("B", "Bilirubin",    "Yellow-green, endogenous, heme breakdown. Jaundice."),
    ],
    bg_header=colors.HexColor("#2e7d32"), bg_body=colors.HexColor("#f1f8e9")
)
story.append(Spacer(1, 0.4*cm))
story.append(KeepTogether([
    Paragraph("Flashcard 10", H2_S),
    flashcard(
        "Name the types of intracellular accumulations.",
        ["FLAP-G",
         "F – Fat (steatosis)",
         "L – Lipofuscin (wear-and-tear pigment)",
         "A – Abnormal proteins (Russell bodies, hyaline droplets)",
         "P – Pigments (LHMCB)",
         "G – Glycogen (storage diseases, DM)"],
        tag="ACCUMULATIONS", tag_color=TEAL
    ),
]))
story.append(Spacer(1, 0.3*cm))
story.append(KeepTogether([
    Paragraph("Flashcard 11", H2_S),
    flashcard(
        "Name the 5 key pigments in pathology.",
        ["LHMCB  —  Large Hippos Munch Carrots Boldly",
         "L – Lipofuscin   (brown-yellow, aging, wear-and-tear)",
         "H – Hemosiderin  (golden-brown, iron overload, Prussian blue +ve)",
         "M – Melanin      (brown-black, Addison's, melanoma)",
         "C – Carbon       (black, anthracosis, exogenous)",
         "B – Bilirubin    (yellow-green, jaundice)"],
        tag="PIGMENTS", tag_color=colors.HexColor("#2e7d32")
    ),
]))
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 9+10 – CALCIFICATION
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_banner("9 & 10.  Pathologic Calcification", bg=CORAL))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(
    "<b>Memory hook:</b>  <font color='#0d7377'>D</font>ystrophic = <font color='#0d7377'>D</font>ead tissue, normal Ca²⁺  |  "
    "<font color='#e74c3c'>M</font>etastatic = normal tissue, high (<font color='#e74c3c'>M</font>ore) Ca²⁺",
    NOTE_S
))
story.append(Spacer(1, 0.2*cm))
story.append(two_col_table(
    ["Feature", "Dystrophic", "Metastatic"],
    [
        ["Serum Ca²⁺",    "NORMAL",             "ELEVATED (hypercalcemia)"],
        ["Tissue",        "Necrotic / dead",    "Normal / viable"],
        ["Mechanism",     "Local Ca²⁺ in dying mitochondria / membrane vesicles", "Systemic hypercalcemia → Ca²⁺ deposits"],
        ["Examples",      "TB (caseous), atherosclerotic plaques, calcific aortic stenosis, fat necrosis", "Hyperparathyroidism, renal failure, Vit D excess, bone destruction"],
        ["Sites affected","Any necrotic tissue", "Vasculature, kidneys, lungs, gastric mucosa"],
    ],
    col_widths=[3.5*cm, 6.5*cm, 6.5*cm]
))
story.append(Spacer(1, 0.3*cm))
story += mnemonic_box(
    "PVDRR",
    "Causes of hypercalcemia (→ Metastatic calcification)",
    [
        ("P", "PTH excess",          "Primary hyperparathyroidism; PTHrP from malignant tumors."),
        ("V", "Vitamin D excess",    "Vitamin D intoxication; sarcoidosis (macrophages activate Vit D precursor)."),
        ("D", "Destruction of bone", "Multiple myeloma, Paget's disease, diffuse skeletal metastases, immobilization."),
        ("R", "Renal failure",       "Phosphate retention → secondary hyperparathyroidism."),
        ("R", "Rare causes",         "Milk-alkali syndrome, thiazide diuretics, immobilization."),
    ],
    bg_header=CORAL, bg_body=CORAL_LT
)
story.append(Spacer(1, 0.4*cm))
story.append(KeepTogether([
    Paragraph("Flashcard 12", H2_S),
    flashcard(
        "Dystrophic vs. Metastatic calcification — key difference?",
        ["Dystrophic  →  Dead/necrotic tissue  |  Serum Ca²⁺ = NORMAL",
         "  Examples: TB nodes, atherosclerosis, calcific aortic stenosis",
         "",
         "Metastatic  →  Normal/viable tissue  |  Serum Ca²⁺ = HIGH",
         "  Causes: PVDRR (PTH, Vit D, bone Destruction, Renal failure, Rare)"],
        tag="CALCIFICATION", tag_color=CORAL
    ),
]))
story.append(Spacer(1, 0.3*cm))
story.append(KeepTogether([
    Paragraph("Flashcard 13", H2_S),
    flashcard(
        "What are the causes of hypercalcemia? (PVDRR)",
        ["P – PTH excess (primary hyperPTH or PTHrP from tumors)",
         "V – Vitamin D excess / sarcoidosis",
         "D – Destruction of bone (myeloma, Paget's, metastases)",
         "R – Renal failure (→ secondary hyperPTH)",
         "R – Rare (milk-alkali syndrome, immobilization)"],
        tag="HYPERCALCEMIA", tag_color=CORAL
    ),
]))
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 11 – CELLULAR AGING
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_banner("11.  Cellular Aging  —  DTAP-S", bg=PURPLE))
story.append(Spacer(1, 0.3*cm))
story += mnemonic_box(
    "DTAP-S",
    "5 mechanisms of cellular aging",
    [
        ("D", "DNA damage",                  "Mutations accumulate with age (base substitutions, deletions, ROS damage, UV). Werner syndrome = premature aging from DNA repair gene mutation."),
        ("T", "Telomere shortening",          "Each division → telomere shortens. When critically short → sensed as broken DNA → replicative SENESCENCE (cell cycle arrest). Telomerase active in germ/stem cells but absent in somatic cells."),
        ("A", "Altered protein homeostasis", "↓Chaperone activity + ↓proteasome function → misfolded proteins accumulate → apoptosis. Loss of normal proteins disrupts function."),
        ("P", "Persistent inflammation",     "'Inflammaging.' Damaged cells/lipids/DNA → inflammasome → IL-1β, IL-6 → atherosclerosis, T2DM. Cytokines further accelerate aging."),
        ("S", "Signaling pathway changes",   "Calorie restriction + exercise → ↓IGF-1, ↓mTOR → switch from growth to repair. mTOR inhibitors (rapamycin) prolong lifespan in models."),
    ],
    bg_header=PURPLE, bg_body=PURPLE_LT
)
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(
    "<b>Telomerase key facts:</b>  Active in germ cells and stem cells (unlimited division).  "
    "Absent in somatic cells (finite replication).  Reactivated in most cancer cells (immortality).  "
    "Deficiency diseases: aplastic anemia, pulmonary fibrosis, liver fibrosis.",
    NOTE_S
))
story.append(Spacer(1, 0.4*cm))
story.append(KeepTogether([
    Paragraph("Flashcard 14", H2_S),
    flashcard(
        "What are the 5 mechanisms of cellular aging?",
        ["DTAP-S",
         "D – DNA damage accumulation",
         "T – Telomere shortening → replicative senescence",
         "A – Altered protein homeostasis (↓ chaperones, ↓ proteasomes)",
         "P – Persistent inflammation (inflammaging)",
         "S – Signaling changes (↓ IGF-1 / mTOR; calorie restriction)"],
        tag="CELLULAR AGING", tag_color=PURPLE
    ),
]))
story.append(Spacer(1, 0.3*cm))
story.append(KeepTogether([
    Paragraph("Flashcard 15", H2_S),
    flashcard(
        "Where is telomerase active vs. absent?",
        ["ACTIVE:  Germ cells, Stem cells, most Cancer cells",
         "ABSENT:  Somatic cells (→ telomeres shorten → senescence)",
         "Deficiency → aplastic anemia, pulmonary/liver fibrosis",
         "Cancer cells reactivate telomerase → immortality"],
        tag="TELOMERES", tag_color=PURPLE
    ),
]))
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 12 – MEGA MASTER MNEMONIC
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_banner("12.  Mega Master Mnemonic  —  CARDIAC PLAN", bg=NAVY))
story.append(Spacer(1, 0.3*cm))
story += mnemonic_box(
    "CARDIAC PLAN",
    "Complete cell injury topic recall in one mnemonic",
    [
        ("C", "Causes",              "HIT PING — Hypoxia, Immune, Toxins, Physical, Infectious, Nutritional, Genetic"),
        ("A", "Adaptations",         "HAMM — Hypertrophy, Atrophy, Metaplasia, More (Hyperplasia)"),
        ("R", "Reversible features", "FEMALE — Fatty change, Eosinophilia, Membrane blebs, ATP fail→swelling, Loose ribo/ER, EM changes"),
        ("D", "Death types",         "Necrosis · Apoptosis · Pyroptosis · Necroptosis · Ferroptosis"),
        ("I", "Irreversible markers","Flocculent amorphous densities in mitochondria + gross membrane rupture"),
        ("A", "Accumulations",       "FLAP-G — Fat, Lipofuscin, Abnormal proteins, Pigments (LHMCB), Glycogen"),
        ("C", "Calcification",       "Dystrophic = Dead/necrotic tissue, normal Ca²⁺ | Metastatic = normal tissue, high Ca²⁺ (PVDRR)"),
        ("P", "PKL nuclear changes", "Pyknosis → Karyorrhexis → Karyolysis (necrosis)"),
        ("L", "Lipid peroxidation",  "ROS → PLD: Peroxidize lipids, Lesion DNA, Denature proteins"),
        ("A", "Aging mechanisms",    "DTAP-S — DNA damage, Telomere shortening, Altered proteins, Persistent inflammation, Signaling"),
        ("N", "Necrosis types",      "CLFC Gas — Coagulative, Liquefactive, Fat, Caseous, Gangrenous, Fibrinoid"),
    ]
)
story.append(Spacer(1, 0.4*cm))
story.append(KeepTogether([
    Paragraph("Flashcard 16  (Master)", H2_S),
    flashcard(
        "Give the master mnemonic covering ALL cell injury topics.",
        ["CARDIAC PLAN",
         "C – Causes (HIT PING)",
         "A – Adaptations (HAMM)",
         "R – Reversible features (FEMALE)",
         "D – Death types (Necrosis/Apoptosis/Pyroptosis/Necroptosis/Ferroptosis)",
         "I – Irreversible markers (flocculent mito densities + membrane rupture)",
         "A – Accumulations (FLAP-G)",
         "C – Calcification (Dystrophic vs Metastatic / PVDRR)",
         "P – PKL (Pyknosis → Karyorrhexis → Karyolysis)",
         "L – Lipid peroxidation ROS → PLD",
         "A – Aging (DTAP-S)",
         "N – Necrosis types (CLFC Gas)"],
        tag="MASTER MNEMONIC", tag_color=NAVY
    ),
]))
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 13 – HIGH-YIELD ONE-LINERS
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_banner("13.  High-Yield One-Liners", bg=TEAL))
story.append(Spacer(1, 0.3*cm))
story.append(two_col_table(
    ["Question Stem", "Answer"],
    [
        ["Earliest ultrastructural change in cell injury",       "Mitochondrial swelling"],
        ["Hallmark of reversible injury (light microscopy)",     "Cellular swelling (hydropic change / vacuolar degeneration)"],
        ["'Point of no return' ultrastructural marker",          "Flocculent amorphous densities in mitochondria"],
        ["Necrosis type in brain infarction",                    "Liquefactive"],
        ["Necrosis type in myocardial infarction",               "Coagulative"],
        ["Necrosis type in tuberculosis",                        "Caseous"],
        ["Necrosis type in acute pancreatitis",                  "Fat necrosis (saponification)"],
        ["Necrosis type in malignant hypertension (vessel)",     "Fibrinoid"],
        ["Anti-apoptotic BCL-2 family members",                  "BCL-2, BCL-XL"],
        ["Pro-apoptotic BCL-2 family members",                   "BAX, BAK"],
        ["Initiator caspase (intrinsic pathway)",                "Caspase-9"],
        ["Initiator caspase (extrinsic pathway)",                "Caspase-8"],
        ["Executor/effector caspases",                           "Caspase-3, -6, -7"],
        ["Wear-and-tear pigment",                                "Lipofuscin"],
        ["Iron storage pigment / stain",                         "Hemosiderin — Prussian blue stain positive"],
        ["Dystrophic vs. Metastatic Ca²⁺ — key difference",     "Serum Ca²⁺: Normal (Dystrophic) vs. Elevated (Metastatic)"],
        ["Enzyme that maintains telomere length",                "Telomerase"],
        ["Premature aging + DNA repair defect syndrome",         "Werner syndrome"],
        ["Calorie restriction prolongs life via",                "↓ IGF-1 signaling, ↓ mTOR activity"],
        ["Cell death + inflammasome + IL-1β release",            "Pyroptosis"],
        ["Regulated necrosis via RIPK3/MLKL",                   "Necroptosis"],
        ["Iron-dependent lipid peroxidation cell death",         "Ferroptosis"],
        ["Apoptosis in physiologic situations (examples)",       "Embryogenesis, menstrual cycle, immune cell turnover, hormone withdrawal"],
        ["Chronic pancreatitis morphology",                      "Irreversible parenchymal damage + fibrosis (exocrine insufficiency + DM)"],
    ],
    col_widths=[8*cm, 8.5*cm]
))
story.append(Spacer(1, 0.4*cm))
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 14 – RAPID REVIEW FLASHCARDS GRID
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_banner("14.  Rapid-Review Flashcard Grid", bg=GOLD, fg=NAVY))
story.append(Spacer(1, 0.3*cm))

rapid = [
    ("What is hydropic change?",                  "Cellular swelling (reversible injury) — vacuoles = distended ER segments"),
    ("What are myelin figures?",                  "Phospholipid whorls from damaged cell membranes — seen in reversible injury"),
    ("What is Russell body?",                     "Rounded eosinophilic globule in plasma cells = accumulated immunoglobulin in rough ER"),
    ("What is anthracosis?",                      "Carbon pigment deposition in lungs/lymph nodes — exogenous, from inhaled carbon"),
    ("What is caseous necrosis?",                 "Cheese-like necrosis — hallmark of TB — granuloma with central caseous necrosis"),
    ("What distinguishes necrosis from apoptosis?","Necrosis = inflammation + membrane rupture; Apoptosis = no inflammation + intact membrane + caspases"),
    ("What is ischemia-reperfusion injury?",      "Paradoxical worsening on blood flow restoration — ROS burst + Ca²⁺ overload + neutrophil influx"),
    ("What activates the intrinsic apoptosis?",   "DNA damage, growth factor withdrawal, ER stress → BCL-2 family → cytochrome c → Caspase-9"),
    ("What is replicative senescence?",           "Permanent cell cycle arrest from critically short telomeres — cells cannot divide further"),
    ("What does telomerase do?",                  "Adds nucleotides to telomere ends — active in stem/germ cells, absent in somatic cells"),
    ("What is steatosis?",                        "Abnormal triglyceride accumulation in cells — most common in liver — alcohol/obesity/DM"),
    ("Cause of metastatic calcification?",        "Hypercalcemia — PVDRR: PTH↑, Vit D↑, bone Destruction, Renal failure, Rare"),
]

for i in range(0, len(rapid), 2):
    row_items = [rapid[i]]
    if i+1 < len(rapid):
        row_items.append(rapid[i+1])

    cells = []
    for q, a in row_items:
        cell = Table(
            [[Paragraph(q, s("Normal", fontSize=9, textColor=NAVY, fontName="Helvetica-Bold",
                              alignment=TA_CENTER, spaceAfter=4, leading=13))],
             [Paragraph(a, s("Normal", fontSize=9, textColor=BLACK, fontName="Helvetica",
                              spaceAfter=0, leading=13))]],
            colWidths=[7.8*cm]
        )
        cell.setStyle(TableStyle([
            ("BACKGROUND",   (0,0),(0,0), BLUE_LT),
            ("BACKGROUND",   (0,1),(0,1), GOLD_LT),
            ("BOX",          (0,0),(0,0), 0.5, TEAL),
            ("BOX",          (0,1),(0,1), 0.5, 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),
        ]))
        cells.append(cell)

    if len(cells) == 1:
        cells.append(Spacer(1,1))

    row_table = Table([cells], colWidths=[8*cm, 8.5*cm])
    row_table.setStyle(TableStyle([
        ("TOPPADDING",   (0,0),(-1,-1), 3),
        ("BOTTOMPADDING",(0,0),(-1,-1), 3),
        ("LEFTPADDING",  (0,0),(-1,-1), 0),
        ("RIGHTPADDING", (0,0),(-1,-1), 0),
        ("VALIGN",       (0,0),(-1,-1), "TOP"),
    ]))
    story.append(row_table)
    story.append(Spacer(1, 0.15*cm))

story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 15 – ALL MNEMONICS CHEAT SHEET
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_banner("15.  All Mnemonics — Quick Reference Cheat Sheet", bg=NAVY))
story.append(Spacer(1, 0.3*cm))
story.append(two_col_table(
    ["Mnemonic", "Stands For", "Topic"],
    [
        ["HIT PING",     "Hypoxia · Immune · Toxins · Physical · Infectious · Nutritional · Genetic", "Causes of cell injury"],
        ["FEMALE",       "Fatty change · Eosinophilia · Membrane blebs · ATP failure → swelling · Loose ribo/ER · EM changes", "Reversible injury features"],
        ["MR. ODE",      "Mitochondria · ROS · Oxygen deprivation · DNA damage · ER stress", "Mechanisms of cell injury"],
        ["PKL",          "Pyknosis → Karyorrhexis → Karyolysis", "Nuclear changes in necrosis"],
        ["CLFC Gas",     "Coagulative · Liquefactive · Fat · Caseous · Gangrenous · Fibrinoid", "Types of necrosis"],
        ["In-Mit",       "Intrinsic = Mitochondrial pathway", "Apoptosis pathway 1"],
        ["Ex-Death",     "Extrinsic = Death receptor pathway", "Apoptosis pathway 2"],
        ["HAMM",         "Hypertrophy · Atrophy · Metaplasia · More (Hyperplasia)", "Cellular adaptations"],
        ["FLAP-G",       "Fat · Lipofuscin · Abnormal proteins · Pigments · Glycogen", "Intracellular accumulations"],
        ["LHMCB",        "Lipofuscin · Hemosiderin · Melanin · Carbon · Bilirubin", "Pathologic pigments"],
        ["PLD",          "Peroxidize lipids · Lesion DNA · Denature proteins", "ROS effects"],
        ["PVDRR",        "PTH excess · Vitamin D excess · bone Destruction · Renal failure · Rare", "Causes of hypercalcemia"],
        ["DTAP-S",       "DNA damage · Telomere shortening · Altered proteins · Persistent inflammation · Signaling", "Cellular aging mechanisms"],
        ["CARDIAC PLAN", "Full breakdown above (13 letters)", "MASTER mnemonic — all topics"],
    ],
    col_widths=[2.5*cm, 9*cm, 5*cm]
))
story.append(Spacer(1, 0.5*cm))
story.append(Paragraph(
    "<i>Source: Robbins &amp; Kumar Basic Pathology · Robbins, Cotran &amp; Kumar Pathologic Basis of Disease</i>",
    s("Normal", fontSize=8, textColor=colors.HexColor("#888888"), alignment=TA_CENTER, fontName="Helvetica-Oblique")
))

# ─── Build PDF ────────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    leftMargin=1.5*cm,
    rightMargin=1.5*cm,
    topMargin=1.5*cm,
    bottomMargin=1.8*cm,
    title="Cell Injury — Study Guide & Mnemonics",
    author="Orris Medical AI",
    subject="Pathology — Cell Injury",
)

doc.build(story, canvasmaker=NumberedCanvas)
print(f"PDF saved to {OUTPUT}")
Running Command

cd /home/daytona/workspace/cell-injury && python generate_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/cell-injury/Cell_Injury_Study_Guide.pdf

Your PDF is ready! Here's your download link:

Cell Injury Study Guide

PDF Document · PDF


What's inside (15 sections, ~48 KB):
SectionContent
Cover + ContentsTOC with all mnemonics listed
1HIT PING — Causes of cell injury
2FEMALE — Reversible injury features + Flashcards
3MR. ODE — Mechanisms + ATP cascade diagram + PLD (ROS effects)
4PKL — Nuclear changes in necrosis
5CLFC Gas — 6 types of necrosis + colour table
6In-Mit / Ex-Death — Apoptosis pathways + Necrosis vs Apoptosis comparison table
7HAMM — Cellular adaptations
8FLAP-G + LHMCB — Accumulations & pigments
9-10PVDRR — Calcification (Dystrophic vs Metastatic)
11DTAP-S — Cellular aging + telomere facts
12CARDIAC PLAN — Master mnemonic flashcard
13High-yield one-liners table (24 exam facts)
14Rapid-review grid (12 mini Q&A flashcard pairs)
15All-mnemonics cheat sheet (14 mnemonics in one table)
Each section has colour-coded mnemonic boxes (question side in blue, answer in yellow) with page numbers throughout.

FMT study plan

Asking for Preferences

Forensic medicine and toxicology

Asking for Preferences
Running Command

mkdir -p /home/daytona/workspace/fmt-study-plan && echo "ready"

How to study

Here's a practical, proven approach to studying Forensic Medicine & Toxicology (FMT) for your university exam.

How to Study FMT Effectively

The Core Problem with FMT

FMT is a high-volume, low-understanding subject - most students try to mug it all up and forget everything in 2 days. The right approach is pattern-based learning + selective memorization.

Step 1 - Understand the Exam Pattern First

Before reading a single page, know what your exam actually tests:
Paper TypeWhat They Ask
Long Essays (10 marks)Medicolegal autopsy, identification of unknown body, hanging vs strangulation, poisons (organo-phosphorus, snake bite, etc.)
Short Essays (5 marks)Specific signs (Tardieu spots, cadaveric spasm, rigor mortis), specific poisons, specific wounds
Short Notes (2-3 marks)Definitions, signs, one-liners
VivaPractical identification - wounds, stains, instruments, preserved specimens
Rule: Read past 5-10 years of question papers from your university BEFORE studying. Identify the topics that repeat every year - those are your Tier 1 priority.

Step 2 - Right Resources (Don't Over-collect)

ResourceUse for
Textbook of Forensic Medicine - Krishan VijPrimary text, comprehensive
Modi's Medical JurisprudenceLegal aspects, MLC, Indian Penal Code sections
Narayan ReddyAlternative to Vij, good for toxicology
Short notes / Prep manualsRevision only (Across, Manipal, etc.)
Rule: Pick ONE main text. Stick to it.

Step 3 - Study in the Right Order

FMT has 4 natural modules. Study them in this sequence:
Module 1: Forensic Medicine Basics (Death, Identity, Wounds)
    ↓
Module 2: Forensic Pathology (Asphyxia, Burns, Sexual offences)
    ↓
Module 3: Medical Jurisprudence (Legal topics, MLC, IPC)
    ↓
Module 4: Toxicology (Poisons by system/class)
Why this order?
  • Modules 1-2 are the highest-yield exam topics
  • Module 3 needs logic more than memory
  • Toxicology (Module 4) is large but follows a fixed template per poison

Step 4 - The Template Method (Most Important Trick)

For every poison and every cause of death, use a fixed template so you never blank out in exams:

Poison Template:

1. Source / Classification
2. Fatal dose / Fatal period
3. Mechanism of toxicity
4. Symptoms (systemic)
5. Postmortem findings
6. Treatment / Antidote
7. Medicolegal importance

Cause of Death / Asphyxia Template:

1. Definition
2. Types / Classification
3. Signs & Symptoms (ante-mortem)
4. Postmortem findings (external + internal)
5. Medicolegal importance
6. Difference from similar condition
Once you learn the template, you can answer ANY poison or ANY asphyxia question even if you only half-remember the details - because the structure carries you.

Step 5 - High-Yield Topics (Do These First)

Forensic Medicine - Must-Do

  • Changes after death (cooling, rigor mortis, putrefaction, adipocere, mummification)
  • Identification of unknown body / decomposed body
  • Injuries: incised, contused, lacerated, firearm wounds
  • Hanging vs strangulation vs throttling
  • Drowning
  • Asphyxia (all types)
  • Age estimation (teeth, bones, radiological)
  • Sex determination

Toxicology - Must-Do

  • Organophosphorus poisoning (most common long essay)
  • Alcohol (acute + chronic + medicolegal)
  • Snake bite
  • Corrosive acids & alkalis
  • Arsenic (chronic)
  • Opium / Morphine / Opioids
  • Carbon monoxide
  • Dhatura (Datura - anticholinergic)
  • Barbiturates / Sedatives
  • Kerosene / Petroleum products

Medical Jurisprudence - Must-Do

  • Consent (types, valid consent, exceptions)
  • Medical negligence + IPC 304A
  • Dying declaration
  • Inquest (police vs magistrate)
  • MLC (Medicolegal Case) - procedure
  • POCSO Act
  • Mental Health Act

Step 6 - Daily Study Method

For a New Topic:

  1. Read the chapter once without highlighting (15-20 min) - get the overview
  2. Make a skeleton - write the template headings and fill key facts only (15 min)
  3. Draw/visualize - especially for wounds (incised vs lacerated), asphyxia signs, PM findings
  4. Write one practice answer using your skeleton (10 min)

For Revision:

  • Use your written skeletons only - do not re-read the textbook
  • Cover the answer side and try to reproduce it
  • Time yourself - 10 marks = 12-15 minutes in the exam

Step 7 - Toxicology Shortcut

Group poisons by antidote - this helps both for learning and exam:
AntidotePoisons
Atropine + PralidoximeOrganophosphorus
NaloxoneOpioids (morphine, heroin)
N-acetylcysteineParacetamol
DesferrioxamineIron
Dimercaprol (BAL)Heavy metals (As, Pb, Hg)
EDTALead
PhysostigmineAtropine / anticholinergics (Datura)
100% O₂ / HBOCarbon monoxide
Vitamin K / FFPWarfarin / rodenticides
FlumazenilBenzodiazepines

Step 8 - Viva & Practical Preparation

FMT practicals test:
  • Identification of specimens - preserved organs, weapons, stains
  • Wound description - given a photograph or specimen, describe it
  • IPC sections - quote the correct section
Quick prep:
  • Make a table of all IPC sections (304A, 312, 313, 375, 376, 302, etc.)
  • Practice describing wounds using the SWEAT formula: Size, Weight/depth, Edges, Associated findings, Track

Suggested Weekly Rhythm

DayActivity
Mon-TueNew topics (read + skeleton)
WedWrite practice answers for Mon-Tue topics
Thu-FriNew topics
SatWrite practice answers for Thu-Fri topics
SunFull week revision using skeletons only + past papers

The Golden Rules

  1. Past papers first - identify repeat topics before you start
  2. One textbook only - do not switch or collect 5 books
  3. Template everything - poison template, cause-of-death template
  4. Write, don't just read - write at least 2 practice answers per day
  5. IPC sections - memorize the key ones, examiners love them
  6. Toxicology is marks - 40% of FMT marks are in toxicology, give it equal time

Want me to now build the full 2-month day-by-day study plan as a PDF with weekly schedules, topic lists, and revision cycles?

Yes

Writing File

~/fmt-study-plan/generate_fmt_plan.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm, mm
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    PageBreak, HRFlowable, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_RIGHT
from reportlab.pdfgen import canvas

# ── Palette ──────────────────────────────────────────────────────────────────
NAVY      = colors.HexColor("#1a2e4a")
TEAL      = colors.HexColor("#0d7377")
MINT      = colors.HexColor("#e8f8f5")
CORAL     = colors.HexColor("#c0392b")
CORAL_LT  = colors.HexColor("#fdecea")
GOLD      = colors.HexColor("#d4860a")
GOLD_LT   = colors.HexColor("#fef9e7")
GREEN     = colors.HexColor("#1e8449")
GREEN_LT  = colors.HexColor("#eafaf1")
PURPLE    = colors.HexColor("#6c3483")
PURPLE_LT = colors.HexColor("#f5eef8")
BLUE_LT   = colors.HexColor("#eaf4fb")
GREY_LT   = colors.HexColor("#f4f6f7")
GREY_MID  = colors.HexColor("#bdc3c7")
GREY_DK   = colors.HexColor("#7f8c8d")
WHITE     = colors.white
BLACK     = colors.HexColor("#1a1a1a")
ORANGE    = colors.HexColor("#e67e22")
ORANGE_LT = colors.HexColor("#fef5e7")

W, H = A4
OUTPUT = "/home/daytona/workspace/fmt-study-plan/FMT_2Month_Study_Plan.pdf"

# ── Styles ────────────────────────────────────────────────────────────────────
def S(base="Normal", **kw):
    styles = getSampleStyleSheet()
    p = ParagraphStyle("_", parent=styles.get(base, styles["Normal"]), **kw)
    return p

BODY   = S(fontSize=9,  textColor=BLACK, leading=14, fontName="Helvetica", spaceAfter=3)
SMALL  = S(fontSize=8,  textColor=BLACK, leading=12, fontName="Helvetica", spaceAfter=2)
TINY   = S(fontSize=7.5,textColor=GREY_DK, leading=11, fontName="Helvetica", spaceAfter=1)
BOLD   = S(fontSize=9,  textColor=BLACK, leading=14, fontName="Helvetica-Bold", spaceAfter=3)
CENTER = S(fontSize=9,  textColor=BLACK, leading=14, fontName="Helvetica", alignment=TA_CENTER)
H1     = S(fontSize=15, textColor=NAVY,  leading=20, fontName="Helvetica-Bold", spaceAfter=6)
H2     = S(fontSize=12, textColor=TEAL,  leading=16, fontName="Helvetica-Bold", spaceAfter=4)
H3     = S(fontSize=10, textColor=NAVY,  leading=14, fontName="Helvetica-Bold", spaceAfter=3)
NOTE   = S(fontSize=8,  textColor=PURPLE,leading=12, fontName="Helvetica-Oblique", spaceAfter=2)
WHITE_C= S(fontSize=9,  textColor=WHITE, leading=13, fontName="Helvetica-Bold", alignment=TA_CENTER)
WHITE_L= S(fontSize=9,  textColor=WHITE, leading=13, fontName="Helvetica", alignment=TA_LEFT)

# ── Page numbering ────────────────────────────────────────────────────────────
class NC(canvas.Canvas):
    def __init__(self, *a, **kw):
        super().__init__(*a, **kw)
        self._pages = []
    def showPage(self):
        self._pages.append(dict(self.__dict__))
        self._startPage()
    def save(self):
        n = len(self._pages)
        for st in self._pages:
            self.__dict__.update(st)
            self._draw_footer(n)
            super().showPage()
        super().save()
    def _draw_footer(self, total):
        pg = self._pageNumber
        self.setFont("Helvetica", 7.5)
        self.setFillColor(GREY_DK)
        self.drawRightString(W-1.5*cm, 0.7*cm, f"Page {pg} / {total}")
        self.drawString(1.5*cm, 0.7*cm, "FMT 2-Month Study Plan  |  Forensic Medicine & Toxicology")
        self.setStrokeColor(GREY_MID)
        self.setLineWidth(0.3)
        self.line(1.5*cm, 0.95*cm, W-1.5*cm, 0.95*cm)

# ── Helpers ───────────────────────────────────────────────────────────────────
CW = 16.5*cm   # content width

def banner(text, bg=NAVY, fg=WHITE, size=13):
    d = [[Paragraph(f"<b>{text}</b>", S(fontSize=size, textColor=fg,
                    fontName="Helvetica-Bold", alignment=TA_CENTER, spaceAfter=0))]]
    t = Table(d, colWidths=[CW])
    t.setStyle(TableStyle([
        ("BACKGROUND",   (0,0),(-1,-1), bg),
        ("TOPPADDING",   (0,0),(-1,-1), 9),
        ("BOTTOMPADDING",(0,0),(-1,-1), 9),
        ("LEFTPADDING",  (0,0),(-1,-1), 10),
        ("RIGHTPADDING", (0,0),(-1,-1), 10),
    ]))
    return t

def pill(text, bg=TEAL):
    d = [[Paragraph(f"<b>{text}</b>", S(fontSize=8, textColor=WHITE,
                    fontName="Helvetica-Bold", alignment=TA_CENTER, spaceAfter=0))]]
    t = Table(d, colWidths=[2.8*cm])
    t.setStyle(TableStyle([
        ("BACKGROUND",   (0,0),(-1,-1), bg),
        ("TOPPADDING",   (0,0),(-1,-1), 3),
        ("BOTTOMPADDING",(0,0),(-1,-1), 3),
        ("LEFTPADDING",  (0,0),(-1,-1), 5),
        ("RIGHTPADDING", (0,0),(-1,-1), 5),
    ]))
    return t

def grid_table(headers, rows, col_widths=None, hdr_bg=NAVY, alt=True):
    if col_widths is None:
        col_widths = [CW/len(headers)]*len(headers)
    data = [[Paragraph(f"<b>{h}</b>", S(fontSize=8.5, textColor=WHITE,
                        fontName="Helvetica-Bold", alignment=TA_CENTER, spaceAfter=0))
             for h in headers]]
    for r in rows:
        data.append([Paragraph(str(c), SMALL) for c in r])
    t = Table(data, colWidths=col_widths)
    bg_rows = [GREY_LT, WHITE] if alt else [WHITE]*100
    t.setStyle(TableStyle([
        ("BACKGROUND",    (0,0),(-1,0),  hdr_bg),
        ("ROWBACKGROUNDS",(0,1),(-1,-1), bg_rows),
        ("GRID",          (0,0),(-1,-1), 0.3, GREY_MID),
        ("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"),
    ]))
    return t

def info_box(title, items, bg=BLUE_LT, border=TEAL, title_bg=TEAL):
    rows = [[Paragraph(f"<b>{title}</b>", S(fontSize=9, textColor=WHITE,
                        fontName="Helvetica-Bold", spaceAfter=0))]]
    for item in items:
        rows.append([Paragraph(item, SMALL)])
    t = Table(rows, colWidths=[CW])
    t.setStyle(TableStyle([
        ("BACKGROUND",   (0,0),(0,0),  title_bg),
        ("BACKGROUND",   (0,1),(-1,-1),bg),
        ("BOX",          (0,0),(-1,-1), 1, border),
        ("TOPPADDING",   (0,0),(-1,-1), 5),
        ("BOTTOMPADDING",(0,0),(-1,-1), 5),
        ("LEFTPADDING",  (0,0),(-1,-1), 8),
        ("RIGHTPADDING", (0,0),(-1,-1), 8),
        ("VALIGN",       (0,0),(-1,-1), "TOP"),
    ]))
    return t

def week_block(week_no, date_range, module, topics, daily_tasks, hours, tip, bg=BLUE_LT, hdr=TEAL):
    """Full week card."""
    elems = []
    # Header strip
    hdr_data = [[
        Paragraph(f"<b>WEEK {week_no}</b>", S(fontSize=11, textColor=WHITE,
                  fontName="Helvetica-Bold", spaceAfter=0)),
        Paragraph(date_range, S(fontSize=8.5, textColor=WHITE,
                  fontName="Helvetica", spaceAfter=0, alignment=TA_CENTER)),
        Paragraph(f"<b>{hours} hrs/day</b>", S(fontSize=9, textColor=WHITE,
                  fontName="Helvetica-Bold", spaceAfter=0, alignment=TA_RIGHT)),
    ]]
    hdr_t = Table(hdr_data, colWidths=[3*cm, 9.5*cm, 4*cm])
    hdr_t.setStyle(TableStyle([
        ("BACKGROUND",   (0,0),(-1,-1), hdr),
        ("TOPPADDING",   (0,0),(-1,-1), 7),
        ("BOTTOMPADDING",(0,0),(-1,-1), 7),
        ("LEFTPADDING",  (0,0),(-1,-1), 10),
        ("RIGHTPADDING", (0,0),(-1,-1), 10),
        ("VALIGN",       (0,0),(-1,-1), "MIDDLE"),
    ]))
    elems.append(hdr_t)

    # Module tag
    mod_data = [[Paragraph(f"<b>MODULE:</b>  {module}", S(fontSize=8.5, textColor=hdr,
                  fontName="Helvetica-Bold", spaceAfter=0))]]
    mod_t = Table(mod_data, colWidths=[CW])
    mod_t.setStyle(TableStyle([
        ("BACKGROUND",   (0,0),(-1,-1), bg),
        ("TOPPADDING",   (0,0),(-1,-1), 4),
        ("BOTTOMPADDING",(0,0),(-1,-1), 4),
        ("LEFTPADDING",  (0,0),(-1,-1), 10),
        ("RIGHTPADDING", (0,0),(-1,-1), 10),
    ]))
    elems.append(mod_t)

    # Topics + daily schedule side by side
    topic_paras = [Paragraph(f"• {t}", SMALL) for t in topics]
    daily_paras = [Paragraph(f"<b>{d[0]}</b>  {d[1]}", SMALL) for d in daily_tasks]

    left_col = [[Paragraph("<b>Topics This Week</b>", H3)]] + [[p] for p in topic_paras]
    right_col = [[Paragraph("<b>Daily Schedule</b>", H3)]] + [[p] for p in daily_paras]

    left_t  = Table(left_col,  colWidths=[7.8*cm])
    right_t = Table(right_col, colWidths=[7.8*cm])
    for t_ in (left_t, right_t):
        t_.setStyle(TableStyle([
            ("BACKGROUND",   (0,0),(-1,-1), bg),
            ("TOPPADDING",   (0,0),(-1,-1), 4),
            ("BOTTOMPADDING",(0,0),(-1,-1), 3),
            ("LEFTPADDING",  (0,0),(-1,-1), 8),
            ("RIGHTPADDING", (0,0),(-1,-1), 6),
            ("VALIGN",       (0,0),(-1,-1), "TOP"),
        ]))

    body_t = Table([[left_t, right_t]], colWidths=[7.9*cm, 8.6*cm])
    body_t.setStyle(TableStyle([
        ("VALIGN",      (0,0),(-1,-1), "TOP"),
        ("LEFTPADDING", (0,0),(-1,-1), 0),
        ("RIGHTPADDING",(0,0),(-1,-1), 0),
        ("TOPPADDING",  (0,0),(-1,-1), 0),
        ("BOTTOMPADDING",(0,0),(-1,-1),0),
    ]))
    elems.append(body_t)

    # Tip
    tip_data = [[Paragraph(f"<font color='#6c3483'><b>Tip:</b></font>  {tip}",
                            S(fontSize=8, textColor=BLACK, fontName="Helvetica-Oblique",
                              spaceAfter=0))]]
    tip_t = Table(tip_data, colWidths=[CW])
    tip_t.setStyle(TableStyle([
        ("BACKGROUND",   (0,0),(-1,-1), PURPLE_LT),
        ("TOPPADDING",   (0,0),(-1,-1), 5),
        ("BOTTOMPADDING",(0,0),(-1,-1), 5),
        ("LEFTPADDING",  (0,0),(-1,-1), 10),
        ("RIGHTPADDING", (0,0),(-1,-1), 10),
        ("BOX",          (0,0),(-1,-1), 0.5, PURPLE),
    ]))
    elems.append(tip_t)
    elems.append(Spacer(1, 0.35*cm))
    return elems

# ═════════════════════════════════════════════════════════════════════════════
# BUILD STORY
# ═════════════════════════════════════════════════════════════════════════════
story = []

# ── COVER ─────────────────────────────────────────────────────────────────────
story.append(Spacer(1, 2*cm))
cover = Table([
    [Paragraph("FORENSIC MEDICINE", S(fontSize=30, textColor=WHITE, fontName="Helvetica-Bold",
                                       alignment=TA_CENTER, spaceAfter=2))],
    [Paragraph("&amp; TOXICOLOGY", S(fontSize=28, textColor=MINT, fontName="Helvetica-Bold",
                                      alignment=TA_CENTER, spaceAfter=4))],
    [Paragraph("2-Month Complete Study Plan", S(fontSize=16, textColor=WHITE,
                fontName="Helvetica", alignment=TA_CENTER, spaceAfter=2))],
    [Paragraph("Day-by-Day Schedule  ·  Topic Priority Tiers  ·  Revision Cycles  ·  Exam Strategy",
               S(fontSize=10, textColor=GREY_MID, fontName="Helvetica-Oblique",
                 alignment=TA_CENTER, spaceAfter=0))],
], colWidths=[CW])
cover.setStyle(TableStyle([
    ("BACKGROUND",   (0,0),(-1,-1), NAVY),
    ("TOPPADDING",   (0,0),(-1,-1), 22),
    ("BOTTOMPADDING",(0,0),(-1,-1), 22),
    ("LEFTPADDING",  (0,0),(-1,-1), 20),
    ("RIGHTPADDING", (0,0),(-1,-1), 20),
]))
story.append(cover)
story.append(Spacer(1, 0.8*cm))

# At-a-glance stats
stats = Table([[
    Table([[Paragraph("8", S(fontSize=28, textColor=TEAL, fontName="Helvetica-Bold",
                              alignment=TA_CENTER, spaceAfter=0))],
           [Paragraph("Weeks", S(fontSize=9, textColor=GREY_DK, alignment=TA_CENTER,
                                  spaceAfter=0))]],
          colWidths=[3.8*cm]),
    Table([[Paragraph("4", S(fontSize=28, textColor=CORAL, fontName="Helvetica-Bold",
                              alignment=TA_CENTER, spaceAfter=0))],
           [Paragraph("Modules", S(fontSize=9, textColor=GREY_DK, alignment=TA_CENTER,
                                    spaceAfter=0))]],
          colWidths=[3.8*cm]),
    Table([[Paragraph("60+", S(fontSize=28, textColor=GREEN, fontName="Helvetica-Bold",
                                alignment=TA_CENTER, spaceAfter=0))],
           [Paragraph("Topics Covered", S(fontSize=9, textColor=GREY_DK, alignment=TA_CENTER,
                                           spaceAfter=0))]],
          colWidths=[4*cm]),
    Table([[Paragraph("3", S(fontSize=28, textColor=PURPLE, fontName="Helvetica-Bold",
                              alignment=TA_CENTER, spaceAfter=0))],
           [Paragraph("Revision Cycles", S(fontSize=9, textColor=GREY_DK, alignment=TA_CENTER,
                                            spaceAfter=0))]],
          colWidths=[4*cm]),
]], colWidths=[3.8*cm, 3.9*cm, 4.5*cm, 4.3*cm])
stats.setStyle(TableStyle([
    ("BACKGROUND",   (0,0),(-1,-1), GREY_LT),
    ("BOX",          (0,0),(-1,-1), 1, GREY_MID),
    ("TOPPADDING",   (0,0),(-1,-1), 10),
    ("BOTTOMPADDING",(0,0),(-1,-1), 10),
    ("VALIGN",       (0,0),(-1,-1), "MIDDLE"),
]))
story.append(stats)
story.append(Spacer(1, 0.6*cm))

# Module overview
story.append(Paragraph("Plan Structure — 4 Modules over 8 Weeks", H2))
mod_overview = grid_table(
    ["Module", "Topic Area", "Weeks", "Priority", "Exam Weight"],
    [
        ["1", "Forensic Pathology — Death & Identity", "1 – 2", "★★★ HIGHEST", "~30%"],
        ["2", "Forensic Pathology — Injuries & Asphyxia", "3 – 4", "★★★ HIGHEST", "~30%"],
        ["3", "Medical Jurisprudence & Legal Medicine", "5 – 6", "★★ HIGH", "~20%"],
        ["4", "Toxicology — All Poisons", "7 – 8", "★★★ HIGHEST", "~20%"],
    ],
    col_widths=[1*cm, 6.5*cm, 2.2*cm, 3.5*cm, 3.3*cm],
    hdr_bg=NAVY
)
story.append(mod_overview)
story.append(Spacer(1, 0.4*cm))

# Daily time split
story.append(Paragraph("Recommended Daily Time Allocation (4–5 hrs/day)", H2))
time_t = grid_table(
    ["Session", "Time", "Activity"],
    [
        ["Morning (Session 1)",   "1.5 hrs", "New topic — Read + make skeleton notes"],
        ["Afternoon (Session 2)", "1.5 hrs", "Continue new topic OR previous day revision"],
        ["Evening (Session 3)",   "1 hr",    "Write 1 practice long essay or 2 short notes"],
        ["Night (Session 4)",     "30 min",  "Review skeleton notes of the day — no new reading"],
    ],
    col_widths=[4.5*cm, 2.5*cm, 9.5*cm], hdr_bg=TEAL
)
story.append(time_t)
story.append(PageBreak())

# ── TABLE OF CONTENTS ─────────────────────────────────────────────────────────
story.append(banner("TABLE OF CONTENTS", bg=NAVY))
story.append(Spacer(1, 0.3*cm))
toc_rows = [
    ("1", "How to Use This Plan + Study Method",        "3"),
    ("2", "Priority Tier System (Tier 1 / 2 / 3)",      "3"),
    ("3", "Module 1 — Forensic Pathology: Death & Identity  (Weeks 1–2)", "4–5"),
    ("4", "Module 2 — Injuries, Wounds & Asphyxia  (Weeks 3–4)",          "6–7"),
    ("5", "Module 3 — Medical Jurisprudence  (Weeks 5–6)",                 "8–9"),
    ("6", "Module 4 — Toxicology  (Weeks 7–8)",                            "10–11"),
    ("7", "Revision Cycle Plan (Weeks 1–8 integrated)",                    "12"),
    ("8", "Topic Priority Master List",                                     "13"),
    ("9", "IPC Sections Quick Reference",                                   "14"),
    ("10","Antidotes & Poisons Quick Reference",                            "14"),
    ("11","Exam Strategy & Last-Week Plan",                                 "15"),
    ("12","Weekly Tracker / Checklist",                                     "16"),
]
toc_t = grid_table(["#", "Section", "Page"], toc_rows,
                   col_widths=[0.8*cm, 13*cm, 2.7*cm], hdr_bg=NAVY)
story.append(toc_t)
story.append(PageBreak())

# ── HOW TO USE ────────────────────────────────────────────────────────────────
story.append(banner("1.  How to Use This Plan", bg=TEAL))
story.append(Spacer(1, 0.3*cm))
instructions = [
    "Step 1:  Collect your university's past 10-year question papers BEFORE starting. Mark topics that repeat ≥3 times — these are Tier 1 (non-negotiable).",
    "Step 2:  Choose ONE primary textbook — Krishan Vij or Narayan Reddy. Do NOT switch mid-plan.",
    "Step 3:  Follow the weekly schedule strictly for 6 weeks. Weeks 7–8 are Toxicology + full revision.",
    "Step 4:  Use the TEMPLATE METHOD for every poison and every cause of death (see Section 4).",
    "Step 5:  On Sunday of each week, do a timed revision of all topics covered that week using your skeleton notes only.",
    "Step 6:  Write at least one full practice answer every day — this is non-negotiable for exam readiness.",
    "Step 7:  Tick off each topic in the Weekly Tracker (Section 12) as you complete it.",
]
story.append(info_box("Instructions", instructions, bg=BLUE_LT, border=TEAL, title_bg=TEAL))
story.append(Spacer(1, 0.4*cm))

# Priority system
story.append(banner("2.  Priority Tier System", bg=NAVY))
story.append(Spacer(1, 0.3*cm))
tier_t = grid_table(
    ["Tier", "Label", "Criteria", "Study Approach"],
    [
        ["TIER 1", "Must-Do",   "Appears in ≥70% of past papers; compulsory long essay", "Read + skeleton + 2 practice answers + revise 3×"],
        ["TIER 2", "High-Yield","Appears in 40–70% papers; common short essay",          "Read + skeleton + 1 practice answer + revise 2×"],
        ["TIER 3", "Complete",  "Appears occasionally; important for viva",              "Read + skeleton notes only + revise 1×"],
    ],
    col_widths=[1.8*cm, 2.2*cm, 6*cm, 6.5*cm],
    hdr_bg=CORAL
)
story.append(tier_t)
story.append(Spacer(1, 0.4*cm))
story.append(info_box("Tier Labels used in this plan", [
    "★★★  =  TIER 1  (Must-Do — highest exam frequency)",
    "★★    =  TIER 2  (High-Yield — frequent short essays)",
    "★      =  TIER 3  (Complete — viva + occasional questions)",
], bg=GOLD_LT, border=GOLD, title_bg=GOLD))
story.append(PageBreak())

# ═════════════════════════════════════════════════════════════════════════════
# MODULE 1 — WEEKS 1–2
# ═════════════════════════════════════════════════════════════════════════════
story.append(banner("MODULE 1  —  Forensic Pathology: Death & Identity  (Weeks 1–2)", bg=NAVY, size=11))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph("3.  Week-by-Week Schedule", H1))

# WEEK 1
story += week_block(
    week_no="1",
    date_range="Day 1–7  |  Module 1A — Death: Definitions, Signs & Changes",
    module="Module 1 — Death & Postmortem Changes",
    topics=[
        "★★★  Definition and types of death (somatic, molecular, brain death)",
        "★★★  Signs of death — immediate and delayed",
        "★★★  Changes after death: cooling (algor mortis)",
        "★★★  Rigor mortis — mechanism, timing, cadaveric spasm",
        "★★★  Livor mortis (hypostasis) — distribution, fixation",
        "★★★  Putrefaction — stages, factors affecting, gases",
        "★★   Adipocere — formation, conditions, medicolegal importance",
        "★★   Mummification — conditions, features",
        "★    Maceration — in utero changes",
        "★    Decomposition in water vs. on land",
    ],
    daily_tasks=[
        ("Mon:", "Death definitions + types + signs — read + skeleton"),
        ("Tue:", "Algor mortis + Rigor mortis — full skeleton + practice essay"),
        ("Wed:", "Livor mortis — skeleton + write 1 short essay; Revise Mon–Tue"),
        ("Thu:", "Putrefaction — stages + gases + PM findings; skeleton"),
        ("Fri:", "Adipocere + Mummification + Maceration — skeletons"),
        ("Sat:", "Write 2 practice essays (Rigor mortis + Putrefaction)"),
        ("Sun:", "REVISION — all Week 1 topics using skeletons only; past Qs"),
    ],
    hours="4–5",
    tip="Make a TIMELINE chart: 0–2 hrs post-death → cooling; 2–6 hrs → rigor starts; 6–12 hrs → rigor complete; 24–48 hrs → putrefaction starts. Examiners love these timelines.",
    bg=BLUE_LT, hdr=TEAL
)

# WEEK 2
story += week_block(
    week_no="2",
    date_range="Day 8–14  |  Module 1B — Identification of the Living and Dead",
    module="Module 1 — Identification",
    topics=[
        "★★★  Identification of unknown body (decomposed/mutilated)",
        "★★★  Age estimation — teeth (eruption chart), bones (epiphyseal fusion), radiological",
        "★★★  Sex determination — skull, pelvis, long bones",
        "★★   Race/stature estimation",
        "★★   Fingerprints — types, Galton's points (16 points), latent prints",
        "★★   DNA fingerprinting — principles, uses",
        "★★   Superimposition, facial reconstruction",
        "★★★  Identification of live person — age (MLC), disputed sex",
        "★★   Virginity (hymen) — types, medicolegal importance",
        "★★   Pregnancy — signs used medicolegal",
        "★    Maternity/Paternity disputes",
    ],
    daily_tasks=[
        ("Mon:", "Unknown body identification — full approach; skeleton"),
        ("Tue:", "Age estimation — teeth + bones; draw eruption chart"),
        ("Wed:", "Sex determination — skull + pelvis features; practice essay"),
        ("Thu:", "Fingerprints + DNA fingerprinting — skeletons"),
        ("Fri:", "Virginity + Pregnancy (medicolegal aspect) — skeletons"),
        ("Sat:", "Write 2 practice essays (Unknown body ID + Age estimation)"),
        ("Sun:", "REVISION — all Week 1+2 topics; attempt past paper questions"),
    ],
    hours="4–5",
    tip="For age estimation — draw the TOOTH ERUPTION TABLE every time (primary 6m–2yrs; permanent 6–21 yrs). Examiners expect you to reproduce it. Similarly memorize epiphyseal fusion ages for key bones.",
    bg=GREEN_LT, hdr=GREEN
)
story.append(PageBreak())

# ═════════════════════════════════════════════════════════════════════════════
# MODULE 2 — WEEKS 3–4
# ═════════════════════════════════════════════════════════════════════════════
story.append(banner("MODULE 2  —  Injuries, Wounds & Asphyxia  (Weeks 3–4)", bg=CORAL, size=11))
story.append(Spacer(1, 0.3*cm))

# WEEK 3
story += week_block(
    week_no="3",
    date_range="Day 15–21  |  Module 2A — Mechanical Injuries & Wounds",
    module="Module 2 — Wounds & Mechanical Injuries",
    topics=[
        "★★★  Wound — definition, classification (ante-mortem vs post-mortem)",
        "★★★  Incised wound — features, medicolegal importance",
        "★★★  Contused wound — features, causes",
        "★★★  Lacerated wound — features, difference from incised",
        "★★★  Stab wound — features, entry vs exit",
        "★★★  Firearm wounds — entry vs exit wound (high vs low velocity)",
        "★★★  Gunshot residue, blackening, tattooing, Lenz rings",
        "★★   Chop wound, defense wounds, bite wounds",
        "★★   Age of injury estimation (ante-mortem vs PM)",
        "★★★  Medicolegal autopsy — procedure, external + internal examination",
        "★★   Postmortem report writing",
        "★    Exhumation",
    ],
    daily_tasks=[
        ("Mon:", "Wound classification + Incised wound + Contused wound"),
        ("Tue:", "Lacerated wound + Stab wound — compare all 4 wound types in a table"),
        ("Wed:", "Firearm wounds — entry vs exit features; sketch diagrams"),
        ("Thu:", "Medicolegal autopsy — full procedure; skeleton + practice essay"),
        ("Fri:", "Age of wounds + Ante-mortem vs PM wounds + Exhumation"),
        ("Sat:", "Write: Medicolegal autopsy (long essay) + Firearm wounds (short essay)"),
        ("Sun:", "REVISION — Weeks 1–3 all topics; past paper Q practice"),
    ],
    hours="4–5",
    tip="Draw a COMPARISON TABLE: Incised vs Contused vs Lacerated vs Stab — with columns: edges, depth, bleeding, associated findings, weapon. This single table earns marks in short essays.",
    bg=ORANGE_LT, hdr=ORANGE
)

# WEEK 4
story += week_block(
    week_no="4",
    date_range="Day 22–28  |  Module 2B — Asphyxia, Burns & Sexual Offences",
    module="Module 2 — Asphyxia, Burns, Sexual Offences",
    topics=[
        "★★★  Asphyxia — definition, types, general PM signs",
        "★★★  Hanging — types, PM findings, judicial vs homicidal",
        "★★★  Strangulation — manual (throttling) vs ligature; PM signs",
        "★★★  Smothering, gagging, overlaying, traumatic asphyxia",
        "★★★  Drowning — wet vs dry; Diatom test; PM findings",
        "★★★  Tardieu spots — significance",
        "★★   Hanging vs Strangulation — differential table",
        "★★★  Burns — degrees, flame vs scalds vs chemical; PM findings",
        "★★   Heat stroke vs heat hyperpyrexia vs sunstroke",
        "★★★  Rape — definition (IPC 375), examination, evidence collection",
        "★★   POCSO Act — key provisions",
        "★★   Examination of accused in sexual offences",
        "★    Unnatural sexual offences (IPC 377)",
    ],
    daily_tasks=[
        ("Mon:", "Asphyxia — types + general signs; Tardieu spots"),
        ("Tue:", "Hanging + Strangulation — detailed features + comparison table"),
        ("Wed:", "Drowning — wet vs dry + Diatom test + PM findings; practice essay"),
        ("Thu:", "Burns — degrees + types; Heat-related deaths"),
        ("Fri:", "Rape — definition + examination procedure + IPC 375, POCSO"),
        ("Sat:", "Write: Hanging (long essay) + Drowning (short essay) + Rape examination"),
        ("Sun:", "REVISION — all 4 weeks; MID-PLAN review; identify weak areas"),
    ],
    hours="4–5",
    tip="The HANGING vs STRANGULATION comparison is a perennial exam favourite. Make a table with ≥8 differences covering: ligature mark position, direction, depth, neck structures, PM findings, hyoid bone.",
    bg=CORAL_LT, hdr=CORAL
)
story.append(PageBreak())

# ═════════════════════════════════════════════════════════════════════════════
# MODULE 3 — WEEKS 5–6
# ═════════════════════════════════════════════════════════════════════════════
story.append(banner("MODULE 3  —  Medical Jurisprudence & Legal Medicine  (Weeks 5–6)", bg=PURPLE, size=11))
story.append(Spacer(1, 0.3*cm))

# WEEK 5
story += week_block(
    week_no="5",
    date_range="Day 29–35  |  Module 3A — Legal Framework & Medical Practice",
    module="Module 3 — Medical Jurisprudence",
    topics=[
        "★★★  Consent — types (informed, implied, express), valid consent, exceptions",
        "★★★  Medical negligence — definition, IPC 304A, civil vs criminal",
        "★★★  Contributory negligence, vicarious liability, res ipsa loquitur",
        "★★★  Consumer Protection Act + medical profession",
        "★★★  Medical Termination of Pregnancy (MTP) Act",
        "★★   Pre-Conception and Pre-Natal Diagnostic Techniques (PCPNDT) Act",
        "★★★  Mental Health Act — voluntary, involuntary admission; testamentary capacity",
        "★★   Dying declaration — conditions for validity",
        "★★   Inquest — police vs magistrate; coroner's inquest",
        "★★   Exhumation — medicolegal aspects",
        "★    Notifiable diseases — duty of doctor",
    ],
    daily_tasks=[
        ("Mon:", "Consent — all types + valid consent criteria + exceptions"),
        ("Tue:", "Medical negligence + IPC 304A + related doctrines"),
        ("Wed:", "MTP Act + PCPNDT Act — key provisions; practice short essay"),
        ("Thu:", "Mental Health Act + Dying declaration + Inquest"),
        ("Fri:", "Consumer Protection Act + Notifiable diseases + Exhumation"),
        ("Sat:", "Write: Consent (long essay) + Medical negligence (long essay)"),
        ("Sun:", "REVISION — Module 3A + weak area topics from Modules 1–2"),
    ],
    hours="4",
    tip="IPC sections are EXAM GOLD. Memorize: 304A (negligence), 312 (abortion), 313 (abortion without consent), 375 (rape), 376 (punishment for rape), 302 (murder), 299 (culpable homicide). Quote them in every answer.",
    bg=PURPLE_LT, hdr=PURPLE
)

# WEEK 6
story += week_block(
    week_no="6",
    date_range="Day 36–42  |  Module 3B — Medicolegal Cases, Ethics & Special Topics",
    module="Module 3 — MLC, Ethics, Special Topics",
    topics=[
        "★★★  Medicolegal Case (MLC) — definition, types, procedure, documentation",
        "★★★  Wound certificate — how to write; MLC report",
        "★★   Examination of injured person — documentation",
        "★★★  Identification and examination of drunk person (IPC 510)",
        "★★   Examination for drunkenness — clinical + chemical tests",
        "★★★  Age estimation for legal purposes (juvenile, marriage, criminal responsibility)",
        "★★   Criminal responsibility — Section 84 IPC (insanity); NGRI",
        "★★   Fitness to plead; McNaughton rules",
        "★★   Infanticide, foeticide, battered baby syndrome",
        "★★   Dowry death (IPC 304B) + Section 498A",
        "★    Medical ethics — ICMR guidelines, euthanasia, organ transplant",
        "★    Transplantation of Human Organs Act",
    ],
    daily_tasks=[
        ("Mon:", "MLC — definition + types + procedure + documentation; practice MLC report"),
        ("Tue:", "Drunkenness examination + age estimation for legal purposes"),
        ("Wed:", "Criminal responsibility + Insanity (IPC 84) + McNaughton rules"),
        ("Thu:", "Infanticide + Battered baby + Dowry death IPC 304B / 498A"),
        ("Fri:", "Medical ethics + Transplantation Act + Euthanasia"),
        ("Sat:", "Write: MLC procedure + Drunkenness examination + Infanticide"),
        ("Sun:", "REVISION CYCLE 1 — All Modules 1, 2, 3 using skeleton notes only"),
    ],
    hours="4",
    tip="Practice writing an actual MLC report from scratch. Examiners sometimes give a clinical scenario and ask you to write the MLC entry. Format: date/time, informant, nature of injury, opinion on cause, fitness for statement.",
    bg=PURPLE_LT, hdr=PURPLE
)
story.append(PageBreak())

# ═════════════════════════════════════════════════════════════════════════════
# MODULE 4 — WEEKS 7–8
# ═════════════════════════════════════════════════════════════════════════════
story.append(banner("MODULE 4  —  Toxicology  (Weeks 7–8)", bg=GOLD, fg=NAVY, size=11))
story.append(Spacer(1, 0.3*cm))

# WEEK 7
story += week_block(
    week_no="7",
    date_range="Day 43–49  |  Module 4A — General Toxicology + Corrosives + Metals + CNS Poisons",
    module="Module 4 — Toxicology Part 1",
    topics=[
        "★★★  General toxicology — definitions, factors modifying action, classes",
        "★★★  Organophosphorus poisoning — mechanism, features, treatment (Atropine + PAM)",
        "★★★  Alcohol (ethanol) — acute + chronic + medicolegal aspects + Wood's alcohol",
        "★★★  Corrosive acids — sulphuric, hydrochloric, nitric; PM findings",
        "★★   Corrosive alkalis — NaOH, lime; features + PM",
        "★★★  Arsenic poisoning — acute vs chronic; Mees' lines; Marsh test",
        "★★   Lead poisoning — sources, features, Burton's line; EDTA treatment",
        "★★   Mercury poisoning — forms, features, Minamata disease",
        "★★★  Opium/Morphine/Heroin — features, Naloxone antidote",
        "★★★  Barbiturates/Benzodiazepines — features, treatment",
        "★★   Cannabis — bhang/ganja/charas; features; medicolegal",
    ],
    daily_tasks=[
        ("Mon:", "General toxicology + Organophosphorus (most important!) — full template"),
        ("Tue:", "Alcohol — acute + chronic + PM + medicolegal aspects; skeleton"),
        ("Wed:", "Corrosive acids + alkalis — features + PM findings; practice essay"),
        ("Thu:", "Arsenic (acute + chronic) + Lead + Mercury — all 3 templates"),
        ("Fri:", "Opioids (Opium/Morphine/Heroin) + Barbiturates + Cannabis"),
        ("Sat:", "Write: Organophosphorus (long essay) + Arsenic (short essay) + Alcohol"),
        ("Sun:", "REVISION — all 3 modules + Week 7 Toxicology"),
    ],
    hours="5",
    tip="Use the POISON TEMPLATE for EVERY poison: Source → Fatal dose/period → Mechanism → Symptoms → PM findings → Treatment/Antidote → Medicolegal importance. This structure guarantees marks even with partial knowledge.",
    bg=GOLD_LT, hdr=GOLD
)

# WEEK 8
story += week_block(
    week_no="8",
    date_range="Day 50–56  |  Module 4B — Alkaloids, Irritants, Animal Poisons + FULL REVISION",
    module="Module 4 — Toxicology Part 2 + Final Revision",
    topics=[
        "★★★  Snake bite — types (haemotoxic vs neurotoxic), features, ASV treatment",
        "★★★  Datura (Anticholinergic) — features, physostigmine antidote",
        "★★★  Aconite (Monkshood) — features, cardiac effects",
        "★★   Nux vomica (Strychnine) — 'risus sardonicus', opisthotonus",
        "★★★  Carbon monoxide — cherry red colour, 100% O₂ treatment",
        "★★   Cyanide — bitter almond smell, rapid death, treatment",
        "★★   Kerosene/Petroleum — features, PM",
        "★★   Dhatura vs Opium — comparison",
        "★★★  Food poisoning — Salmonella, Staphylococcal, Botulism",
        "★★   Paracetamol overdose — N-acetylcysteine",
        "★    Insecticide poisoning overview",
        "── REVISION DAYS (Thu–Sun) ──",
        "★★★  Full Module 1 rapid revision",
        "★★★  Full Module 2 rapid revision",
        "★★★  Full Module 3 rapid revision (IPC sections list)",
        "★★★  Full Module 4 rapid revision (antidotes table)",
    ],
    daily_tasks=[
        ("Mon:", "Snake bite + Carbon monoxide + Cyanide — templates"),
        ("Tue:", "Datura + Aconite + Nux vomica + Kerosene — templates"),
        ("Wed:", "Food poisoning + Paracetamol + remaining toxins"),
        ("Thu:", "REVISION DAY — Modules 1 + 2 full rapid revision"),
        ("Fri:", "REVISION DAY — Module 3 (IPC sections + Acts) rapid revision"),
        ("Sat:", "REVISION DAY — Module 4 all poisons from antidote table"),
        ("Sun:", "MOCK EXAM — attempt a full past paper under timed conditions"),
    ],
    hours="5–6",
    tip="In the final week, write ANTIDOTE TABLE from memory every morning. Snake bite — ASV; OP — Atropine + PAM; CO — O₂; Opioids — Naloxone; Datura — Physostigmine; Arsenic/Hg — BAL; Lead — EDTA; Paracetamol — NAC.",
    bg=GOLD_LT, hdr=GOLD
)
story.append(PageBreak())

# ═════════════════════════════════════════════════════════════════════════════
# REVISION CYCLE PLAN
# ═════════════════════════════════════════════════════════════════════════════
story.append(banner("7.  Integrated Revision Cycle Plan", bg=NAVY))
story.append(Spacer(1, 0.3*cm))
story.append(grid_table(
    ["Revision", "When", "What to Cover", "Method", "Time Needed"],
    [
        ["Cycle 1 (Weekly)", "Every Sunday", "That week's topics only", "Skeleton notes, no textbook", "2 hrs"],
        ["Cycle 2 (Mid-plan)", "End of Week 4 (Day 28)", "Modules 1 + 2 completely", "Write 3 practice essays + review skeletons", "4 hrs"],
        ["Cycle 3 (Post-jurisprudence)", "End of Week 6 (Day 42)", "Modules 1 + 2 + 3", "IPC section list from memory + key tables", "4 hrs"],
        ["Cycle 4 (Final)", "End of Week 8 (Day 56)", "All 4 Modules", "Full past paper attempt (timed)", "Full day"],
        ["Pre-exam Rapid Rev", "Last 2–3 days", "Skeleton notes only; antidotes table; IPC table; timeline of death changes", "No new reading", "3 hrs/day"],
    ],
    col_widths=[3*cm, 3.2*cm, 5.5*cm, 3.5*cm, 2.3*cm],
    hdr_bg=TEAL
))
story.append(Spacer(1, 0.4*cm))

# ═════════════════════════════════════════════════════════════════════════════
# TOPIC PRIORITY MASTER LIST
# ═════════════════════════════════════════════════════════════════════════════
story.append(banner("8.  Topic Priority Master List", bg=NAVY))
story.append(Spacer(1, 0.3*cm))
story.append(grid_table(
    ["Priority", "Topic", "Module", "Exam Type"],
    [
        ["★★★", "Medicolegal autopsy — procedure",            "1", "Long essay"],
        ["★★★", "Changes after death (full set)",             "1", "Long essay"],
        ["★★★", "Identification of decomposed body",         "1", "Long essay"],
        ["★★★", "Age estimation — teeth + bones",            "1", "Long/short essay"],
        ["★★★", "Rigor mortis — mechanism, stages",          "1", "Short essay"],
        ["★★★", "Firearm wounds — entry vs exit",            "2", "Long/short essay"],
        ["★★★", "Hanging vs Strangulation — comparison",     "2", "Long essay"],
        ["★★★", "Drowning — wet/dry + Diatom test",          "2", "Long/short essay"],
        ["★★★", "Asphyxia — types + general PM signs",       "2", "Long essay"],
        ["★★★", "Rape — definition, examination, evidence",  "2", "Long essay"],
        ["★★★", "Consent — types, valid consent",            "3", "Long/short essay"],
        ["★★★", "Medical negligence — IPC 304A",             "3", "Long essay"],
        ["★★★", "MLC — procedure, documentation",            "3", "Long essay"],
        ["★★★", "MTP Act provisions",                        "3", "Short essay"],
        ["★★★", "Organophosphorus poisoning",                "4", "Long essay"],
        ["★★★", "Alcohol — acute/chronic/medicolegal",       "4", "Long essay"],
        ["★★★", "Arsenic — acute/chronic; Marsh test",       "4", "Long/short essay"],
        ["★★★", "Snake bite — types + ASV treatment",        "4", "Long/short essay"],
        ["★★★", "Carbon monoxide poisoning",                 "4", "Short essay"],
        ["★★★", "Datura poisoning",                         "4", "Short essay"],
        ["★★",  "Sex determination — skull + pelvis",       "1", "Short essay"],
        ["★★",  "Adipocere formation",                      "1", "Short essay"],
        ["★★",  "Fingerprints — Galton's points",           "1", "Short note"],
        ["★★",  "Tardieu spots",                            "2", "Short note"],
        ["★★",  "Burns — degrees + medicolegal",            "2", "Short essay"],
        ["★★",  "Dying declaration — validity",             "3", "Short essay"],
        ["★★",  "Mental Health Act",                        "3", "Short essay"],
        ["★★",  "Infanticide vs foeticide",                 "3", "Short essay"],
        ["★★",  "Lead poisoning — Burton's line",           "4", "Short essay"],
        ["★★",  "Opium/Morphine/Heroin",                   "4", "Short essay"],
        ["★★",  "Food poisoning — Botulism",               "4", "Short essay"],
    ],
    col_widths=[2*cm, 8*cm, 2.2*cm, 4.3*cm],
    hdr_bg=CORAL
))
story.append(PageBreak())

# ═════════════════════════════════════════════════════════════════════════════
# IPC SECTIONS
# ═════════════════════════════════════════════════════════════════════════════
story.append(banner("9.  IPC Sections Quick Reference", bg=NAVY))
story.append(Spacer(1, 0.3*cm))
story.append(grid_table(
    ["IPC Section", "Offence", "Key Detail"],
    [
        ["84",   "Insanity defence",                         "Act done by person of unsound mind — not guilty (NGRI)"],
        ["174",  "Inquest",                                  "Police inquest — unnatural/sudden/suspicious death"],
        ["176",  "Magistrate's inquest",                    "Dowry death, custodial death, rape victims, exhumed bodies"],
        ["199",  "False evidence",                           "Giving false medical certificate"],
        ["299",  "Culpable homicide",                       "Act with knowledge likely to cause death"],
        ["300",  "Murder",                                   "Culpable homicide amounting to murder"],
        ["302",  "Punishment for murder",                   "Death or life imprisonment"],
        ["304A", "Death by negligence",                     "Rash or negligent act — 2 years + fine (medical negligence)"],
        ["304B", "Dowry death",                             "Death within 7 years of marriage + harassment for dowry"],
        ["312",  "Causing miscarriage",                     "Voluntary miscarriage — with woman's consent"],
        ["313",  "Miscarriage without consent",             "Without woman's consent — 10 years/life"],
        ["315",  "Infanticide",                             "Act to prevent child from being born alive"],
        ["316",  "Foeticide",                               "Causing death of a quick unborn child"],
        ["375",  "Rape — definition",                       "Sexual assault without consent (amended 2013)"],
        ["376",  "Punishment for rape",                     "Minimum 7 years; life; gang rape — 20 yrs/life"],
        ["377",  "Unnatural offences",                      "Sexual acts against the order of nature"],
        ["498A", "Cruelty by husband/relatives",            "Harassment to coerce for dowry"],
        ["509",  "Obscene gestures",                        "Word/gesture/act intended to insult modesty of woman"],
        ["510",  "Drunkenness in public",                   "Misconduct in public place under intoxication"],
    ],
    col_widths=[3*cm, 6*cm, 7.5*cm],
    hdr_bg=PURPLE
))
story.append(Spacer(1, 0.4*cm))

# ═════════════════════════════════════════════════════════════════════════════
# ANTIDOTES TABLE
# ═════════════════════════════════════════════════════════════════════════════
story.append(banner("10.  Antidotes & Poisons Quick Reference", bg=TEAL))
story.append(Spacer(1, 0.3*cm))
story.append(grid_table(
    ["Poison / Group", "Antidote", "Mechanism / Notes"],
    [
        ["Organophosphorus (OP)",       "Atropine + Pralidoxime (PAM)",        "Atropine blocks muscarinic effects; PAM reactivates cholinesterase (give early)"],
        ["Opioids (Morphine, Heroin)",  "Naloxone (Narcan)",                   "Pure opioid antagonist; short acting — may need repeat doses"],
        ["Paracetamol",                 "N-Acetylcysteine (NAC)",              "Replenishes glutathione; give within 8–10 hrs for maximum effect"],
        ["Benzodiazepines",             "Flumazenil",                          "GABA-A receptor antagonist; short duration"],
        ["Iron overdose",               "Desferrioxamine",                     "Chelates free iron; urine turns orange-rose ('vin rosé')"],
        ["Heavy metals (As, Hg, Pb)",   "Dimercaprol (BAL)",                   "Chelator; painful IM injections; for arsenic, mercury, gold"],
        ["Lead (Pb)",                   "EDTA (Na₂CaEDTA)",                   "Chelation; BAL + EDTA for severe cases"],
        ["Arsenic",                     "BAL (Dimercaprol)",                   "Also D-penicillamine; Marsh test for detection"],
        ["Carbon monoxide",             "100% O₂ / Hyperbaric O₂ (HBO)",      "Displaces CO from Hb; cherry-red colour; carboxyhaemoglobin"],
        ["Cyanide",                     "Amyl nitrite + Na nitrite + Na thiosulphate", "Nitrites form metHb (binds CN); thiosulphate converts CN to thiocyanate"],
        ["Datura (Atropine-like)",      "Physostigmine (Eserine)",             "Anticholinesterase; crosses BBB; reverses central + peripheral effects"],
        ["Snake bite (haemotoxic/neurotoxic)", "Anti-Snake Venom (ASV)",      "Polyvalent ASV IV; supportive care; neostigmine for neurotoxic bites"],
        ["Warfarin / Rodenticides",     "Vitamin K + Fresh Frozen Plasma",    "Vit K restores clotting factors; FFP for immediate reversal"],
        ["Digoxin",                     "Digibind (Fab fragments)",            "Specific antibody fragments bind and neutralize digoxin"],
        ["Beta-blockers",               "Glucagon",                            "Increases cAMP, bypassing blocked receptors"],
        ["Methanol / Ethylene glycol",  "Ethanol OR Fomepizole",              "Competitive inhibitor of alcohol dehydrogenase; prevents toxic metabolite formation"],
        ["Heparin",                     "Protamine sulphate",                  "1 mg protamine neutralizes ~100 units heparin"],
    ],
    col_widths=[4.5*cm, 5*cm, 7*cm],
    hdr_bg=GREEN
))
story.append(PageBreak())

# ═════════════════════════════════════════════════════════════════════════════
# EXAM STRATEGY
# ═════════════════════════════════════════════════════════════════════════════
story.append(banner("11.  Exam Strategy & Last-Week Plan", bg=CORAL))
story.append(Spacer(1, 0.3*cm))
story.append(info_box("Answer Writing Strategy", [
    "Long essay (10 marks, ~15 min): Introduction (2 lines) → Classification → Definition → Main content using template → PM findings → Treatment → Medicolegal importance → Conclusion",
    "Short essay (5 marks, ~8 min): Direct content, no lengthy intro → Use numbered points → Include a comparison table if applicable → End with medicolegal note",
    "Short note (2–3 marks, ~4 min): 4–5 bullet points maximum → Definition + 2–3 key features + medicolegal significance",
    "ALWAYS quote IPC sections when relevant — earns bonus marks even in non-jurisprudence questions",
    "Draw diagrams/tables for wounds, asphyxia signs, tooth eruption, epiphyseal fusion — examiners reward visual content",
], bg=CORAL_LT, border=CORAL, title_bg=CORAL))
story.append(Spacer(1, 0.3*cm))

story.append(info_box("Last Week Plan (7 Days Before Exam)", [
    "Day 7: Full Module 1 revision — skeleton notes only; write death timeline from memory",
    "Day 6: Full Module 2 revision — draw wound comparison table + hanging vs strangulation table",
    "Day 5: Full Module 3 revision — reproduce IPC section list from memory; MTP Act points",
    "Day 4: Full Module 4 revision — reproduce antidote table from memory; OP poisoning template",
    "Day 3: Past paper attempt under exam conditions (3 hr timed); self-assess",
    "Day 2: Revise ONLY weak areas identified in past paper + rapid IPC + antidotes",
    "Day 1 (before exam): Skeleton notes only — 2 hrs; NO new topics; good sleep",
], bg=GOLD_LT, border=GOLD, title_bg=GOLD))
story.append(Spacer(1, 0.3*cm))

story.append(info_box("Viva / Practical Tips", [
    "Always start viva answer with a definition — shows confidence and buys thinking time",
    "For specimen identification: describe colour, size, consistency, surface, cut section, then name",
    "SWEAT formula for wound description: Size, Weight/depth, Edges, Associated findings, Track",
    "Know Galton's 16 points for fingerprint evidence and how DNA fingerprinting works",
    "If asked about a poison in viva — immediately state the antidote (shows applied knowledge)",
    "Quote IPC sections confidently — even if unsure of exact section, stating the concept is valued",
    "For preserved specimens — never handle without permission; describe systematically",
], bg=GREEN_LT, border=GREEN, title_bg=GREEN))
story.append(PageBreak())

# ═════════════════════════════════════════════════════════════════════════════
# WEEKLY TRACKER
# ═════════════════════════════════════════════════════════════════════════════
story.append(banner("12.  Weekly Topic Tracker & Checklist", bg=NAVY))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph("Tick each box as you complete the topic. Use ✓ = done, R = revised, P = practice answer written.", NOTE))
story.append(Spacer(1, 0.2*cm))

tracker_topics = {
    "WEEK 1 — Death & PM Changes": [
        "Definition & types of death", "Signs of death", "Algor mortis", "Rigor mortis",
        "Cadaveric spasm", "Livor mortis", "Putrefaction", "Adipocere", "Mummification", "Maceration",
    ],
    "WEEK 2 — Identification": [
        "Unknown body identification", "Age — teeth (eruption chart)", "Age — bones (epiphyseal fusion)",
        "Sex determination", "Fingerprints + Galton's points", "DNA fingerprinting",
        "Virginity + hymen types", "Pregnancy signs (medicolegal)", "Stature + race estimation",
    ],
    "WEEK 3 — Wounds & Autopsy": [
        "Wound classification + AM vs PM", "Incised wound", "Contused wound", "Lacerated wound",
        "Stab wound", "Firearm wounds (entry vs exit)", "Chop + bite + defense wounds",
        "Age of injury", "Medicolegal autopsy procedure", "PM report writing", "Exhumation",
    ],
    "WEEK 4 — Asphyxia, Burns, Sexual Offences": [
        "Asphyxia — types + general PM signs", "Tardieu spots", "Hanging (features + PM)",
        "Strangulation — ligature + manual", "Drowning + Diatom test", "Smothering + traumatic asphyxia",
        "Hanging vs Strangulation (comparison)", "Burns — degrees + types", "Heat-related deaths",
        "Rape — IPC 375 + examination", "POCSO Act",
    ],
    "WEEK 5 — Medical Jurisprudence": [
        "Consent — all types + valid consent", "Medical negligence + IPC 304A",
        "Contributory negligence + vicarious liability", "Consumer Protection Act",
        "MTP Act", "PCPNDT Act", "Mental Health Act", "Dying declaration",
        "Inquest — police vs magistrate", "Notifiable diseases",
    ],
    "WEEK 6 — MLC, Ethics, Special Topics": [
        "MLC — procedure + documentation", "Wound certificate writing",
        "Drunkenness examination + IPC 510", "Age estimation for legal purposes",
        "Criminal responsibility + IPC 84", "McNaughton rules",
        "Infanticide + Battered baby syndrome", "Dowry death IPC 304B + 498A",
        "Medical ethics + Euthanasia", "Transplantation of Human Organs Act",
    ],
    "WEEK 7 — Toxicology Part 1": [
        "General toxicology + definitions", "Organophosphorus poisoning",
        "Alcohol — acute + chronic + medicolegal", "Corrosive acids (H₂SO₄, HCl, HNO₃)",
        "Corrosive alkalis", "Arsenic — acute + chronic + Marsh test",
        "Lead poisoning + Burton's line", "Mercury + Minamata disease",
        "Opioids (Opium/Morphine/Heroin)", "Barbiturates + Benzodiazepines", "Cannabis",
    ],
    "WEEK 8 — Toxicology Part 2 + Revision": [
        "Snake bite — haemotoxic + neurotoxic", "Datura (anticholinergic)",
        "Aconite", "Nux vomica (Strychnine)", "Carbon monoxide",
        "Cyanide", "Kerosene/petroleum", "Food poisoning (Salmonella + Botulism)",
        "Paracetamol overdose", "REVISION CYCLE — Module 1", "REVISION CYCLE — Module 2",
        "REVISION CYCLE — Module 3", "REVISION CYCLE — Module 4", "Mock exam attempt",
    ],
}

for week_title, topics in tracker_topics.items():
    # Header
    wh = Table([[Paragraph(f"<b>{week_title}</b>",
                            S(fontSize=9, textColor=WHITE, fontName="Helvetica-Bold", spaceAfter=0))]],
               colWidths=[CW])
    wh.setStyle(TableStyle([
        ("BACKGROUND",   (0,0),(-1,-1), TEAL),
        ("TOPPADDING",   (0,0),(-1,-1), 5),
        ("BOTTOMPADDING",(0,0),(-1,-1), 5),
        ("LEFTPADDING",  (0,0),(-1,-1), 8),
        ("RIGHTPADDING", (0,0),(-1,-1), 8),
    ]))
    story.append(wh)

    # 3-column grid of topics with checkbox columns
    rows = []
    for i in range(0, len(topics), 3):
        chunk = topics[i:i+3]
        while len(chunk) < 3:
            chunk.append("")
        row = []
        for topic in chunk:
            if topic:
                row.append(Paragraph(f"☐  {topic}", TINY))
            else:
                row.append(Paragraph("", TINY))
        rows.append(row)

    check_t = Table(rows, colWidths=[5.5*cm, 5.5*cm, 5.5*cm])
    check_t.setStyle(TableStyle([
        ("ROWBACKGROUNDS",(0,0),(-1,-1), [GREY_LT, WHITE]),
        ("GRID",          (0,0),(-1,-1), 0.2, GREY_MID),
        ("TOPPADDING",    (0,0),(-1,-1), 4),
        ("BOTTOMPADDING", (0,0),(-1,-1), 4),
        ("LEFTPADDING",   (0,0),(-1,-1), 6),
        ("RIGHTPADDING",  (0,0),(-1,-1), 4),
        ("VALIGN",        (0,0),(-1,-1), "TOP"),
    ]))
    story.append(check_t)
    story.append(Spacer(1, 0.2*cm))

story.append(Spacer(1, 0.5*cm))
story.append(Paragraph(
    "<i>Source references: Krishan Vij — Textbook of Forensic Medicine &amp; Toxicology  ·  "
    "Modi's Medical Jurisprudence  ·  Narayan Reddy — Essentials of Forensic Medicine</i>",
    S(fontSize=7.5, textColor=GREY_DK, alignment=TA_CENTER, fontName="Helvetica-Oblique")
))

# ── BUILD ─────────────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    leftMargin=1.5*cm,
    rightMargin=1.5*cm,
    topMargin=1.5*cm,
    bottomMargin=1.8*cm,
    title="FMT 2-Month Study Plan — Forensic Medicine & Toxicology",
    author="Orris Medical AI",
    subject="Forensic Medicine & Toxicology Study Plan",
)
doc.build(story, canvasmaker=NC)
print(f"PDF saved → {OUTPUT}")
Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.
This is a shared conversation. Sign in to Orris to start your own chat.