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
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) "
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() "
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
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
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
# Convert PDF pages to images using pdftoppm/convert which pdftoppm; which convert; which gs; ls /home/daytona/workspace/attachments/68c7f962-100e-4058-a758-38ea9aa87a00/
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
# 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
cd /home/daytona/workspace/lit-review-study && python3 -m http.server 8765 & sleep 2 && echo "Server started"
python3 -m http.server 8765 --directory /home/daytona/workspace/lit-review-study/images & disown $! echo "Server launched with PID $!"
nohup python3 -m http.server 8765 --directory /home/daytona/workspace/lit-review-study/images > /tmp/server.log 2>&1 & echo $!
sleep 2 && curl -s http://localhost:8765/ | head -20
# 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
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
# OCR all rendered pages using tesseract which tesseract && tesseract --version 2>&1 | head -3
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
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
# 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
# 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
# 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
# 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
"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."
| # | Purpose |
|---|---|
| 1 | Show you know the topic and its scholarly background |
| 2 | Develop a theoretical framework and methodology |
| 3 | Position your work among other researchers |
| 4 | Show your research fills a gap or adds to a debate |
| 5 | Evaluate the current state of research |
| Operator | What it does | Example | Result |
|---|---|---|---|
| AND | Narrows results (both terms must appear) | Fever AND Joint Pain | 4,432 results |
| OR | Broadens results (either term can appear) | Fever OR Joint Pain | 317,869 results |
| NOT | Excludes a term | Typhoid fever NOT children | 10,758 results |
| " " (quotes) | Exact phrase search | Fever AND "Joint Pain" | 780 results (exact phrase) |
| ( ) | Groups terms together | Fever AND (joint pain OR chills) | Combined search |
Remember: Take notes and cite your sources (APA or Vancouver Style)
| Structure | What it means | When to use |
|---|---|---|
| Chronological | Organize by time (oldest to newest) | When showing how a topic evolved |
| Thematic | Group by topic/theme (qualitative analysis) | Most common in PSM |
| Methodological | Group by research methods used | When comparing methods |
| Theoretical | Group by theoretical framework | When comparing theories |
| Part | What to write |
|---|---|
| Introduction | Clearly establish the focus and purpose of your review |
| Body | Summarize + synthesize + analyze + critically evaluate; write in well-structured paragraphs |
| Conclusion | Summarize key findings and emphasize their significance |
| Author & Year | Title | Objective | Methodology | Key Findings | Conclusion |
|---|---|---|---|---|---|
| Author 1 et al., YYYY | Title | Aim of study | Survey/experiment/etc. | Significant results | Main takeaway |
| Validity | Reliability | |
|---|---|---|
| Meaning | Measures what it should | Gives consistent results |
| Importance | Makes results meaningful and applicable | Makes results dependable and repeatable |
| Key point | A test can be reliable but NOT valid | A 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.
Quick pdf reference
Survey of scholarly sources on a specific topic to identify theories, methods, and gaps.
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
| Operator | Effect | Example | Results |
|---|---|---|---|
| AND | Narrows | Fever AND Joint Pain | 4,432 |
| OR | Broadens | Fever OR Joint Pain | 317,869 |
| NOT | Excludes | Typhoid fever NOT children | 10,758 |
| " " | Exact phrase | "Joint Pain" | Exact only |
| ( ) | Groups terms | (joint pain OR chills) | Combined |
Always: Cite sources in APA or Vancouver style
| Type | Organize by |
|---|---|
| Chronological | Time (old โ new) |
| Thematic | Topic/theme (most common in PSM) |
| Methodological | Research methods |
| Theoretical | Frameworks/theories |
After introduction โ before methodology. Grounds research, leads to theoretical framework.
| Type | Simple meaning | Example |
|---|---|---|
| Content | Covers ALL aspects of topic | Bio exam must include ALL subjects taught |
| Construct - Convergent | Related things ARE related | Two IQ tests correlate |
| Construct - Discriminant | Unrelated things are NOT related | IQ test โ personality traits |
| Criterion - Predictive | Predicts a FUTURE outcome | High SAT โ high college GPA |
| Criterion - Concurrent | Correlates with existing test NOW | New depression test โ old depression scale |
| Face | Looks appropriate (subjective) | Diet questionnaire asks about food habits |
| Type | Simple meaning | Example |
|---|---|---|
| Test-Retest | Same test, same people, different times | Personality test โ same scores 2 weeks later |
| Inter-Rater | Different raters agree | Two teachers give same essay similar marks |
| Parallel-Forms | Two versions of test give same result | Math Test A โ Math Test B |
| Split-Half | Two halves of test agree | Q1-10 โ Q11-20 scores |
| Cronbach's Alpha | Number (0-1) for internal consistency | ฮฑ = 0.85 = high reliability โ |
| Validity | Reliability | |
|---|---|---|
| = | Accuracy | Consistency |
| Can exist without the other? | โ No | โ Yes (reliable but not valid) |
Clock analogy: Clock always 10 min fast = Reliable โ but NOT Valid โ
Quick pdf reference of this in easy and in color pdf
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
~/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)
python3 /home/daytona/workspace/lit-review-study/make_reference_pdf.py 2>&1
~/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'
python3 /home/daytona/workspace/lit-review-study/make_reference_pdf.py 2>&1
~/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'
python3 /home/daytona/workspace/lit-review-study/make_reference_pdf.py 2>&1
ls -lh /home/daytona/workspace/lit-review-study/PSM_Quick_Reference.pdf
PSM Quick Reference
PDF Document ยท PDF
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
"Chikungunya" = Word from Kimakonde language (Tanzania) meaning "to become contorted" or "doubled up" - because joint pain is SO severe the patient walks bent over.
| Feature | Detail |
|---|---|
| Vector | Aedes aegypti (primary) and Aedes albopictus |
| Reservoir | Humans (during epidemic) + jungle primates (wild cycle) |
| Transmission | Mosquito bite, bloodborne (rare), intrapartum (mother to baby during delivery) |
| Season | Rainy season - when mosquito population peaks |
| First isolated | Tanzania, 1952-53 |
| India | Re-emerged in 2006, endemic in 24 states and 6 UTs |
| Feature | Chikungunya | Dengue |
|---|---|---|
| Joint pain | Very severe, hallmark | Mild |
| Rash | Common, morbilliform | Common |
| Hemorrhage | Rare | Common |
| Deaths | None | Possible |
| Chronic arthritis | Yes, months-years | No |
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
| Species | Fever Pattern | Severity |
|---|---|---|
| P. falciparum | Every 36-48 hrs (quotidian/sub-tertian) | Most dangerous - causes cerebral malaria, blackwater fever |
| P. vivax | Every 48 hrs (tertian) | Common in India |
| P. malariae | Every 72 hrs (quartan) | Mild |
| P. ovale | Every 48 hrs | Mild, rare |
India: P. falciparum is the main killer - it's drug resistant and causes complications
| Feature | Detail |
|---|---|
| Vector | Female Anopheles mosquito |
| Transmission | Mosquito bite (main), blood transfusion, congenital, needle sharing |
| Global burden | 229 million cases in 2019 in 87 endemic countries |
| India burden | Cases reduced from 20 million (2000) to 5.6 million (2019) |
| India deaths | 73 deaths in 2019 |
| High burden states | NE states, Chhattisgarh, Jharkhand, MP, Odisha, Andhra Pradesh, Maharashtra, Gujarat, Rajasthan, WB, Karnataka |
| Stage | What happens | Duration |
|---|---|---|
| 1. Cold Stage | Patient feels very cold, shivering/rigor | 15-60 min |
| 2. Hot Stage | High fever, headache, nausea, vomiting | 2-6 hours |
| 3. Sweating Stage | Profuse sweating, fever breaks, patient feels better | 2-4 hours |
| Complication | Description |
|---|---|
| Cerebral malaria | Convulsions, coma - most dangerous |
| Blackwater fever | Massive hemolysis โ hemoglobinuria (black urine) |
| Severe anemia | Destruction of RBCs |
| Hypoglycemia | Especially in children and pregnant women |
| Pulmonary edema | ARDS |
| Algid malaria | Collapse, shock |
| Malaria in pregnancy | Low birth weight, miscarriage |
"FACT" = Falciparum is the most dangerous, Anopheles female transmits, Cold-Hot-Sweating are 3 stages, Treatment is ACT
| Term | WHO Definition |
|---|---|
| Congenital malformation | Structural defects only at birth |
| Congenital anomaly | Includes ALL - structural + biochemical + functional disorders present at birth |
WHO document 1972: "Congenital anomaly" is the broader term - includes biochemical, structural, and functional disorders.
| Type | Examples |
|---|---|
| Chromosomal abnormalities | Down syndrome (extra chr 21), Klinefelter syndrome (XXY), Turner syndrome (XO) |
| Inborn errors of metabolism | PKU (phenylketonuria), Tay-Sachs disease, Galactosaemia |
| Single gene defects | Haemophilia, sickle cell disease |
| Category | Examples |
|---|---|
| Infections (TORCH) | Rubella, Cytomegalovirus (CMV), Toxoplasma, Syphilis, Herpes simplex, Varicella |
| Drugs | Thalidomide (phocomelia), Stilboestrol, Anti-convulsants, Alcohol, Tobacco, high-dose Vitamin A |
| Maternal diseases | Diabetes, Cardiac failure |
| Radiation | X-rays, irradiation |
| Nutritional | Folic acid deficiency (causes neural tube defects) |
Remember TORCH infections: Toxoplasma, Other (syphilis, HIV, Parvovirus), Rubella, CMV, Herpes
| Test | What it detects | When |
|---|---|---|
| Alpha Fetoprotein (AFP) | Neural tube defects (elevated AFP in maternal blood + amniotic fluid) | 1st trimester onwards |
| Ultrasound | Many structural abnormalities | Any trimester |
| Amniocentesis | Down syndrome, NTDs, chromosomal abnormalities | 2nd trimester (after 12 weeks) |
| Chorionic Villus Sampling (CVS) | Chromosome status | 9-11 weeks (earlier than amnio!) |
CVS vs Amniocentesis: CVS is done earlier (9-11 weeks) vs amniocentesis (after 12 weeks)
"GEMS" for causes:
- Genetic (chromosomal, inborn errors, single gene)
- Environmental infections (TORCH)
- Maternal conditions (diabetes, radiation)
- Substances/drugs (thalidomide, alcohol, folate deficiency)
| Feature | Chikungunya | Malaria |
|---|---|---|
| Cause | Chikungunya virus (RNA) | Plasmodium protozoa |
| Vector | Aedes mosquito | Female Anopheles mosquito |
| Fever pattern | Continuous, high | Periodic (every 3rd or 4th day) |
| Key symptom | Severe joint pain (arthropathy) | Cold-hot-sweating paroxysm |
| Treatment | Supportive (no specific drug) | ACT for falciparum |
| Prevention | Vector control, no vaccine | IRS, ITNs, ACT, vaccine (RTS,S) |
| Deaths | None | Yes (especially P. falciparum) |
| Season | Rainy season | Rainy season |
| Programme | NVBDCP | NVBDCP |
| Topic | Memory Code |
|---|---|
| Chikungunya | CHIK - Contorted name, High fever, Insect=Aedes, Knees/joints |
| Malaria stages | CHS - Cold โ Hot โ Sweating |
| Malaria treatment | ACT - Artemisinin-based Combination Therapy |
| Malaria species | FVMO - Falciparum (dangerous), Vivax (common India), Malariae, Ovale |
| Congenital causes | GEMS - Genetic, Environmental infection, Maternal disease, Substances |
| TORCH infections | TORCH - Toxoplasma, Other, Rubella, CMV, Herpes |
| Prenatal diagnosis | AUAC - AFP, Ultrasound, Amniocentesis, CVS |
Create a colorful PDF summary of these 3 topics for quick revision
~/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 & 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> & <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 & PREVENTION", HCELL)],
[Paragraph("โข <b>NO specific antiviral</b> โ supportive care only<br/>"
"โข Paracetamol / Diclofenac for fever + joint pain<br/>"
"โข <b>AVOID: Aspirin & 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 & 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 & 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/>"
" 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/>"
" (next pregnancy risk = 10x higher)<br/><br/>"
"<b>2. Avoid pregnancy in high-risk conditions:</b><br/>"
" โข Advanced maternal age (Down syndrome)<br/>"
" โข Consanguineous marriages<br/><br/>"
"<b>3. Identify & remove teratogens:</b><br/>"
" โข Avoid drugs in 1st trimester<br/>"
" โข <b>Folic acid</b> supplementation (prevents NTDs)<br/>"
" โข <b>Rubella vaccine</b> (routine immunization)<br/>"
" โข Avoid alcohol, X-rays, pesticides<br/>"
" โข 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&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 & 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)
mkdir -p /home/daytona/workspace/psm-topics && python3 /home/daytona/workspace/psm-topics/make_psm_pdf.py 2>&1
~/psm-topics/make_psm_pdf.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/psm-topics/make_psm_pdf.py'
python3 /home/daytona/workspace/psm-topics/make_psm_pdf.py 2>&1
ls -lh /home/daytona/workspace/psm-topics/PSM_3Topics_QuickRevision.pdf
PSM 3Topics QuickRevision
PDF Document ยท PDF
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
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."
| Fact | Data |
|---|---|
| Countries at risk | 47 countries in Africa and Latin America |
| Population at risk | >900 million people |
| Africa at risk | 508 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 |
| Asia | Disease never reported BUT region is at risk |
| Feature | Details |
|---|---|
| Causative agent | Flavivirus fibricus โ a Group B arbovirus (member of Togavirus family) |
| Also related to | West Nile virus, Dengue (shares group-specific antigens) |
| Reservoir of infection | Forest/Jungle: Monkeys + forest mosquitoes |
| Urban: Man (subclinical + clinical cases) + Aedes aegypti mosquitoes | |
| Period of communicability | In 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 feature | Transovarian transmission occurs in mosquitoes in adverse conditions (dry season) |
| Feature | Details |
|---|---|
| Age & Sex | All ages and both sexes susceptible (if no immunity) |
| Occupation | Wood cutters, hunters, forest workers at HIGH RISK (jungle YF) |
| Immunity | One attack = LIFELONG immunity; second attacks are UNKNOWN |
| Infants born to immune mothers carry antibodies for up to 6 months |
| Factor | Requirement |
|---|---|
| Temperature | โฅ24ยฐC required for virus multiplication inside the mosquito |
| Humidity | Relative humidity >60% needed for mosquitoes to live long enough |
| Urbanization | Expanding cities + deforestation bring humans into jungle cycles |
| Travel | Increasing international travel spreads virus from endemic to receptive areas |
| Cycle | Also called | Where | Who | Vector |
|---|---|---|---|---|
| 1. Jungle / Sylvatic | Forest YF | Tropical rainforests | Monkeys โ Humans (mostly young men/loggers) | Wild mosquitoes (forest species) |
| 2. Intermediate | Savannah YF | Humid/semi-humid Africa | Monkeys + Humans in villages | Semi-domestic mosquitoes (breed in wild AND around homes) |
| 3. Urban | Urban YF | Densely populated cities | Human โ Human | Aedes 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
"Rapid immunization of the population at risk is the most effective control strategy for yellow fever."
| Feature | Details |
|---|---|
| Vaccine name | 17D vaccine (the approved vaccine for international use) |
| Type | Live attenuated vaccine (from non-virulent 17D strain) |
| Prepared in | Chick embryo (grown) โ then freeze-dried (lyophilized) |
| Dose | 0.5 ml, subcutaneous, at the deltoid insertion |
| Age | Single dose, irrespective of age |
| Immunity onset | Begins on 7th day after vaccination |
| Duration of immunity | Lifelong (previously 10 years โ changed in 2016) |
| Storage | +5ยฐC to โ30ยฐC (preferably below 0ยฐC); heat sensitive! |
| Reconstituted vaccine | Keep on ice, away from sunlight; discard if not used within 30 minutes |
Cholera vaccine and Yellow Fever vaccine given together (or within 3 weeks) interfere with each other โ give them at least 3 weeks apart!
| Test | Details |
|---|---|
| Serology | IgM and IgG antibody detection (ELISA) โ after day 5 |
| RT-PCR | Detects viral RNA โ within first 5 days (acute phase) |
| Virus isolation | From blood in first 4 days |
| WHO recommendation | Every 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
| Thing to remember | Trick |
|---|---|
| Causative agent | Flavivirus Fibricus = "Double F" |
| 3 cycles of transmission | J-I-U = Jungle โ Intermediate โ Urban |
| Vaccine name | 17D โ "17 Days? No โ 17th strain! Immunity in 7 days" |
| Vaccine validity | Was 10 years โ now LIFETIME (since 2016) |
| Quarantine period | 6 days (same as incubation period max) |
| Death timing | Day 5-10 of illness |
| CFR | Up to 80% severe cases |
| Aedes aegypti index | Must be <1% in seaports/towns |
| 400 metres | Airport/seaport vector-free zone |
| "Receptive area" | India = has vector + climate but no virus |
| Reconstituted vaccine | Discard after 30 minutes |
| Feature | Yellow Fever |
|---|---|
| Causative agent | Flavivirus fibricus (Group B arbovirus, Togavirus) |
| Reservoir | Monkeys (jungle), Man (urban) |
| Vector | Culicine mosquitoes (jungle); Aedes aegypti (urban) |
| Incubation | 3-6 days (IHR: 6 days) |
| Key symptoms | Fever โ Jaundice โ Black vomit โ Kidney failure โ Death |
| CFR | Up to 80% (severe) |
| Death | Day 5-10 of illness |
| Treatment | Supportive only, no antiviral |
| 3 transmission cycles | Jungle โ Intermediate โ Urban |
| Vaccine | 17D (live attenuated, 0.5ml SC, immunity day 7, LIFETIME) |
| Vaccine contraindications | <9 months, pregnant, egg allergy, immunodeficient |
| India status | RECEPTIVE AREA (has all conditions, no virus yet) |
| Quarantine | 6 days (mosquito-proof ward) |
| Certificate validity | LIFETIME (since 11 July 2016) |
| Aedes index | Must be <1% at seaports/towns |
| Airport vector-free zone | 400 metres around perimeter |
| EYE Strategy | WHO + UNICEF + GAVI (3 objectives: protect, prevent, contain) |
| Programme | IHR (WHO) + NVBDCP (India) |
Create a colorful PDF summary of Yellow Fever for quick revision
~/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 & 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/>'
' 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 & 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 & 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/>'
' โข <b>Jaundice</b> (gives disease its name โ "Yellow" Fever)<br/>'
' โข <b>"Black Vomit"</b> = vomiting of digested blood (HALLMARK!)<br/>'
' โข Epistaxis (nosebleed), Melena (blood in stool)<br/>'
' โข <b>Albuminuria / Anuria</b> (kidney failure)<br/>'
' โข 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><9 months</b> routine; <b><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 & 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><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 & 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 <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 >> 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 & 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)
python3 /home/daytona/workspace/psm-topics/make_yellow_fever_pdf.py 2>&1
ls -lh /home/daytona/workspace/psm-topics/YellowFever_QuickRevision.pdf
YellowFever QuickRevision
PDF Document ยท PDF
| Section | Color | Content |
|---|---|---|
| ๐ก Cover | Deep Orange | Title + Park's PSM source |
| ๐ Problem Statement | Orange | 4 stat boxes: 47 countries, 900M at risk, 84โ170K cases, 60K deaths |
| ๐ฌ Epidemiological Triad | Blue/Teal | Agent factors, Host factors, Environmental factors |
| ๐ค Clinical Features | Red | Incubation + 3 stages (Infection โ Remission โ Intoxication) |
| ๐ 3 Transmission Cycles | Green | Jungle / Intermediate / Urban table (color-coded rows) |
| ๐ 17D Vaccine | Purple | Full details + contraindications + Cholera interaction warning |
| ๐ฎ๐ณ India + IHR | Blue | India = Receptive Area + all IHR measures |
| ๐ฆ Vector Control + Treatment | Green/Orange | Aedes control + supportive care only |
| ๐ฏ EYE Strategy | Teal | WHO+UNICEF+GAVI, 3 objectives, 5 competencies |
| โก Quick Reference Table | Navy | All 25 key facts in one table |
| โ Exam Q&A | Red | 12 most likely exam questions with answers |
| ๐ง Memory Footer | 5-color strip | Key mnemonics for last-minute revision |
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
| Term | Simple meaning | Technical meaning |
|---|---|---|
| Vaccination | Getting a shot / taking a vaccine | The act of administering a vaccine into the body |
| Immunization | Becoming protected/immune | The 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).
"An immuno-biological substance designed to produce specific protection against a given disease. It stimulates the production of protective antibody and other immune mechanisms."
| Feature | Vaccination | Immunization |
|---|---|---|
| Meaning | Act of giving a vaccine | Process of becoming immune |
| Nature | Physical act | Biological process |
| Who does it | Healthcare worker | The body's immune system |
| Always leads to protection? | Not necessarily | Yes, by definition |
| Can happen naturally? | No | Yes (through natural infection) |
| Example | Giving BCG injection to a newborn | Newborn developing immunity against TB |
| Broader term | Narrower | Broader |
Exam tip: Immunization is the broader term โ it includes vaccination as one of its methods. Vaccination is just one WAY to achieve immunization.
Park's: "Active immunization is one of the most powerful and cost-effective weapons of modern medicine."
| Feature | Details |
|---|---|
| How | Give vaccine โ body produces antibodies |
| Who does the work | The person's OWN immune system |
| Onset of protection | Delayed (takes days to weeks) |
| Duration | Long-lasting / lifelong |
| Examples | BCG, OPV, DPT, Measles, Hepatitis B vaccine |
| Subtype | How | Example |
|---|---|---|
| Artificially acquired | Through vaccination | BCG, OPV, measles vaccine |
| Naturally acquired | Through actual infection | Getting measles โ lifelong immunity |
| Feature | Details |
|---|---|
| How | Give antibodies/immunoglobulins from outside |
| Who does the work | Someone else's antibodies given to you |
| Onset of protection | Immediate |
| Duration | Short (1โ6 weeks) |
| Examples | Anti-tetanus serum (ATS), Anti-rabies immunoglobulin, Normal human immunoglobulin |
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)
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)
| Feature | Killed Vaccine | Live Vaccine |
|---|---|---|
| Number of doses | Multiple | Single |
| Need for adjuvant | Yes | No |
| Duration of immunity | Shorter | Longer |
| Effectiveness | Lower | Greater |
| Immunoglobulins | IgG only | IgA + IgG |
| Mucosal immunity | Poor | Yes |
| Cell-mediated immunity | Poor | Yes |
| Reversion to virulence | No | Possible |
| Stability at room temp | High | Low |
| Safe in pregnancy | Yes | Contraindicated |
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."
| Disease | Threshold 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)
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."
| Vaccine type | Temperature | Example |
|---|---|---|
| Most live vaccines | +2ยฐC to +8ยฐC | BCG, OPV, MMR |
| Freeze-dried vaccines | Can be frozen | BCG, measles |
| Vaccines SENSITIVE to freezing | Do NOT freeze | Hep B, DPT, TT, IPV, Cholera |
| Yellow Fever (17D) | +5ยฐC to โ30ยฐC | YF vaccine |
| Age | Vaccine |
|---|---|
| At birth | BCG, OPV-0, Hepatitis B (birth dose) |
| 6 weeks | OPV-1, Pentavalent-1 (DPT+HepB+Hib), IPV-1 |
| 10 weeks | OPV-2, Pentavalent-2, IPV-2 |
| 14 weeks | OPV-3, Pentavalent-3, IPV-3 |
| 9 months | Measles/MR-1 |
| 16-24 months | OPV booster, DPT booster, MR-2 |
| 5 years | DPT booster |
| 10 years, 16 years | TT/Td |
| Pregnant women | TT (2 doses 1 month apart, or booster) |
| Year | Vaccine |
|---|---|
| 1798 | Smallpox vaccine (Edward Jenner โ first ever vaccine) |
| 1885 | Rabies vaccine |
| 1923 | Diphtheria toxoid |
| 1927 | BCG (tuberculosis) + Tetanus toxoid |
| 1935 | Yellow fever vaccine |
| 1955 | IPV (Salk polio vaccine) |
| 1963 | Measles vaccine |
| 1995 | Varicella + Hepatitis A vaccines |
| 2000 | Pneumococcal conjugate vaccine |
| Topic | Memory Trick |
|---|---|
| Vaccination vs Immunization | Vaccination = Vehicle (transport); Immunization = Immunity achieved |
| Active vs Passive | Active = Antibodies made by yourself; Passive = Pre-made antibodies given to you |
| Live vaccine examples | BCG-MOVR = BCG, Measles, OPV, Varicella, Rotavirus (+ YF, MMR) |
| Killed vaccine examples | DIT-HCI = DPT, IPV, Typhoid, Hepatitis A, Cholera, Influenza |
| 6 rights of cold chain | VQP-TCC = Vaccine, Quantity, Place, Time, Condition, Cost |
| Live vaccine rule | Same time OR โฅ3 weeks apart (never in between) |
| Passive immunity duration | 1โ6 weeks only |
| UIP launch date | November 19, 1985 (India) |
| EPI original 6 diseases | DPMT-WP = Diphtheria, Pertussis (whooping cough), Measles, Tetanus, TB (BCG), Polio |
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
Create a colorful PDF for Immunization vs Vaccination quick revision
~/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 & 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/>'
' โข <b>Naturally acquired</b> โ through actual infection<br/>'
' โข <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/>'
' 1. Normal human immunoglobulin<br/>'
' 2. Specific (hyperimmune) human immunoglobulin<br/>'
' 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 & 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 & 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)
python3 /home/daytona/workspace/psm-topics/make_immunization_pdf.py 2>&1
ls -lh /home/daytona/workspace/psm-topics/Immunization_vs_Vaccination.pdf
Immunization vs Vaccination
PDF Document ยท PDF
| Section | Color | Content |
|---|---|---|
| ๐ต Cover | Navy/Blue | Title + source |
| ๐ Definitions | Blue | Vaccine vs Vaccination vs Immunization (3-column table) |
| โ Key Difference | Blue/Teal | 7-row comparison: Vaccination vs Immunization |
| ๐ Types of Immunization | Teal | Active vs Passive side by side + Active vs Passive comparison table + warning box |
| ๐งช Types of Vaccines | Orange | 4 types table (Live, Killed, Toxoids, Recombinant) + Park's Live vs Killed Table 30 (13 features!) |
| ๐ Herd Immunity | Green | Definition + elements + threshold + disease-wise percentages |
| โ Cold Chain | Cyan | Definition + 6 Rights + temperature table (what to freeze / not freeze) |
| ๐ฅ UIP & EPI | Pink | EPI (1974) vs UIP (1985) + Full National Immunization Schedule table |
| โ Exam Q&A | Red | 12 most likely questions with answers (color-coded) |
| ๐ง Footer strip | 6 colors | One-line memory codes for each topic |