Tomorrow is my PSM practica exam. Examiner will surely ask from this pdf and i dont know anything about them and i have no concept of this . please help me to understand this topic in very easy language and remember all of them, including all the steps of literature review ( it is very important) so i will secure better marks

Reading File
Running Command

cd /home/daytona/workspace/attachments/68c7f962-100e-4058-a758-38ea9aa87a00/ && python3 -c " from pypdf import PdfReader reader = PdfReader('Literature_Review_2025_MBBS_Revised_5194a3a4_829a_4a86_9275_0ec0d690273d.pdf') print(f'PDF Pages: {len(reader.pages)}') text = '' for page in reader.pages: text += page.extract_text() + '\n\n--- PAGE BREAK ---\n\n' print(text) "

Reading File
Running Command

cd /home/daytona/workspace/attachments/68c7f962-100e-4058-a758-38aa87a87a00/ 2>/dev/null; cd /home/daytona/workspace/attachments/68c7f962-100e-4058-a758-38ea9aa87a00/ && python3 -c " import pdfplumber with pdfplumber.open('Literature_Review_2025_MBBS_Revised_5194a3a4_829a_4a86_9275_0ec0d690273d.pdf') as pdf: for i, page in enumerate(pdf.pages): text = page.extract_text() if text and text.strip(): print(f'=== PAGE {i+1} ===') print(text) print() "

Running Command

cd /home/daytona/workspace/attachments/68c7f962-100e-4058-a758-38ea9aa87a00/ && python3 -m markitdown "Pre-testing, Validity, and Reliability _BPH.pptx" 2>/dev/null | head -400

Running Command

cd /home/daytona/workspace/attachments/68c7f962-100e-4058-a758-38ea9aa87a00/ && python3 -m markitdown "Validity_and_Reliability_with_examples_3b1241f7_8f7a_4fe8_81a2_34e3b8dd7d4c.docx" 2>/dev/null | head -500

Running Command

cd /home/daytona/workspace/attachments/68c7f962-100e-4058-a758-38ea9aa87a00/ && python3 -c " from pypdf import PdfReader import base64, json reader = PdfReader('Literature_Review_2025_MBBS_Revised_5194a3a4_829a_4a86_9275_0ec0d690273d.pdf') print('Number of pages:', len(reader.pages)) # Try to extract images from each page for i, page in enumerate(reader.pages): images = page.images print(f'Page {i+1}: {len(images)} images') " 2>&1 | head -50

Running Command

# Convert PDF pages to images using pdftoppm/convert which pdftoppm; which convert; which gs; ls /home/daytona/workspace/attachments/68c7f962-100e-4058-a758-38ea9aa87a00/

Running Command

mkdir -p /home/daytona/workspace/lit-review-study/images && python3 -c " from pypdf import PdfReader import os reader = PdfReader('/home/daytona/workspace/attachments/68c7f962-100e-4058-a758-38ea9aa87a00/Literature_Review_2025_MBBS_Revised_5194a3a4_829a_4a86_9275_0ec0d690273d.pdf') out_dir = '/home/daytona/workspace/lit-review-study/images' for i, page in enumerate(reader.pages): for j, img in enumerate(page.images): ext = img.name.split('.')[-1] if '.' in img.name else 'png' fname = f'{out_dir}/page_{i+1:02d}.{ext}' with open(fname, 'wb') as f: f.write(img.data) print(f'Saved: {fname} ({len(img.data)} bytes)') " 2>&1

Running Command

# Also convert PPTX to images using LibreOffice mkdir -p /home/daytona/workspace/lit-review-study/pptx-images cd /home/daytona/workspace/lit-review-study/pptx-images && libreoffice --headless --convert-to png "/home/daytona/workspace/attachments/68c7f962-100e-4058-a758-38ea9aa87a00/Pre-testing, Validity, and Reliability _BPH.pptx" --outdir /home/daytona/workspace/lit-review-study/pptx-images 2>&1 | head -20

Running Command

cd /home/daytona/workspace/lit-review-study && python3 -m http.server 8765 & sleep 2 && echo "Server started"

Running Command

python3 -m http.server 8765 --directory /home/daytona/workspace/lit-review-study/images & disown $! echo "Server launched with PID $!"

Running Command

nohup python3 -m http.server 8765 --directory /home/daytona/workspace/lit-review-study/images > /tmp/server.log 2>&1 & echo $!

Running Command

sleep 2 && curl -s http://localhost:8765/ | head -20

Running Command

# Use pdftoppm to convert PDF pages to PNG images (higher resolution for OCR) pdftoppm -r 150 -png "/home/daytona/workspace/attachments/68c7f962-100e-4058-a758-38ea9aa87a00/Literature_Review_2025_MBBS_Revised_5194a3a4_829a_4a86_9275_0ec0d690273d.pdf" /home/daytona/workspace/lit-review-study/rendered/page 2>&1 echo "Done" ls /home/daytona/workspace/lit-review-study/rendered/ | head -10

Running Command

mkdir -p /home/daytona/workspace/lit-review-study/rendered pdftoppm -r 150 -png "/home/daytona/workspace/attachments/68c7f962-100e-4058-a758-38ea9aa87a00/Literature_Review_2025_MBBS_Revised_5194a3a4_829a_4a86_9275_0ec0d690273d.pdf" /home/daytona/workspace/lit-review-study/rendered/page 2>&1 echo "Exit: $?" ls /home/daytona/workspace/lit-review-study/rendered/ | head -15

Running Command

# OCR all rendered pages using tesseract which tesseract && tesseract --version 2>&1 | head -3

Running Command

cd /home/daytona/workspace/lit-review-study/rendered # OCR all pages for f in page-*.png; do tesseract "$f" "${f%.png}_ocr" -l eng 2>/dev/null done echo "OCR done" ls *_ocr.txt | wc -l

Running Command

for i in $(seq -w 1 30); do f="/home/daytona/workspace/lit-review-study/rendered/page-${i}_ocr.txt" [ -f "$f" ] && echo "=== PAGE $i ===" && cat "$f" && echo done 2>/dev/null

Running Command

# Extract PPTX content using python-pptx python3 -c " from pptx import Presentation prs = Presentation('/home/daytona/workspace/attachments/68c7f962-100e-4058-a758-38ea9aa87a00/Pre-testing, Validity, and Reliability _BPH.pptx') for i, slide in enumerate(prs.slides): print(f'=== SLIDE {i+1} ===') for shape in slide.shapes: if hasattr(shape, 'text') and shape.text.strip(): print(shape.text) print() " 2>&1

Running Command

# Extract DOCX content python3 -c " from docx import Document doc = Document('/home/daytona/workspace/attachments/68c7f962-100e-4058-a758-38ea9aa87a00/Validity_and_Reliability_with_examples_3b1241f7_8f7a_4fe8_81a2_34e3b8dd7d4c.docx') for para in doc.paragraphs: if para.text.strip(): print(para.text) print() print('--- TABLES ---') for i, table in enumerate(doc.tables): print(f'Table {i+1}:') for row in table.rows: print([cell.text for cell in row.cells]) " 2>&1

Running Command

# Convert PPTX to PDF then OCR, and unzip DOCX mkdir -p /home/daytona/workspace/lit-review-study/pptx-render libreoffice --headless --convert-to pdf "/home/daytona/workspace/attachments/68c7f962-100e-4058-a758-38ea9aa87a00/Pre-testing, Validity, and Reliability _BPH.pptx" --outdir /home/daytona/workspace/lit-review-study/pptx-render 2>&1 | tail -3 # Extract DOCX text via unzip (docx is a zip) mkdir -p /home/daytona/workspace/lit-review-study/docx-extract cp "/home/daytona/workspace/attachments/68c7f962-100e-4058-a758-38ea9aa87a00/Validity_and_Reliability_with_examples_3b1241f7_8f7a_4fe8_81a2_34e3b8dd7d4c.docx" /home/daytona/workspace/lit-review-study/docx-extract/validity.docx cd /home/daytona/workspace/lit-review-study/docx-extract && unzip -o validity.docx -d validity_unzipped 2>/dev/null # Read the main document XML python3 -c " import xml.etree.ElementTree as ET tree = ET.parse('/home/daytona/workspace/lit-review-study/docx-extract/validity_unzipped/word/document.xml') root = tree.getroot() ns = {'w': 'http://schemas.openxmlformats.org/wordprocessingml/2006/main'} texts = [] for para in root.iter('{http://schemas.openxmlformats.org/wordprocessingml/2006/main}p'): t = ''.join(node.text or '' for node in para.iter('{http://schemas.openxmlformats.org/wordprocessingml/2006/main}t')) if t.strip(): texts.append(t) print('\n'.join(texts)) " 2>&1 | head -300

Running Command

# Extract PPTX content by unzipping it (it's also a zip) mkdir -p /home/daytona/workspace/lit-review-study/pptx-extract cp "/home/daytona/workspace/attachments/68c7f962-100e-4058-a758-38ea9aa87a00/Pre-testing, Validity, and Reliability _BPH.pptx" /home/daytona/workspace/lit-review-study/pptx-extract/validity.pptx cd /home/daytona/workspace/lit-review-study/pptx-extract && unzip -o validity.pptx -d validity_pptx 2>/dev/null # Extract text from each slide XML python3 -c " import xml.etree.ElementTree as ET import os, glob slide_files = sorted(glob.glob('/home/daytona/workspace/lit-review-study/pptx-extract/validity_pptx/ppt/slides/slide*.xml')) for sf in slide_files: slide_num = os.path.basename(sf).replace('slide','').replace('.xml','') tree = ET.parse(sf) root = tree.getroot() texts = [] for elem in root.iter(): if elem.tag.endswith('}t') and elem.text and elem.text.strip(): texts.append(elem.text.strip()) if texts: print(f'=== SLIDE {slide_num} ===') print(' | '.join(texts)) print() " 2>&1

I have enough content from all three files. The DOCX gave me complete validity/reliability content. Now I'll compile a comprehensive, easy-to-understand study guide for the exam.

๐Ÿ“š Your PSM Practica Exam Study Guide

Congratulations - I've read all 3 files you uploaded. Here is everything you need, explained in the simplest possible language. Read this once carefully and you'll be ready for tomorrow!

๐Ÿ“– PART 1: LITERATURE REVIEW (from your PDF - 30 slides)

What is a Literature Review?

Think of it like this: before you do your own research, you first read what other researchers have already found. A literature review is a summary and analysis of all those existing studies related to your topic.
"A literature review is a survey of scholarly sources on a specific topic. It provides an overview of current knowledge, allowing you to identify relevant theories, methods, and gaps in the existing research."

Why Do We Write a Literature Review? (Purpose)

Remember this as 5 purposes (exam favourite!):
#Purpose
1Show you know the topic and its scholarly background
2Develop a theoretical framework and methodology
3Position your work among other researchers
4Show your research fills a gap or adds to a debate
5Evaluate the current state of research

โญ THE 5 KEY STEPS OF LITERATURE REVIEW (Most Important!)

The examiner WILL ask this. Learn it like your name:

STEP 1: Search for Relevant Literature

Where to search?
  • Online: PubMed, Google Scholar, Scopus
  • Offline: Library books, journals
  • Types of sources: journal articles, book chapters, conference papers, reports, reviews
How to search? - Boolean Operators (Very important!)
Think of Boolean search as filters when searching online:
OperatorWhat it doesExampleResult
ANDNarrows results (both terms must appear)Fever AND Joint Pain4,432 results
ORBroadens results (either term can appear)Fever OR Joint Pain317,869 results
NOTExcludes a termTyphoid fever NOT children10,758 results
" " (quotes)Exact phrase searchFever AND "Joint Pain"780 results (exact phrase)
( )Groups terms togetherFever AND (joint pain OR chills)Combined search
Memory trick: AND = Less results (narrow), OR = More results (broad), NOT = Removes results

STEP 2: Evaluate Sources

Use these "Wh Questions" to evaluate each article:
  1. What question/problem is the author addressing?
  2. What are the key concepts and how are they defined?
  3. What are the key theories, models, and methods?
  4. Does the research use established frameworks or an innovative approach?
  5. What are the results and conclusions?
  6. How does it relate to other literature in the field?
  7. Does it confirm, add to, or challenge existing knowledge?
  8. What are the strengths and weaknesses?
Remember: Take notes and cite your sources (APA or Vancouver Style)
How to Read an Article Critically (Step-by-Step):
  1. Read the abstract - decide if it's worth reading fully
  2. Read the introduction - why is this study important?
  3. Read the methods critically - focus on participants, measures, procedures
  4. Evaluate the results - do conclusions seem logical? Any bias?
  5. Take the discussion with a grain of salt - limitations are important

STEP 3: Identify Themes, Debates, and Gaps

After reading multiple articles, ask yourself:
  • What themes keep coming up?
  • Where do researchers agree or disagree?
  • What has NOT been studied yet? (That's the "gap" your research fills)

STEP 4: Outline the Structure

There are 4 ways to organize your literature review:
StructureWhat it meansWhen to use
ChronologicalOrganize by time (oldest to newest)When showing how a topic evolved
ThematicGroup by topic/theme (qualitative analysis)Most common in PSM
MethodologicalGroup by research methods usedWhen comparing methods
TheoreticalGroup by theoretical frameworkWhen comparing theories

STEP 5: Write Your Literature Review

Three parts: Introduction - Body - Conclusion
PartWhat to write
IntroductionClearly establish the focus and purpose of your review
BodySummarize + synthesize + analyze + critically evaluate; write in well-structured paragraphs
ConclusionSummarize key findings and emphasize their significance

Where Does the Literature Review Go in a Thesis/Dissertation?

  • It comes near the beginning, after the introduction
  • It grounds your research in the scholarly field
  • It leads directly to your theoretical framework or methodology

What is a Conceptual Framework?

A conceptual framework is a diagram/model showing the relationships between the concepts in your study. For example:
Demographics (Age, Civil Status, Education) โ†’ Self-Esteem (High/Moderate/Low) โ†’ Parenting Styles (Authoritative/Democratic/Permissive)
Purpose of Conceptual Framework:
  1. Clarify concepts and propose relationships among them
  2. Explain observations
  3. Provide context for interpreting study findings
  4. Encourage theory development useful to practice

The Literature Review Summary Table (Template)

When you review articles, summarize them in a table:
Author & YearTitleObjectiveMethodologyKey FindingsConclusion
Author 1 et al., YYYYTitleAim of studySurvey/experiment/etc.Significant resultsMain takeaway

Brain Storming Before Literature Search

Ask yourself:
  • What to search?
  • Where to search?
  • How to search?
  • Who is the expert locally in your department/hospital?
  • What basic knowledge is needed?

๐Ÿ“– PART 2: VALIDITY AND RELIABILITY (from your DOCX + PPTX)


VALIDITY - "Does the test measure what it claims to measure?"

Simple analogy: If you have a weighing scale and use it to measure height - it's NOT valid. A valid test measures exactly what it is supposed to measure.

Types of Validity:

1. Content Validity
  • Does the test cover ALL aspects of the topic?
  • Example: A biology exam should include cell biology, genetics, evolution, AND ecology - not just one topic. If it only asks about cell biology, it lacks content validity.
2. Construct Validity - Does it truly measure the theoretical concept?
  • Convergent Validity: Related measures should actually be related (e.g., two intelligence tests should correlate)
  • Discriminant Validity: Unrelated measures should NOT be related (e.g., intelligence test should NOT correlate with personality traits)
3. Criterion-related Validity - Does it predict or correlate with something?
  • Predictive Validity: Can the test predict a future outcome? Example: High SAT scores โ†’ higher college GPA. The SAT has good predictive validity.
  • Concurrent Validity: Does it correlate with another established test taken at the SAME time? Example: A new depression test should give similar results to an already-established depression inventory.
4. Face Validity
  • Does the test LOOK like it measures what it should?
  • This is subjective - it's about appearance, not proof
  • Example: A dietary habits questionnaire should ask about food intake, meal frequency, types of food.

RELIABILITY - "Does the test give consistent results?"

Simple analogy: If you weigh yourself 3 times on the same scale and get 3 different readings - it's NOT reliable. A reliable test gives the same result every time under the same conditions.

Types of Reliability:

1. Test-Retest Reliability
  • Administer the SAME test to the SAME people at two different times
  • Results should be similar
  • Example: A personality test given today and again in 2 weeks should give similar scores
2. Inter-Rater Reliability
  • Different raters/observers rating the SAME thing should agree
  • Example: Two teachers grading the same essay should give similar marks
3. Parallel-Forms Reliability
  • Two DIFFERENT versions of the same test given to the same group should give similar results
  • Example: Version A and Version B of a math test should produce similar scores
4. Internal Consistency Reliability - Do all items in the test measure the same thing?
  • Split-Half Reliability: Split the test into 2 halves; scores from both halves should be similar. Example: A 20-item anxiety test split into two 10-item sets.
  • Cronbach's Alpha: A number (0-1) measuring how correlated items are. A value of 0.85 = high internal consistency (good)

Why Are Validity AND Reliability Important?

ValidityReliability
MeaningMeasures what it shouldGives consistent results
ImportanceMakes results meaningful and applicableMakes results dependable and repeatable
Key pointA test can be reliable but NOT validA test cannot be valid without being reliable
Classic analogy: A clock that is always 10 minutes fast is reliable (consistent) but NOT valid (doesn't show correct time). A broken clock that randomly shows different times is neither reliable nor valid.

Pre-testing

Pre-testing (pilot testing) is done BEFORE the main study to check if your questionnaire/tool works properly. It helps identify:
  • Confusing or unclear questions
  • Problems with the format
  • Whether validity and reliability are adequate

๐Ÿ”‘ QUICK MEMORY TRICKS FOR THE EXAM

5 Steps of Literature Review = SEIOW
  • Search for relevant literature
  • Evaluate sources
  • Identify themes, debates, and gaps
  • Outline the structure
  • Write your literature review
Boolean Operators:
  • AND = All terms (narrows)
  • OR = Options (broadens)
  • NOT = No that term (excludes)
4 Types of Validity = C-C-C-F
  • Content
  • Construct (convergent + discriminant)
  • Criterion (predictive + concurrent)
  • Face
4 Types of Reliability = T-I-P-I
  • Test-retest
  • Inter-rater
  • Parallel-forms
  • Internal consistency (split-half + Cronbach's alpha)

๐ŸŽฏ MOST LIKELY EXAM QUESTIONS & ANSWERS

Q: What is a literature review? A: A survey of scholarly sources on a specific topic that provides an overview of current knowledge, helps identify relevant theories, methods, and gaps.
Q: Write the 5 steps of literature review. A: (1) Search for relevant literature, (2) Evaluate sources, (3) Identify themes/debates/gaps, (4) Outline the structure, (5) Write the review.
Q: What is Boolean search? Give examples. A: A technique using operators AND, OR, NOT to combine or exclude search terms. AND narrows, OR broadens, NOT excludes.
Q: What is validity? Types? A: Validity = does the test measure what it claims to measure. Types: Content, Construct (convergent/discriminant), Criterion (predictive/concurrent), Face validity.
Q: What is reliability? Types? A: Reliability = consistency of a measure. Types: Test-retest, Inter-rater, Parallel-forms, Internal consistency (split-half, Cronbach's alpha).
Q: What is the difference between validity and reliability? A: Validity = accuracy (measuring the right thing); Reliability = consistency (same results each time). A test can be reliable but not valid, but cannot be valid without being reliable.
Q: What is Cronbach's Alpha? A: A statistical measure of internal consistency reliability. Value ranges 0-1; values above 0.7-0.8 indicate good reliability.
Q: Where does literature review appear in a thesis? A: After the introduction, near the beginning - it grounds the research and leads to the theoretical framework/methodology.

Good luck tomorrow! You now have everything from all 3 files. Focus especially on the 5 steps of literature review, Boolean operators, and the types of validity and reliability - those are the highest-yield topics for your PSM practica exam. ๐Ÿ’ช

Quick pdf reference

Here's your quick PDF reference card - everything on one page:

๐Ÿ“„ LITERATURE REVIEW - QUICK REFERENCE

Definition

Survey of scholarly sources on a specific topic to identify theories, methods, and gaps.

โญ 5 STEPS (MEMORIZE THIS)

1. SEARCH     โ†’ Find relevant literature
2. EVALUATE   โ†’ Assess each source (Wh questions)
3. IDENTIFY   โ†’ Themes, debates, gaps
4. OUTLINE    โ†’ Choose structure
5. WRITE      โ†’ Intro + Body + Conclusion

WHERE TO SEARCH

  • Online: PubMed ยท Google Scholar ยท Scopus
  • Offline: Books, journals, reports, conference papers

BOOLEAN OPERATORS

OperatorEffectExampleResults
ANDNarrowsFever AND Joint Pain4,432
ORBroadensFever OR Joint Pain317,869
NOTExcludesTyphoid fever NOT children10,758
" "Exact phrase"Joint Pain"Exact only
( )Groups terms(joint pain OR chills)Combined

HOW TO READ AN ARTICLE (5 Steps)

  1. Abstract - worth reading further?
  2. Introduction - why important?
  3. Methods - participants, measures, procedures
  4. Results - logical? any bias?
  5. Discussion - note limitations

EVALUATE SOURCES (Wh Questions)

  1. What problem is the author addressing?
  2. What are the key concepts/definitions?
  3. What theories, models, methods used?
  4. Established or innovative approach?
  5. What are results and conclusions?
  6. How does it relate to other literature?
  7. Confirms, adds to, or challenges knowledge?
  8. Strengths and weaknesses?
Always: Cite sources in APA or Vancouver style

4 STRUCTURES

TypeOrganize by
ChronologicalTime (old โ†’ new)
ThematicTopic/theme (most common in PSM)
MethodologicalResearch methods
TheoreticalFrameworks/theories

WRITING STRUCTURE

  • Introduction - focus and purpose
  • Body - summarize + synthesize + critically analyze
  • Conclusion - key findings + significance

POSITION IN THESIS

After introduction โ†’ before methodology. Grounds research, leads to theoretical framework.

SUMMARY TABLE FORMAT

| Author & Year | Title | Objective | Methodology | Key Findings | Conclusion |

CONCEPTUAL FRAMEWORK

  • Diagram showing relationships between concepts
  • Purpose: clarify concepts, explain observations, provide context, encourage theory development

๐Ÿ“„ VALIDITY & RELIABILITY - QUICK REFERENCE

VALIDITY = "Measures what it claims to measure"

TypeSimple meaningExample
ContentCovers ALL aspects of topicBio exam must include ALL subjects taught
Construct - ConvergentRelated things ARE relatedTwo IQ tests correlate
Construct - DiscriminantUnrelated things are NOT relatedIQ test โ‰  personality traits
Criterion - PredictivePredicts a FUTURE outcomeHigh SAT โ†’ high college GPA
Criterion - ConcurrentCorrelates with existing test NOWNew depression test โ‰ˆ old depression scale
FaceLooks appropriate (subjective)Diet questionnaire asks about food habits

RELIABILITY = "Gives consistent results"

TypeSimple meaningExample
Test-RetestSame test, same people, different timesPersonality test โ†’ same scores 2 weeks later
Inter-RaterDifferent raters agreeTwo teachers give same essay similar marks
Parallel-FormsTwo versions of test give same resultMath Test A โ‰ˆ Math Test B
Split-HalfTwo halves of test agreeQ1-10 โ‰ˆ Q11-20 scores
Cronbach's AlphaNumber (0-1) for internal consistencyฮฑ = 0.85 = high reliability โœ“

KEY DIFFERENCE

ValidityReliability
=AccuracyConsistency
Can exist without the other?โŒ Noโœ… Yes (reliable but not valid)
Clock analogy: Clock always 10 min fast = Reliable โœ“ but NOT Valid โœ—

PRE-TESTING

Pilot test your questionnaire BEFORE the main study to catch unclear questions, format issues, and check validity/reliability.

Memory codes:
  • Steps: S-E-I-O-W
  • Validity: C-C-C-F (Content, Construct, Criterion, Face)
  • Reliability: T-I-P-I (Test-retest, Inter-rater, Parallel-forms, Internal consistency)

Quick pdf reference of this in easy and in color pdf

Running Command

python3 -c " import pdfplumber with pdfplumber.open('/home/daytona/workspace/attachments/68c7f962-100e-4058-a758-38ea9aa87a00/I have enough content from all three files The DOC.pdf') as pdf: print(f'Pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): text = page.extract_text() if text and text.strip(): print(f'=== PAGE {i+1} ===') print(text) " 2>&1 | head -200

Writing File

~/lit-review-study/make_reference_pdf.py

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

OUTPUT = "/home/daytona/workspace/lit-review-study/PSM_Quick_Reference.pdf"

# โ”€โ”€ Color Palette โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
DARK_BLUE   = colors.HexColor("#1a237e")
MED_BLUE    = colors.HexColor("#1565c0")
LIGHT_BLUE  = colors.HexColor("#e3f2fd")
TEAL        = colors.HexColor("#00695c")
LIGHT_TEAL  = colors.HexColor("#e0f2f1")
ORANGE      = colors.HexColor("#e65100")
LIGHT_ORANGE= colors.HexColor("#fff3e0")
PURPLE      = colors.HexColor("#6a1b9a")
LIGHT_PURPLE= colors.HexColor("#f3e5f5")
GREEN       = colors.HexColor("#2e7d32")
LIGHT_GREEN = colors.HexColor("#e8f5e9")
RED         = colors.HexColor("#b71c1c")
LIGHT_RED   = colors.HexColor("#ffebee")
YELLOW      = colors.HexColor("#f9a825")
LIGHT_YELLOW= colors.HexColor("#fffde7")
GREY_BG     = colors.HexColor("#f5f5f5")
WHITE       = colors.white
BLACK       = colors.HexColor("#212121")

doc = SimpleDocTemplate(
    OUTPUT, pagesize=A4,
    leftMargin=1.5*cm, rightMargin=1.5*cm,
    topMargin=1.5*cm, bottomMargin=1.5*cm
)

styles = getSampleStyleSheet()

def S(name, parent='Normal', **kw):
    return ParagraphStyle(name, parent=styles[parent], **kw)

# Style definitions
title_style = S('MyTitle', fontSize=20, textColor=WHITE, alignment=TA_CENTER,
                fontName='Helvetica-Bold', spaceAfter=4)
subtitle_style = S('MySub', fontSize=11, textColor=WHITE, alignment=TA_CENTER,
                   fontName='Helvetica', spaceAfter=2)
section_style = S('Section', fontSize=13, textColor=WHITE, alignment=TA_LEFT,
                  fontName='Helvetica-Bold', leftPadding=6, spaceAfter=2)
body_style = S('Body', fontSize=9, textColor=BLACK, fontName='Helvetica',
               leading=13, spaceAfter=2)
bold_body = S('BoldBody', fontSize=9, textColor=BLACK, fontName='Helvetica-Bold',
              leading=13, spaceAfter=2)
small_style = S('Small', fontSize=8, textColor=BLACK, fontName='Helvetica',
                leading=11, spaceAfter=1)
small_bold = S('SmallBold', fontSize=8, textColor=BLACK, fontName='Helvetica-Bold',
               leading=11)
tip_style = S('Tip', fontSize=8.5, textColor=ORANGE, fontName='Helvetica-Bold',
              alignment=TA_CENTER, leading=12)
analogy_style = S('Analogy', fontSize=8.5, textColor=DARK_BLUE,
                  fontName='Helvetica-Oblique', leading=12, leftIndent=6)
white_body = S('WhiteBody', fontSize=9, textColor=WHITE, fontName='Helvetica',
               leading=13)
white_bold = S('WhiteBold', fontSize=9.5, textColor=WHITE, fontName='Helvetica-Bold',
               leading=14)
heading_cell = S('HeadCell', fontSize=9, textColor=WHITE, fontName='Helvetica-Bold',
                 alignment=TA_CENTER, leading=12)
q_style = S('Q', fontSize=8.5, textColor=DARK_BLUE, fontName='Helvetica-Bold',
            leading=12, spaceAfter=1)
a_style = S('A', fontSize=8.5, textColor=BLACK, fontName='Helvetica',
            leading=12, spaceAfter=4, leftIndent=8)

def section_header(text, color):
    tbl = Table([[Paragraph(text, section_style)]], colWidths=[17.5*cm])
    tbl.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), color),
        ('ROUNDEDCORNERS', [4,4,4,4]),
        ('TOPPADDING',  (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('LEFTPADDING',  (0,0), (-1,-1), 8),
    ]))
    return tbl

def colored_table(headers, rows, col_widths, header_color, alt_color):
    header_cells = [Paragraph(h, heading_cell) for h in headers]
    data = [header_cells]
    for i, row in enumerate(rows):
        bg = alt_color if i % 2 == 0 else WHITE
        data.append([Paragraph(str(c), small_style) for c in row])
    tbl = Table(data, colWidths=col_widths)
    style = [
        ('BACKGROUND', (0,0), (-1,0), header_color),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [alt_color, WHITE]),
        ('GRID', (0,0), (-1,-1), 0.5, 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), 'MIDDLE'),
    ]
    tbl.setStyle(TableStyle(style))
    return tbl

def pill_box(text, bg, text_color=WHITE):
    p = ParagraphStyle('pill', fontSize=9, textColor=text_color,
                       fontName='Helvetica-Bold', alignment=TA_CENTER, leading=12)
    tbl = Table([[Paragraph(text, p)]], colWidths=[3.2*cm])
    tbl.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), bg),
        ('ROUNDEDCORNERS', [6,6,6,6]),
        ('TOPPADDING', (0,0), (-1,-1), 4),
        ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ]))
    return tbl

story = []

# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
# TITLE BANNER
# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
banner_data = [[
    Paragraph("๐Ÿ“š  PSM PRACTICA QUICK REFERENCE", title_style),
    Paragraph("Literature Review  โ€ข  Validity  โ€ข  Reliability", subtitle_style),
]]
banner = Table([[
    Paragraph("๐Ÿ“š  PSM PRACTICA QUICK REFERENCE", title_style),
]], colWidths=[17.5*cm])
banner.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), DARK_BLUE),
    ('ROUNDEDCORNERS', [6,6,6,6]),
    ('TOPPADDING',  (0,0), (-1,-1), 10),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
]))
subtitle_banner = Table([[
    Paragraph("Literature Review  โ€ข  Validity  โ€ข  Reliability", subtitle_style),
]], colWidths=[17.5*cm])
subtitle_banner.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), MED_BLUE),
    ('TOPPADDING',  (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 8),
]))
story.append(banner)
story.append(subtitle_banner)
story.append(Spacer(1, 6))

# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
# SECTION 1: DEFINITION
# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
story.append(section_header("๐Ÿ“–  WHAT IS A LITERATURE REVIEW?", MED_BLUE))
story.append(Spacer(1, 4))
def_box = Table([[
    Paragraph(
        '<i>"A survey of scholarly sources on a specific topic โ€” to identify '
        'relevant theories, methods, and <b>gaps</b> in existing research."</i>',
        analogy_style)
]], colWidths=[17.5*cm])
def_box.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), LIGHT_BLUE),
    ('BOX', (0,0), (-1,-1), 1, MED_BLUE),
    ('TOPPADDING',  (0,0), (-1,-1), 6),
    ('BOTTOMPADDING', (0,0), (-1,-1), 6),
    ('LEFTPADDING',  (0,0), (-1,-1), 10),
]))
story.append(def_box)
story.append(Spacer(1, 6))

# Purposes
story.append(Paragraph("<b>5 PURPOSES of Literature Review:</b>", bold_body))
purposes = [
    ("1", "Show familiarity with the topic and scholarly context"),
    ("2", "Develop theoretical framework and methodology"),
    ("3", "Position your work among other researchers"),
    ("4", "Show your research fills a gap or contributes to debate"),
    ("5", "Evaluate current state of research & scholarly debates"),
]
for num, text in purposes:
    row_data = [[
        Paragraph(f"<b>{num}</b>", S('Num', fontSize=10, textColor=WHITE,
                                      fontName='Helvetica-Bold', alignment=TA_CENTER)),
        Paragraph(text, small_style)
    ]]
    row_tbl = Table(row_data, colWidths=[0.7*cm, 16.8*cm])
    bg = [DARK_BLUE, MED_BLUE, TEAL, PURPLE, ORANGE][int(num)-1]
    row_tbl.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (0,0), bg),
        ('BACKGROUND', (1,0), (1,0), GREY_BG),
        ('TOPPADDING',  (0,0), (-1,-1), 3),
        ('BOTTOMPADDING', (0,0), (-1,-1), 3),
        ('LEFTPADDING', (0,0), (0,0), 2),
        ('LEFTPADDING', (1,0), (1,0), 6),
        ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
        ('LINEBELOW', (0,0), (-1,-1), 0.3, colors.HexColor("#dddddd")),
    ]))
    story.append(row_tbl)
story.append(Spacer(1, 8))

# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
# SECTION 2: 5 STEPS
# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
story.append(section_header("โญ  5 KEY STEPS OF LITERATURE REVIEW  (Most Important!)", TEAL))
story.append(Spacer(1, 4))

steps = [
    (TEAL,   "STEP 1", "SEARCH",   "Search for Relevant Literature",
     "PubMed โ€ข Google Scholar โ€ข Scopus โ€ข Books โ€ข Journals โ€ข Conference papers"),
    (MED_BLUE,"STEP 2", "EVALUATE", "Evaluate Sources",
     "Use Wh Questions โ€ข Take notes โ€ข Cite in APA or Vancouver style"),
    (PURPLE,  "STEP 3", "IDENTIFY", "Identify Themes, Debates & Gaps",
     "What themes recur? Where do researchers agree/disagree? What's unstudied?"),
    (ORANGE,  "STEP 4", "OUTLINE",  "Outline the Structure",
     "Choose: Chronological / Thematic / Methodological / Theoretical"),
    (GREEN,   "STEP 5", "WRITE",    "Write Your Literature Review",
     "Intro (focus & purpose) โ†’ Body (summarize + synthesize + analyze) โ†’ Conclusion"),
]

for color, step_lbl, short, full, detail in steps:
    row = Table([[
        Paragraph(step_lbl, S('SL', fontSize=7.5, textColor=WHITE,
                               fontName='Helvetica-Bold', alignment=TA_CENTER, leading=10)),
        Paragraph(short,    S('SH', fontSize=11, textColor=color,
                               fontName='Helvetica-Bold', leading=13)),
        Paragraph(f"<b>{full}</b><br/><font size='8'>{detail}</font>",
                  S('SD', fontSize=8.5, textColor=BLACK, fontName='Helvetica', leading=12)),
    ]], colWidths=[1.5*cm, 2.8*cm, 13.2*cm])
    row.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (0,0), color),
        ('BACKGROUND', (1,0), (1,0), colors.HexColor("#f0f0f0")),
        ('BACKGROUND', (2,0), (2,0), WHITE),
        ('BOX', (0,0), (-1,-1), 0.5, color),
        ('LINEBELOW', (0,0), (-1,-1), 0.3, colors.HexColor("#dddddd")),
        ('TOPPADDING',  (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('LEFTPADDING', (1,0), (1,0), 6),
        ('LEFTPADDING', (2,0), (2,0), 8),
        ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
    ]))
    story.append(row)
story.append(Spacer(1, 4))

memory = Table([[
    Paragraph("๐Ÿง   Memory Code:  <b>S - E - I - O - W</b>  "
              "(Search โ†’ Evaluate โ†’ Identify โ†’ Outline โ†’ Write)", tip_style)
]], colWidths=[17.5*cm])
memory.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), LIGHT_YELLOW),
    ('BOX', (0,0), (-1,-1), 1, YELLOW),
    ('TOPPADDING',  (0,0), (-1,-1), 6),
    ('BOTTOMPADDING', (0,0), (-1,-1), 6),
]))
story.append(memory)
story.append(Spacer(1, 8))

# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
# SECTION 3: BOOLEAN OPERATORS
# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
story.append(section_header("๐Ÿ”  BOOLEAN OPERATORS  (How to Search)", PURPLE))
story.append(Spacer(1, 4))

bool_headers = ["Operator", "Effect", "Example", "Results"]
bool_rows = [
    ["AND", "Narrows (both terms)", "Fever AND Joint Pain", "4,432"],
    ["OR",  "Broadens (either term)", "Fever OR Joint Pain", "317,869"],
    ["NOT", "Excludes a term", "Typhoid fever NOT children", "10,758"],
    ['"  "', "Exact phrase", 'Fever AND "Joint Pain"', "780"],
    ["(  )", "Groups terms", "Fever AND (joint pain OR chills)", "8,064"],
]
story.append(colored_table(bool_headers, bool_rows,
    [2.5*cm, 4*cm, 7*cm, 4*cm], PURPLE, LIGHT_PURPLE))
story.append(Spacer(1, 4))

bool_mem = Table([[
    Paragraph("AND = Less results (narrow)  |  OR = More results (broad)  |  NOT = Removes results", tip_style)
]], colWidths=[17.5*cm])
bool_mem.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), LIGHT_PURPLE),
    ('BOX', (0,0), (-1,-1), 1, PURPLE),
    ('TOPPADDING',  (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
]))
story.append(bool_mem)
story.append(Spacer(1, 8))

# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
# SECTION 4: HOW TO READ AN ARTICLE
# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
story.append(section_header("๐Ÿ“‘  HOW TO READ AN ARTICLE  (5 Reading Steps)", MED_BLUE))
story.append(Spacer(1, 4))

read_steps = [
    ("1", "ABSTRACT",      "Decide whether article is worth reading in detail"),
    ("2", "INTRODUCTION",  "Understand why the study is important; background literature"),
    ("3", "METHODS",       "Focus on: participants, measures, procedures (read critically)"),
    ("4", "RESULTS",       "Are conclusions logical? Can you detect any researcher bias?"),
    ("5", "DISCUSSION",    "Take with a grain of salt โ€” note limitations carefully"),
]
cols = [0.7*cm, 3.2*cm, 13.6*cm]
read_data = [["#", "Section", "What to Look For"]]
for n, sec, desc in read_steps:
    read_data.append([n, sec, desc])

read_tbl = Table([[Paragraph(c, heading_cell if i == 0 else small_bold if j == 1
                              else small_style, )
                   for j, c in enumerate(row)]
                  for i, row in enumerate(read_data)],
                 colWidths=cols)
# simpler approach
read_data2 = [
    [Paragraph("#", heading_cell), Paragraph("Section", heading_cell), Paragraph("What to Look For", heading_cell)],
]
for n, sec, desc in read_steps:
    read_data2.append([Paragraph(n, small_bold), Paragraph(f"<b>{sec}</b>", small_bold), Paragraph(desc, small_style)])

read_tbl2 = Table(read_data2, colWidths=cols)
read_tbl2.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), MED_BLUE),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [LIGHT_BLUE, WHITE]),
    ('GRID', (0,0), (-1,-1), 0.4, colors.HexColor("#bbbbbb")),
    ('TOPPADDING',  (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING',  (0,0), (-1,-1), 5),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
    ('ALIGN', (0,0), (0,-1), 'CENTER'),
]))
story.append(read_tbl2)
story.append(Spacer(1, 8))

# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
# SECTION 5: STRUCTURES + WHERE IN THESIS
# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
two_col = Table([[
    # Left: 4 structures
    Table([
        [Paragraph("๐Ÿ—  4 STRUCTURES", S('H', fontSize=10, textColor=WHITE,
                    fontName='Helvetica-Bold', alignment=TA_CENTER))],
        [Table([
            [Paragraph("Chronological", small_bold), Paragraph("Time (oldโ†’new)", small_style)],
            [Paragraph("<b>Thematic โ˜…</b>", small_bold), Paragraph("Topic/theme (PSM favourite)", small_style)],
            [Paragraph("Methodological", small_bold), Paragraph("Research methods", small_style)],
            [Paragraph("Theoretical", small_bold), Paragraph("Frameworks/theories", small_style)],
        ], colWidths=[3.5*cm, 4.5*cm],
        style=TableStyle([
            ('ROWBACKGROUNDS', (0,0), (-1,-1), [LIGHT_TEAL, WHITE]),
            ('GRID', (0,0), (-1,-1), 0.3, colors.HexColor("#cccccc")),
            ('TOPPADDING',  (0,0), (-1,-1), 4),
            ('BOTTOMPADDING', (0,0), (-1,-1), 4),
            ('LEFTPADDING',  (0,0), (-1,-1), 5),
        ])],
    ]], colWidths=[8.2*cm],
    style=TableStyle([
        ('BACKGROUND', (0,0), (0,0), TEAL),
        ('TOPPADDING', (0,0), (0,0), 5),
        ('BOTTOMPADDING', (0,0), (0,0), 5),
        ('TOPPADDING', (0,1), (0,1), 0),
        ('LEFTPADDING', (0,0), (-1,-1), 4),
    ])),

    Spacer(0.3*cm, 1),

    # Right: Where in thesis
    Table([
        [Paragraph("๐Ÿ“  WHERE IN THESIS?", S('H2', fontSize=10, textColor=WHITE,
                    fontName='Helvetica-Bold', alignment=TA_CENTER))],
        [Paragraph(
            "Introduction โ†’ <b>Literature Review</b> โ†’ Theoretical Framework โ†’ Methodology\n\n"
            "โ€ข Comes near the <b>beginning</b> of thesis\n"
            "โ€ข After introduction\n"
            "โ€ข Leads to theoretical framework / methodology",
            S('TBox', fontSize=8.5, textColor=BLACK, fontName='Helvetica', leading=13)
        )],
    ], colWidths=[8.5*cm],
    style=TableStyle([
        ('BACKGROUND', (0,0), (0,0), ORANGE),
        ('BACKGROUND', (0,1), (0,1), LIGHT_ORANGE),
        ('TOPPADDING', (0,0), (0,0), 5),
        ('BOTTOMPADDING', (0,0), (0,0), 5),
        ('TOPPADDING', (0,1), (0,1), 8),
        ('BOTTOMPADDING', (0,1), (0,1), 8),
        ('LEFTPADDING', (0,0), (-1,-1), 8),
        ('BOX', (0,0), (-1,-1), 0.5, ORANGE),
    ])),
]], colWidths=[8.2*cm, 0.3*cm, 9*cm])
story.append(two_col)
story.append(Spacer(1, 8))

# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
# PAGE BREAK โ†’ VALIDITY & RELIABILITY
# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
story.append(PageBreak())

# Title strip page 2
p2_banner = Table([[
    Paragraph("โœ…  VALIDITY  &  RELIABILITY  โ€”  QUICK REFERENCE", title_style),
]], colWidths=[17.5*cm])
p2_banner.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), DARK_BLUE),
    ('TOPPADDING',  (0,0), (-1,-1), 8),
    ('BOTTOMPADDING', (0,0), (-1,-1), 8),
]))
story.append(p2_banner)
story.append(Spacer(1, 6))

# โ”€โ”€ VALIDITY โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(section_header("๐ŸŽฏ  VALIDITY  =  'Does the test measure what it claims to measure?'", TEAL))
story.append(Spacer(1, 4))

analogy1 = Table([[
    Paragraph(
        "๐Ÿ”‘ <b>Analogy:</b> Using a weighing scale to measure height = NOT valid. "
        "A valid test measures <i>exactly</i> what it is supposed to measure.",
        analogy_style)
]], colWidths=[17.5*cm])
analogy1.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), LIGHT_TEAL),
    ('BOX', (0,0), (-1,-1), 1, TEAL),
    ('TOPPADDING', (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('LEFTPADDING', (0,0), (-1,-1), 10),
]))
story.append(analogy1)
story.append(Spacer(1, 5))

validity_types = [
    (TEAL,   "1. Content Validity",
     "Covers ALL aspects of the topic",
     "Biology exam must include ALL subjects taught โ€” not just one topic"),
    (MED_BLUE, "2. Construct Validity\n(Convergent)",
     "Related things ARE related",
     "Two IQ tests should correlate with each other"),
    (MED_BLUE, "2. Construct Validity\n(Discriminant)",
     "Unrelated things are NOT related",
     "IQ test should NOT correlate with personality traits"),
    (PURPLE, "3. Criterion โ€” Predictive",
     "Predicts a FUTURE outcome",
     "High SAT score โ†’ High college GPA"),
    (PURPLE, "3. Criterion โ€” Concurrent",
     "Correlates with existing test NOW",
     "New depression test โ‰ˆ results of established depression scale"),
    (ORANGE, "4. Face Validity",
     "Looks appropriate (subjective)",
     "Diet questionnaire asks about food intake, meal frequency, types of food"),
]

v_data = [
    [Paragraph("Type", heading_cell), Paragraph("Meaning", heading_cell),
     Paragraph("Example", heading_cell)]
]
colors_cycle = [LIGHT_TEAL, LIGHT_BLUE, LIGHT_BLUE, LIGHT_PURPLE, LIGHT_PURPLE, LIGHT_ORANGE]
for i, (clr, typ, meaning, example) in enumerate(validity_types):
    v_data.append([
        Paragraph(f"<b>{typ}</b>", S('VT', fontSize=8, textColor=clr,
                                      fontName='Helvetica-Bold', leading=11)),
        Paragraph(meaning, small_style),
        Paragraph(f"<i>{example}</i>", small_style),
    ])

v_tbl = Table(v_data, colWidths=[4.2*cm, 5.3*cm, 8*cm])
v_style = [
    ('BACKGROUND', (0,0), (-1,0), TEAL),
    ('GRID', (0,0), (-1,-1), 0.4, colors.HexColor("#bbbbbb")),
    ('TOPPADDING',  (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING',  (0,0), (-1,-1), 5),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]
for i, c in enumerate(colors_cycle):
    v_style.append(('BACKGROUND', (0, i+1), (-1, i+1), c))
v_tbl.setStyle(TableStyle(v_style))
story.append(v_tbl)
story.append(Spacer(1, 4))

val_mem = Table([[
    Paragraph("๐Ÿง   Memory:  <b>C - C - C - F</b>  (Content โ€ข Construct โ€ข Criterion โ€ข Face)", tip_style)
]], colWidths=[17.5*cm])
val_mem.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), LIGHT_TEAL),
    ('BOX', (0,0), (-1,-1), 1, TEAL),
    ('TOPPADDING',  (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
]))
story.append(val_mem)
story.append(Spacer(1, 8))

# โ”€โ”€ RELIABILITY โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(section_header("๐Ÿ”  RELIABILITY  =  'Does the test give consistent results?'", PURPLE))
story.append(Spacer(1, 4))

analogy2 = Table([[
    Paragraph(
        "๐Ÿ”‘ <b>Analogy:</b> Weigh yourself 3 times โ€” get 3 different readings = NOT reliable. "
        "A reliable test gives the <i>same result every time</i> under same conditions.",
        analogy_style)
]], colWidths=[17.5*cm])
analogy2.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), LIGHT_PURPLE),
    ('BOX', (0,0), (-1,-1), 1, PURPLE),
    ('TOPPADDING', (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('LEFTPADDING', (0,0), (-1,-1), 10),
]))
story.append(analogy2)
story.append(Spacer(1, 5))

reliability_types = [
    (PURPLE, "1. Test-Retest",
     "Same test, same people, different times โ€” results should be similar",
     "Personality test now and again in 2 weeks โ†’ similar scores"),
    (MED_BLUE, "2. Inter-Rater",
     "Different raters assessing the same thing should agree",
     "Two teachers grade same essay โ†’ similar marks"),
    (TEAL, "3. Parallel-Forms",
     "Two versions of same test โ†’ similar results",
     "Math Test Version A โ‰ˆ Math Test Version B"),
    (GREEN, "4. Internal Consistency\n(Split-Half)",
     "Two halves of the test give similar scores",
     "20-item anxiety test: Q1โ€“10 score โ‰ˆ Q11โ€“20 score"),
    (ORANGE, "4. Internal Consistency\n(Cronbach's Alpha)",
     "Statistical measure (0โ€“1) of how correlated items are",
     "ฮฑ = 0.85 = HIGH reliability โœ“  |  ฮฑ < 0.7 = LOW reliability โœ—"),
]

r_data = [
    [Paragraph("Type", heading_cell), Paragraph("Meaning", heading_cell),
     Paragraph("Example", heading_cell)]
]
r_colors = [LIGHT_PURPLE, LIGHT_BLUE, LIGHT_TEAL, LIGHT_GREEN, LIGHT_ORANGE]
for i, (clr, typ, meaning, example) in enumerate(reliability_types):
    r_data.append([
        Paragraph(f"<b>{typ}</b>", S('RT', fontSize=8, textColor=clr,
                                      fontName='Helvetica-Bold', leading=11)),
        Paragraph(meaning, small_style),
        Paragraph(f"<i>{example}</i>", small_style),
    ])

r_tbl = Table(r_data, colWidths=[4.2*cm, 6*cm, 7.3*cm])
r_style = [
    ('BACKGROUND', (0,0), (-1,0), PURPLE),
    ('GRID', (0,0), (-1,-1), 0.4, colors.HexColor("#bbbbbb")),
    ('TOPPADDING',  (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING',  (0,0), (-1,-1), 5),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]
for i, c in enumerate(r_colors):
    r_style.append(('BACKGROUND', (0, i+1), (-1, i+1), c))
r_tbl.setStyle(TableStyle(r_style))
story.append(r_tbl)
story.append(Spacer(1, 4))

rel_mem = Table([[
    Paragraph("๐Ÿง   Memory:  <b>T - I - P - I</b>  (Test-retest โ€ข Inter-rater โ€ข Parallel-forms โ€ข Internal consistency)", tip_style)
]], colWidths=[17.5*cm])
rel_mem.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), LIGHT_PURPLE),
    ('BOX', (0,0), (-1,-1), 1, PURPLE),
    ('TOPPADDING',  (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
]))
story.append(rel_mem)
story.append(Spacer(1, 6))

# โ”€โ”€ COMPARISON TABLE โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(section_header("โš–  VALIDITY  vs  RELIABILITY", MED_BLUE))
story.append(Spacer(1, 4))

comp_data = [
    [Paragraph("", heading_cell),
     Paragraph("VALIDITY", heading_cell),
     Paragraph("RELIABILITY", heading_cell)],
    [Paragraph("<b>Means</b>", small_bold),
     Paragraph("Accuracy โ€” measures the right thing", small_style),
     Paragraph("Consistency โ€” same results every time", small_style)],
    [Paragraph("<b>Importance</b>", small_bold),
     Paragraph("Makes results meaningful & applicable", small_style),
     Paragraph("Makes results dependable & repeatable", small_style)],
    [Paragraph("<b>Key rule</b>", small_bold),
     Paragraph("โŒ Cannot be valid without being reliable", small_style),
     Paragraph("โœ… Can be reliable without being valid", small_style)],
]
comp_tbl = Table(comp_data, colWidths=[3*cm, 7.25*cm, 7.25*cm])
comp_tbl.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), MED_BLUE),
    ('BACKGROUND', (1,1), (1,-1), LIGHT_TEAL),
    ('BACKGROUND', (2,1), (2,-1), LIGHT_PURPLE),
    ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor("#bbbbbb")),
    ('TOPPADDING',  (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('LEFTPADDING',  (0,0), (-1,-1), 6),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(comp_tbl)
story.append(Spacer(1, 4))

clock_box = Table([[
    Paragraph(
        "๐Ÿ• <b>Clock Analogy:</b>  Clock always 10 min fast = <b>RELIABLE โœ“  but NOT Valid โœ—</b>  |  "
        "Clock showing random times = <b>Neither Reliable nor Valid โœ—</b>",
        S('CB', fontSize=8.5, textColor=RED, fontName='Helvetica-Bold',
          alignment=TA_CENTER, leading=12))
]], colWidths=[17.5*cm])
clock_box.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), LIGHT_RED),
    ('BOX', (0,0), (-1,-1), 1, RED),
    ('TOPPADDING', (0,0), (-1,-1), 6),
    ('BOTTOMPADDING', (0,0), (-1,-1), 6),
]))
story.append(clock_box)
story.append(Spacer(1, 6))

# โ”€โ”€ PRE-TESTING โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(section_header("๐Ÿงช  PRE-TESTING  (Pilot Testing)", ORANGE))
story.append(Spacer(1, 3))
pre_box = Table([[
    Paragraph(
        "Done BEFORE the main study to check if your questionnaire works. "
        "Identifies: unclear questions โ€ข format problems โ€ข validity and reliability issues.",
        body_style)
]], colWidths=[17.5*cm])
pre_box.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), LIGHT_ORANGE),
    ('BOX', (0,0), (-1,-1), 1, ORANGE),
    ('TOPPADDING', (0,0), (-1,-1), 6),
    ('BOTTOMPADDING', (0,0), (-1,-1), 6),
    ('LEFTPADDING', (0,0), (-1,-1), 10),
]))
story.append(pre_box)
story.append(Spacer(1, 6))

# โ”€โ”€ EXAM Q&A โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(section_header("โ“  LIKELY EXAM QUESTIONS & ANSWERS", RED))
story.append(Spacer(1, 4))

qa = [
    ("What is a literature review?",
     "A survey of scholarly sources on a specific topic to identify relevant theories, methods, and gaps in existing research."),
    ("Write the 5 steps of literature review.",
     "1. Search for relevant literature  2. Evaluate sources  3. Identify themes/debates/gaps  4. Outline the structure  5. Write your review"),
    ("What are Boolean operators? Give examples.",
     "AND (narrows โ€” Fever AND Pain), OR (broadens โ€” Fever OR Pain), NOT (excludes โ€” Fever NOT children). Use \" \" for exact phrase, ( ) to group."),
    ("Define validity. Name its types.",
     "Validity = test measures what it claims to. Types: Content, Construct (convergent + discriminant), Criterion (predictive + concurrent), Face."),
    ("Define reliability. Name its types.",
     "Reliability = consistency of a measure. Types: Test-retest, Inter-rater, Parallel-forms, Internal consistency (split-half, Cronbach's alpha)."),
    ("Difference between validity & reliability?",
     "Validity = accuracy (measures right thing). Reliability = consistency (same result every time). A test can be reliable but NOT valid."),
    ("What is Cronbach's Alpha?",
     "A statistic (0โ€“1) measuring internal consistency. Value โ‰ฅ 0.7โ€“0.8 = good reliability. It shows how correlated test items are."),
    ("Where does literature review go in a thesis?",
     "Near the beginning โ€” after the introduction, before the methodology/theoretical framework."),
]

qa_data = []
for q, a in qa:
    qa_data.append([
        Paragraph(f"Q: {q}", q_style),
        Paragraph(f"A: {a}", a_style),
    ])

qa_tbl = Table(qa_data, colWidths=[6*cm, 11.5*cm])
qa_tbl.setStyle(TableStyle([
    ('ROWBACKGROUNDS', (0,0), (-1,-1), [LIGHT_RED, WHITE]),
    ('GRID', (0,0), (-1,-1), 0.3, colors.HexColor("#dddddd")),
    ('TOPPADDING',  (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING',  (0,0), (-1,-1), 5),
    ('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(qa_tbl)
story.append(Spacer(1, 6))

# โ”€โ”€ FINAL MEMORY STRIP โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
final_strip = Table([[
    Paragraph("S-E-I-O-W", S('FS', fontSize=10, textColor=WHITE,
               fontName='Helvetica-Bold', alignment=TA_CENTER)),
    Paragraph("5 Steps", S('FL', fontSize=8, textColor=WHITE,
               fontName='Helvetica', alignment=TA_CENTER)),
    Paragraph("ANDยทORยทNOT", S('FS2', fontSize=10, textColor=WHITE,
               fontName='Helvetica-Bold', alignment=TA_CENTER)),
    Paragraph("Boolean", S('FL2', fontSize=8, textColor=WHITE,
               fontName='Helvetica', alignment=TA_CENTER)),
    Paragraph("C-C-C-F", S('FS3', fontSize=10, textColor=WHITE,
               fontName='Helvetica-Bold', alignment=TA_CENTER)),
    Paragraph("Validity", S('FL3', fontSize=8, textColor=WHITE,
               fontName='Helvetica', alignment=TA_CENTER)),
    Paragraph("T-I-P-I", S('FS4', fontSize=10, textColor=WHITE,
               fontName='Helvetica-Bold', alignment=TA_CENTER)),
    Paragraph("Reliability", S('FL4', fontSize=8, textColor=WHITE,
               fontName='Helvetica', alignment=TA_CENTER)),
]], colWidths=[2.5*cm, 1.9*cm, 3*cm, 1.9*cm, 2.5*cm, 1.9*cm, 2.5*cm, 1.7*cm])
final_strip.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (1,-1), TEAL),
    ('BACKGROUND', (2,0), (3,-1), PURPLE),
    ('BACKGROUND', (4,0), (5,-1), MED_BLUE),
    ('BACKGROUND', (6,0), (7,-1), ORANGE),
    ('TOPPADDING',  (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('ALIGN', (0,0), (-1,-1), 'CENTER'),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(final_strip)

# BUILD
doc.build(story)
print("PDF created successfully:", OUTPUT)
Running Command

python3 /home/daytona/workspace/lit-review-study/make_reference_pdf.py 2>&1

Reading File
Editing File

~/lit-review-study/make_reference_pdf.py

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/lit-review-study/make_reference_pdf.py'
Running Command

python3 /home/daytona/workspace/lit-review-study/make_reference_pdf.py 2>&1

Editing File

~/lit-review-study/make_reference_pdf.py

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/lit-review-study/make_reference_pdf.py'
Running Command

python3 /home/daytona/workspace/lit-review-study/make_reference_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/lit-review-study/PSM_Quick_Reference.pdf

Your colorful quick-reference PDF is ready! ๐ŸŽ‰
Download here:

PSM Quick Reference

PDF Document ยท PDF


What's inside (2 pages, full color):
Page 1 - Literature Review
  • ๐Ÿ“– Definition + 5 Purposes (color-coded numbered boxes)
  • โญ 5 Key Steps (S-E-I-O-W) - each step in its own color strip
  • ๐Ÿ” Boolean Operators table (AND/OR/NOT with real examples)
  • ๐Ÿ“‘ How to Read an Article (5-step reading guide)
  • ๐Ÿ— 4 Structures + Where in Thesis (side by side)
Page 2 - Validity & Reliability
  • ๐ŸŽฏ Validity types table with analogies (color-coded rows)
  • ๐Ÿ” Reliability types table with analogies (color-coded rows)
  • โš– Validity vs Reliability comparison table
  • ๐Ÿ• Clock analogy box (highlighted in red)
  • ๐Ÿงช Pre-testing section
  • โ“ 8 likely exam Q&As
  • ๐Ÿง  Final memory codes strip at the bottom
Good luck tomorrow! ๐Ÿ’ช

Tomorrow is my PSM practical exam. Examiner will surely ask about chickenguniya fever , congenital anomaly ,malaria .and i dont know nothing about them and i have no concept of this . please help me to understand this topic in very easy language and remember all of them so i will secure better marks. According to PSM style

Reading File
Finding Sources
Finding Sources
Finding Sources
Reading File
Finding Sources
Finding Sources
Reading File
Finding Sources
Finding Sources
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
I now have comprehensive PSM content for all three topics from Park's Textbook. Let me now write the complete study guide.

๐Ÿ“š PSM PRACTICAL EXAM STUDY GUIDE

Chikungunya Fever | Malaria | Congenital Anomalies

(Based on Park's Textbook of Preventive & Social Medicine)


๐ŸฆŸ TOPIC 1: CHIKUNGUNYA FEVER

What is it? (in simple words)

Chikungunya is a viral fever spread by Aedes mosquito bites. The most famous symptom is very severe joint pain that makes the patient bend over - this is literally what the name means!
"Chikungunya" = Word from Kimakonde language (Tanzania) meaning "to become contorted" or "doubled up" - because joint pain is SO severe the patient walks bent over.

Agent (Cause)

  • Virus: Chikungunya virus - a single-stranded RNA virus, Alphavirus genus, Togaviridae family
  • Also called a "Group A Arbovirus" (arthropod-borne virus)

Epidemiology (How it spreads)

FeatureDetail
VectorAedes aegypti (primary) and Aedes albopictus
ReservoirHumans (during epidemic) + jungle primates (wild cycle)
TransmissionMosquito bite, bloodborne (rare), intrapartum (mother to baby during delivery)
SeasonRainy season - when mosquito population peaks
First isolatedTanzania, 1952-53
IndiaRe-emerged in 2006, endemic in 24 states and 6 UTs
Not transmitted through breastfeeding - important fact!

Incubation Period

4-7 days (range: 1-12 days)

Clinical Features (Signs & Symptoms)

Think of it in this order:
SUDDEN ONSET:
  1. High fever with chills
  2. Severe joint pain (arthropathy) - the hallmark! Affects metacarpophalangeal joints, wrist, elbow, shoulder, knee, ankle - bilateral and symmetric
  3. Headache (cephalalgia)
  4. Backache (lumbago)
  5. Morbilliform rash (measles-like rash) in 60-80% patients - on trunk and limbs - can recur every 3-7 days
  6. Conjunctivitis
  7. Lymph node enlargement (adenopathy)
  8. Anorexia, nausea, vomiting
Other features:
  • Coffee-coloured vomiting
  • Epistaxis (nosebleed)
  • Petechiae
Arthropathy appears: Between 3rd and 5th day after symptom onset - can persist for months to years
Key fact: No deaths have been attributed to chikungunya fever (Park's PSM)

Difference from Dengue (Examiner favourite!)

FeatureChikungunyaDengue
Joint painVery severe, hallmarkMild
RashCommon, morbilliformCommon
HemorrhageRareCommon
DeathsNonePossible
Chronic arthritisYes, months-yearsNo

Diagnosis

  • Clinical - history + features
  • RT-PCR - within first week (detects virus)
  • IgM antibodies - develop end of first week, persist 30-90 days
  • Plaque-Reduction Neutralization Test (PRNT) - reference test at CDC

Treatment

  • NO specific antiviral available
  • Supportive treatment:
    • Rest + fluids
    • Paracetamol or Diclofenac sodium for fever and joint pain
    • Chloroquine has been used
    • Avoid Aspirin and Steroids (important!)
    • NSAIDs - avoid initially (rule out dengue first)
    • Physiotherapy for persistent joint pain
    • Methotrexate/Hydroxychloroquine for severe persistent arthritis

Prevention & Control

  • No vaccine available (as of Park's edition)
  • Vector control: Eliminate Aedes mosquito breeding sites
  • Personal protection: insect repellent, long sleeves, screened dwellings
  • Protect febrile patients from mosquito bites (to stop further spread)
  • Reportable disease - notify to state/local health department

Memory Trick

CHIK = Contorted, Hot, Insect (Aedes), Knees (joints)
  • C: Contorted = severe joint pain (the name)
  • H: High fever, sudden onset
  • I: Insect = Aedes mosquito
  • K: Knees + all joints = arthropathy is the hallmark


๐ŸฆŸ TOPIC 2: MALARIA

What is it? (in simple words)

Malaria is a protozoal disease spread by the bite of female Anopheles mosquito. It causes fever that comes and goes in a pattern - every 3rd or 4th day.

Agent (Cause)

Plasmodium - a protozoan parasite. 4 species:
SpeciesFever PatternSeverity
P. falciparumEvery 36-48 hrs (quotidian/sub-tertian)Most dangerous - causes cerebral malaria, blackwater fever
P. vivaxEvery 48 hrs (tertian)Common in India
P. malariaeEvery 72 hrs (quartan)Mild
P. ovaleEvery 48 hrsMild, rare
India: P. falciparum is the main killer - it's drug resistant and causes complications

Epidemiology

FeatureDetail
VectorFemale Anopheles mosquito
TransmissionMosquito bite (main), blood transfusion, congenital, needle sharing
Global burden229 million cases in 2019 in 87 endemic countries
India burdenCases reduced from 20 million (2000) to 5.6 million (2019)
India deaths73 deaths in 2019
High burden statesNE states, Chhattisgarh, Jharkhand, MP, Odisha, Andhra Pradesh, Maharashtra, Gujarat, Rajasthan, WB, Karnataka
High-risk groups:
  1. Young children (not yet immune)
  2. Non-immune pregnant women (causes miscarriage, maternal death)
  3. HIV patients
  4. International travellers (no immunity)
  5. Tribal populations in forest/border areas

Classic Clinical Features - The "Malarial Paroxysm"

A typical attack has 3 stages:
StageWhat happensDuration
1. Cold StagePatient feels very cold, shivering/rigor15-60 min
2. Hot StageHigh fever, headache, nausea, vomiting2-6 hours
3. Sweating StageProfuse sweating, fever breaks, patient feels better2-4 hours
After the sweating stage - patient feels completely well until the next paroxysm.

Complications of Malaria (Mainly P. falciparum)

ComplicationDescription
Cerebral malariaConvulsions, coma - most dangerous
Blackwater feverMassive hemolysis โ†’ hemoglobinuria (black urine)
Severe anemiaDestruction of RBCs
HypoglycemiaEspecially in children and pregnant women
Pulmonary edemaARDS
Algid malariaCollapse, shock
Malaria in pregnancyLow birth weight, miscarriage
Fatality: 10-30% in children with severe malaria referred to hospital

Diagnosis

  1. Thick blood smear (gold standard) - done during fever
  2. Thin blood smear - species identification
  3. Rapid Diagnostic Test (RDT) - HRP-2 antigen for P. falciparum
  4. PCR - most sensitive
  5. Widal test - NOT for malaria (common mistake)
API = Annual Parasite Incidence - used for monitoring ABER = Annual Blood Examination Rate - should be >10% SPR = Slide Positivity Rate - to assess endemicity

Treatment (ACT is the KEY)

P. falciparum (drug resistant) - use ACT:
  • ACT = Artemisinin-based Combination Therapy (e.g., Artesunate + Amodiaquine)
  • Severe malaria: IV Artesunate or IV Quinine
P. vivax:
  • Chloroquine (14 days)
  • Plus Primaquine (for radical cure - to kill liver hypnozoites and prevent relapse)
Note: Resistance of P. falciparum to chloroquine and sulfadoxine-pyrimethamine is widespread in South-East Asia

Prevention & Control

1. Vector Control (Most important in PSM!)

  • IRS = Indoor Residual Spraying of insecticides (DDT, Malathion)
  • ITN = Insecticide-Treated Nets / Long-Lasting Insecticidal Nets (LLINs)
  • Larval control: anti-larval measures (oil, larvicides, draining stagnant water)
  • Biological control: Gambusia fish (eats larvae)

2. Personal Protection

  • Bed nets, repellents (DEET)
  • Protective clothing

3. Chemoprophylaxis (for travellers)

  • Chloroquine (where sensitive), or Doxycycline/Mefloquine

4. Vaccine

  • RTS,S/AS01 (Mosquirix) - first approved malaria vaccine (WHO approved 2021, for P. falciparum, for children in sub-Saharan Africa)

National Programme

NVBDCP = National Vector Borne Disease Control Programme
  • Controls malaria, dengue, chikungunya, kala-azar, filaria, JE in India
  • Strategies: early diagnosis, prompt treatment, IRS, ITN, epidemiological surveillance

Memory Trick for Malaria

"FACT" = Falciparum is the most dangerous, Anopheles female transmits, Cold-Hot-Sweating are 3 stages, Treatment is ACT


๐Ÿ‘ถ TOPIC 3: CONGENITAL ANOMALIES

What is it? (in simple words)

Congenital anomaly means a defect present at birth (or determined before birth). "Congenital" = "born with." It can be a structural defect (like a hole in the heart), a biochemical defect (like PKU), or a functional defect.

Definitions (Know the difference!)

TermWHO Definition
Congenital malformationStructural defects only at birth
Congenital anomalyIncludes ALL - structural + biochemical + functional disorders present at birth
WHO document 1972: "Congenital anomaly" is the broader term - includes biochemical, structural, and functional disorders.

Incidence (Park's PSM figures)

  • Affects approximately 1 in 33 infants
  • Causes 3.2 million birth defect-related disabilities every year
  • 270,000 newborns die in the first 28 days of life each year from congenital anomalies
Most common serious congenital disorders:
  1. Heart defects (most common)
  2. Neural tube defects (NTDs - e.g., spina bifida, anencephaly)
  3. Down syndrome

Causes (Etiology)

1. Genetic Factors

TypeExamples
Chromosomal abnormalitiesDown syndrome (extra chr 21), Klinefelter syndrome (XXY), Turner syndrome (XO)
Inborn errors of metabolismPKU (phenylketonuria), Tay-Sachs disease, Galactosaemia
Single gene defectsHaemophilia, sickle cell disease

2. Environmental Factors (Teratogens)

CategoryExamples
Infections (TORCH)Rubella, Cytomegalovirus (CMV), Toxoplasma, Syphilis, Herpes simplex, Varicella
DrugsThalidomide (phocomelia), Stilboestrol, Anti-convulsants, Alcohol, Tobacco, high-dose Vitamin A
Maternal diseasesDiabetes, Cardiac failure
RadiationX-rays, irradiation
NutritionalFolic acid deficiency (causes neural tube defects)
Remember TORCH infections: Toxoplasma, Other (syphilis, HIV, Parvovirus), Rubella, CMV, Herpes

Risk Factors

  1. Advanced maternal age - main risk for Down syndrome (risk = 1:67 at age 40-45 vs 1:800 overall)
  2. Consanguineous marriages (first cousin, uncle-niece) - increases risk of mental retardation and malformations
  3. Previous malformed child - risk in next pregnancy is 10x higher
  4. Drug exposure in first trimester
  5. Infections in first trimester

Types of Presentation

  • Obvious at birth: Cleft palate, cleft lip
  • Obvious in early life: Congenital dislocation of hip (CDH)
  • Detected later: Patent ductus arteriosus (PDA)
  • Major: Need surgical intervention
  • Minor: No functional implication (e.g., skin tag in front of ear)

Prenatal Diagnosis (Very important for PSM exam!)

TestWhat it detectsWhen
Alpha Fetoprotein (AFP)Neural tube defects (elevated AFP in maternal blood + amniotic fluid)1st trimester onwards
UltrasoundMany structural abnormalitiesAny trimester
AmniocentesisDown syndrome, NTDs, chromosomal abnormalities2nd trimester (after 12 weeks)
Chorionic Villus Sampling (CVS)Chromosome status9-11 weeks (earlier than amnio!)
CVS vs Amniocentesis: CVS is done earlier (9-11 weeks) vs amniocentesis (after 12 weeks)

Prevention - 3 Main Approaches (Park's)

  1. Discourage further reproduction after birth of a malformed child (risk 10x higher in next pregnancy)
  2. Avoid pregnancy in high-risk circumstances:
    • Advanced maternal age (Down syndrome risk)
    • Consanguineous marriages
  3. Identify and remove teratogens:
    • Avoid drugs in pregnancy (especially first trimester)
    • Treat infections (rubella vaccination - now routine in many countries)
    • Avoid X-rays, radiation
    • Folic acid supplementation before and during pregnancy (prevents NTDs)
    • Avoid alcohol, tobacco

Surveillance

  • Birth defects surveillance is key for public health planning
  • Penrose (1961): Major advances in prevention must come from environmental factors (not genetic control)

Memory Trick

"GEMS" for causes:
  • Genetic (chromosomal, inborn errors, single gene)
  • Environmental infections (TORCH)
  • Maternal conditions (diabetes, radiation)
  • Substances/drugs (thalidomide, alcohol, folate deficiency)


๐Ÿ”‘ QUICK COMPARISON TABLE (Examiner Favourite)

FeatureChikungunyaMalaria
CauseChikungunya virus (RNA)Plasmodium protozoa
VectorAedes mosquitoFemale Anopheles mosquito
Fever patternContinuous, highPeriodic (every 3rd or 4th day)
Key symptomSevere joint pain (arthropathy)Cold-hot-sweating paroxysm
TreatmentSupportive (no specific drug)ACT for falciparum
PreventionVector control, no vaccineIRS, ITNs, ACT, vaccine (RTS,S)
DeathsNoneYes (especially P. falciparum)
SeasonRainy seasonRainy season
ProgrammeNVBDCPNVBDCP

๐Ÿง  ALL MEMORY TRICKS TOGETHER

TopicMemory Code
ChikungunyaCHIK - Contorted name, High fever, Insect=Aedes, Knees/joints
Malaria stagesCHS - Cold โ†’ Hot โ†’ Sweating
Malaria treatmentACT - Artemisinin-based Combination Therapy
Malaria speciesFVMO - Falciparum (dangerous), Vivax (common India), Malariae, Ovale
Congenital causesGEMS - Genetic, Environmental infection, Maternal disease, Substances
TORCH infectionsTORCH - Toxoplasma, Other, Rubella, CMV, Herpes
Prenatal diagnosisAUAC - AFP, Ultrasound, Amniocentesis, CVS

โ“ MOST LIKELY EXAM QUESTIONS

Chikungunya:
  • Q: Define chikungunya. What does the name mean? โ†’ "Doubled up / contorted" due to joint pain; Tanzania 1952-53
  • Q: Vector of chikungunya? โ†’ Aedes aegypti and Aedes albopictus
  • Q: Treatment of chikungunya? โ†’ Supportive; Paracetamol; avoid Aspirin & Steroids
  • Q: How is chikungunya different from dengue? โ†’ Joint pain more severe; no deaths; chronic arthritis
Malaria:
  • Q: Define malaria / causative agent? โ†’ Protozoal disease caused by Plasmodium, transmitted by female Anopheles
  • Q: What are the 3 stages of malarial paroxysm? โ†’ Cold โ†’ Hot โ†’ Sweating
  • Q: Most dangerous species? โ†’ P. falciparum (cerebral malaria, blackwater fever)
  • Q: Treatment of P. falciparum malaria? โ†’ ACT (Artemisinin-based Combination Therapy)
  • Q: What is NVBDCP? โ†’ National Vector Borne Disease Control Programme
Congenital Anomalies:
  • Q: Definition of congenital anomaly (WHO)? โ†’ All structural, biochemical, and functional disorders present at birth
  • Q: Incidence? โ†’ 1 in 33 infants; 270,000 neonatal deaths/year
  • Q: 3 approaches to prevention? โ†’ Discourage reproduction after malformed child; avoid pregnancy in high-risk; remove teratogens
  • Q: Teratogens you must name? โ†’ Thalidomide, Rubella, Folic acid deficiency, X-rays, Alcohol
  • Q: CVS vs Amniocentesis? โ†’ CVS at 9-11 weeks; Amniocentesis after 12 weeks
  • Q: Risk factor for Down syndrome? โ†’ Advanced maternal age (risk 1:67 at age 40-45)

All content directly from Park's Textbook of Preventive and Social Medicine - the standard PSM reference. Best of luck tomorrow! ๐Ÿ’ช

Create a colorful PDF summary of these 3 topics for quick revision

Writing File

~/psm-topics/make_psm_pdf.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm
from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table,
                                TableStyle, PageBreak)
from reportlab.lib.styles import ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT

OUTPUT = "/home/daytona/workspace/psm-topics/PSM_3Topics_QuickRevision.pdf"

# โ”€โ”€ Colour Palette โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
C = {
    # Chikungunya - warm orange/red
    "chik_dark":   colors.HexColor("#bf360c"),
    "chik_mid":    colors.HexColor("#e64a19"),
    "chik_light":  colors.HexColor("#fbe9e7"),
    "chik_accent": colors.HexColor("#ff8a65"),
    # Malaria - deep teal/green
    "mal_dark":    colors.HexColor("#1b5e20"),
    "mal_mid":     colors.HexColor("#2e7d32"),
    "mal_light":   colors.HexColor("#e8f5e9"),
    "mal_accent":  colors.HexColor("#66bb6a"),
    # Congenital - deep purple/indigo
    "con_dark":    colors.HexColor("#4a148c"),
    "con_mid":     colors.HexColor("#6a1b9a"),
    "con_light":   colors.HexColor("#f3e5f5"),
    "con_accent":  colors.HexColor("#ab47bc"),
    # Shared
    "navy":        colors.HexColor("#0d1b2a"),
    "dark_blue":   colors.HexColor("#1a237e"),
    "gold":        colors.HexColor("#f9a825"),
    "gold_light":  colors.HexColor("#fffde7"),
    "grey":        colors.HexColor("#f5f5f5"),
    "dgrey":       colors.HexColor("#757575"),
    "white":       colors.white,
    "black":       colors.HexColor("#212121"),
    "red_warn":    colors.HexColor("#c62828"),
    "red_light":   colors.HexColor("#ffebee"),
}

W = 17.7 * cm   # usable page width

doc = SimpleDocTemplate(
    OUTPUT, pagesize=A4,
    leftMargin=1.4*cm, rightMargin=1.4*cm,
    topMargin=1.3*cm, bottomMargin=1.3*cm
)

# โ”€โ”€ Style helpers โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
def PS(name, **kw):
    base = kw.pop("parent", "Normal")
    defaults = dict(fontName="Helvetica", fontSize=9, leading=13,
                    textColor=C["black"], spaceAfter=0)
    defaults.update(kw)
    return ParagraphStyle(name, **defaults)

# Common styles
TITLE  = PS("title",  fontName="Helvetica-Bold", fontSize=22, textColor=C["white"],
            alignment=TA_CENTER, leading=28)
SUB    = PS("sub",    fontName="Helvetica",      fontSize=11, textColor=C["white"],
            alignment=TA_CENTER, leading=16)
SEC    = PS("sec",    fontName="Helvetica-Bold", fontSize=12, textColor=C["white"],
            alignment=TA_LEFT,   leading=16)
BODY   = PS("body",   fontSize=8.5, leading=12)
BOLD   = PS("bold",   fontName="Helvetica-Bold", fontSize=8.5, leading=12)
SMALL  = PS("small",  fontSize=8,   leading=11)
SMBOLD = PS("smbold", fontName="Helvetica-Bold", fontSize=8, leading=11)
TIP    = PS("tip",    fontName="Helvetica-Bold", fontSize=9,
            textColor=C["gold"], alignment=TA_CENTER, leading=13)
WHITE_B= PS("wb",     fontName="Helvetica-Bold", fontSize=8.5,
            textColor=C["white"], leading=12)
WHITE_N= PS("wn",     fontSize=8.5, textColor=C["white"], leading=12)
HCELL  = PS("hcell",  fontName="Helvetica-Bold", fontSize=8.5,
            textColor=C["white"], alignment=TA_CENTER, leading=12)
WARN   = PS("warn",   fontName="Helvetica-Bold", fontSize=8.5,
            textColor=C["red_warn"], alignment=TA_CENTER, leading=12)

# โ”€โ”€ Reusable builders โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
def section_bar(text, dark, mid):
    t = Table([[Paragraph(text, SEC)]], colWidths=[W])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), dark),
        ("TOPPADDING",    (0,0), (-1,-1), 6),
        ("BOTTOMPADDING", (0,0), (-1,-1), 6),
        ("LEFTPADDING",   (0,0), (-1,-1), 10),
    ]))
    return t

def info_box(text_para, bg, border):
    t = Table([[text_para]], colWidths=[W])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), bg),
        ("BOX",        (0,0), (-1,-1), 1.2, border),
        ("TOPPADDING",    (0,0), (-1,-1), 6),
        ("BOTTOMPADDING", (0,0), (-1,-1), 6),
        ("LEFTPADDING",   (0,0), (-1,-1), 10),
        ("RIGHTPADDING",  (0,0), (-1,-1), 10),
    ]))
    return t

def color_table(headers, rows, col_w, hdr_color, alt_color):
    data = [[Paragraph(h, HCELL) for h in headers]]
    for i, row in enumerate(rows):
        bg = alt_color if i % 2 == 0 else C["white"]
        data.append([Paragraph(str(c), SMALL) for c in row])
    t = Table(data, colWidths=col_w)
    t.setStyle(TableStyle([
        ("BACKGROUND",   (0,0), (-1,0), hdr_color),
        ("ROWBACKGROUNDS",(0,1),(-1,-1),[alt_color, C["white"]]),
        ("GRID",         (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), "MIDDLE"),
    ]))
    return t

def numbered_rows(items, num_color):
    rows = []
    for i, (label, detail) in enumerate(items):
        num_p  = Paragraph(f"<b>{i+1}</b>",
                           PS(f"n{i}", fontName="Helvetica-Bold", fontSize=10,
                              textColor=C["white"], alignment=TA_CENTER))
        body_p = Paragraph(f"<b>{label}</b> โ€” {detail}", BODY)
        row = Table([[num_p, body_p]], colWidths=[0.7*cm, W - 0.7*cm])
        row.setStyle(TableStyle([
            ("BACKGROUND",    (0,0),(0,0), num_color),
            ("BACKGROUND",    (1,0),(1,0), C["grey"] if i%2==0 else C["white"]),
            ("VALIGN",        (0,0),(-1,-1), "MIDDLE"),
            ("TOPPADDING",    (0,0),(-1,-1), 4),
            ("BOTTOMPADDING", (0,0),(-1,-1), 4),
            ("LEFTPADDING",   (1,0),(1,0), 7),
            ("LINEBELOW",     (0,0),(-1,-1), 0.3, colors.HexColor("#dddddd")),
        ]))
        rows.append(row)
    return rows

def memory_box(text, bg=C["gold_light"], border=C["gold"]):
    t = Table([[Paragraph(f"๐Ÿง   {text}", TIP)]], colWidths=[W])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0),(-1,-1), bg),
        ("BOX",        (0,0),(-1,-1), 1.2, border),
        ("TOPPADDING",    (0,0),(-1,-1), 6),
        ("BOTTOMPADDING", (0,0),(-1,-1), 6),
    ]))
    return t

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

# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
story = []

# โ”€โ”€โ”€ COVER BANNER โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
cover = Table([
    [Paragraph("PSM QUICK REVISION", TITLE)],
    [Paragraph("Chikungunya Fever  โ€ข  Malaria  โ€ข  Congenital Anomalies", SUB)],
    [Paragraph("Based on Park's Textbook of Preventive &amp; Social Medicine", 
               PS("cv3", fontSize=9, textColor=colors.HexColor("#bbdefb"),
                  alignment=TA_CENTER, leading=13))],
], colWidths=[W])
cover.setStyle(TableStyle([
    ("BACKGROUND", (0,0),(0,0), C["navy"]),
    ("BACKGROUND", (0,1),(0,1), C["dark_blue"]),
    ("BACKGROUND", (0,2),(0,2), colors.HexColor("#1565c0")),
    ("TOPPADDING",    (0,0),(0,0), 12),
    ("BOTTOMPADDING", (0,0),(0,0), 4),
    ("TOPPADDING",    (0,1),(0,1), 4),
    ("BOTTOMPADDING", (0,1),(0,1), 4),
    ("TOPPADDING",    (0,2),(0,2), 4),
    ("BOTTOMPADDING", (0,2),(0,2), 10),
]))
story.append(cover)
story.append(sp(8))

# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
# TOPIC 1 โ€” CHIKUNGUNYA FEVER
# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
story.append(section_bar("๐ŸฆŸ  TOPIC 1 โ€” CHIKUNGUNYA FEVER", C["chik_dark"], C["chik_mid"]))
story.append(sp(4))

# Definition box
story.append(info_box(
    Paragraph('<b>Definition:</b> A dengue-like viral fever caused by <b>Chikungunya virus</b> '
              '(RNA virus, Alphavirus, Togaviridae family), transmitted by <b>Aedes mosquitoes</b>. '
              'Hallmark = severe joint pain. '
              '"Chikungunya" = <i>Kimakonde language</i> (Tanzania) = <b>"to become contorted / doubled up"</b> '
              'due to excruciating joint pain. First isolated: <b>Tanzania, 1952โ€“53</b>.',
              BODY), C["chik_light"], C["chik_mid"]))
story.append(sp(5))

# 2-column: Agent + Epi
agent_tbl = Table([
    [Paragraph("AGENT", HCELL)],
    [Paragraph("โ€ข <b>Virus:</b> Single-stranded RNA virus<br/>โ€ข <b>Family:</b> Togaviridae<br/>"
               "โ€ข <b>Genus:</b> Alphavirus<br/>โ€ข Also called Group A Arbovirus", SMALL)],
], colWidths=[5.8*cm])
agent_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(0,0),C["chik_mid"]),
    ("BACKGROUND",(0,1),(0,1),C["chik_light"]),
    ("TOPPADDING",(0,0),(-1,-1),5),("BOTTOMPADDING",(0,0),(-1,-1),5),
    ("LEFTPADDING",(0,0),(-1,-1),6),
    ("BOX",(0,0),(-1,-1),0.5,C["chik_mid"]),
]))

epi_tbl = Table([
    [Paragraph("EPIDEMIOLOGY", HCELL)],
    [Paragraph("โ€ข <b>Vector:</b> <i>Aedes aegypti</i> &amp; <i>Aedes albopictus</i><br/>"
               "โ€ข <b>Incubation:</b> 4โ€“7 days (range 1โ€“12 days)<br/>"
               "โ€ข <b>Season:</b> Rainy season (peak vector population)<br/>"
               "โ€ข <b>India:</b> Endemic in 24 states + 6 UTs<br/>"
               "โ€ข Re-emerged in India in <b>2006</b>", SMALL)],
], colWidths=[11.5*cm])
epi_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(0,0),C["chik_mid"]),
    ("BACKGROUND",(0,1),(0,1),C["chik_light"]),
    ("TOPPADDING",(0,0),(-1,-1),5),("BOTTOMPADDING",(0,0),(-1,-1),5),
    ("LEFTPADDING",(0,0),(-1,-1),6),
    ("BOX",(0,0),(-1,-1),0.5,C["chik_mid"]),
]))

story.append(Table([[agent_tbl, epi_tbl]], colWidths=[5.8*cm, 11.9*cm],
    style=[("VALIGN",(0,0),(-1,-1),"TOP"),("LEFTPADDING",(1,0),(1,0),4)]))
story.append(sp(5))

# Clinical features
story.append(Paragraph("<b>CLINICAL FEATURES</b>", BOLD))
story.append(sp(3))
feat_rows = [
    ("High Fever + Chills", "Sudden onset, temperature typically >39ยฐC"),
    ("Severe Arthropathy โ˜…", "Bilateral symmetric joint pain โ€” hands, wrists, elbows, shoulders, knees, ankles. Appears Day 3โ€“5. Can last MONTHSโ€“YEARS"),
    ("Morbilliform Rash", "60โ€“80% of patients; on trunk + limbs; can recur every 3โ€“7 days"),
    ("Headache + Lumbago", "Cephalalgia (headache), backache, conjunctivitis, adenopathy"),
    ("Other", "Coffee-coloured vomiting, epistaxis, petechiae"),
]
feat_data = [[Paragraph("Feature", HCELL), Paragraph("Details", HCELL)]]
for i, (f, d) in enumerate(feat_rows):
    bg = C["chik_light"] if i%2==0 else C["white"]
    feat_data.append([
        Paragraph(f"<b>{f}</b>", SMBOLD),
        Paragraph(d, SMALL),
    ])
feat_tbl = Table(feat_data, colWidths=[4.5*cm, 13.2*cm])
feat_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0),C["chik_mid"]),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[C["chik_light"],C["white"]]),
    ("GRID",(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),"MIDDLE"),
]))
story.append(feat_tbl)
story.append(sp(4))

# Diagnosis + Treatment side by side
dx_tbl = Table([
    [Paragraph("DIAGNOSIS", HCELL)],
    [Paragraph("โ€ข <b>Week 1:</b> RT-PCR (gold standard)<br/>"
               "โ€ข <b>After week 1:</b> IgM antibodies<br/>"
               "  (persist 30โ€“90 days)<br/>"
               "โ€ข <b>Reference:</b> Plaque-Reduction<br/>"
               "  Neutralization Test (PRNT)", SMALL)],
], colWidths=[5.8*cm])
dx_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(0,0),C["chik_mid"]),
    ("BACKGROUND",(0,1),(0,1),C["chik_light"]),
    ("TOPPADDING",(0,0),(-1,-1),5),("BOTTOMPADDING",(0,0),(-1,-1),5),
    ("LEFTPADDING",(0,0),(-1,-1),6),
    ("BOX",(0,0),(-1,-1),0.5,C["chik_mid"]),
]))

tx_tbl = Table([
    [Paragraph("TREATMENT &amp; PREVENTION", HCELL)],
    [Paragraph("โ€ข <b>NO specific antiviral</b> โ€” supportive care only<br/>"
               "โ€ข Paracetamol / Diclofenac for fever + joint pain<br/>"
               "โ€ข <b>AVOID: Aspirin &amp; Steroids</b><br/>"
               "โ€ข NSAIDs only after ruling out dengue<br/>"
               "โ€ข Methotrexate/Hydroxychloroquine for severe arthritis<br/>"
               "โ€ข <b>Prevention:</b> No vaccine. Aedes control,<br/>"
               "  repellents, long sleeves, screened houses", SMALL)],
], colWidths=[11.5*cm])
tx_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(0,0),C["chik_mid"]),
    ("BACKGROUND",(0,1),(0,1),C["chik_light"]),
    ("TOPPADDING",(0,0),(-1,-1),5),("BOTTOMPADDING",(0,0),(-1,-1),5),
    ("LEFTPADDING",(0,0),(-1,-1),6),
    ("BOX",(0,0),(-1,-1),0.5,C["chik_mid"]),
]))

story.append(Table([[dx_tbl, tx_tbl]], colWidths=[5.8*cm, 11.9*cm],
    style=[("VALIGN",(0,0),(-1,-1),"TOP"),("LEFTPADDING",(1,0),(1,0),4)]))
story.append(sp(4))

# Warn box
warn_tbl = Table([[Paragraph(
    "โš   AVOID ASPIRIN &amp; STEROIDS in Chikungunya!  |  "
    "No deaths reported  |  Not transmitted through breastfeeding  |  "
    "Reportable disease (NVBDCP / CDC ArboNET)",
    PS("wchk", fontName="Helvetica-Bold", fontSize=8.5,
       textColor=C["chik_dark"], alignment=TA_CENTER, leading=12)
)]], colWidths=[W])
warn_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,-1),colors.HexColor("#fff3e0")),
    ("BOX",(0,0),(-1,-1),1.2,C["chik_dark"]),
    ("TOPPADDING",(0,0),(-1,-1),5),("BOTTOMPADDING",(0,0),(-1,-1),5),
]))
story.append(warn_tbl)
story.append(sp(4))
story.append(memory_box(
    "Memory: CHIK = Contorted (name), High fever, Insect=Aedes, Knees/Joints  "
    "|  Incubation: 4โ€“7 days  |  No deaths  |  No vaccine"))
story.append(sp(10))

# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
# TOPIC 2 โ€” MALARIA
# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
story.append(section_bar("๐ŸฆŸ  TOPIC 2 โ€” MALARIA", C["mal_dark"], C["mal_mid"]))
story.append(sp(4))

story.append(info_box(
    Paragraph('<b>Definition:</b> A <b>protozoal disease</b> caused by parasites of genus '
              '<b>Plasmodium</b>, transmitted by the bite of infected <b>female Anopheles mosquito</b>. '
              'A typical attack has 3 stages: <b>Cold โ†’ Hot โ†’ Sweating</b>. '
              'Febrile paroxysms repeat every <b>3rd day (tertian)</b> or <b>4th day (quartan)</b> '
              'depending on the species.',
              BODY), C["mal_light"], C["mal_mid"]))
story.append(sp(5))

# Species table
story.append(Paragraph("<b>4 SPECIES OF PLASMODIUM</b>", BOLD))
story.append(sp(3))
sp_data = [
    [Paragraph("Species", HCELL), Paragraph("Fever Pattern", HCELL),
     Paragraph("Key Feature", HCELL), Paragraph("Danger", HCELL)],
    [Paragraph("<b>P. falciparum โ˜…</b>", SMBOLD),
     Paragraph("Sub-tertian / quotidian (36โ€“48 hrs)", SMALL),
     Paragraph("Cerebral malaria, Blackwater fever, drug resistance", SMALL),
     Paragraph("MOST DANGEROUS", PS("d1",fontName="Helvetica-Bold",fontSize=8,textColor=C["red_warn"],leading=11))],
    [Paragraph("<b>P. vivax</b>", SMBOLD),
     Paragraph("Tertian (every 48 hrs)", SMALL),
     Paragraph("Most common in India; relapses due to hypnozoites", SMALL),
     Paragraph("Moderate", SMALL)],
    [Paragraph("<b>P. malariae</b>", SMBOLD),
     Paragraph("Quartan (every 72 hrs)", SMALL),
     Paragraph("Nephrotic syndrome (rare)", SMALL),
     Paragraph("Mild", SMALL)],
    [Paragraph("<b>P. ovale</b>", SMBOLD),
     Paragraph("Tertian (every 48 hrs)", SMALL),
     Paragraph("Rare; hypnozoites like vivax", SMALL),
     Paragraph("Mild", SMALL)],
]
sp_tbl = Table(sp_data, colWidths=[3.8*cm, 4.2*cm, 6.2*cm, 3.5*cm])
sp_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0),C["mal_mid"]),
    ("BACKGROUND",(0,1),(-1,1),C["mal_light"]),
    ("BACKGROUND",(0,2),(-1,2),C["white"]),
    ("BACKGROUND",(0,3),(-1,3),C["mal_light"]),
    ("BACKGROUND",(0,4),(-1,4),C["white"]),
    ("GRID",(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),"MIDDLE"),
]))
story.append(sp_tbl)
story.append(sp(5))

# Paroxysm + Epidemiology 2-col
parox_tbl = Table([
    [Paragraph("MALARIAL PAROXYSM", HCELL)],
    [Paragraph(
        "<b>Stage 1 โ€” Cold (15โ€“60 min)</b><br/>"
        "Severe chills, shivering, rigors<br/><br/>"
        "<b>Stage 2 โ€” Hot (2โ€“6 hrs)</b><br/>"
        "High fever, headache, nausea, vomiting<br/><br/>"
        "<b>Stage 3 โ€” Sweating (2โ€“4 hrs)</b><br/>"
        "Profuse sweating, fever breaks<br/>"
        "Patient feels WELL until next paroxysm", SMALL)],
], colWidths=[5.8*cm])
parox_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(0,0),C["mal_mid"]),
    ("BACKGROUND",(0,1),(0,1),C["mal_light"]),
    ("TOPPADDING",(0,0),(-1,-1),5),("BOTTOMPADDING",(0,0),(-1,-1),5),
    ("LEFTPADDING",(0,0),(-1,-1),7),
    ("BOX",(0,0),(-1,-1),0.5,C["mal_mid"]),
]))

comp_tbl = Table([
    [Paragraph("COMPLICATIONS (P. falciparum)", HCELL)],
    [Paragraph(
        "โ€ข <b>Cerebral malaria</b> โ€” convulsions, coma (most dangerous)<br/>"
        "โ€ข <b>Blackwater fever</b> โ€” massive hemolysis โ†’ black urine<br/>"
        "โ€ข <b>Severe anemia</b> โ€” RBC destruction<br/>"
        "โ€ข <b>Hypoglycemia</b> โ€” especially in children + pregnant women<br/>"
        "โ€ข <b>Algid malaria</b> โ€” collapse, shock<br/>"
        "โ€ข <b>Pulmonary edema</b> โ€” ARDS<br/>"
        "โ€ข <b>In pregnancy</b> โ€” miscarriage, low birth weight, maternal death",
        SMALL)],
], colWidths=[11.5*cm])
comp_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(0,0),C["mal_mid"]),
    ("BACKGROUND",(0,1),(0,1),C["mal_light"]),
    ("TOPPADDING",(0,0),(-1,-1),5),("BOTTOMPADDING",(0,0),(-1,-1),5),
    ("LEFTPADDING",(0,0),(-1,-1),7),
    ("BOX",(0,0),(-1,-1),0.5,C["mal_mid"]),
]))

story.append(Table([[parox_tbl, comp_tbl]], colWidths=[5.8*cm, 11.9*cm],
    style=[("VALIGN",(0,0),(-1,-1),"TOP"),("LEFTPADDING",(1,0),(1,0),4)]))
story.append(sp(5))

# Diagnosis
story.append(Paragraph("<b>DIAGNOSIS</b>", BOLD))
story.append(sp(3))
dx_data = [
    [Paragraph("Test", HCELL), Paragraph("Details", HCELL), Paragraph("Purpose", HCELL)],
    [Paragraph("<b>Thick blood smear</b>", SMBOLD),
     Paragraph("Gold standard; done during fever", SMALL),
     Paragraph("Parasite detection", SMALL)],
    [Paragraph("<b>Thin blood smear</b>", SMBOLD),
     Paragraph("Species identification", SMALL),
     Paragraph("Species typing", SMALL)],
    [Paragraph("<b>RDT (HRP-2 Ag)</b>", SMBOLD),
     Paragraph("Rapid diagnostic test for P. falciparum", SMALL),
     Paragraph("Field diagnosis", SMALL)],
    [Paragraph("<b>PCR</b>", SMBOLD),
     Paragraph("Most sensitive", SMALL),
     Paragraph("Reference/research", SMALL)],
    [Paragraph("<b>Indices: API, ABER, SPR</b>", SMBOLD),
     Paragraph("API = Annual Parasite Incidence; ABER = Annual Blood Exam Rate (should be >10%); SPR = Slide Positivity Rate", SMALL),
     Paragraph("Programme monitoring", SMALL)],
]
dx_tbl2 = Table(dx_data, colWidths=[4.5*cm, 8*cm, 5.2*cm])
dx_tbl2.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0),C["mal_mid"]),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[C["mal_light"],C["white"]]),
    ("GRID",(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),"MIDDLE"),
]))
story.append(dx_tbl2)
story.append(sp(5))

# Treatment
story.append(Paragraph("<b>TREATMENT</b>", BOLD))
story.append(sp(3))
tx_data = [
    [Paragraph("Species", HCELL), Paragraph("Treatment", HCELL)],
    [Paragraph("<b>P. falciparum</b>", SMBOLD),
     Paragraph("<b>ACT = Artemisinin-based Combination Therapy</b> (e.g., Artesunate + Amodiaquine)<br/>"
               "Severe malaria: IV Artesunate or IV Quinine", SMALL)],
    [Paragraph("<b>P. vivax</b>", SMBOLD),
     Paragraph("<b>Chloroquine</b> (14 days) + <b>Primaquine</b> for radical cure "
               "(kills liver hypnozoites, prevents relapse)", SMALL)],
    [Paragraph("<b>All species</b>", SMBOLD),
     Paragraph("Note: Chloroquine resistance widespread for P. falciparum in South-East Asia โ†’ Always use ACT", SMALL)],
]
tx_tbl2 = Table(tx_data, colWidths=[4.5*cm, 13.2*cm])
tx_tbl2.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0),C["mal_mid"]),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[C["mal_light"],C["white"],C["mal_light"]]),
    ("GRID",(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),"MIDDLE"),
]))
story.append(tx_tbl2)
story.append(sp(4))

# Prevention
story.append(Paragraph("<b>PREVENTION &amp; CONTROL (PSM Key Topic)</b>", BOLD))
story.append(sp(3))
prev_data = [
    [Paragraph("Method", HCELL), Paragraph("Details", HCELL)],
    [Paragraph("<b>IRS</b>", SMBOLD),
     Paragraph("Indoor Residual Spraying โ€” DDT, Malathion sprayed on walls", SMALL)],
    [Paragraph("<b>ITN / LLIN</b>", SMBOLD),
     Paragraph("Insecticide-Treated Nets / Long-Lasting Insecticidal Nets", SMALL)],
    [Paragraph("<b>Larval control</b>", SMBOLD),
     Paragraph("Anti-larval measures, Gambusia fish, drain stagnant water, oil on water surface", SMALL)],
    [Paragraph("<b>Chemoprophylaxis</b>", SMBOLD),
     Paragraph("Chloroquine / Doxycycline / Mefloquine for travellers to endemic areas", SMALL)],
    [Paragraph("<b>Vaccine</b>", SMBOLD),
     Paragraph("<b>RTS,S/AS01 (Mosquirix)</b> โ€” first WHO-approved malaria vaccine (2021); "
               "for P. falciparum; for children in sub-Saharan Africa", SMALL)],
    [Paragraph("<b>Programme</b>", SMBOLD),
     Paragraph("<b>NVBDCP</b> = National Vector Borne Disease Control Programme "
               "(controls malaria, dengue, chikungunya, kala-azar, filaria, JE)", SMALL)],
]
prev_tbl = Table(prev_data, colWidths=[3.5*cm, 14.2*cm])
prev_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0),C["mal_mid"]),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[C["mal_light"],C["white"]]),
    ("GRID",(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),"MIDDLE"),
]))
story.append(prev_tbl)
story.append(sp(4))
story.append(memory_box(
    "Memory: FACT = Falciparum most dangerous, Anopheles female transmits, "
    "Coldโ†’Hotโ†’Sweating (3 stages), Treatment = ACT  |  Species: FVMO"))
story.append(sp(10))

# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
# TOPIC 3 โ€” CONGENITAL ANOMALIES
# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
story.append(section_bar("๐Ÿ‘ถ  TOPIC 3 โ€” CONGENITAL ANOMALIES (BIRTH DEFECTS)", C["con_dark"], C["con_mid"]))
story.append(sp(4))

story.append(info_box(
    Paragraph('<b>Definition (WHO 1972):</b> <b>Congenital malformation</b> = structural defects only at birth. '
              '<b>Congenital anomaly</b> (broader term) = <b>ALL structural + biochemical + functional '
              'disorders present at birth</b>. '
              'Some obvious at birth (cleft palate); some detected later (PDA, CDH).',
              BODY), C["con_light"], C["con_mid"]))
story.append(sp(5))

# Stats row
stats_tbl = Table([[
    Table([
        [Paragraph("1 in 33", PS("s1",fontName="Helvetica-Bold",fontSize=18,
                                  textColor=C["con_mid"],alignment=TA_CENTER,leading=22))],
        [Paragraph("infants affected", PS("s1b",fontSize=8,alignment=TA_CENTER,leading=11))],
    ], colWidths=[5.5*cm], style=[("BACKGROUND",(0,0),(-1,-1),C["con_light"]),
                                   ("BOX",(0,0),(-1,-1),1,C["con_mid"]),
                                   ("TOPPADDING",(0,0),(-1,-1),5),
                                   ("BOTTOMPADDING",(0,0),(-1,-1),5)]),
    Table([
        [Paragraph("3.2 Million", PS("s2",fontName="Helvetica-Bold",fontSize=18,
                                      textColor=C["con_mid"],alignment=TA_CENTER,leading=22))],
        [Paragraph("disabilities per year", PS("s2b",fontSize=8,alignment=TA_CENTER,leading=11))],
    ], colWidths=[5.7*cm], style=[("BACKGROUND",(0,0),(-1,-1),C["con_light"]),
                                   ("BOX",(0,0),(-1,-1),1,C["con_mid"]),
                                   ("TOPPADDING",(0,0),(-1,-1),5),
                                   ("BOTTOMPADDING",(0,0),(-1,-1),5)]),
    Table([
        [Paragraph("270,000", PS("s3",fontName="Helvetica-Bold",fontSize=18,
                                  textColor=C["con_mid"],alignment=TA_CENTER,leading=22))],
        [Paragraph("neonatal deaths/year", PS("s3b",fontSize=8,alignment=TA_CENTER,leading=11))],
    ], colWidths=[5.7*cm], style=[("BACKGROUND",(0,0),(-1,-1),C["con_light"]),
                                   ("BOX",(0,0),(-1,-1),1,C["con_mid"]),
                                   ("TOPPADDING",(0,0),(-1,-1),5),
                                   ("BOTTOMPADDING",(0,0),(-1,-1),5)]),
]], colWidths=[5.9*cm, 5.9*cm, 5.9*cm]])
stats_tbl.setStyle(TableStyle([
    ("VALIGN",(0,0),(-1,-1),"MIDDLE"),
    ("LEFTPADDING",(1,0),(2,0),4),
]))
story.append(stats_tbl)
story.append(sp(4))
story.append(Paragraph(
    "<b>Most common serious anomalies:</b>  1. Heart defects  โ€ข  2. Neural tube defects  โ€ข  3. Down syndrome",
    BODY))
story.append(sp(5))

# Causes 2-col
gen_tbl = Table([
    [Paragraph("GENETIC CAUSES", HCELL)],
    [Paragraph(
        "<b>Chromosomal:</b><br/>"
        "โ€ข Down syndrome (extra chr 21)<br/>"
        "โ€ข Klinefelter syndrome (XXY)<br/>"
        "โ€ข Turner syndrome (XO)<br/><br/>"
        "<b>Inborn errors of metabolism:</b><br/>"
        "โ€ข PKU, Tay-Sachs, Galactosaemia<br/><br/>"
        "<b>Single gene defects:</b><br/>"
        "โ€ข Haemophilia, Sickle cell disease",
        SMALL)],
], colWidths=[5.8*cm])
gen_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(0,0),C["con_mid"]),
    ("BACKGROUND",(0,1),(0,1),C["con_light"]),
    ("TOPPADDING",(0,0),(-1,-1),5),("BOTTOMPADDING",(0,0),(-1,-1),5),
    ("LEFTPADDING",(0,0),(-1,-1),7),
    ("BOX",(0,0),(-1,-1),0.5,C["con_mid"]),
]))

env_tbl = Table([
    [Paragraph("ENVIRONMENTAL CAUSES (TERATOGENS)", HCELL)],
    [Paragraph(
        "<b>Infections (TORCH):</b> Toxoplasma, Other (Syphilis/HIV), <b>Rubella</b>, CMV, Herpes; Varicella<br/>"
        "<b>Drugs:</b> <b>Thalidomide</b> (phocomelia), Anti-convulsants, Stilboestrol,<br/>"
        "&nbsp;&nbsp;high-dose Vit A, <b>Alcohol</b>, Tobacco, Anaesthetics<br/>"
        "<b>Maternal disease:</b> Diabetes, Cardiac failure<br/>"
        "<b>Physical:</b> X-rays, Irradiation, Pesticides<br/>"
        "<b>Nutritional:</b> <b>Folic acid deficiency</b> โ†’ Neural tube defects",
        SMALL)],
], colWidths=[11.5*cm])
env_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(0,0),C["con_mid"]),
    ("BACKGROUND",(0,1),(0,1),C["con_light"]),
    ("TOPPADDING",(0,0),(-1,-1),5),("BOTTOMPADDING",(0,0),(-1,-1),5),
    ("LEFTPADDING",(0,0),(-1,-1),7),
    ("BOX",(0,0),(-1,-1),0.5,C["con_mid"]),
]))

story.append(Paragraph("<b>CAUSES OF CONGENITAL ANOMALIES</b>", BOLD))
story.append(sp(3))
story.append(Table([[gen_tbl, env_tbl]], colWidths=[5.8*cm, 11.9*cm],
    style=[("VALIGN",(0,0),(-1,-1),"TOP"),("LEFTPADDING",(1,0),(1,0),4)]))
story.append(sp(5))

# Risk factors
story.append(Paragraph("<b>RISK FACTORS</b>", BOLD))
story.append(sp(3))
rf_data = [
    [Paragraph("Risk Factor", HCELL), Paragraph("Details", HCELL)],
    [Paragraph("<b>Advanced maternal age</b>", SMBOLD),
     Paragraph("Main risk for Down syndrome. Overall risk = 1:800. At age 40โ€“45 = 1:67", SMALL)],
    [Paragraph("<b>Consanguinity</b>", SMBOLD),
     Paragraph("First-cousin / uncle-niece marriages โ†’ high rate of mental retardation + malformations", SMALL)],
    [Paragraph("<b>Previous malformed child</b>", SMBOLD),
     Paragraph("Risk in next pregnancy is <b>10x higher</b>", SMALL)],
    [Paragraph("<b>Drug use in pregnancy</b>", SMBOLD),
     Paragraph("Especially first trimester โ€” thalidomide, anti-convulsants, alcohol", SMALL)],
    [Paragraph("<b>Infections (TORCH)</b>", SMBOLD),
     Paragraph("Especially first trimester rubella, CMV, toxoplasmosis", SMALL)],
]
rf_tbl = Table(rf_data, colWidths=[5.2*cm, 12.5*cm])
rf_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0),C["con_mid"]),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[C["con_light"],C["white"]]),
    ("GRID",(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),"MIDDLE"),
]))
story.append(rf_tbl)
story.append(sp(5))

# Prenatal diagnosis + Prevention side by side
pnd_tbl = Table([
    [Paragraph("PRENATAL DIAGNOSIS", HCELL)],
    [Paragraph(
        "<b>AFP (Alpha Fetoprotein)</b><br/>"
        "โ†’ Neural tube defects<br/>"
        "โ†’ Elevated in maternal blood + amniotic fluid<br/><br/>"
        "<b>Ultrasound</b><br/>"
        "โ†’ Many structural abnormalities<br/><br/>"
        "<b>Amniocentesis</b><br/>"
        "โ†’ After 12 weeks (2nd trimester)<br/>"
        "โ†’ Down syndrome, NTDs, chromosomes<br/><br/>"
        "<b>CVS (Chorionic Villus Sampling)</b><br/>"
        "โ†’ <b>9โ€“11 weeks</b> (EARLIER than amnio!)<br/>"
        "โ†’ Chromosome status",
        SMALL)],
], colWidths=[5.8*cm])
pnd_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(0,0),C["con_mid"]),
    ("BACKGROUND",(0,1),(0,1),C["con_light"]),
    ("TOPPADDING",(0,0),(-1,-1),5),("BOTTOMPADDING",(0,0),(-1,-1),5),
    ("LEFTPADDING",(0,0),(-1,-1),7),
    ("BOX",(0,0),(-1,-1),0.5,C["con_mid"]),
]))

prv_tbl = Table([
    [Paragraph("PREVENTION โ€” 3 APPROACHES (Park's)", HCELL)],
    [Paragraph(
        "<b>1. Discourage further reproduction</b> after a malformed child<br/>"
        "&nbsp;&nbsp;&nbsp;(next pregnancy risk = 10x higher)<br/><br/>"
        "<b>2. Avoid pregnancy in high-risk conditions:</b><br/>"
        "&nbsp;&nbsp;&nbsp;โ€ข Advanced maternal age (Down syndrome)<br/>"
        "&nbsp;&nbsp;&nbsp;โ€ข Consanguineous marriages<br/><br/>"
        "<b>3. Identify &amp; remove teratogens:</b><br/>"
        "&nbsp;&nbsp;&nbsp;โ€ข Avoid drugs in 1st trimester<br/>"
        "&nbsp;&nbsp;&nbsp;โ€ข <b>Folic acid</b> supplementation (prevents NTDs)<br/>"
        "&nbsp;&nbsp;&nbsp;โ€ข <b>Rubella vaccine</b> (routine immunization)<br/>"
        "&nbsp;&nbsp;&nbsp;โ€ข Avoid alcohol, X-rays, pesticides<br/>"
        "&nbsp;&nbsp;&nbsp;โ€ข Treat TORCH infections",
        SMALL)],
], colWidths=[11.5*cm])
prv_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(0,0),C["con_mid"]),
    ("BACKGROUND",(0,1),(0,1),C["con_light"]),
    ("TOPPADDING",(0,0),(-1,-1),5),("BOTTOMPADDING",(0,0),(-1,-1),5),
    ("LEFTPADDING",(0,0),(-1,-1),7),
    ("BOX",(0,0),(-1,-1),0.5,C["con_mid"]),
]))

story.append(Table([[pnd_tbl, prv_tbl]], colWidths=[5.8*cm, 11.9*cm],
    style=[("VALIGN",(0,0),(-1,-1),"TOP"),("LEFTPADDING",(1,0),(1,0),4)]))
story.append(sp(4))
story.append(memory_box(
    "Memory: GEMS = Genetic + Environmental infection (TORCH) + Maternal disease + Substances/drugs  |  "
    "TORCH = Toxoplasma, Other, Rubella, CMV, Herpes  |  CVS earlier (9โ€“11 wks) than Amnio (after 12 wks)"))
story.append(sp(10))

# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
# FINAL: COMPARISON + EXAM Q&A
# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
story.append(section_bar("โšก  QUICK COMPARISON + EXAM Q&amp;A", C["dark_blue"], colors.HexColor("#1565c0")))
story.append(sp(5))

# Comparison table
story.append(Paragraph("<b>CHIKUNGUNYA vs MALARIA โ€” AT A GLANCE</b>", BOLD))
story.append(sp(3))
cmp_data = [
    [Paragraph("Feature", HCELL),
     Paragraph("Chikungunya", PS("hch", fontName="Helvetica-Bold", fontSize=8.5,
                                  textColor=C["white"], alignment=TA_CENTER, leading=12)),
     Paragraph("Malaria", PS("hmal", fontName="Helvetica-Bold", fontSize=8.5,
                               textColor=C["white"], alignment=TA_CENTER, leading=12))],
    [Paragraph("Causative agent", SMBOLD), Paragraph("Chikungunya virus (RNA)", SMALL), Paragraph("Plasmodium protozoa", SMALL)],
    [Paragraph("Vector", SMBOLD), Paragraph("Aedes mosquito", SMALL), Paragraph("Female Anopheles mosquito", SMALL)],
    [Paragraph("Hallmark symptom", SMBOLD), Paragraph("Severe joint pain (arthropathy)", SMALL), Paragraph("Coldโ†’Hotโ†’Sweating paroxysm", SMALL)],
    [Paragraph("Fever pattern", SMBOLD), Paragraph("Continuous, high fever", SMALL), Paragraph("Periodic (3rd/4th day)", SMALL)],
    [Paragraph("Rash", SMBOLD), Paragraph("Common (60โ€“80%)", SMALL), Paragraph("Uncommon", SMALL)],
    [Paragraph("Deaths", SMBOLD), Paragraph("NONE reported", SMALL), Paragraph("Yes (P. falciparum)", SMALL)],
    [Paragraph("Treatment", SMBOLD), Paragraph("Supportive only (no antiviral)", SMALL), Paragraph("ACT for falciparum; Chloroquine+Primaquine for vivax", SMALL)],
    [Paragraph("Vaccine", SMBOLD), Paragraph("None available", SMALL), Paragraph("RTS,S (Mosquirix) โ€” 2021", SMALL)],
    [Paragraph("Programme", SMBOLD), Paragraph("NVBDCP", SMALL), Paragraph("NVBDCP", SMALL)],
]
cmp_tbl = Table(cmp_data, colWidths=[4.5*cm, 6.6*cm, 6.6*cm])
cmp_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(0,0),colors.HexColor("#1565c0")),
    ("BACKGROUND",(1,0),(1,0),C["chik_mid"]),
    ("BACKGROUND",(2,0),(2,0),C["mal_mid"]),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[C["grey"],C["white"]]),
    ("GRID",(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),"MIDDLE"),
]))
story.append(cmp_tbl)
story.append(sp(6))

# Q&A
story.append(Paragraph("<b>MOST LIKELY EXAM QUESTIONS &amp; ANSWERS</b>", BOLD))
story.append(sp(3))
qa = [
    ("What does 'Chikungunya' mean? Where was it first isolated?",
     "Kimakonde language = 'to become contorted/doubled up' due to joint pain. First isolated: Tanzania, 1952โ€“53."),
    ("Vector of chikungunya? Incubation period?",
     "Aedes aegypti and Aedes albopictus. Incubation = 4โ€“7 days."),
    ("Treatment of chikungunya. What to avoid?",
     "Supportive: Paracetamol, Diclofenac, fluids. AVOID Aspirin and Steroids."),
    ("Define malaria. Name causative agents.",
     "Protozoal disease caused by Plasmodium (falciparum, vivax, malariae, ovale), transmitted by female Anopheles."),
    ("3 stages of malarial paroxysm?",
     "Cold stage โ†’ Hot stage โ†’ Sweating stage."),
    ("Most dangerous species of malaria? Why?",
     "P. falciparum โ€” causes cerebral malaria, blackwater fever, multi-drug resistance."),
    ("Treatment of P. falciparum malaria?",
     "ACT = Artemisinin-based Combination Therapy. Severe: IV Artesunate."),
    ("What is NVBDCP?",
     "National Vector Borne Disease Control Programme โ€” controls malaria, dengue, chikungunya, kala-azar, filaria, JE."),
    ("WHO definition of congenital anomaly?",
     "All structural + biochemical + functional disorders present at birth."),
    ("Incidence of congenital anomalies?",
     "1 in 33 infants; 3.2 million disabilities/year; 270,000 neonatal deaths/year."),
    ("3 prevention approaches for congenital anomalies (Park's)?",
     "1. Discourage reproduction after malformed child.  2. Avoid pregnancy in high-risk.  3. Remove teratogens."),
    ("CVS vs Amniocentesis โ€” difference?",
     "CVS at 9โ€“11 weeks (earlier). Amniocentesis after 12 weeks."),
    ("Risk of Down syndrome with age?",
     "Overall = 1:800. At age 40โ€“45 = 1:67. Advanced maternal age is the main risk factor."),
    ("Name teratogens causing congenital anomalies.",
     "Thalidomide, Rubella, Alcohol, Folic acid deficiency, X-rays, Anti-convulsants, CMV, Toxoplasma."),
]
qa_data = [[Paragraph("Q", HCELL), Paragraph("Question", HCELL), Paragraph("Answer", HCELL)]]
for i, (q, a) in enumerate(qa):
    bg = colors.HexColor("#e3f2fd") if i%2==0 else C["white"]
    qa_data.append([
        Paragraph(f"<b>{i+1}</b>",
                  PS(f"qn{i}", fontName="Helvetica-Bold", fontSize=9,
                     textColor=C["white"], alignment=TA_CENTER)),
        Paragraph(q, PS(f"qq{i}", fontName="Helvetica-Bold", fontSize=8,
                        textColor=colors.HexColor("#1a237e"), leading=12)),
        Paragraph(a, SMALL),
    ])
qa_tbl = Table(qa_data, colWidths=[0.7*cm, 7.5*cm, 9.5*cm])
qa_styles = [
    ("BACKGROUND",(0,0),(-1,0),colors.HexColor("#1a237e")),
    ("GRID",(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),"MIDDLE"),
]
# colour number cells by topic
for i in range(1, 15):
    if i <= 3:    bg = C["chik_mid"]
    elif i <= 8:  bg = C["mal_mid"]
    else:          bg = C["con_mid"]
    qa_styles.append(("BACKGROUND",(0,i),(0,i), bg))
    row_bg = C["chik_light"] if i<=3 else C["mal_light"] if i<=8 else C["con_light"]
    if i%2==0:
        qa_styles.append(("BACKGROUND",(1,i),(2,i), row_bg))
qa_tbl.setStyle(TableStyle(qa_styles))
story.append(qa_tbl)
story.append(sp(6))

# Footer memory strip
mem_strip = Table([[
    Paragraph("CHIK: CHIK mnemonic | No deaths | No vaccine | Avoid Aspirin",
              PS("ms1", fontName="Helvetica-Bold", fontSize=7.5,
                 textColor=C["white"], alignment=TA_CENTER, leading=10)),
    Paragraph("MALARIA: FACT | Coldโ†’Hotโ†’Sweat | ACT for Pf | NVBDCP",
              PS("ms2", fontName="Helvetica-Bold", fontSize=7.5,
                 textColor=C["white"], alignment=TA_CENTER, leading=10)),
    Paragraph("CONGENITAL: GEMS | TORCH | CVS 9โ€“11wks | AFP for NTD | Folic acid",
              PS("ms3", fontName="Helvetica-Bold", fontSize=7.5,
                 textColor=C["white"], alignment=TA_CENTER, leading=10)),
]], colWidths=[5.9*cm, 5.9*cm, 5.9*cm])
mem_strip.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(0,0),C["chik_mid"]),
    ("BACKGROUND",(1,0),(1,0),C["mal_mid"]),
    ("BACKGROUND",(2,0),(2,0),C["con_mid"]),
    ("TOPPADDING",(0,0),(-1,-1),6),("BOTTOMPADDING",(0,0),(-1,-1),6),
    ("VALIGN",(0,0),(-1,-1),"MIDDLE"),
]))
story.append(mem_strip)

doc.build(story)
print("PDF created:", OUTPUT)
Running Command

mkdir -p /home/daytona/workspace/psm-topics && python3 /home/daytona/workspace/psm-topics/make_psm_pdf.py 2>&1

Reading File
Editing File

~/psm-topics/make_psm_pdf.py

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/psm-topics/make_psm_pdf.py'
Running Command

python3 /home/daytona/workspace/psm-topics/make_psm_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/psm-topics/PSM_3Topics_QuickRevision.pdf

Your colorful PDF is ready! ๐ŸŽ‰
Download here:

PSM 3Topics QuickRevision

PDF Document ยท PDF


What's inside the PDF (color-coded by topic):
๐ŸŸ  Topic 1 - Chikungunya (Orange theme)
  • Definition, name origin, first isolation
  • Agent + Epidemiology side by side
  • Clinical features table
  • Diagnosis + Treatment side by side
  • Warning box: AVOID Aspirin & Steroids
  • Memory box
๐ŸŸข Topic 2 - Malaria (Green theme)
  • Definition
  • 4 Plasmodium species table (P. falciparum highlighted as dangerous)
  • Malarial paroxysm stages + Complications side by side
  • Diagnosis table (thick smear, RDT, API/ABER/SPR)
  • Treatment table (ACT for falciparum, Chloroquine+Primaquine for vivax)
  • Prevention table (IRS, LLIN, Gambusia, RTS,S vaccine, NVBDCP)
  • Memory box
๐ŸŸฃ Topic 3 - Congenital Anomalies (Purple theme)
  • WHO definition
  • Stats boxes: 1 in 33 infants โ€ข 3.2 million โ€ข 270,000 deaths
  • Causes: Genetic vs Environmental side by side
  • Risk factors table
  • Prenatal diagnosis + 3 Prevention approaches side by side
  • Memory box (GEMS, TORCH)
๐Ÿ”ต Final Section (Blue theme)
  • Chikungunya vs Malaria comparison table
  • 14 most likely exam Q&As (colour-coded by topic)
  • Bottom memory strip with all key mnemonics
Good luck tomorrow! ๐Ÿ’ช

Tomorrow is my PSM practica exam. Examiner will surely ask yellow fever i dont know anything about them and i have no concept of this . please help me to understand this topic in very easy language and remember all of them so i will secure better marks. In psm style

Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
I now have ALL the Yellow Fever content from Park's PSM. Let me write the complete study guide now.

๐ŸŸก YELLOW FEVER โ€” PSM EXAM STUDY GUIDE

Based on Park's Textbook of Preventive & Social Medicine


WHAT IS YELLOW FEVER? (Simple Definition)

Yellow fever is a viral haemorrhagic fever transmitted by mosquito bite. It is called "yellow" because it causes jaundice (yellowing of skin and eyes) in severe cases. It can also cause black vomit (digested blood) โ€” a very characteristic feature.
Park's Definition: "A zoonotic disease caused by an arbovirus. It affects principally monkeys and other vertebrates in tropical America and Africa and is transmitted to man by certain culicine mosquitoes. It is characterized by more severe hepatic (liver) and renal (kidney) involvement."

PROBLEM STATEMENT (Global Burden)

FactData
Countries at risk47 countries in Africa and Latin America
Population at risk>900 million people
Africa at risk508 million people in 32 countries
Cases (2013 estimate)84,000โ€“170,000 cases per year
Deaths (2013 estimate)29,000โ€“60,000 deaths per year
AsiaDisease never reported BUT region is at risk
Highest risk countries in Americas: Bolivia, Brazil, Colombia, Ecuador, Peru

EPIDEMIOLOGICAL TRIAD (PSM Framework)

(A) AGENT FACTORS

FeatureDetails
Causative agentFlavivirus fibricus โ€” a Group B arbovirus (member of Togavirus family)
Also related toWest Nile virus, Dengue (shares group-specific antigens)
Reservoir of infectionForest/Jungle: Monkeys + forest mosquitoes
Urban: Man (subclinical + clinical cases) + Aedes aegypti mosquitoes
Period of communicabilityIn man: Blood infective for first 3-4 days of illness
In mosquito: Infective after extrinsic incubation period of 8-12 days
Once infective, mosquito remains infective for LIFE
Special featureTransovarian transmission occurs in mosquitoes in adverse conditions (dry season)

(B) HOST FACTORS

FeatureDetails
Age & SexAll ages and both sexes susceptible (if no immunity)
OccupationWood cutters, hunters, forest workers at HIGH RISK (jungle YF)
ImmunityOne attack = LIFELONG immunity; second attacks are UNKNOWN
Infants born to immune mothers carry antibodies for up to 6 months

(C) ENVIRONMENTAL FACTORS

FactorRequirement
Temperatureโ‰ฅ24ยฐC required for virus multiplication inside the mosquito
HumidityRelative humidity >60% needed for mosquitoes to live long enough
UrbanizationExpanding cities + deforestation bring humans into jungle cycles
TravelIncreasing international travel spreads virus from endemic to receptive areas

INCUBATION PERIOD

3 to 6 days (6 days recognized under International Health Regulations - IHR)

CLINICAL FEATURES (Stages of Yellow Fever)

Yellow fever follows three stages:

Stage 1 โ€” Infection (Acute Phase, Days 1-3)

  • Sudden onset of high fever
  • Headache, backache, muscle aches
  • Nausea, vomiting
  • Loss of appetite

Stage 2 โ€” Remission (Brief improvement, Hours to 1 day)

  • Fever falls
  • Patient seems to be getting better
  • Most patients recover at this stage

Stage 3 โ€” Intoxication (Toxic Phase โ€” Severe cases)

This is the dangerous phase. Features:
  • Jaundice (liver damage) โ€” this gives the disease its NAME "Yellow Fever"
  • Haemorrhagic manifestations:
    • "Black vomit" (vomiting of digested blood โ€” very characteristic!)
    • Epistaxis (nosebleed)
    • Melena (blood in stool)
  • Albuminuria or anuria (kidney failure โ€” protein/no urine)
  • Shock
  • Agitation, stupor, coma
  • Death โ€” between 5th and 10th day of illness
Case Fatality Rate (CFR): Up to 80% in severe cases!

MODES OF TRANSMISSION โ€” 3 CYCLES (Very Important!)

This is a favourite exam question. Three cycles:
CycleAlso calledWhereWhoVector
1. Jungle / SylvaticForest YFTropical rainforestsMonkeys โ†’ Humans (mostly young men/loggers)Wild mosquitoes (forest species)
2. IntermediateSavannah YFHumid/semi-humid AfricaMonkeys + Humans in villagesSemi-domestic mosquitoes (breed in wild AND around homes)
3. UrbanUrban YFDensely populated citiesHuman โ†’ HumanAedes aegypti (domestic)
Most common outbreak type in Africa: Intermediate cycle Most dangerous type: Urban cycle (large epidemics, human-to-human spread via Aedes aegypti) Jungle yellow fever is UNCONTROLLABLE โ€” no practical measures exist

TREATMENT

  • NO specific antiviral treatment available
  • Only supportive care:
    • Treat dehydration
    • Treat fever
    • Antibiotics for associated bacterial infections
    • ICU support for severe cases

CONTROL OF YELLOW FEVER

1. VACCINATION (Most important!)

"Rapid immunization of the population at risk is the most effective control strategy for yellow fever."
FeatureDetails
Vaccine name17D vaccine (the approved vaccine for international use)
TypeLive attenuated vaccine (from non-virulent 17D strain)
Prepared inChick embryo (grown) โ†’ then freeze-dried (lyophilized)
Dose0.5 ml, subcutaneous, at the deltoid insertion
AgeSingle dose, irrespective of age
Immunity onsetBegins on 7th day after vaccination
Duration of immunityLifelong (previously 10 years โ€” changed in 2016)
Storage+5ยฐC to โˆ’30ยฐC (preferably below 0ยฐC); heat sensitive!
Reconstituted vaccineKeep on ice, away from sunlight; discard if not used within 30 minutes

Who should NOT be vaccinated?

  1. Children under 9 months (routine); under 6 months during epidemic
  2. Pregnant women โ€” except when risk of infection is high during outbreak
  3. People with severe egg protein allergy
  4. People with severe immunodeficiency (symptomatic HIV/AIDS, thymus disorder)

Post-vaccinial reactions:

  • Mild reactions (myalgia, headache, low-grade fever) in 2-5% of vaccinees, appearing 5-10 days after vaccination
  • Anaphylaxis is very rare (mainly in those allergic to eggs)

Important Note:

Cholera vaccine and Yellow Fever vaccine given together (or within 3 weeks) interfere with each other โ€” give them at least 3 weeks apart!

2. VECTOR CONTROL

  • Control Aedes aegypti (peri-domestic mosquito)
  • Anti-adult measures (insecticides)
  • Anti-larval measures (eliminate breeding sites)
  • "Source reduction" โ€” long-term policy (eliminate breeding places)
  • Health education

Aedes aegypti Index:

  • A house index = "Percentage of houses and their premises in a defined area showing actual breeding of Aedes aegypti larvae"
  • Should NOT exceed 1% in towns and seaports in endemic areas to ensure freedom from yellow fever

INDIA AND YELLOW FEVER โ€” KEY PSM Facts

India is a "RECEPTIVE AREA" for yellow fever.
Definition of "Receptive area": "An area in which yellow fever does not exist, but where conditions would permit its development if introduced."
Why is India receptive?
  1. Population is unvaccinated and susceptible
  2. Vector Aedes aegypti is found in abundance in India
  3. Climate is favourable for transmission in most parts
  4. The common monkey of India (Macacus spp.) is susceptible to yellow fever
  5. The only missing link is the yellow fever virus itself โ€” it does not currently occur in India
How could virus enter India?
  1. Through infected travellers (clinical and subclinical cases)
  2. Through infected mosquitoes on aircraft/ships

INTERNATIONAL MEASURES (IHR)

These are governed by International Health Regulations (IHR) of WHO, implemented in India through aerial and maritime traffic regulations:

For Travellers:

  • All travellers from/through yellow fever endemic zones must have a valid International Certificate of Vaccination
  • If no certificate: placed in quarantine in a mosquito-proof ward for 6 days
  • Certificate validity starts 10 days after vaccination
  • Since 11th July 2016 (IHR amendment, May 2014): Certificate valid for the LIFETIME of the person (previously 10 years)
  • No booster/revaccination required for international travel as of 2016

For Aircraft/Ships:

  • Aerosol spraying with insecticides on arrival from endemic areas
  • Airports and seaports kept free of vector breeding for at least 400 metres around their perimeters
  • Aedes aegypti index must be kept below 1%

India's requirement:

  • Valid certificate required from travellers coming from infected areas
  • Required even if the traveller was only in transit
  • Required for infants โ‰ฅ9 months of age

EYE STRATEGY (Elimination Yellow Fever Epidemics)

Developed by WHO + UNICEF + GAVI to eliminate yellow fever urban outbreaks.
3 Strategic Objectives:
  1. Protect at-risk populations
  2. Prevent international spread of yellow fever
  3. Contain outbreaks rapidly
5 Competencies for success:
  1. Affordable vaccines and sustained vaccine market
  2. Strong political commitment (global, regional, country)
  3. High-level governance with long-term partnerships
  4. Synergies with other health programmes
  5. Research and development for better tools

DIAGNOSIS

TestDetails
SerologyIgM and IgG antibody detection (ELISA) โ€” after day 5
RT-PCRDetects viral RNA โ€” within first 5 days (acute phase)
Virus isolationFrom blood in first 4 days
WHO recommendationEvery at-risk country must have at least one national laboratory for basic yellow fever blood tests
A confirmed case of yellow fever in an unvaccinated population = potential outbreak = need for emergency vaccination campaign

YELLOW FEVER ENDEMIC COUNTRIES (Know these for exam)

In Africa (31 countries): Angola, Benin, Burkina Faso, Burundi, Cameroon, CAR, Chad, Congo, Cote d'Ivoire, DRC, Equatorial Guinea, Ethiopia, Gabon, Gambia, Ghana, Guinea, Guinea-Bissau, Kenya, Liberia, Mali, Mauritania, Niger, Nigeria, Rwanda, Senegal, Sierra Leone, Sudan, South Sudan, Togo, Uganda
In Americas (14 countries): Argentina, Bolivia, Brazil, Colombia, Ecuador, French Guiana, Guyana, Panama, Paraguay, Peru, Suriname, Trinidad & Tobago (Trinidad only), Venezuela

๐Ÿง  MEMORY TRICKS

Thing to rememberTrick
Causative agentFlavivirus Fibricus = "Double F"
3 cycles of transmissionJ-I-U = Jungle โ†’ Intermediate โ†’ Urban
Vaccine name17D โ€” "17 Days? No โ€” 17th strain! Immunity in 7 days"
Vaccine validityWas 10 years โ†’ now LIFETIME (since 2016)
Quarantine period6 days (same as incubation period max)
Death timingDay 5-10 of illness
CFRUp to 80% severe cases
Aedes aegypti indexMust be <1% in seaports/towns
400 metresAirport/seaport vector-free zone
"Receptive area"India = has vector + climate but no virus
Reconstituted vaccineDiscard after 30 minutes

โ“ MOST LIKELY EXAM QUESTIONS & ANSWERS

Q: Define yellow fever. A: A zoonotic viral haemorrhagic disease caused by Flavivirus fibricus (Group B arbovirus, Togavirus family), transmitted to humans by culicine mosquitoes, characterized by fever, jaundice, and severe hepatic and renal involvement.
Q: What is the causative agent of yellow fever? A: Flavivirus fibricus โ€” Group B arbovirus โ€” Togavirus family. Also related to dengue and West Nile virus.
Q: What are the 3 cycles of yellow fever transmission? A: Jungle (sylvatic), Intermediate, and Urban. Urban cycle = Aedes aegypti transmits person to person.
Q: What is the incubation period of yellow fever? A: 3-6 days (6 days recognized under IHR).
Q: Describe the yellow fever vaccine (17D). A: Live attenuated vaccine, 0.5 ml subcutaneous, single dose. Immunity begins day 7, lasts LIFETIME. Grown in chick embryo, freeze-dried. Store at +5ยฐC to โˆ’30ยฐC. Discard reconstituted vaccine within 30 minutes.
Q: What is the validity of yellow fever vaccination certificate? A: LIFETIME validity (since 11 July 2016 IHR amendment). Previously 10 years.
Q: Why is India a "receptive area" for yellow fever? A: India has all conditions for yellow fever โ€” abundant Aedes aegypti, suitable climate, susceptible unvaccinated population, susceptible monkeys โ€” but the virus itself is not present in India.
Q: What is the quarantine period for unvaccinated travellers from endemic areas? A: 6 days, in a mosquito-proof ward.
Q: What is the Aedes aegypti index? A: The percentage of houses in a defined area showing actual breeding of Aedes aegypti larvae. Must be <1% in towns and seaports in endemic areas.
Q: What is the EYE Strategy? A: Elimination Yellow Fever Epidemics โ€” by WHO, UNICEF, GAVI. Objectives: protect populations, prevent international spread, contain outbreaks rapidly.
Q: Who should NOT receive yellow fever vaccine? A: Children <9 months (routine)/<6 months (epidemic), pregnant women (unless outbreak), severe egg allergy, severe immunodeficiency (HIV/AIDS, thymus disorder).
Q: What is the treatment of yellow fever? A: No specific antiviral. Only supportive care โ€” rehydration, fever management, antibiotics for secondary bacterial infection.

โšก QUICK SUMMARY TABLE (One-page Glance)

FeatureYellow Fever
Causative agentFlavivirus fibricus (Group B arbovirus, Togavirus)
ReservoirMonkeys (jungle), Man (urban)
VectorCulicine mosquitoes (jungle); Aedes aegypti (urban)
Incubation3-6 days (IHR: 6 days)
Key symptomsFever โ†’ Jaundice โ†’ Black vomit โ†’ Kidney failure โ†’ Death
CFRUp to 80% (severe)
DeathDay 5-10 of illness
TreatmentSupportive only, no antiviral
3 transmission cyclesJungle โ†’ Intermediate โ†’ Urban
Vaccine17D (live attenuated, 0.5ml SC, immunity day 7, LIFETIME)
Vaccine contraindications<9 months, pregnant, egg allergy, immunodeficient
India statusRECEPTIVE AREA (has all conditions, no virus yet)
Quarantine6 days (mosquito-proof ward)
Certificate validityLIFETIME (since 11 July 2016)
Aedes indexMust be <1% at seaports/towns
Airport vector-free zone400 metres around perimeter
EYE StrategyWHO + UNICEF + GAVI (3 objectives: protect, prevent, contain)
ProgrammeIHR (WHO) + NVBDCP (India)
Good luck tomorrow! Focus especially on the 3 transmission cycles, the 17D vaccine details, India as a receptive area, and the IHR certificate validity (lifetime since 2016) - these are PSM exam favourites! ๐Ÿ’ช

Create a colorful PDF summary of Yellow Fever for quick revision

Writing File

~/psm-topics/make_yellow_fever_pdf.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, PageBreak
from reportlab.lib.styles import ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT

OUTPUT = "/home/daytona/workspace/psm-topics/YellowFever_QuickRevision.pdf"
W = 17.7 * cm

# โ”€โ”€ Colour Palette โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
YD  = colors.HexColor("#e65100")   # deep orange (dark)
YM  = colors.HexColor("#f57c00")   # orange (mid)
YL  = colors.HexColor("#fff3e0")   # orange (light bg)
YA  = colors.HexColor("#ffb74d")   # amber accent
TB  = colors.HexColor("#0d1b2a")   # title bg navy
DB  = colors.HexColor("#1a237e")   # dark blue
MB  = colors.HexColor("#1565c0")   # medium blue
LB  = colors.HexColor("#e3f2fd")   # light blue
GD  = colors.HexColor("#1b5e20")   # dark green
GM  = colors.HexColor("#2e7d32")   # mid green
GL  = colors.HexColor("#e8f5e9")   # light green
RD  = colors.HexColor("#b71c1c")   # dark red
RL  = colors.HexColor("#ffebee")   # light red
PD  = colors.HexColor("#4a148c")   # dark purple
PM  = colors.HexColor("#6a1b9a")   # mid purple
PL  = colors.HexColor("#f3e5f5")   # light purple
TM  = colors.HexColor("#00695c")   # teal mid
TL  = colors.HexColor("#e0f2f1")   # teal light
GLD = colors.HexColor("#f9a825")   # gold
GLL = colors.HexColor("#fffde7")   # gold light
GRY = colors.HexColor("#f5f5f5")   # grey
WH  = colors.white
BK  = colors.HexColor("#212121")

def PS(name, **kw):
    d = dict(fontName="Helvetica", fontSize=9, leading=13, textColor=BK)
    d.update(kw)
    return ParagraphStyle(name, **d)

TITLE = PS("T",  fontName="Helvetica-Bold", fontSize=24, textColor=WH, alignment=TA_CENTER, leading=30)
SUB   = PS("S",  fontName="Helvetica",      fontSize=11, textColor=WH, alignment=TA_CENTER, leading=15)
SEC   = PS("Sc", fontName="Helvetica-Bold", fontSize=12, textColor=WH, leading=15)
BODY  = PS("B",  fontSize=9,  leading=13)
BOLD  = PS("Bd", fontName="Helvetica-Bold", fontSize=9, leading=13)
SM    = PS("Sm", fontSize=8,  leading=11)
SMB   = PS("Sb", fontName="Helvetica-Bold", fontSize=8, leading=11)
HC    = PS("Hc", fontName="Helvetica-Bold", fontSize=8.5, textColor=WH, alignment=TA_CENTER, leading=12)
TIP   = PS("Tp", fontName="Helvetica-Bold", fontSize=9, textColor=GLD, alignment=TA_CENTER, leading=13)
WB    = PS("Wb", fontName="Helvetica-Bold", fontSize=9, textColor=WH, leading=12)
WN    = PS("Wn", fontSize=9, textColor=WH, leading=12)

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

def sec_bar(text, color):
    t = Table([[Paragraph(text, SEC)]], colWidths=[W])
    t.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,-1),color),
        ("TOPPADDING",(0,0),(-1,-1),6), ("BOTTOMPADDING",(0,0),(-1,-1),6),
        ("LEFTPADDING",(0,0),(-1,-1),10),
    ]))
    return t

def ibox(para, bg, border):
    t = Table([[para]], colWidths=[W])
    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), ("RIGHTPADDING",(0,0),(-1,-1),10),
    ]))
    return t

def ctable(headers, rows, cw, hc, alt):
    data = [[Paragraph(h, HC) for h in headers]]
    for i, row in enumerate(rows):
        bg = alt if i % 2 == 0 else WH
        data.append([Paragraph(str(c), SM) for c in row])
    t = Table(data, colWidths=cw)
    t.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,0),hc),
        ("ROWBACKGROUNDS",(0,1),(-1,-1),[alt,WH]),
        ("GRID",(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),"MIDDLE"),
    ]))
    return t

def mem_box(text):
    t = Table([[Paragraph(f"๐Ÿง   {text}", TIP)]], colWidths=[W])
    t.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,-1),GLL),
        ("BOX",(0,0),(-1,-1),1.2,GLD),
        ("TOPPADDING",(0,0),(-1,-1),6), ("BOTTOMPADDING",(0,0),(-1,-1),6),
    ]))
    return t

def side_box(title, content_para, cw, hc, bg):
    t = Table([[Paragraph(title, HC)], [content_para]], colWidths=[cw])
    t.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(0,0),hc),
        ("BACKGROUND",(0,1),(0,1),bg),
        ("BOX",(0,0),(-1,-1),0.5,hc),
        ("TOPPADDING",(0,0),(-1,-1),5), ("BOTTOMPADDING",(0,0),(-1,-1),5),
        ("LEFTPADDING",(0,0),(-1,-1),7),
    ]))
    return t

# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
story = []

# โ”€โ”€ COVER โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
cover = Table([
    [Paragraph("๐ŸŸก  YELLOW FEVER", TITLE)],
    [Paragraph("PSM Quick Revision  โ€ข  Park's Textbook of Preventive &amp; Social Medicine", SUB)],
    [Paragraph("Flavivirus fibricus  |  Arbovirus  |  Togavirus Family  |  Aedes aegypti", 
               PS("cv3", fontSize=9, textColor=colors.HexColor("#ffe0b2"), alignment=TA_CENTER, leading=13))],
], colWidths=[W])
cover.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(0,0),colors.HexColor("#bf360c")),
    ("BACKGROUND",(0,1),(0,1),YD),
    ("BACKGROUND",(0,2),(0,2),YM),
    ("TOPPADDING",(0,0),(0,0),12), ("BOTTOMPADDING",(0,0),(0,0),4),
    ("TOPPADDING",(0,1),(0,1),5), ("BOTTOMPADDING",(0,1),(0,1),5),
    ("TOPPADDING",(0,2),(0,2),4), ("BOTTOMPADDING",(0,2),(0,2),10),
]))
story += [cover, sp(7)]

# โ”€โ”€ DEFINITION โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(sec_bar("๐Ÿ“–  DEFINITION", YD))
story += [sp(4), ibox(Paragraph(
    '<b>Yellow Fever</b> is a <b>zoonotic viral haemorrhagic fever</b> caused by '
    '<b>Flavivirus fibricus</b> (Group B arbovirus, Togavirus family). It affects monkeys and other vertebrates '
    'in tropical Africa and America, and is transmitted to man by <b>culicine mosquitoes</b>. '
    'It is characterized by <b>fever, jaundice (yellow skin), black vomit, and severe liver + kidney damage</b>. '
    'Case fatality rate can reach <b>80%</b> in severe cases. Survivors get <b>lifelong immunity</b>.', BODY),
    YL, YM), sp(5)]

# โ”€โ”€ PROBLEM STATEMENT โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(sec_bar("๐ŸŒ  PROBLEM STATEMENT (Global Burden)", YM))
story += [sp(4)]

stat_items = [
    ("47 countries", "At risk (Africa + Latin America)", YD),
    (">900 million", "Population at risk worldwide", YM),
    ("84,000โ€“170,000", "Estimated cases per year (2013)", colors.HexColor("#ef6c00")),
    ("29,000โ€“60,000", "Estimated deaths per year (2013)", RD),
]
stat_cells = []
for val, lbl, clr in stat_items:
    cell = Table([
        [Paragraph(val, PS(f"sv{val}", fontName="Helvetica-Bold", fontSize=14,
                           textColor=clr, alignment=TA_CENTER, leading=18))],
        [Paragraph(lbl, PS(f"sl{val}", fontSize=7.5, alignment=TA_CENTER, leading=10))],
    ], colWidths=[4.2*cm])
    cell.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,-1),YL),
        ("BOX",(0,0),(-1,-1),1,clr),
        ("TOPPADDING",(0,0),(-1,-1),5), ("BOTTOMPADDING",(0,0),(-1,-1),5),
    ]))
    stat_cells.append(cell)
stat_row = Table([stat_cells], colWidths=[4.4*cm, 4.4*cm, 4.4*cm, 4.4*cm])
stat_row.setStyle(TableStyle([("LEFTPADDING",(1,0),(3,0),4), ("VALIGN",(0,0),(-1,-1),"MIDDLE")]))
story += [stat_row, sp(4)]
story.append(ibox(Paragraph(
    '<b>Highest risk countries in Americas:</b> Bolivia, Brazil, Colombia, Ecuador, Peru  |  '
    '<b>Asia:</b> Disease never reported but REGION IS AT RISK (conditions present)', SM), YL, YM))
story += [sp(7)]

# โ”€โ”€ EPIDEMIOLOGICAL TRIAD โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(sec_bar("๐Ÿ”ฌ  EPIDEMIOLOGICAL TRIAD", DB))
story += [sp(5)]

# Agent box
agent_box = side_box("AGENT FACTORS", Paragraph(
    '<b>Causative Agent:</b> Flavivirus fibricus โ€” Group B Arbovirus โ€” Togavirus family<br/>'
    '<b>Related to:</b> Dengue, West Nile virus (shares antigens)<br/>'
    '<b>Reservoir:</b> Monkeys + forest mosquitoes (jungle);  Man + Aedes aegypti (urban)<br/>'
    '<b>Communicability in Man:</b> Blood infective for first <b>3โ€“4 days</b> of illness<br/>'
    '<b>Communicability in Mosquito:</b> Infective after <b>8โ€“12 days</b> extrinsic incubation;<br/>'
    '&nbsp;&nbsp;once infective, mosquito remains so for <b>LIFE</b><br/>'
    '<b>Special:</b> Transovarian transmission in mosquitoes during adverse conditions (dry season)', SM),
    W, MB, LB)
story += [agent_box, sp(4)]

# Host + Environment side by side
host_box = side_box("HOST FACTORS", Paragraph(
    '<b>Age &amp; Sex:</b> All ages, both sexes susceptible<br/>'
    '<b>Occupation at HIGH RISK:</b> Loggers, woodcutters, hunters (forest workers)<br/>'
    '<b>Immunity:</b> One attack = <b>LIFELONG immunity</b>; second attacks UNKNOWN<br/>'
    '<b>Maternal antibodies:</b> Infants of immune mothers protected for <b>up to 6 months</b>', SM),
    8.65*cm, TM, TL)
env_box = side_box("ENVIRONMENTAL FACTORS", Paragraph(
    '<b>Temperature:</b> โ‰ฅ<b>24ยฐC</b> required for virus multiplication in mosquito<br/>'
    '<b>Humidity:</b> Relative humidity ><b>60%</b> required for mosquito survival<br/>'
    '<b>Urbanization:</b> Encroachment on jungle brings humans into jungle cycles<br/>'
    '<b>Travel:</b> International travel spreads virus from endemic โ†’ receptive areas', SM),
    8.65*cm, YD, YL)
story += [Table([[host_box, env_box]], colWidths=[8.85*cm, 8.85*cm],
    style=[("VALIGN",(0,0),(-1,-1),"TOP"),("LEFTPADDING",(1,0),(1,0),4)]), sp(7)]

# โ”€โ”€ INCUBATION + CLINICAL FEATURES โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(sec_bar("๐Ÿค’  INCUBATION PERIOD &amp; CLINICAL FEATURES", colors.HexColor("#c62828")))
story += [sp(4)]

inc_box = side_box("INCUBATION PERIOD", Paragraph(
    '<b>3 to 6 days</b><br/>(6 days recognized under <b>IHR</b> โ€” International Health Regulations)', BODY),
    5.8*cm, RD, RL)

stage_box = side_box("3 STAGES OF YELLOW FEVER", Paragraph(
    '<b>Stage 1 โ€” Infection (Days 1โ€“3):</b> Sudden high fever, headache, backache, nausea, vomiting<br/>'
    '<b>Stage 2 โ€” Remission:</b> Fever drops briefly; most patients RECOVER here<br/>'
    '<b>Stage 3 โ€” Intoxication (Toxic Phase โ€” SEVERE):</b><br/>'
    '&nbsp;&nbsp;โ€ข <b>Jaundice</b> (gives disease its name โ€” "Yellow" Fever)<br/>'
    '&nbsp;&nbsp;โ€ข <b>"Black Vomit"</b> = vomiting of digested blood (HALLMARK!)<br/>'
    '&nbsp;&nbsp;โ€ข Epistaxis (nosebleed), Melena (blood in stool)<br/>'
    '&nbsp;&nbsp;โ€ข <b>Albuminuria / Anuria</b> (kidney failure)<br/>'
    '&nbsp;&nbsp;โ€ข Shock, agitation, stupor, <b>coma, death</b><br/>'
    'โ€ข <b>Death:</b> Between <b>5thโ€“10th day</b> of illness<br/>'
    'โ€ข <b>CFR:</b> Up to <b>80%</b> in severe cases', SM),
    11.5*cm, RD, RL)
story += [Table([[inc_box, stage_box]], colWidths=[6*cm, 11.7*cm],
    style=[("VALIGN",(0,0),(-1,-1),"TOP"),("LEFTPADDING",(1,0),(1,0),4)]), sp(4)]

warn = Table([[Paragraph(
    'โš   KEY FEATURES: Jaundice + Black Vomit + Kidney failure (albuminuria)  |  '
    'CFR up to 80%  |  Death on Day 5โ€“10  |  Survivors get LIFELONG immunity',
    PS("w1", fontName="Helvetica-Bold", fontSize=8.5, textColor=RD, alignment=TA_CENTER, leading=12)
)]], colWidths=[W])
warn.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,-1),RL),
    ("BOX",(0,0),(-1,-1),1.2,RD),
    ("TOPPADDING",(0,0),(-1,-1),5), ("BOTTOMPADDING",(0,0),(-1,-1),5),
]))
story += [warn, sp(7)]

# โ”€โ”€ 3 TRANSMISSION CYCLES โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(sec_bar("๐Ÿ”„  3 CYCLES OF TRANSMISSION  (Very Important!)", GD))
story += [sp(4)]

cycles = [
    (GD,   "1. JUNGLE\n(Sylvatic)", "Tropical rainforests",
     "Monkeys โ†’ Humans (mainly young men / loggers / woodcutters)",
     "Wild forest mosquitoes",
     "UNCONTROLLABLE โ€” no practical control measures"),
    (TM,   "2. INTERMEDIATE\n(Savannah)", "Humid/semi-humid Africa",
     "Monkeys + Humans in nearby villages",
     "Semi-domestic mosquitoes (breed in wild AND near homes)",
     "MOST COMMON outbreak type in Africa; can escalate to urban"),
    (YD,   "3. URBAN", "Densely populated cities",
     "Human โ†’ Human (infected person brings virus to city)",
     "Aedes aegypti (domestic)",
     "LARGEST EPIDEMICS; most dangerous; controlled by vaccination + vector control"),
]
cyc_data = [[Paragraph(h, HC) for h in ["Cycle","Location","Who","Vector","Key Note"]]]
for clr, name, loc, who, vec, note in cycles:
    cyc_data.append([
        Paragraph(f"<b>{name}</b>", PS(f"cn{name}", fontName="Helvetica-Bold", fontSize=8,
                                        textColor=WH, alignment=TA_CENTER, leading=11)),
        Paragraph(loc, SM), Paragraph(who, SM), Paragraph(vec, SM),
        Paragraph(note, PS(f"nt{name}", fontSize=7.5, textColor=clr,
                            fontName="Helvetica-Bold", leading=11)),
    ])
cyc_tbl = Table(cyc_data, colWidths=[3*cm, 3.2*cm, 4.5*cm, 3.5*cm, 3.5*cm])
cyc_styles = [
    ("BACKGROUND",(0,0),(-1,0),GD),
    ("GRID",(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),"MIDDLE"),
    ("BACKGROUND",(0,1),(0,1),GD), ("BACKGROUND",(0,2),(0,2),TM), ("BACKGROUND",(0,3),(0,3),YD),
    ("BACKGROUND",(1,1),(-1,1),GL), ("BACKGROUND",(1,2),(-1,2),TL), ("BACKGROUND",(1,3),(-1,3),YL),
]
cyc_tbl.setStyle(TableStyle(cyc_styles))
story += [cyc_tbl, sp(4),
          mem_box("Jโ€“Iโ€“U: Jungle (uncontrollable) โ†’ Intermediate (most common in Africa) โ†’ Urban (Aedes aegypti, person-to-person)"),
          sp(7)]

# โ”€โ”€ 17D VACCINE โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(sec_bar("๐Ÿ’‰  17D VACCINE  (Most Effective Control)", PM))
story += [sp(4)]

vac_box = side_box("VACCINE DETAILS", Paragraph(
    '<b>Name:</b> 17D vaccine (approved for international use)<br/>'
    '<b>Type:</b> <b>Live attenuated</b> vaccine (17D strain โ€” non-virulent)<br/>'
    '<b>Prepared in:</b> Chick embryo โ†’ freeze-dried (lyophilized)<br/>'
    '<b>Dose:</b> <b>0.5 ml, subcutaneous</b>, at deltoid insertion<br/>'
    '<b>Number of doses:</b> Single dose, irrespective of age<br/>'
    '<b>Immunity onset:</b> Begins on <b>7th day</b> after vaccination<br/>'
    '<b>Immunity duration:</b> <b>LIFETIME</b> (since 2016; was 10 years before)<br/>'
    '<b>Storage:</b> +5ยฐC to โˆ’30ยฐC (preferably below 0ยฐC); <b>HEAT SENSITIVE!</b><br/>'
    '<b>Reconstituted vaccine:</b> Keep on ice; discard after <b>30 minutes</b>', SM),
    8.65*cm, PM, PL)

contra_box = side_box("CONTRAINDICATIONS (Who NOT to vaccinate)", Paragraph(
    '<b>1.</b> Children <b>&lt;9 months</b> routine; <b>&lt;6 months</b> during epidemic<br/>'
    '<b>2.</b> <b>Pregnant women</b> (except high-risk outbreak situation)<br/>'
    '<b>3.</b> Severe <b>egg protein allergy</b><br/>'
    '<b>4.</b> Severe <b>immunodeficiency</b> (HIV/AIDS, thymus disorder)<br/><br/>'
    '<b>Side effects:</b> Mild reactions (myalgia, headache, low fever)<br/>'
    'in 2โ€“5% of vaccinees, appearing <b>5โ€“10 days</b> after vaccination<br/><br/>'
    '<b>โš  IMPORTANT:</b> Cholera + Yellow fever vaccines given together<br/>'
    'or within <b>3 weeks = INTERFERE</b> โ€” give <b>โ‰ฅ3 weeks apart!</b>', SM),
    8.65*cm, RD, RL)
story += [Table([[vac_box, contra_box]], colWidths=[8.85*cm, 8.85*cm],
    style=[("VALIGN",(0,0),(-1,-1),"TOP"),("LEFTPADDING",(1,0),(1,0),4)]), sp(4),
    mem_box("17D = Live attenuated | 0.5ml SC | Immunity: Day 7 | LIFETIME validity (2016) | Discard reconstituted vaccine in 30 min | HEAT SENSITIVE"),
    sp(7)]

# โ”€โ”€ INDIA + IHR โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(sec_bar("๐Ÿ‡ฎ๐Ÿ‡ณ  INDIA &amp; INTERNATIONAL MEASURES (IHR)", MB))
story += [sp(4)]

india_box = side_box("INDIA = RECEPTIVE AREA", Paragraph(
    '<b>Definition:</b> "An area in which yellow fever does not exist,<br/>'
    'but where conditions would permit its development if introduced"<br/><br/>'
    '<b>Why is India receptive?</b><br/>'
    'โœ“ Population unvaccinated and susceptible<br/>'
    'โœ“ Aedes aegypti found in ABUNDANCE<br/>'
    'โœ“ Climate favourable in most parts<br/>'
    'โœ“ Common monkey (Macacus spp.) is susceptible<br/>'
    'โœ— Only MISSING LINK = the virus itself (not present in India)<br/><br/>'
    '<b>How virus could enter India:</b><br/>'
    '1. Infected travellers (clinical + subclinical)<br/>'
    '2. Infected mosquitoes on aircraft/ships', SM),
    8.65*cm, MB, LB)

ihr_box = side_box("INTERNATIONAL MEASURES (IHR)", Paragraph(
    '<b>For Travellers:</b><br/>'
    'โ€ข Must have valid <b>International Certificate of Vaccination</b><br/>'
    'โ€ข Without certificate: <b>Quarantine for 6 days</b> (mosquito-proof ward)<br/>'
    'โ€ข Certificate valid from <b>10 days after vaccination</b><br/>'
    'โ€ข Since <b>11 July 2016:</b> Certificate valid for <b>LIFETIME</b> (was 10 years)<br/>'
    'โ€ข Required even if traveller was only <b>in transit</b><br/>'
    'โ€ข India requires for infants <b>โ‰ฅ9 months</b><br/><br/>'
    '<b>For Aircraft/Ships from endemic areas:</b><br/>'
    'โ€ข <b>Aerosol spraying</b> with insecticides on arrival<br/>'
    'โ€ข Airports/seaports kept vector-free for <b>400 metres</b> around perimeter<br/>'
    'โ€ข <b>Aedes aegypti index kept below 1%</b>', SM),
    8.65*cm, MB, LB)
story += [Table([[india_box, ihr_box]], colWidths=[8.85*cm, 8.85*cm],
    style=[("VALIGN",(0,0),(-1,-1),"TOP"),("LEFTPADDING",(1,0),(1,0),4)]), sp(4)]

# Aedes index highlight
ae_tbl = Table([[
    Paragraph("๐Ÿ“  Aedes aegypti Index", PS("aei", fontName="Helvetica-Bold", fontSize=10,
               textColor=MB, alignment=TA_CENTER, leading=13)),
    Paragraph(
        '"The percentage of houses and their premises in a defined area showing actual '
        'breeding of Aedes aegypti larvae"  |  Must be <b>&lt;1%</b> in towns and seaports in endemic areas',
        PS("aed", fontSize=8.5, leading=12)),
]], colWidths=[5*cm, 12.7*cm])
ae_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(0,0),LB), ("BACKGROUND",(1,0),(1,0),LB),
    ("BOX",(0,0),(-1,-1),1,MB),
    ("TOPPADDING",(0,0),(-1,-1),6), ("BOTTOMPADDING",(0,0),(-1,-1),6),
    ("LEFTPADDING",(0,0),(-1,-1),6), ("VALIGN",(0,0),(-1,-1),"MIDDLE"),
]))
story += [ae_tbl, sp(7)]

# โ”€โ”€ VECTOR CONTROL + TREATMENT โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(sec_bar("๐ŸฆŸ  VECTOR CONTROL  &amp;  TREATMENT", GD))
story += [sp(4)]

vc_box = side_box("VECTOR CONTROL", Paragraph(
    'โ€ข Control <b>Aedes aegypti</b> (peri-domestic mosquito)<br/>'
    'โ€ข Anti-adult measures (adulticidal insecticides)<br/>'
    'โ€ข Anti-larval measures (eliminate breeding sites)<br/>'
    'โ€ข <b>Source reduction</b> = long-term policy (remove breeding places)<br/>'
    'โ€ข Health education for community<br/>'
    'โ€ข Keep <b>Aedes aegypti index &lt;1%</b> in seaports/towns', SM),
    8.65*cm, GD, GL)

tx_box = side_box("TREATMENT", Paragraph(
    '<b>NO specific antiviral treatment available</b><br/><br/>'
    'Only <b>supportive care:</b><br/>'
    'โ€ข Treat dehydration (IV fluids)<br/>'
    'โ€ข Fever management<br/>'
    'โ€ข Antibiotics for secondary bacterial infections<br/>'
    'โ€ข ICU support in severe cases<br/><br/>'
    '<b>Prevention &gt;&gt; Treatment</b><br/>'
    'Vaccination is the most effective strategy', SM),
    8.65*cm, YD, YL)
story += [Table([[vc_box, tx_box]], colWidths=[8.85*cm, 8.85*cm],
    style=[("VALIGN",(0,0),(-1,-1),"TOP"),("LEFTPADDING",(1,0),(1,0),4)]), sp(7)]

# โ”€โ”€ EYE STRATEGY โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(sec_bar("๐ŸŽฏ  EYE STRATEGY  (Elimination Yellow Fever Epidemics)", TM))
story += [sp(4)]

eye_box = side_box("EYE STRATEGY โ€” WHO + UNICEF + GAVI", Paragraph(
    '<b>3 Strategic Objectives:</b><br/>'
    '1. Protect at-risk populations<br/>'
    '2. Prevent international spread of yellow fever<br/>'
    '3. Contain outbreaks rapidly<br/><br/>'
    '<b>5 Competencies for Success:</b><br/>'
    '1. Affordable vaccines and sustained vaccine market<br/>'
    '2. Strong political commitment (global + regional + country)<br/>'
    '3. High-level governance with long-term partnerships<br/>'
    '4. Synergies with other health programmes<br/>'
    '5. Research and development for better tools', SM),
    8.65*cm, TM, TL)

diag_box = side_box("DIAGNOSIS", Paragraph(
    '<b>RT-PCR:</b> Within first <b>5 days</b> (acute/viremic phase)<br/>'
    '<b>Virus isolation:</b> From blood in first 4 days<br/>'
    '<b>Serology (ELISA):</b> IgM + IgG after day 5<br/><br/>'
    '<b>WHO recommendation:</b><br/>'
    'Every at-risk country must have at least<br/>'
    '<b>one national laboratory</b> for basic YF blood tests<br/><br/>'
    '<b>Confirmed case</b> in unvaccinated population<br/>= potential outbreak = emergency vaccination', SM),
    8.65*cm, TM, TL)
story += [Table([[eye_box, diag_box]], colWidths=[8.85*cm, 8.85*cm],
    style=[("VALIGN",(0,0),(-1,-1),"TOP"),("LEFTPADDING",(1,0),(1,0),4)]), sp(7)]

# โ”€โ”€ QUICK REFERENCE TABLE โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(sec_bar("โšก  COMPLETE QUICK REFERENCE  (One-Page Glance)", DB))
story += [sp(4)]
ref_rows = [
    ("<b>Causative agent</b>",      "Flavivirus fibricus โ€” Group B Arbovirus โ€” Togavirus family"),
    ("<b>Reservoir</b>",            "Monkeys + forest mosquitoes (jungle);  Man + Aedes aegypti (urban)"),
    ("<b>Vector</b>",               "Culicine mosquitoes (jungle);  Aedes aegypti (urban/intermediate)"),
    ("<b>Incubation period</b>",    "3โ€“6 days  (IHR recognizes 6 days)"),
    ("<b>Period of communicability (man)</b>", "Blood infective for first 3โ€“4 days of illness"),
    ("<b>Extrinsic incubation</b>",  "8โ€“12 days in mosquito; mosquito then infective for LIFE"),
    ("<b>3 transmission cycles</b>", "Jungle (sylvatic) โ†’ Intermediate โ†’ Urban (Aedes aegypti)"),
    ("<b>Hallmark symptoms</b>",     "Fever โ†’ Jaundice โ†’ Black Vomit โ†’ Kidney failure โ†’ Shock โ†’ Coma"),
    ("<b>Case fatality rate</b>",    "Up to 80% in severe cases"),
    ("<b>Death occurs</b>",          "Between 5thโ€“10th day of illness"),
    ("<b>Immunity after infection</b>","LIFELONG; second attacks unknown"),
    ("<b>Treatment</b>",             "Supportive only โ€” no antiviral; IV fluids, antipyretics, antibiotics"),
    ("<b>Vaccine</b>",               "17D โ€” Live attenuated โ€” 0.5 ml SC โ€” single dose โ€” chick embryo"),
    ("<b>Vaccine immunity onset</b>","7th day after vaccination"),
    ("<b>Vaccine validity</b>",      "LIFETIME (since 11 July 2016; previously 10 years)"),
    ("<b>Vaccine storage</b>",       "+5ยฐC to โˆ’30ยฐC; heat sensitive; discard reconstituted vaccine in 30 min"),
    ("<b>Vaccine contraindications</b>","<9 months, pregnant, egg allergy, immunodeficiency"),
    ("<b>Cholera + YF vaccine</b>",  "Give โ‰ฅ3 weeks apart โ€” they INTERFERE if given together"),
    ("<b>India's status</b>",        "RECEPTIVE AREA โ€” has vector + climate + susceptible hosts, but NO virus"),
    ("<b>Quarantine (no certificate)</b>","6 days in mosquito-proof ward"),
    ("<b>Certificate valid from</b>","10 days after vaccination"),
    ("<b>Airport vector-free zone</b>","400 metres around perimeter"),
    ("<b>Aedes aegypti index</b>",   "<1% in towns and seaports in endemic areas"),
    ("<b>EYE Strategy</b>",          "WHO + UNICEF + GAVI โ€” 3 objectives: protect, prevent spread, contain"),
    ("<b>Programme</b>",             "IHR (WHO) + NVBDCP (India)"),
]
ref_data = [[Paragraph("Feature", HC), Paragraph("Details", HC)]]
for i, (f, d) in enumerate(ref_rows):
    bg = YL if i % 2 == 0 else WH
    ref_data.append([Paragraph(f, SMB), Paragraph(d, SM)])
ref_tbl = Table(ref_data, colWidths=[5.5*cm, 12.2*cm])
ref_styles = [
    ("BACKGROUND",(0,0),(-1,0),DB),
    ("GRID",(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),"MIDDLE"),
]
for i in range(1, len(ref_rows)+1):
    ref_styles.append(("BACKGROUND",(0,i),(-1,i), YL if i%2==1 else WH))
ref_tbl.setStyle(TableStyle(ref_styles))
story += [ref_tbl, sp(6)]

# โ”€โ”€ EXAM Q&A โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(sec_bar("โ“  MOST LIKELY EXAM QUESTIONS &amp; ANSWERS", RD))
story += [sp(4)]
qa = [
    ("Define yellow fever.",
     "Zoonotic viral haemorrhagic fever caused by Flavivirus fibricus (Group B arbovirus, Togavirus). Transmitted by culicine mosquitoes. Characterized by fever, jaundice, black vomit, severe liver+kidney damage. CFR up to 80%."),
    ("What is the causative agent?",
     "Flavivirus fibricus โ€” Group B Arbovirus โ€” Togavirus family. Related to dengue and West Nile virus."),
    ("What are the 3 cycles of transmission?",
     "1. Jungle/Sylvatic (monkeysโ†’humans, forest mosquitoes) 2. Intermediate (monkeys+humans, semi-domestic mosquitoes) 3. Urban (humanโ†’human, Aedes aegypti)."),
    ("What is the incubation period?",
     "3โ€“6 days. 6 days recognized under IHR."),
    ("Describe the 17D vaccine.",
     "Live attenuated vaccine, 0.5 ml SC, single dose. Grown in chick embryo, freeze-dried. Immunity starts Day 7, lasts LIFETIME (since 2016). Store at +5ยฐC to โˆ’30ยฐC. Discard reconstituted vaccine in 30 minutes."),
    ("What is the validity of the YF vaccination certificate?",
     "LIFETIME โ€” since 11 July 2016 (IHR amendment, May 2014). Previously was 10 years."),
    ("Why is India a 'receptive area' for yellow fever?",
     "Has all conditions: abundant Aedes aegypti, suitable climate, susceptible unvaccinated population, susceptible monkeys (Macacus spp.) โ€” but the virus itself is not present in India."),
    ("What is the quarantine period? What are the conditions?",
     "6 days in a mosquito-proof ward, from date of leaving infected area."),
    ("What is the Aedes aegypti index?",
     "% of houses in a defined area showing actual Aedes aegypti larvae breeding. Must be <1% in towns/seaports of endemic areas."),
    ("Who should NOT receive yellow fever vaccine?",
     "Children <9 months (routine)/<6 months (epidemic), pregnant women, severe egg allergy, severe immunodeficiency (HIV/AIDS, thymus disorder)."),
    ("What is the EYE Strategy?",
     "Elimination Yellow Fever Epidemics โ€” by WHO+UNICEF+GAVI. 3 objectives: protect at-risk populations, prevent international spread, contain outbreaks rapidly."),
    ("What is the treatment of yellow fever?",
     "No specific antiviral. Supportive only: IV fluids, antipyretics, antibiotics for bacterial co-infection."),
]
qa_data = [[Paragraph("#", HC), Paragraph("Question", HC), Paragraph("Answer", HC)]]
for i, (q, a) in enumerate(qa):
    bg = YL if i%2==0 else WH
    qa_data.append([
        Paragraph(str(i+1), PS(f"qn{i}", fontName="Helvetica-Bold", fontSize=9,
                               textColor=WH, alignment=TA_CENTER)),
        Paragraph(q, PS(f"qq{i}", fontName="Helvetica-Bold", fontSize=8,
                        textColor=YD, leading=12)),
        Paragraph(a, SM),
    ])
qa_tbl = Table(qa_data, colWidths=[0.7*cm, 6.5*cm, 10.5*cm])
qa_styles = [
    ("BACKGROUND",(0,0),(-1,0),RD),
    ("GRID",(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),"MIDDLE"),
]
for i in range(1, len(qa)+1):
    qa_styles.append(("BACKGROUND",(0,i),(0,i), YD))
    qa_styles.append(("BACKGROUND",(1,i),(2,i), YL if i%2==1 else WH))
qa_tbl.setStyle(TableStyle(qa_styles))
story += [qa_tbl, sp(6)]

# โ”€โ”€ MEMORY FOOTER โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
mem_strip = Table([[
    Paragraph("Agent: Flavivirus fibricus\nTogavirus | Group B Arbovirus",
              PS("m1", fontName="Helvetica-Bold", fontSize=7.5, textColor=WH,
                 alignment=TA_CENTER, leading=10)),
    Paragraph("3 Cycles: Jโ†’Iโ†’U\nJungle | Intermediate | Urban",
              PS("m2", fontName="Helvetica-Bold", fontSize=7.5, textColor=WH,
                 alignment=TA_CENTER, leading=10)),
    Paragraph("17D Vaccine: Live attenuated\nImmunity Day 7 | LIFETIME",
              PS("m3", fontName="Helvetica-Bold", fontSize=7.5, textColor=WH,
                 alignment=TA_CENTER, leading=10)),
    Paragraph("India = Receptive Area\nQuarantine = 6 days",
              PS("m4", fontName="Helvetica-Bold", fontSize=7.5, textColor=WH,
                 alignment=TA_CENTER, leading=10)),
    Paragraph("Aedes Index <1%\n400m vector-free zone",
              PS("m5", fontName="Helvetica-Bold", fontSize=7.5, textColor=WH,
                 alignment=TA_CENTER, leading=10)),
]], colWidths=[3.54*cm, 3.54*cm, 3.54*cm, 3.54*cm, 3.54*cm])
mem_strip.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(0,0),colors.HexColor("#bf360c")),
    ("BACKGROUND",(1,0),(1,0),GD),
    ("BACKGROUND",(2,0),(2,0),PM),
    ("BACKGROUND",(3,0),(3,0),MB),
    ("BACKGROUND",(4,0),(4,0),TM),
    ("TOPPADDING",(0,0),(-1,-1),7), ("BOTTOMPADDING",(0,0),(-1,-1),7),
    ("VALIGN",(0,0),(-1,-1),"MIDDLE"),
]))
story.append(mem_strip)

# BUILD
doc = SimpleDocTemplate(OUTPUT, pagesize=A4,
    leftMargin=1.4*cm, rightMargin=1.4*cm,
    topMargin=1.3*cm, bottomMargin=1.3*cm)
doc.build(story)
print("PDF created:", OUTPUT)
Running Command

python3 /home/daytona/workspace/psm-topics/make_yellow_fever_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/psm-topics/YellowFever_QuickRevision.pdf

Your colorful Yellow Fever PDF is ready! ๐ŸŽ‰
Download here:

YellowFever QuickRevision

PDF Document ยท PDF


What's inside (single long page, fully color-coded):
SectionColorContent
๐ŸŸก CoverDeep OrangeTitle + Park's PSM source
๐ŸŒ Problem StatementOrange4 stat boxes: 47 countries, 900M at risk, 84โ€“170K cases, 60K deaths
๐Ÿ”ฌ Epidemiological TriadBlue/TealAgent factors, Host factors, Environmental factors
๐Ÿค’ Clinical FeaturesRedIncubation + 3 stages (Infection โ†’ Remission โ†’ Intoxication)
๐Ÿ”„ 3 Transmission CyclesGreenJungle / Intermediate / Urban table (color-coded rows)
๐Ÿ’‰ 17D VaccinePurpleFull details + contraindications + Cholera interaction warning
๐Ÿ‡ฎ๐Ÿ‡ณ India + IHRBlueIndia = Receptive Area + all IHR measures
๐ŸฆŸ Vector Control + TreatmentGreen/OrangeAedes control + supportive care only
๐ŸŽฏ EYE StrategyTealWHO+UNICEF+GAVI, 3 objectives, 5 competencies
โšก Quick Reference TableNavyAll 25 key facts in one table
โ“ Exam Q&ARed12 most likely exam questions with answers
๐Ÿง  Memory Footer5-color stripKey mnemonics for last-minute revision
Best of luck tomorrow! ๐Ÿ’ช

Tomorrow is my PSM practica exam. Examiner will surely difference between immunization and vaccination i dont know anything about them and i have no concept of this . please help me to understand this topic in very easy language and remember all of them, so i will secure better marks

Finding Sources
Finding Sources
Finding Sources
Reading File
Finding Sources
Reading File
Finding Sources
Reading File
Finding Sources
Reading File
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
I now have comprehensive content from Park's PSM. Let me now deliver the complete, easy-to-understand study guide.

๐Ÿ’‰ IMMUNIZATION vs VACCINATION

Complete PSM Exam Study Guide

(Based on Park's Textbook of Preventive & Social Medicine)


STEP 1 โ€” UNDERSTAND THE BASIC DIFFERENCE FIRST

This is the most common exam question. Students confuse these two words. Here's the simplest explanation:
TermSimple meaningTechnical meaning
VaccinationGetting a shot / taking a vaccineThe act of administering a vaccine into the body
ImmunizationBecoming protected/immuneThe process by which a person becomes protected against a disease โ€” either through vaccination OR through natural infection
Simple analogy: Vaccination is like planting a seed. Immunization is when the tree has grown and is bearing fruit (protection). You can't have immunization without first having vaccination โ€” but vaccination alone doesn't guarantee immunization (because not everyone responds to every vaccine).

KEY DEFINITIONS (Park's PSM)

Vaccine

"An immuno-biological substance designed to produce specific protection against a given disease. It stimulates the production of protective antibody and other immune mechanisms."
  • Vaccines may be prepared from: live modified organisms, inactivated/killed organisms, extracted cellular fractions, toxoids, or combinations.

Vaccination

  • The act of administering a vaccine โ€” giving the injection, oral drop, or spray
  • It is a physical process

Immunization

  • The process by which an individual is made immune or resistant to an infectious disease
  • Includes both vaccination AND the body's response to it
  • It is a biological process
  • Immunization can also happen through natural infection

THE BIG DIFFERENCE TABLE (Most Exam-Friendly Format)

FeatureVaccinationImmunization
MeaningAct of giving a vaccineProcess of becoming immune
NaturePhysical actBiological process
Who does itHealthcare workerThe body's immune system
Always leads to protection?Not necessarilyYes, by definition
Can happen naturally?NoYes (through natural infection)
ExampleGiving BCG injection to a newbornNewborn developing immunity against TB
Broader termNarrowerBroader
Exam tip: Immunization is the broader term โ€” it includes vaccination as one of its methods. Vaccination is just one WAY to achieve immunization.

TYPES OF IMMUNIZATION

Immunization is of 2 main types:

TYPE 1 โ€” ACTIVE IMMUNIZATION

Simple explanation: You give the body something to TRAIN the immune system. The body does the work itself and builds its OWN defenses.
Park's: "Active immunization is one of the most powerful and cost-effective weapons of modern medicine."
FeatureDetails
HowGive vaccine โ†’ body produces antibodies
Who does the workThe person's OWN immune system
Onset of protectionDelayed (takes days to weeks)
DurationLong-lasting / lifelong
ExamplesBCG, OPV, DPT, Measles, Hepatitis B vaccine
Active immunization is of 2 subtypes:
SubtypeHowExample
Artificially acquiredThrough vaccinationBCG, OPV, measles vaccine
Naturally acquiredThrough actual infectionGetting measles โ†’ lifelong immunity

TYPE 2 โ€” PASSIVE IMMUNIZATION

Simple explanation: You give the body READY-MADE antibodies from outside. The body does NOT make them itself. Protection is immediate but temporary.
FeatureDetails
HowGive antibodies/immunoglobulins from outside
Who does the workSomeone else's antibodies given to you
Onset of protectionImmediate
DurationShort (1โ€“6 weeks)
ExamplesAnti-tetanus serum (ATS), Anti-rabies immunoglobulin, Normal human immunoglobulin
3 types of preparations for passive immunity (Park's):
  1. Normal human immunoglobulin โ€” general protection
  2. Specific (hyperimmune) human immunoglobulin โ€” against specific disease
  3. Antisera or anti-toxins โ€” animal-derived (e.g., anti-snake venom)
Passive immunization limitations:
  • Duration is short and variable (1โ€“6 weeks)
  • Undesirable reactions may occur (especially if antiserum is of non-human origin)
  • Limited value in mass control of disease

TYPE 3 โ€” COMBINED (Passive + Active) Immunization

Simple explanation: Give both ready-made antibodies (for immediate protection) AND a vaccine (for long-term protection) at the same time.
Examples: Tetanus, Diphtheria, Rabies (give antiserum + vaccine together)
Important rule: Immunoglobulin should NOT be given within 3 weeks BEFORE or until 2 weeks AFTER a live attenuated vaccine โ€” they interfere! (Exception: Hepatitis B vaccine + Hepatitis B immunoglobulin can be given together)

COMPLETE CLASSIFICATION OF IMMUNIZATION

IMMUNIZATION
โ”œโ”€โ”€ ACTIVE
โ”‚   โ”œโ”€โ”€ Natural (through infection)
โ”‚   โ””โ”€โ”€ Artificial (through vaccination)
โ”‚       โ”œโ”€โ”€ Live attenuated vaccines
โ”‚       โ”œโ”€โ”€ Killed/inactivated vaccines
โ”‚       โ”œโ”€โ”€ Toxoids
โ”‚       โ””โ”€โ”€ Subunit/recombinant vaccines
โ””โ”€โ”€ PASSIVE
    โ”œโ”€โ”€ Natural (maternal antibodies to infant)
    โ””โ”€โ”€ Artificial (immunoglobulins, antisera)

TYPES OF VACCINES (Very Important!)

A. LIVE VACCINES (Live Attenuated)

Simple explanation: Weakened (attenuated) but ALIVE organisms. Still alive but can't cause full disease. The body thinks it's a real infection and builds strong immunity.
Examples: BCG, OPV (oral polio), MMR (measles-mumps-rubella), Yellow fever (17D), Varicella, Rotavirus
Advantages:
  • Single dose usually enough
  • Long-lasting immunity (mimics natural infection)
  • Produces both IgA + IgG
  • Produces mucosal immunity + cell-mediated immunity
  • No adjuvant needed
Disadvantages:
  • Heat sensitive โ€” need cold chain
  • Can revert to virulence (e.g., VAPP from OPV)
  • Contraindicated in immunodeficient, pregnant, cancer patients
Rule for live vaccines: If two live vaccines needed โ†’ give SIMULTANEOUSLY at different sites OR at least 3 WEEKS apart (not in between)

B. KILLED / INACTIVATED VACCINES

Simple explanation: Dead organisms or their parts. Cannot cause disease. But body still recognizes them and builds some immunity.
Examples: DPT (diphtheria-pertussis-tetanus), IPV (injectable polio), Hepatitis A, Typhoid (Vi polysaccharide), Influenza, Cholera, Rabies
Advantages:
  • Safe (cannot cause disease)
  • Stable โ€” no strict cold chain issues
  • Safe in immunocompromised and pregnant patients
Disadvantages:
  • Multiple doses needed
  • Shorter duration of immunity
  • Adjuvant often needed
  • Only IgG produced (no mucosal/cellular immunity)

LIVE vs KILLED VACCINE COMPARISON (Park's Table 30)

FeatureKilled VaccineLive Vaccine
Number of dosesMultipleSingle
Need for adjuvantYesNo
Duration of immunityShorterLonger
EffectivenessLowerGreater
ImmunoglobulinsIgG onlyIgA + IgG
Mucosal immunityPoorYes
Cell-mediated immunityPoorYes
Reversion to virulenceNoPossible
Stability at room tempHighLow
Safe in pregnancyYesContraindicated

C. TOXOIDS

Simple explanation: Toxin from bacteria, treated to make it harmless but still immunogenic. The body makes antibodies against the TOXIN.
Examples:
  • Diphtheria toxoid (in DPT)
  • Tetanus toxoid (TT)

D. SUBUNIT / RECOMBINANT VACCINES

Simple explanation: Only a piece of the organism is used โ€” not the whole organism. Made using genetic engineering.
Examples:
  • Hepatitis B vaccine (recombinant โ€” uses HBsAg protein)
  • HPV vaccine (virus-like particles)
  • Acellular pertussis (DTaP)

HERD IMMUNITY (Park's PSM Definition)

Simple explanation: When enough people in a community are immune, even unvaccinated people are protected because the disease can't spread easily. The chain of infection breaks.
Park's definition: "Herd immunity (or community immunity) describes a type of immunity that occurs when the vaccination of a portion of population provides protection to unprotected individuals."
How it works:
  • More immune people โ†’ harder for the virus to find a susceptible person
  • The chain of infection breaks
  • Even people who CAN'T be vaccinated (babies, immunocompromised) get protected
Elements contributing to herd immunity:
  1. Occurrence of clinical and subclinical infection in the herd
  2. Immunization of the herd
  3. Herd structure (births, deaths, migration)
Herd immunity threshold: The proportion of immune individuals above which a disease can no longer persist. Varies with:
  • Virulence of the disease
  • Efficacy of the vaccine
  • Contact parameter (how infectious the disease is)
Herd immunity thresholds for common diseases:
DiseaseThreshold needed
Measles~95%
Polio~80-85%
Smallpox~80-85%
Note: In tetanus โ€” herd immunity does NOT protect the individual (because tetanus is not spread person-to-person, it comes from soil)

COLD CHAIN (Park's PSM)

Simple explanation: Vaccines are like ice cream โ€” they go bad in the heat. The cold chain is the system that keeps them cold from factory to patient.
Park's definition: "The cold chain is a system of storage and transport of vaccines at low temperature from the manufacturer to the actual vaccination site."
Why important: Vaccine failure may occur if temperature is not maintained. Once potency is lost, it cannot be regained.
The 6 Rights of Supply Chain (Park's):
  1. Right vaccine
  2. Right quantity
  3. Right place
  4. Right time
  5. Right condition (no temperature break)
  6. Right cost
Temperature sensitivities:
Vaccine typeTemperatureExample
Most live vaccines+2ยฐC to +8ยฐCBCG, OPV, MMR
Freeze-dried vaccinesCan be frozenBCG, measles
Vaccines SENSITIVE to freezingDo NOT freezeHep B, DPT, TT, IPV, Cholera
Yellow Fever (17D)+5ยฐC to โˆ’30ยฐCYF vaccine
Multi-dose vial after opening: Keep at +2ยฐC to +8ยฐC and use within 4 hours

NATIONAL IMMUNIZATION PROGRAMME (PSM Focus)

EPI โ†’ UIP History:

  • 1974: WHO launched EPI (Expanded Programme on Immunization) globally โ€” protect all children against 6 diseases (diphtheria, whooping cough, tetanus, polio, TB, measles) by year 2000
  • 1978: EPI launched in India (January 1978)
  • 1985 (October): UNICEF launched Universal Child Immunization
  • 1985 (November 19): India launched UIP (Universal Immunization Programme) โ€” dedicated to memory of Smt. Indira Gandhi

National Immunization Schedule (NIS) โ€” Key vaccines:

AgeVaccine
At birthBCG, OPV-0, Hepatitis B (birth dose)
6 weeksOPV-1, Pentavalent-1 (DPT+HepB+Hib), IPV-1
10 weeksOPV-2, Pentavalent-2, IPV-2
14 weeksOPV-3, Pentavalent-3, IPV-3
9 monthsMeasles/MR-1
16-24 monthsOPV booster, DPT booster, MR-2
5 yearsDPT booster
10 years, 16 yearsTT/Td
Pregnant womenTT (2 doses 1 month apart, or booster)
Pentavalent vaccine = DPT + Hepatitis B + Hib combined (replaces DPT + HepB + Hib individually)

Good Immunization Schedule Criteria (Park's โ€” 4 criteria):

  1. Epidemiologically relevant โ€” only against diseases that are public health problems
  2. Immunologically effective โ€” vaccinate at right age (before exposure, after maternal antibodies wane)
  3. Operationally feasible โ€” minimize visits, achieve high coverage
  4. Socially acceptable โ€” consider local customs, beliefs, seasonal factors

MILESTONES IN VACCINATION (From Park's Table 31)

YearVaccine
1798Smallpox vaccine (Edward Jenner โ€” first ever vaccine)
1885Rabies vaccine
1923Diphtheria toxoid
1927BCG (tuberculosis) + Tetanus toxoid
1935Yellow fever vaccine
1955IPV (Salk polio vaccine)
1963Measles vaccine
1995Varicella + Hepatitis A vaccines
2000Pneumococcal conjugate vaccine

๐Ÿง  MEMORY TRICKS

TopicMemory Trick
Vaccination vs ImmunizationVaccination = Vehicle (transport); Immunization = Immunity achieved
Active vs PassiveActive = Antibodies made by yourself; Passive = Pre-made antibodies given to you
Live vaccine examplesBCG-MOVR = BCG, Measles, OPV, Varicella, Rotavirus (+ YF, MMR)
Killed vaccine examplesDIT-HCI = DPT, IPV, Typhoid, Hepatitis A, Cholera, Influenza
6 rights of cold chainVQP-TCC = Vaccine, Quantity, Place, Time, Condition, Cost
Live vaccine ruleSame time OR โ‰ฅ3 weeks apart (never in between)
Passive immunity duration1โ€“6 weeks only
UIP launch dateNovember 19, 1985 (India)
EPI original 6 diseasesDPMT-WP = Diphtheria, Pertussis (whooping cough), Measles, Tetanus, TB (BCG), Polio

โ“ MOST LIKELY EXAM QUESTIONS

Q: What is the difference between vaccination and immunization? A: Vaccination = physical act of giving a vaccine. Immunization = biological process of becoming immune (broader term, includes vaccination + natural infection).
Q: What is active immunization? Give examples. A: Body produces its own antibodies in response to a vaccine or infection. Long-lasting protection. Examples: BCG, OPV, DPT, measles vaccine.
Q: What is passive immunization? Give examples. A: Ready-made antibodies given from outside. Immediate but short-lived (1โ€“6 weeks). Examples: Anti-tetanus serum, Anti-rabies immunoglobulin.
Q: Difference between active and passive immunization? A: Active = body makes own antibodies, slow onset, long duration. Passive = antibodies given from outside, immediate onset, short duration (1โ€“6 weeks).
Q: Compare live and killed vaccines. A: Live = single dose, longer immunity, IgA+IgG, mucosal immunity, heat-sensitive, may revert to virulence. Killed = multiple doses, shorter immunity, IgG only, stable, safe in pregnancy.
Q: What is herd immunity? A: Protection of unvaccinated individuals when a sufficient proportion of the population is immune. Breaks the chain of transmission.
Q: What is the cold chain? A: System of storage and transport of vaccines at low temperature from manufacturer to vaccination site. The 6 rights: right vaccine, quantity, place, time, condition, cost.
Q: What is UIP? When was it launched? A: Universal Immunization Programme, launched in India on November 19, 1985. Dedicated to Smt. Indira Gandhi. Came from EPI (launched 1974 by WHO; in India in January 1978).
Q: What are toxoids? Examples? A: Bacterial toxins treated to be harmless but still immunogenic. Examples: Diphtheria toxoid, Tetanus toxoid (TT).
Q: What is the rule for administering two live vaccines? A: Give simultaneously at different sites OR with a gap of at least 3 weeks. Never in between.
Q: What vaccines are sensitive to freezing? A: Hepatitis B, DPT/Pentavalent, TT, IPV, Cholera, HPV, Influenza โ€” do NOT freeze these.
Q: What is the criteria for a good immunization schedule (4 criteria)? A: Epidemiologically relevant, immunologically effective, operationally feasible, socially acceptable.

โšก ONE-PAGE QUICK SUMMARY

VACCINATION = Give the vaccine (physical act)
IMMUNIZATION = Become immune (biological result) โ† BROADER TERM

IMMUNIZATION
   โ†“
ACTIVE                          PASSIVE
(body makes own antibodies)     (ready-made antibodies given)
โ€ข Delayed onset                 โ€ข Immediate onset
โ€ข Long duration (lifelong)      โ€ข Short duration (1โ€“6 weeks)
โ€ข Examples: BCG, OPV, DPT       โ€ข Examples: ATS, Anti-rabies Ig
โ€ข Vaccination achieves this     โ€ข Immunoglobulins/antisera

VACCINES:
โ€ข Live attenuated โ†’ BCG, OPV, MMR, YF, Varicella
โ€ข Killed/inactivated โ†’ DPT, IPV, Hep A, Typhoid, Cholera
โ€ข Toxoids โ†’ TT, Diphtheria toxoid
โ€ข Recombinant โ†’ Hep B, HPV

HERD IMMUNITY = Community protection when enough people are immune
COLD CHAIN = Keep vaccines cold from factory to patient (6 rights)
UIP = Launched India Nov 19, 1985 (EPI launched globally 1974; India 1978)
EPI original 6 diseases = Diphtheria, Whooping cough, Tetanus, Polio, TB, Measles
Good luck tomorrow! Focus especially on the difference table (vaccination vs immunization), active vs passive comparison, live vs killed vaccine comparison, and herd immunity definition โ€” these are the highest-yield PSM exam topics! ๐Ÿ’ช

Create a colorful PDF for Immunization vs Vaccination quick revision

Writing File

~/psm-topics/make_immunization_pdf.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle
from reportlab.lib.styles import ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT

OUTPUT = "/home/daytona/workspace/psm-topics/Immunization_vs_Vaccination.pdf"
W = 17.7 * cm

# โ”€โ”€ Colour Palette โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
NAVY   = colors.HexColor("#0d1b2a")
DB     = colors.HexColor("#1a237e")
MB     = colors.HexColor("#1565c0")
LB     = colors.HexColor("#e3f2fd")
TEAL_D = colors.HexColor("#00695c")
TEAL_M = colors.HexColor("#00897b")
TEAL_L = colors.HexColor("#e0f2f1")
GD     = colors.HexColor("#1b5e20")
GM     = colors.HexColor("#2e7d32")
GL     = colors.HexColor("#e8f5e9")
OD     = colors.HexColor("#e65100")
OM     = colors.HexColor("#f57c00")
OL     = colors.HexColor("#fff3e0")
PD     = colors.HexColor("#4a148c")
PM     = colors.HexColor("#6a1b9a")
PL     = colors.HexColor("#f3e5f5")
RD     = colors.HexColor("#b71c1c")
RL     = colors.HexColor("#ffebee")
GLD    = colors.HexColor("#f9a825")
GLLD   = colors.HexColor("#fffde7")
GRY    = colors.HexColor("#f5f5f5")
WH     = colors.white
BK     = colors.HexColor("#212121")
PINK_D = colors.HexColor("#880e4f")
PINK_L = colors.HexColor("#fce4ec")
CYAN_D = colors.HexColor("#006064")
CYAN_L = colors.HexColor("#e0f7fa")

def PS(name, **kw):
    d = dict(fontName="Helvetica", fontSize=9, leading=13, textColor=BK)
    d.update(kw)
    return ParagraphStyle(name, **d)

TITLE = PS("T",  fontName="Helvetica-Bold", fontSize=22, textColor=WH, alignment=TA_CENTER, leading=28)
SUB   = PS("S",  fontName="Helvetica",      fontSize=10, textColor=WH, alignment=TA_CENTER, leading=14)
SEC   = PS("Sc", fontName="Helvetica-Bold", fontSize=11.5, textColor=WH, leading=15)
BODY  = PS("B",  fontSize=9, leading=13)
BOLD  = PS("Bd", fontName="Helvetica-Bold", fontSize=9, leading=13)
SM    = PS("Sm", fontSize=8, leading=11)
SMB   = PS("Sb", fontName="Helvetica-Bold", fontSize=8, leading=11)
HC    = PS("Hc", fontName="Helvetica-Bold", fontSize=8.5, textColor=WH, alignment=TA_CENTER, leading=12)
TIP   = PS("Tp", fontName="Helvetica-Bold", fontSize=9, textColor=GLD, alignment=TA_CENTER, leading=13)
WB    = PS("Wb", fontName="Helvetica-Bold", fontSize=9, textColor=WH, leading=12)

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

def sec_bar(text, color):
    t = Table([[Paragraph(text, SEC)]], colWidths=[W])
    t.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,-1),color),
        ("TOPPADDING",(0,0),(-1,-1),6), ("BOTTOMPADDING",(0,0),(-1,-1),6),
        ("LEFTPADDING",(0,0),(-1,-1),10),
    ]))
    return t

def ibox(para, bg, border):
    t = Table([[para]], colWidths=[W])
    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), ("RIGHTPADDING",(0,0),(-1,-1),10),
    ]))
    return t

def mem_box(text):
    t = Table([[Paragraph(f"๐Ÿง   {text}", TIP)]], colWidths=[W])
    t.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,-1),GLLD),
        ("BOX",(0,0),(-1,-1),1.2,GLD),
        ("TOPPADDING",(0,0),(-1,-1),5), ("BOTTOMPADDING",(0,0),(-1,-1),5),
    ]))
    return t

def side_box(title, content_para, cw, hc, bg):
    t = Table([[Paragraph(title, HC)], [content_para]], colWidths=[cw])
    t.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(0,0),hc),
        ("BACKGROUND",(0,1),(0,1),bg),
        ("BOX",(0,0),(-1,-1),0.5,hc),
        ("TOPPADDING",(0,0),(-1,-1),5), ("BOTTOMPADDING",(0,0),(-1,-1),5),
        ("LEFTPADDING",(0,0),(-1,-1),7),
    ]))
    return t

def ctable(headers, rows, cw, hc, alt):
    data = [[Paragraph(h, HC) for h in headers]]
    for i, row in enumerate(rows):
        data.append([Paragraph(str(c), SM) for c in row])
    t = Table(data, colWidths=cw)
    styles = [
        ("BACKGROUND",(0,0),(-1,0),hc),
        ("ROWBACKGROUNDS",(0,1),(-1,-1),[alt, WH]),
        ("GRID",(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),"MIDDLE"),
    ]
    t.setStyle(TableStyle(styles))
    return t

# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
story = []

# โ”€โ”€ COVER โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
cover = Table([
    [Paragraph("๐Ÿ’‰  IMMUNIZATION vs VACCINATION", TITLE)],
    [Paragraph("PSM Quick Revision  โ€ข  Park's Textbook of Preventive &amp; Social Medicine", SUB)],
    [Paragraph("Active Immunization  โ€ข  Passive Immunization  โ€ข  Types of Vaccines  โ€ข  Herd Immunity  โ€ข  Cold Chain  โ€ข  UIP", 
               PS("cv3", fontSize=8.5, textColor=colors.HexColor("#bbdefb"), alignment=TA_CENTER, leading=12))],
], colWidths=[W])
cover.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(0,0),NAVY),
    ("BACKGROUND",(0,1),(0,1),DB),
    ("BACKGROUND",(0,2),(0,2),MB),
    ("TOPPADDING",(0,0),(0,0),12), ("BOTTOMPADDING",(0,0),(0,0),4),
    ("TOPPADDING",(0,1),(0,1),5), ("BOTTOMPADDING",(0,1),(0,1),5),
    ("TOPPADDING",(0,2),(0,2),4), ("BOTTOMPADDING",(0,2),(0,2),10),
]))
story += [cover, sp(7)]

# โ”€โ”€ DEFINITIONS โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(sec_bar("๐Ÿ“–  KEY DEFINITIONS  (Start Here!)", DB))
story += [sp(4)]

def_data = [
    [Paragraph("Term", HC), Paragraph("Simple Meaning", HC), Paragraph("Technical Meaning (Park's)", HC)],
    [Paragraph("<b>VACCINE</b>", SMB),
     Paragraph("The substance injected / given", SM),
     Paragraph('"An immuno-biological substance designed to produce specific protection against a given disease. It stimulates the production of protective antibody and other immune mechanisms."', SM)],
    [Paragraph("<b>VACCINATION</b>", SMB),
     Paragraph("The ACT of giving a vaccine", SM),
     Paragraph("Physical act of administering a vaccine (injection, oral drop, spray). Done by a healthcare worker.", SM)],
    [Paragraph("<b>IMMUNIZATION</b>", SMB),
     Paragraph("The process of BECOMING immune", SM),
     Paragraph("Biological process by which an individual becomes resistant to a disease โ€” through vaccination OR natural infection. BROADER term than vaccination.", SM)],
]
def_tbl = Table(def_data, colWidths=[3.5*cm, 4*cm, 10.2*cm])
def_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0),DB),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[LB,WH,LB]),
    ("GRID",(0,0),(-1,-1),0.4,colors.HexColor("#cccccc")),
    ("TOPPADDING",(0,0),(-1,-1),5), ("BOTTOMPADDING",(0,0),(-1,-1),5),
    ("LEFTPADDING",(0,0),(-1,-1),5), ("VALIGN",(0,0),(-1,-1),"TOP"),
]))
story += [def_tbl, sp(5)]

# โ”€โ”€ BIG DIFFERENCE TABLE โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(sec_bar("โš–  VACCINATION  vs  IMMUNIZATION  โ€”  KEY DIFFERENCE", MB))
story += [sp(4)]

diff_data = [
    [Paragraph("Feature", HC), Paragraph("VACCINATION", HC), Paragraph("IMMUNIZATION", HC)],
    [Paragraph("<b>Meaning</b>", SMB), Paragraph("Act of giving a vaccine", SM), Paragraph("Process of becoming immune", SM)],
    [Paragraph("<b>Nature</b>", SMB), Paragraph("Physical act", SM), Paragraph("Biological process", SM)],
    [Paragraph("<b>Who performs it</b>", SMB), Paragraph("Healthcare worker", SM), Paragraph("The body's own immune system", SM)],
    [Paragraph("<b>Always leads to protection?</b>", SMB), Paragraph("Not necessarily (some may not respond)", SM), Paragraph("Yes โ€” by definition", SM)],
    [Paragraph("<b>Can happen naturally?</b>", SMB), Paragraph("No โ€” only through deliberate act", SM), Paragraph("Yes โ€” through natural infection too", SM)],
    [Paragraph("<b>Example</b>", SMB), Paragraph("Giving BCG injection to a newborn", SM), Paragraph("Newborn developing immunity against TB", SM)],
    [Paragraph("<b>Which is broader?</b>", SMB), Paragraph("Narrower term", SM), Paragraph("BROADER term (includes vaccination + natural infection)", SM)],
]
diff_tbl = Table(diff_data, colWidths=[4.5*cm, 6.2*cm, 7*cm])
diff_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(0,0),MB),
    ("BACKGROUND",(1,0),(1,0),TEAL_D),
    ("BACKGROUND",(2,0),(2,0),GM),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[LB,WH]),
    ("GRID",(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),"MIDDLE"),
]))
story += [diff_tbl, sp(4)]
story.append(ibox(Paragraph(
    '<b>Analogy:</b> Vaccination = planting a seed.  Immunization = tree grown and bearing fruit (protection). '
    'You plant the seed (vaccinate) but the tree must grow on its own (immune response = immunization). '
    'Not every seed always grows โ€” similarly not everyone responds to every vaccine!', BODY), LB, MB))
story += [sp(7)]

# โ”€โ”€ TYPES OF IMMUNIZATION โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(sec_bar("๐Ÿ”„  TYPES OF IMMUNIZATION", TEAL_D))
story += [sp(4)]

# Active box
active_box = side_box("ACTIVE IMMUNIZATION", Paragraph(
    '<b>Body makes its OWN antibodies</b><br/><br/>'
    '<b>How:</b> Give vaccine โ†’ body produces antibodies<br/>'
    '<b>Onset:</b> Delayed (days to weeks)<br/>'
    '<b>Duration:</b> Long-lasting / <b>Lifelong</b><br/>'
    '<b>Types:</b><br/>'
    '&nbsp;&nbsp;โ€ข <b>Naturally acquired</b> โ€” through actual infection<br/>'
    '&nbsp;&nbsp;โ€ข <b>Artificially acquired</b> โ€” through vaccination<br/><br/>'
    '<b>Examples:</b> BCG, OPV, DPT, Measles, Hepatitis B<br/><br/>'
    'Park\'s: <i>"One of the most powerful and cost-effective weapons of modern medicine"</i>', SM),
    8.65*cm, TEAL_D, TEAL_L)

passive_box = side_box("PASSIVE IMMUNIZATION", Paragraph(
    '<b>READY-MADE antibodies given from outside</b><br/><br/>'
    '<b>How:</b> Immunoglobulins/antisera injected<br/>'
    '<b>Onset:</b> <b>Immediate</b><br/>'
    '<b>Duration:</b> Short โ€” <b>only 1โ€“6 weeks</b><br/>'
    '<b>3 Types of preparations:</b><br/>'
    '&nbsp;&nbsp;1. Normal human immunoglobulin<br/>'
    '&nbsp;&nbsp;2. Specific (hyperimmune) human immunoglobulin<br/>'
    '&nbsp;&nbsp;3. Antisera or anti-toxins (animal-derived)<br/><br/>'
    '<b>Examples:</b> Anti-tetanus serum, Anti-rabies Ig<br/>'
    '<b>Limitation:</b> Limited value in mass disease control', SM),
    8.65*cm, PM, PL)
story += [Table([[active_box, passive_box]], colWidths=[8.85*cm, 8.85*cm],
    style=[("VALIGN",(0,0),(-1,-1),"TOP"),("LEFTPADDING",(1,0),(1,0),4)]), sp(5)]

# Active vs Passive comparison
act_pass_data = [
    [Paragraph("Feature", HC), Paragraph("ACTIVE Immunization", HC), Paragraph("PASSIVE Immunization", HC)],
    [Paragraph("<b>Who makes antibodies?</b>", SMB), Paragraph("The person themselves", SM), Paragraph("Given from outside (another person/animal)", SM)],
    [Paragraph("<b>Onset of protection</b>", SMB), Paragraph("Delayed (days to weeks)", SM), Paragraph("Immediate", SM)],
    [Paragraph("<b>Duration</b>", SMB), Paragraph("Long-lasting / Lifelong", SM), Paragraph("Short โ€” 1 to 6 weeks only", SM)],
    [Paragraph("<b>Examples</b>", SMB), Paragraph("BCG, OPV, DPT, MMR, Hep B", SM), Paragraph("ATS, Anti-rabies Ig, Normal Ig", SM)],
    [Paragraph("<b>Use in mass control</b>", SMB), Paragraph("Primary strategy", SM), Paragraph("Limited value (short duration)", SM)],
    [Paragraph("<b>Reactions</b>", SMB), Paragraph("Generally mild", SM), Paragraph("Can occur (esp. animal antisera)", SM)],
    [Paragraph("<b>Combined use</b>", SMB), Paragraph("Tetanus: TT + ATS together for immediate + long-term", SM), Paragraph("Given at different sites from vaccine", SM)],
]
ap_tbl = Table(act_pass_data, colWidths=[4.5*cm, 6.2*cm, 7*cm])
ap_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(0,0),TEAL_D),
    ("BACKGROUND",(1,0),(1,0),TEAL_D),
    ("BACKGROUND",(2,0),(2,0),PM),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[TEAL_L,WH]),
    ("GRID",(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),"MIDDLE"),
]))
story += [ap_tbl, sp(4)]
story.append(ibox(Paragraph(
    'โš   <b>Important Rule:</b> Immunoglobulin should NOT be given within <b>3 weeks BEFORE</b> or until '
    '<b>2 weeks AFTER</b> a live attenuated vaccine โ€” they INTERFERE with each other!<br/>'
    'Exception: Hepatitis B vaccine + Hepatitis B immunoglobulin CAN be given together.',
    PS("warn", fontName="Helvetica-Bold", fontSize=8.5, textColor=RD, leading=12)), RL, RD))
story += [sp(4), mem_box(
    "Active = A = Antibodies made by yourself | Passive = P = Pre-made antibodies given | "
    "Active = Delayed but LONG | Passive = Immediate but SHORT (1โ€“6 weeks)"), sp(7)]

# โ”€โ”€ TYPES OF VACCINES โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(sec_bar("๐Ÿงช  TYPES OF VACCINES", OD))
story += [sp(4)]

vax_data = [
    [Paragraph("Type", HC), Paragraph("How Prepared", HC), Paragraph("Examples", HC), Paragraph("Key Feature", HC)],
    [Paragraph("<b>A. Live Attenuated</b>", SMB),
     Paragraph("Weakened live organisms (passed in lab repeatedly)", SM),
     Paragraph("BCG, OPV, MMR, Measles, Yellow Fever (17D), Varicella, Rotavirus", SM),
     Paragraph("Single dose; mimics natural infection; strongest immunity; heat-sensitive", SM)],
    [Paragraph("<b>B. Killed / Inactivated</b>", SMB),
     Paragraph("Dead organisms or their parts", SM),
     Paragraph("DPT, IPV, Hepatitis A, Typhoid (Vi), Influenza, Cholera, Rabies", SM),
     Paragraph("Multiple doses needed; safe in pregnancy; stable at room temp", SM)],
    [Paragraph("<b>C. Toxoids</b>", SMB),
     Paragraph("Bacterial toxin chemically treated to be harmless (but still immunogenic)", SM),
     Paragraph("Tetanus Toxoid (TT), Diphtheria Toxoid (in DPT)", SM),
     Paragraph("Antibodies made against the TOXIN not the organism", SM)],
    [Paragraph("<b>D. Subunit / Recombinant</b>", SMB),
     Paragraph("Only a piece/protein of the organism; made by genetic engineering", SM),
     Paragraph("Hepatitis B (HBsAg), HPV vaccine, Acellular pertussis (DTaP)", SM),
     Paragraph("Very safe; no live organism; newer technology", SM)],
]
vax_tbl = Table(vax_data, colWidths=[4*cm, 4.5*cm, 5.2*cm, 4*cm])
vax_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0),OD),
    ("BACKGROUND",(0,1),(-1,1),OL),
    ("BACKGROUND",(0,2),(-1,2),WH),
    ("BACKGROUND",(0,3),(-1,3),OL),
    ("BACKGROUND",(0,4),(-1,4),WH),
    ("GRID",(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),"MIDDLE"),
]))
story += [vax_tbl, sp(5)]

# Live vs Killed comparison (Park's Table 30)
story.append(Paragraph("<b>LIVE vs KILLED VACCINE โ€” Park's Comparison Table (Table 30)</b>", BOLD))
story += [sp(3)]
lk_data = [
    [Paragraph("Feature", HC), Paragraph("KILLED Vaccine", HC), Paragraph("LIVE Attenuated Vaccine", HC)],
    [Paragraph("Number of doses", SMB), Paragraph("Multiple (need boosters)", SM), Paragraph("Single dose usually enough", SM)],
    [Paragraph("Need for adjuvant", SMB), Paragraph("Yes", SM), Paragraph("No", SM)],
    [Paragraph("Duration of immunity", SMB), Paragraph("Shorter", SM), Paragraph("Longer", SM)],
    [Paragraph("Effectiveness", SMB), Paragraph("Lower", SM), Paragraph("Greater (mimics natural infection)", SM)],
    [Paragraph("Immunoglobulins produced", SMB), Paragraph("IgG only", SM), Paragraph("IgA + IgG", SM)],
    [Paragraph("Mucosal immunity", SMB), Paragraph("Poor", SM), Paragraph("Yes", SM)],
    [Paragraph("Cell-mediated immunity", SMB), Paragraph("Poor", SM), Paragraph("Yes", SM)],
    [Paragraph("Reversion to virulence", SMB), Paragraph("No", SM), Paragraph("Possible (e.g., VAPP from OPV)", SM)],
    [Paragraph("Stability at room temp", SMB), Paragraph("High", SM), Paragraph("Low (heat-sensitive!)", SM)],
    [Paragraph("Safe in pregnancy", SMB), Paragraph("Yes", SM), Paragraph("Contraindicated", SM)],
    [Paragraph("Safe in immunocompromised", SMB), Paragraph("Yes", SM), Paragraph("Contraindicated", SM)],
    [Paragraph("Two live vaccines rule", SMB), Paragraph("N/A", SM), Paragraph("Same time at different sites OR โ‰ฅ3 weeks apart", SM)],
]
lk_tbl = Table(lk_data, colWidths=[5*cm, 5.5*cm, 7.2*cm])
lk_styles = [
    ("BACKGROUND",(0,0),(0,0),OD),
    ("BACKGROUND",(1,0),(1,0),GM),
    ("BACKGROUND",(2,0),(2,0),MB),
    ("GRID",(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),"MIDDLE"),
]
for i in range(1, len(lk_data)):
    lk_styles.append(("BACKGROUND",(0,i),(-1,i), OL if i%2==1 else WH))
lk_tbl.setStyle(TableStyle(lk_styles))
story += [lk_tbl, sp(4),
    mem_box("Live vaccines: BCG-MOVR (BCG, Measles, OPV, Varicella, Rotavirus) + YF, MMR | "
            "Killed: DIT-HCI (DPT, IPV, Typhoid, Hep A, Cholera, Influenza)"), sp(7)]

# โ”€โ”€ HERD IMMUNITY โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(sec_bar("๐Ÿ„  HERD IMMUNITY  (Community Immunity)", GM))
story += [sp(4)]

herd_box = side_box("DEFINITION (Park's)", Paragraph(
    '"Herd immunity describes a type of immunity that occurs when the vaccination of a '
    '<b>portion of the population</b> provides protection to <b>unprotected individuals</b>. '
    'When large numbers are immune, it is difficult to maintain a chain of infection โ€” '
    'the lower the likelihood a susceptible person will contact an infectious agent."<br/><br/>'
    '<b>Elements of herd immunity:</b><br/>'
    '1. Clinical + subclinical infection in the herd<br/>'
    '2. Immunization of the herd<br/>'
    '3. Herd structure (births, deaths, migration)', SM),
    8.65*cm, GM, GL)

thresh_box = side_box("HERD IMMUNITY THRESHOLD", Paragraph(
    '"The proportion of immune individuals above which a disease may <b>no longer persist</b>"<br/><br/>'
    'Varies with:<br/>'
    'โ€ข Virulence of the disease<br/>'
    'โ€ข Efficacy of the vaccine<br/>'
    'โ€ข Contact parameter (how infectious)<br/><br/>'
    '<b>Approximate thresholds:</b><br/>'
    'โ€ข Measles: ~<b>95%</b> needed<br/>'
    'โ€ข Polio: ~<b>80โ€“85%</b><br/>'
    'โ€ข Smallpox: ~<b>80โ€“85%</b><br/><br/>'
    '<b>Note:</b> In <b>tetanus</b>, herd immunity does <b>NOT</b> protect the<br/>'
    'individual (tetanus comes from soil, not person-to-person)', SM),
    8.65*cm, GM, GL)
story += [Table([[herd_box, thresh_box]], colWidths=[8.85*cm, 8.85*cm],
    style=[("VALIGN",(0,0),(-1,-1),"TOP"),("LEFTPADDING",(1,0),(1,0),4)]), sp(4)]
story.append(ibox(Paragraph(
    '<b>Simple explanation:</b> When enough people are immune โ†’ the disease cannot find susceptible people easily โ†’ '
    'chain of infection breaks โ†’ even <b>unvaccinated people are protected</b> (babies, immunocompromised). '
    'Example: Measles in Faroe Islands (1854) โ€” virgin population, near 100% attack rate. '
    'Epidemic stopped as herd immunity built up. Determined by <b>serological surveys</b>.', BODY), GL, GM))
story += [sp(7)]

# โ”€โ”€ COLD CHAIN โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(sec_bar("โ„  COLD CHAIN", CYAN_D))
story += [sp(4)]

cc_def = side_box("DEFINITION (Park's)", Paragraph(
    '"The cold chain is a system of storage and transport of vaccines at <b>low temperature</b> '
    'from the <b>manufacturer to the actual vaccination site</b>."<br/><br/>'
    '<b>Why needed:</b> Vaccine failure occurs if temperature not maintained. '
    'Once vaccine potency is lost, it <b>CANNOT be regained</b>.<br/><br/>'
    '<b>6 RIGHTS of Supply Chain:</b><br/>'
    '1. Right <b>Vaccine</b><br/>'
    '2. Right <b>Quantity</b><br/>'
    '3. Right <b>Place</b><br/>'
    '4. Right <b>Time</b><br/>'
    '5. Right <b>Condition</b> (no temperature break)<br/>'
    '6. Right <b>Cost</b>', SM),
    8.65*cm, CYAN_D, CYAN_L)

temp_box = side_box("TEMPERATURE REQUIREMENTS", Paragraph(
    '<b>Most vaccines:</b> +2ยฐC to +8ยฐC<br/>'
    '<b>Yellow Fever (17D):</b> +5ยฐC to โˆ’30ยฐC (can be frozen)<br/><br/>'
    '<b>Vaccines SENSITIVE TO FREEZING (DO NOT FREEZE!):</b><br/>'
    'โ€ข Hepatitis B<br/>'
    'โ€ข DPT / Pentavalent<br/>'
    'โ€ข Tetanus Toxoid (TT)<br/>'
    'โ€ข IPV (injectable polio)<br/>'
    'โ€ข Cholera, HPV, Influenza<br/><br/>'
    '<b>Most heat-sensitive:</b> Live vaccines (BCG, OPV, measles, YF)<br/><br/>'
    '<b>Multi-dose vial after opening:</b><br/>'
    'Use within <b>4 hours</b> OR keep at +2ยฐC to +8ยฐC', SM),
    8.65*cm, CYAN_D, CYAN_L)
story += [Table([[cc_def, temp_box]], colWidths=[8.85*cm, 8.85*cm],
    style=[("VALIGN",(0,0),(-1,-1),"TOP"),("LEFTPADDING",(1,0),(1,0),4)]), sp(4),
    mem_box("6 Rights = VQP-TCC: Vaccine, Quantity, Place, Time, Condition, Cost | "
            "DO NOT FREEZE: Hep B, DPT, TT, IPV | Use opened multi-dose vial within 4 hours"), sp(7)]

# โ”€โ”€ UIP + EPI โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(sec_bar("๐Ÿฅ  UIP &amp; EPI  โ€”  National Immunization Programme", PINK_D))
story += [sp(4)]

epi_uip_data = [
    [Paragraph("Programme", HC), Paragraph("Details", HC)],
    [Paragraph("<b>EPI โ€” Expanded Programme on Immunization</b>", SMB),
     Paragraph("Launched globally by WHO in <b>May 1974</b>. Goal: protect all children against 6 diseases by 2000. "
               "Launched in India in <b>January 1978</b>. "
               "6 original diseases: <b>Diphtheria, Whooping cough, Tetanus, Polio, TB (BCG), Measles</b>", SM)],
    [Paragraph("<b>Universal Child Immunization</b>", SMB),
     Paragraph("Name given by UNICEF in <b>October 1985</b> (UN's 40th anniversary). Aimed to add impetus to global EPI.", SM)],
    [Paragraph("<b>UIP โ€” Universal Immunization Programme (India)</b>", SMB),
     Paragraph("Launched in India on <b>November 19, 1985</b>. Dedicated to memory of <b>Smt. Indira Gandhi</b>. "
               "Goal: achieve universal immunization coverage by 1990.", SM)],
]
epi_tbl = Table(epi_uip_data, colWidths=[5.5*cm, 12.2*cm])
epi_tbl.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0),PINK_D),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[PINK_L, WH, PINK_L]),
    ("GRID",(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),"MIDDLE"),
]))
story += [epi_tbl, sp(5)]

# NIS Schedule
story.append(Paragraph("<b>NATIONAL IMMUNIZATION SCHEDULE (NIS) โ€” Key Vaccines</b>", BOLD))
story += [sp(3)]
nis_data = [
    [Paragraph("Age", HC), Paragraph("Vaccines Given", HC)],
    [Paragraph("<b>At BIRTH</b>", SMB), Paragraph("BCG  โ€ข  OPV-0 (birth dose)  โ€ข  Hepatitis B (birth dose)", SM)],
    [Paragraph("<b>6 weeks</b>", SMB), Paragraph("OPV-1  โ€ข  Pentavalent-1 (DPT+HepB+Hib)  โ€ข  IPV-1", SM)],
    [Paragraph("<b>10 weeks</b>", SMB), Paragraph("OPV-2  โ€ข  Pentavalent-2  โ€ข  IPV-2", SM)],
    [Paragraph("<b>14 weeks</b>", SMB), Paragraph("OPV-3  โ€ข  Pentavalent-3  โ€ข  IPV-3", SM)],
    [Paragraph("<b>9 months</b>", SMB), Paragraph("Measles / MR-1", SM)],
    [Paragraph("<b>16โ€“24 months</b>", SMB), Paragraph("OPV Booster  โ€ข  DPT Booster  โ€ข  MR-2", SM)],
    [Paragraph("<b>5 years</b>", SMB), Paragraph("DPT Booster  โ€ข  OPV Booster", SM)],
    [Paragraph("<b>10 years, 16 years</b>", SMB), Paragraph("TT / Td (Tetanus-diphtheria)", SM)],
    [Paragraph("<b>Pregnant women</b>", SMB), Paragraph("TT โ€” 2 doses 1 month apart (or booster if previously immunized)", SM)],
]
nis_tbl = Table(nis_data, colWidths=[4*cm, 13.7*cm])
nis_styles = [
    ("BACKGROUND",(0,0),(-1,0),PINK_D),
    ("GRID",(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),"MIDDLE"),
]
for i in range(1, len(nis_data)):
    nis_styles.append(("BACKGROUND",(0,i),(-1,i), PINK_L if i%2==1 else WH))
nis_tbl.setStyle(TableStyle(nis_styles))
story += [nis_tbl, sp(4)]
story.append(ibox(Paragraph(
    '<b>Pentavalent vaccine</b> = DPT + Hepatitis B + Hib combined. '
    'Replaces DPT + Hep B + Hib individually in NIS.<br/>'
    '<b>Good immunization schedule criteria:</b> (1) Epidemiologically relevant  '
    '(2) Immunologically effective  (3) Operationally feasible  (4) Socially acceptable',
    SM), PINK_L, PINK_D))
story += [sp(4),
    mem_box("UIP = Nov 19, 1985 (India) | EPI = 1974 WHO (India 1978) | "
            "EPI 6 diseases = DPMT-WP: Diphtheria, Pertussis, Measles, Tetanus, TB, Polio"), sp(7)]

# โ”€โ”€ EXAM Q&A โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
story.append(sec_bar("โ“  MOST LIKELY EXAM QUESTIONS &amp; ANSWERS", RD))
story += [sp(4)]
qa = [
    ("Difference between vaccination and immunization?",
     "Vaccination = physical act of giving a vaccine. Immunization = biological process of becoming immune (broader term โ€” includes vaccination + natural infection)."),
    ("Define active immunization. Give examples.",
     "Body produces its OWN antibodies. Delayed onset but LIFELONG protection. Examples: BCG, OPV, DPT, Measles, Hepatitis B."),
    ("Define passive immunization. Give examples.",
     "Ready-made antibodies given from outside. IMMEDIATE onset but SHORT duration (1โ€“6 weeks). Examples: Anti-tetanus serum (ATS), Anti-rabies immunoglobulin."),
    ("Compare active vs passive immunization.",
     "Active = own antibodies, delayed, lifelong. Passive = given antibodies, immediate, 1โ€“6 weeks only."),
    ("Compare live vs killed vaccines (4 differences).",
     "Live: single dose, longer immunity, IgA+IgG, mucosal immunity, heat-sensitive, may revert to virulence. Killed: multiple doses, shorter immunity, IgG only, stable, safe in pregnancy."),
    ("What are toxoids? Examples.",
     "Bacterial toxin treated chemically to remove toxicity but retain antigenicity. Examples: Tetanus toxoid (TT), Diphtheria toxoid."),
    ("Define herd immunity.",
     "Immunity that occurs when vaccination of a portion of population protects unprotected individuals. Chain of infection breaks when enough are immune."),
    ("What is the cold chain? What are the 6 rights?",
     "System of storage + transport of vaccines at low temperature from manufacturer to vaccination site. 6 Rights: Vaccine, Quantity, Place, Time, Condition, Cost."),
    ("Which vaccines must NOT be frozen?",
     "Hepatitis B, DPT/Pentavalent, TT, IPV, Cholera, HPV, Influenza โ€” protect from sub-zero temperatures."),
    ("What is UIP? When launched in India?",
     "Universal Immunization Programme. Launched November 19, 1985. Dedicated to Smt. Indira Gandhi. EPI launched globally 1974; in India January 1978."),
    ("What are the 6 original EPI diseases?",
     "Diphtheria, Whooping cough (Pertussis), Measles, Tetanus, Tuberculosis (BCG), Poliomyelitis."),
    ("Rule for giving two live vaccines?",
     "Give simultaneously at different sites OR with a gap of at least 3 weeks. NEVER in between. Immunoglobulin: not within 3 weeks before or 2 weeks after a live vaccine."),
]
qa_data = [[Paragraph("#", HC), Paragraph("Question", HC), Paragraph("Answer", HC)]]
for i, (q, a) in enumerate(qa):
    bg = LB if i%2==0 else WH
    qa_data.append([
        Paragraph(str(i+1), PS(f"qn{i}", fontName="Helvetica-Bold", fontSize=9,
                               textColor=WH, alignment=TA_CENTER)),
        Paragraph(q, PS(f"qq{i}", fontName="Helvetica-Bold", fontSize=8,
                        textColor=DB, leading=12)),
        Paragraph(a, SM),
    ])
qa_tbl = Table(qa_data, colWidths=[0.7*cm, 6.5*cm, 10.5*cm])
qa_styles = [
    ("BACKGROUND",(0,0),(-1,0),RD),
    ("GRID",(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),"MIDDLE"),
]
for i in range(1, len(qa)+1):
    qa_styles.append(("BACKGROUND",(0,i),(0,i), DB))
    qa_styles.append(("BACKGROUND",(1,i),(2,i), LB if i%2==1 else WH))
qa_tbl.setStyle(TableStyle(qa_styles))
story += [qa_tbl, sp(6)]

# โ”€โ”€ MEMORY FOOTER STRIP โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
labels = [
    (DB,    "Vaccination = ACT\nImmunization = PROCESS"),
    (TEAL_D,"Active = Own Abs\nPassive = Given Abs"),
    (OD,    "Live: BCG-MOVR\nKilled: DIT-HCI"),
    (GM,    "Herd = Community\nprotects all"),
    (CYAN_D,"6 Rights: VQP-TCC\nNo freeze: HepB DPT TT"),
    (PINK_D,"UIP: Nov 19, 1985\nEPI: 1974 WHO"),
]
mem_cells = [[
    Paragraph(lbl, PS(f"mf{i}", fontName="Helvetica-Bold", fontSize=7.5,
                      textColor=WH, alignment=TA_CENTER, leading=10))
    for i, (_, lbl) in enumerate(labels)
]]
mem_strip = Table(mem_cells, colWidths=[W/len(labels)]*len(labels))
ms_style = [
    ("TOPPADDING",(0,0),(-1,-1),6), ("BOTTOMPADDING",(0,0),(-1,-1),6),
    ("VALIGN",(0,0),(-1,-1),"MIDDLE"),
]
for i, (clr, _) in enumerate(labels):
    ms_style.append(("BACKGROUND",(i,0),(i,0),clr))
mem_strip.setStyle(TableStyle(ms_style))
story.append(mem_strip)

doc = SimpleDocTemplate(OUTPUT, pagesize=A4,
    leftMargin=1.4*cm, rightMargin=1.4*cm,
    topMargin=1.3*cm, bottomMargin=1.3*cm)
doc.build(story)
print("PDF created:", OUTPUT)
Running Command

python3 /home/daytona/workspace/psm-topics/make_immunization_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/psm-topics/Immunization_vs_Vaccination.pdf

Your colorful Immunization vs Vaccination PDF is ready! ๐ŸŽ‰
Download here:

Immunization vs Vaccination

PDF Document ยท PDF


What's inside (fully color-coded, single document):
SectionColorContent
๐Ÿ”ต CoverNavy/BlueTitle + source
๐Ÿ“– DefinitionsBlueVaccine vs Vaccination vs Immunization (3-column table)
โš– Key DifferenceBlue/Teal7-row comparison: Vaccination vs Immunization
๐Ÿ”„ Types of ImmunizationTealActive vs Passive side by side + Active vs Passive comparison table + warning box
๐Ÿงช Types of VaccinesOrange4 types table (Live, Killed, Toxoids, Recombinant) + Park's Live vs Killed Table 30 (13 features!)
๐Ÿ„ Herd ImmunityGreenDefinition + elements + threshold + disease-wise percentages
โ„ Cold ChainCyanDefinition + 6 Rights + temperature table (what to freeze / not freeze)
๐Ÿฅ UIP & EPIPinkEPI (1974) vs UIP (1985) + Full National Immunization Schedule table
โ“ Exam Q&ARed12 most likely questions with answers (color-coded)
๐Ÿง  Footer strip6 colorsOne-line memory codes for each topic
Good luck tomorrow! ๐Ÿ’ช
This is a shared conversation. Sign in to Orris to start your own chat.