~/chn-unit2/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.platypus import ListFlowable, ListItem
OUTPUT = "/home/daytona/workspace/chn-unit2/CHN_Unit2_Study_Guide.pdf"
# ─── Colour Palette ──────────────────────────────────────────────────────────
NAVY = colors.HexColor("#1B2A4A")
TEAL = colors.HexColor("#0D7377")
LTBLUE = colors.HexColor("#E8F4F8")
ACCENT = colors.HexColor("#F4A261")
GREEN = colors.HexColor("#2D6A4F")
LTGREEN = colors.HexColor("#D8F3DC")
RED = colors.HexColor("#C1121F")
LTRED = colors.HexColor("#FFE5E5")
YELLOW = colors.HexColor("#FFF3CD")
PURPLE = colors.HexColor("#5A189A")
LTPURPLE = colors.HexColor("#EDE7F6")
GREY = colors.HexColor("#F0F4F8")
DARKGREY = colors.HexColor("#555555")
WHITE = colors.white
# ─── Styles ──────────────────────────────────────────────────────────────────
base = getSampleStyleSheet()
def S(name, **kw):
return ParagraphStyle(name, **kw)
COVER_TITLE = S("CoverTitle",
fontName="Helvetica-Bold", fontSize=28, textColor=WHITE,
alignment=TA_CENTER, spaceAfter=8, leading=34)
COVER_SUB = S("CoverSub",
fontName="Helvetica", fontSize=14, textColor=colors.HexColor("#BDD5EA"),
alignment=TA_CENTER, spaceAfter=6, leading=18)
COVER_TAG = S("CoverTag",
fontName="Helvetica-Bold", fontSize=11, textColor=ACCENT,
alignment=TA_CENTER, spaceAfter=4)
H1 = S("H1",
fontName="Helvetica-Bold", fontSize=14, textColor=WHITE,
backColor=NAVY, borderPad=6, spaceAfter=6, spaceBefore=14,
leftIndent=-6, rightIndent=-6, leading=18)
H2 = S("H2",
fontName="Helvetica-Bold", fontSize=12, textColor=NAVY,
spaceAfter=4, spaceBefore=10, leading=15,
borderPad=2, borderColor=TEAL, borderWidth=0)
H3 = S("H3",
fontName="Helvetica-Bold", fontSize=10, textColor=TEAL,
spaceAfter=3, spaceBefore=6, leading=13)
BODY = S("Body",
fontName="Helvetica", fontSize=9.5, textColor=colors.black,
spaceAfter=4, leading=14, alignment=TA_JUSTIFY)
BOLD_BODY = S("BoldBody",
fontName="Helvetica-Bold", fontSize=9.5, textColor=NAVY,
spaceAfter=3, leading=13)
SMALL = S("Small",
fontName="Helvetica", fontSize=8.5, textColor=DARKGREY,
spaceAfter=2, leading=12)
BOX_TITLE = S("BoxTitle",
fontName="Helvetica-Bold", fontSize=10, textColor=NAVY,
spaceAfter=2, leading=13)
BOX_BODY = S("BoxBody",
fontName="Helvetica", fontSize=9, textColor=colors.black,
spaceAfter=3, leading=13)
BULLET = S("Bullet",
fontName="Helvetica", fontSize=9.5, textColor=colors.black,
spaceAfter=2, leading=13, leftIndent=14, bulletIndent=4)
SUBBULLET = S("SubBullet",
fontName="Helvetica", fontSize=9, textColor=DARKGREY,
spaceAfter=1, leading=12, leftIndent=26, bulletIndent=14)
FOOTER_ST = S("Footer",
fontName="Helvetica", fontSize=7.5, textColor=DARKGREY,
alignment=TA_CENTER)
# ─── Helpers ─────────────────────────────────────────────────────────────────
def header_bar(text, style=H1):
return Paragraph(f" {text}", style)
def h2(text): return Paragraph(text, H2)
def h3(text): return Paragraph(text, H3)
def body(text): return Paragraph(text, BODY)
def bold(text): return Paragraph(text, BOLD_BODY)
def small(text): return Paragraph(text, SMALL)
def sp(h=4): return Spacer(1, h)
def hr(): return HRFlowable(width="100%", thickness=0.5, color=TEAL, spaceAfter=4)
def bullet_list(items, sub=False):
st = SUBBULLET if sub else BULLET
return [Paragraph(f"• {i}", st) for i in items]
def note_box(title, items, bg=LTBLUE, border=TEAL):
rows = [[Paragraph(f"<b>{title}</b>", BOX_TITLE)]]
for i in items:
rows.append([Paragraph(f"• {i}", BOX_BODY)])
t = Table(rows, colWidths=[16.5*cm])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), bg),
("BACKGROUND", (0,1), (-1,-1), WHITE),
("BOX", (0,0), (-1,-1), 1, border),
("LINEBELOW", (0,0), (0,0), 0.5, border),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 8),
]))
return t
def two_col_table(headers, rows, col_widths=None, header_bg=NAVY):
if col_widths is None:
col_widths = [4*cm, 12.5*cm]
data = [[Paragraph(f"<b>{h}</b>", S("th", fontName="Helvetica-Bold",
fontSize=9, textColor=WHITE)) for h in headers]]
for r in rows:
data.append([Paragraph(str(c), S("td", fontName="Helvetica",
fontSize=9, textColor=colors.black, leading=12)) for c in r])
t = Table(data, colWidths=col_widths)
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), header_bg),
("ROWBACKGROUNDS",(0,1),(-1,-1), [WHITE, GREY]),
("BOX", (0,0), (-1,-1), 0.8, NAVY),
("INNERGRID", (0,0), (-1,-1), 0.4, colors.HexColor("#CCCCCC")),
("TOPPADDING", (0,0),(-1,-1), 4),
("BOTTOMPADDING", (0,0),(-1,-1), 4),
("LEFTPADDING", (0,0),(-1,-1), 6),
("VALIGN", (0,0),(-1,-1), "TOP"),
]))
return t
def wide_table(headers, rows, col_widths=None, header_bg=NAVY):
if col_widths is None:
n = len(headers)
w = 16.5*cm / n
col_widths = [w]*n
data = [[Paragraph(f"<b>{h}</b>", S("th2", fontName="Helvetica-Bold",
fontSize=8.5, textColor=WHITE, leading=11)) for h in headers]]
for r in rows:
data.append([Paragraph(str(c), S("td2", fontName="Helvetica",
fontSize=8.5, textColor=colors.black, leading=11)) for c in r])
t = Table(data, colWidths=col_widths)
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), header_bg),
("ROWBACKGROUNDS",(0,1), (-1,-1), [WHITE, GREY]),
("BOX", (0,0), (-1,-1), 0.8, NAVY),
("INNERGRID", (0,0), (-1,-1), 0.4, colors.HexColor("#CCCCCC")),
("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 highlight_box(text, bg=YELLOW, border=ACCENT):
t = Table([[Paragraph(text, BOX_BODY)]], colWidths=[16.5*cm])
t.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), bg),
("BOX", (0,0),(-1,-1), 1.2, border),
("TOPPADDING", (0,0),(-1,-1), 7),
("BOTTOMPADDING", (0,0),(-1,-1), 7),
("LEFTPADDING", (0,0),(-1,-1), 10),
]))
return t
# ─── Page callbacks ──────────────────────────────────────────────────────────
def on_page(canvas, doc):
w, h = A4
# header stripe
canvas.setFillColor(NAVY)
canvas.rect(0, h-1.1*cm, w, 1.1*cm, stroke=0, fill=1)
canvas.setFont("Helvetica-Bold", 8)
canvas.setFillColor(WHITE)
canvas.drawString(1.5*cm, h-0.7*cm, "CHN Unit 2 - Epidemiology & Disease Prevention")
canvas.setFont("Helvetica", 8)
canvas.drawRightString(w-1.5*cm, h-0.7*cm, "B.Sc Nursing | Quick Revision Guide")
# footer
canvas.setFillColor(NAVY)
canvas.rect(0, 0, w, 0.8*cm, stroke=0, fill=1)
canvas.setFont("Helvetica", 7.5)
canvas.setFillColor(WHITE)
canvas.drawCentredString(w/2, 0.3*cm, f"Page {doc.page} | Source: Park's Textbook of Preventive & Social Medicine")
def on_first_page(canvas, doc):
# no header/footer on cover page - handled inline
pass
# ─── Content builder ─────────────────────────────────────────────────────────
def build_story():
story = []
# ══════════════════════════════════════════════════════════════
# COVER PAGE
# ══════════════════════════════════════════════════════════════
cover_data = [[
Paragraph("COMMUNITY HEALTH NURSING", COVER_TITLE),
]]
cover = Table(cover_data, colWidths=[16.5*cm])
cover.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), NAVY),
("TOPPADDING", (0,0),(-1,-1), 30),
("BOTTOMPADDING", (0,0),(-1,-1), 10),
("LEFTPADDING", (0,0),(-1,-1), 20),
("RIGHTPADDING", (0,0),(-1,-1), 20),
]))
story.append(sp(60))
story.append(cover)
sub_data = [[
Paragraph("UNIT 2", S("u2", fontName="Helvetica-Bold", fontSize=36,
textColor=ACCENT, alignment=TA_CENTER)),
]]
sub = Table(sub_data, colWidths=[16.5*cm])
sub.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), TEAL),
("TOPPADDING", (0,0),(-1,-1), 14),
("BOTTOMPADDING", (0,0),(-1,-1), 14),
]))
story.append(sub)
detail_data = [[
Paragraph("EPIDEMIOLOGY & DISEASE PREVENTION", COVER_TITLE),
Paragraph("Quick Revision Study Guide", COVER_SUB),
Paragraph("B.Sc Nursing · 5th Semester · Community Health Nursing - I", COVER_TAG),
Paragraph("Source: Park's Textbook of Preventive & Social Medicine", COVER_TAG),
]]
detail = Table([[Paragraph("EPIDEMIOLOGY & DISEASE PREVENTION", COVER_TITLE)],
[Paragraph("Quick Revision Study Guide", COVER_SUB)],
[Paragraph("B.Sc Nursing · 5th Semester · CHN - I", COVER_TAG)],
[Paragraph("Based on Park's Preventive & Social Medicine", COVER_TAG)],
], colWidths=[16.5*cm])
detail.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), NAVY),
("TOPPADDING", (0,0),(-1,-1), 6),
("BOTTOMPADDING", (0,0),(-1,-1), 6),
("LEFTPADDING", (0,0),(-1,-1), 20),
("RIGHTPADDING", (0,0),(-1,-1), 20),
]))
story.append(detail)
story.append(sp(20))
# Topics covered box
topics = Table([
[Paragraph("<b>TOPICS COVERED IN THIS GUIDE</b>", S("tc", fontName="Helvetica-Bold",
fontSize=10, textColor=NAVY, alignment=TA_CENTER))],
[wide_table(
["A. Intro to Epidemiology", "B. Disease Causation", "C. Natural History", "D. Chain of Infection"],
[["Definition, Aims, Uses", "Triad, Web of Causation", "2 Phases, Spectrum", "6 Links, Carriers, Modes"]],
col_widths=[4.1*cm]*4, header_bg=TEAL
)],
[wide_table(
["E. Immunity & Vaccination", "F. Epidemiological Studies", "G. Measurements", "H. Levels of Prevention"],
[["Types, Herd Immunity", "Descriptive, Analytical, Experimental", "Rates, IMR, Incidence", "Primordial to Tertiary"]],
col_widths=[4.1*cm]*4, header_bg=TEAL
)],
[wide_table(
["I. Epidemic Investigation", "J. Surveillance", "K. Role of CHN", "L. Quick Revision"],
[["Steps, Types of Epidemic", "Types, Components", "14 Roles", "Key Definitions & Tables"]],
col_widths=[4.1*cm]*4, header_bg=TEAL
)],
], colWidths=[16.5*cm])
topics.setStyle(TableStyle([
("BACKGROUND", (0,0),(0,0), LTBLUE),
("BOX", (0,0),(-1,-1), 1, TEAL),
("TOPPADDING", (0,0),(-1,-1), 6),
("BOTTOMPADDING", (0,0),(-1,-1), 6),
("LEFTPADDING", (0,0),(-1,-1), 8),
]))
story.append(topics)
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════
# SECTION A: INTRODUCTION TO EPIDEMIOLOGY
# ══════════════════════════════════════════════════════════════
story.append(header_bar("SECTION A: INTRODUCTION TO EPIDEMIOLOGY"))
story.append(sp(4))
story.append(h2("1. Definition"))
story.append(highlight_box(
'<b>John Last (1988):</b> "The study of the distribution and <b>determinants</b> of '
'health-related states or events in <b>specified populations</b>, and the application '
'of this study to the <b>prevention and control</b> of health problems."',
bg=LTBLUE, border=TEAL))
story.append(sp(6))
story.append(body("<b>Word origin:</b> Greek — Epi (upon) + Demos (people) + Logos (study) = "
"<i>Study of what falls upon people</i>"))
story.append(sp(6))
story.append(h2("2. Epidemiology vs. Clinical Medicine"))
story.append(wide_table(
["Feature", "Clinical Medicine", "Epidemiology"],
[
["Unit of study", "Individual patient", "Defined population"],
["Concern", "Sick individuals only", "Both sick AND healthy"],
["Approach", "Patient comes to doctor", "Investigator goes to community"],
["Goal", "Diagnose + treat one person", "Identify cause + prevent in population"],
["Measure", "Clinical signs", "Rates and patterns"],
],
col_widths=[4*cm, 6.2*cm, 6.2*cm]
))
story.append(sp(8))
story.append(h2("3. Three Aims of Epidemiology (IEA)"))
for i, item in enumerate([
"<b>Describe</b> — the distribution and magnitude of health and disease in human populations",
"<b>Identify</b> — aetiological factors (risk factors) in the pathogenesis of disease",
"<b>Provide data</b> — for planning, implementation, and evaluation of prevention and treatment services",
], 1):
story.append(body(f" <b>{i}.</b> {item}"))
story.append(highlight_box(
"<b>Ultimate aims:</b> (a) Eliminate or reduce the health problem and its consequences; "
"(b) Promote health and well-being of society as a whole.", bg=LTGREEN, border=GREEN))
story.append(sp(8))
story.append(h2("4. Seven Uses of Epidemiology (J.N. Morris)"))
story.append(wide_table(
["#", "Use", "Example"],
[
["1", "Study historical rise and fall of disease", "Tracking decline of smallpox"],
["2", "Community diagnosis", "Identifying TB burden in a district"],
["3", "Planning and evaluation of health services", "Planning beds, manpower, screening"],
["4", "Individual risk estimation", "Counselling smokers about lung cancer risk"],
["5", "Health service evaluation", "Measuring effectiveness of a vaccine program"],
["6", "Identification of syndromes", "Defining AIDS as a clinical syndrome"],
["7", "Search for causes (aetiology)", "Linking H. pylori to peptic ulcer disease"],
],
col_widths=[0.8*cm, 7.5*cm, 8.2*cm]
))
story.append(sp(6))
# ══════════════════════════════════════════════════════════════
# SECTION B: DISEASE CAUSATION
# ══════════════════════════════════════════════════════════════
story.append(header_bar("SECTION B: DISEASE CAUSATION & EPIDEMIOLOGICAL TRIAD"))
story.append(sp(4))
story.append(h2("5. Concepts of Disease Causation"))
story.append(wide_table(
["Theory", "Key Concept", "Limitation"],
[
["Germ Theory (Koch)", "One agent → one disease; Koch's postulates", "Incomplete; most diseases are multifactorial"],
["Multi-factorial Causation", "Disease results from multiple interacting factors", "Complex; harder to isolate single cause"],
["Web of Causation (MacMahon)", "All predisposing factors form a complex interrelated web", "Removing ONE key link can break the chain"],
],
col_widths=[4.5*cm, 6.5*cm, 5.5*cm]
))
story.append(sp(8))
story.append(h2("6. Epidemiological Triad — Agent, Host, Environment (+Time)"))
story.append(highlight_box(
"<b>Key principle:</b> The primary mission of epidemiology is to <b>break one leg of the triangle</b>, "
"thereby disrupting the connection among environment, host, and agent, and stopping the outbreak.",
bg=YELLOW, border=ACCENT))
story.append(sp(6))
story.append(wide_table(
["Component", "Definition", "Examples / Sub-factors"],
[
["AGENT", "The cause of disease", "Biological: bacteria, viruses, fungi, parasites\nChemical: drugs, pesticides, toxins\nPhysical: radiation, heat\nNutritional: deficiencies/excesses"],
["HOST", "Living organism harbouring the agent", "Age, sex, genetics, immunity, nutrition, occupation, lifestyle, comorbidities"],
["ENVIRONMENT", "External conditions influencing disease", "Physical: climate, water, air\nBiological: insects, animals\nSocial: housing, SES, sanitation, education"],
["TIME", "Temporal relationships", "Incubation period, epidemic duration, seasonal trends, secular trends"],
],
col_widths=[3*cm, 5*cm, 8.5*cm]
))
story.append(sp(6))
story.append(h3("Agent Properties (Memorise these 6)"))
story.append(wide_table(
["Property", "Definition", "Example"],
[
["Infectivity", "Ability to enter, survive, and multiply in a host", "Measles — very high infectivity"],
["Pathogenicity", "Ability to produce disease in an infected host", "Rabies — very high pathogenicity"],
["Virulence", "Severity of disease produced (CFR)", "Ebola — high virulence"],
["Antigenicity", "Ability to induce immunity in host", "Measles virus — high antigenicity"],
["Communicability", "Ease of transmission to another person", "Influenza — high communicability"],
["Invasiveness", "Ability to invade host tissues", "Salmonella — invades gut wall"],
],
col_widths=[3.5*cm, 7.5*cm, 5.5*cm]
))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════
# SECTION C: NATURAL HISTORY OF DISEASE
# ══════════════════════════════════════════════════════════════
story.append(header_bar("SECTION C: NATURAL HISTORY OF DISEASE (Leavell & Clark)"))
story.append(sp(4))
story.append(highlight_box(
"<b>Definition:</b> The way a disease evolves over time from the earliest stage of its "
"prepathogenesis phase to its termination as recovery, disability, or death — "
"<b>in the absence of treatment or prevention.</b>",
bg=LTBLUE, border=TEAL))
story.append(sp(6))
story.append(wide_table(
["Phase", "What Happens", "Intervention Level"],
[
["PREPATHOGENESIS\n(Phase 1)",
"Agent NOT yet entered man. Agent, host, and environment are interacting in the environment. "
"Man is 'in the midst of disease'. All of us are potentially in this phase for many diseases.",
"Primordial &\nPrimary Prevention"],
["PATHOGENESIS\n(Phase 2) — Early",
"Agent enters host. Tissue/physiological changes begin. Below the clinical horizon. "
"No symptoms yet (presymptomatic stage in chronic diseases).",
"Secondary Prevention\n(Screening)"],
["PATHOGENESIS\n(Phase 2) — Late",
"Signs and symptoms appear. Clinical stage begins. Disease well advanced. "
"Outcome: Recovery / Disability / Death.",
"Tertiary Prevention\n(Rehabilitation)"],
],
col_widths=[3.5*cm, 9*cm, 4*cm]
))
story.append(sp(8))
story.append(h3("Spectrum of Disease / Gradient of Infection"))
story.append(wide_table(
["Type", "Description", "Epidemiological Importance"],
[
["Clinical illness", "Mild, moderate, severe, or fatal", "Reported; appear in statistics"],
["Subclinical/Inapparent", "Agent multiplies; no symptoms; person can spread disease", "Most important — ambulatory; not in stats; maintain endemicity"],
["Latent infection", "Agent dormant; no shedding (e.g., herpes simplex)", "Maintains agent in population"],
["Carrier state", "Harbours agent without disease but can transmit", "Silent spreaders in community"],
],
col_widths=[4*cm, 6.5*cm, 6*cm]
))
story.append(highlight_box(
"⭐ <b>Exam point:</b> Subclinical cases are MORE important epidemiologically than clinical cases "
"because they are ambulant (moving freely), undetected, and do NOT appear in statistics — "
"yet they maintain the chain of infection in the community.",
bg=LTRED, border=RED))
story.append(sp(6))
story.append(h3("Types of Carriers"))
story.append(wide_table(
["Type", "Definition", "Example Disease"],
[
["Incubatory", "Carries and spreads during incubation period", "Measles, Cholera"],
["Convalescent", "Continues to carry and shed after clinical recovery", "Typhoid fever"],
["Chronic", "Carries for months to years", "Typhoid (Typhoid Mary), Hepatitis B"],
["Healthy", "Never had disease; acquires agent without becoming ill", "Diphtheria, Meningococcus"],
["Contact", "Acquires infection from a case without developing disease", "Various"],
],
col_widths=[3.5*cm, 7.5*cm, 5.5*cm]
))
story.append(sp(4))
# ══════════════════════════════════════════════════════════════
# SECTION D: CHAIN OF INFECTION
# ══════════════════════════════════════════════════════════════
story.append(header_bar("SECTION D: CHAIN OF INFECTION"))
story.append(sp(4))
chain_box = Table([
[Paragraph("<b>6 LINKS IN THE CHAIN OF INFECTION</b>",
S("cl", fontName="Helvetica-Bold", fontSize=10, textColor=WHITE, alignment=TA_CENTER))],
[wide_table(
["1. Infectious Agent", "2. Reservoir", "3. Portal of Exit", "4. Mode of Transmission", "5. Portal of Entry", "6. Susceptible Host"],
[["Bacteria, Virus,\nFungi, Parasite",
"Human, Animal,\nEnvironment",
"Resp tract, GIT,\nBlood, Skin, Placenta",
"Direct / Indirect\nContact, Air, Vector",
"Inhalation,\nIngestion, Skin",
"No immunity;\nMalnourished;\nYoung/Old"]],
col_widths=[2.75*cm]*6, header_bg=TEAL
)],
[Paragraph("<i>To stop an epidemic — break ANY ONE link in this chain!</i>",
S("ci", fontName="Helvetica-Oblique", fontSize=9, textColor=WHITE, alignment=TA_CENTER))],
], colWidths=[16.5*cm])
chain_box.setStyle(TableStyle([
("BACKGROUND", (0,0),(0,0), NAVY),
("BACKGROUND", (0,2),(0,2), NAVY),
("BOX", (0,0),(-1,-1), 1.5, NAVY),
("TOPPADDING", (0,0),(-1,-1), 8),
("BOTTOMPADDING", (0,0),(-1,-1), 8),
("LEFTPADDING", (0,0),(-1,-1), 6),
]))
story.append(chain_box)
story.append(sp(8))
story.append(h2("Modes of Transmission"))
story.append(wide_table(
["Mode", "Type", "Description", "Examples"],
[
["DIRECT", "Direct contact", "Physical touching, kissing, sexual contact", "STIs, Rabies"],
["DIRECT", "Droplet infection", "Large droplets <1 metre", "Influenza, Measles"],
["DIRECT", "Transplacental", "Mother to fetus via placenta", "Rubella, Syphilis, HIV"],
["INDIRECT", "Airborne", "Droplet nuclei <5 microns; travel far", "TB, Varicella"],
["INDIRECT", "Fomites", "Contaminated inanimate objects", "Conjunctivitis, Tinea"],
["INDIRECT", "Vehicle-borne", "Contaminated food, water, milk, blood", "Cholera (water), HBV (blood)"],
["INDIRECT", "Vector-borne", "Living organism transmits agent", "Malaria (mosquito), Plague (flea)"],
],
col_widths=[2.5*cm, 3.5*cm, 5.5*cm, 5*cm]
))
story.append(sp(6))
story.append(h3("Vector Transmission Types"))
story.append(wide_table(
["Type", "Mechanism", "Example"],
[
["Mechanical transmission", "Agent passively transported on vector's body/feet; NO development in vector", "Housefly + dysentery bacilli"],
["Biological transmission", "Agent undergoes development/multiplication IN the vector (needs incubation)", "Malaria parasite in Anopheles mosquito"],
],
col_widths=[4*cm, 8*cm, 4.5*cm]
))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════
# KEY DEFINITIONS BOX (compact)
# ══════════════════════════════════════════════════════════════
story.append(header_bar("KEY EPIDEMIOLOGICAL DEFINITIONS"))
story.append(sp(4))
story.append(wide_table(
["Term", "Definition", "Term", "Definition"],
[
["Epidemic", "Disease occurrence clearly in excess of normal expectancy in a defined area/period",
"Incubation period", "Time between entry of agent and appearance of first symptoms"],
["Endemic", "Constant presence of disease/agent in a given geographic area",
"Communicable period", "Time during which infectious agent may be transferred to another person"],
["Pandemic", "Worldwide spread of a new disease across international boundaries",
"Generation time", "Interval from receipt of infection to maximal infectivity of host"],
["Sporadic", "Disease occurring irregularly, without apparent connection between cases",
"Herd immunity", "Resistance of a group due to high proportion of immune members"],
["Nosocomial", "Hospital-acquired infection (not present at time of admission)",
"Index case", "First case to come to attention of investigator (≠ primary case)"],
["Opportunistic","Infection by normally harmless organisms in immunocompromised host",
"Secondary case", "Cases developing from contact with primary case"],
["Zoonosis", "Infectious disease transmitted from animals to humans (e.g., Rabies, Plague)",
"Fomite", "Inanimate object that carries and transmits infectious agents"],
["Iatrogenic", "Disease caused by medical treatment or diagnostic procedures",
"SAR", "Secondary attack rate = cases among susceptible contacts / total susceptible contacts × 100"],
],
col_widths=[3*cm, 5.2*cm, 3*cm, 5.2*cm]
))
story.append(sp(8))
# ══════════════════════════════════════════════════════════════
# SECTION E: IMMUNITY AND VACCINATION
# ══════════════════════════════════════════════════════════════
story.append(header_bar("SECTION E: IMMUNITY & VACCINATION"))
story.append(sp(4))
story.append(h2("Types of Immunity"))
story.append(wide_table(
["Type", "How Acquired", "Onset", "Duration", "Examples"],
[
["Active Natural", "From actual disease/infection", "Slow (days-weeks)", "Lifelong", "Post-measles, post-chickenpox"],
["Active Artificial", "Vaccination", "Slow", "Long", "DPT, OPV, BCG, MMR vaccines"],
["Passive Natural", "Maternal IgG via placenta; IgA via colostrum/breastmilk","Immediate", "Short (3-6 months)", "Newborn protection"],
["Passive Artificial","Ready-made antibodies injected (antiserum/Ig)", "Immediate", "Short (weeks)", "Tetanus antitoxin, Rabies Ig"],
],
col_widths=[3.5*cm, 5*cm, 2.5*cm, 3*cm, 4.5*cm] if False else None
))
story.append(sp(6))
story.append(h3("Immunoglobulins — Quick Reference"))
story.append(wide_table(
["Ig", "% of serum", "Key Features"],
[
["IgG", "80%", "Crosses placenta (neonatal protection); anti-viral, anti-toxin; half-life 21 days"],
["IgM", "6%", "First to appear after infection; indicates RECENT infection; high agglutinating ability; half-life 7 days"],
["IgA", "13%", "Found in secretions (saliva, milk, colostrum, tears, mucus); protects mucous membranes"],
["IgD", "<1%", "Found on surface of B-lymphocytes; receptor function"],
["IgE", "<1%", "Involved in allergic reactions and parasitic infections"],
],
col_widths=[1.5*cm, 2.5*cm, 12.5*cm]
))
story.append(sp(6))
story.append(h3("Herd Immunity Thresholds"))
story.append(wide_table(
["Disease", "Threshold (%)", "Disease", "Threshold (%)"],
[
["Measles", "92–95%", "Polio", "80–85%"],
["Diphtheria", "83–85%", "Smallpox", "80–85%"],
["Rubella", "83–85%", "Pertussis","92–94%"],
],
col_widths=[5*cm, 3.2*cm, 5*cm, 3.3*cm]
))
story.append(sp(6))
story.append(h3("Live Attenuated vs. Killed (Inactivated) Vaccines"))
story.append(wide_table(
["Feature", "Live Attenuated", "Killed / Inactivated"],
[
["Doses required", "Single dose usually", "Multiple doses"],
["Adjuvant needed", "No", "Yes"],
["Duration of immunity","Longer", "Shorter"],
["Level of protection", "Greater (mimics natural infection)", "Lower"],
["Immunoglobulin", "IgA and IgG", "IgG only"],
["Mucosal immunity", "Yes", "Poor"],
["Cell-mediated immunity", "Yes", "Poor"],
["Reversion to virulence", "Possible", "No"],
["Stability", "Low (needs cold chain)","High"],
["Examples", "BCG, OPV, MMR, Varicella", "IPV, whole-cell pertussis, Typhoid TAB"],
],
col_widths=[5.5*cm, 5.5*cm, 5.5*cm]
))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════
# SECTION F: EPIDEMIOLOGICAL STUDIES
# ══════════════════════════════════════════════════════════════
story.append(header_bar("SECTION F: EPIDEMIOLOGICAL STUDY DESIGNS"))
story.append(sp(4))
story.append(wide_table(
["Study Type", "Direction", "Rare Disease?", "Calculates", "Cost/Time", "Main Bias", "Best for"],
[
["Descriptive", "—", "Yes/No", "Prevalence", "Low / Short", "—", "Hypothesis generation, disease burden"],
["Cross-sectional","Simultaneous","Yes/No", "Prevalence only", "Low / Short", "—", "Vaccine coverage, disease burden"],
["Case-Control", "Backward", "YES", "Odds Ratio (OR)", "Low / Short", "Recall bias", "Rare diseases; quick hypothesis testing"],
["Cohort", "Forward", "No", "Incidence, RR", "High / Long", "Loss to follow-up","Establishing causation; multiple outcomes"],
["RCT", "Forward", "No", "Efficacy, RR", "Very High", "Minimal", "Testing interventions; gold standard"],
],
col_widths=[3*cm, 2.5*cm, 2*cm, 2.5*cm, 2*cm, 2.5*cm, 2*cm]
))
story.append(sp(8))
story.append(h2("A. Descriptive Epidemiology — 3 W's"))
story.append(wide_table(
["Question", "Dimension", "Variables Studied"],
[
["WHEN is disease occurring?", "Time distribution", "Secular trends, seasonal variation, epidemic curves, point-time"],
["WHERE is it occurring?", "Place distribution", "Geographic areas, rural/urban, spot maps, international comparison"],
["WHO is getting disease?", "Person distribution", "Age, sex, ethnicity, occupation, SES, religion, marital status, lifestyle"],
],
col_widths=[4*cm, 4*cm, 8.5*cm]
))
story.append(sp(6))
story.append(h2("B. Case-Control Study vs. Cohort Study"))
story.append(wide_table(
["Feature", "Case-Control (Retrospective)", "Cohort (Prospective)"],
[
["Starting point", "Cases (with disease) + Controls (without)", "Exposed vs. Non-exposed persons — all disease-free at start"],
["Direction", "Backward: effect → cause", "Forward: cause → effect"],
["Time orientation","Past exposures examined retrospectively", "Future outcomes followed prospectively"],
["Measure", "Odds Ratio (OR)", "Relative Risk (RR), Incidence Rate"],
["Rare diseases", "YES — efficient for rare diseases", "NO — impractical for rare diseases"],
["Advantages", "Cheap, quick, multiple exposures studied", "Establishes temporal sequence; calculates incidence; less bias"],
["Disadvantages", "Recall bias; cannot calculate incidence", "Expensive, time-consuming; loss to follow-up"],
],
col_widths=[4*cm, 6.2*cm, 6.2*cm]
))
story.append(sp(6))
story.append(h2("C. Experimental Epidemiology"))
story.append(body("Investigator <b>controls conditions</b>. Gold standard = <b>Randomized Controlled Trial (RCT)</b>."))
story.append(wide_table(
["Type", "Description", "Example"],
[
["RCT (Clinical Trial)", "Subjects randomly assigned to intervention or control", "Testing efficacy of a new vaccine"],
["Field Trial", "Conducted on healthy persons in community", "OPV field trials (Sabin vaccine)"],
["Community Trial", "Entire communities randomized", "Water fluoridation trials"],
["Animal experiment", "Tests in animals before human application", "Testing pathogenesis of leprosy in armadillos"],
],
col_widths=[4*cm, 7*cm, 5.5*cm]
))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════
# SECTION G: MEASUREMENTS IN EPIDEMIOLOGY
# ══════════════════════════════════════════════════════════════
story.append(header_bar("SECTION G: MEASUREMENTS IN EPIDEMIOLOGY"))
story.append(sp(4))
story.append(h2("Tools of Measurement"))
story.append(wide_table(
["Tool", "Definition", "Numerator includes denominator?", "Example"],
[
["RATE", "Occurrence of event in defined population over a given time; expresses RISK",
"Numerator is part of denominator", "Death rate = Deaths/Mid-year population × 1000"],
["RATIO", "Relation in size between two quantities",
"Numerator is NOT part of denominator", "Sex ratio = Males : Females"],
["PROPORTION", "Ratio expressed as percentage; numerator included in denominator",
"YES", "% hypertensives = Hypertensive/Total × 100"],
],
col_widths=[2.5*cm, 5.5*cm, 4*cm, 4.5*cm]
))
story.append(sp(8))
story.append(h2("Key Mortality Rates"))
story.append(wide_table(
["Rate", "Formula", "Multiplier", "Significance"],
[
["Crude Death Rate (CDR)", "Total deaths / Mid-year population", "× 1,000", "Overall mortality"],
["Infant Mortality Rate (IMR)", "Deaths <1 yr / Live births", "× 1,000", "⭐ Most sensitive indicator of community health"],
["Neonatal Mortality Rate", "Deaths <28 days / Live births", "× 1,000", "Reflects antenatal + delivery care quality"],
["Perinatal Mortality Rate", "(Stillbirths + Deaths <7 days) / Births", "× 1,000", "Quality of obstetric care"],
["Maternal Mortality Rate (MMR)", "Maternal deaths / Live births", "× 100,000", "Pregnancy-related deaths"],
["Case Fatality Rate (CFR)", "Deaths from disease / Cases of disease", "× 100", "Severity / virulence of disease"],
["Proportional Mortality Rate", "Deaths from cause / All deaths", "× 100", "Relative importance of a cause"],
],
col_widths=[4.5*cm, 5.5*cm, 2*cm, 4.5*cm]
))
story.append(sp(6))
story.append(h2("Incidence vs. Prevalence"))
story.append(wide_table(
["Feature", "INCIDENCE", "PREVALENCE"],
[
["Measures", "NEW cases appearing in a period", "ALL existing cases at a point/period"],
["Time", "Over a defined period", "At a point (point prevalence) or period"],
["Population", "Population at RISK (no pre-existing cases)","Total population"],
["Formula", "New cases / Pop. at risk × 1000", "All cases / Total population × 1000"],
["Use", "Studying risk and causation; dynamic", "Planning services; static measure"],
["Relationship", "—", "Prevalence ≈ Incidence × Duration"],
],
col_widths=[3.5*cm, 6.5*cm, 6.5*cm]
))
story.append(highlight_box(
"<b>Relationship:</b> Prevalence ≈ Incidence × Mean duration of disease. "
"If TB incidence = 200/100,000/yr and average duration = 2 years: "
"Prevalence ≈ 200 × 2 = <b>400/100,000</b>",
bg=LTGREEN, border=GREEN))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════
# SECTION H: LEVELS OF PREVENTION
# ══════════════════════════════════════════════════════════════
story.append(header_bar("SECTION H: LEVELS OF PREVENTION"))
story.append(sp(4))
# Summary table first
story.append(wide_table(
["Level", "Phase of Disease", "Goal", "Key Interventions", "Examples"],
[
["PRIMORDIAL", "Before risk factors develop", "Prevent emergence of risk factors", "Individual & mass education; policy changes", "Anti-smoking campaigns in schools; promoting active lifestyle in children"],
["PRIMARY", "Prepathogenesis (before disease onset)", "Prevent disease from ever occurring", "Health promotion + Specific protection", "Immunization, safe water, sanitation, chemoprophylaxis, seat belts"],
["SECONDARY", "Early pathogenesis", "Early detection & prompt treatment (EDPT)","Screening, case-finding, surveillance", "Pap smear, blood pressure screening, TB contact tracing, sputum test"],
["TERTIARY", "Late pathogenesis / disability", "Reduce disability; rehabilitate", "Rehabilitation: physical, social, vocational","Physiotherapy after stroke, DOTS for TB, prosthetics, vocational training"],
],
col_widths=[2.5*cm, 3.5*cm, 3.5*cm, 3.5*cm, 3.5*cm]
))
story.append(sp(8))
story.append(h2("Detailed Notes on Each Level"))
# Primordial
story.append(h3("1. Primordial Prevention"))
for line in [
"Newest concept; especially relevant for <b>chronic diseases</b>",
"Prevents the <b>emergence of risk factors themselves</b> in populations where they have not yet appeared",
"Targets <b>children</b> before harmful lifestyles (smoking, poor diet, inactivity) are formed",
"Main intervention: <b>Individual and mass education; policy measures</b>",
]:
story.append(body(f"• {line}"))
story.append(sp(4))
# Primary
story.append(h3("2. Primary Prevention"))
story.append(body("<b>Definition:</b> 'Action taken <i>prior to the onset of disease</i> which removes "
"the possibility that disease will ever occur.' Intervention in the <b>prepathogenesis phase</b>."))
story.append(sp(3))
story.append(wide_table(
["Approach", "What it Involves", "Examples"],
[
["Health Promotion\n(Non-specific)", "Improve overall health; positive health", "Nutrition education, safe housing, exercise, maternal/child health care, genetic counselling"],
["Specific Protection", "Target specific agents or risk factors", "Immunization, chemoprophylaxis, iodized salt, fluoridation of water, occupational hazard protection, helmets/seatbelts"],
],
col_widths=[4*cm, 5.5*cm, 7*cm]
))
story.append(sp(3))
story.append(body("<b>WHO strategies for chronic disease primary prevention:</b>"))
for line in [
"<b>Population (mass) strategy</b> — Directed at the whole population regardless of individual risk level. "
"Small reductions in average BP or cholesterol across a population produce large reductions in CVD.",
"<b>High-risk strategy</b> — Targets individuals at special risk, identified by clinical screening.",
]:
story.append(body(f"• {line}"))
story.append(sp(4))
# Secondary
story.append(h3("3. Secondary Prevention — EDPT"))
story.append(highlight_box(
"<b>EDPT = Early Diagnosis and Prompt Treatment</b> — The cornerstone of secondary prevention.",
bg=LTBLUE, border=TEAL))
story.append(sp(3))
story.append(wide_table(
["Tool", "Description", "Examples"],
[
["Mass Screening", "Apply tests to apparently healthy populations to detect pre-clinical disease", "Pap smear, mammography, blood sugar testing"],
["Case-finding", "Active search for cases in the community (not waiting for patients to present)", "TB sputum surveys, leprosy surveys"],
["Contact tracing", "Identify contacts of cases and test/treat them", "TB contacts, STI contact tracing"],
["Disease surveillance", "Continued monitoring of disease occurrence", "Weekly disease reporting by health facilities"],
],
col_widths=[3.5*cm, 7*cm, 6*cm]
))
story.append(sp(3))
story.append(h3("Wilson & Jungner Criteria for a Good Screening Program"))
for c in [
"Disease is an important health problem",
"Accepted treatment or intervention is available",
"Facilities for diagnosis and treatment are available",
"Recognized latent or early symptomatic stage exists",
"Suitable test or examination available (valid, reliable, acceptable)",
"Test is safe and acceptable to the population",
"Natural history of disease should be adequately understood",
"Cost should be economically balanced against possible expenditure on medical care",
]:
story.append(body(f"• {c}"))
story.append(sp(4))
# Tertiary
story.append(h3("4. Tertiary Prevention"))
story.append(body("Reduces or limits impairment and disability; promotes rehabilitation and reintegration."))
story.append(sp(3))
story.append(wide_table(
["Type of Rehabilitation", "Focus", "Examples"],
[
["Medical rehabilitation", "Restore physical/physiological function", "Physiotherapy, occupational therapy, prosthetics"],
["Psychological rehabilitation","Restore mental health and emotional wellbeing", "Counselling, psychotherapy, support groups"],
["Social rehabilitation", "Restore social relationships and community life","Social reintegration, home visits, family support"],
["Vocational rehabilitation", "Return to productive employment", "Skill training, modified work duties for TB/leprosy patients"],
],
col_widths=[4.5*cm, 5.5*cm, 6.5*cm]
))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════
# SECTION I: EPIDEMIC INVESTIGATION
# ══════════════════════════════════════════════════════════════
story.append(header_bar("SECTION I: EPIDEMIC INVESTIGATION"))
story.append(sp(4))
story.append(h2("Steps in Investigating an Epidemic"))
story.append(wide_table(
["Step", "Action", "Details"],
[
["1", "Confirm the diagnosis", "Verify cases are real; establish case definition; laboratory confirmation"],
["2", "Confirm existence of epidemic", "Compare current incidence to expected (baseline) — is it truly in excess?"],
["3", "Describe the epidemic", "TIME (epidemic curve), PLACE (spot map), PERSON (age, sex, occupation, habits)"],
["4", "Formulate a hypothesis", "Based on descriptive data: likely source? mode of transmission? vehicle?"],
["5", "Test the hypothesis", "Analytical study (case-control / cohort); laboratory analysis of samples, food, water"],
["6", "Implement control measures", "Eliminate source, break transmission chain, protect susceptibles (vaccination/chemoprophylaxis)"],
["7", "Report and communicate findings", "Write report to health authorities; recommendations for future prevention"],
],
col_widths=[1*cm, 4.5*cm, 11*cm]
))
story.append(sp(6))
story.append(h2("Types of Epidemics"))
story.append(wide_table(
["Type", "Description", "Epidemic Curve Pattern", "Example"],
[
["Point source", "All cases exposed at same place and time", "Sharp rapid rise; all within one incubation period", "Food poisoning at a wedding feast"],
["Propagated", "Person-to-person spread; successive generations of cases", "Multiple waves; each wave = one incubation period", "Measles in a school"],
["Continuous source", "Ongoing exposure to contaminated common source", "Prolonged plateau; no clear peak", "Cholera from ongoing polluted water supply"],
["Mixed", "Starts as point source, then propagates person-to-person", "Initial sharp peak, then prolonged tail", "Hepatitis A: contaminated food + person-to-person"],
],
col_widths=[3*cm, 4.5*cm, 4.5*cm, 4.5*cm]
))
story.append(sp(8))
# ══════════════════════════════════════════════════════════════
# SECTION J: SURVEILLANCE
# ══════════════════════════════════════════════════════════════
story.append(header_bar("SECTION J: DISEASE SURVEILLANCE"))
story.append(sp(4))
story.append(highlight_box(
"<b>Alexander Langmuir (1963):</b> 'The continued watchfulness over the distribution and trends of "
"incidence through the systematic collection, consolidation and evaluation of morbidity and mortality "
"reports and other relevant data.'",
bg=LTBLUE, border=TEAL))
story.append(sp(6))
story.append(wide_table(
["Type", "Description", "Advantage", "Disadvantage"],
[
["Passive", "Routine reporting by health facilities upward; no special effort", "Simple; low cost", "Incomplete; under-reporting"],
["Active", "Active search for cases by health workers (home visits, contact tracing)","Complete; accurate", "Resource-intensive; expensive"],
["Sentinel", "Data from selected representative sentinel sites", "Cost-effective; focused", "May miss local variation"],
["Syndromic", "Monitors symptoms/syndromes before confirmed diagnoses", "Early outbreak detection", "Non-specific; many false alarms"],
["Serological","Studies antibody levels in population", "Estimates population immunity", "Requires laboratory support"],
],
col_widths=[3*cm, 5.5*cm, 3.5*cm, 4.5*cm]
))
story.append(sp(6))
story.append(h3("Components of a Surveillance System"))
for s in ["<b>Data collection</b> — Case reporting, vital statistics, laboratory reports, field surveys",
"<b>Data compilation and analysis</b> — Tabulation, processing, and epidemiological interpretation",
"<b>Dissemination of information</b> — Sharing findings with health authorities and relevant stakeholders"]:
story.append(body(f"• {s}"))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════
# SECTION K: ROLE OF CHN
# ══════════════════════════════════════════════════════════════
story.append(header_bar("SECTION K: ROLE OF COMMUNITY HEALTH NURSE IN EPIDEMIOLOGY"))
story.append(sp(4))
story.append(wide_table(
["#", "Role", "What the CHN Does"],
[
["1", "Surveillance & Reporting", "Report notifiable diseases to health authorities; maintain disease registers"],
["2", "Case Finding", "Actively search for cases in community through home visits and outreach"],
["3", "Contact Tracing", "Identify, test, and follow up contacts of communicable disease cases"],
["4", "Health Assessment", "Conduct community health surveys, needs assessments, and family health assessments"],
["5", "Outbreak Investigation", "Assist in epidemiological investigation of outbreaks; collect data"],
["6", "Immunization", "Conduct and oversee vaccination programs; maintain cold chain"],
["7", "Screening Programs", "Participate in and manage screening for early disease detection"],
["8", "Health Education", "Educate community on disease prevention, nutrition, sanitation, lifestyle"],
["9", "Risk Factor Identification", "Identify high-risk individuals and groups using epidemiological data"],
["10", "Data Collection", "Gather morbidity/mortality data for community diagnosis and health planning"],
["11", "Referral", "Refer cases requiring higher-level diagnostic or treatment care"],
["12", "Rehabilitation Support", "Support patients and families during rehabilitation; disability prevention"],
["13", "Intersectoral Coordination", "Liaise with public health officials, physicians, community leaders, NGOs"],
["14", "Advocacy", "Advocate for resources, policies, and social determinants to prevent disease"],
],
col_widths=[0.8*cm, 4.5*cm, 11.2*cm]
))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════
# SECTION L: QUICK REVISION / EXAM CHEAT SHEET
# ══════════════════════════════════════════════════════════════
story.append(header_bar("SECTION L: QUICK REVISION — EXAM CHEAT SHEET"))
story.append(sp(4))
story.append(highlight_box(
"<b>⭐ HIGH-YIELD POINTS TO REMEMBER FOR EXAMS ⭐</b>",
bg=NAVY, border=NAVY))
story.append(sp(4))
exam_points = [
"Epidemiological triad = <b>Agent + Host + Environment</b> (+Time)",
"Natural history of disease described by <b>Leavell and Clark</b> — 2 phases: Prepathogenesis + Pathogenesis",
"4 levels of prevention: <b>Primordial → Primary → Secondary → Tertiary</b>",
"Secondary prevention = <b>EDPT</b> (Early Diagnosis and Prompt Treatment)",
"<b>Incidence</b> = NEW cases; <b>Prevalence</b> = ALL existing cases",
"<b>IMR</b> = most sensitive indicator of community health status",
"<b>Case-control study</b> = retrospective (looks backward); calculates <b>Odds Ratio</b>",
"<b>Cohort study</b> = prospective (follows forward); calculates <b>Relative Risk</b>",
"<b>RCT</b> = experimental study; <b>gold standard</b> for testing interventions",
"Carrier types: <b>Incubatory, Convalescent, Chronic, Healthy</b>",
"Herd immunity threshold for <b>measles = 92–95%</b>",
"<b>IgG</b> crosses placenta (neonatal protection); <b>IgA</b> found in secretions; <b>IgM</b> = recent infection",
"Subclinical cases are <b>MORE important</b> epidemiologically — ambulatory, undetected, maintain endemicity",
"Web of causation = <b>MacMahon</b>; removing even <b>one key link</b> can break the chain",
"<b>Nosocomial infection</b> = hospital-acquired; not present at time of admission",
"Index case ≠ Primary case: Index = <b>first to come to investigator's attention</b>",
"<b>Herd immunity</b> = basis of immunization programs; protects those who cannot be vaccinated",
"Primary case = first case in population; Secondary cases = cases from contact with primary case",
"Point source epidemic = all cases within <b>ONE incubation period</b>; sharp rise and fall",
"Surveillance by <b>Langmuir</b>: 'continued watchfulness over distribution and trends'",
]
for pt in exam_points:
story.append(body(f"✓ {pt}"))
story.append(sp(10))
story.append(h2("Master Definitions Table"))
story.append(wide_table(
["Term", "One-Line Definition"],
[
["Epidemiology", "Study of distribution and determinants of disease in populations (John Last, 1988)"],
["Incidence", "New cases per population at risk per unit time"],
["Prevalence", "All existing cases per total population at a point in time"],
["Carrier", "Person who harbours agent without disease but can transmit"],
["Herd immunity", "Group protection from disease when enough members are immune"],
["Secondary attack rate","% of susceptible contacts developing disease after exposure to primary case"],
["Screening", "Presumptive identification of unrecognised disease using rapid tests in apparently healthy persons"],
["Epidemic", "Disease occurrence clearly in excess of normal expectancy in a defined area/period"],
["Nosocomial infection", "Hospital-acquired infection — not present or incubating at time of admission"],
["Surveillance", "Continued watchfulness over disease distribution and trends (Langmuir)"],
["IMR", "Deaths under 1 year per 1,000 live births — most sensitive health indicator"],
["CFR", "Deaths from a disease / Total cases × 100 — measures disease severity"],
["Cohort study", "Prospective study following exposed vs. unexposed groups forward in time"],
["Case-control study", "Retrospective study comparing cases and controls for past exposures"],
["RCT", "Randomized controlled trial — gold standard experimental study design"],
],
col_widths=[4.5*cm, 12*cm]
))
story.append(sp(10))
# Back cover
story.append(HRFlowable(width="100%", thickness=1, color=TEAL))
story.append(sp(6))
story.append(Paragraph(
"This study guide covers all topics of <b>Unit 2: Epidemiology and Disease Prevention</b> "
"for B.Sc Nursing (5th Semester) — Community Health Nursing I. "
"Content is sourced from <b>Park's Textbook of Preventive and Social Medicine</b> "
"and aligned with the Indian Nursing Council (INC) syllabus.",
S("Disc", fontName="Helvetica", fontSize=8.5, textColor=DARKGREY,
alignment=TA_CENTER, leading=13)))
return story
# ─── Build PDF ────────────────────────────────────────────────────────────────
def main():
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
topMargin=1.4*cm,
bottomMargin=1.2*cm,
leftMargin=1.5*cm,
rightMargin=1.5*cm,
title="CHN Unit 2 - Epidemiology & Disease Prevention Study Guide",
author="Community Health Nursing - B.Sc Nursing",
subject="Epidemiology, Disease Prevention, Community Health Nursing",
)
story = build_story()
doc.build(story, onFirstPage=on_page, onLaterPages=on_page)
print(f"PDF created: {OUTPUT}")
if __name__ == "__main__":
main()