important topics of community medicine in relation to neet pg and the topics with hightest numberofpyqs

Searching the Web

NEET PG community medicine important topics highest PYQs frequency 2024 2025

Reading File
Reading Web Page

https://www.diginerve.com/blogs/community-medicine-rapid-rev…

Here is a complete, exam-focused breakdown of Community Medicine (PSM) for NEET PG - organized by PYQ frequency and importance:

Community Medicine - NEET PG: Topics by PYQ Frequency

Community Medicine carries approximately 25 marks in NEET PG. Questions are fact-based, formula-based, program-based, and case-scenario-based. Below are the topics ranked by how often they appear in PYQs.

TIER 1 - Highest PYQ Frequency (Most Repeated)

1. Epidemiology

Most tested area overall. Expect 5-8 questions per exam.
  • Measures of disease frequency: Incidence, Prevalence, Attack Rate, Secondary Attack Rate
  • Measures of association: Relative Risk (RR), Odds Ratio (OR), Attributable Risk, Population Attributable Risk
  • Causality criteria: Bradford Hill criteria (especially temporality, strength, consistency, biological gradient)
  • Study designs (very high yield):
    • Case-control vs Cohort - which measure each gives
    • RCT - randomization, blinding (single, double, triple)
    • Cross-sectional, Ecological studies
    • Bias types: Selection bias, Information bias, Confounding
  • Screening: Sensitivity, Specificity, PPV, NPV, ROC curves, lead-time bias, length bias
  • Outbreak investigation steps (classic PYQ)
  • R0 (basic reproduction number), herd immunity threshold

2. Biostatistics

Highly scoring if formulas are memorized. 4-6 questions per exam.
  • Normal distribution (mean = median = mode), skewed distributions
  • Standard deviation, Standard Error, Confidence Intervals
  • Tests of significance (very high yield):
    • Student's t-test (paired vs unpaired)
    • Chi-square test (when to use, degrees of freedom)
    • ANOVA, Mann-Whitney U, Kruskal-Wallis (non-parametric)
    • Z-test
  • P-value interpretation, Type I error (alpha), Type II error (beta)
  • Correlation and Regression - Pearson vs Spearman
  • Sensitivity/Specificity calculations (also in epidemiology)
  • Sample size determination
  • Kappa statistic (inter-rater reliability)

3. Vaccines and Immunisation

Single highest-yield chapter in terms of direct, easy marks. 4-6 questions per exam.
  • UIP (Universal Immunization Programme) - complete schedule with ages
  • Cold chain: temperature for vaccines, ILR, deep freezer, cold boxes
  • VVM (Vaccine Vial Monitor) color change
  • OPV vs IPV differences
  • BCG - dose, site, age, PPD test
  • Measles, MMR, MR vaccine - schedule
  • Hepatitis B - schedule, doses
  • COVID-19, HPV, Rotavirus, PCV vaccines - recent additions
  • Reverse cold chain concept
  • AEFI (Adverse Events Following Immunisation)
  • Live vs killed vaccines (classic MCQ)

4. National Health Programs

Repeatedly asked every year. 4-6 questions per exam. Focus on targets, indicators, and launch years.
  • RNTCP / NTP (TB): DOTS, NIKSHAY, treatment categories, drug regimens (2HRZE/4HR), MDR-TB definition
  • NVBDCP (Malaria, Filaria, Kala-azar, Dengue): API, ABER, SPR targets, elimination targets
  • RMNCH+A: ANC visits (4 per WHO, earlier 3 per GOI), Iron-Folic acid doses
  • Janani Suraksha Yojana (JSY): BPL eligibility, cash amounts
  • PMSMA: Pradhan Mantri Suraksha Matritva Abhiyan - 9th of every month
  • NHM / NRHM / NHPM (Ayushman Bharat)
  • ASHA - role, incentives
  • Blindness Control Programme: NPCB targets
  • Mental Health Programme: NMHP

5. Communicable Diseases

High yield for transmission, incubation, prevention questions. 4-5 questions per exam.
  • Malaria: P. falciparum vs P. vivax, cerebral malaria, drug resistance, ACT regimen
  • Tuberculosis: Mantoux test interpretation, BCG efficacy, DOTS directly observed therapy
  • Typhoid: Widal test (O and H titres), Rose spots, Carriers
  • Cholera: El Tor biotype, rice-water stools, ORT (ORS composition)
  • HIV/AIDS: Window period, CD4 count thresholds, PMTCT, ART protocols
  • Leprosy: Classification (PB vs MB), MDT drugs, reactions, disability grading
  • Filariasis: Vector (Culex), DEC prophylaxis, lymphedema
  • Kala-azar: Sandfly vector, visceral vs cutaneous, SSG treatment
  • Rabies: Furious vs paralytic, PEP protocol, HRIG, vaccine schedule
  • Plague: Bubonic/Pneumonic/Septicemic, streptomycin treatment

TIER 2 - High PYQ Frequency

6. Demography and Family Planning

  • Demographic indicators: CDR, CBR, TFR, NRR, GRR, IMR, MMR, NMR, U5MR
  • Demographic transition theory - 4 stages (very common MCQ)
  • Fertility measures: GFR, ASFR, TFR
  • Family planning methods:
    • OCP mechanisms (estrogen + progesterone)
    • IUCD: Cu-T 380A (10 yrs), LNG-IUS
    • Sterilisation: Minilap, Laparoscopic, Vasectomy
    • Emergency contraception (within 72 hrs, 120 hrs for Cu-T)
  • Census data (India 2011 - last census used in exams): population, literacy, sex ratio
  • Maternal mortality ratio vs rate distinction

7. Nutrition

  • Nutritional deficiencies (classic table questions):
    • Vitamin A: Bitot's spots, Xerophthalmia, Keratomalacia
    • Vitamin D: Rickets, Craniotabes, Bowlegs
    • Vitamin C: Scurvy, Perifollicular hemorrhages
    • Vitamin B12/Folate: Megaloblastic anemia
    • Iron: IDA - ICDS programme, Anganwadi
    • Iodine: Goiter, Cretinism
  • PEM (Protein Energy Malnutrition): Kwashiorkor vs Marasmus differences
  • ICDS programme: beneficiaries, services (6 services)
  • Mid-day meal scheme, POSHAN Abhiyaan
  • Dietary reference values: RDA, EAR, UL
  • Nutritional assessment methods (anthropometry): MUAC, Z-scores, IAP classification

8. Screening and Surveillance

  • Wilson and Jungner criteria for screening (10 criteria)
  • Types of screening: Mass, Selective, Multiphasic
  • Sensitivity vs Specificity trade-off
  • Predictive values and their dependence on prevalence
  • Disease surveillance: Active vs Passive, Sentinel surveillance
  • IDSP (Integrated Disease Surveillance Programme) - S, P, L forms

9. Health Planning and Management

  • Bhore Committee (1946) - health centre concept
  • Mudaliar Committee, Shrivastav Committee
  • Lalonde model (health field concept): 4 determinants
  • Alma Ata Declaration (1978): Primary Health Care - 8 elements
  • Primary Health Centre (PHC): population served (30,000 rural), beds, staff
  • Community Health Centre (CHC): 4 specialists (FOG + M + P + S mnemonic)
  • Sub-centre: 5,000 population, ANM
  • District hospital functions
  • Health for All by 2000 (Alma Ata) - classic MCQ

TIER 3 - Moderate-High Frequency

10. Environmental Health

  • Water: Per capita requirement (40 L/day minimum acceptable, 70 L/day for health), WHO standards, MPN test, Coliform bacteria
  • Water purification: Chlorination (0.5 mg/L residual), Rapid sand filter, Slow sand filter
  • Sewage: BOD, COD, coliform count
  • Air pollution: PM2.5, PM10, CO, SO2, NO2 - indoor vs outdoor
  • Noise pollution: Safe limit 90 dB (8 hrs), 65 dB (residential)
  • Housing: Ventilation, Dunham's formula, Lux standards

11. Occupational Health

  • Pneumoconioses: Silicosis (quartz/silica), Coal worker's, Asbestosis (mesothelioma risk)
  • Occupational cancers: Skin (arsenic), bladder (aniline dyes), lung (asbestos/chromium)
  • Heavy metals: Lead (Burton's line, basophilic stippling), Mercury (Minamata, Mad Hatter), Arsenic (Mees' lines)
  • Factory Act provisions: working hours, rest periods
  • ILO definition of occupational disease

12. Non-Communicable Diseases

  • Hypertension: JNC criteria (now AHA 2017 - Stage 1 ≥130/80 vs JNC 7 ≥140/90)
  • Diabetes: WHO criteria - FPG ≥126, OGTT ≥200, HbA1c ≥6.5%
  • NCD risk factors: STEPS survey, NFHS data
  • Cancer screening: PAP smear (cervical), FNAC, mammography (breast)
  • Obesity: BMI cut-offs (Asian Indians: overweight ≥23, obese ≥25)

Quick PYQ Frequency Summary Table

TopicPYQ FrequencyApprox. Qs/Exam
Epidemiology (study designs, measures)⭐⭐⭐⭐⭐5-8
Biostatistics⭐⭐⭐⭐⭐4-6
Vaccines and Immunisation⭐⭐⭐⭐⭐4-6
National Health Programs⭐⭐⭐⭐⭐4-6
Communicable Diseases⭐⭐⭐⭐4-5
Demography and Family Planning⭐⭐⭐⭐3-4
Nutrition⭐⭐⭐⭐3-4
Screening and Surveillance⭐⭐⭐2-3
Health Planning (PHC, committees)⭐⭐⭐2-3
Environmental Health⭐⭐⭐2-3
Occupational Health⭐⭐1-2
NCDs⭐⭐1-2

Top 10 Specific Subtopics with Highest PYQ Repetition

  1. Sensitivity, Specificity, PPV, NPV calculations - appears almost every year
  2. Vaccine schedule (UIP) and cold chain - 1-2 Qs every year
  3. DOTS/RNTCP regimens and definitions (MDR, XDR, pre-XDR) - every year
  4. Odds Ratio vs Relative Risk - which study gives which measure
  5. Bradford Hill criteria for causality
  6. Demographic transition stages
  7. Types of bias in study designs
  8. Wilson-Jungner screening criteria
  9. Chi-square test applications and degrees of freedom
  10. ORS composition (Na, K, glucose, citrate concentrations)

Revision Strategy

  • Start with: Vaccines + Biostatistics formulas + Epidemiology measures - these give the quickest returns
  • Use tables: For nutritional deficiencies, occupational diseases, communicable disease vectors
  • Memorize numbers: Population norms for PHC/CHC/Sub-centre, census 2011 figures, vaccine ages
  • Do PYQs topic-wise after each chapter - this subject heavily rewards direct recall
  • National Health Program updates change yearly - verify targets against the latest NHP guidelines before the exam

Create a summary document with all formulas & calculations for Community Medicine

Asking for Preferences
Reading File
Running Command

ls /home/daytona/workspace/ 2>/dev/null && mkdir -p /home/daytona/workspace/comm-med-pdf

Writing File

~/comm-med-pdf/generate_pdf.py

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

OUTPUT = "/home/daytona/workspace/comm-med-pdf/CommunityMedicine_Formulas.pdf"

# ─── Colour palette ─────────────────────────────────────────────────────────
C_DARK   = colors.HexColor("#1a237e")   # deep navy
C_MID    = colors.HexColor("#283593")   # medium navy
C_LIGHT  = colors.HexColor("#e8eaf6")   # lavender tint (section bg)
C_ACC    = colors.HexColor("#e53935")   # red accent (formula highlight)
C_GREEN  = colors.HexColor("#2e7d32")   # green for normal values
C_ORANGE = colors.HexColor("#e65100")   # orange for key numbers
C_WHITE  = colors.white
C_GRAY   = colors.HexColor("#eceff1")   # light gray rows
C_DGRAY  = colors.HexColor("#546e7a")   # dark gray text

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

def S(name, **kw):
    return ParagraphStyle(name, **kw)

TITLE_S   = S("TitleS",   fontName="Helvetica-Bold",   fontSize=22, textColor=C_WHITE,   alignment=TA_CENTER, spaceAfter=4)
SUBTITLE_S= S("SubS",     fontName="Helvetica",         fontSize=11, textColor=C_WHITE,   alignment=TA_CENTER, spaceAfter=2)
CH_S      = S("ChS",      fontName="Helvetica-Bold",   fontSize=13, textColor=C_WHITE,   alignment=TA_LEFT,   spaceBefore=10, spaceAfter=6, leftIndent=6)
SEC_S     = S("SecS",     fontName="Helvetica-Bold",   fontSize=10, textColor=C_DARK,    spaceBefore=8, spaceAfter=3, leftIndent=4)
BODY_S    = S("BodyS",    fontName="Helvetica",         fontSize=9,  textColor=colors.black, leading=14, spaceAfter=2)
FORM_S    = S("FormS",    fontName="Helvetica-BoldOblique", fontSize=9.5, textColor=C_ACC, leading=14, spaceAfter=1, leftIndent=8)
NOTE_S    = S("NoteS",    fontName="Helvetica-Oblique", fontSize=8.5, textColor=C_DGRAY, leading=12, spaceAfter=1, leftIndent=8)
BULLET_S  = S("BulletS",  fontName="Helvetica",         fontSize=9,  textColor=colors.black, leading=13, spaceAfter=1, leftIndent=16, bulletIndent=8)
HEAD_S    = S("HeadS",    fontName="Helvetica-Bold",   fontSize=9,  textColor=C_DARK,    leading=12)
CELL_S    = S("CellS",    fontName="Helvetica",         fontSize=8.5,textColor=colors.black, leading=12)
CELLB_S   = S("CellBS",   fontName="Helvetica-Bold",   fontSize=8.5,textColor=C_DARK,    leading=12)
FORM2_S   = S("Form2S",   fontName="Courier-Bold",      fontSize=9,  textColor=C_ACC,    leading=13)

W = A4[0] - 2*cm  # usable width

def chapter_header(title, subtitle=""):
    rows = [[Paragraph(title, CH_S)]]
    if subtitle:
        rows.append([Paragraph(subtitle, SUBTITLE_S)])
    t = Table(rows, colWidths=[W])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), C_DARK),
        ("ROWBACKGROUNDS", (0,0), (-1,-1), [C_DARK]),
        ("TOPPADDING",  (0,0), (-1,-1), 7),
        ("BOTTOMPADDING",(0,0),(-1,-1), 7),
        ("LEFTPADDING", (0,0), (-1,-1), 10),
        ("BOX", (0,0), (-1,-1), 1, C_MID),
    ]))
    return t

def section_box(title):
    t = Table([[Paragraph(title, SEC_S)]], colWidths=[W])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), C_LIGHT),
        ("TOPPADDING",  (0,0), (-1,-1), 4),
        ("BOTTOMPADDING",(0,0),(-1,-1), 4),
        ("LEFTPADDING", (0,0), (-1,-1), 8),
        ("BOX", (0,0), (-1,-1), 0.5, C_DARK),
    ]))
    return t

def formula_box(text):
    t = Table([[Paragraph(text, FORM2_S)]], colWidths=[W])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), colors.HexColor("#fff3e0")),
        ("TOPPADDING",  (0,0), (-1,-1), 5),
        ("BOTTOMPADDING",(0,0),(-1,-1), 5),
        ("LEFTPADDING", (0,0), (-1,-1), 12),
        ("BOX", (0,0), (-1,-1), 1, C_ORANGE),
        ("ROUNDEDCORNERS", [3]),
    ]))
    return t

def two_col_table(headers, rows, col_ratios=None):
    if col_ratios is None:
        col_ratios = [0.45, 0.55]
    cw = [W*r for r in col_ratios]
    data = [[Paragraph(h, CELLB_S) for h in headers]]
    for r in rows:
        data.append([Paragraph(str(c), CELL_S) for c in r])
    t = Table(data, colWidths=cw)
    ts = TableStyle([
        ("BACKGROUND",    (0,0),(-1,0),  C_DARK),
        ("TEXTCOLOR",     (0,0),(-1,0),  C_WHITE),
        ("FONTNAME",      (0,0),(-1,0),  "Helvetica-Bold"),
        ("FONTSIZE",      (0,0),(-1,-1), 8.5),
        ("ROWBACKGROUNDS",(0,1),(-1,-1), [C_WHITE, C_GRAY]),
        ("GRID",          (0,0),(-1,-1), 0.4, colors.HexColor("#b0bec5")),
        ("TOPPADDING",    (0,0),(-1,-1), 4),
        ("BOTTOMPADDING", (0,0),(-1,-1), 4),
        ("LEFTPADDING",   (0,0),(-1,-1), 6),
        ("VALIGN",        (0,0),(-1,-1), "MIDDLE"),
    ])
    t.setStyle(ts)
    return t

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

# ─── Page numbering ───────────────────────────────────────────────────────────
class NumberedCanvas(canvas.Canvas):
    def __init__(self, *args, **kwargs):
        canvas.Canvas.__init__(self, *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)
            canvas.Canvas.showPage(self)
        canvas.Canvas.save(self)

    def draw_page_number(self, page_count):
        self.setFont("Helvetica", 8)
        self.setFillColor(C_DGRAY)
        self.drawRightString(A4[0]-1.5*cm, 1*cm,
                             f"Page {self._pageNumber} of {page_count}")
        self.drawString(1.5*cm, 1*cm,
                        "Community Medicine – Formulas & Calculations  |  NEET PG")
        self.setStrokeColor(colors.HexColor("#b0bec5"))
        self.line(1.5*cm, 1.3*cm, A4[0]-1.5*cm, 1.3*cm)

# ═══════════════════════════════════════════════════════════════════════════════
#  BUILD DOCUMENT
# ═══════════════════════════════════════════════════════════════════════════════
def build():
    doc = SimpleDocTemplate(
        OUTPUT, pagesize=A4,
        leftMargin=1*cm, rightMargin=1*cm,
        topMargin=1.5*cm, bottomMargin=2*cm,
        title="Community Medicine – Formulas & Calculations",
        author="NEET PG Revision"
    )
    story = []

    # ── COVER ─────────────────────────────────────────────────────────────────
    story.append(Spacer(1, 40))
    cover = Table([
        [Paragraph("COMMUNITY MEDICINE", S("C1", fontName="Helvetica-Bold", fontSize=30,
                   textColor=C_WHITE, alignment=TA_CENTER))],
        [Paragraph("Formulas, Calculations & Key Numbers", S("C2", fontName="Helvetica",
                   fontSize=15, textColor=colors.HexColor("#c5cae9"), alignment=TA_CENTER))],
        [Spacer(1, 8)],
        [Paragraph("NEET PG  |  Complete Revision Reference", S("C3", fontName="Helvetica-Oblique",
                   fontSize=11, textColor=colors.HexColor("#90a4ae"), alignment=TA_CENTER))],
    ], colWidths=[W])
    cover.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), C_DARK),
        ("TOPPADDING",  (0,0), (-1,-1), 16),
        ("BOTTOMPADDING",(0,0),(-1,-1), 16),
        ("BOX", (0,0), (-1,-1), 2, C_ACC),
    ]))
    story.append(cover)
    story.append(Spacer(1, 20))

    # quick index box
    idx_data = [[Paragraph("Quick Index", CELLB_S)],
                [Paragraph("1. Epidemiology Measures  2. Biostatistics  3. Demography & Vital Statistics"
                           "  4. Family Planning  5. Nutrition  6. Environmental Health"
                           "  7. Communicable Diseases  8. Screening  9. Health Planning"
                           "  10. Occupational Health  11. Miscellaneous Key Numbers", CELL_S)]]
    idx_t = Table(idx_data, colWidths=[W])
    idx_t.setStyle(TableStyle([
        ("BACKGROUND", (0,0),(0,0), C_MID),
        ("TEXTCOLOR",  (0,0),(0,0), C_WHITE),
        ("BACKGROUND", (0,1),(0,1), C_GRAY),
        ("TOPPADDING",  (0,0),(-1,-1), 6),
        ("BOTTOMPADDING",(0,0),(-1,-1), 6),
        ("LEFTPADDING", (0,0),(-1,-1), 10),
        ("BOX", (0,0),(-1,-1), 0.5, C_DARK),
    ]))
    story.append(idx_t)
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # 1. EPIDEMIOLOGY
    # ══════════════════════════════════════════════════════════════════════════
    story.append(chapter_header("1. EPIDEMIOLOGY MEASURES", "Measures of Frequency, Association & Impact"))
    story.append(sp(6))

    story.append(section_box("1.1  Measures of Disease Frequency"))
    story.append(sp(4))
    story.append(formula_box("Incidence Rate = (New cases in period / Population at risk × Average time) × 10^n"))
    story.append(sp(3))
    story.append(formula_box("Prevalence (Point) = (Existing cases at a point / Total population) × 100 (or 10^n)"))
    story.append(sp(3))
    story.append(formula_box("Period Prevalence = (Cases existing during period / Average population) × 10^n"))
    story.append(sp(3))
    story.append(formula_box("Attack Rate (AR) = (Cases during outbreak / Population exposed) × 100"))
    story.append(sp(3))
    story.append(formula_box("Secondary Attack Rate (SAR) = (New cases in contacts / Susceptible contacts) × 100"))
    story.append(sp(3))
    story.append(Paragraph(
        "<b>Relationship:</b>  Prevalence ≈ Incidence × Duration of Disease  "
        "(valid when prevalence is low &lt; 10% and disease is in steady state)",
        NOTE_S))
    story.append(sp(8))

    story.append(section_box("1.2  Measures of Association"))
    story.append(sp(4))
    epi_assoc = two_col_table(
        ["Measure", "Formula"],
        [
            ["Relative Risk (RR)  [Cohort]",
             "RR = (Incidence in Exposed) / (Incidence in Unexposed)\n= [a/(a+b)] / [c/(c+d)]"],
            ["Odds Ratio (OR)  [Case-Control]",
             "OR = (a×d) / (b×c)   — using 2×2 table"],
            ["Attributable Risk (AR / EER-CER)",
             "AR = Incidence (Exposed) – Incidence (Unexposed)  = a/(a+b) – c/(c+d)"],
            ["Attributable Risk %  (ARP)",
             "ARP = [(Ie – Iu) / Ie] × 100  =  [(RR–1)/RR] × 100"],
            ["Population Attributable Risk (PAR)",
             "PAR = I(total population) – I(unexposed)"],
            ["PAR%",
             "PAR% = PAR / I(total) × 100  =  [P(RR–1)] / [P(RR–1)+1] × 100\n(P = prevalence of exposure in population)"],
            ["Number Needed to Treat (NNT)",
             "NNT = 1 / Absolute Risk Reduction  =  1 / (CER – EER)"],
            ["Number Needed to Harm (NNH)",
             "NNH = 1 / Attributable Risk  =  1 / (EER – CER)"],
        ]
    )
    story.append(epi_assoc)
    story.append(sp(6))

    story.append(Paragraph("<b>2×2 Contingency Table:</b>", HEAD_S))
    story.append(sp(3))
    ct = Table([
        ["", Paragraph("<b>Disease +</b>", CELLB_S), Paragraph("<b>Disease −</b>", CELLB_S), Paragraph("<b>Total</b>", CELLB_S)],
        [Paragraph("<b>Exposed +</b>", CELLB_S), "a", "b", "a+b"],
        [Paragraph("<b>Exposed −</b>", CELLB_S), "c", "d", "c+d"],
        [Paragraph("<b>Total</b>", CELLB_S),    "a+c", "b+d", "N"],
    ], colWidths=[W*0.25]*4)
    ct.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,0), C_DARK), ("TEXTCOLOR", (0,0), (-1,0), C_WHITE),
        ("BACKGROUND", (0,0), (0,-1), C_DARK), ("TEXTCOLOR", (0,0), (0,-1), C_WHITE),
        ("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#b0bec5")),
        ("ALIGN", (0,0), (-1,-1), "CENTER"),
        ("FONTNAME", (1,1), (-1,-1), "Courier-Bold"),
        ("FONTSIZE", (0,0), (-1,-1), 9),
        ("ROWBACKGROUNDS", (1,1), (-1,-1), [C_WHITE, C_GRAY]),
        ("TOPPADDING", (0,0), (-1,-1), 5), ("BOTTOMPADDING", (0,0), (-1,-1), 5),
    ]))
    story.append(ct)
    story.append(sp(8))

    story.append(section_box("1.3  Herd Immunity Threshold"))
    story.append(sp(4))
    story.append(formula_box("Herd Immunity Threshold (HIT) = 1 – (1/R₀)  ×100%"))
    story.append(formula_box("Critical Vaccination Coverage = 1 – (1/R₀)"))
    story.append(sp(3))
    herd = two_col_table(
        ["Disease", "R₀ (Basic Reproduction Number)", "HIT (%)"],
        [
            ["Measles",    "12–18",   "92–95%"],
            ["Mumps",      "4–7",     "75–86%"],
            ["Polio",      "5–7",     "80–86%"],
            ["Smallpox",   "5–7",     "80–86%"],
            ["COVID-19 (original)", "2–3", "50–67%"],
            ["Influenza",  "2–3",     "50–67%"],
        ],
        [0.33, 0.33, 0.34]
    )
    story.append(herd)
    story.append(sp(8))

    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # 2. BIOSTATISTICS
    # ══════════════════════════════════════════════════════════════════════════
    story.append(chapter_header("2. BIOSTATISTICS FORMULAS", "Tests, Measures & Distributions"))
    story.append(sp(6))

    story.append(section_box("2.1  Measures of Central Tendency & Dispersion"))
    story.append(sp(4))
    story.append(formula_box("Mean (x̄) = Σx / n"))
    story.append(formula_box("Variance (s²) = Σ(x – x̄)² / (n–1)"))
    story.append(formula_box("Standard Deviation (SD) = √[Σ(x–x̄)² / (n–1)]"))
    story.append(formula_box("Standard Error of Mean (SEM) = SD / √n"))
    story.append(formula_box("95% Confidence Interval = x̄ ± 1.96 × SEM"))
    story.append(formula_box("99% Confidence Interval = x̄ ± 2.58 × SEM"))
    story.append(sp(4))
    story.append(Paragraph(
        "<b>Normal distribution:</b>  Mean = Median = Mode  |  "
        "±1SD covers 68.2%  |  ±2SD covers 95.4%  |  ±3SD covers 99.7% of data",
        NOTE_S))
    story.append(sp(8))

    story.append(section_box("2.2  Tests of Significance"))
    story.append(sp(4))
    sig_table = two_col_table(
        ["Test", "When to Use / Formula"],
        [
            ["Student's t-test (unpaired)", "Compare means of 2 independent groups; parametric; normal distribution\n  t = (x̄₁ – x̄₂) / SE(diff)"],
            ["Student's t-test (paired)", "Compare means within same group (before/after); parametric"],
            ["Chi-square (χ²) test", "Compare proportions / categorical data\n  χ² = Σ[(O–E)²/E]   |  df = (rows–1)(cols–1)"],
            ["ANOVA (F-test)", "Compare means of ≥3 independent groups; parametric"],
            ["Z-test", "Large samples (n>30), known population SD\n  z = (x̄ – μ) / (σ/√n)"],
            ["Mann-Whitney U test", "Non-parametric alternative to unpaired t-test"],
            ["Wilcoxon signed-rank", "Non-parametric alternative to paired t-test"],
            ["Kruskal-Wallis test", "Non-parametric alternative to ANOVA"],
            ["Fisher's exact test", "Chi-square when expected cell count <5"],
            ["McNemar's test", "Paired proportions (matched case-control)"],
        ]
    )
    story.append(sig_table)
    story.append(sp(6))

    story.append(section_box("2.3  Correlation & Regression"))
    story.append(sp(4))
    story.append(formula_box("Pearson's r = Σ[(xi–x̄)(yi–ȳ)] / √[Σ(xi–x̄)² × Σ(yi–ȳ)²]   (parametric)"))
    story.append(formula_box("Spearman's ρ = 1 – [6×Σd²] / [n(n²–1)]   (non-parametric, ranked data)"))
    story.append(formula_box("Linear Regression: y = a + bx   (b = slope,  a = intercept)"))
    story.append(formula_box("Coefficient of Determination = r²   (% variation explained)"))
    story.append(sp(4))
    story.append(Paragraph(
        "<b>r value interpretation:</b>  0.0–0.2 negligible  |  0.2–0.4 weak  |  "
        "0.4–0.6 moderate  |  0.6–0.8 strong  |  0.8–1.0 very strong",
        NOTE_S))
    story.append(sp(8))

    story.append(section_box("2.4  Error Types & Sample Size"))
    story.append(sp(4))
    err_table = two_col_table(
        ["Term", "Definition / Formula"],
        [
            ["Type I Error (α)", "Reject true null hypothesis (false positive)\n  Typically α = 0.05 (5%)"],
            ["Type II Error (β)", "Fail to reject false null hypothesis (false negative)\n  Typically β = 0.20 (20%)"],
            ["Power of study (1–β)", "Probability of detecting true effect  =  1 – β  =  80–90%"],
            ["p-value", "p < 0.05 → statistically significant (reject H₀)"],
            ["Sample size formula (means)", "n = (Z_α + Z_β)² × 2σ² / (μ₁–μ₂)²"],
            ["Sample size formula (proportions)", "n = Z² × p(1–p) / d²   (d = allowable error)"],
            ["Kappa (κ) statistic", "Inter-rater agreement beyond chance\n  κ = (Po – Pe) / (1 – Pe)\n  κ>0.8 almost perfect, 0.6–0.8 substantial"],
        ]
    )
    story.append(err_table)
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # 3. DEMOGRAPHY & VITAL STATISTICS
    # ══════════════════════════════════════════════════════════════════════════
    story.append(chapter_header("3. DEMOGRAPHY & VITAL STATISTICS", "Rates, Ratios & Indices"))
    story.append(sp(6))

    story.append(section_box("3.1  Mortality Rates"))
    story.append(sp(4))
    mort = two_col_table(
        ["Rate / Ratio", "Formula"],
        [
            ["Crude Death Rate (CDR)", "(Total deaths in year / Mid-year population) × 1000"],
            ["Cause-Specific Death Rate", "(Deaths due to cause X / Mid-year population) × 100,000"],
            ["Case Fatality Rate (CFR)", "(Deaths due to disease / Cases of disease) × 100"],
            ["Proportionate Mortality Rate (PMR)", "(Deaths from cause X / Total deaths) × 100"],
            ["Standardised Mortality Ratio (SMR)", "Observed deaths / Expected deaths × 100"],
            ["Maternal Mortality Ratio (MMRatio)", "(Maternal deaths / Live births) × 100,000"],
            ["Maternal Mortality Rate (MMRate)", "(Maternal deaths / Women 15–49 yrs) × 100,000"],
            ["Infant Mortality Rate (IMR)", "(Deaths <1 yr / Live births) × 1000"],
            ["Neonatal MR (NMR)", "(Deaths 0–28 days / Live births) × 1000"],
            ["Post-neonatal MR", "(Deaths 28d–1yr / Live births) × 1000"],
            ["Perinatal MR", "(Stillbirths + Deaths <7 days / Stillbirths + Live births) × 1000"],
            ["Under-5 MR (U5MR)", "(Deaths <5 yrs / Live births) × 1000"],
        ]
    )
    story.append(mort)
    story.append(sp(6))

    story.append(Paragraph("<b>India Key Values (2024 estimates):</b>  IMR ~28  |  NMR ~20  |  MMR ~97/100,000  |  U5MR ~31  |  CDR ~7.4  |  CBR ~19.5  |  TFR ~2.0", NOTE_S))
    story.append(sp(8))

    story.append(section_box("3.2  Fertility Rates"))
    story.append(sp(4))
    fert = two_col_table(
        ["Rate", "Formula"],
        [
            ["Crude Birth Rate (CBR)",    "(Live births in year / Mid-year population) × 1000"],
            ["General Fertility Rate (GFR)", "(Live births / Women 15–49 yrs) × 1000"],
            ["Age-Specific Fertility Rate (ASFR)", "(Live births to women age x / Women age x) × 1000"],
            ["Total Fertility Rate (TFR)", "Sum of all ASFRs × 5  (5-yr age groups)\n  Replacement level TFR = 2.1"],
            ["Gross Reproduction Rate (GRR)", "Sum of female ASFRs × 5  (female births only)"],
            ["Net Reproduction Rate (NRR)", "GRR × survival factor to reproductive age\n  NRR = 1 means replacement; >1 growing; <1 declining"],
        ]
    )
    story.append(fert)
    story.append(sp(8))

    story.append(section_box("3.3  Population Growth & Life Tables"))
    story.append(sp(4))
    story.append(formula_box("Natural Growth Rate = CBR – CDR  (per 1000)"))
    story.append(formula_box("Doubling Time (Rule of 70) = 70 / Annual growth rate (%)"))
    story.append(formula_box("Sex Ratio (India definition) = Females per 1000 males"))
    story.append(formula_box("Dependency Ratio = (Population <15 + >64) / (Population 15–64) × 100"))
    story.append(formula_box("Literacy Rate = (Literate population ≥7 yrs / Total population ≥7 yrs) × 100"))
    story.append(sp(4))
    demo_vals = two_col_table(
        ["India Census 2011 (Last Census)", "Value"],
        [
            ["Total Population",         "1.21 billion"],
            ["Decadal Growth Rate",       "17.7%"],
            ["Sex Ratio",                 "940 females/1000 males"],
            ["Child Sex Ratio (0–6 yrs)", "914 females/1000 males"],
            ["Literacy Rate",             "74.04% (Male 82%, Female 65.5%)"],
            ["Population Density",        "382/km²"],
        ]
    )
    story.append(demo_vals)
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # 4. FAMILY PLANNING
    # ══════════════════════════════════════════════════════════════════════════
    story.append(chapter_header("4. FAMILY PLANNING & CONTRACEPTION", "Efficacy Measures & Key Formulas"))
    story.append(sp(6))

    story.append(section_box("4.1  Contraceptive Efficacy"))
    story.append(sp(4))
    story.append(formula_box("Pearl Index = (Number of accidental pregnancies × 1200) / (Total months of exposure)"))
    story.append(formula_box("Pearl Index = (Failures / Woman-years of exposure) × 100"))
    story.append(sp(4))
    story.append(Paragraph("<b>Lower Pearl Index = More effective method</b>", NOTE_S))
    story.append(sp(6))

    pearl = two_col_table(
        ["Contraceptive Method", "Pearl Index (typical use)"],
        [
            ["Combined OCP",         "0.3–8"],
            ["Progestin-only pill",   "0.5–10"],
            ["IUCD (Cu-T 380A)",      "0.6–0.8"],
            ["LNG-IUS (Mirena)",      "0.1–0.2"],
            ["Male condom",           "2–18"],
            ["Female condom",         "5–21"],
            ["Diaphragm + spermicide","6–16"],
            ["Male sterilisation",    "0.1"],
            ["Female sterilisation",  "0.5"],
            ["LAM (Lactational AM)",  "0.5–2 (if criteria met)"],
            ["No method",             "~85"],
        ]
    )
    story.append(pearl)
    story.append(sp(8))

    story.append(section_box("4.2  Emergency Contraception"))
    story.append(sp(4))
    ec = two_col_table(
        ["Method", "Timing & Dose"],
        [
            ["Levonorgestrel (LNG)", "1.5 mg single dose within 72 hours"],
            ["Combined ECP (Yuzpe)", "0.1 mg EE + 0.5 mg LNG × 2 doses, 12 hrs apart, within 72 hrs"],
            ["Ulipristal acetate",   "30 mg single dose within 120 hours"],
            ["Cu-T IUCD",            "Within 5 days of unprotected intercourse – most effective ECP"],
            ["Mifepristone",         "10–25 mg within 72 hours"],
        ]
    )
    story.append(ec)
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # 5. NUTRITION
    # ══════════════════════════════════════════════════════════════════════════
    story.append(chapter_header("5. NUTRITION", "Indices, Requirements & Calculations"))
    story.append(sp(6))

    story.append(section_box("5.1  Anthropometric Indices"))
    story.append(sp(4))
    story.append(formula_box("BMI = Weight (kg) / Height² (m²)"))
    story.append(formula_box("Ponderal Index = Height (cm) / ∛Weight (kg)"))
    story.append(formula_box("Waist-Hip Ratio (WHR): Obesity if >0.9 (male), >0.85 (female)"))
    story.append(formula_box("Weight-for-Height Z-score = (Observed – Median reference) / SD of reference"))
    story.append(formula_box("MUAC: <115 mm = SAM  |  115–125 mm = MAM  |  >125 mm = Normal (children 6–59 mo)"))
    story.append(sp(6))

    bmi_t = two_col_table(
        ["BMI (kg/m²)", "Classification (WHO / Asian Indians in brackets)"],
        [
            ["<18.5",            "Underweight"],
            ["18.5–24.9  [18.5–22.9]", "Normal"],
            ["25.0–29.9  [23–24.9]",   "Overweight (Pre-obese)"],
            ["≥30.0  [≥25]",           "Obese"],
            ["30–34.9  [25–29.9]",     "Obese Class I"],
            ["35–39.9  [30–34.9]",     "Obese Class II"],
            ["≥40  [≥35]",             "Obese Class III (Morbid)"],
        ]
    )
    story.append(bmi_t)
    story.append(sp(8))

    story.append(section_box("5.2  Malnutrition Classification"))
    story.append(sp(4))
    maln = two_col_table(
        ["Classification System", "Criteria"],
        [
            ["IAP Classification (Gomez – modified)", "Grade I: 71–80% expected weight\nGrade II: 61–70%\nGrade III: 51–60%\nGrade IV: <50%"],
            ["Waterlow Classification", "Wasting: weight-for-height (acute)\nStunting: height-for-age (chronic)"],
            ["Wellcome Trust Classification", "Based on % weight for age + oedema:\n  Marasmus: <60%, no oedema\n  Kwashiorkor: 60–80%, oedema\n  Marasmic-Kwashiorkor: <60%, oedema\n  Undernutrition: 60–80%, no oedema"],
            ["SAM (WHO 2006)", "WHZ <-3SD  OR  MUAC <115 mm  OR  bilateral pitting oedema"],
            ["MAM", "WHZ -2 to -3SD  OR  MUAC 115–125 mm"],
        ]
    )
    story.append(maln)
    story.append(sp(8))

    story.append(section_box("5.3  Caloric Requirements & Food Composition"))
    story.append(sp(4))
    story.append(formula_box("Energy: Carbohydrate = 4 kcal/g  |  Protein = 4 kcal/g  |  Fat = 9 kcal/g  |  Alcohol = 7 kcal/g"))
    story.append(formula_box("Basal Metabolic Rate (BMR) – Harris-Benedict:\n  Men:   BMR = 66 + (13.7×W) + (5×H) – (6.8×A)\n  Women: BMR = 655 + (9.6×W) + (1.8×H) – (4.7×A)  [W=kg, H=cm, A=years]"))
    story.append(formula_box("ICMR Daily Protein Requirement:  Sedentary adult = 0.8–1 g/kg/day"))
    story.append(sp(4))
    cal = two_col_table(
        ["Group", "Caloric Requirement (ICMR)"],
        [
            ["Sedentary adult male",       "2320 kcal/day"],
            ["Sedentary adult female",      "1900 kcal/day"],
            ["Pregnant woman (extra)",      "+350 kcal/day (2nd & 3rd trimester)"],
            ["Lactating woman (0–6 mo)",    "+600 kcal/day"],
            ["Child 1–3 years",             "1060 kcal/day"],
            ["Child 7–9 years",             "1690–1950 kcal/day"],
        ]
    )
    story.append(cal)
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # 6. ENVIRONMENTAL HEALTH
    # ══════════════════════════════════════════════════════════════════════════
    story.append(chapter_header("6. ENVIRONMENTAL HEALTH", "Water, Air, Sanitation & Housing Standards"))
    story.append(sp(6))

    story.append(section_box("6.1  Water Standards & Calculations"))
    story.append(sp(4))
    story.append(formula_box("Residual Chlorine (after contact time) = Initial Cl₂ – Chlorine demand"))
    story.append(formula_box("Chlorine Demand = Cl₂ added – Residual Cl₂"))
    story.append(formula_box("Horrock's test: measures presence of residual chlorine (NOT quantitative)"))
    story.append(sp(4))
    water = two_col_table(
        ["Parameter", "Standard / Value"],
        [
            ["Minimum per capita water (WHO)", "20 L/day (survival)"],
            ["Acceptable minimum (WHO)",        "50 L/day"],
            ["Desirable (urban India)",          "135–150 L/day (CPHEEO)"],
            ["Residual chlorine (tap)",          "0.2–0.5 mg/L (WHO: 0.2 min)"],
            ["pH of drinking water",             "6.5–8.5"],
            ["Turbidity",                        "<1 NTU (treated), <4 NTU (acceptable)"],
            ["Total dissolved solids (TDS)",     "<500 mg/L (desirable), <2000 mg/L (permissible)"],
            ["Nitrates",                         "<45 mg/L (methaemoglobinaemia risk in infants)"],
            ["Fluoride",                         "0.5–1.5 mg/L (WHO); >1.5 = fluorosis risk"],
            ["Arsenic",                          "<0.01 mg/L (WHO)"],
            ["MPN (Coliform – drinking water)",  "0/100 mL (must be zero)"],
            ["BOD of clean water",               "<1 mg/L; raw sewage ~300 mg/L"],
        ]
    )
    story.append(water)
    story.append(sp(6))

    story.append(section_box("6.2  Air Pollution Standards (NAAQS India)"))
    story.append(sp(4))
    air = two_col_table(
        ["Pollutant", "24-hr Standard (Annual in brackets)"],
        [
            ["PM10",   "100 μg/m³  (60 μg/m³)"],
            ["PM2.5",  "60 μg/m³   (40 μg/m³)"],
            ["SO₂",    "80 μg/m³   (50 μg/m³)"],
            ["NO₂",    "80 μg/m³   (40 μg/m³)"],
            ["CO",     "4000 μg/m³ / 8 hr  (2000 μg/m³ / 1 hr)"],
            ["Ozone",  "100 μg/m³ / 8 hr"],
            ["Lead",   "0.5 μg/m³  annual"],
        ]
    )
    story.append(air)
    story.append(sp(6))

    story.append(section_box("6.3  Housing & Noise Standards"))
    story.append(sp(4))
    story.append(formula_box("Dunham's Formula: Minimum window area = 1/10th of floor area (for light & ventilation)"))
    story.append(formula_box("Air space per person (hospital ward) = 28.3 m³ (1000 cubic feet)"))
    story.append(formula_box("Noise: Permissible occupational exposure = 90 dB (A) for 8 hrs/day"))
    story.append(sp(4))
    noise_t = two_col_table(
        ["Setting", "Permissible Noise Level"],
        [
            ["Industrial area (day)",    "75 dB"],
            ["Commercial area (day)",    "65 dB"],
            ["Residential area (day)",   "55 dB"],
            ["Silence zone (hospital)",  "50 dB day / 40 dB night"],
            ["Threshold of pain",        "120–140 dB"],
            ["Occupational (8 hrs)",     "90 dB (OSHA); 85 dB (WHO)"],
        ]
    )
    story.append(noise_t)
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # 7. COMMUNICABLE DISEASES – KEY NUMBERS
    # ══════════════════════════════════════════════════════════════════════════
    story.append(chapter_header("7. COMMUNICABLE DISEASES", "Incubation Periods, Indices & Thresholds"))
    story.append(sp(6))

    story.append(section_box("7.1  Vector Control Indices (Mosquito Surveillance)"))
    story.append(sp(4))
    story.append(formula_box("House Index (HI) = (Houses with Aedes larvae / Houses inspected) × 100"))
    story.append(formula_box("Breteau Index (BI) = (Containers with Aedes larvae / Houses inspected) × 100  [Best index]"))
    story.append(formula_box("Container Index (CI) = (Containers with larvae / Containers inspected) × 100"))
    story.append(formula_box("Stegomyia Index = HI (Aedes aegypti specific) – threshold <1 to prevent dengue"))
    story.append(sp(4))
    story.append(formula_box("Annual Parasite Incidence (API) = (Positive blood smears × 1000) / Population surveyed"))
    story.append(formula_box("Annual Blood Examination Rate (ABER) = (Blood smears × 100) / Population  [Target ≥10%]"))
    story.append(formula_box("Slide Positivity Rate (SPR) = (Positive slides / Slides examined) × 100"))
    story.append(formula_box("Slide Falciparum Rate (SFR) = (P. falciparum positive / Slides examined) × 100"))
    story.append(sp(8))

    story.append(section_box("7.2  Key Incubation Periods"))
    story.append(sp(4))
    inc = two_col_table(
        ["Disease", "Incubation Period"],
        [
            ["Cholera",         "Few hours – 5 days (usually 1–2 days)"],
            ["Typhoid",         "10–14 days (range 1–3 weeks)"],
            ["Hepatitis A",     "15–45 days (average 28 days)"],
            ["Hepatitis B",     "45–180 days (average 60–90 days)"],
            ["Hepatitis E",     "15–60 days (average 40 days)"],
            ["Measles",         "10–14 days (rash: 14 days)"],
            ["Chickenpox",      "14–21 days"],
            ["Mumps",           "12–25 days"],
            ["Rubella",         "14–21 days"],
            ["Polio",           "7–14 days (paralytic: 3–35 days)"],
            ["Rabies",          "2–8 weeks (can be months/years)"],
            ["Tetanus",         "3–21 days"],
            ["Malaria (P.v/P.o)","8–17 days"],
            ["Malaria (P.f)",   "7–14 days"],
            ["Dengue",          "4–7 days"],
            ["HIV",             "Window period: 3 weeks–3 months (NAT: 11 days)"],
            ["Plague (bubonic)","2–6 days"],
            ["Meningococcal",   "2–10 days"],
        ]
    )
    story.append(inc)
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # 8. SCREENING
    # ══════════════════════════════════════════════════════════════════════════
    story.append(chapter_header("8. SCREENING – VALIDITY & RELIABILITY", "Sensitivity, Specificity, Predictive Values"))
    story.append(sp(6))

    story.append(section_box("8.1  Core Formulas from 2×2 Table"))
    story.append(sp(4))
    story.append(Paragraph("<b>Screening 2×2 Table:</b>  TP = True Positive, FP = False Positive, FN = False Negative, TN = True Negative", NOTE_S))
    story.append(sp(4))
    story.append(formula_box("Sensitivity = TP / (TP + FN) × 100   [Ability to detect disease – 'positivity in disease']"))
    story.append(formula_box("Specificity = TN / (TN + FP) × 100   [Ability to exclude disease – 'negativity in health']"))
    story.append(formula_box("Positive Predictive Value (PPV) = TP / (TP + FP) × 100"))
    story.append(formula_box("Negative Predictive Value (NPV) = TN / (TN + FN) × 100"))
    story.append(formula_box("False Positive Rate = FP / (FP + TN) = 1 – Specificity"))
    story.append(formula_box("False Negative Rate = FN / (FN + TP) = 1 – Sensitivity"))
    story.append(formula_box("Accuracy = (TP + TN) / (TP + TN + FP + FN) × 100"))
    story.append(formula_box("Likelihood Ratio Positive (LR+) = Sensitivity / (1 – Specificity)"))
    story.append(formula_box("Likelihood Ratio Negative (LR–) = (1 – Sensitivity) / Specificity"))
    story.append(formula_box("Youden's Index = Sensitivity + Specificity – 1   [Best cutoff = Youden's J maximised]"))
    story.append(sp(6))

    story.append(section_box("8.2  Effect of Prevalence on PPV/NPV"))
    story.append(sp(4))
    story.append(Paragraph(
        "PPV INCREASES as disease prevalence increases (same test in high-prevalence population = higher PPV).  "
        "NPV INCREASES as prevalence decreases.  "
        "<b>Sensitivity and Specificity are NOT affected by prevalence</b> — they are intrinsic test properties.",
        NOTE_S))
    story.append(sp(8))

    story.append(section_box("8.3  Serial vs Parallel Testing"))
    story.append(sp(4))
    testing = two_col_table(
        ["Testing Strategy", "Effect"],
        [
            ["Parallel (simultaneous) testing", "Both tests done together\n  → Sensitivity increases, Specificity decreases\n  → Fewer false negatives; more false positives\n  → Use when: high sensitivity needed (emergency, rule OUT)"],
            ["Serial (sequential) testing", "Second test done only if first is positive\n  → Specificity increases, Sensitivity decreases\n  → Fewer false positives\n  → Use when: high specificity needed (rule IN, costly treatment)"],
        ]
    )
    story.append(testing)
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # 9. HEALTH PLANNING
    # ══════════════════════════════════════════════════════════════════════════
    story.append(chapter_header("9. HEALTH PLANNING & MANAGEMENT", "Infrastructure Norms & Key Committees"))
    story.append(sp(6))

    story.append(section_box("9.1  Health Infrastructure Population Norms (Rural – India)"))
    story.append(sp(4))
    infra = two_col_table(
        ["Facility", "Population Served", "Beds", "Key Staff"],
        [
            ["Sub-centre (SC)",          "5,000 (3,000 hilly/tribal)", "0", "1 ANM + 1 MPW (M)"],
            ["Primary Health Centre (PHC)", "30,000 (20,000 hilly)", "6 beds", "Medical Officer + 14 staff"],
            ["Community Health Centre (CHC)", "1,20,000 (80,000 hilly)", "30 beds", "4 specialists: surgeon, physician, OBG, paediatrician"],
            ["Sub-District/Sub-Divisional Hospital", "5–6 lakh", "31–100 beds", "Specialist services"],
            ["District Hospital", "10–12 lakh", ">100 beds", "Full specialist care"],
        ],
        [0.28, 0.22, 0.15, 0.35]
    )
    story.append(infra)
    story.append(sp(8))

    story.append(section_box("9.2  Key Health Indices & Targets"))
    story.append(sp(4))
    idx = two_col_table(
        ["Index / Target", "Value / Definition"],
        [
            ["Human Development Index (HDI)", "Composite of life expectancy, education, per capita income\n  India rank: ~134 (2023)"],
            ["Physical Quality of Life Index (PQLI)", "Mean of life expectancy, infant mortality, literacy (0–100 scale)"],
            ["Health Adjusted Life Expectancy (HALE)", "Years of full health expected (< Life expectancy)"],
            ["DALY (Disability Adjusted Life Year)", "DALY = YLL + YLD\n  YLL = Years of Life Lost due to premature mortality\n  YLD = Years of Life lived with Disability"],
            ["QALY (Quality Adjusted Life Year)", "QALY = years × utility score (0=death, 1=perfect health)"],
            ["Life Expectancy at birth (India 2021)", "~70.4 years (M: 68.6, F: 71.4)"],
            ["Dependency Ratio (India 2011)",          "~55"],
        ]
    )
    story.append(idx)
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # 10. OCCUPATIONAL HEALTH
    # ══════════════════════════════════════════════════════════════════════════
    story.append(chapter_header("10. OCCUPATIONAL HEALTH", "Exposure Limits & Key Measures"))
    story.append(sp(6))

    story.append(section_box("10.1  Exposure Limit Concepts"))
    story.append(sp(4))
    occ = two_col_table(
        ["Term", "Definition"],
        [
            ["TLV-TWA (Threshold Limit Value – Time Weighted Average)",
             "Concentration for 8 hrs/day, 40 hrs/week that nearly all workers can be repeatedly exposed to without adverse effects"],
            ["TLV-STEL (Short-Term Exposure Limit)",
             "15-minute TWA exposure; should not exceed 4 times/day with ≥60 min between"],
            ["TLV-C (Ceiling value)",
             "Concentration that should NEVER be exceeded even momentarily"],
            ["Permissible Exposure Limit (PEL)",
             "OSHA legally enforceable version of TLV-TWA"],
            ["IDLH (Immediately Dangerous to Life or Health)",
             "Maximum concentration from which one could escape in 30 min without impairment"],
        ]
    )
    story.append(occ)
    story.append(sp(6))

    story.append(section_box("10.2  Key Occupational Exposure Values"))
    story.append(sp(4))
    occ2 = two_col_table(
        ["Substance / Agent", "TLV-TWA / Key Threshold"],
        [
            ["Silica (free crystalline)",  "0.025 mg/m³ (respirable)"],
            ["Asbestos",                   "0.1 fibres/mL (OSHA PEL)"],
            ["Lead (air)",                 "0.05 mg/m³"],
            ["Blood lead level (concern)", ">5 μg/dL (CDC children); >25 μg/dL (adults)"],
            ["CO (occupational)",          "25 ppm TWA (ACGIH)"],
            ["Noise (8-hr)",               "85–90 dB(A)"],
            ["Mercury (elemental vapour)", "0.025 mg/m³"],
            ["Benzene",                    "0.5 ppm (ACGIH); causes leukaemia"],
        ]
    )
    story.append(occ2)
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # 11. MISCELLANEOUS KEY NUMBERS
    # ══════════════════════════════════════════════════════════════════════════
    story.append(chapter_header("11. MISCELLANEOUS KEY NUMBERS & QUICK REFERENCE", ""))
    story.append(sp(6))

    story.append(section_box("11.1  ORS Composition (WHO 2003 – Reduced Osmolarity)"))
    story.append(sp(4))
    ors = two_col_table(
        ["Component", "Concentration (mmol/L)", "Grams per litre"],
        [
            ["Sodium chloride (NaCl)",  "65 (Na⁺)",   "2.6 g"],
            ["Trisodium citrate",        "10 (Citrate)","2.9 g"],
            ["Potassium chloride (KCl)", "20 (K⁺)",    "1.5 g"],
            ["Glucose (anhydrous)",      "75",          "13.5 g"],
            ["Total osmolarity",         "245 mOsm/L",  "—"],
        ],
        [0.40, 0.30, 0.30]
    )
    story.append(ors)
    story.append(sp(6))

    story.append(section_box("11.2  Vaccine Storage Temperatures"))
    story.append(sp(4))
    vacc = two_col_table(
        ["Vaccine / Equipment", "Storage Temperature"],
        [
            ["OPV",                           "–15 to –25°C (freeze)"],
            ["BCG, MMR, Measles, Varicella",  "+2 to +8°C (ILR)"],
            ["Hepatitis B, DPT, DT, Td, IPV", "+2 to +8°C (NEVER freeze)"],
            ["Ice-lined refrigerator (ILR)",  "+2 to +8°C"],
            ["Deep Freezer (DF)",             "–15 to –25°C"],
            ["Cold Box (with ice packs)",     "Up to 3 days maintenance"],
            ["VVM type 14 (OPV)",             "Colour change: square darker than circle = discard"],
        ]
    )
    story.append(vacc)
    story.append(sp(6))

    story.append(section_box("11.3  National Programme Key Targets (India)"))
    story.append(sp(4))
    prog = two_col_table(
        ["Programme / Indicator", "Target / Key Value"],
        [
            ["RNTCP – Treatment Success Rate (DS-TB)", "≥85%"],
            ["RNTCP – DOTS therapy (DS-TB)",           "2HRZE / 4HR (6 months total)"],
            ["TB Elimination Target",                   "By 2025 (India), By 2030 (SDG)"],
            ["Malaria Elimination Target",              "By 2030 (API <1/1000)"],
            ["Leprosy Elimination",                     "<1 case/10,000 population (achieved nationally 2005)"],
            ["TT eradication",                          "Neonatal tetanus elimination <1 case/1000 live births"],
            ["Polio",                                   "Eradicated in India (last case 2011)"],
            ["IMR target (NHP 2017)",                   "<28 by 2025"],
            ["MMR target (NHP 2017)",                   "<100 by 2020"],
            ["TFR target",                              "2.1 (replacement level)"],
            ["ANC visits (WHO 2016)",                   "≥8 contacts"],
            ["Institutional deliveries target",         "≥90% (NHP 2017)"],
            ["Full immunisation coverage (NHP 2017)",   "≥90%"],
        ]
    )
    story.append(prog)
    story.append(sp(6))

    story.append(section_box("11.4  Key Statistical Thresholds"))
    story.append(sp(4))
    stat_t = two_col_table(
        ["Threshold / Criterion", "Value"],
        [
            ["Significance level (α)",                "0.05 (5%)"],
            ["p-value for significance",              "p < 0.05"],
            ["95% CI z-value",                        "1.96"],
            ["99% CI z-value",                        "2.58"],
            ["Kappa: Substantial agreement",          "0.61–0.80"],
            ["Kappa: Almost perfect",                 ">0.80"],
            ["Cronbach's alpha (reliability)",        ">0.70 acceptable"],
            ["Normal distribution: ±1 SD",            "68.27%"],
            ["Normal distribution: ±2 SD",            "95.45%"],
            ["Normal distribution: ±3 SD",            "99.73%"],
            ["Median in normal distribution",         "= Mean = Mode"],
            ["Positively skewed: order",              "Mean > Median > Mode"],
            ["Negatively skewed: order",              "Mean < Median < Mode"],
        ]
    )
    story.append(stat_t)
    story.append(sp(6))

    story.append(section_box("11.5  Important Health Definitions (WHO)"))
    story.append(sp(4))
    defs = [
        ("<b>Health (WHO 1948):</b> Complete physical, mental and social well-being, not merely absence of disease.", BODY_S),
        ("<b>Primary Prevention:</b> Action taken prior to onset of disease (health promotion + specific protection).", BODY_S),
        ("<b>Secondary Prevention:</b> Early detection + prompt treatment (screening, diagnosis).", BODY_S),
        ("<b>Tertiary Prevention:</b> Disability limitation + rehabilitation.", BODY_S),
        ("<b>Endemic:</b> Constant presence of disease in a geographic area at expected rate.", BODY_S),
        ("<b>Epidemic:</b> Disease occurrence clearly in excess of normal expectancy.", BODY_S),
        ("<b>Pandemic:</b> Epidemic occurring worldwide or over a very wide area.", BODY_S),
        ("<b>Incubation period:</b> Time from exposure to first symptom.", BODY_S),
        ("<b>Generation time:</b> Time from infection in one host to infection in next host.", BODY_S),
        ("<b>Herd immunity:</b> Resistance of a population to spread of infection based on proportion immune.", BODY_S),
    ]
    for text, style in defs:
        story.append(Paragraph(text, style))
        story.append(sp(2))

    # ── FOOTER note ──────────────────────────────────────────────────────────
    story.append(sp(12))
    story.append(HRFlowable(width=W, thickness=0.5, color=C_DARK))
    story.append(sp(4))
    story.append(Paragraph(
        "This document covers all major formulas and key numbers in Community Medicine / PSM for NEET PG. "
        "Always cross-verify programme-specific numerical targets with the latest government notifications "
        "before the exam as these change periodically.",
        NOTE_S))

    doc.build(story, canvasmaker=NumberedCanvas)
    print("PDF generated:", OUTPUT)

build()
Running Command

cd /home/daytona/workspace/comm-med-pdf && python generate_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/comm-med-pdf/CommunityMedicine_Formulas.pdf

Your PDF is ready! Download it here:

CommunityMedicine Formulas

PDF Document · PDF


What's inside (11 sections, fully formatted with colour-coded tables):
SectionContent
1. EpidemiologyIncidence, Prevalence, AR, SAR, RR, OR, AR%, PAR, NNT, NNH, 2×2 table, Herd Immunity (R₀)
2. BiostatisticsMean/SD/SEM/CI formulas, all significance tests (t, χ², ANOVA, Mann-Whitney, Kappa), Correlation, Sample size, Type I/II errors
3. Demography & Vital StatisticsAll mortality rates (IMR, NMR, MMR, CDR, CFR, SMR, U5MR), fertility rates (CBR, GFR, TFR, GRR, NRR), India Census 2011 data
4. Family PlanningPearl Index formula + table for all methods, Emergency contraception timing
5. NutritionBMI classification (WHO + Asian Indian cutoffs), MUAC, SAM/MAM criteria, Wellcome/IAP/Waterlow classifications, caloric requirements
6. Environmental HealthWater standards (chlorine, pH, TDS, fluoride, coliform), air pollution NAAQS values, noise limits, Dunham's formula
7. Communicable DiseasesVector control indices (HI, BI, CI, API, ABER, SPR), incubation periods for 18 diseases
8. ScreeningSensitivity, Specificity, PPV, NPV, LR+/LR-, Youden's Index, parallel vs serial testing
9. Health PlanningPHC/CHC/Sub-centre population norms, DALY/QALY/HALE/PQLI/HDI definitions
10. Occupational HealthTLV-TWA, STEL, Ceiling values, key exposure thresholds for silica, lead, asbestos, noise
11. Quick ReferenceORS composition (WHO 2003), vaccine temperatures, national programme targets, statistical thresholds

Can you make short notes for community medicine for neet pg

Asking for Preferences
Writing File

~/comm-med-pdf/generate_notes.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
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, PageBreak, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.pdfgen import canvas

OUTPUT = "/home/daytona/workspace/comm-med-pdf/CommunityMedicine_ShortNotes.pdf"

# ── Palette ──────────────────────────────────────────────────────────────────
NAVY    = colors.HexColor("#1a237e")
MIDBLUE = colors.HexColor("#283593")
LBLUE   = colors.HexColor("#e8eaf6")
RED     = colors.HexColor("#b71c1c")
GREEN   = colors.HexColor("#1b5e20")
ORANGE  = colors.HexColor("#e65100")
TEAL    = colors.HexColor("#004d40")
PURPLE  = colors.HexColor("#4a148c")
LGRAY   = colors.HexColor("#eceff1")
DGRAY   = colors.HexColor("#546e7a")
WHITE   = colors.white
YELLOW  = colors.HexColor("#fff9c4")
LGREEN  = colors.HexColor("#e8f5e9")
LRED    = colors.HexColor("#ffebee")
LORANGE = colors.HexColor("#fff3e0")

W = A4[0] - 2*cm

def S(name, **kw):
    return ParagraphStyle(name, **kw)

# Style definitions
CH    = S("CH",  fontName="Helvetica-Bold",        fontSize=14, textColor=WHITE,  alignment=TA_LEFT,  spaceBefore=2, spaceAfter=2, leftIndent=8)
SH    = S("SH",  fontName="Helvetica-Bold",        fontSize=10, textColor=NAVY,   spaceBefore=6, spaceAfter=3, leftIndent=4)
BODY  = S("BD",  fontName="Helvetica",             fontSize=9,  textColor=colors.black, leading=14, spaceAfter=2)
BODB  = S("BDB", fontName="Helvetica-Bold",        fontSize=9,  textColor=colors.black, leading=14, spaceAfter=2)
BUL   = S("BUL", fontName="Helvetica",             fontSize=9,  textColor=colors.black, leading=13, spaceAfter=1, leftIndent=14, bulletIndent=4)
BULB  = S("BULB",fontName="Helvetica-Bold",        fontSize=9,  textColor=NAVY,         leading=13, spaceAfter=1, leftIndent=14, bulletIndent=4)
NOTE  = S("NT",  fontName="Helvetica-Oblique",     fontSize=8.5,textColor=DGRAY,  leading=12, spaceAfter=1)
IMP   = S("IMP", fontName="Helvetica-Bold",        fontSize=9,  textColor=RED,    leading=13, spaceAfter=2)
KNO   = S("KNO", fontName="Courier-Bold",          fontSize=9,  textColor=ORANGE, leading=13, spaceAfter=1, leftIndent=8)
CELL  = S("CE",  fontName="Helvetica",             fontSize=8.5,textColor=colors.black, leading=12)
CELLB = S("CEB", fontName="Helvetica-Bold",        fontSize=8.5,textColor=NAVY,   leading=12)
CELLA = S("CEA", fontName="Helvetica",             fontSize=8,  textColor=colors.black, leading=11)

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

def ch_header(num, title, subtitle=""):
    rows = [[Paragraph(f"{num}. {title}", CH)]]
    if subtitle:
        rows.append([Paragraph(subtitle, S("ST", fontName="Helvetica-Oblique", fontSize=9.5,
                    textColor=colors.HexColor("#c5cae9"), alignment=TA_LEFT, leftIndent=8))])
    t = Table(rows, colWidths=[W])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0),(-1,-1), NAVY),
        ("TOPPADDING",    (0,0),(-1,-1), 8),
        ("BOTTOMPADDING", (0,0),(-1,-1), 8),
        ("LEFTPADDING",   (0,0),(-1,-1), 10),
        ("BOX", (0,0),(-1,-1), 1.5, RED),
    ]))
    return t

def sec_box(title, color=LBLUE):
    t = Table([[Paragraph(title, SH)]], colWidths=[W])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0),(-1,-1), color),
        ("TOPPADDING",    (0,0),(-1,-1), 4),
        ("BOTTOMPADDING", (0,0),(-1,-1), 4),
        ("LEFTPADDING",   (0,0),(-1,-1), 8),
        ("BOX", (0,0),(-1,-1), 0.6, NAVY),
    ]))
    return t

def imp_box(text, bg=LORANGE):
    t = Table([[Paragraph(text, IMP)]], colWidths=[W])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0),(-1,-1), bg),
        ("TOPPADDING",    (0,0),(-1,-1), 5),
        ("BOTTOMPADDING", (0,0),(-1,-1), 5),
        ("LEFTPADDING",   (0,0),(-1,-1), 10),
        ("BOX", (0,0),(-1,-1), 1, RED),
    ]))
    return t

def tbl(headers, rows, ratios=None):
    if ratios is None:
        n = len(headers)
        ratios = [1/n]*n
    cw = [W*r for r in ratios]
    data = [[Paragraph(h, CELLB) for h in headers]]
    for r in rows:
        data.append([Paragraph(str(c), CELL) for c in r])
    t = Table(data, colWidths=cw)
    t.setStyle(TableStyle([
        ("BACKGROUND",    (0,0),(-1,0),  NAVY),
        ("TEXTCOLOR",     (0,0),(-1,0),  WHITE),
        ("FONTNAME",      (0,0),(-1,0),  "Helvetica-Bold"),
        ("FONTSIZE",      (0,0),(-1,-1), 8.5),
        ("ROWBACKGROUNDS",(0,1),(-1,-1), [WHITE, LGRAY]),
        ("GRID",          (0,0),(-1,-1), 0.4, colors.HexColor("#b0bec5")),
        ("TOPPADDING",    (0,0),(-1,-1), 4),
        ("BOTTOMPADDING", (0,0),(-1,-1), 4),
        ("LEFTPADDING",   (0,0),(-1,-1), 5),
        ("VALIGN",        (0,0),(-1,-1), "TOP"),
    ]))
    return t

def b(text): return f"<b>{text}</b>"
def i(text): return f"<i>{text}</i>"
def r(text): return f'<font color="#b71c1c"><b>{text}</b></font>'
def o(text): return f'<font color="#e65100"><b>{text}</b></font>'
def g(text): return f'<font color="#1b5e20"><b>{text}</b></font>'

# ── Page numbering ────────────────────────────────────────────────────────────
class NumberedCanvas(canvas.Canvas):
    def __init__(self, *args, **kwargs):
        canvas.Canvas.__init__(self, *args, **kwargs)
        self._saved = []
    def showPage(self):
        self._saved.append(dict(self.__dict__))
        self._startPage()
    def save(self):
        total = len(self._saved)
        for state in self._saved:
            self.__dict__.update(state)
            self.setFont("Helvetica", 8)
            self.setFillColor(DGRAY)
            self.drawRightString(A4[0]-1.5*cm, 0.8*cm, f"Page {self._pageNumber} of {total}")
            self.drawString(1.5*cm, 0.8*cm, "Community Medicine Short Notes  |  NEET PG")
            self.setStrokeColor(colors.HexColor("#b0bec5"))
            self.line(1.5*cm, 1.1*cm, A4[0]-1.5*cm, 1.1*cm)
            canvas.Canvas.showPage(self)
        canvas.Canvas.save(self)

# ═══════════════════════════════════════════════════════════════════════════════
def build():
    doc = SimpleDocTemplate(OUTPUT, pagesize=A4,
        leftMargin=1*cm, rightMargin=1*cm,
        topMargin=1.5*cm, bottomMargin=2*cm,
        title="Community Medicine Short Notes – NEET PG")
    story = []

    # ── COVER ────────────────────────────────────────────────────────────────
    story.append(sp(30))
    cover = Table([
        [Paragraph("COMMUNITY MEDICINE", S("C1", fontName="Helvetica-Bold", fontSize=28,
                   textColor=WHITE, alignment=TA_CENTER))],
        [Paragraph("Complete Short Notes for NEET PG", S("C2", fontName="Helvetica",
                   fontSize=14, textColor=colors.HexColor("#c5cae9"), alignment=TA_CENTER))],
        [sp(6)],
        [Paragraph("Epidemiology • Biostatistics • National Health Programs • Vaccines • Communicable Diseases\n"
                   "Demography • Nutrition • Environment • Occupational Health • Screening • Health Planning",
                   S("C3", fontName="Helvetica-Oblique", fontSize=9.5,
                   textColor=colors.HexColor("#90a4ae"), alignment=TA_CENTER))],
    ], colWidths=[W])
    cover.setStyle(TableStyle([
        ("BACKGROUND", (0,0),(-1,-1), NAVY),
        ("TOPPADDING",    (0,0),(-1,-1), 18),
        ("BOTTOMPADDING", (0,0),(-1,-1), 18),
        ("BOX", (0,0),(-1,-1), 2.5, RED),
    ]))
    story.append(cover)
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # CHAPTER 1 – EPIDEMIOLOGY
    # ══════════════════════════════════════════════════════════════════════════
    story.append(ch_header("1", "EPIDEMIOLOGY"))
    story.append(sp(6))

    story.append(sec_box("1.1 Definitions"))
    story.append(sp(4))
    for line in [
        b("Epidemiology:") + " Study of distribution and determinants of health-related states in populations, and application of this to control of health problems (Last, 2001)",
        b("Endemic:") + " Disease constantly present in a community at expected/baseline level",
        b("Epidemic:") + " Disease occurrence clearly in excess of normal expectancy in a community",
        b("Pandemic:") + " Epidemic occurring worldwide or over a very wide area crossing international boundaries",
        b("Outbreak:") + " Epidemic limited to a localised area",
        b("Cluster:") + " Aggregation of cases in a defined area and time period, whether or not disease exceeds expected numbers",
        b("Hyperendemic:") + " Constantly present at a high level in community",
        b("Holoendemic:") + " High prevalence; begins early in life; affects most of child population",
    ]:
        story.append(Paragraph("• " + line, BUL))
    story.append(sp(8))

    story.append(sec_box("1.2 Epidemiological Triad & Web of Causation"))
    story.append(sp(4))
    story.append(Paragraph(b("Epidemiological Triad:") + " Host + Agent + Environment (Gordons triad)", BODY))
    story.append(Paragraph(b("Web of Causation:") + " Mac Mahon & Pugh (1960) – multiple interacting causes", BODY))
    story.append(Paragraph(b("Wheel Model:") + " Genetic core + biological/social/physical environment", BODY))
    story.append(Paragraph(b("Iceberg Phenomenon:") + " Visible tip = clinical cases; submerged = subclinical/carrier/susceptible", BODY))
    story.append(sp(4))
    story.append(imp_box("★ Bradford Hill Criteria for Causality (9 criteria): Strength, Consistency, Specificity, Temporality (only ESSENTIAL criterion), Biological gradient (dose-response), Plausibility, Coherence, Experiment, Analogy"))
    story.append(sp(8))

    story.append(sec_box("1.3 Study Designs – Quick Comparison"))
    story.append(sp(4))
    story.append(tbl(
        ["Study Type", "Direction", "Measure", "Key Feature"],
        [
            ["Cross-sectional", "Snapshot", "Prevalence; Odds Ratio", "Cheap, quick; no causality; prevalence study"],
            ["Case-Control", "Backward (retrospective)", "Odds Ratio (OR)", "Rare diseases; quick; recall bias risk"],
            ["Cohort", "Forward (prospective)", "Relative Risk (RR), AR", "Best for incidence; expensive; loss to follow-up"],
            ["RCT", "Forward (experimental)", "RR, NNT, NNH", "Gold standard; randomisation eliminates confounding"],
            ["Ecological", "Group-level", "Ecological correlation", "Ecological fallacy risk; cannot infer individual causation"],
            ["Case report / Series", "Descriptive", "None", "Hypothesis generating; no control group"],
            ["Meta-analysis", "Systematic synthesis", "Pooled OR/RR", "Top of evidence hierarchy; publication bias risk"],
        ],
        [0.18, 0.18, 0.22, 0.42]
    ))
    story.append(sp(6))
    story.append(imp_box("Evidence Hierarchy: Systematic Review/Meta-analysis > RCT > Cohort > Case-Control > Cross-sectional > Case Report > Expert Opinion"))
    story.append(sp(8))

    story.append(sec_box("1.4 Bias Types"))
    story.append(sp(4))
    story.append(tbl(
        ["Bias", "Definition", "Study"],
        [
            ["Selection bias", "Systematic error in selecting study participants", "All"],
            ["Recall bias", "Cases remember exposure better than controls", "Case-control"],
            ["Interviewer/Observer bias", "Observer knows disease/exposure status", "All"],
            ["Lead-time bias", "Earlier detection makes survival appear longer (not truly)", "Screening"],
            ["Length bias", "Slowly progressive (less aggressive) disease detected more by screening", "Screening"],
            ["Neyman (Prevalence-incidence) bias", "Severe/fatal cases excluded as they die before study", "Cross-sectional"],
            ["Berkson's bias", "Hospital patients ≠ community; hospital-based controls", "Case-control"],
            ["Hawthorne effect", "Subjects change behavior when observed", "Experimental"],
            ["Protopathic bias", "Treatment given for early symptoms of undiagnosed disease", "Case-control"],
        ],
        [0.25, 0.45, 0.30]
    ))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # CHAPTER 2 – BIOSTATISTICS
    # ══════════════════════════════════════════════════════════════════════════
    story.append(ch_header("2", "BIOSTATISTICS"))
    story.append(sp(6))

    story.append(sec_box("2.1 Types of Data"))
    story.append(sp(4))
    story.append(tbl(
        ["Data Type", "Subtypes & Examples"],
        [
            ["Qualitative (Categorical)", "Nominal (blood group, sex – no order)\nOrdinal (mild/moderate/severe – ordered but unequal intervals)"],
            ["Quantitative (Numerical)", "Discrete (whole numbers: no. of children)\nContinuous (height, weight, BP – any value in range)"],
        ],
        [0.30, 0.70]
    ))
    story.append(sp(6))

    story.append(sec_box("2.2 Measures of Central Tendency"))
    story.append(sp(4))
    for line in [
        b("Mean:") + " Sum of all values / number of values. Affected by extreme values (outliers). Used with normally distributed data.",
        b("Median:") + " Middle value when arranged in order. Not affected by outliers. Best for skewed data.",
        b("Mode:") + " Most frequently occurring value. Used for categorical/nominal data.",
        b("Normal distribution:") + " Mean = Median = Mode. Bell-shaped, symmetrical.",
        b("Positive skew:") + " Tail to the right. Mean > Median > Mode.",
        b("Negative skew:") + " Tail to the left. Mean < Median < Mode.",
    ]:
        story.append(Paragraph("• " + line, BUL))
    story.append(sp(6))

    story.append(sec_box("2.3 Key Statistical Tests – When to Use"))
    story.append(sp(4))
    story.append(tbl(
        ["Scenario", "Parametric Test", "Non-parametric Equivalent"],
        [
            ["Compare means: 2 independent groups", "Unpaired t-test", "Mann-Whitney U test"],
            ["Compare means: 2 paired/matched groups", "Paired t-test", "Wilcoxon signed-rank test"],
            ["Compare means: ≥3 groups", "One-way ANOVA", "Kruskal-Wallis test"],
            ["Compare proportions (categorical)", "Chi-square (χ²)", "Fisher's exact (if expected <5)"],
            ["Paired proportions (matched)", "Paired t-test", "McNemar's test"],
            ["Correlation (2 continuous variables)", "Pearson's r", "Spearman's ρ"],
            ["Large samples (n>30, known SD)", "Z-test", "—"],
        ],
        [0.38, 0.32, 0.30]
    ))
    story.append(sp(4))
    story.append(imp_box("★ Chi-square needs: all expected cell frequencies ≥5. If not → use Fisher's exact test. For matched data → McNemar's test."))
    story.append(sp(8))

    story.append(sec_box("2.4 Normal Distribution – Key Values"))
    story.append(sp(4))
    story.append(tbl(
        ["Range from Mean", "% Data Included", "Application"],
        [
            ["Mean ± 1 SD", "68.27%", "—"],
            ["Mean ± 2 SD (1.96 SD)", "95.45% (95%)", "95% Confidence Interval"],
            ["Mean ± 3 SD (2.58 SD)", "99.73% (99%)", "99% Confidence Interval"],
        ]
    ))
    story.append(sp(6))

    story.append(sec_box("2.5 Important Concepts"))
    story.append(sp(4))
    for line in [
        b("p-value < 0.05") + " → statistically significant → reject null hypothesis (H₀)",
        b("Type I error (α):") + " Rejecting a TRUE null hypothesis (false positive). α = 0.05",
        b("Type II error (β):") + " Failing to reject a FALSE null hypothesis (false negative). β = 0.20",
        b("Power of study (1-β):") + " Probability of detecting a true effect = 80–90%",
        b("Confidence Interval (CI):") + " Range within which true population value lies 95% of the time. If 95% CI for OR/RR does NOT include 1 → statistically significant.",
        b("Kappa (κ):") + " Measures inter-rater agreement beyond chance. >0.80 = almost perfect; 0.61–0.80 = substantial; 0.41–0.60 = moderate",
        b("Cronbach's alpha:") + " Internal consistency/reliability of a scale. >0.70 = acceptable",
    ]:
        story.append(Paragraph("• " + line, BUL))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # CHAPTER 3 – SCREENING
    # ══════════════════════════════════════════════════════════════════════════
    story.append(ch_header("3", "SCREENING & SURVEILLANCE"))
    story.append(sp(6))

    story.append(sec_box("3.1 Wilson & Jungner Criteria for Screening (1968) – 10 Points"))
    story.append(sp(4))
    criteria = [
        "The condition sought should be an important health problem",
        "Natural history of the condition should be well understood",
        "There should be a recognizable latent or early symptomatic stage",
        "There should be a suitable test or examination",
        "The test should be acceptable to the population",
        "Adequate facilities for diagnosis and treatment should be available",
        "There should be an agreed policy on whom to treat as patients",
        "Treatment at the early stage should be of more benefit than treatment started later",
        "Cost of case-finding (including diagnosis and treatment) should be economically balanced",
        "Case-finding should be a continuing process",
    ]
    for i_n, c in enumerate(criteria, 1):
        story.append(Paragraph(f"{i_n}. {c}", BUL))
    story.append(sp(6))

    story.append(sec_box("3.2 Validity Measures"))
    story.append(sp(4))
    story.append(tbl(
        ["Measure", "Formula", "Mnemonic"],
        [
            ["Sensitivity (Sn)", "TP/(TP+FN) × 100", "PID = Positive In Disease (SnNout: Sensitive test, Negative result rules OUT)"],
            ["Specificity (Sp)", "TN/(TN+FP) × 100", "NIH = Negative In Health (SpPin: Specific test, Positive rules IN)"],
            ["PPV", "TP/(TP+FP) × 100", "Increases with higher prevalence"],
            ["NPV", "TN/(TN+FN) × 100", "Increases with lower prevalence"],
            ["Accuracy", "(TP+TN)/Total × 100", "—"],
            ["Youden's Index", "Sn + Sp − 1", "Best cutoff when Youden's J is maximum"],
        ],
        [0.22, 0.30, 0.48]
    ))
    story.append(sp(4))
    story.append(imp_box("★ Sensitivity & Specificity are INTRINSIC test properties – NOT affected by prevalence. PPV & NPV ARE affected by prevalence."))
    story.append(sp(6))

    story.append(sec_box("3.3 Serial vs Parallel Testing"))
    story.append(sp(4))
    story.append(tbl(
        ["", "Parallel (simultaneous)", "Serial (sequential)"],
        [
            ["Sensitivity", "INCREASES ↑", "DECREASES ↓"],
            ["Specificity", "DECREASES ↓", "INCREASES ↑"],
            ["False Positives", "More", "Fewer"],
            ["False Negatives", "Fewer", "More"],
            ["Use when", "Rule OUT disease (high Sn needed)\nEmergency, mass screening", "Rule IN disease (high Sp needed)\nCostly/risky treatment"],
        ],
        [0.20, 0.40, 0.40]
    ))
    story.append(sp(6))

    story.append(sec_box("3.4 Surveillance Systems in India"))
    story.append(sp(4))
    story.append(tbl(
        ["System", "Full Form", "Forms Used"],
        [
            ["IDSP", "Integrated Disease Surveillance Programme", "S-form (Syndromic – weekly, filled by health worker)\nP-form (Presumptive – weekly, filled by medical officer)\nL-form (Laboratory confirmed – weekly)"],
            ["NFHS", "National Family Health Survey", "Household survey; health, nutrition, population data"],
            ["SRS", "Sample Registration System", "Vital statistics (births, deaths); annual"],
            ["CRS", "Civil Registration System", "Mandatory registration of births and deaths"],
        ],
        [0.12, 0.30, 0.58]
    ))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # CHAPTER 4 – VACCINES & IMMUNISATION
    # ══════════════════════════════════════════════════════════════════════════
    story.append(ch_header("4", "VACCINES & IMMUNISATION"))
    story.append(sp(6))

    story.append(sec_box("4.1 UIP Schedule (Universal Immunization Programme) – India 2024"))
    story.append(sp(4))
    story.append(tbl(
        ["Age", "Vaccines Given"],
        [
            ["Birth (0)", "BCG + OPV-0 (birth dose) + Hep B-1"],
            ["6 weeks", "OPV-1 + IPV-1 + Penta-1 (DPT+HepB+Hib) + PCV-1 + Rota-1"],
            ["10 weeks", "OPV-2 + Penta-2 + PCV-2 + Rota-2"],
            ["14 weeks", "OPV-3 + IPV-2 + Penta-3 + PCV-3 + Rota-3"],
            ["9 months", "MR-1 + Vitamin A-1 (1 lakh IU) + JE-1 (endemic areas)"],
            ["12 months", "PCV Booster"],
            ["16–24 months", "MR-2 + OPV Booster + DPT Booster-1 + Vitamin A-2 + JE-2 (endemic)"],
            ["5–6 years", "DPT Booster-2"],
            ["10 years & 16 years", "Td (Tetanus-Diphtheria)"],
            ["Pregnant women", "TT-1 (early pregnancy) + TT-2 (4 weeks after TT-1)\nor Booster if received TT within 3 years"],
        ],
        [0.25, 0.75]
    ))
    story.append(sp(6))
    story.append(imp_box("★ Penta = DPT + Hep B + Hib (Haemophilus influenzae b)  |  PCV = Pneumococcal Conjugate Vaccine  |  JE = Japanese Encephalitis"))

    story.append(sp(6))
    story.append(sec_box("4.2 Live vs Killed Vaccines"))
    story.append(sp(4))
    story.append(tbl(
        ["Live Attenuated", "Killed/Inactivated"],
        [
            ["BCG, OPV, MMR, MR, Varicella, Yellow Fever, Typhoid (Ty21a oral), Rotavirus, JE (live)", "IPV, DPT, Hep A, Hep B, Rabies (PCEC), Influenza (injectable), Meningococcal, Pneumococcal (PPSV), JE (killed), Cholera (WC)"],
            ["Fewer doses needed (1–2)", "More doses needed (3+)"],
            ["Long-lasting immunity", "Shorter immunity; booster needed"],
            ["CONTRAINDICATED in immunocompromised", "Safe in immunocompromised"],
            ["Can cause disease (rare)", "Cannot cause disease"],
        ]
    ))
    story.append(sp(6))

    story.append(sec_box("4.3 Cold Chain"))
    story.append(sp(4))
    story.append(tbl(
        ["Equipment", "Temperature", "Vaccines Stored"],
        [
            ["Deep Freezer (DF)", "−15 to −25°C", "OPV only (store frozen)"],
            ["Ice-Lined Refrigerator (ILR)", "+2 to +8°C", "BCG, MMR, MR, Measles, and ALL others (never freeze Hep B, DPT)"],
            ["Cold Box (with ice packs)", "+2 to +8°C", "Transport; maintains for 2–3 days"],
            ["Vaccine Carrier (with ice packs)", "+2 to +8°C", "Field use; maintains for 4–6 hours"],
            ["ILR at PHC", "+2 to +8°C", "1-month stock"],
            ["Regional Vaccine Store", "−15 to −25°C (DF) or +2 to +8°C (ILR)", "3-month stock"],
        ],
        [0.30, 0.22, 0.48]
    ))
    story.append(sp(4))
    story.append(imp_box("★ VVM (Vaccine Vial Monitor): Square turns DARKER than surrounding circle = vaccine UNUSABLE. Colour change is irreversible. OPV uses VVM-7; DPT uses VVM-30."))
    story.append(sp(4))
    story.append(Paragraph(b("AEFI (Adverse Events Following Immunisation):") + " Any medical event following immunisation. Classified as: (1) Vaccine product-related reaction (2) Vaccine quality defect (3) Immunisation error-related (4) Immunisation anxiety-related (5) Coincidental event", BODY))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # CHAPTER 5 – NATIONAL HEALTH PROGRAMS
    # ══════════════════════════════════════════════════════════════════════════
    story.append(ch_header("5", "NATIONAL HEALTH PROGRAMMES"))
    story.append(sp(6))

    story.append(sec_box("5.1 TB – RNTCP / National TB Elimination Programme (NTEP)"))
    story.append(sp(4))
    story.append(tbl(
        ["Parameter", "Details"],
        [
            ["Current Programme", "NTEP (National TB Elimination Programme) – RNTCP renamed 2020"],
            ["Target", "TB elimination by 2025 (SDG target 2030); <1 case/million by 2035"],
            ["Treatment Strategy", "DOTS (Directly Observed Treatment Short-course)"],
            ["DS-TB regimen", "2HRZE / 4HR (6 months total)\nH=Isoniazid, R=Rifampicin, Z=Pyrazinamide, E=Ethambutol"],
            ["MDR-TB definition", "Resistant to at least INH + Rifampicin"],
            ["Pre-XDR TB", "MDR + resistant to any fluoroquinolone"],
            ["XDR-TB (old)", "MDR + FQ resistant + any injectable resistant"],
            ["XDR-TB (WHO 2021 new)", "MDR/RR + resistant to bedaquiline/linezolid (injectable removed)"],
            ["Diagnosis gold standard", "Liquid culture (MGIT); CBNAAT/GeneXpert for rapid diagnosis"],
            ["NIKSHAY", "Web-based TB notification and monitoring platform"],
            ["Nikshay Poshan Yojana", "₹500/month nutritional support to TB patients"],
        ],
        [0.32, 0.68]
    ))
    story.append(sp(6))

    story.append(sec_box("5.2 Malaria – NVBDCP"))
    story.append(sp(4))
    story.append(tbl(
        ["Parameter", "Details"],
        [
            ["Vector", "Anopheles mosquito (female); bites at night"],
            ["API (Annual Parasite Incidence)", "Positive blood smears × 1000 / population. High risk if ≥2"],
            ["ABER (Annual Blood Exam Rate)", "Target ≥10%"],
            ["Elimination target", "By 2030 (API <1/1000)"],
            ["P. falciparum treatment", "ACT: Artesunate + Lumefantrine (AL) or AS+SP; + Primaquine single dose"],
            ["P. vivax treatment", "Chloroquine 3 days + Primaquine 14 days (G6PD screen first)"],
            ["Cerebral malaria", "P. falciparum; IV Artesunate first line; dexamethasone NOT recommended"],
            ["Rapid Diagnostic Test (RDT)", "Detects HRP-2 antigen (P. falciparum) or pLDH"],
        ],
        [0.30, 0.70]
    ))
    story.append(sp(6))

    story.append(sec_box("5.3 RMNCH+A & Maternal Health Programmes"))
    story.append(sp(4))
    story.append(tbl(
        ["Programme", "Key Points"],
        [
            ["RMNCH+A", "Reproductive, Maternal, Newborn, Child, Adolescent Health and Nutrition – launched 2013"],
            ["ANC visits", "WHO 2016: ≥8 contacts. Earlier WHO/India: 4 visits minimum"],
            ["PMSMA", "Pradhan Mantri Suraksha Matritva Abhiyan – 9th of every month; free ANC for high-risk"],
            ["JSY (Janani Suraksha Yojana)", "Cash incentive for institutional delivery; BPL women; high-performing state: ₹1400 rural/₹1000 urban"],
            ["JSSK (Janani Shishu Suraksha Karyakram)", "Free delivery + free services for newborn up to 30 days; includes C-section, drugs, diagnostics, blood, diet, transport"],
            ["ASHA", "Accredited Social Health Activist; community health worker; trained for 23 days initially; 1 per 1000 population"],
            ["Pradhan Mantri Matru Vandana Yojana (PMMVY)", "₹5000 maternity benefit for 1st live birth; Aadhar-linked DBT"],
            ["RBSK", "Rashtriya Bal Swasthya Karyakram – child health screening 0–18 years; 4Ds: Defects, Diseases, Deficiencies, Developmental delays"],
        ],
        [0.28, 0.72]
    ))
    story.append(sp(6))

    story.append(sec_box("5.4 Other Key National Programmes"))
    story.append(sp(4))
    story.append(tbl(
        ["Programme", "Key Points"],
        [
            ["NVBDCP", "National Vector Borne Disease Control Programme: Malaria, Dengue, Chikungunya, Filaria, Kala-azar, JE"],
            ["NLEP (Leprosy)", "National Leprosy Elimination Programme. Eliminated nationally 2005 (<1/10,000). MDT for PB (6 months) and MB (12 months)"],
            ["NPCB", "National Programme for Control of Blindness. Target: <0.3% blindness. Cataract = #1 cause of blindness in India"],
            ["NPCDCS", "Non-Communicable Diseases, Cancer, Diabetes, CVD, Stroke programme"],
            ["NMHP", "National Mental Health Programme – 1982; District Mental Health Programme (DMHP) under it"],
            ["NPCCHH", "National Programme on Climate Change and Human Health"],
            ["Poshan Abhiyaan (NNM)", "National Nutrition Mission 2018; target: reduce stunting/wasting/anaemia/LBW by 2%/year"],
            ["NPCDCS", "Screening for HTN, Diabetes, cancer at all health facilities"],
            ["Ayushman Bharat – PMJAY", "₹5 lakh/family/year health insurance; ~50 crore beneficiaries"],
            ["Ayushman Bharat HWC", "Health and Wellness Centres – 1.5 lakh by 2022; comprehensive primary care"],
        ],
        [0.28, 0.72]
    ))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # CHAPTER 6 – COMMUNICABLE DISEASES
    # ══════════════════════════════════════════════════════════════════════════
    story.append(ch_header("6", "COMMUNICABLE DISEASES"))
    story.append(sp(6))

    story.append(sec_box("6.1 Modes of Transmission"))
    story.append(sp(4))
    story.append(tbl(
        ["Mode", "Sub-type", "Examples"],
        [
            ["Direct contact", "Physical touch, droplet, vertical", "STIs, Measles, HIV (MTCT), Chickenpox"],
            ["Indirect contact", "Vehicle-borne: food/water/fomites", "Cholera, Typhoid, Hepatitis A, Polio"],
            ["", "Vector-borne: biological/mechanical", "Malaria, Dengue, Filaria (biological); Housefly (mechanical)"],
            ["Airborne", "Droplet nuclei (<5μm), dust", "TB, Measles, Chickenpox, COVID-19"],
            ["Vertical (MTCT)", "Transplacental, perinatal, breast milk", "HIV, Rubella, Syphilis, HBV, CMV"],
        ],
        [0.20, 0.25, 0.55]
    ))
    story.append(sp(6))

    story.append(sec_box("6.2 Important Disease Quick Facts"))
    story.append(sp(4))
    story.append(tbl(
        ["Disease", "Causative Agent", "Vector", "Key Facts"],
        [
            ["Malaria", "Plasmodium spp.", "Anopheles (female)", "P. falciparum: cerebral malaria, blackwater fever, most severe"],
            ["Dengue", "Flavivirus", "Aedes aegypti\n(day biting)", "Dengue shock syndrome; thrombocytopenia; NS1 antigen (days 1–5)"],
            ["Filariasis", "Wuchereria bancrofti", "Culex quinquefasciatus", "Nocturnal periodicity; DEC prophylaxis; lymphoedema"],
            ["Kala-azar", "Leishmania donovani", "Phlebotomus (sandfly)", "Splenomegaly; PKDL post-treatment; SSG/Miltefosine/Amphotericin B"],
            ["Plague", "Yersinia pestis", "Xenopsylla cheopis (rat flea)", "Bubonic (most common); Pneumonic (most dangerous); Streptomycin"],
            ["Typhus", "Rickettsia spp.", "Louse (epidemic), Rat flea (murine)", "Weil-Felix reaction; Doxycycline treatment"],
            ["Cholera", "V. cholerae El Tor O1/O139", "Water/food (no vector)", "Rice water stools; ORS; Doxycycline; El Tor = mildest biotype"],
            ["Typhoid", "S. typhi", "Food/water (no vector)", "Rose spots; Widal test; carriers; Ciprofloxacin/Azithromycin"],
            ["Rabies", "Rhabdovirus (Lyssavirus)", "Dog bite (most common)", "Negri bodies; Furious vs Dumb/Paralytic; 100% fatal once symptomatic"],
            ["Leprosy", "M. leprae", "Droplet (no vector)", "Glove & stocking anaesthesia; Fite-Faraco stain; PB (1–5 lesions), MB (>5)"],
        ],
        [0.14, 0.18, 0.18, 0.50]
    ))
    story.append(sp(6))

    story.append(sec_box("6.3 Cholera – Key Points"))
    story.append(sp(4))
    for line in [
        b("Biotypes:") + " Classical (most severe) → El Tor (milder, persists) → O139 (Bengal strain, no immunity from O1)",
        b("Incubation:") + " Few hours to 5 days (typically 1–2 days)",
        b("Stool:") + " Profuse 'rice-water' stools (grey watery with mucus flakes)",
        b("Lab:") + " Dark-field microscopy shows 'shooting star' motility; string test positive; TCBS agar (yellow colonies)",
        b("Treatment:") + " ORS primary; IV Ringer's Lactate; Doxycycline (adults) / Azithromycin (children) to shorten duration",
        b("Notification:") + " Cholera is a notifiable disease AND internationally notifiable (IHR 2005)",
    ]:
        story.append(Paragraph("• " + line, BUL))
    story.append(sp(6))

    story.append(sec_box("6.4 HIV/AIDS"))
    story.append(sp(4))
    story.append(tbl(
        ["Parameter", "Details"],
        [
            ["Window period", "3 weeks–3 months (antibody); NAT (nucleic acid): ~11 days"],
            ["WHO clinical staging", "Stage 1: Asymptomatic; Stage 2: Mild; Stage 3: Advanced; Stage 4: Severe (AIDS)"],
            ["AIDS definition (WHO)", "CD4 <200 cells/μL OR AIDS-defining illness (regardless of CD4)"],
            ["Opportunistic infections", "PCP (CD4<200), CMV retinitis (CD4<50), MAC (CD4<50), Toxoplasma (CD4<100)"],
            ["ART initiation", "All HIV+ regardless of CD4 count (WHO 2015 / India 2017 guidelines)"],
            ["First-line ART (India)", "TDF + 3TC + DTG (Dolutegravir-based regimen)"],
            ["PMTCT", "Prevention of Mother-To-Child Transmission; ART from diagnosis throughout pregnancy & breastfeeding"],
            ["PEP", "Post-Exposure Prophylaxis: start within 72 hrs; continue 28 days; TDF+3TC+DTG"],
            ["PrEP", "Pre-Exposure Prophylaxis: TDF+FTC daily for high-risk individuals"],
            ["Testing in India", "NACO 3-test algorithm (ELISA-based); ICTC (Integrated Counselling & Testing Centres)"],
        ],
        [0.30, 0.70]
    ))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # CHAPTER 7 – DEMOGRAPHY & VITAL STATISTICS
    # ══════════════════════════════════════════════════════════════════════════
    story.append(ch_header("7", "DEMOGRAPHY & VITAL STATISTICS"))
    story.append(sp(6))

    story.append(sec_box("7.1 Demographic Transition Theory (Notestein, 1945)"))
    story.append(sp(4))
    story.append(tbl(
        ["Stage", "CBR", "CDR", "NRR", "Example Countries"],
        [
            ["Stage 1 – High Stationary",    "High", "High",          "~1", "Primitive societies; high birth & death rates; stable population"],
            ["Stage 2 – Early Expanding",    "High", "Falling",       ">1", "Developing nations; population explosion; India was here in 1950s"],
            ["Stage 3 – Late Expanding",     "Falling", "Low",        ">1", "India now; birth rate declining; moderate growth"],
            ["Stage 4 – Low Stationary",     "Low",  "Low",           "~1", "Developed nations (UK, France); stable population"],
            ["Stage 5 – Declining (added later)", "Very Low", "Low", "<1", "Some European countries; population decline"],
        ],
        [0.18, 0.10, 0.10, 0.08, 0.54]
    ))
    story.append(sp(4))
    story.append(imp_box("★ India is currently in Stage 3 of Demographic Transition. NRR = 1 means replacement. TFR 2.1 = replacement level fertility."))
    story.append(sp(6))

    story.append(sec_box("7.2 India Vital Statistics – Key Numbers"))
    story.append(sp(4))
    story.append(tbl(
        ["Indicator", "India Value (Latest estimates)", "Source"],
        [
            ["Total Population",              "~1.44 billion (2024)",               "UN estimate"],
            ["IMR (Infant Mortality Rate)",   "28/1000 live births (2022, SRS)",    "SRS 2022"],
            ["NMR (Neonatal MR)",             "20/1000 live births",                "SRS 2022"],
            ["MMR (Maternal Mortality Ratio)","97/100,000 live births (2018–20)",   "SRS Special Bulletin"],
            ["U5MR (Under-5 MR)",             "31/1000 live births",                "SRS 2022"],
            ["TFR (Total Fertility Rate)",    "2.0 (2021)",                         "SRS/NFHS-5"],
            ["CBR (Crude Birth Rate)",        "19.5/1000",                          "SRS 2021"],
            ["CDR (Crude Death Rate)",        "7.4/1000",                           "SRS 2021"],
            ["Life Expectancy at birth",      "70.4 yrs (M:68.6, F:71.4)",          "ORGI 2023"],
            ["Sex Ratio (Census 2011)",       "940 females/1000 males",             "Census 2011"],
            ["Child Sex Ratio (0–6 yrs)",     "914 females/1000 males",             "Census 2011"],
            ["Literacy (Census 2011)",        "74.04% (M:82%, F:65.5%)",            "Census 2011"],
        ],
        [0.35, 0.35, 0.30]
    ))
    story.append(sp(6))

    story.append(sec_box("7.3 Sources of Demographic Data in India"))
    story.append(sp(4))
    story.append(tbl(
        ["Source", "Conducted by", "Frequency", "Key Data"],
        [
            ["Census", "Registrar General of India (RGI)", "Every 10 years (last: 2011)", "Population, age-sex, literacy, housing"],
            ["Sample Registration System (SRS)", "RGI", "Annual", "Vital statistics (CBR, CDR, IMR, TFR)"],
            ["Civil Registration System (CRS)", "RGI", "Continuous", "Mandatory birth/death registration"],
            ["NFHS (National Family Health Survey)", "IIPS, MoHFW", "Every ~5 years (NFHS-5: 2019–21)", "Health, nutrition, fertility, child health"],
            ["DLHS (District Level Household Survey)", "IIPS", "Periodic", "District-level health data"],
            ["AHS (Annual Health Survey)", "RGI", "Annual (2010–13)", "High-focus states; vital stats"],
        ],
        [0.20, 0.22, 0.18, 0.40]
    ))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # CHAPTER 8 – FAMILY PLANNING
    # ══════════════════════════════════════════════════════════════════════════
    story.append(ch_header("8", "FAMILY PLANNING & CONTRACEPTION"))
    story.append(sp(6))

    story.append(sec_box("8.1 Contraceptive Methods – Comparison"))
    story.append(sp(4))
    story.append(tbl(
        ["Method", "Mechanism", "Pearl Index", "Special Notes"],
        [
            ["Combined OCP (COC)", "Inhibit ovulation (estrogen + progesterone)", "0.3 (perfect use)", "Start Day 1–5 of cycle; first choice for dysmenorrhoea, PCO"],
            ["Progestin-only pill (POP/Mini-pill)", "Thickens cervical mucus; thin endometrium", "0.5–10", "Safe in breastfeeding; start Day 1 cycle; no VTE risk"],
            ["IUCD Cu-T 380A", "Copper ions spermicidal; prevents implantation", "0.6–0.8", "10-year duration; best EC if inserted within 5 days"],
            ["LNG-IUS (Mirena)", "Local progesterone; thin endometrium", "0.1–0.2", "5–7 year duration; reduces menorrhagia; used in fibroids"],
            ["Condom (male)", "Barrier; only method preventing STIs", "2–18", "Only contraceptive protecting against HIV/STIs"],
            ["Diaphragm", "Barrier + spermicide", "6–16", "Fitted by doctor; re-use; used before intercourse"],
            ["Emergency OCP (LNG)", "Delay/prevent ovulation", "Higher than regular OCP", "Within 72 hrs; 1.5 mg single dose; not abortifacient"],
            ["Female sterilisation (tubectomy)", "Mechanical occlusion of tubes", "0.5", "Minilap (postpartum) or Laparoscopic (interval); permanent"],
            ["Male sterilisation (vasectomy)", "Vas deferens occluded", "0.1", "Safer, simpler than tubectomy; NOT immediately effective (wait 3 months/20 ejaculations)"],
            ["LAM", "High prolactin suppresses ovulation", "0.5–2", "Requires: exclusive breastfeeding + amenorrhoea + <6 months postpartum (ALL 3 must be met)"],
        ],
        [0.20, 0.25, 0.12, 0.43]
    ))
    story.append(sp(4))
    story.append(imp_box("★ IUCD is the MOST EFFECTIVE reversible contraceptive. Vasectomy is safer and simpler than female sterilisation but vasectomy has a 3-month waiting period to confirm effectiveness."))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # CHAPTER 9 – NUTRITION
    # ══════════════════════════════════════════════════════════════════════════
    story.append(ch_header("9", "NUTRITION"))
    story.append(sp(6))

    story.append(sec_box("9.1 Nutritional Deficiency Diseases"))
    story.append(sp(4))
    story.append(tbl(
        ["Nutrient", "Deficiency Disease", "Key Clinical Features", "Source / Supplement"],
        [
            ["Vitamin A", "Xerophthalmia; Night blindness", "Bitot's spots, Xerosis, Keratomalacia (corneal ulceration)\nXerophthalmia grading: XN→X1A→X1B→X2→X3A→X3B→XS→XF", "Liver, egg yolk; Vit A 1 lakh IU at 9 mo; 2 lakh IU every 6 mo until 5 yrs"],
            ["Vitamin D", "Rickets (children); Osteomalacia (adults)", "Craniotabes, Rachitic rosary, Bowlegs/Knock-knees, Pigeon chest, Harrisons sulcus", "Sunlight, fatty fish, fortified milk"],
            ["Vitamin C", "Scurvy", "Perifollicular haemorrhages, Corkscrew hair, Spongy bleeding gums, Woody oedema", "Citrus fruits; guava has highest Vit C"],
            ["Vitamin B1 (Thiamine)", "Beriberi", "Wet (cardiac: oedema), Dry (peripheral neuropathy), Infantile (cardiac failure), Wernicke-Korsakoff", "Unpolished rice, meat"],
            ["Vitamin B2 (Riboflavin)", "Ariboflavinosis", "Angular stomatitis, Cheilosis, Glossitis, Corneal vascularisation", "Milk, eggs, meat"],
            ["Niacin (B3)", "Pellagra", "3Ds: Dermatitis (sun-exposed), Diarrhoea, Dementia", "Meat, groundnuts; maize-based diet lacks tryptophan"],
            ["Vitamin B12", "Megaloblastic anaemia; Subacute combined degeneration", "Posterior & lateral column degeneration; dementia", "Only in animal products; strict vegans at risk"],
            ["Folate", "Megaloblastic anaemia; NTD", "Neural tube defects if deficient periconceptionally", "Green leafy vegetables; 400 mcg/day pre-conception"],
            ["Iron", "Iron Deficiency Anaemia (IDA)", "Koilonychia, Plummer-Vinson syndrome, PICA, Pallor", "ICDS programme; IFA tablets in pregnancy (180 days)"],
            ["Iodine", "Goitre, Cretinism, Hypothyroidism", "Neonatal: Cretinism (deaf, dumb, mentally retarded, goitre)\nAdult: Simple goitre", "Iodized salt (mandatory in India); fish"],
            ["Zinc", "Growth retardation, Acrodermatitis enteropathica", "Diarrhoea, growth failure, impaired immunity, hypogonadism", "Meat, legumes, whole grains"],
            ["Calcium", "Rickets, Osteoporosis, Tetany", "Trousseau sign, Chvostek sign in hypocalcaemia", "Dairy, ragi (highest plant source)"],
        ],
        [0.14, 0.16, 0.40, 0.30]
    ))
    story.append(sp(6))

    story.append(sec_box("9.2 Protein Energy Malnutrition (PEM)"))
    story.append(sp(4))
    story.append(tbl(
        ["Feature", "Marasmus", "Kwashiorkor"],
        [
            ["Age",             "6–18 months (earlier)", "1–3 years"],
            ["Cause",           "Total calorie deficiency", "Protein deficiency (adequate calories)"],
            ["Oedema",          "ABSENT", "PRESENT (hallmark, pitting)"],
            ["Weight",          "Very low (<60% expected)", "60–80% expected"],
            ["Appearance",      "Wasted, 'old man' face, visible ribs", "Moon face, pot belly, 'flaky paint' skin"],
            ["Hair",            "Sparse, dull", "Flag sign (alternating bands)"],
            ["Appetite",        "Good (hungry)", "Poor (anorexic)"],
            ["Liver",           "Normal", "Fatty liver (hepatomegaly)"],
            ["Wellcome Class",  "Grade 3 PEM", "Marasmic-Kwashiorkor if both present"],
            ["Treatment",       "F-75 → F-100 (RUTF); 10 steps WHO", "Same; 10-step WHO management"],
        ],
        [0.20, 0.40, 0.40]
    ))
    story.append(sp(4))
    story.append(imp_box("★ Oedema = Key differentiator: Kwashiorkor has oedema, Marasmus does NOT. SAM = WHZ <-3SD or MUAC <115mm or bilateral pitting oedema."))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # CHAPTER 10 – ENVIRONMENTAL HEALTH
    # ══════════════════════════════════════════════════════════════════════════
    story.append(ch_header("10", "ENVIRONMENTAL HEALTH"))
    story.append(sp(6))

    story.append(sec_box("10.1 Water Purification Methods"))
    story.append(sp(4))
    story.append(tbl(
        ["Method", "Mechanism", "Limitation"],
        [
            ["Slow Sand Filter (Pasteur-Chamberland)", "Biological action (Schmutzdecke layer)\nRate: 0.1–0.4 m/hr; very effective", "Large area needed; slow; needs cleaning every 1–3 months"],
            ["Rapid Sand Filter (Mechanical filter)", "Physical filtration only; Rate: 5–15 m/hr\nNeeds coagulation (alum) first", "Does NOT remove bacteria efficiently; needs chlorination after"],
            ["Chlorination", "Kills bacteria; residual chlorine 0.5 mg/L added; 0.2 mg/L residual after 30 min", "Inactive vs Giardia cysts; chlorine demand must be met first"],
            ["Boiling", "Most reliable household method; kills all pathogens", "Expensive; removes dissolved O₂ (flat taste)"],
            ["UV radiation", "Germicidal; no residual effect; clear water only", "No residual protection; does not remove chemicals"],
            ["Ozonation", "Powerful oxidant; no chlorinated byproducts", "No residual; expensive; complex"],
            ["Reverse Osmosis", "Removes dissolved solids, salts, organisms", "Removes minerals; wasteful (rejects much water)"],
        ],
        [0.22, 0.43, 0.35]
    ))
    story.append(sp(4))
    story.append(imp_box("★ Slow Sand Filter is the best small-community filter (biological action via Schmutzdecke). Rapid Sand Filter for large cities but MUST be followed by chlorination."))
    story.append(sp(6))

    story.append(sec_box("10.2 Sewage & Waste Disposal"))
    story.append(sp(4))
    for line in [
        b("BOD (Biochemical Oxygen Demand):") + " O₂ needed by bacteria to oxidize organic matter. Clean water: <1 mg/L. Raw sewage: ~300 mg/L. Higher BOD = more polluted.",
        b("COD (Chemical Oxygen Demand):") + " Total O₂ demand (chemical + biological). Always COD > BOD.",
        b("Self-purification of water:") + " Natural process; zones: Degradation → Active decomposition → Recovery → Clean water",
        b("Septic tank:") + " Anaerobic digestion; primary treatment; effluent still needs disposal",
        b("Oxidation pond:") + " Algae + bacteria; cheap; for hot climates; tertiary treatment",
        b("Activated sludge process:") + " Secondary treatment; aerobic; most effective",
        b("Coliform count:") + " Index of faecal pollution. MPN (Most Probable Number) method. Drinking water: 0 coliforms/100 mL",
    ]:
        story.append(Paragraph("• " + line, BUL))
    story.append(sp(6))

    story.append(sec_box("10.3 Air Pollution Effects"))
    story.append(sp(4))
    story.append(tbl(
        ["Pollutant", "Source", "Health Effect"],
        [
            ["CO (Carbon monoxide)", "Incomplete combustion; vehicles", "Binds Hb (COHb); headache → coma → death at >50% COHb"],
            ["SO₂", "Burning fossil fuels; industries", "Acid rain; bronchoconstriction; worsens asthma"],
            ["NO₂", "Vehicles; burning fuels", "Pulmonary oedema; 'silo-fillers disease'; methaemoglobinaemia"],
            ["Ozone (O₃)", "Photochemical smog", "Lung irritation, cough; damages crops"],
            ["PM2.5 & PM10", "Combustion, dust", "PM2.5 most harmful (deep lung penetration); lung cancer, CVD"],
            ["Lead (Pb)", "Leaded petrol (historical), paint, batteries", "Burton's line (gums), basophilic stippling, neuropathy, encephalopathy"],
            ["Arsenic", "Groundwater, coal combustion", "Mees' lines, rain-drop pigmentation, Bowen's disease, skin cancer"],
            ["Asbestos", "Mining, construction", "Mesothelioma, pulmonary fibrosis, lung cancer"],
        ],
        [0.18, 0.22, 0.60]
    ))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # CHAPTER 11 – OCCUPATIONAL HEALTH
    # ══════════════════════════════════════════════════════════════════════════
    story.append(ch_header("11", "OCCUPATIONAL HEALTH"))
    story.append(sp(6))

    story.append(sec_box("11.1 Pneumoconioses"))
    story.append(sp(4))
    story.append(tbl(
        ["Pneumoconiosis", "Causative Dust", "Occupation", "Key Feature"],
        [
            ["Silicosis", "Free crystalline silica (SiO₂)", "Miners, quarry workers, sandblasters", "Eggshell calcification of hilar nodes; ↑ TB risk (Silicotuberculosis); most common occupational lung disease worldwide"],
            ["Coal Workers' Pneumoconiosis (CWP)", "Coal dust", "Coal miners", "Simple CWP → Progressive Massive Fibrosis (PMF); Caplan syndrome (CWP + RA)"],
            ["Asbestosis", "Asbestos fibres", "Insulation, shipbuilding, construction", "Ferruginous (asbestos) bodies; pleural plaques; causes mesothelioma and lung cancer"],
            ["Byssinosis", "Cotton dust", "Cotton textile workers", "Monday fever; chest tightness on return from weekend"],
            ["Bagassosis", "Sugarcane bagasse (Thermophilic actinomycetes)", "Sugarcane workers", "Hypersensitivity pneumonitis (extrinsic allergic alveolitis)"],
            ["Farmers lung", "Mouldy hay (Micropolyspora faeni)", "Farmers", "Hypersensitivity pneumonitis; precipitins in blood"],
            ["Berylliosis", "Beryllium dust", "Aerospace, nuclear, fluorescent lamp", "Granulomatous disease mimicking sarcoidosis; chronic beryllium disease"],
        ],
        [0.18, 0.18, 0.22, 0.42]
    ))
    story.append(sp(6))

    story.append(sec_box("11.2 Occupational Cancers & Chemicals"))
    story.append(sp(4))
    story.append(tbl(
        ["Agent/Exposure", "Cancer / Disease"],
        [
            ["Asbestos", "Mesothelioma (pleura/peritoneum), Lung cancer (synergistic with smoking)"],
            ["Vinyl chloride (PVC)", "Angiosarcoma of liver (most specific occupational cancer)"],
            ["Benzene", "Leukaemia (AML); aplastic anaemia"],
            ["Aniline dyes / Naphthylamine (β)", "Bladder cancer (transitional cell carcinoma)"],
            ["Arsenic", "Skin cancer (Bowen's disease), Lung cancer, Liver angiosarcoma"],
            ["Chromium (hexavalent Cr⁶⁺)", "Nasal septum perforation, lung cancer"],
            ["Nickel", "Nasal/paranasal sinus cancer, lung cancer"],
            ["Cadmium", "Itai-Itai disease (osteomalacia + renal tubular damage); lung cancer"],
            ["Mercury (organic)", "Minamata disease (Japan): cerebral palsy, paresthesia, blindness"],
            ["Lead", "Burton's line (blue-black gingival line), basophilic stippling of RBCs, wrist drop (radial nerve)"],
        ],
        [0.38, 0.62]
    ))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # CHAPTER 12 – HEALTH PLANNING & MANAGEMENT
    # ══════════════════════════════════════════════════════════════════════════
    story.append(ch_header("12", "HEALTH PLANNING & MANAGEMENT"))
    story.append(sp(6))

    story.append(sec_box("12.1 Important Committees & Reports"))
    story.append(sp(4))
    story.append(tbl(
        ["Committee/Year", "Chairman", "Key Recommendations"],
        [
            ["Bhore Committee 1946", "Sir Joseph Bhore", "3-tier rural health system (PHC concept); 'Short-term programme' and 'Long-term programme'; social preview concept"],
            ["Mudaliar Committee 1962", "A.L. Mudaliar", "Strengthening existing PHCs; auxiliary nurse midwives (ANM); review of Bhore recommendations"],
            ["Chadah Committee 1963", "S.S. Chadah", "Recommended village health guide (VHG); malaria workers"],
            ["Kartar Singh Committee 1973", "Kartar Singh", "Multipurpose workers (MPW) scheme: male & female MPW; unification of vertical programs"],
            ["Shrivastav Committee 1975", "J.B. Shrivastav", "Community health worker (CHW) at village level; introduced village health guide"],
            ["ICMR-ICSSR Report 1980", "Ramalingaswami", "Health for All by 2000; social justice approach"],
            ["Mukherjee Committee 1965", "Mukherjee", "Reorganization of PHC; female health visitors"],
        ],
        [0.22, 0.18, 0.60]
    ))
    story.append(sp(6))

    story.append(sec_box("12.2 Alma Ata Declaration 1978 – Primary Health Care"))
    story.append(sp(4))
    story.append(Paragraph(b("Declaration of Alma Ata (1978):") + " 'Health for All by 2000.' Signed by 134 nations. Defined Primary Health Care (PHC).", BODY))
    story.append(sp(3))
    story.append(Paragraph(b("8 Essential Elements of PHC") + " (Mnemonic: MEDICINE):"), BODY)
    story.append(Paragraph("• " + b("M") + "aternal & child care including family planning", BUL))
    story.append(Paragraph("• " + b("E") + "ducation about health problems", BUL))
    story.append(Paragraph("• " + b("D") + "rug supply (essential drugs)", BUL))
    story.append(Paragraph("• " + b("I") + "mmunisation against major infectious diseases", BUL))
    story.append(Paragraph("• " + b("C") + "ontrol of locally endemic diseases", BUL))
    story.append(Paragraph("• " + b("I") + "mproved food supply and proper nutrition", BUL))
    story.append(Paragraph("• " + b("N") + "utrition (listed separately as essential)", BUL))
    story.append(Paragraph("• " + b("E") + "quitable supply of safe water and basic sanitation", BUL))
    story.append(Paragraph("• Also includes: treatment of common diseases and injuries", BUL))
    story.append(sp(4))
    story.append(Paragraph(b("Lalonde Model (Health Field Concept, 1974):") + " 4 determinants of health: (1) Human biology (2) Environment (3) Lifestyle (4) Health care organization", BODY))
    story.append(sp(6))

    story.append(sec_box("12.3 Health Indices"))
    story.append(sp(4))
    story.append(tbl(
        ["Index", "Components", "Creator"],
        [
            ["HDI (Human Development Index)", "Life expectancy + Education (mean + expected yrs of schooling) + GNI per capita", "UNDP; India ~134/193 (2023)"],
            ["PQLI (Physical Quality of Life Index)", "Life expectancy at age 1 + Infant Mortality Rate + Literacy Rate; scored 0–100", "Morris D. Morris (ODC, USA)"],
            ["HALE (Health-Adjusted Life Expectancy)", "Life expectancy adjusted for time lived in less-than-full-health states", "WHO; HALE < LE always"],
            ["DALY (Disability-Adjusted Life Year)", "YLL (premature death) + YLD (years lived with disability); 1 DALY = 1 year of healthy life lost", "Murray & Lopez (WHO)"],
            ["QALY (Quality-Adjusted Life Year)", "Years of life × utility score (0=death, 1=perfect health); used in cost-effectiveness analysis", "Economists; used in HTA"],
            ["Under-5 Mortality Rate (U5MR)", "Deaths <5 yrs per 1000 live births; UNICEF uses as key child health indicator", "Best single index of child health"],
        ],
        [0.20, 0.52, 0.28]
    ))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # CHAPTER 13 – NON-COMMUNICABLE DISEASES
    # ══════════════════════════════════════════════════════════════════════════
    story.append(ch_header("13", "NON-COMMUNICABLE DISEASES (NCDs)"))
    story.append(sp(6))

    story.append(sec_box("13.1 Hypertension"))
    story.append(sp(4))
    story.append(tbl(
        ["Classification", "Systolic (mmHg)", "Diastolic (mmHg)"],
        [
            ["Normal",              "<120",    "AND <80"],
            ["Elevated (JNC 7: Pre-HTN)", "120–129", "AND <80"],
            ["Stage 1 HTN (AHA 2017)", "130–139", "OR 80–89"],
            ["Stage 2 HTN (AHA 2017)", "≥140",   "OR ≥90"],
            ["Hypertensive Crisis",    ">180",    "AND/OR >120"],
        ],
        [0.40, 0.30, 0.30]
    ))
    story.append(sp(4))
    story.append(Paragraph(b("JNC 7 Stage 1: ≥140/90") + " (older guideline still used in many MCQs). " + b("AHA 2017: Stage 1 = ≥130/80.") + " Know both!", NOTE_S))
    story.append(sp(6))

    story.append(sec_box("13.2 Diabetes Mellitus – WHO Diagnostic Criteria"))
    story.append(sp(4))
    story.append(tbl(
        ["Test", "Normal", "Pre-diabetes (IFG/IGT)", "Diabetes"],
        [
            ["Fasting Plasma Glucose (FPG)", "<100 mg/dL", "100–125 mg/dL (IFG)", "≥126 mg/dL"],
            ["2-hr OGTT (75g glucose)",     "<140 mg/dL", "140–199 mg/dL (IGT)",  "≥200 mg/dL"],
            ["HbA1c",                       "<5.7%",       "5.7–6.4%",             "≥6.5%"],
            ["Random Blood Glucose + symptoms", "—",       "—",                    "≥200 mg/dL"],
        ],
        [0.30, 0.22, 0.22, 0.26]
    ))
    story.append(sp(4))
    story.append(imp_box("★ In asymptomatic individuals: diagnosis requires 2 abnormal tests on 2 separate days (FPG ≥126 confirmed on repeat). HbA1c not used for gestational DM."))
    story.append(sp(6))

    story.append(sec_box("13.3 Cancer Epidemiology in India"))
    story.append(sp(4))
    story.append(tbl(
        ["Cancer", "Rank (Incidence India)", "Key Screening/Notes"],
        [
            ["Breast cancer",       "#1 in women overall", "Mammography (>40 yrs); BRCA1/2 genes; BSE, CBE"],
            ["Cervical cancer",     "#2 in women", "PAP smear (30–65 yrs); VIA; HPV vaccine (9–14 yrs girls); HPV 16/18 cause 70%"],
            ["Oral cancer",         "#1 in men (India)", "Tobacco (bidi, chewing); Leukoplakia (premalignant); Erythroplakia (higher risk)"],
            ["Lung cancer",         "Leading cause of cancer death worldwide", "Smoking; asbestos; radon; squamous cell carcinoma most common (smoking)"],
            ["Colorectal cancer",   "Rising in India", "FOB test; colonoscopy; Lynch syndrome (HNPCC); FAP"],
        ],
        [0.20, 0.25, 0.55]
    ))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # CHAPTER 14 – LEPROSY
    # ══════════════════════════════════════════════════════════════════════════
    story.append(ch_header("14", "LEPROSY"))
    story.append(sp(6))

    story.append(sec_box("14.1 Classification"))
    story.append(sp(4))
    story.append(tbl(
        ["Feature", "Paucibacillary (PB)", "Multibacillary (MB)"],
        [
            ["Skin lesions",          "1–5 hypopigmented patches", ">5 skin lesions"],
            ["Nerve involvement",     "1 nerve trunk",              ">1 nerve trunk"],
            ["Smear (BI)",            "Negative (0)",               "Positive (1–6+)"],
            ["Type",                  "TT + BT (Ridley-Jopling)", "BB, BL, LL"],
            ["MDT regimen",           "6 months: Dapsone (daily) + Rifampicin (monthly supervised)", "12 months: Dapsone+Clofazimine(daily)+Rifampicin+Clofazimine(monthly supervised)"],
            ["Lepromin test",         "Positive (TT type)",         "Negative (LL type)"],
            ["Immunity",              "High cell-mediated",          "Low CMI; high antibody"],
        ],
        [0.25, 0.37, 0.38]
    ))
    story.append(sp(4))
    story.append(Paragraph(b("Reactions in Leprosy:"), BODY))
    for line in [
        b("Type 1 (Reversal reaction):") + " T-cell mediated; PB and MB; existing lesions become erythematous, oedematous; treat with Prednisolone",
        b("Type 2 (ENL – Erythema Nodosum Leprosum):") + " Immune complex; only MB (BL, LL); systemic fever + tender nodules; treat with Thalidomide (males) or Prednisolone",
        b("Lucio phenomenon:") + " Diffuse non-nodular leprosy; vasculitis; cutaneous infarction",
    ]:
        story.append(Paragraph("• " + line, BUL))
    story.append(sp(4))
    story.append(Paragraph(b("Staining:") + " Fite-Faraco stain (acid-fast but weaker than TB); Wade-Fite for tissue sections", BODY))
    story.append(Paragraph(b("Disability grading:") + " Grade 0 (no disability) → Grade 1 (anaesthesia of hands/feet) → Grade 2 (visible deformity/damage)", BODY))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # CHAPTER 15 – MISCELLANEOUS RAPID-FIRE FACTS
    # ══════════════════════════════════════════════════════════════════════════
    story.append(ch_header("15", "RAPID-FIRE FACTS & MNEMONICS"))
    story.append(sp(6))

    story.append(sec_box("15.1 Important Firsts / Pioneers"))
    story.append(sp(4))
    story.append(tbl(
        ["Person", "Contribution"],
        [
            ["John Snow (Father of Epidemiology)", "Cholera epidemic – Broad Street pump (1854); first field epidemiologist"],
            ["Edward Jenner", "Smallpox vaccination (cowpox); father of immunology"],
            ["Louis Pasteur", "Germ theory; rabies vaccine; pasteurisation"],
            ["Robert Koch", "Koch's postulates; discovered M. tuberculosis, V. cholerae"],
            ["Florence Nightingale", "Modern nursing; statistical pie charts; Crimean War sanitation"],
            ["Ronald Ross", "Malaria parasite in mosquito (Nobel 1902); Indian Medical Service"],
            ["Patrick Manson", "Father of tropical medicine; Filaria in mosquito"],
            ["Laveran", "Discovered malaria parasite (Plasmodium) in human blood (Nobel 1907)"],
            ["Joseph Goldberger", "Pellagra is nutritional (niacin deficiency), not infectious"],
            ["Semmelweis", "Handwashing prevents puerperal fever; before Pasteur/Lister"],
        ],
        [0.32, 0.68]
    ))
    story.append(sp(6))

    story.append(sec_box("15.2 Key Mnemonics"))
    story.append(sp(4))
    mnemonics = [
        (b("Bradford Hill Criteria:"), "\"STAB PC ECA\" – Strength, Temporality, Analogy, Biological plausibility, Plausibility (coherence), Consistency, Experiment, Causality, Analogy (or: BITS CAMP)"),
        (b("8 Elements of PHC (MEDICINE):"), "Maternal & child, Education, Drugs, Immunisation, Control of endemic, Improvement of food, Nutrition, Equitable water & sanitation"),
        (b("Pellagra 3Ds:"), "Dermatitis, Diarrhoea, Dementia (4th D = Death if untreated)"),
        (b("Kwashiorkor vs Marasmus:"), "Kwashiorkor = King who has oedema but no muscles. Marasmus = skeleton (no oedema, no fat, no muscle)"),
        (b("MB leprosy drugs (DCRM):"), "Daily: Dapsone + Clofazimine; Monthly: Rifampicin + Clofazimine"),
        (b("CHC specialists (FOPS):"), "Female (OBG), Obstetrics, Physician, Surgeon (or: FOG-Medicine-Paediatrics-Surgery)"),
        (b("Vitamin A eye manifestations:"), "XN (Night blindness) → X1A (Conjunctival xerosis) → X1B (Bitot's spots) → X2 (Corneal xerosis) → X3A (Corneal ulceration <1/3) → X3B (Keratomalacia ≥1/3)"),
        (b("SNOut/SpPin:"), "Sensitive test → Negative result rules OUT disease. Specific test → Positive result rules IN disease."),
        (b("Cholera biotypes severity:"), "Classical > El Tor (El Tor is milder, persists longer in environment)"),
        (b("Plague types severity:"), "Pneumonic > Septicemic > Bubonic (pneumonic = most deadly, most contagious)"),
    ]
    for title, desc in mnemonics:
        story.append(Paragraph(f"• {title} {desc}", BUL))
        story.append(sp(1))
    story.append(sp(6))

    story.append(sec_box("15.3 High-Yield One-Liners"))
    story.append(sp(4))
    oneliners = [
        "Sensitivity = ability to detect disease; if test is negative in SENSITIVE test → disease EXCLUDED (SnNout)",
        "Specificity = ability to exclude disease; if test is positive in SPECIFIC test → disease CONFIRMED (SpPin)",
        "Odds Ratio used in case-control studies; Relative Risk in cohort studies; both in RCT",
        "Chi-square test used when expected frequency in each cell ≥5; if <5, use Fisher's exact test",
        "Kappa >0.8 = almost perfect agreement (not 100% = perfect agreement)",
        "Demographic transition: India currently in Stage 3 (falling birth rate, low death rate)",
        "TFR = 2.1 is replacement level fertility; India TFR = 2.0 (below replacement)",
        "Vasectomy is more effective (Pearl Index 0.1) and simpler than tubectomy (0.5) but needs 3 months confirmation",
        "OPV stored at −20°C; DPT/Hep B NEVER to be frozen (freeze-sensitive)",
        "Mantoux test: ≥10mm induration = positive (≥5mm if HIV/immunocompromised/recent contact)",
        "Leprosy: most common cause of non-traumatic peripheral neuropathy worldwide",
        "Asbestos: only agent causing MESOTHELIOMA; also causes lung cancer (synergistic with smoking)",
        "Silicosis: most common occupational pneumoconiosis; increases TB risk 30-fold",
        "Ragi (finger millet) has highest calcium content among plant foods",
        "Guava has highest Vitamin C content of common Indian fruits",
        "DOTS strategy: cornerstone of TB control; treatment success target ≥85% for DS-TB",
        "Polio eradicated in India (last case: January 13, 2011); certified polio-free 2014",
        "Smallpox eradicated globally in 1980 (last natural case 1977 – Somalia)",
        "Scrub typhus: Orientia tsutsugamushi; vector: trombiculid mite (chigger); eschar pathognomonic",
        "Herd immunity for measles: 92–95% (due to high R₀ of 12–18)",
    ]
    for ol in oneliners:
        story.append(Paragraph("✦ " + ol, BUL))
        story.append(sp(1))

    # ── FOOTER ───────────────────────────────────────────────────────────────
    story.append(sp(10))
    story.append(HRFlowable(width=W, thickness=0.5, color=NAVY))
    story.append(sp(4))
    story.append(Paragraph(
        "These short notes cover the complete Community Medicine syllabus for NEET PG. "
        "Always cross-verify national programme targets, drug regimens, and epidemiological data "
        "with the latest government notifications and NHP updates before your examination, "
        "as these figures are revised periodically.",
        NOTE_S))

    doc.build(story, canvasmaker=NumberedCanvas)
    print("PDF generated:", OUTPUT)

build()
Running Command

cd /home/daytona/workspace/comm-med-pdf && python generate_notes.py 2>&1

Editing File

~/comm-med-pdf/generate_notes.py

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/comm-med-pdf/generate_notes.py'
Running Command

cd /home/daytona/workspace/comm-med-pdf && python generate_notes.py 2>&1

Running Command

cd /home/daytona/workspace/comm-med-pdf && sed -i 's/NOTE_S/NOTE/g' generate_notes.py && python generate_notes.py 2>&1

Running Command

cd /home/daytona/workspace/comm-med-pdf && python -c " content = open('generate_notes.py').read() content = content.replace('NOTE_S', 'NOTE') open('generate_notes.py', 'w').write(content) print('done') "

Running Command

cd /home/daytona/workspace/comm-med-pdf && python generate_notes.py 2>&1

Running Command

ls -lh /home/daytona/workspace/comm-med-pdf/CommunityMedicine_ShortNotes.pdf

Your Community Medicine Short Notes PDF is ready! Download it here:

CommunityMedicine ShortNotes

PDF Document · PDF


What's covered across 15 chapters:
ChapterTopics
1. EpidemiologyDefinitions, Epidemiological triad, Bradford Hill criteria, Study designs (comparison table), Bias types
2. BiostatisticsData types, Central tendency, Statistical tests (when to use), Normal distribution, Type I/II errors, Kappa
3. Screening & SurveillanceWilson-Jungner criteria, Sensitivity/Specificity/PPV/NPV, Serial vs Parallel testing, IDSP/NFHS/SRS/CRS
4. Vaccines & ImmunisationComplete UIP schedule (2024), Live vs Killed vaccine table, Cold chain temperatures, VVM, AEFI
5. National Health ProgrammesNTEP/RNTCP (TB regimens), Malaria (NVBDCP), RMNCH+A, JSY, JSSK, ASHA, PMMVY, RBSK, Ayushman Bharat
6. Communicable DiseasesModes of transmission, Disease comparison table (10 diseases), Cholera details, HIV/AIDS
7. Demography & Vital StatisticsDemographic transition (5 stages), India vital statistics, Sources of data
8. Family PlanningContraceptive comparison table (Pearl Index, mechanism), Emergency contraception
9. NutritionDeficiency disease table (12 nutrients), Marasmus vs Kwashiorkor, SAM/MAM criteria, Caloric needs
10. Environmental HealthWater purification methods, BOD/COD, Air pollution effects table
11. Occupational HealthPneumoconioses table (silicosis, asbestosis, byssinosis…), Occupational cancers
12. Health PlanningImportant committees (Bhore, Mudaliar…), Alma Ata 8 elements, Health indices (HDI, DALY, QALY, PQLI)
13. NCDsHTN classification (JNC7 + AHA2017), DM diagnostic criteria, Cancer epidemiology
14. LeprosyPB vs MB classification, MDT regimens, Type 1 & 2 reactions, Disability grading
15. Rapid-FirePioneers/Firsts, Key mnemonics, 20 high-yield one-liners
This is a shared conversation. Sign in to Orris to start your own chat.