~/ncd-notes/generate_ncd_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm
from reportlab.lib.colors import HexColor, white, black
from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table,
TableStyle, PageBreak, HRFlowable)
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
from reportlab.platypus import KeepTogether
OUTPUT = "/tmp/workspace/ncd-notes/NCD_Notes_Park_Textbook.pdf"
# Colors
DARK_BLUE = HexColor("#1a3a5c")
MED_BLUE = HexColor("#2563a8")
LIGHT_BLUE = HexColor("#dbeafe")
ACCENT = HexColor("#e74c3c")
GREEN = HexColor("#16a34a")
LIGHT_GREEN = HexColor("#dcfce7")
ORANGE = HexColor("#ea580c")
LIGHT_ORANGE = HexColor("#ffedd5")
YELLOW_BG = HexColor("#fef9c3")
SECTION_BG = HexColor("#f0f4ff")
TABLE_HEADER = HexColor("#1e40af")
TABLE_ALT = HexColor("#eff6ff")
GRAY = HexColor("#6b7280")
DARK_GRAY = HexColor("#374151")
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
rightMargin=1.5*cm, leftMargin=1.5*cm,
topMargin=1.8*cm, bottomMargin=1.8*cm
)
styles = getSampleStyleSheet()
# Custom styles
title_style = ParagraphStyle("BookTitle", parent=styles["Title"],
fontSize=24, textColor=white, alignment=TA_CENTER,
spaceAfter=6, fontName="Helvetica-Bold", leading=28)
subtitle_style = ParagraphStyle("Subtitle", parent=styles["Normal"],
fontSize=12, textColor=HexColor("#bfdbfe"), alignment=TA_CENTER,
spaceAfter=4, fontName="Helvetica")
chapter_style = ParagraphStyle("Chapter", parent=styles["Heading1"],
fontSize=18, textColor=white, fontName="Helvetica-Bold",
alignment=TA_LEFT, spaceBefore=0, spaceAfter=4, leading=22)
section_style = ParagraphStyle("Section", parent=styles["Heading2"],
fontSize=13, textColor=DARK_BLUE, fontName="Helvetica-Bold",
spaceBefore=10, spaceAfter=4, borderPad=4, leading=16)
subsection_style = ParagraphStyle("Subsection", parent=styles["Heading3"],
fontSize=11, textColor=MED_BLUE, fontName="Helvetica-Bold",
spaceBefore=6, spaceAfter=2, leading=14)
body_style = ParagraphStyle("Body", parent=styles["Normal"],
fontSize=10, textColor=DARK_GRAY, fontName="Helvetica",
spaceAfter=5, leading=14, alignment=TA_JUSTIFY)
bullet_style = ParagraphStyle("Bullet", parent=styles["Normal"],
fontSize=10, textColor=DARK_GRAY, fontName="Helvetica",
spaceAfter=3, leading=13, leftIndent=15, bulletIndent=5)
important_style = ParagraphStyle("Important", parent=styles["Normal"],
fontSize=10, textColor=HexColor("#7c2d12"), fontName="Helvetica-Bold",
spaceAfter=4, leading=13, leftIndent=10,
borderColor=ACCENT, borderWidth=1, borderPad=5,
backColor=HexColor("#fee2e2"))
key_style = ParagraphStyle("Key", parent=styles["Normal"],
fontSize=10, textColor=HexColor("#14532d"), fontName="Helvetica-Bold",
spaceAfter=4, leading=13, leftIndent=10,
backColor=LIGHT_GREEN, borderPad=5)
note_style = ParagraphStyle("Note", parent=styles["Normal"],
fontSize=9.5, textColor=HexColor("#1e3a5f"), fontName="Helvetica-Oblique",
spaceAfter=4, leading=13, leftIndent=10,
backColor=LIGHT_BLUE, borderPad=4)
def chapter_header(title, subtitle=None, color=DARK_BLUE):
"""Create a visually distinct chapter header block."""
data = [[Paragraph(title, chapter_style)]]
if subtitle:
data.append([Paragraph(subtitle, ParagraphStyle("ChSub", parent=styles["Normal"],
fontSize=9.5, textColor=HexColor("#bfdbfe"), fontName="Helvetica-Italic",
alignment=TA_LEFT))])
t = Table(data, colWidths=[17.7*cm])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), color),
("TOPPADDING", (0,0), (-1,-1), 10),
("BOTTOMPADDING", (0,0), (-1,-1), 10),
("LEFTPADDING", (0,0), (-1,-1), 14),
("RIGHTPADDING", (0,0), (-1,-1), 14),
("ROUNDEDCORNERS", [6, 6, 6, 6]),
]))
return t
def section_box(title, color=SECTION_BG, text_color=DARK_BLUE):
t = Table([[Paragraph(title, ParagraphStyle("SB", parent=styles["Normal"],
fontSize=12, textColor=text_color, fontName="Helvetica-Bold", leading=15))]],
colWidths=[17.7*cm])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), color),
("TOPPADDING", (0,0), (-1,-1), 7),
("BOTTOMPADDING", (0,0), (-1,-1), 7),
("LEFTPADDING", (0,0), (-1,-1), 12),
("RIGHTPADDING", (0,0), (-1,-1), 12),
("LINEBELOW", (0,0), (-1,-1), 1.5, MED_BLUE),
]))
return t
def info_box(text, bg=LIGHT_BLUE, text_color=DARK_BLUE):
t = Table([[Paragraph(text, ParagraphStyle("IB", parent=styles["Normal"],
fontSize=9.5, textColor=text_color, fontName="Helvetica", leading=13,
alignment=TA_JUSTIFY))]],
colWidths=[17.7*cm])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING", (0,0), (-1,-1), 6),
("LEFTPADDING", (0,0), (-1,-1), 10),
("RIGHTPADDING", (0,0), (-1,-1), 10),
("BOX", (0,0), (-1,-1), 0.75, MED_BLUE),
]))
return t
def two_col_table(data_rows, headers=None, col_w=None):
if col_w is None:
col_w = [6*cm, 11.7*cm]
all_rows = []
if headers:
all_rows.append([Paragraph(h, ParagraphStyle("TH", parent=styles["Normal"],
fontSize=9.5, textColor=white, fontName="Helvetica-Bold", leading=12))
for h in headers])
for row in data_rows:
all_rows.append([Paragraph(str(c), ParagraphStyle("TC", parent=styles["Normal"],
fontSize=9.5, textColor=DARK_GRAY, fontName="Helvetica", leading=12))
for c in row])
t = Table(all_rows, colWidths=col_w)
style = [
("BACKGROUND", (0,0), (-1,0), TABLE_HEADER if headers else TABLE_ALT),
("ROWBACKGROUNDS", (0, 1 if headers else 0), (-1,-1), [white, TABLE_ALT]),
("GRID", (0,0), (-1,-1), 0.5, HexColor("#93c5fd")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 8),
("RIGHTPADDING", (0,0), (-1,-1), 8),
("VALIGN", (0,0), (-1,-1), "TOP"),
("FONTSIZE", (0,0), (-1,-1), 9.5),
]
if headers:
style.append(("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"))
style.append(("TEXTCOLOR", (0,0), (-1,0), white))
t.setStyle(TableStyle(style))
return t
def b(txt):
return f"<b>{txt}</b>"
def bullet(txt):
return Paragraph(f"• {txt}", bullet_style)
def sp(n=1):
return Spacer(1, n*0.18*cm)
# ─────────────────────────────────────────────
# BUILD STORY
# ─────────────────────────────────────────────
story = []
# ══════════════════════════════════════════════
# COVER PAGE
# ══════════════════════════════════════════════
cover_title = Table([[Paragraph(
"NON-COMMUNICABLE DISEASES",
ParagraphStyle("CT", parent=styles["Normal"],
fontSize=26, textColor=white, fontName="Helvetica-Bold",
alignment=TA_CENTER, leading=30))]],
colWidths=[17.7*cm])
cover_title.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), DARK_BLUE),
("TOPPADDING", (0,0), (-1,-1), 22),
("BOTTOMPADDING", (0,0), (-1,-1), 22),
("LEFTPADDING", (0,0), (-1,-1), 10),
("RIGHTPADDING", (0,0), (-1,-1), 10),
]))
story.append(cover_title)
story.append(sp(2))
cover_sub = Table([[Paragraph(
"Comprehensive Notes for LAQ — Strictly from Park's Textbook of Preventive and Social Medicine",
ParagraphStyle("CS", parent=styles["Normal"],
fontSize=12, textColor=DARK_BLUE, fontName="Helvetica-BoldOblique",
alignment=TA_CENTER))]],
colWidths=[17.7*cm])
cover_sub.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), LIGHT_BLUE),
("TOPPADDING", (0,0), (-1,-1), 10),
("BOTTOMPADDING", (0,0), (-1,-1), 10),
("BOX", (0,0), (-1,-1), 1.5, MED_BLUE),
]))
story.append(cover_sub)
story.append(sp(3))
topics_data = [
["1", "DIABETES MELLITUS (DM)"],
["2", "HYPERTENSION (HTN)"],
["3", "CANCER"],
["4", "BLINDNESS & VISUAL IMPAIRMENT"],
["5", "RHEUMATIC HEART DISEASE (RHD)"],
["6", "ACCIDENTS & INJURIES"],
["7", "CORONARY HEART DISEASE (CHD)"],
["8", "OBESITY"],
]
toc_rows = []
for num, topic in topics_data:
toc_rows.append([
Paragraph(num, ParagraphStyle("TN", parent=styles["Normal"],
fontSize=12, textColor=white, fontName="Helvetica-Bold",
alignment=TA_CENTER)),
Paragraph(topic, ParagraphStyle("TT", parent=styles["Normal"],
fontSize=12, textColor=DARK_BLUE, fontName="Helvetica-Bold")),
])
toc_table = Table(toc_rows, colWidths=[1.5*cm, 16.2*cm])
bg_colors = [MED_BLUE, HexColor("#0284c7"), HexColor("#0369a1"), HexColor("#075985"),
HexColor("#0c4a6e"), HexColor("#1e3a5f"), HexColor("#1e40af"), HexColor("#1d4ed8")]
toc_style = [
("TOPPADDING", (0,0), (-1,-1), 10),
("BOTTOMPADDING", (0,0), (-1,-1), 10),
("LEFTPADDING", (0,0), (-1,-1), 10),
("RIGHTPADDING", (0,0), (-1,-1), 10),
("ROWBACKGROUNDS", (0,0), (0,-1), bg_colors),
("GRID", (0,0), (-1,-1), 0.5, HexColor("#93c5fd")),
("BACKGROUND", (1,0), (1,-1), TABLE_ALT),
("ROWBACKGROUNDS", (1,0), (1,-1), [TABLE_ALT, SECTION_BG]),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]
for i, c in enumerate(bg_colors):
toc_style.append(("BACKGROUND", (0,i), (0,i), c))
toc_table.setStyle(TableStyle(toc_style))
story.append(Paragraph("TOPICS COVERED", ParagraphStyle("TH", parent=styles["Normal"],
fontSize=13, textColor=DARK_BLUE, fontName="Helvetica-Bold",
spaceBefore=8, spaceAfter=8, alignment=TA_CENTER)))
story.append(toc_table)
story.append(PageBreak())
# ══════════════════════════════════════════════
# 1. DIABETES MELLITUS
# ══════════════════════════════════════════════
story.append(chapter_header("1. DIABETES MELLITUS (DM)", "Park's Textbook of Preventive & Social Medicine", MED_BLUE))
story.append(sp(2))
story.append(section_box("DEFINITION"))
story.append(info_box(
"Diabetes describes a group of <b>metabolic disorders</b> characterized and identified by the presence of "
"<b>hyperglycaemia</b> in the absence of treatment. Includes defects in insulin secretion, insulin action, or both, "
"with disturbances of carbohydrate, fat and protein metabolism. "
"Long-term effects include <b>retinopathy, nephropathy and neuropathy</b>. "
"People with DM are at increased risk of heart, peripheral arterial and cerebrovascular disease, obesity, "
"cataracts, erectile dysfunction, non-alcoholic fatty liver disease and tuberculosis."
))
story.append(sp())
story.append(section_box("WHO CLASSIFICATION OF DIABETES (2019)"))
dm_class_data = [
["Type 1 Diabetes", "β-cell destruction (mostly immune-mediated); absolute insulin deficiency; onset in childhood/early adulthood. Sub-classes removed."],
["Type 2 Diabetes", "Most common type; β-cell dysfunction + insulin resistance; associated with overweight/obesity. Sub-classes removed."],
["Hybrid Forms", "(a) Slowly evolving immune-mediated diabetes of adults (LADA — now renamed) — features of metabolic syndrome, single GAD autoantibody, retains β-cell function.\n(b) Ketosis-prone Type 2 — presents with ketosis but later does not require insulin; not immune-mediated."],
["Other Specific Types", "• Monogenic diabetes (β-cell defects, insulin action defects)\n• Diseases of exocrine pancreas (trauma, tumour, inflammation)\n• Endocrine disorders (excess insulin antagonist hormones)\n• Drug or chemical-induced\n• Infections\n• Uncommon immune-mediated forms\n• Other genetic syndromes"],
["Hyperglycaemia first detected in pregnancy", "Includes gestational DM + diabetes in pregnancy (pre-existing undiagnosed)"],
["Unclassified DM", "Temporary category used when diagnosis is uncertain"],
]
story.append(two_col_table(dm_class_data, headers=["Type", "Description"]))
story.append(sp(2))
story.append(section_box("PROBLEM STATEMENT"))
story.append(Paragraph(b("WORLD:"), subsection_style))
story.append(bullet("493 million adults (20–79 yrs) had diabetes in 2019 (IDF); projected to 700 million by 2045."))
story.append(bullet("4.2 million deaths annually attributable to DM."))
story.append(bullet("DM is the 9th leading cause of death globally."))
story.append(bullet("374 million people with impaired glucose tolerance — at high risk."))
story.append(bullet("Prevalence higher in urban (10.8%) vs rural (7.2%) areas."))
story.append(sp())
story.append(Paragraph(b("INDIA:"), subsection_style))
story.append(bullet("India has the 2nd highest number of diabetic patients globally (~77 million)."))
story.append(bullet("The prevalence in India is 8.9% (urban) and 4–6% (rural)."))
story.append(bullet("India projected to have 134 million diabetics by 2045."))
story.append(bullet("High prevalence of Type 2 DM; onset at younger age compared to western countries."))
story.append(sp(2))
story.append(section_box("RISK FACTORS FOR TYPE 2 DM"))
story.append(Paragraph(b("Non-Modifiable:"), subsection_style))
for item in ["Age (>45 years)", "Family history (first-degree relative)", "Ethnicity (South Asians particularly susceptible)", "History of gestational DM or baby >4 kg"]:
story.append(bullet(item))
story.append(Paragraph(b("Modifiable:"), subsection_style))
for item in ["Overweight/obesity (BMI ≥25)", "Physical inactivity", "Unhealthy diet (high fat, low fibre)", "Hypertension (BP ≥140/90 mmHg)", "Dyslipidaemia", "Impaired glucose tolerance (IGT) / Impaired fasting glucose (IFG)", "Smoking", "Stress"]:
story.append(bullet(item))
story.append(sp(2))
story.append(section_box("DIAGNOSTIC CRITERIA (WHO 2006/ADA)"))
diag_data = [
["Fasting plasma glucose", "≥ 7.0 mmol/L (126 mg/dL)"],
["2-hour plasma glucose (OGTT)", "≥ 11.1 mmol/L (200 mg/dL)"],
["HbA1c", "≥ 48 mmol/mol (6.5%)"],
["Random plasma glucose + symptoms", "≥ 11.1 mmol/L (200 mg/dL)"],
["Impaired Fasting Glucose (IFG)", "Fasting glucose 6.1–6.9 mmol/L (110–125 mg/dL)"],
["Impaired Glucose Tolerance (IGT)", "2-hr OGTT 7.8–11.0 mmol/L"],
]
story.append(two_col_table(diag_data, headers=["Test", "Cut-off Value"]))
story.append(sp())
story.append(info_box("⚠ Diagnosis requires TWO positive tests on different days (unless symptoms present with single high reading)."))
story.append(sp(2))
story.append(section_box("SCREENING FOR DIABETES"))
story.append(info_box("Screening test: Fasting blood sugar or random blood sugar or HbA1c. "
"A positive screen is followed by a full OGTT. "
"Universal screening not recommended; targeted screening for high-risk groups advised. "
"Opportunistic screening at health facilities is recommended in India."))
story.append(sp(2))
story.append(section_box("COMPLICATIONS OF DIABETES"))
comp_data = [
["Microvascular", "Retinopathy (leading cause of blindness), Nephropathy (leading cause of ESRD), Neuropathy (peripheral + autonomic)"],
["Macrovascular", "Coronary artery disease (2-4x risk), Peripheral arterial disease, Cerebrovascular disease (stroke)"],
["Other", "Cataracts, Erectile dysfunction, NAFLD, Increased susceptibility to infections including TB, Foot ulcers/amputation"],
["Acute", "Diabetic ketoacidosis (DKA), Hyperosmolar hyperglycaemic state (HHS), Hypoglycaemia"],
]
story.append(two_col_table(comp_data, headers=["Category", "Complications"]))
story.append(sp(2))
story.append(section_box("PREVENTION AND CONTROL"))
story.append(Paragraph(b("Primary Prevention:"), subsection_style))
for item in ["Promote healthy diet (low fat, high fibre, reduce refined sugars)",
"Regular physical activity (≥150 min/week moderate intensity)",
"Maintain healthy body weight (BMI 18.5–24.9)",
"Avoid smoking and excessive alcohol",
"Lifestyle modification programmes for IGT/IFG individuals"]:
story.append(bullet(item))
story.append(Paragraph(b("Secondary Prevention (Early Detection):"), subsection_style))
for item in ["Regular screening of high-risk individuals",
"OGTT/FBS/HbA1c for diagnosis",
"Early treatment to prevent complications",
"Self-monitoring of blood glucose (SMBG)"]:
story.append(bullet(item))
story.append(Paragraph(b("Tertiary Prevention (Managing Complications):"), subsection_style))
for item in ["Annual eye examination (retinopathy screening)",
"Foot care and examination",
"Renal function monitoring (microalbuminuria)",
"Cardiovascular risk factor management",
"Patient education and self-management"]:
story.append(bullet(item))
story.append(sp(2))
story.append(section_box("NATIONAL PROGRAMME FOR PREVENTION & CONTROL OF CANCER, DIABETES, CVD & STROKE (NPCDCS)"))
for item in ["Launched under 12th Five Year Plan (2010 onwards); integrated with NCD programmes.",
"Objectives: Prevention and control of common NCDs (cancer, DM, CVD, stroke) through early diagnosis and treatment.",
"Activities: Opportunistic screening at PHC level; health promotion; referral linkages.",
"NCD clinics established at District Hospitals.",
"Population-level interventions: ASHA awareness, community health education.",
"Provides drugs (metformin, glipizide, insulin) at free of cost through public facilities.",
"NCD registry for data collection and surveillance."]:
story.append(bullet(item))
story.append(PageBreak())
# ══════════════════════════════════════════════
# 2. HYPERTENSION
# ══════════════════════════════════════════════
story.append(chapter_header("2. HYPERTENSION (HTN)", "Park's Textbook of Preventive & Social Medicine", HexColor("#0369a1")))
story.append(sp(2))
story.append(section_box("DEFINITION"))
story.append(info_box(
"Hypertension is defined by WHO/ISH as <b>blood pressure ≥ 140/90 mmHg</b> (systolic/diastolic). "
"It is the single most important modifiable risk factor for cardiovascular disease, stroke, renal disease and death. "
"It is often called the 'silent killer' because it is largely asymptomatic."
))
story.append(sp())
story.append(section_box("JNC CLASSIFICATION OF BLOOD PRESSURE (ADULTS ≥18 YEARS)"))
htn_class_data = [
["Normal", "< 120 mmHg", "< 80 mmHg"],
["Elevated / Pre-hypertension", "120–129 mmHg", "< 80 mmHg"],
["Stage 1 Hypertension", "130–139 mmHg", "80–89 mmHg"],
["Stage 2 Hypertension", "≥ 140 mmHg", "≥ 90 mmHg"],
["Hypertensive Crisis", "> 180 mmHg", "> 120 mmHg"],
]
t = Table(
[[Paragraph(h, ParagraphStyle("TH", parent=styles["Normal"], fontSize=9.5,
textColor=white, fontName="Helvetica-Bold")) for h in ["Category", "Systolic BP", "Diastolic BP"]]] +
[[Paragraph(c, ParagraphStyle("TC", parent=styles["Normal"], fontSize=9.5,
textColor=DARK_GRAY, fontName="Helvetica", leading=12)) for c in row]
for row in htn_class_data],
colWidths=[7*cm, 5.35*cm, 5.35*cm]
)
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), TABLE_HEADER),
("ROWBACKGROUNDS", (0,1), (-1,-1), [white, TABLE_ALT]),
("GRID", (0,0), (-1,-1), 0.5, HexColor("#93c5fd")),
("TOPPADDING", (0,0), (-1,-1), 5), ("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 8), ("RIGHTPADDING", (0,0), (-1,-1), 8),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("TEXTCOLOR", (0,0), (-1,0), white),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
story.append(t)
story.append(sp(2))
story.append(section_box("PROBLEM STATEMENT"))
story.append(Paragraph(b("WORLD:"), subsection_style))
story.append(bullet("~1.28 billion adults (30–79 yrs) have hypertension worldwide (WHO 2021)."))
story.append(bullet("Only 1 in 5 people with HTN has it under control."))
story.append(bullet("HTN is responsible for 54% of strokes and 47% of IHD."))
story.append(bullet("HTN causes approximately 10.4 million deaths annually."))
story.append(Paragraph(b("INDIA:"), subsection_style))
story.append(bullet("Prevalence: ~28.5% in urban areas, ~25% in rural areas."))
story.append(bullet("Majority are unaware of their condition — only 30–40% aware, <30% on treatment."))
story.append(sp(2))
story.append(section_box("RISK FACTORS FOR HYPERTENSION"))
story.append(Paragraph(b("1. Non-Modifiable Risk Factors:"), subsection_style))
rf_non_mod = [
["Age", "BP rises with age in both sexes; greater rise with higher initial BP. Some primitive societies with low calorie/salt intake show no age-related rise."],
["Sex", "Males have higher BP at adolescence; gap narrows in old age (post-menopausal women may exceed men)."],
["Genetic / Family History", "Polygenic inheritance. Children of 2 hypertensive parents have 45% risk; children of 2 normotensive parents have only 3% risk. Monozygotic twins more concordant than dizygotic twins."],
["Race/Ethnicity", "Higher prevalence and severity in Black populations compared to White populations."],
]
story.append(two_col_table(rf_non_mod, headers=["Factor", "Description"]))
story.append(sp())
story.append(Paragraph(b("2. Modifiable Risk Factors:"), subsection_style))
rf_mod = [
["Sodium (Salt) intake", "Strong positive association; salt restriction lowers BP. WHO recommends <5g/day salt."],
["Obesity / Overweight", "Strong positive association; weight reduction lowers BP. Central obesity (waist circumference) is an important determinant."],
["Alcohol", "Excessive alcohol raises BP; more than 3 drinks/day is hypertensive risk."],
["Physical Inactivity", "Sedentary lifestyle associated with HTN; regular exercise lowers BP."],
["Stress / Psychosocial factors", "Sustained emotional stress can elevate BP; associated with urbanisation."],
["Diet", "Low potassium, calcium, magnesium intake are associated with higher BP. High fat diet also implicated."],
["Oral Contraceptives", "Use of OCP (especially oestrogen-containing) can raise BP in susceptible women."],
["Tracking", "BP levels in childhood tend to persist into adult life — important for identifying at-risk children."],
]
story.append(two_col_table(rf_mod, headers=["Factor", "Details"]))
story.append(sp(2))
story.append(section_box("CLASSIFICATION BY AETIOLOGY"))
story.append(bullet(b("Primary / Essential Hypertension (90–95%): ") + "No identifiable cause; multifactorial."))
story.append(bullet(b("Secondary Hypertension (5–10%): ") + "Identifiable cause — renal (commonest), renovascular, endocrine (Conn's, Cushing's, phaeochromocytoma), coarctation of aorta, drugs (OCPs, steroids), pregnancy-induced."))
story.append(sp(2))
story.append(section_box("COMPLICATIONS"))
for item in ["Stroke (haemorrhagic > ischaemic)", "Coronary heart disease / MI", "Heart failure", "Renal failure / CKD", "Peripheral arterial disease", "Hypertensive retinopathy", "Aortic dissection / aneurysm"]:
story.append(bullet(item))
story.append(sp(2))
story.append(section_box("PREVENTION OF HYPERTENSION"))
story.append(Paragraph(b("Population Strategy (High-Risk Approach):"), subsection_style))
for item in ["Salt reduction in diet (<5g/day); avoid pickles, processed foods",
"Weight reduction; maintain healthy BMI",
"Regular aerobic exercise (30 min/day on most days)",
"Reduce alcohol consumption",
"Smoking cessation",
"Stress management (yoga, meditation)",
"DASH diet (Dietary Approaches to Stop Hypertension): rich in fruits, vegetables, low-fat dairy, low saturated fat"]:
story.append(bullet(item))
story.append(Paragraph(b("Secondary Prevention:"), subsection_style))
for item in ["Regular BP screening (opportunistic/community-based)",
"Treatment with antihypertensives if indicated",
"Adherence to medication (a major challenge)",
"Regular monitoring of organ damage (ECG, creatinine, urine protein, fundus)"]:
story.append(bullet(item))
story.append(sp())
story.append(info_box("NATIONAL PROGRAMME: HTN is included under NPCDCS and the India Hypertension Control Initiative (IHCI) 2017 — aims for 80% treatment coverage and 50% BP control by 2025."))
story.append(PageBreak())
# ══════════════════════════════════════════════
# 3. CANCER
# ══════════════════════════════════════════════
story.append(chapter_header("3. CANCER", "Park's Textbook of Preventive & Social Medicine", HexColor("#7c2d12")))
story.append(sp(2))
story.append(section_box("DEFINITION"))
story.append(info_box(
"Cancer is a group of diseases characterized by: (i) <b>abnormal growth of cells</b>, "
"(ii) ability to <b>invade adjacent tissues</b> and distant organs (metastasis), "
"(iii) eventual death if not controlled. Major categories: "
"<b>Carcinomas</b> (epithelial), <b>Sarcomas</b> (mesodermal/connective tissue), "
"<b>Lymphomas, Myeloma, Leukaemias</b> (bone marrow/immune system)."
))
story.append(sp(2))
story.append(section_box("PROBLEM STATEMENT"))
story.append(Paragraph(b("WORLD (GLOBOCAN 2020):"), subsection_style))
story.append(bullet("19.292 million new cancer cases; 9.958 million deaths."))
story.append(bullet("Most common cancers diagnosed: Breast > Lung > Prostate > Colon > Stomach."))
story.append(bullet("Leading causes of cancer death: Lung > Liver > Stomach > Breast > Colorectal."))
story.append(bullet("50.5 million people living with cancer (5-year prevalence)."))
story.append(bullet("22.6% males and 18.6% females risk of developing cancer before age 75."))
story.append(Paragraph(b("INDIA:"), subsection_style))
story.append(bullet("~1.39 million new cases in 2020 (GLOBOCAN); ~851,000 deaths."))
story.append(bullet("Leading cancers in MALES: Lip/oral cavity, Lung, Oesophagus, Stomach, Colorectal."))
story.append(bullet("Leading cancers in FEMALES: Breast (commonest), Cervix uteri, Ovary, Uterine corpus."))
story.append(bullet("Age-standardised incidence rate (ASIR): 99.5 per 100,000 (males); 102.1 per 100,000 (females)."))
story.append(bullet("Tobacco-related cancers account for ~35–40% of all cancers in India."))
story.append(sp(2))
story.append(section_box("CAUSES / RISK FACTORS OF CANCER"))
cancer_causes = [
["Tobacco", "Causes 30% of all cancer deaths. Associated with cancers of lung, oral cavity, pharynx, larynx, oesophagus, stomach, kidney, bladder, cervix, leukaemia. Dose-response relationship. Synergism with alcohol and asbestos for lung cancer."],
["Diet / Nutrition", "Obesity linked to cancers of breast, endometrium, colon, kidney, oesophagus. High fat diet → colorectal and breast cancer. Low fibre → colorectal cancer. Aflatoxins → hepatocellular carcinoma. Nitrosamines → gastric cancer."],
["Alcohol", "Associated with oral, pharyngeal, laryngeal, oesophageal, hepatic and breast cancers. Synergistic with tobacco."],
["Infections", "H. pylori → gastric cancer (IARC Group 1 carcinogen). HPV (types 16,18) → cervical, anal, oropharyngeal cancer. HBV/HCV → hepatocellular carcinoma. EBV → Burkitt's lymphoma, nasopharyngeal cancer. HIV → Kaposi's sarcoma."],
["Radiation", "UV radiation → skin cancer (BCC, SCC, melanoma). Ionising radiation → leukaemia, thyroid, breast, lung cancer. Radon → lung cancer."],
["Occupational carcinogens", "Asbestos → mesothelioma, lung. Benzene → leukaemia. Vinyl chloride → hepatic angiosarcoma. Aromatic amines → bladder cancer. Arsenic → lung, skin, bladder."],
["Hormones", "Oestrogen → endometrial cancer. OCP use → slight increase in breast and cervical cancer risk. Exogenous hormones."],
["Genetic / Hereditary", "BRCA1/BRCA2 mutations → breast and ovarian cancer. FAP → colorectal cancer. Li-Fraumeni syndrome. Down syndrome → leukaemia."],
["Air Pollution", "Indoor (biomass burning) and outdoor air pollution → lung cancer. Classified as Group 1 carcinogen by IARC."],
]
story.append(two_col_table(cancer_causes, headers=["Risk Factor", "Cancer Association"]))
story.append(sp(2))
story.append(section_box("CANCER PATTERNS IN INDIA"))
for item in ["Tobacco-related cancers predominate (especially oral cavity cancer due to smokeless tobacco)",
"Cervical cancer: Second most common in women (HPV-related); high burden in low-income women",
"Breast cancer: Commonest female cancer (rising trend with urbanisation)",
"Gastric cancer: Declining but still significant (H. pylori, salt-preserved foods)",
"Cancer patterns vary by region: NE India — high oropharyngeal and gastric cancers"]:
story.append(bullet(item))
story.append(sp(2))
story.append(section_box("CANCER CONTROL STRATEGIES"))
story.append(Paragraph(b("1. Primary Prevention:"), subsection_style))
for item in ["Anti-tobacco measures (COTPA Act; taxation; cessation programmes)",
"Healthy diet (fruits, vegetables, fibre-rich foods)",
"Vaccination: HPV vaccine (cervical cancer prevention — given to girls 9–14 yrs), HBV vaccine (liver cancer prevention)",
"Reduce occupational and environmental carcinogen exposure",
"Reduce alcohol consumption",
"Sun protection (sunscreens, protective clothing)",
"Reduce obesity; increase physical activity"]:
story.append(bullet(item))
story.append(Paragraph(b("2. Secondary Prevention (Early Detection / Screening):"), subsection_style))
story.append(info_box("Screening is beneficial only when: disease has an asymptomatic period, effective treatment available, test is acceptable and affordable."))
screen_data = [
["Cervical Cancer", "PAP smear (every 3 yrs from 21–65 yrs), HPV DNA testing; Visual Inspection with Acetic acid (VIA) — recommended in India"],
["Breast Cancer", "Clinical Breast Examination (CBE), Mammography (50–69 yrs every 2 yrs), Self-Breast Examination (SBE) for awareness"],
["Oral Cancer", "Visual inspection of oral cavity — high yield in tobacco users; biopsy of suspicious lesions"],
["Colorectal Cancer", "FOBT (Faecal Occult Blood Test), Colonoscopy (every 10 yrs from age 50)"],
["Lung Cancer", "Low-dose CT (LDCT) for high-risk smokers (50–80 yrs, ≥20 pack-years) — not yet routine in India"],
]
story.append(two_col_table(screen_data, headers=["Cancer Site", "Screening Method"]))
story.append(sp())
story.append(Paragraph(b("3. Cancer Registration:"), subsection_style))
story.append(bullet("Population-Based Cancer Registries (PBCR) and Hospital-Based Cancer Registries (HBCR)."))
story.append(bullet("National Cancer Registry Programme (NCRP) under ICMR."))
story.append(bullet("Data used for cancer surveillance, planning, evaluation."))
story.append(sp())
story.append(Paragraph(b("4. Tertiary Prevention:"), subsection_style))
for item in ["Treatment: Surgery, radiotherapy, chemotherapy, immunotherapy, palliative care",
"Rehabilitation: psychological, functional, social",
"Palliative care: WHO pain ladder for cancer pain management"]:
story.append(bullet(item))
story.append(sp(2))
story.append(section_box("NATIONAL CANCER CONTROL PROGRAMME (NCCP)"))
for item in ["Launched in 1975; revised in 1984 and 2004.",
"Objectives: Prevention of tobacco-related cancers; early detection; treatment at regional cancer centres.",
"Activities: Tobacco control, cancer education, setting up Regional Cancer Centres (RCCs), District Cancer Control Programme.",
"Now subsumed under NPCDCS.",
"Ayushman Bharat (PMJAY) provides cancer treatment coverage.",
"National Cancer Grid (NCG): Network of cancer centres for equal access."]:
story.append(bullet(item))
story.append(PageBreak())
# ══════════════════════════════════════════════
# 4. BLINDNESS
# ══════════════════════════════════════════════
story.append(chapter_header("4. BLINDNESS & VISUAL IMPAIRMENT", "Park's Textbook of Preventive & Social Medicine", HexColor("#065f46")))
story.append(sp(2))
story.append(section_box("DEFINITION (WHO)"))
story.append(info_box(
"<b>WHO Definition:</b> Blindness is defined as <b>visual acuity of less than 3/60 (Snellen) or its equivalent</b> "
"(proposed by WHO for national and international comparability, adopted at 25th World Health Assembly, 1972)."
))
story.append(sp())
story.append(Paragraph(b("ICD-11 (2018) Classification of Visual Impairment:"), subsection_style))
blind_class_data = [
["Distance Vision: Mild", "Presenting visual acuity worse than 6/12"],
["Distance Vision: Moderate", "Presenting visual acuity worse than 6/18"],
["Distance Vision: Severe", "Presenting visual acuity worse than 6/60"],
["Distance Vision: Blindness", "Presenting visual acuity worse than 3/60"],
["Near Vision Impairment", "Presenting near vision acuity worse than N6 or M0.8 at 40 cm with existing correction"],
]
story.append(two_col_table(blind_class_data, headers=["Category", "Criterion"]))
story.append(sp(2))
story.append(section_box("PROBLEM STATEMENT"))
story.append(Paragraph(b("WORLD:"), subsection_style))
story.append(bullet("1 billion people have vision impairment that could have been prevented or is yet to be addressed."))
story.append(bullet("This includes: unaddressed refractive error (123.7 million), cataract (65.2 million), glaucoma (6.9 million), corneal opacities (4.2 million), diabetic retinopathy (3 million), trachoma (2 million), near vision impairment due to presbyopia (826 million)."))
story.append(bullet("About 80% of blindness is avoidable (treatable or preventable)."))
story.append(Paragraph(b("INDIA:"), subsection_style))
story.append(bullet("India has the largest number of blind people globally (~8–12 million)."))
story.append(bullet("Blindness prevalence: ~1.1% (National Blindness & Visual Impairment Survey 2019): 0.36% for blindness."))
story.append(bullet("Cataract accounts for ~66% of blindness in India."))
story.append(bullet("India contributed ~20% of the world's blind population."))
story.append(sp(2))
story.append(section_box("CAUSES OF BLINDNESS IN INDIA"))
blind_causes = [
["1", "Cataract (commonest)", "~66% of blindness in India — most important cause; largely treatable"],
["2", "Refractive errors", "Second commonest — uncorrected; most common cause of visual impairment globally"],
["3", "Glaucoma", "Leading cause of irreversible blindness; open-angle commonest"],
["4", "Diabetic retinopathy", "Increasing with rise in DM prevalence; leading cause in working-age adults"],
["5", "Corneal blindness", "Post-infective (trachoma, vitamin A deficiency, trauma), corneal ulcers"],
["6", "Trachoma", "Caused by Chlamydia trachomatis; affects cornea via trichiasis and entropion; WHO target for elimination"],
["7", "Vitamin A Deficiency (VAD)", "Causes keratomalacia and xerophthalmia, particularly in children under 5"],
["8", "Retinitis pigmentosa", "Genetic cause; progressive; no treatment"],
["9", "Age-related macular degeneration (ARMD)", "Increasing in elderly; leading cause of blindness in developed countries"],
]
t = Table(
[[Paragraph(h, ParagraphStyle("TH", parent=styles["Normal"], fontSize=9.5,
textColor=white, fontName="Helvetica-Bold")) for h in ["#", "Cause", "Notes"]]] +
[[Paragraph(c, ParagraphStyle("TC", parent=styles["Normal"], fontSize=9.5,
textColor=DARK_GRAY, fontName="Helvetica", leading=12)) for c in row]
for row in blind_causes],
colWidths=[0.8*cm, 5.2*cm, 11.7*cm]
)
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), TABLE_HEADER),
("ROWBACKGROUNDS", (0,1), (-1,-1), [white, TABLE_ALT]),
("GRID", (0,0), (-1,-1), 0.5, HexColor("#93c5fd")),
("TOPPADDING", (0,0), (-1,-1), 5), ("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6), ("RIGHTPADDING", (0,0), (-1,-1), 6),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("TEXTCOLOR", (0,0), (-1,0), white),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
story.append(t)
story.append(sp(2))
story.append(section_box("PREVENTION OF BLINDNESS"))
story.append(Paragraph(b("Primary Prevention:"), subsection_style))
for item in ["Vitamin A supplementation (children 6 months–5 years; 2 lakh IU every 6 months)",
"Control of trachoma (SAFE strategy: Surgery for trichiasis, Antibiotics, Facial cleanliness, Environmental improvement)",
"Vaccination against measles (corneal scarring prevention)",
"Control of nutritional deficiency diseases",
"Safe eye care practices; injury prevention",
"Occupational eye safety (goggles, protective gear)"]:
story.append(bullet(item))
story.append(Paragraph(b("Secondary Prevention:"), subsection_style))
for item in ["Cataract surgery (target: Cataract Surgical Rate/CSR ≥4000 per million population)",
"Spectacles for refractive errors (school screening programmes)",
"IOP measurement and management for glaucoma (early treatment prevents blindness)",
"Diabetic retinopathy screening in all DM patients",
"Early treatment of trachoma with azithromycin (single dose)"]:
story.append(bullet(item))
story.append(sp(2))
story.append(section_box("NATIONAL PROGRAMME FOR CONTROL OF BLINDNESS (NPCB) — Now NPCBVI"))
for item in ["Launched in 1976; renewed as National Programme for Control of Blindness and Visual Impairment (NPCBVI).",
"Vision 2020: The Right to Sight — Global initiative launched 1999 (WHO + IAPB); India joined for elimination of avoidable blindness.",
"Target: Reduce prevalence of blindness to 0.3% by 2020.",
"Key activities: Free cataract surgery (target 6 million/year), school screening for refractive errors, free spectacles to school children, training of ophthalmic staff.",
"Vitamin A supplementation programme under NPCBVI.",
"Diabetic retinopathy screening and laser treatment.",
"Low vision care services.",
"District Blindness Control Societies (DBCS) for implementation.",
"Indicators monitored: CSR, backlog cataract cases, visual outcomes."]:
story.append(bullet(item))
story.append(PageBreak())
# ══════════════════════════════════════════════
# 5. RHEUMATIC HEART DISEASE
# ══════════════════════════════════════════════
story.append(chapter_header("5. RHEUMATIC HEART DISEASE (RHD)", "Park's Textbook of Preventive & Social Medicine", HexColor("#1e3a5f")))
story.append(sp(2))
story.append(section_box("DEFINITION AND PATHOGENESIS"))
story.append(info_box(
"<b>Rheumatic Fever (RF)</b> is a febrile disease affecting connective tissues (particularly heart and joints) "
"initiated by infection of the throat by <b>Group A Beta-haemolytic Streptococci (GABHS)</b>. "
"Although RF is not itself communicable, it results from a communicable disease (streptococcal pharyngitis). "
"RF often leads to <b>Rheumatic Heart Disease (RHD)</b>, a crippling disease with valvular damage. "
"<b>RHD is one of the most readily preventable chronic diseases.</b>"
))
story.append(sp())
story.append(Paragraph(b("Consequences of RHD:"), subsection_style))
for item in ["Continuing damage to the heart valves",
"Increasing disabilities",
"Repeated hospitalisation",
"Premature death usually by age 35 years or even earlier",
"Valve lesions: Mitral stenosis (commonest), Mitral regurgitation, Aortic valve disease"]:
story.append(bullet(item))
story.append(sp(2))
story.append(section_box("PROBLEM STATEMENT"))
story.append(Paragraph(b("WORLD:"), subsection_style))
story.append(bullet("Over 15 million cases of RHD worldwide; 282,000 new cases annually."))
story.append(bullet("220,000 deaths from RHD in 2008 (~0.4% of total deaths)."))
story.append(bullet("RHD is the most common cause of mitral insufficiency and stenosis globally."))
story.append(bullet("Severity correlates with: number of RF attacks, delay in starting therapy, female sex (more severe in females)."))
story.append(bullet("60–80% of RF-related valve insufficiency resolves with adherence to antibiotic prophylaxis."))
story.append(bullet("Declining in affluent countries (North America, Western Europe, Japan) due to improved socio-economic conditions."))
story.append(Paragraph(b("INDIA:"), subsection_style))
story.append(bullet("Prevalence: 5–7 per 1000 in the 5–15 year age group."))
story.append(bullet("~1 million RHD cases in India."))
story.append(bullet("RHD constitutes 20–30% of hospital admissions due to CVD in India."))
story.append(bullet("Streptococcal infections are very common in children living in underprivileged conditions."))
story.append(sp(2))
story.append(section_box("RISK FACTORS / DETERMINANTS"))
rhd_rf = [
["Host Factors", "• Age: Peak 5–15 years\n• Sex: Females more severely affected\n• Genetic susceptibility (certain HLA types)\n• Previous RF attacks (recurrence risk)\n• Malnutrition and poor immune status"],
["Agent Factors", "• Group A Beta-haemolytic Streptococcus (GABHS)\n• Specific M protein serotypes (rheumatogenic strains)\n• Throat infection (pharyngitis) — NOT skin infection\n• Molecular mimicry between streptococcal antigens and cardiac tissue"],
["Environmental Factors", "• Overcrowding (facilitates droplet spread)\n• Poor housing and sanitation\n• Low socio-economic status\n• Tropical and subtropical climates\n• Lack of access to healthcare"],
]
story.append(two_col_table(rhd_rf, headers=["Factor", "Details"]))
story.append(sp(2))
story.append(section_box("JONES CRITERIA FOR RHEUMATIC FEVER (Modified 2015)"))
story.append(Paragraph(b("Major Criteria (JONES):"), subsection_style))
jones_major = [
["J", "Joints — Migratory polyarthritis (large joints; most common manifestation)"],
["O", "Oh! Carditis — Pancarditis; mitral regurgitation (most important for RHD)"],
["N", "Nodules — Subcutaneous nodules (painless, over bony prominences)"],
["E", "Erythema marginatum (rash on trunk; non-itchy)"],
["S", "Sydenham's chorea (involuntary movements; 'St Vitus' dance')"],
]
t = Table(
[[Paragraph(h, ParagraphStyle("TH", parent=styles["Normal"], fontSize=9.5,
textColor=white, fontName="Helvetica-Bold")) for h in ["Mnemonic", "Major Criterion"]]] +
[[Paragraph(c, ParagraphStyle("TC", parent=styles["Normal"], fontSize=9.5,
textColor=DARK_GRAY, fontName="Helvetica", leading=12)) for c in row]
for row in jones_major],
colWidths=[1.5*cm, 16.2*cm]
)
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), TABLE_HEADER),
("ROWBACKGROUNDS", (0,1), (-1,-1), [white, TABLE_ALT]),
("GRID", (0,0), (-1,-1), 0.5, HexColor("#93c5fd")),
("TOPPADDING", (0,0), (-1,-1), 5), ("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 8), ("RIGHTPADDING", (0,0), (-1,-1), 8),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("TEXTCOLOR", (0,0), (-1,0), white),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
story.append(t)
story.append(sp())
story.append(Paragraph(b("Minor Criteria:"), subsection_style))
for item in ["Fever", "Elevated ESR / CRP", "Prolonged PR interval (ECG)", "Arthralgia (if arthritis not counted as major)"]:
story.append(bullet(item))
story.append(info_box("Diagnosis of RF requires: 2 Major OR 1 Major + 2 Minor criteria, PLUS evidence of preceding GABHS infection (positive throat culture / elevated ASO titre)."))
story.append(sp(2))
story.append(section_box("PREVENTION OF RHD — 3 LEVELS"))
story.append(Paragraph(b("Primordial Prevention:"), subsection_style))
story.append(bullet("Improve socio-economic conditions, housing, reduce overcrowding"))
story.append(bullet("Improve nutrition (avoid malnutrition)"))
story.append(Paragraph(b("Primary Prevention (Preventing RF after Streptococcal Throat Infection):"), subsection_style))
story.append(bullet("Prompt treatment of streptococcal pharyngitis with PENICILLIN (drug of choice) for 10 days."))
story.append(bullet("Benzathine Penicillin G: single IM injection 1.2 MU (adults), 0.6 MU (children <30 kg)."))
story.append(bullet("Oral Penicillin V: 250 mg twice daily for 10 days."))
story.append(bullet("Erythromycin for penicillin-allergic patients."))
story.append(Paragraph(b("Secondary Prevention (Prophylaxis against RF Recurrence):"), subsection_style))
story.append(bullet("Long-term benzathine penicillin G every 3–4 weeks IM."))
story.append(bullet("Duration: Until age 18–25 years (or longer if RHD present — at least 10 years after last attack or until 40 years if significant valvular disease)."))
story.append(bullet("Register-based programme to ensure compliance."))
story.append(Paragraph(b("Tertiary Prevention:"), subsection_style))
for item in ["Surgical treatment of valvular disease (valvotomy, valve replacement)",
"Prophylaxis for infective endocarditis before dental/surgical procedures",
"Regular follow-up at cardiology clinics"]:
story.append(bullet(item))
story.append(sp(2))
story.append(section_box("NATIONAL PROGRAMME"))
story.append(info_box("India has a National Rheumatic Fever / RHD Control Programme with register-based secondary prophylaxis. Included under NPCDCS framework. School health programmes for streptococcal throat infection screening. WHO's 'Ending the Neglect and Achieving Milestones for Rheumatic Heart Disease' initiative (ENARM-RHD)."))
story.append(PageBreak())
# ══════════════════════════════════════════════
# 6. ACCIDENTS
# ══════════════════════════════════════════════
story.append(chapter_header("6. ACCIDENTS & INJURIES", "Park's Textbook of Preventive & Social Medicine", HexColor("#92400e")))
story.append(sp(2))
story.append(section_box("DEFINITION"))
story.append(info_box(
"<b>Accident</b> (WHO Advisory Group, 1956): 'An unpremeditated event resulting in recognizable damage.' "
"Also defined as 'an occurrence in a sequence of events which usually produces unintended injury, death or property damage.' "
"Accidents represent a major epidemic of non-communicable disease in the present century. "
"They are <b>no longer considered truly accidental</b> — most are preventable and follow identifiable epidemiological patterns."
))
story.append(sp(2))
story.append(section_box("EPIDEMIOLOGICAL CHARACTERISTICS"))
for item in ["Follow the epidemiological triad: Agent + Host + Environment",
"Occur more frequently in certain age groups, times of day/week, and localities",
"Some individuals are more accident-prone than others",
"Risk increased by alcohol/drugs, fatigue, poor visibility, unsafe equipment",
"Majority of accidents are preventable"]:
story.append(bullet(item))
story.append(sp(2))
story.append(section_box("MEASUREMENT OF ACCIDENTS"))
acc_measure = [
["Mortality", "• Proportional mortality rate (PMR): deaths due to accidents per 100/1000 total deaths\n• Deaths per million population\n• Death rate per 1000 registered vehicles per year\n• Accidents/fatalities per km or per passenger-km\n• 'Killed' = person who died within 30 days of the accident"],
["Morbidity", "• Serious injuries vs. slight injuries\n• Abbreviated Injury Scale (AIS) to assess seriousness\n• Less reliable due to under-reporting"],
["Disability", "• Temporary/permanent, partial/total disability\n• ICF (International Classification of Functioning, Disability and Health) by WHO"],
]
story.append(two_col_table(acc_measure, headers=["Measure", "Details"]))
story.append(sp(2))
story.append(section_box("PROBLEM STATEMENT"))
story.append(Paragraph(b("WORLD:"), subsection_style))
story.append(bullet("Road traffic injuries (RTIs) kill ~1.35 million people annually; 20–50 million non-fatal injuries."))
story.append(bullet("RTIs are the leading cause of death in 5–29 year age group."))
story.append(bullet("90% of road traffic deaths occur in low- and middle-income countries."))
story.append(bullet("Falls, drowning, burns are other major causes of unintentional injury deaths."))
story.append(Paragraph(b("INDIA:"), subsection_style))
story.append(bullet("India accounts for ~11% of global road accident deaths."))
story.append(bullet(">400,000 road accidents/year; ~150,000 deaths; ~500,000 grievously injured."))
story.append(bullet("Two-wheelers involved in ~35% of road accident deaths."))
story.append(sp(2))
story.append(section_box("TYPES OF ACCIDENTS"))
story.append(Paragraph(b("1. ROAD TRAFFIC ACCIDENTS (RTAs) — Most Important"), subsection_style))
story.append(Paragraph(b("Risk Factors:"), body_style))
rta_rf = [
["Human Factors (Host)", "Speeding, drunken driving, driver fatigue, non-use of helmets/seat belts, driver age (<25 yrs), inexperience, distraction (mobile phones), medical conditions"],
["Vehicle Factors (Agent)", "Mechanical failures (brakes, lights), vehicle overloading, poorly maintained vehicles, vehicle design"],
["Road/Environmental Factors", "Poor road design, lack of street lighting, adverse weather, poor visibility, insufficient pedestrian infrastructure"],
]
story.append(two_col_table(rta_rf, headers=["Factor Category", "Specific Factors"]))
story.append(sp())
story.append(Paragraph(b("Prevention of RTAs (Haddon Matrix Approach):"), body_style))
rta_prev = [
["Pre-crash (Primary)", "Speed limits; drunk driving laws (BAC limit 0.03% India); licensing standards; road design; pedestrian crossings; helmets/seat belts legislation"],
["Crash (Secondary)", "Airbags; seat belt use; crumple zones; safety helmets; vehicle crashworthiness standards"],
["Post-crash (Tertiary)", "Emergency medical services (EMS); trauma care within golden hour; rehabilitation; Good Samaritan law"],
]
story.append(two_col_table(rta_prev, headers=["Phase", "Measures"]))
story.append(sp(2))
story.append(Paragraph(b("2. DOMESTIC ACCIDENTS"), subsection_style))
for item in ["Common in children <5 years and elderly >65 years",
"Types: Falls (commonest), Burns, Drowning, Poisoning, Suffocation, Electrocution",
"Prevention: Safety catches on cupboards, stair gates, smoke alarms, safe storage of medicines/chemicals, supervision of children",
"Burns prevention: Safe cooking practices, keeping hot liquids out of reach, fire safety"]:
story.append(bullet(item))
story.append(sp())
story.append(Paragraph(b("3. INDUSTRIAL / OCCUPATIONAL ACCIDENTS"), subsection_style))
for item in ["Governed by Factories Act (in India): mandatory reporting, safety standards",
"Types: Machinery accidents, falls, burns, chemical exposure, electrical injuries",
"Prevention: Engineering controls, PPE, safety training, supervision, fatigue management",
"Accident triangle (Heinrich's Law): 1 major injury : 29 minor injuries : 300 near-misses"]:
story.append(bullet(item))
story.append(sp())
story.append(Paragraph(b("4. RAILWAY ACCIDENTS"), subsection_style))
for item in ["Include derailments, level crossing accidents, platform accidents",
"Prevention: Level crossing gates, track inspection, signal systems, fencing"]:
story.append(bullet(item))
story.append(sp(2))
story.append(section_box("GENERAL PREVENTION OF ACCIDENTS (HADDON STRATEGY)"))
had_data = [
["Prevent the hazard from occurring", "Remove alcohol from drivers; reduce speed"],
["Reduce the amount of hazard created", "Speed limiters; reduce blood alcohol limits"],
["Prevent release of existing hazard", "Guard rails; airbags; seat belts"],
["Modify the rate/spatial distribution of hazard release", "Crash helmets; crumple zones"],
["Separate the hazard from people in time/space", "Pedestrian overpasses; bicycle lanes"],
["Interpose barrier between hazard and person", "Crash barriers on highways"],
["Modify basic qualities of hazard", "Safer vehicle design"],
["Strengthen resistance of those at risk", "Physical fitness; education"],
["Counter the damage already done", "Emergency medical care; rehabilitation"],
["Stabilize, rehabilitate and reintegrate the injured person", "Long-term care and support"],
]
story.append(two_col_table(had_data, headers=["Strategy", "Example"]))
story.append(sp(2))
story.append(section_box("NATIONAL INITIATIVES"))
for item in ["Road Safety Policy — National Road Safety Council (NRSC) under Ministry of Road Transport & Highways",
"Motor Vehicles (Amendment) Act 2019: Increased penalties for traffic violations, mandatory testing",
"Helmet law enforcement; seat belt laws",
"Decade of Action for Road Safety 2021–2030 (WHO/UN)",
"Vahan database for vehicle tracking; IRAD app for accident reporting",
"National Trauma Care Programme under Ministry of Health"]:
story.append(bullet(item))
story.append(PageBreak())
# ══════════════════════════════════════════════
# 7. CORONARY HEART DISEASE
# ══════════════════════════════════════════════
story.append(chapter_header("7. CORONARY HEART DISEASE (CHD)", "Park's Textbook of Preventive & Social Medicine", HexColor("#7c3aed")))
story.append(sp(2))
story.append(section_box("DEFINITION"))
story.append(info_box(
"<b>CHD (syn: Ischaemic Heart Disease)</b> is defined as 'impairment of heart function due to inadequate blood flow to the heart "
"compared to its needs, caused by obstructive changes in the coronary circulation' (WHO). "
"The WHO considers CHD as our modern <b>'epidemic'</b> — a disease affecting populations, not an unavoidable attribute of ageing. "
"It is responsible for <b>25–30% of deaths</b> in most industrialised countries."
))
story.append(sp())
story.append(Paragraph(b("Clinical Presentations:"), subsection_style))
for item in ["(a) Angina pectoris of effort",
"(b) Myocardial infarction (MI) — specific to CHD",
"(c) Irregularities of the heart (arrhythmias)",
"(d) Cardiac failure",
"(e) Sudden cardiac death"]:
story.append(bullet(item))
story.append(sp(2))
story.append(section_box("MEASURING THE BURDEN OF CHD"))
chd_burden = [
["Proportional Mortality Ratio", "CHD causes ~30% of deaths in men, ~25% in women in Western countries"],
["Loss of Life Expectancy", "Men gain 3.4–9.4 years; women gain even more if CHD eliminated"],
["CHD Incidence Rate", "Sum of fatal + non-fatal attack rates; mortality used as crude indicator"],
["Age-Specific Death Rates", "Used to study aetiology and true increase in incidence"],
["Prevalence Rate", "Estimated by ECG evidence of infarction + history of prolonged chest pain in cross-sectional surveys"],
]
story.append(two_col_table(chd_burden, headers=["Measure", "Details"]))
story.append(sp(2))
story.append(section_box("RISK FACTORS FOR CHD"))
story.append(Paragraph(b("I. MAJOR RISK FACTORS (Causally Linked — Modifiable):"), subsection_style))
chd_rf_major = [
["1. Serum Cholesterol (Hyperlipidaemia)", "Strong positive linear relationship. LDL cholesterol is atherogenic; HDL is protective. Triglycerides independently predictive. Total cholesterol >200 mg/dL is a risk. Diet, lifestyle, drugs can modify levels."],
["2. Hypertension", "Single most useful test for identifying high-risk individuals. Both systolic and diastolic BP are predictors. Hypertension accelerates atherosclerosis (especially with hyperlipidaemia). Synergistic with smoking."],
["3. Cigarette Smoking", "Responsible for 25% of CHD deaths under age 65 in men. Dose-response relationship with cigarettes/day. Synergistic with HTN and elevated cholesterol. Risk falls within 1 year of cessation; equals non-smokers after 10–20 years. Reduces fatal recurrence risk by 50% if stopped after MI."],
["4. Diabetes Mellitus", "2–3x increase in CHD risk. DM accelerates atherosclerosis. Women with DM lose their sex-protective advantage for CHD."],
["5. Obesity", "Contributes to CHD risk independently and through HTN, DM, dyslipidaemia. Central/abdominal obesity (waist:hip ratio) is more significant than total obesity."],
["6. Physical Inactivity", "Sedentary lifestyle is independent risk factor. Physical activity raises HDL, lowers LDL, reduces BP, improves insulin sensitivity."],
]
story.append(two_col_table(chd_rf_major, headers=["Risk Factor", "Details"]))
story.append(sp())
story.append(Paragraph(b("II. NON-MODIFIABLE RISK FACTORS:"), subsection_style))
for item in ["Age: CHD risk increases with age (atherosclerosis is progressive)",
"Sex: Males > females before menopause; after menopause women's risk approaches men's",
"Family history / Genetics: Strong family history doubles risk; polygenic trait",
"Race/Ethnicity: South Asians have disproportionately high CHD risk"]:
story.append(bullet(item))
story.append(sp())
story.append(Paragraph(b("III. OTHER / CONTRIBUTING RISK FACTORS:"), subsection_style))
for item in ["Psychosocial factors (Type A personality, stress, hostility, depression)",
"Oral contraceptive pills (especially in smokers)",
"Alcohol (J-shaped relationship — moderate protective, heavy harmful)",
"Dietary factors (trans fats, saturated fats, low omega-3)",
"Thrombogenic factors (fibrinogen, clotting factors)",
"Soft water (low in calcium/magnesium)",
"Homocysteine elevation"]:
story.append(bullet(item))
story.append(sp(2))
story.append(section_box("NATURAL HISTORY OF CHD"))
for item in ["Atherosclerosis begins in childhood (fatty streaks seen in aorta of children)",
"Silent phase for decades before clinical manifestation",
"Progression: Fatty streak → fibrous plaque → complicated plaque (calcification, ulceration, thrombosis)",
"Acute events: Plaque rupture + thrombus formation → MI or unstable angina",
"Sudden death may be the first manifestation (~30% of CHD deaths occur within 30 min of onset)"]:
story.append(bullet(item))
story.append(sp(2))
story.append(section_box("PREVENTION OF CHD"))
story.append(Paragraph(b("a. Population Strategy (Rose Strategy):"), subsection_style))
story.append(info_box("Shift the whole population risk factor distribution towards healthier levels — even small reductions across entire population produce large absolute reductions in disease."))
for item in ["Dietary changes: Reduce saturated fat, increase fruits/vegetables/fibre, reduce salt, Mediterranean diet",
"Physical activity promotion",
"Anti-smoking campaigns; tobacco control policies",
"Alcohol reduction",
"Stress reduction; psychosocial wellbeing"]:
story.append(bullet(item))
story.append(sp())
story.append(Paragraph(b("b. High-Risk Strategy:"), subsection_style))
story.append(info_box("Identify and treat individuals with multiple/elevated risk factors. Oslo Heart Study, Lipid Research Clinics Study showed feasibility. Limitation: >50% of CHD occurs in those NOT apparently at special risk."))
for item in ["Identify high-risk individuals by BP, serum cholesterol, smoking status, family history, DM, obesity",
"Treat hypertension aggressively",
"Statin therapy for dyslipidaemia",
"Smoking cessation support",
"DM control",
"Antiplatelet therapy (aspirin) in high-risk groups"]:
story.append(bullet(item))
story.append(sp())
story.append(Paragraph(b("c. Secondary Prevention:"), subsection_style))
for item in ["Prevent recurrence and progression after first event",
"Cessation of smoking: Most effective single intervention — reduces fatal recurrence by 20–50%",
"Beta-blockers: Reduce CHD mortality in post-MI patients by ~25%",
"ACE inhibitors, statins, antiplatelet agents (aspirin)",
"Cardiac rehabilitation",
"Coronary surgery (CABG), angioplasty (PTCA) for selected cases"]:
story.append(bullet(item))
story.append(sp(2))
story.append(section_box("NATIONAL PROGRAMME (NPCDCS)"))
story.append(info_box("CHD prevention is part of NPCDCS (National Programme for Prevention and Control of Cancer, Diabetes, CVD and Stroke). Includes opportunistic screening, NCD clinics at district hospitals, lifestyle counselling, free essential medicines."))
story.append(PageBreak())
# ══════════════════════════════════════════════
# 8. OBESITY
# ══════════════════════════════════════════════
story.append(chapter_header("8. OBESITY", "Park's Textbook of Preventive & Social Medicine", HexColor("#065f46")))
story.append(sp(2))
story.append(section_box("DEFINITION"))
story.append(info_box(
"Obesity is defined as an <b>abnormal growth of adipose tissue</b> due to an enlargement of fat cell size "
"(<b>hypertrophic obesity</b>) or an increase in fat cell number (<b>hyperplastic obesity</b>) or a combination. "
"Overweight is usually due to obesity but can arise from abnormal muscle development or fluid retention. "
"Expressed in terms of <b>Body Mass Index (BMI)</b>."
))
story.append(sp(2))
story.append(section_box("ASSESSMENT OF OBESITY"))
story.append(Paragraph(b("1. Body Mass Index (BMI) — MOST WIDELY USED"), subsection_style))
story.append(info_box("BMI = Weight (kg) / Height² (m²)"))
bmi_data = [
["< 18.5", "Underweight"],
["18.5 – 24.9", "Normal / Healthy weight"],
["25.0 – 29.9", "Overweight / Pre-obese"],
["30.0 – 34.9", "Obese Class I"],
["35.0 – 39.9", "Obese Class II"],
["≥ 40.0", "Obese Class III (Morbid obesity)"],
]
t_bmi = Table(
[[Paragraph(h, ParagraphStyle("TH", parent=styles["Normal"], fontSize=9.5,
textColor=white, fontName="Helvetica-Bold")) for h in ["BMI (kg/m²)", "Classification"]]] +
[[Paragraph(c, ParagraphStyle("TC", parent=styles["Normal"], fontSize=9.5,
textColor=DARK_GRAY, fontName="Helvetica", leading=12)) for c in row]
for row in bmi_data],
colWidths=[5*cm, 12.7*cm]
)
t_bmi.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), TABLE_HEADER),
("ROWBACKGROUNDS", (0,1), (-1,-1), [white, TABLE_ALT]),
("GRID", (0,0), (-1,-1), 0.5, HexColor("#93c5fd")),
("TOPPADDING", (0,0), (-1,-1), 5), ("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 8), ("RIGHTPADDING", (0,0), (-1,-1), 8),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("TEXTCOLOR", (0,0), (-1,0), white),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
story.append(t_bmi)
story.append(sp())
story.append(info_box("For ASIAN populations (including Indians): WHO recommends lower cut-offs — Overweight ≥23 kg/m², Obese ≥27.5 kg/m² (higher risk at lower BMI than Western populations)."))
story.append(sp())
story.append(Paragraph(b("2. Waist Circumference (WC) — Central Obesity"), subsection_style))
story.append(bullet("Measures abdominal/central adiposity — more important than total obesity for CVD risk."))
story.append(bullet("Risk: Men > 94 cm (WHO); > 90 cm (South Asian men); Women > 80 cm."))
story.append(bullet("Used to identify metabolic syndrome."))
story.append(Paragraph(b("3. Waist-Hip Ratio (WHR)"), subsection_style))
story.append(bullet("Waist circumference ÷ Hip circumference."))
story.append(bullet("Risk: Men > 0.90; Women > 0.85 (WHO)."))
story.append(Paragraph(b("4. Waist-Height Ratio (WHtR)"), subsection_style))
story.append(bullet("Simple measure; risk indicated if WHtR > 0.5."))
story.append(Paragraph(b("5. Skinfold Thickness"), subsection_style))
story.append(bullet("Measured at triceps, biceps, subscapular, suprailiac sites using Harpenden callipers."))
story.append(bullet("Sum of 4 skinfolds used to estimate body fat percentage."))
story.append(sp(2))
story.append(section_box("PROBLEM STATEMENT"))
story.append(Paragraph(b("WORLD:"), subsection_style))
story.append(bullet("Obesity has nearly tripled globally since 1975 (WHO)."))
story.append(bullet("In 2016: >1.9 billion adults overweight; 650 million obese (13% of world's adult population)."))
story.append(bullet("345 million adolescents and 39 million children under 5 are overweight or obese."))
story.append(bullet("Obesity is a leading preventable cause of death globally; associated with >4 million deaths/year."))
story.append(Paragraph(b("INDIA:"), subsection_style))
story.append(bullet("Prevalence rising rapidly — 'dual burden' of undernutrition AND overnutrition."))
story.append(bullet("NFHS-5 (2019–21): 24% of women and 23% of men are overweight (BMI ≥25)."))
story.append(bullet("Urban areas have higher prevalence than rural."))
story.append(sp(2))
story.append(section_box("CAUSES / AETIOLOGY OF OBESITY"))
story.append(Paragraph(b("Fundamental Cause:"), subsection_style))
story.append(info_box("Energy intake EXCEEDS energy expenditure over a prolonged period → positive energy balance → excess fat stored in adipose tissue."))
obes_causes = [
["Dietary Factors", "High caloric density foods, refined sugars, saturated fats, fast food, large portion sizes, sugar-sweetened beverages"],
["Physical Inactivity", "Sedentary jobs, screen time, motorised transport, reduced physical activity"],
["Genetic Factors", "Polygenic; FTO gene variant; rare monogenic obesity (leptin deficiency, MC4R mutations)"],
["Endocrine/Metabolic", "Hypothyroidism, Cushing's syndrome, PCOS, hypogonadism, insulinoma"],
["Drugs", "Corticosteroids, antipsychotics (olanzapine, clozapine), antidepressants (SSRIs), antiepileptics (valproate), insulin, OHA"],
["Psychological factors", "Emotional eating, depression, anxiety, food addiction"],
["Socio-environmental", "Urbanisation, 'obesogenic environment', food marketing, socio-economic status, cultural norms"],
["Early life factors", "Maternal obesity, gestational DM, formula feeding (vs breastfeeding), rapid infant weight gain"],
]
story.append(two_col_table(obes_causes, headers=["Factor", "Details"]))
story.append(sp(2))
story.append(section_box("HAZARDS / COMPLICATIONS OF OBESITY"))
obes_haz = [
["Cardiovascular", "Coronary heart disease (2x risk), Hypertension, Heart failure, Atrial fibrillation, Stroke"],
["Metabolic", "Type 2 diabetes (strong association), Dyslipidaemia, Metabolic syndrome, NAFLD/NASH"],
["Respiratory", "Obstructive sleep apnoea (OSA), Obesity hypoventilation syndrome (Pickwickian), Asthma"],
["Musculoskeletal", "Osteoarthritis (especially knees, hips), Gout, Low back pain, Plantar fasciitis"],
["Gastrointestinal", "GERD, Gallstones (cholesterol gallstones), Hernias"],
["Cancer", "Breast, endometrial, colon, kidney, oesophageal, gallbladder, ovarian cancer"],
["Reproductive", "PCOS, infertility, menstrual irregularities, pregnancy complications (GDM, pre-eclampsia)"],
["Psychological", "Depression, anxiety, low self-esteem, social stigma, eating disorders"],
["Other", "Venous thromboembolism, skin infections (intertriginous), incontinence, operative/anaesthetic risks"],
]
story.append(two_col_table(obes_haz, headers=["System", "Complications"]))
story.append(sp(2))
story.append(section_box("PREVENTION AND MANAGEMENT OF OBESITY"))
story.append(Paragraph(b("Primary Prevention (Prevent Development of Obesity):"), subsection_style))
for item in ["Promote breastfeeding in infants",
"Healthy eating from childhood — limit sugary drinks, fast food",
"Increase physical activity (at least 60 min/day for children, 150 min/week for adults)",
"School-based health promotion and nutrition education",
"Reduce sedentary screen time",
"Healthy urban planning — walkable cities, parks, cycling infrastructure",
"Food labelling and marketing restrictions (especially to children)",
"Taxes on sugar-sweetened beverages (SSBs)"]:
story.append(bullet(item))
story.append(Paragraph(b("Secondary Prevention (Treat Overweight Before Complications):"), subsection_style))
story.append(Paragraph(b("STEP 1 — Lifestyle Modification:"), body_style))
for item in ["Caloric restriction: 500–1000 kcal/day deficit to achieve 0.5–1 kg/week weight loss",
"Dietary advice: Low fat, high fibre, portion control, Mediterranean diet",
"Physical activity: Combined aerobic + resistance training",
"Behavioural therapy: Cognitive behavioural therapy (CBT) for eating behaviours"]:
story.append(bullet(item))
story.append(Paragraph(b("STEP 2 — Pharmacotherapy:"), body_style))
for item in ["Indicated when BMI ≥30 or BMI ≥27 with comorbidities after 3–6 months lifestyle failure",
"Orlistat (pancreatic lipase inhibitor) — approved; reduces fat absorption",
"Metformin — useful in DM/PCOS-related obesity",
"GLP-1 receptor agonists (liraglutide, semaglutide) — approved for obesity management"]:
story.append(bullet(item))
story.append(Paragraph(b("STEP 3 — Bariatric Surgery:"), body_style))
for item in ["Indicated: BMI ≥40, or BMI ≥35 with comorbidities, failed other treatments",
"Types: Roux-en-Y gastric bypass (RYGB), sleeve gastrectomy, adjustable gastric banding",
"Most effective long-term treatment for severe obesity"]:
story.append(bullet(item))
story.append(sp(2))
story.append(section_box("NATIONAL INITIATIVES FOR OBESITY CONTROL"))
for item in ["National Programme for Prevention and Control of NCDs (NPCDCS) includes obesity screening",
"Fit India Movement (2019) — MOH&FW initiative for physical fitness awareness",
"Eat Right India Campaign — FSSAI initiative for healthy eating",
"School Health Programme — nutrition and physical fitness in schools",
"National Nutrition Mission (POSHAN Abhiyaan) — targets malnutrition including overnutrition",
"Ayushman Bharat — includes lifestyle disease management",
"Beti Bachao Beti Padhao includes maternal nutrition component"]:
story.append(bullet(item))
# ── Footer on last page ──
story.append(sp(3))
story.append(HRFlowable(width="100%", thickness=1.5, color=DARK_BLUE))
story.append(sp())
story.append(Paragraph(
"Source: Park's Textbook of Preventive and Social Medicine | Strictly for LAQ preparation",
ParagraphStyle("Footer", parent=styles["Normal"],
fontSize=8.5, textColor=GRAY, alignment=TA_CENTER, fontName="Helvetica-Oblique")
))
# BUILD PDF
doc.build(story)
print(f"PDF generated: {OUTPUT}")