Please answer all spotting in this pdf about community medicine

Reading File
Running Command

python -m markitdown "/home/daytona/workspace/attachments/d244996a-f360-4e40-988…

Running Command

cd /home/daytona/workspace/attachments/d244996a-f360-4e40-9886-94579b7974cd/ && …

Running Command

pip install python-pptx --quiet 2>&1 | tail -3

Running Command

cd "/home/daytona/workspace/attachments/d244996a-f360-4e40-9886-94579b7974cd/" &…

Running Command

cd "/home/daytona/workspace/attachments/d244996a-f360-4e40-9886-94579b7974cd/" &…

Reading File
analyse_media
analyse_media
Running Command

# Convert images to base64 and serve them, or check if they can be read as file…

Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Running Command

python3 -c " from PIL import Image img = Image.open('/home/daytona/workspace/spo…

Running Command

pip install Pillow --quiet 2>&1 | tail -2 && python3 -c " from PIL import Image …

Running Command

python3 -c " from PIL import Image img = Image.open('/home/daytona/workspace/spo…

Reading File
Now I have identified all images. I also need to check Slide 3 (SPOT 1) which mentions a contraceptive specimen but has no image listed - it's likely an OCP or condom based on context. Let me also check Slide 9 which has the RBSK logo. Now I have everything I need to write comprehensive answers. Let me compile the full answers:

SPOTTING ANSWERS - Community Medicine

Exam: 10 Spots | 50 Marks | 30 Minutes

SPOT 1 - Oral Contraceptive Pill (OCP)

(No image in slide - specimen is likely an OCP pack/condom based on context)
Assumed specimen: Combined Oral Contraceptive Pill (COCP)
1. Mechanism of Action:
  • Primary: Inhibits ovulation by suppressing LH surge (estrogen + progestin act on hypothalamo-pituitary axis)
  • Secondary: Thickens cervical mucus (prevents sperm penetration), causes endometrial atrophy (prevents implantation), and alters tubal motility
2. Dosage:
  • Combined OCP: 1 tablet daily for 21 days, starting on day 1-5 of menstrual cycle, followed by 7 pill-free days (or 28-day pack with 7 placebo tablets)
  • Progestin-only pill (Mini-pill): 1 tablet daily continuously, at the same time each day
3. Eligible Candidate:
  • Healthy women of reproductive age seeking reversible contraception
  • Women who desire regular predictable cycles
  • Women with dysmenorrhoea, menorrhagia, endometriosis, PCOS (therapeutic use)
  • Contraindicated in: Smokers >35 years, hypertension, thromboembolic disorders, breast cancer, liver disease, undiagnosed vaginal bleeding, pregnancy
4. Advantages and Disadvantages:
  • Advantage: Highly effective (>99% with perfect use); also provides non-contraceptive benefits (reduces acne, dysmenorrhoea, ovarian cysts)
  • Disadvantage: Does not protect against STIs/HIV; user-dependent (requires daily compliance); risk of thromboembolism (particularly with estrogen)
5. Instructions to Use:
  1. Start on Day 1 of menstrual cycle (or Day 5 with additional barrier method for 7 days)
  2. Take 1 pill at the same time daily for 21 days
  3. Take a 7-day break (or use placebo pills in a 28-pill pack)
  4. If a pill is missed (<12 hrs late): take it immediately and continue as usual
  5. If a pill is missed (>12 hrs or 2+ pills missed): take the last missed pill immediately, use barrier method for 7 days
  6. Report any warning signs - severe headache, chest pain, visual disturbances, leg pain (ACHES)

SPOT 2 - Aedes aegypti Mosquito

(The image shows a mosquito with characteristic black-and-white striped body and legs - identifying it as Aedes aegypti)
1. Identification: Aedes aegypti (Tiger mosquito)
2. Identifying Features:
  • Lyre-shaped (silver-white) markings on the thorax (scutum) - resembling a lyre or violin
  • Black and white banded legs (alternating black and white rings on tarsal segments)
  • Small, dark mosquito with white scaly patches on abdomen
  • Breeds in clean, stagnant water in artificial containers (flower pots, tyres, coolers)
3. Diseases Transmitted:
  1. Dengue fever (Dengue virus - Flavivirus, 4 serotypes)
  2. Chikungunya (Alphavirus)
  3. Yellow Fever (Flavivirus)
  4. Zika Virus disease (Flavivirus)
4. Control Measures (4):
  1. Source reduction - elimination of breeding sites (draining stagnant water, covering water containers, removing discarded tyres and containers)
  2. Larvicidal measures - use of temephos (Abate) in water containers; biological control with Bacillus thuringiensis israelensis (Bti) or larvivorous fish (Gambusia, Lebistes)
  3. Adult mosquito control - indoor residual spraying (IRS) with insecticides (malathion, pyrethrum); space spraying/fogging during outbreaks
  4. Personal protective measures - use of mosquito nets (especially during day), repellents (DEET), wearing full-sleeved clothes; screening of windows and doors

SPOT 3 - Horrock's Apparatus (OT Test)

(The image shows a metal box with cups/containers and reagent bottles - Horrock's Apparatus for chlorine testing of water)
1. Identification and Use:
  • Specimen: Horrock's Apparatus (also called the Comparator box / OT test kit)
  • Use: Used to test the residual chlorine content of water (and thereby the adequacy of chlorination)
  • It uses Ortho-tolidine (OT) reagent - a pale yellow solution that turns progressively yellow to blue depending on chlorine concentration
2. Indicator of this Test:
  • Ortho-tolidine (OT) is the indicator/reagent
  • It produces a yellow colour in the presence of free chlorine (OT test measures free available chlorine)
  • Some sources describe the combined test using OT + Arsenite to differentiate free vs combined chlorine
3. Amount of Bleaching Powder if 3rd Cup Shows Blue:
  • The Horrock's apparatus has 6 cups numbered 1-6
  • Each cup contains a progressively larger amount of bleaching powder (No. 1 = lowest, No. 6 = highest)
  • If the 3rd cup shows blue colour (positive): Add 2.5 grams of bleaching powder per 1000 litres (1 kilolitre) of water
  • (The cup that just turns blue indicates the minimum amount of bleaching powder needed)
Standard rule: The amount of bleaching powder needed = the cup number × a fixed quantity. Cup 3 = approximately 2.5 g/1000 L
4. Residual Chlorine Required for Disinfection:
  • 0.5 mg/L (0.5 ppm) residual chlorine after 30 minutes contact time (for piped water supply)
  • At point of use: 0.2 mg/L minimum acceptable residual chlorine
  • For emergency/field conditions: 0.5 ppm after 1 hour contact
5. Two Other Methods of Water Purification:
  1. Boiling - most reliable household method; kills all pathogens; boil for at least 1 minute (5 minutes at high altitude)
  2. Sand filtration - Slow Sand Filter (SSF) removes 99% bacteria through biological action (Schmutzdecke layer); Rapid Sand Filter (RSF) used at large scale after coagulation-flocculation (Other acceptable answers: UV irradiation, iodine tablets, Solar disinfection - SODIS, reverse osmosis)

SPOT 4 - Vaccine Carrier Box

(The image shows a blue insulated vaccine carrier box with "STOP! DO YOU NEED TO OPEN IT?" label)
1. Identification: Vaccine Carrier (Cold Box/Vaccine Carrier used in immunization programs)
  • Specifically, this appears to be an ILR (Ice-Lined Refrigerator) carrier or standard vaccine cold box used to transport vaccines at 2-8°C
2. Number of Ice Packs and Conditioning:
  • 4 ice packs are needed to carry vaccines in a standard vaccine carrier
  • Conditioning of ice packs: Ice packs are conditioned before use to prevent vaccines from freezing:
    • Remove ice packs from freezer and allow them to stand at room temperature until water droplets appear on the surface (sweat/condensation forms)
    • This ensures the temperature inside the carrier stays above 0°C (prevents freezing of freeze-sensitive vaccines like DPT, Hepatitis B, TT)
    • Conditioning time: approximately 10-15 minutes at room temperature
    • Shake the ice pack - if you hear sloshing, it is conditioned
3. Reverse Cold Chain:
  • Definition: The system of safely transporting biological specimens (blood samples, vaccines, stool samples) from the field/peripheral level back to the laboratory or higher facility
  • It is the movement of materials from the periphery to the centre (reverse of the usual cold chain direction)
  • Examples: transport of blood samples for HIV testing, stool samples for AFP surveillance, unused vaccines returned to higher level
4. Difference between "Complete Immunization" and "Full Immunization":
FeatureComplete ImmunizationFull Immunization
DefinitionChild has received all vaccines due by 2 years of age as per national scheduleChild has received BCG + 3 doses DPT + 3 doses OPV + Measles by 12 months of age
AgeBy 2 yearsBy 1 year (12 months)
ContextBroader definition used in newer programsUsed in WHO/NFHS surveys and coverage assessments
Vaccines includedAll vaccines in UIP scheduleOnly the 6 basic antigens
5. AEFI:
  • Full form: Adverse Event Following Immunization
  • Definition: Any untoward medical occurrence that follows immunization and which does not necessarily have a causal relationship with the usage of the vaccine
  • Categories: Vaccine-induced reaction, Vaccine-potentiated reaction, Programmatic error, Injection reaction, Coincidental
  • Reporting: All serious AEFIs must be reported to the Medical Officer within 24 hours

SPOT 5 - Yellow Biohazard Bag (BMW Management)

(The image shows a yellow plastic bag labeled "BIOHAZARD INFECTIOUS WASTE" with the biohazard symbol)
1. Type of Waste Collected in Yellow Bag: As per BMW Management Rules 2016 (India), the Yellow bag collects:
  • Human anatomical waste (body parts, organs, tissues)
  • Animal anatomical waste
  • Soiled waste (items contaminated with blood/body fluids - dressings, bandages, plaster casts, linen)
  • Expired/discarded medicines (except cytotoxic)
  • Chemical waste/discarded linen/mattresses/beddings
  • Microbiology/biotechnology waste (except sharps)
  • Blood bags/IV fluids (outdated, unused)
2. Method of Disposal for Yellow Bag:
  • Incineration - in a dedicated incinerator at Common Biomedical Waste Treatment Facilities (CBWTF)
  • Deep burial is an alternative for anatomical waste in areas without CBWTF access
3. Steps of Biomedical Waste Management (2 marks):
  1. Segregation at source - Separate waste into correct colour-coded bags/containers at the point of generation (bedside, OT, lab)
  2. Collection - Collect waste in appropriate colour-coded bags; never overfill (max 3/4 full); seal bags
  3. Labelling - Each bag/container must be labelled with type of waste, date, and source
  4. Transportation within facility - Use dedicated trolleys/carts; separate routes and timing; avoid passenger lifts
  5. Storage - Temporary storage in designated areas (max 48 hours); separate storage for each category
  6. Final treatment and disposal:
    • Yellow bag → Incineration
    • Red bag → Autoclave/Microwave → Shredding → Landfill
    • White/translucent (sharps) → Autoclave + Shredding / Encapsulation
    • Blue (glassware) → Autoclave + Shredding
4. Two PPE for BMW Handlers:
  1. Heavy-duty rubber/nitrile gloves (thick, puncture-resistant - not surgical gloves)
  2. Gumboots (waterproof boots) / or Apron (impermeable) (Other acceptable: face mask, safety goggles, face shield)

SPOT 6 - RTI/STI Management

(No image in this slide)
1. Syndromic Approach in RTI/STI Management:
  • Definition: A clinical management approach where a patient presenting with a syndrome (a group of consistent symptoms and signs) is treated for the most common causative organisms responsible for that syndrome - without waiting for laboratory confirmation
  • Based on clinical algorithms/flowcharts
  • Example: A woman presenting with vaginal discharge is treated for both gonorrhoea and chlamydia simultaneously
  • Advantages: Immediate treatment, no need for lab, reduces transmission, practical in resource-limited settings
  • Disadvantage: Over-treatment, does not address the specific pathogen, risk of antimicrobial resistance
2. Number of Coloured Kits in RTI/STI Kits:
  • There are 6 colour-coded kits (Kit 1 to Kit 6) under India's RTI/STI management programme:
    • Kit 1 (Yellow): Vaginal discharge
    • Kit 2 (Green): Urethral discharge in male
    • Kit 3 (Blue): Genital ulcer disease
    • Kit 4 (White): Lower abdominal pain (PID) in female
    • Kit 5 (Red): Inguinal bubo
    • Kit 6 (Black): Scrotal swelling/epididymo-orchitis
3. Universal Precaution While Examining HIV Patient:
  • Standard (Universal) Precautions apply to ALL patients regardless of HIV status:
    • Wear gloves when in contact with blood, body fluids, mucous membranes, or non-intact skin
    • Wear mask + goggles/face shield when splashing of blood/body fluids is likely
    • Wear gown/apron when clothing may be soiled
    • Safe handling and disposal of sharps - never recap needles, use puncture-proof sharps containers
    • Hand hygiene before and after patient contact (wash with soap and water or use alcohol-based hand rub)
    • Proper disposal of all contaminated material in yellow bags
    • Post-exposure prophylaxis (PEP) if accidental exposure occurs
4. HIV Status Disclosure - Ethical Dilemma:
  • Answer: Yes, the wife should be informed (after following due protocol)
  • Reasoning:
    • The duty to protect an identifiable third party (wife) from serious preventable harm (HIV infection) overrides patient confidentiality in this specific scenario
    • This is known as the "duty to warn" principle (Tarasoff principle applied to public health)
    • Protocol to follow:
      1. Strongly counsel the patient to disclose to his wife himself (partner notification counselling)
      2. If the patient refuses after repeated counselling, the healthcare provider has an ethical and legal obligation to notify the spouse to protect her from HIV
      3. Document all counselling sessions
    • Legal support in India: National AIDS Control Programme guidelines and Indian Medical Council (Professional Conduct) Regulations support partner notification
    • The principle of non-maleficence (do no harm) to the uninformed wife takes precedence in this case

SPOT 7 - RBSK Logo

(No image needed - Slide mentions "Identify the given logo" - RBSK logo)
1. Logo Identified: RBSK - Rashtriya Bal Swasthya Karyakram logo
2. What is RBSK?
  • Rashtriya Bal Swasthya Karyakram (RBSK) is a national child health screening and early intervention programme launched under the National Health Mission (NHM) in 2013
  • It aims to provide early identification and free treatment of children (0-18 years) for selected health conditions
  • Conducted by Mobile Health Teams (MHTs) - each team has 1 AYUSH doctor + 1 ANMA/Female health worker
3. The 4 D's in Children (under RBSK):
  1. Defects at birth - congenital conditions (congenital heart disease, cleft lip/palate, neural tube defects, Down's syndrome, developmental dysplasia of hip, congenital cataract, congenital deafness, club foot)
  2. Deficiencies - nutritional deficiencies (anaemia, Vit A deficiency, Vit D deficiency, iodine deficiency)
  3. Diseases - childhood diseases (acute otitis media, rheumatic heart disease, reactive airway disease, skin conditions, convulsive disorders)
  4. Developmental delays including disabilities - vision impairment, hearing impairment, neuromotor impairment, cognitive impairment, autism spectrum disorder, behavioural disorders, learning disabilities
4. Beneficiaries of RBSK:
  • Children from 0 to 18 years of age
  • Specifically targets:
    • Neonates (0-6 weeks) - through newborn care corners in delivery points
    • Children (6 weeks to 6 years) - at Anganwadi centres
    • School-age children (6-18 years) - at government and government-aided schools
5. Components of RBSK Programme:
  1. Screening - systematic health screening at community level by Mobile Health Teams
  2. Early identification - identification of children with 4D conditions
  3. Referral - referral to District Early Intervention Centres (DEICs) for comprehensive management
  4. Management and Rehabilitation - free treatment, surgery, corrective services through DEIC and empanelled hospitals
  5. Newborn Screening - for conditions like congenital hypothyroidism, phenylketonuria (PKU), sickle cell disease, glucose-6-phosphate dehydrogenase deficiency

SPOT 8 - Abhayrab (Purified Vero Cell Rabies Vaccine)

(The image shows "Abhayrab - Rabies Vaccine, Human Cell Culture IP - Purified Vero Cell Rabies Vaccine - 1 dose for human use")
1. Dose of Vaccine:
  • 1 mL per dose (reconstituted)
  • Intradermal route: 0.1 mL per site (ID protocol)
2. Route of Administration:
  • Intramuscular (IM): Deltoid muscle (anterolateral thigh in young children)
  • Intradermal (ID): Intradermal route is also approved (more economical - uses less vaccine)
  • Do NOT administer in gluteal region (poor immunogenicity)
3. Schedule for Rabies Vaccine (Post-Exposure Prophylaxis):
Essen Protocol (IM route - 5 doses):
  • Day 0, Day 3, Day 7, Day 14, Day 28
Zagreb Protocol (IM route - 4 doses):
  • Day 0 (2 doses - 1 in each deltoid), Day 7, Day 21
Intradermal (ID) Protocol (Updated Regimen - 2-site):
  • Day 0, Day 3, Day 7, Day 28 (0.1 mL ID at 2 sites on each visit)
Pre-exposure Prophylaxis (PrEP):
  • Day 0, Day 7, Day 28 (IM or ID)
4. Categories of Animal Bite:
CategoryDescriptionManagement
Category ITouching/feeding animals, licks on intact skinWash; no vaccine needed
Category IIMinor scratches/abrasions without bleeding, nibbling of uncovered skinWound care + vaccine
Category IIISingle/multiple transdermal bites, contamination of mucous membranes/open wounds with saliva, licks on broken skin, exposure to bat scratchesWound care + vaccine + HRIG
5. Dose of Human Rabies Immunoglobulin (HRIG):
  • 20 IU/kg body weight (for Category III bites)
  • Infiltrate as much as possible into and around the wound; remaining amount given IM at a site distant from vaccine
  • Given on Day 0 only (along with first dose of vaccine)
  • (Equine Rabies Immunoglobulin - ERIG: 40 IU/kg body weight)

SPOT 9 - DEIC / RBSK (Overlap with Spot 7)

1. Full Form of DEIC: DEIC = District Early Intervention Centre
  • Established at District Hospitals under RBSK
  • Provides free comprehensive assessment, management, and rehabilitation for children with 4D conditions referred from MHTs
2. The 4 D's of RBSK: (Same as Spot 7)
  1. Defects at birth
  2. Deficiencies
  3. Diseases
  4. Developmental delays including disabilities
3. Any 3 Points of the 5×5 Matrix (under RBSK): The 5×5 matrix refers to 5 age groups × 5 domains of screening:
5 Age Groups:
  1. 0 to 6 weeks (newborns)
  2. 6 weeks to 6 months
  3. 6 months to 1 year
  4. 1 year to 3 years
  5. 3 to 6 years (up to 18 years - school children)
5 Domains (conditions screened):
  1. Defects at birth
  2. Deficiencies
  3. Diseases
  4. Developmental delays
  5. Disabilities
3 specific points from the matrix:
  • Newborns (0-6 weeks) are screened for congenital conditions at delivery points/NRC
  • Children 6 weeks to 6 years are screened at Anganwadi centres by Mobile Health Teams
  • Children 6-18 years are screened at government schools twice a year
4. Beneficiaries of RBSK:
  • All children from birth to 18 years of age
  • Specifically: neonates at delivery points, children at Anganwadi centres, students at government and government-aided schools

SPOT 10 - Goitre (Iodine Deficiency Disorder)

(The image shows a woman with visible swelling at the front of the neck - classic goitre)
1. Disease Identified: Goitre (due to Iodine Deficiency Disorder - IDD)
2. National Programme:
  • National Iodine Deficiency Disorders Control Programme (NIDDCP)
  • Previously called the National Goitre Control Programme (NGCP), renamed in 1992
  • Main strategy: Universal Salt Iodization (USI) - iodization of all edible salt at 30 ppm (parts per million) at production level; minimum 15 ppm at consumption level
  • Surveys every 5 years to assess magnitude of IDD
3. Preventive Measures for Goitre/IDD:
  1. Universal Salt Iodization (USI) - use of iodized salt (most effective and sustainable measure)
  2. Iodized oil injections/capsules - used in severely deficient areas where salt iodization is not feasible (Lipiodol - iodized poppy seed oil IM; oral iodized oil capsules)
  3. Dietary diversification - include iodine-rich foods (seafood, sea fish, seaweed, dairy products)
  4. Avoid goitrogens - reduce intake of foods containing natural goitrogens (cabbage, turnips, cassava, soybean) especially in iodine-deficient areas
  5. Regular IDD surveys and monitoring - urinary iodine excretion (UIE) monitoring; goal: median UIE >100 µg/L
4. Food Fortification:
  • Definition: Addition of one or more essential nutrients to a food, whether or not it is normally contained in the food, for the purpose of preventing or correcting a demonstrated deficiency of one or more nutrients in the population or specific population groups
  • Two Examples:
    1. Iodized salt - addition of potassium iodate/iodide to common salt (prevents IDD/goitre)
    2. Fortified milk/cooking oil with Vitamin A and D (or iron-fortified flour/atta) - prevents Vitamin A deficiency and Vitamin D deficiency
5. FSSAI Stands For: FSSAI = Food Safety and Standards Authority of India
  • Established under the Food Safety and Standards Act, 2006
  • Headquartered in New Delhi
  • Responsible for regulating and supervising food safety in India
  • It sets standards for food articles and regulates their manufacture, storage, distribution, sale, and import

Summary Table of All Spots
SpotSpecimen/ImageTopic
1OCP packContraception - OCP
2Aedes aegypti mosquitoVector-borne disease / Entomology
3Horrock's ApparatusWater quality testing / Chlorination
4Vaccine carrier boxCold chain / UIP / AEFI
5Yellow biohazard bagBiomedical Waste Management
6(no image)RTI/STI Syndromic management
7RBSK logoRBSK programme
8Abhayrab (Rabies vaccine)Rabies / Animal bite management
9(DEIC)RBSK / DEIC / 5×5 matrix
10Goitre (neck swelling)IDD / NIDDCP / FSSAI

Create a study guide PDF with all spot answers formatted for exam revision

Reading File
Writing File

~/spotting_study_guide/generate_pdf.py

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


# ─── colour palette ───────────────────────────────────────────────────────────
DARK_BLUE   = colors.HexColor("#1A237E")   # title / spot headers
MID_BLUE    = colors.HexColor("#1565C0")   # question number bands
ACCENT_TEAL = colors.HexColor("#00838F")   # sub-headings
LIGHT_BG    = colors.HexColor("#E8EAF6")   # spot header background
VERY_LIGHT  = colors.HexColor("#F5F5F5")   # table row alt
ANSWER_BG   = colors.HexColor("#E3F2FD")   # answer area background tint
ORANGE      = colors.HexColor("#E65100")   # key-points / mnemonics
GREEN       = colors.HexColor("#1B5E20")   # important facts
WHITE       = colors.white
BLACK       = colors.HexColor("#212121")


# ─── page setup ───────────────────────────────────────────────────────────────
OUTPUT_PATH = "/home/daytona/workspace/spotting_study_guide/Community_Medicine_Spotting_Study_Guide.pdf"

doc = SimpleDocTemplate(
    OUTPUT_PATH,
    pagesize=A4,
    leftMargin=1.8*cm,
    rightMargin=1.8*cm,
    topMargin=2.0*cm,
    bottomMargin=2.0*cm,
    title="Community Medicine Spotting - Study Guide",
    author="Orris AI",
)

PAGE_W = A4[0] - 3.6*cm   # usable width


# ─── styles ───────────────────────────────────────────────────────────────────
base = getSampleStyleSheet()

def S(name, **kw):
    """Quick ParagraphStyle factory."""
    return ParagraphStyle(name, **kw)

COVER_TITLE = S("CoverTitle", fontName="Helvetica-Bold", fontSize=28,
                textColor=WHITE, alignment=TA_CENTER, spaceAfter=6)
COVER_SUB   = S("CoverSub",   fontName="Helvetica",      fontSize=14,
                textColor=colors.HexColor("#BBDEFB"), alignment=TA_CENTER, spaceAfter=4)
COVER_INFO  = S("CoverInfo",  fontName="Helvetica",      fontSize=11,
                textColor=colors.HexColor("#E3F2FD"), alignment=TA_CENTER, spaceAfter=3)

SPOT_TITLE  = S("SpotTitle",  fontName="Helvetica-Bold", fontSize=15,
                textColor=WHITE, alignment=TA_LEFT, leftIndent=6, spaceAfter=2)
SPECIMEN    = S("Specimen",   fontName="Helvetica-BoldOblique", fontSize=11,
                textColor=DARK_BLUE, spaceAfter=4, spaceBefore=2)
Q_LABEL     = S("QLabel",     fontName="Helvetica-Bold", fontSize=10,
                textColor=WHITE, spaceBefore=0, spaceAfter=0, leftIndent=4)
ANSWER_BODY = S("AnswerBody", fontName="Helvetica",      fontSize=9.5,
                textColor=BLACK, leading=14, spaceAfter=3, leftIndent=8, rightIndent=4)
ANSWER_BOLD = S("AnswerBold", fontName="Helvetica-Bold", fontSize=9.5,
                textColor=BLACK, leading=14, spaceAfter=2, leftIndent=8)
BULLET      = S("Bullet",     fontName="Helvetica",      fontSize=9.5,
                textColor=BLACK, leading=13, spaceAfter=1, leftIndent=16,
                firstLineIndent=-8)
KEY_POINT   = S("KeyPoint",   fontName="Helvetica-Bold", fontSize=9.5,
                textColor=ORANGE, leading=13, spaceAfter=2, leftIndent=8)
IMPORTANT   = S("Important",  fontName="Helvetica-Bold", fontSize=9.5,
                textColor=GREEN, leading=13, spaceAfter=2, leftIndent=8)
SECTION_HDR = S("SectionHdr", fontName="Helvetica-Bold", fontSize=10,
                textColor=ACCENT_TEAL, spaceBefore=6, spaceAfter=2, leftIndent=8)
TOC_ITEM    = S("TocItem",    fontName="Helvetica",      fontSize=10,
                textColor=BLACK, leading=16, leftIndent=12)
TOC_TITLE   = S("TocTitle",   fontName="Helvetica-Bold", fontSize=13,
                textColor=DARK_BLUE, spaceAfter=8, alignment=TA_CENTER)
FOOTER_NOTE = S("FooterNote", fontName="Helvetica-Oblique", fontSize=8,
                textColor=colors.grey, alignment=TA_CENTER)


# ─── helpers ──────────────────────────────────────────────────────────────────
def hr(color=DARK_BLUE, thickness=0.8):
    return HRFlowable(width="100%", thickness=thickness, color=color, spaceAfter=4, spaceBefore=4)


def spot_header(number, title, specimen_text):
    """Coloured banner for each spot."""
    data = [[Paragraph(f"SPOT {number}  |  {title}", SPOT_TITLE)]]
    t = Table(data, colWidths=[PAGE_W])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), DARK_BLUE),
        ("TOPPADDING",    (0,0), (-1,-1), 7),
        ("BOTTOMPADDING", (0,0), (-1,-1), 7),
        ("LEFTPADDING",   (0,0), (-1,-1), 10),
        ("RIGHTPADDING",  (0,0), (-1,-1), 8),
        ("ROUNDEDCORNERS", [5]),
    ]))
    elems = [t]
    if specimen_text:
        elems.append(Paragraph(f"&#9654; Specimen: <b>{specimen_text}</b>", SPECIMEN))
    return elems


def q_row(q_num, question_text, answer_lines):
    """
    Renders one Q&A block as a mini-table with coloured question band
    and white answer area.
    """
    q_para = Paragraph(f"Q{q_num}. {question_text}", Q_LABEL)
    ans_paras = []
    for line in answer_lines:
        style = ANSWER_BODY
        tag   = line[:2] if len(line) > 2 else ""
        if tag == "**":
            style = ANSWER_BOLD
            line  = line[2:].strip()
        elif tag == ">>":
            style = KEY_POINT
            line  = "&#9733; " + line[2:].strip()
        elif tag == "!!":
            style = IMPORTANT
            line  = "&#10004; " + line[2:].strip()
        elif tag == "- ":
            style = BULLET
            line  = "&#8226;  " + line[2:].strip()
        ans_paras.append(Paragraph(line, style))

    q_cell  = [q_para]
    ans_cell = ans_paras if ans_paras else [Paragraph(" ", ANSWER_BODY)]

    t = Table(
        [[q_cell], [ans_cell]],
        colWidths=[PAGE_W],
    )
    t.setStyle(TableStyle([
        # question row
        ("BACKGROUND",    (0,0), (-1,0), MID_BLUE),
        ("TOPPADDING",    (0,0), (-1,0), 5),
        ("BOTTOMPADDING", (0,0), (-1,0), 5),
        ("LEFTPADDING",   (0,0), (-1,0), 8),
        # answer row
        ("BACKGROUND",    (0,1), (-1,1), ANSWER_BG),
        ("TOPPADDING",    (0,1), (-1,1), 5),
        ("BOTTOMPADDING", (0,1), (-1,1), 6),
        ("LEFTPADDING",   (0,1), (-1,1), 4),
        ("RIGHTPADDING",  (0,1), (-1,-1), 6),
        ("BOX",           (0,0), (-1,-1), 0.5, colors.HexColor("#90CAF9")),
        ("LINEBELOW",     (0,0), (-1,0), 0.3, WHITE),
    ]))
    return [t, Spacer(1, 5)]


def simple_table(headers, rows, col_widths=None):
    """Generic data table with styled header row."""
    if col_widths is None:
        col_widths = [PAGE_W / len(headers)] * len(headers)
    header_row = [Paragraph(f"<b>{h}</b>", S("TH", fontName="Helvetica-Bold",
                  fontSize=9, textColor=WHITE, alignment=TA_CENTER)) for h in headers]
    data = [header_row]
    for i, row in enumerate(rows):
        bg = VERY_LIGHT if i % 2 == 0 else WHITE
        data.append([Paragraph(str(c), S(f"TD{i}", fontName="Helvetica",
                     fontSize=9, textColor=BLACK, leading=13)) for c in row])
    t = Table(data, colWidths=col_widths)
    t.setStyle(TableStyle([
        ("BACKGROUND",    (0,0), (-1,0), ACCENT_TEAL),
        ("ROWBACKGROUNDS",(0,1), (-1,-1), [VERY_LIGHT, WHITE]),
        ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#B0BEC5")),
        ("TOPPADDING",    (0,0), (-1,-1), 4),
        ("BOTTOMPADDING", (0,0), (-1,-1), 4),
        ("LEFTPADDING",   (0,0), (-1,-1), 6),
        ("RIGHTPADDING",  (0,0), (-1,-1), 6),
        ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ]))
    return [t, Spacer(1, 6)]


# ══════════════════════════════════════════════════════════════════════════════
# CONTENT
# ══════════════════════════════════════════════════════════════════════════════
story = []

# ── COVER PAGE ─────────────────────────────────────────────────────────────────
cover_bg_data = [[Paragraph("COMMUNITY MEDICINE", COVER_TITLE)]]
cover_bg = Table(cover_bg_data, colWidths=[PAGE_W])
cover_bg.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,-1), DARK_BLUE),
    ("TOPPADDING",    (0,0), (-1,-1), 22),
    ("BOTTOMPADDING", (0,0), (-1,-1), 22),
    ("LEFTPADDING",   (0,0), (-1,-1), 10),
    ("ROUNDEDCORNERS",[8]),
]))
story.append(Spacer(1, 2*cm))
story.append(cover_bg)
story.append(Spacer(1, 0.4*cm))

sub_data = [[Paragraph("SPOTTING EXAM — COMPLETE STUDY GUIDE", COVER_SUB)]]
sub_t = Table(sub_data, colWidths=[PAGE_W])
sub_t.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,-1), MID_BLUE),
    ("TOPPADDING", (0,0), (-1,-1), 10),
    ("BOTTOMPADDING", (0,0), (-1,-1), 10),
    ("ROUNDEDCORNERS",[6]),
]))
story.append(sub_t)
story.append(Spacer(1, 0.6*cm))

info_lines = [
    "10 Spots  |  50 Marks  |  30 Minutes",
    "All spots answered with exam-ready notes",
    "Includes: Identification • Mechanisms • Doses • Mnemonics • Key Facts",
]
for line in info_lines:
    story.append(Paragraph(line, COVER_INFO))
story.append(Spacer(1, 0.4*cm))

# summary table on cover
sum_headers = ["Spot", "Specimen / Image", "Topic"]
sum_rows = [
    ["1", "OCP Pack (assumed)", "Contraception – Combined OCP"],
    ["2", "Aedes aegypti Mosquito", "Vector-borne diseases / Entomology"],
    ["3", "Horrock's Apparatus", "Water testing / Chlorination"],
    ["4", "Vaccine Carrier Box", "Cold Chain / UIP / AEFI"],
    ["5", "Yellow Biohazard Bag", "Biomedical Waste Management"],
    ["6", "No image", "RTI/STI Syndromic Management"],
    ["7", "RBSK Logo", "Rashtriya Bal Swasthya Karyakram"],
    ["8", "Abhayrab (Rabies Vaccine)", "Rabies / Animal Bite Management"],
    ["9", "No image (DEIC)", "RBSK / DEIC / 5×5 Matrix"],
    ["10", "Goitre (neck swelling)", "IDD / NIDDCP / FSSAI"],
]
story += simple_table(sum_headers, sum_rows, col_widths=[1.2*cm, 6.5*cm, 8.3*cm])

story.append(Paragraph("Generated by Orris AI  •  For Exam Revision Use Only", FOOTER_NOTE))
story.append(PageBreak())


# ══════════════════════════════════════════════════════════════════════════════
# SPOT 1 — OCP
# ══════════════════════════════════════════════════════════════════════════════
story += spot_header(1, "Combined Oral Contraceptive Pill (OCP)", "OCP pack / blister strip")
story.append(Spacer(1, 4))

story += q_row(1, "What is the mechanism of action?", [
    "**PRIMARY: Inhibits ovulation",
    "- Oestrogen + Progestin suppress GnRH → ↓ FSH and LH → no LH surge → no ovulation",
    "**SECONDARY mechanisms:",
    "- Thickens cervical mucus (↓ sperm penetration)",
    "- Endometrial atrophy (prevents implantation)",
    "- Alters tubal motility",
    ">>Mnemonic: OCP = Ovulation suppression + Cervical mucus + Proliferation block",
])

story += q_row(2, "Mention its dosage.", [
    "**Combined OCP:** 1 tablet daily for 21 days starting Day 1–5 of cycle; 7 pill-free days",
    "**28-day pack:** 21 active + 7 placebo tablets (no break needed)",
    "**Progestin-only pill (Mini-pill):** 1 tablet daily continuously, same time each day",
    "!!Key: Must be taken at the SAME TIME daily for maximum efficacy",
])

story += q_row(3, "Who is an eligible candidate?", [
    "**Eligible:** Healthy reproductive-age women seeking reversible contraception",
    "- Women with dysmenorrhoea, menorrhagia, endometriosis, PCOS (therapeutic benefit)",
    "**CONTRAINDICATED (ACHES warning signs):**",
    "- Smokers >35 years",
    "- Hypertension, thromboembolic disorders, breast cancer",
    "- Liver disease, undiagnosed vaginal bleeding, pregnancy",
    ">>ACHES = Abdominal pain, Chest pain, Headaches, Eye changes, Severe leg pain",
])

story += q_row(4, "List 1 advantage and 1 disadvantage.", [
    "**ADVANTAGE:** Highly effective (>99% perfect use); non-contraceptive benefits",
    "- Reduces acne, dysmenorrhoea, ovarian cysts, risk of ovarian/endometrial cancer",
    "**DISADVANTAGE:** Does NOT protect against STIs/HIV",
    "- User-dependent (daily compliance); risk of DVT/thromboembolism (especially oestrogen)",
])

story += q_row(5, "Instructions to use.", [
    "1. Start on Day 1 of menstrual cycle",
    "2. Take 1 pill daily at the same time for 21 days",
    "3. 7-day break, then start next pack",
    "**If 1 pill missed (<12 hrs late):** Take immediately; continue as normal",
    "**If >12 hrs or 2+ pills missed:** Take last missed pill NOW + barrier method for 7 days",
    "!!Report ACHES warning signs immediately to a doctor",
])
story.append(PageBreak())


# ══════════════════════════════════════════════════════════════════════════════
# SPOT 2 — Aedes aegypti
# ══════════════════════════════════════════════════════════════════════════════
story += spot_header(2, "Aedes aegypti Mosquito", "Close-up photograph of a mosquito feeding on human skin")
story.append(Spacer(1, 4))

story += q_row(1, "Identify the specimen.", [
    "**Aedes aegypti** — the 'Tiger Mosquito'",
    "Family: Culicidae | Small, dark-coloured | Day-biting mosquito",
    "Breeds in: Clean, stagnant water in artificial containers (pots, tyres, coolers, drums)",
])

story += q_row(2, "List 2 identifying features.", [
    "1. **Lyre-shaped silver-white markings** on the thorax (scutum) — resembles a lyre/violin",
    "2. **Black and white banded legs** — alternating black/white rings on tarsal segments",
    ">>Bonus: Holds body parallel to surface while feeding (unlike Anopheles at 45°)",
])

story += q_row(3, "List 2 diseases transmitted.", [
    "1. **Dengue Fever** (Flavivirus — 4 serotypes: DENV 1, 2, 3, 4)",
    "2. **Chikungunya** (Alphavirus)",
    "Also transmits: Yellow Fever (Flavivirus), Zika Virus (Flavivirus)",
    ">>Mnemonic: DCYZ = Dengue, Chikungunya, Yellow fever, Zika",
])

story += q_row(4, "List 4 control measures. (2 marks)", [
    "1. **Source Reduction:** Remove/drain standing water; cover water containers; remove discarded tyres",
    "2. **Larvicidal measures:** Temephos (Abate) in water; BTi (Bacillus thuringiensis israelensis); Larvivorous fish (Gambusia, Lebistes)",
    "3. **Adult mosquito control:** Indoor Residual Spraying (IRS) with malathion/pyrethrum; fogging during outbreaks",
    "4. **Personal protection:** Mosquito nets (day-time), repellents (DEET), full-sleeve clothing, window screens",
    "!!Aedes breeds in CLEAN water unlike Culex (dirty/organic water) — key exam point",
])
story.append(PageBreak())


# ══════════════════════════════════════════════════════════════════════════════
# SPOT 3 — Horrock's Apparatus
# ══════════════════════════════════════════════════════════════════════════════
story += spot_header(3, "Horrock's Apparatus (OT Test)", "Metal box with 6 cups and reagent bottles inside")
story.append(Spacer(1, 4))

story += q_row(1, "Identify the instrument and its use.", [
    "**Instrument: Horrock's Apparatus** (also called OT Test / Comparator box)",
    "**Use:** Tests RESIDUAL CHLORINE content of water to assess adequacy of chlorination",
    "- Contains 6 numbered white cups + OT (ortho-tolidine) reagent bottle",
    "- Progressive amounts of bleaching powder in each cup (Cup 1 = least, Cup 6 = most)",
])

story += q_row(2, "Mention the indicator of this test.", [
    "**Indicator: Ortho-tolidine (OT reagent)**",
    "- Pale yellow liquid that turns BLUE/YELLOW in presence of free chlorine",
    "- Colour change: Pale yellow → Deeper yellow → Greenish-blue → Blue (with increasing chlorine)",
    ">>OT = Ortho-Tolidine = the indicator that reacts with free available chlorine",
])

story += q_row(3, "Amount of bleaching powder if 3rd cup shows blue colour?", [
    "**Answer: 2.5 grams per 1000 litres (1 kilolitre) of water**",
    "- The cup that first turns blue = minimum bleaching powder required",
    "Cup reference: Cup 1 = 0.5 g | Cup 2 = 1.5 g | Cup 3 = 2.5 g | Cup 4 = 3.5 g | Cup 5 = 5 g | Cup 6 = 7.5 g",
    "!!Rule: Add amount corresponding to the FIRST cup that turns blue",
])

story += q_row(4, "Amount of residual chlorine required for water disinfection.", [
    "**0.5 mg/L (0.5 ppm)** residual chlorine after 30 minutes contact time",
    "- At point of delivery/use: minimum **0.2 mg/L**",
    "- For emergency/field use: 0.5 ppm after 1 hour contact time",
    "- Initial dose of chlorine added: typically 2–3 ppm",
    ">>Formula: Chlorine demand + Residual chlorine = Total chlorine applied",
])

story += q_row(5, "Two other methods of water purification.", [
    "1. **Boiling** — most reliable household method; kills ALL pathogens including cysts",
    "   - Boil for 1 minute (5 minutes at high altitude >2000m)",
    "2. **Sand Filtration** — Slow Sand Filter (SSF): uses Schmutzdecke (biological layer) to remove 99% bacteria",
    "   - Rapid Sand Filter (RSF): used after coagulation-flocculation at large municipal scale",
    "Other acceptable: UV irradiation, Iodine tablets, Solar disinfection (SODIS), Reverse Osmosis",
])
story.append(PageBreak())


# ══════════════════════════════════════════════════════════════════════════════
# SPOT 4 — Vaccine Carrier
# ══════════════════════════════════════════════════════════════════════════════
story += spot_header(4, "Vaccine Carrier Box", "Blue insulated cold box with 'STOP! DO YOU NEED TO OPEN IT?' label")
story.append(Spacer(1, 4))

story += q_row(1, "Identify the specimen.", [
    "**Vaccine Carrier Box** (Cold box used in immunization programmes)",
    "- Insulated box maintaining 2–8°C for vaccine transport",
    "- Part of the COLD CHAIN system under Universal Immunisation Programme (UIP)",
    "- 'STOP' sticker: reminds health worker to open only when necessary (prevent temp loss)",
])

story += q_row(2, "How many ice packs needed and what is conditioning of ice pack?", [
    "**Number of ice packs: 4 ice packs** required in a standard vaccine carrier",
    "**Conditioning of ice packs:**",
    "- Remove frozen ice packs from freezer",
    "- Allow to stand at room temperature until water droplets (condensation) appear on surface",
    "- This ensures temp stays ABOVE 0°C inside carrier → prevents freezing of freeze-sensitive vaccines",
    "- Shake the ice pack — if you hear sloshing/movement of liquid, it is conditioned",
    "- Conditioning time: ~10–15 minutes at room temperature",
    "!!Freeze-sensitive vaccines: DPT, TT, Hepatitis B, Hib, IPV — MUST NOT freeze",
])

story += q_row(3, "What is Reverse Cold Chain?", [
    "**Definition:** System of safely transporting biological specimens FROM the field/periphery BACK to the laboratory or higher facility",
    "- Direction: Periphery → Centre (reverse of normal vaccine cold chain)",
    "**Examples:**",
    "- Blood samples for HIV testing",
    "- Stool samples for AFP (polio) surveillance",
    "- Blood samples for malaria smear/CBC from remote areas",
    "- Unused vaccines returned to higher level store",
])

story += q_row(4, "Differentiate 'Complete Immunization' and 'Full Immunization'.", [])
story += simple_table(
    ["Feature", "Complete Immunization", "Full Immunization"],
    [
        ["Definition", "All vaccines due by 2 years of age per national schedule", "BCG + 3 DPT + 3 OPV + Measles by 12 months"],
        ["Age", "By 2 years", "By 1 year (12 months)"],
        ["Context", "Newer programme definition (broader)", "Used in NFHS/WHO surveys"],
        ["Vaccines", "All UIP schedule vaccines", "6 basic antigens only"],
    ],
    col_widths=[3.5*cm, 6.0*cm, 6.5*cm]
)

story += q_row(5, "What is AEFI?", [
    "**AEFI = Adverse Event Following Immunization**",
    "**Definition:** Any untoward medical occurrence that follows immunization, not necessarily causally related to the vaccine",
    "**5 Categories:**",
    "- Vaccine-induced reaction | Vaccine-potentiated reaction",
    "- Programmatic error | Injection reaction | Coincidental event",
    "**Reporting:** All serious AEFIs → report to Medical Officer within 24 hours",
    ">>Serious AEFI = hospitalisation, disability, death, or life-threatening event",
])
story.append(PageBreak())


# ══════════════════════════════════════════════════════════════════════════════
# SPOT 5 — Yellow Biohazard Bag
# ══════════════════════════════════════════════════════════════════════════════
story += spot_header(5, "Yellow Biohazard Bag", "Yellow plastic bag labelled 'BIOHAZARD INFECTIOUS WASTE'")
story.append(Spacer(1, 4))

story += q_row(1, "Enumerate the type of waste collected in this specimen.", [
    "**YELLOW BAG** — as per BMW Management Rules 2016 (India):",
    "- Human anatomical waste (body parts, organs, foetal tissue)",
    "- Animal anatomical waste",
    "- Soiled waste (blood/body fluid-soaked dressings, bandages, linen, plaster casts)",
    "- Expired/discarded medicines (non-cytotoxic)",
    "- Chemical/pharmaceutical waste",
    "- Microbiology & biotechnology waste (except sharps)",
    "- Outdated/unused blood bags, IV fluid bags",
    ">>Colour Code: Yellow = Incineration | Red = Autoclaving | White = Sharps | Blue = Glass",
])

story += q_row(2, "Method of disposal for this bag.", [
    "**Incineration** in a dedicated incinerator at Common Biomedical Waste Treatment Facility (CBWTF)",
    "- Temperature: ≥800°C (primary chamber), ≥1050°C (secondary chamber)",
    "- Alternative: Deep burial for anatomical waste in areas without CBWTF",
    "!!Yellow bag must NEVER go to municipal solid waste or open dumping",
])

story += q_row(3, "Steps of biomedical waste management. (2 marks)", [
    "1. **Segregation at source** — separate waste into correct colour-coded bags/containers at point of generation",
    "2. **Collection** — collect in appropriate bags; fill max ¾ full; seal and label",
    "3. **Labelling** — type of waste, date, source facility on every bag/container",
    "4. **Internal transport** — dedicated trolleys; separate routes/timings; avoid passenger lifts",
    "5. **Temporary storage** — designated areas; max 48 hours; category-wise",
    "6. **Treatment & disposal** — as per category:",
    "   Yellow → Incineration | Red → Autoclave+Shredder | White → Autoclave/Encapsulation | Blue → Autoclave+Shredder",
    ">>Steps Mnemonic: S-C-L-T-S-T (Segregate, Collect, Label, Transport, Store, Treat)",
])

story += q_row(4, "Two PPE for BMW handlers.", [
    "1. **Heavy-duty rubber/nitrile gloves** (thick, puncture-resistant — NOT surgical gloves)",
    "2. **Gumboots (waterproof boots)** — protect from spills and sharps on floor",
    "Also acceptable: Impermeable apron, Face mask (N95/surgical), Safety goggles/face shield",
    "!!Full PPE = Gloves + Gumboots + Apron + Mask + Goggles for high-risk waste handling",
])
story.append(PageBreak())


# ══════════════════════════════════════════════════════════════════════════════
# SPOT 6 — RTI/STI Management
# ══════════════════════════════════════════════════════════════════════════════
story += spot_header(6, "RTI/STI Management", "No image — conceptual spot")
story.append(Spacer(1, 4))

story += q_row(1, "What is the syndromic approach in RTI/STI management?", [
    "**Definition:** Clinical management approach where a patient presenting with a SYNDROME (cluster of symptoms/signs) is treated for the MOST COMMON causative organisms — WITHOUT waiting for lab confirmation",
    "- Based on pre-defined clinical algorithms/flowcharts",
    "- Example: Vaginal discharge → treat for both Gonorrhoea AND Chlamydia simultaneously",
    "**Advantages:** Immediate treatment; no lab needed; reduces onward transmission; practical in resource-limited settings",
    "**Disadvantages:** Over-treatment; does not identify specific pathogen; risk of AMR",
])

story += q_row(2, "How many coloured kits are there in RTI/STI kits?", [
    "**6 colour-coded kits** (Kit 1–6) under India's RTI/STI management programme:",
])

story += simple_table(
    ["Kit No.", "Colour", "Syndrome"],
    [
        ["Kit 1", "Yellow", "Vaginal discharge (female)"],
        ["Kit 2", "Green", "Urethral discharge (male)"],
        ["Kit 3", "Blue", "Genital ulcer disease"],
        ["Kit 4", "White", "Lower abdominal pain / PID (female)"],
        ["Kit 5", "Red", "Inguinal bubo"],
        ["Kit 6", "Black", "Scrotal swelling / Epididymo-orchitis"],
    ],
    col_widths=[2.5*cm, 3.0*cm, 10.5*cm]
)

story += q_row(3, "Universal precaution while examining HIV patient.", [
    "**Standard (Universal) Precautions** — applied to ALL patients regardless of HIV status:",
    "- **Hand hygiene** before and after every patient contact",
    "- **Gloves** when touching blood, body fluids, mucous membranes, non-intact skin",
    "- **Mask + goggles/face shield** when splashing of blood/body fluids is possible",
    "- **Gown/apron** when clothing may be contaminated",
    "- **Safe sharps handling:** NEVER recap needles; use puncture-proof sharps containers",
    "- Dispose all contaminated material in appropriate BMW bags",
    "- **PEP** (Post-Exposure Prophylaxis) if accidental exposure occurs (start within 72 hours)",
    "!!Universal precautions treat ALL patients as potentially infectious",
])

story += q_row(4, "HIV-positive patient refuses to disclose to wife — will you tell her? Give reasons.", [
    "**YES — The wife should be informed after following due protocol.**",
    "**Step-by-step approach:**",
    "1. Counsel the patient strongly and repeatedly to disclose himself (Partner Notification Counselling)",
    "2. If patient refuses after repeated counselling, proceed with provider-initiated notification",
    "**Ethical justification:**",
    "- **Duty to warn/protect** — identifiable third party (wife) at imminent, serious, preventable risk",
    "- **Non-maleficence** — harm to the uninformed wife outweighs confidentiality",
    "- **NACP guidelines** and Indian Medical Council Regulations support partner notification",
    "- Document ALL counselling sessions thoroughly",
    ">>This is the Tarasoff principle applied to public health — duty to protect overrides confidentiality",
])
story.append(PageBreak())


# ══════════════════════════════════════════════════════════════════════════════
# SPOT 7 — RBSK
# ══════════════════════════════════════════════════════════════════════════════
story += spot_header(7, "RBSK Programme", "RBSK logo (Rashtriya Bal Swasthya Karyakram)")
story.append(Spacer(1, 4))

story += q_row(1, "Identify the given logo.", [
    "**RBSK — Rashtriya Bal Swasthya Karyakram** logo",
    "Launched: 2013 | Under: National Health Mission (NHM)",
    "Implementing body: Mobile Health Teams (MHTs) — 1 AYUSH doctor + 1 ANM/Female health worker per team",
])

story += q_row(2, "What is RBSK?", [
    "**Rashtriya Bal Swasthya Karyakram (RBSK)** = National Child Health Screening and Early Intervention Programme",
    "- Launched in 2013 under NHM",
    "- Goal: Early identification and FREE treatment of children (0–18 years) for selected health conditions",
    "- Covers 4 D's of childhood illness (see Q3)",
    "- Each district has a **DEIC (District Early Intervention Centre)** for comprehensive management",
])

story += q_row(3, "What are the 4 D's in children?", [
    "**1. Defects at Birth** — congenital conditions:",
    "   - CHD, Cleft lip/palate, Neural tube defects, Down's syndrome, Congenital cataract, Deafness, Club foot",
    "**2. Deficiencies** — nutritional deficiencies:",
    "   - Anaemia, Vitamin A deficiency, Vitamin D deficiency, Iodine deficiency",
    "**3. Diseases** — childhood diseases:",
    "   - Acute otitis media, Rheumatic heart disease, Reactive airway disease, Skin conditions",
    "**4. Developmental Delays including Disabilities:**",
    "   - Vision/hearing impairment, Neuromotor impairment, Cognitive impairment, Autism, Learning disabilities",
    ">>Mnemonic: 4D = Defects + Deficiencies + Diseases + Developmental delays",
])

story += q_row(4, "Who are the beneficiaries of RBSK?", [
    "Children from **birth (0) to 18 years** of age:",
    "- **0–6 weeks (Neonates):** screened at newborn care corners in delivery points",
    "- **6 weeks – 6 years:** screened at Anganwadi centres (AWCs)",
    "- **6 – 18 years:** screened at government and government-aided schools (twice a year)",
])

story += q_row(5, "What are the components of RBSK programme?", [
    "1. **Screening** — systematic health screening by Mobile Health Teams (MHTs)",
    "2. **Early Identification** — identification of children with 4D conditions",
    "3. **Referral** — to District Early Intervention Centre (DEIC) for comprehensive evaluation",
    "4. **Management & Rehabilitation** — free treatment, surgery, corrective services via DEIC + empanelled hospitals",
    "5. **Newborn Screening** — for congenital hypothyroidism, PKU, sickle cell disease, G6PD deficiency",
])
story.append(PageBreak())


# ══════════════════════════════════════════════════════════════════════════════
# SPOT 8 — Abhayrab Rabies Vaccine
# ══════════════════════════════════════════════════════════════════════════════
story += spot_header(8, "Abhayrab — Purified Vero Cell Rabies Vaccine", "Box of Abhayrab: Rabies Vaccine Human Cell Culture IP")
story.append(Spacer(1, 4))

story += q_row(1, "Write the dose of the vaccine.", [
    "**1 mL per dose** (intramuscular route)",
    "**0.1 mL per site** (intradermal route — 2 sites used)",
    "- Contains purified, inactivated rabies virus grown on Vero cells",
    "!!Do NOT use gluteal region — poor and unreliable immune response",
])

story += q_row(2, "Route of administration.", [
    "1. **Intramuscular (IM):** Deltoid muscle (adults) | Anterolateral thigh (children <2 years)",
    "2. **Intradermal (ID):** Approved, more economical (0.1 mL per site, 2 sites per visit)",
    "!!NEVER in gluteal / buttock region — fat reduces vaccine immunogenicity",
])

story += q_row(3, "Write schedule for this vaccine.", [])

story += simple_table(
    ["Protocol", "Route", "Schedule", "Doses"],
    [
        ["Essen (PEP)", "IM (1 mL)", "Days 0, 3, 7, 14, 28", "5 doses"],
        ["Zagreb (PEP)", "IM (1 mL)", "Day 0 (×2 sites), Day 7, Day 21", "4 doses"],
        ["ID 2-site (PEP)", "ID (0.1 mL × 2)", "Days 0, 3, 7, 28", "4 visits"],
        ["PrEP", "IM or ID", "Days 0, 7, 28", "3 doses"],
    ],
    col_widths=[3.5*cm, 3.0*cm, 6.0*cm, 2.5*cm]
)

story += q_row(4, "Write different categories of animal bite.", [])
story += simple_table(
    ["Category", "Description", "Management"],
    [
        ["I", "Touching/feeding animals; licks on INTACT skin", "Wash wound; NO vaccine needed"],
        ["II", "Minor scratches/abrasions without bleeding; nibbling uncovered skin", "Wound care + Vaccine (PEP)"],
        ["III", "Transdermal bites; mucous membrane contamination; licks on broken skin; bat exposure", "Wound care + Vaccine + HRIG"],
    ],
    col_widths=[1.8*cm, 7.5*cm, 6.7*cm]
)

story += q_row(5, "Dose of Human Rabies Immunoglobulin (HRIG).", [
    "**HRIG dose: 20 IU/kg body weight** (Category III bites only)",
    "- Infiltrate maximum amount into and around the wound",
    "- Remaining amount given IM at a site DISTANT from vaccine site",
    "- Given on **Day 0 ONLY** (with first vaccine dose) — never repeated",
    "- Equine RIG (ERIG): **40 IU/kg** body weight (cheaper but risk of serum sickness)",
    "!!If wound is on finger/toe, instil even then — do not force large volumes into closed space",
])
story.append(PageBreak())


# ══════════════════════════════════════════════════════════════════════════════
# SPOT 9 — DEIC / RBSK
# ══════════════════════════════════════════════════════════════════════════════
story += spot_header(9, "DEIC / RBSK — 5×5 Matrix", "No image — conceptual spot")
story.append(Spacer(1, 4))

story += q_row(1, "What is the full form of DEIC?", [
    "**DEIC = District Early Intervention Centre**",
    "- Established at District Hospitals under RBSK programme",
    "- Provides FREE comprehensive assessment, management, and rehabilitation",
    "- Serves children with 4D conditions referred by Mobile Health Teams (MHTs)",
    "**Services at DEIC:** Medical assessment, physiotherapy, speech therapy, psychological evaluation, corrective surgery referral",
])

story += q_row(2, "What are the 4 D's of RBSK?", [
    "1. **Defects at birth** — congenital anomalies (CHD, cleft, NTD, cataract, etc.)",
    "2. **Deficiencies** — nutritional (anaemia, Vit A, Vit D, iodine)",
    "3. **Diseases** — otitis media, RHD, reactive airway disease, skin conditions",
    "4. **Developmental delays including disabilities** — autism, vision/hearing loss, cognitive impairment",
    ">>4D Mnemonic: 'Deformities, Deficiencies, Diseases, Delays'",
])

story += q_row(3, "Enumerate any 3 points of 5×5 Matrix.", [
    "**5×5 Matrix = 5 Age Groups × 5 Domains/Conditions screened:**",
    "**5 Age Groups:**",
    "   1. 0–6 weeks | 2. 6 weeks–6 months | 3. 6 months–1 year | 4. 1–3 years | 5. 3–6 years (+ school children to 18)",
    "**5 Domains:** Defects at birth | Deficiencies | Diseases | Developmental delays | Disabilities",
    "**3 Key Points:**",
    "1. Neonates (0–6 weeks) screened for congenital conditions at delivery points/NRCs",
    "2. Children 6 weeks–6 years screened at Anganwadi Centres (AWCs) by MHTs",
    "3. Children 6–18 years screened at government schools TWICE A YEAR",
])

story += q_row(4, "Who are the beneficiaries of RBSK?", [
    "All children from **0 to 18 years** of age:",
    "- Neonates at delivery facilities",
    "- Children 6 weeks–6 years at AWCs",
    "- School children 6–18 years at government/aided schools",
    "Estimated **270 million children** covered nationwide",
])
story.append(PageBreak())


# ══════════════════════════════════════════════════════════════════════════════
# SPOT 10 — Goitre / IDD
# ══════════════════════════════════════════════════════════════════════════════
story += spot_header(10, "Goitre — Iodine Deficiency Disorder (IDD)", "Woman with visible neck swelling (goitre)")
story.append(Spacer(1, 4))

story += q_row(1, "Identify the disease.", [
    "**Goitre** — caused by Iodine Deficiency Disorder (IDD)",
    "- Visible/palpable enlargement of the thyroid gland",
    "- Simple/endemic goitre = diffuse, non-toxic enlargement due to dietary iodine deficiency",
    "- Grading: Grade 0 (no goitre) | Grade 1 (palpable only) | Grade 2 (visible at normal neck position)",
    "!!Endemic goitre = prevalence >5% in school-age children in a community",
])

story += q_row(2, "Name its national programme.", [
    "**National Iodine Deficiency Disorders Control Programme (NIDDCP)**",
    "- Previously: National Goitre Control Programme (NGCP) — renamed NIDDCP in **1992**",
    "**Main Strategy: Universal Salt Iodization (USI)**",
    "- Iodization at production level: **30 ppm** (mg/kg)",
    "- At point of consumption: minimum **15 ppm**",
    "- **Goal:** Reduce IDD prevalence to <10% and urinary iodine <20 µg/dL to <50%",
    "- Surveys: Every 5 years to assess magnitude of IDD",
    ">>Goitre rate >10% or urinary iodine <100 µg/L in >50% children = public health problem",
])

story += q_row(3, "Enumerate preventive measures.", [
    "1. **Universal Salt Iodization (USI)** — use of iodized salt; most effective and sustainable",
    "2. **Iodized oil** — oral capsules or IM injections (Lipiodol) for severely deficient/remote areas",
    "3. **Dietary diversification** — include iodine-rich foods: sea fish, seafood, dairy, eggs",
    "4. **Reduce goitrogens** — limit raw cabbage, turnips, cassava, soybean (contain thiocyanates/goitrin)",
    "5. **Regular IDD surveys and monitoring** — urinary iodine excretion (UIE) monitoring",
    ">>Target UIE: Median ≥100 µg/L in school-age children indicates adequate iodine intake",
])

story += q_row(4, "What is food fortification? Give two examples.", [
    "**Food Fortification:** Addition of one or more essential nutrients to a food (whether or not normally present) to prevent or correct a demonstrated deficiency in the population",
    "**Two examples:**",
    "1. **Iodized salt** — Potassium iodate/iodide added to common salt (prevents IDD/goitre)",
    "2. **Iron and folic acid-fortified atta (wheat flour)** — prevents iron deficiency anaemia",
    "Other examples: Vitamin A fortified cooking oil | Vitamin D fortified milk | Double-fortified salt (iodine + iron)",
    ">>Fortification ≠ Enrichment (enrichment restores nutrients lost during processing)",
])

story += q_row(5, "FSSAI stands for?", [
    "**FSSAI = Food Safety and Standards Authority of India**",
    "- Established under: **Food Safety and Standards Act, 2006**",
    "- Headquartered: New Delhi",
    "- Functions: Sets food standards; regulates manufacture, storage, distribution, sale and import of food",
    "- Logo: FSSAI logo is mandatory on all packaged foods in India",
    "!!FSSAI replaced earlier multiple acts (PFA Act, Fruit Products Order, Meat Food Products Order, etc.)",
])


# ── QUICK REVISION SUMMARY (last page) ────────────────────────────────────────
story.append(PageBreak())

summary_banner_data = [[Paragraph("QUICK REVISION SUMMARY", SPOT_TITLE)]]
summary_banner = Table(summary_banner_data, colWidths=[PAGE_W])
summary_banner.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,-1), ORANGE),
    ("TOPPADDING", (0,0), (-1,-1), 8),
    ("BOTTOMPADDING", (0,0), (-1,-1), 8),
    ("LEFTPADDING", (0,0), (-1,-1), 10),
    ("ROUNDEDCORNERS", [5]),
]))
story.append(summary_banner)
story.append(Spacer(1, 6))

mnemonics = [
    ("SPOT 1 — OCP",         "ACHES = Abdominal pain, Chest pain, Headache, Eye changes, Severe leg pain (warning signs for OCP)"),
    ("SPOT 2 — Aedes",       "DCYZ = Dengue, Chikungunya, Yellow fever, Zika | Lyre-shaped marking on thorax"),
    ("SPOT 3 — Horrock's",   "OT = Ortho-Tolidine | Residual Cl₂ = 0.5 ppm | Cup 3 = 2.5 g bleaching powder/1000 L"),
    ("SPOT 4 — Cold Chain",  "4 ice packs | Condition until condensation appears | AEFI = report in 24 hours"),
    ("SPOT 5 — BMW",         "Yellow = Incineration | Red = Autoclave | White = Sharps | Steps: S-C-L-T-S-T"),
    ("SPOT 6 — RTI/STI",     "6 coloured kits | Universal precautions for ALL patients | Disclose HIV to partner if risk of harm"),
    ("SPOT 7 — RBSK",        "4D = Defects + Deficiencies + Diseases + Delays | 0–18 yrs | DEIC at district level"),
    ("SPOT 8 — Rabies",      "Cat I = Wash | Cat II = Vaccine | Cat III = Vaccine + HRIG (20 IU/kg) | Essen: 0,3,7,14,28"),
    ("SPOT 9 — DEIC",        "DEIC = District Early Intervention Centre | 5×5 matrix | 270 million children covered"),
    ("SPOT 10 — Goitre",     "NIDDCP (1992) | USI = 30 ppm production, 15 ppm consumption | FSSAI = Food Safety Standards Authority of India"),
]

mdata = [[Paragraph(f"<b>{k}</b>", S("mk", fontName="Helvetica-Bold", fontSize=9, textColor=DARK_BLUE)),
          Paragraph(v, S("mv", fontName="Helvetica", fontSize=9, textColor=BLACK, leading=13))]
         for k, v in mnemonics]

mt = Table(mdata, colWidths=[4.2*cm, 11.8*cm])
mt.setStyle(TableStyle([
    ("ROWBACKGROUNDS", (0,0), (-1,-1), [LIGHT_BG, WHITE]),
    ("GRID",           (0,0), (-1,-1), 0.3, colors.HexColor("#C5CAE9")),
    ("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(mt)
story.append(Spacer(1, 10))
story.append(Paragraph(
    "Community Medicine Spotting Study Guide  •  Generated by Orris AI  •  All answers based on standard PSM / Preventive Medicine curriculum",
    FOOTER_NOTE
))


# ── BUILD ──────────────────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF saved to: {OUTPUT_PATH}")
Running Command

python3 /home/daytona/workspace/spotting_study_guide/generate_pdf.py

Running Command

ls -lh /home/daytona/workspace/spotting_study_guide/Community_Medicine_Spotting_…

Your study guide PDF is ready for download:

Community Medicine Spotting Study Guide

PDF Document · PDF


What's inside (38 KB, ~14 pages):
  • Cover page with a summary table of all 10 spots - specimen, topic at a glance
  • All 10 Spots formatted as coloured Q&A blocks:
    • Dark blue spot header banner (Spot number + topic + specimen identified)
    • Blue question band for each Q
    • Light blue answer area with bullet points, bold key terms, and orange/green highlights for mnemonics and important facts
  • Comparison tables where relevant (e.g., Complete vs Full immunization, Rabies protocols, Animal bite categories, RTI/STI kit colours)
  • Quick Revision Summary on the last page - one-liner key facts + mnemonics for all 10 spots
Design features for exam revision:
  • >> orange lines = mnemonics to remember
  • !! green lines = exam-critical facts (commonly asked one-liners)
  • Bold text = terms the examiner expects you to name specifically
  • Tables for anything comparative (easier to recall than paragraphs)

Where is pdf

Here it is — click to download:

Community Medicine Spotting Study Guide

PDF Document · PDF

This is a shared conversation. Sign in to Orris to start your own chat.