attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment

Answer all questions according to the pics series in according to kpark book for MBBS to impress my teacher in easy but impressive way to score good marks. Can you make a pdf for each question paper answers so that it will be much easier

Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
general-purpose

You are a medical education expert writing K Park-based Community Medicine exam answers for MBBS 5th Semester students at Nepal Medical College. Create FIVE separate PDF files (one per question paper) with complete, impressive, mark-scoring answers based on K Park's Textbook of Preventive and Social Medicine. **PAPERS TO COVER:** --- PAPER 1: Community Medicine Dept Formative Exam, V Semester, June 9, 2014 SAQ (5x5=25): 1. What is mass drug strategy for control of lymphatic filariasis in Nepal? 2. List water borne viral diseases & describe clinical features of any one of them (write on Hepatitis A or Hepatitis E) 3. State all programmes of childhood related to prevention of communicable disease 4. Write down WHO criteria for management of no dehydration in a child suffering from diarrhoea 5. Enumerate eruptive fevers seen in Nepal. Briefly describe clinical manifestation of Dengue fever (also mention Measles, Chickenpox) PBQ (1x10=10): 1. Mrs. Sukhmaya aged 30 years came to health post with complaints of diarrhoea and fever from last 6 weeks. She had lost 15% weight. She was getting treatment but no improvement. Her husband is working in Malaysia from last five years & had been visiting his wife from time to time. a. What is your provisional diagnosis and clinical features to support it? (3 marks) b. Describe the WHO clinical stage of this diseased lady (4 marks) c. How will you confirm the diagnosis and start therapy? (3 marks) --- PAPER 2: NMC August 2014 Sessional, Community Medicine, Full Marks 50 SAQ (6x5=30): 1. Describe the strategy for elimination of Poliomyelitis in Nepal 2. Enumerate the malariometric indices. Briefly describe the recommended treatment for uncomplicated Malaria in Nepal 3. What is Pneumoconiosis? Describe the medical measures for the control of the same 4. According to the National Kalaazar Control program, how is the disease diagnosed and treated in Nepal. Mention the preventive measures 5. What is the WHO recommended Multidrug therapy for Leprosy? 6. Briefly describe the epidemiology (agent, host and environmental factors) of Drug dependence PBQ (2x10=20): 7. A 2-year-old female child weighing 13kg is brought to primary health care centre in rural Nepal with h/o passing 3-4 loose watery stools since 2 days. There is no blood or mucous in the stools. On examination the child is afebrile, alert, restless and thirsty. The skin pinch goes back slowly. a. What are the common causes of diarrhoea in under five children? (4) b. How will you classify the hydration status of this child? (2) c. How will you treat this child? (2) d. What advice will you give the mother? (2) 8. A 15-year-old school boy was bitten by a stray dog while on the way to school. He comes to OPD soon after and is examined by the medical officer. There is a single bite on the exposed left calf. The bite measures 1x1.5 cms. The wound is bleeding. a. What is the category of contact that the boy has with the animal? (1) b. What is the type of exposure? (1) c. How will you treat the wound? (4) d. What post exposure prophylaxis will you give? (4) --- PAPER 3: NMC May 2016 Sessional, Community Medicine, Full Marks 50 SAQ (6x5=30): 1. How will you treat a case of Typhoid fever? What are the preventive measures? 2. Describe the agent, host and environmental factors in the causation of Tetanus. How will you prevent neonatal tetanus? 3. Describe the strategy for the elimination of Poliomyelitis in Nepal 4. Describe the diagnosis and treatment of multidrug resistant Tuberculosis 5. What are the occupational hazards of carpet weavers? How can we prevent these hazards? 6. Describe the normal probability curve PBQ (10x2=20): 7. A 30-year-old male, presented at the Primary health centre with history of fever associated with chills since 5 days and headache, nausea and vomiting since 1 day. There is history of travel to the Terai region 3 weeks prior. a. What is your differential diagnosis? (3) b. If the peripheral blood smear shows plasmodium falciparum, how will you treat this case? (2) c. What are the malariometric indices? (3) d. What advice will you provide this patient to prevent this disease in the future? (2) 8. A 20-year-old female was bitten by a stray dog while on the way to work. The pant is torn and there is a single bite on the left calf. The bite measures 1x1.5 cms. The wound is bleeding. There is no previous history of an animal bite. a. How will you classify the category of contact? (2) b. How will you treat the wound? (4) c. What is the recommended post exposure prophylaxis for this person? (4) --- **INSTRUCTIONS FOR EACH ANSWER:** - Base answers strictly on K Park's Textbook of Preventive and Social Medicine - Write in clear, point-form with headings and subheadings - Include specific data (WHO criteria, drug doses, classification systems) - Be impressive but concise - examiner-friendly - Include tables where appropriate (e.g., WHO ORS plan A/B/C, dehydration classification) - For clinical cases: follow IMCI guidelines, WHO staging **KEY CONTENT TO USE (from K Park):** LYMPHATIC FILARIASIS MDA (K Park): - Nepal uses Mass Drug Administration (MDA): Diethylcarbamazine (DEC) 6mg/kg + Albendazole 400mg annually to ALL eligible population (not just infected) - Implemented in endemic districts, exclude: pregnant women, children <2yrs, severely ill - EDCD Nepal coordinates; target: interrupt transmission for 5 consecutive years POLIOMYELITIS ELIMINATION (K Park): - Strategy: High routine immunization (OPV at 6,10,14 wks + booster), Pulse Immunization (NIDs - National Immunization Days), Surveillance of AFP cases, Mopping up operations - OPV (oral polio vaccine) - 2,3,4 months + booster at 18 months; bOPV used in NIDs - Nepal declared polio-free; certification criteria: zero AFP cases with adequate surveillance MALARIA (K Park): - Malariometric indices: Spleen Rate (SR), Parasite Rate (PR), Infant Parasite Rate (IPR), Annual Blood Examination Rate (ABER), Annual Parasite Incidence (API), Slide Positivity Rate (SPR) - Treatment uncomplicated P.falciparum Nepal: ACT - Artemether-Lumefantrine for 3 days - P.vivax: Chloroquine 25mg/kg over 3 days + Primaquine 0.25mg/kg/day for 14 days - Prevention: LLIN (Long Lasting Insecticidal Nets), IRS (Indoor Residual Spraying), larviciding DIARRHOEA IN CHILDREN (IMCI/WHO - K Park): - Hydration classification: * Plan A (No dehydration): Alert, normal eyes, drinks normally, skin pinch back normally → ORS/fluids at home, continue feeding, zinc * Plan B (Some dehydration): Restless/irritable, sunken eyes, drinks eagerly/thirsty, skin pinch goes back slowly → ORS 75ml/kg over 4 hours in facility * Plan C (Severe dehydration): Lethargic/unconscious, sunken eyes, unable to drink/drinks poorly, skin pinch goes back very slowly (>2sec) → IV Ringer's Lactate 100ml/kg - This 2yr child (restless, thirsty, skin pinch slow) = SOME DEHYDRATION → Plan B RABIES POST-EXPOSURE PROPHYLAXIS (K Park/WHO): - Categories of contact: * Category I: Touching/feeding animals, licks on intact skin → No PEP needed * Category II: Nibbling of uncovered skin, minor scratches/abrasions without bleeding → Wound wash + Vaccine * Category III: Single or multiple transdermal bites/scratches, licks on broken skin, contamination of mucous membranes → Wound wash + Vaccine + RIG (Rabies Immunoglobulin) - Wound treatment: Wash immediately with soap & water for 15 minutes, apply povidone-iodine/70% ethanol - PEP vaccines: Intramuscular (IM) Essen regimen: 5 doses on Days 0,3,7,14,28 OR Zagreb (2-1-1): 2 doses day 0 + 1 dose day 7 + 1 dose day 21 Intradermal (ID): 2-site ID (0.1ml each) on Days 0,3,7,28 (WHO recommended cost-saving) - RIG: Human RIG 20 IU/kg or Equine RIG 40 IU/kg, injected around wound on day 0 - The 15yr boy/20yr woman: wound on calf, bleeding, single transdermal bite = Category III exposure → Full PEP: wound wash + vaccine course + RIG DENGUE (K Park): - Probable case: Acute febrile illness + 2 of: headache, retro-orbital pain, myalgia, arthralgia, rash, leucopenia, thrombocytopenia - Warning signs: Abdominal pain, persistent vomiting, rapid breathing, bleeding gums, fatigue, restlessness, blood in vomit/stool - Dengue WHO classification (2009): Dengue without warning signs, Dengue with warning signs, Severe dengue - Management: No specific antiviral; supportive - paracetamol (avoid NSAIDs/aspirin), oral fluids, monitor platelet/HCT - Prevention: Source reduction (eliminate stagnant water), biological control, use of mosquito nets, fogging HIV CASE (Mrs. Sukhmaya): - Provisional diagnosis: HIV/AIDS (6 weeks of diarrhoea + fever + 15% weight loss + husband working abroad = risk factor for sexual transmission) - WHO Clinical Staging: Stage 1: Asymptomatic, Persistent Generalized Lymphadenopathy Stage 2: Moderate unexplained weight loss (<10%), Minor mucocutaneous manifestations Stage 3: Unexplained severe weight loss (>10%), Chronic diarrhoea >1 month, Prolonged fever >1 month, Severe bacterial infections Stage 4: HIV wasting syndrome, PCP, Cerebral toxoplasmosis, Cryptococcal meningitis, CMV retinitis - With 15% weight loss + chronic diarrhoea + fever = Stage 3 - Confirmation: ELISA + Western Blot; HIV RNA PCR; CD4 count - Treatment: WHO recommends ART when CD4 <350 cells/mm3; First line: TDF+3TC+EFV; plus OI treatment MULTIDRUG RESISTANT TB (K Park): - MDR-TB: Resistant to at least Isoniazid AND Rifampicin - XDR-TB: MDR-TB + resistant to fluoroquinolones + injectable 2nd line drugs - Diagnosis: Culture & DST (Drug Susceptibility Testing), Xpert MTB/RIF (rapid molecular test) - WHO MDR-TB regimen: Longer regimen: 18-24 months; includes: Pyrazinamide, Ethambutol, Fluoroquinolone (Levofloxacin/Moxifloxacin), Bedaquiline, Linezolid, Clofazimine - Shorter regimen: 9-11 months: intensive phase 4-6 months (Moxifloxacin, Clofazimine, Ethambutol, Pyrazinamide, Isoniazid, Kanamycin/Amikacin, Prothionamide) - Prevention: DOTS, contact tracing, BCG vaccination, proper use of first-line drugs LEPROSY MDT (K Park WHO regimen): - Paucibacillary (PB): 1-5 lesions: Rifampicin 600mg monthly supervised + Dapsone 100mg daily × 6 months - Multibacillary (MB): >5 lesions: Rifampicin 600mg monthly + Dapsone 100mg daily + Clofazimine 300mg monthly supervised + 50mg daily × 12 months KALAAZAR/VL (K Park): - Diagnosis: rK39 rapid test (primary), Bone marrow/splenic aspirate with amastigotes (gold standard), DAT - Treatment Nepal: Miltefosine oral 2.5mg/kg/day for 28 days (first line); or Amphotericin B liposomal - Prevention: IRS with DDT/synthetic pyrethroids, LLIN, sand fly control, early diagnosis & treatment PNEUMOCONIOSIS (K Park): - Defined as accumulation of dust in lungs causing tissue reaction - Types: Silicosis (quartz dust), Coal workers pneumoconiosis, Asbestosis, Byssinosis (cotton dust) - Medical control measures: Periodic health examination (spirometry, CXR), early detection, removal from exposure, treatment of complications, workers compensation, rehabilitation TYPHOID TREATMENT (K Park): - First line: Fluoroquinolones (Ciprofloxacin 500mg BD × 7-10 days) or Azithromycin 1g stat then 500mg/day × 6 days - For MDR typhoid: Ceftriaxone IV, Azithromycin - Prevention: Typhoid vaccine (Vi polysaccharide vaccine - 1 dose SC/IM, protects 3 years; Ty21a oral), safe water, food hygiene, sanitation improvement, health education TETANUS AGENT-HOST-ENVIRONMENT (K Park): - Agent: Clostridium tetani, gram +ve spore-forming anaerobic bacillus; produces tetanospasmin (neurotoxin) - Host: No natural immunity; all ages susceptible; neonates most vulnerable (unhygienic cord cutting) - Environment: Soil, animal feces, rusty metal, unclean instruments - Neonatal tetanus prevention: TT vaccination to pregnant women (2 doses; TT1 + TT2 at least 4 weeks apart, or boosters in subsequent pregnancies), clean delivery, clean cord care, skilled birth attendant CARPET WEAVERS OCCUPATIONAL HAZARDS (K Park): - Physical: Musculoskeletal problems (back pain, neck pain, carpal tunnel syndrome), eye strain, visual problems - Chemical: Dye chemicals causing dermatitis, respiratory problems - Biological: Anthrax from wool (rare) - Prevention: Ergonomic improvements, proper lighting, rest breaks, protective equipment, health surveillance NORMAL PROBABILITY CURVE (K Park): - Bell-shaped, symmetrical curve; Mean=Median=Mode - Described by mean (μ) and standard deviation (σ) - Properties: 68.27% within μ±1σ; 95.45% within μ±2σ; 99.73% within μ±3σ - Standard normal deviate (z) = (x-μ)/σ - Area under curve = 1 (100%) DRUG DEPENDENCE EPIDEMIOLOGY (K Park): - Agent: Drugs of abuse (opioids, cannabis, cocaine, amphetamines, alcohol, tobacco, sedatives) - Host factors: Age (peak 15-24 years), male>female, personality disorders, mental illness, peer pressure, curiosity - Environmental factors: Drug availability, socioeconomic factors, urbanization, peer groups, family dysfunction, stress **FORMAT FOR PDF:** - Title: Question Paper Name + Year at top - For each question: bold Q number, then structured answer - Use bullet points and sub-bullets - Include brief tables where helpful - Keep answers exam-standard length **TECHNICAL INSTRUCTIONS:** Use Python reportlab to create PDFs. Save to: - /tmp/workspace/community_medicine_answers/paper1_2014_formative.pdf - /tmp/workspace/community_medicine_answers/paper2_aug2014.pdf - /tmp/workspace/community_medicine_answers/paper3_may2016.pdf First run: mkdir -p /tmp/workspace/community_medicine_answers Use reportlab with proper fonts, margins. Each PDF should be clean and professional. Return the exact file paths created and confirm all 3 PDFs are successfully generated.

general-purpose

You are a medical education expert writing K Park-based Community Medicine exam answers for MBBS 5th Semester students at Nepal Medical College. Create SIX separate PDF files (one per question paper) with complete, impressive, mark-scoring answers based on K Park's Textbook of Preventive and Social Medicine. **PAPERS TO COVER:** --- PAPER 4: NMC June/July 2017 Sessional, Community Medicine, Full Marks 50 SAQ (6x5=30): 1. Describe the strategy for elimination of Poliomyelitis in Nepal (5 marks) 2. What are the occupational hazards of carpet weavers? How can we prevent these hazards? (3+2) 3. Describe the epidemiology (agent, host and environmental factors) of Drug dependence (5) 4. Briefly discuss what is syndromic approach with sexually transmitted diseases (STDs) as an example (5) 5. Enumerate the common emerging and re-emerging diseases. Describe the prevention and control of any one emerging disease (2+3) 6. Describe the normal probability curve (5) PBQ (20 marks): 7. A 20-year-old male student comes to the OPD with high grade fever, body ache and severe headache since 3 days. On examination, the temperature is 104°F, pulse is 97 and respiratory rate is 18 breaths per minute. There is rash over the hands and body. On systemic examination there is no abnormality detected. a. What is your differential diagnosis? (2) b. Who is a probable case of Dengue? (2) c. What are the warning signs in Dengue? (2) d. What investigations will you ask for a suspected case? (2) e. How will you manage this patient? (2) 8. A 2-year-old female child weighing 13kg is brought to the primary health care centre in rural Nepal with h/o passing 3-4 loose watery stools since 2 days. There is no blood or mucous in the stools. On examination the child is afebrile, alert, restless and thirsty. The skin pinch goes back slowly. a. What are the common causes of diarrhoea in under five children? (4) b. How will you classify the hydration status of this child? (2) c. How will you treat this child? (2) d. What advice will you give the mother? (2) --- PAPER 5: NMC June 2019 Sessional, Community Medicine, Full Marks 50 SAQ (SAQ 6x5=30): 1. Enumerate vector borne diseases in Nepal. Discuss on prevention & control of Kalaazar in Nepal (2.5+2.5) 2. Differentiate between paucibacillary and multibacillary leprosy. Outline strategy for National Leprosy Control Program in Nepal (2.5+2.5) 3. What is Drug dependency? Write briefly on epidemiological determinants of drug dependency (2+3) 4. List the vaccines of National Immunization Program and mention dose, mode of administration and schedule of those vaccines (5) 5. What is meant by "concentrated epidemic" and "generalized epidemic" of HIV infection? Write briefly on trend of HIV infection in Nepal from year 2000AD (3.5+1.5) 6. Write short notes on: a. Normal Distribution Curve b. Binomial probability distribution (2.5+2.5) PBQ (PBQ 10x2=20): 7. A 45-year-old factory worker who had been working in a cement factory for past 25 years developed irritant cough, chest pain and dyspnea on exertion. He was the sole earner of the family which comprised of his wife and 2 children. On investigation, Chest X-Ray showed "snow storm" appearance in lung fields. Sputum examination did not show antitubercle bacilli. a. Establish the provisional diagnosis with reasons (4) b. List the measures for preventing this disease condition (3) c. Write briefly on socio economic consequences of his illness on family (3) 8. A 30-year-old male from Province 5, Terai region was brought to hospital with complaint of fever with chills and rigors. Blood smear revealed plasmodium parasite. a. Establish provisional diagnosis with reasons (3) b. List the INDICATORS related to this disease (3) c. Write on Prevention and management of this disease (4) --- PAPER 6: NMC January 2022 Formative, Community Medicine, Full Marks 40 SAQ (6x5=30): 1. Describe the categories of contact and post-exposure prophylaxis for contact with suspected rabid animal as recommended by WHO (2+3=5) 2. Write on the different types of Influenza vaccines (5) 3. Write about the goals and various activities conducted to control lymphatic filariasis in Nepal (5) 4. Enumerate the host factors, demographic factors and social factors of sexually transmitted disease. Write its control measures (3+2=5) 5. Explain the epidemiology and control measures of Japanese Encephalitis (1.5+3.5=5) 6. What are the actions that can be taken in order to control diarrhoeal disease outbreak in a community? (5) PBQ (1x10=10): 7. A 38-year-old male who was a bus conductor by occupation came to the Primary Health Care Center (PHCC) with complaints of productive cough and low-grade fever for 3 weeks. He noticed a small amount of blood in the sputum one day ago. On examination, the BMI was found to be 18 kg/m2, the temperature was 98.4°F, respiratory rate was 12 per minute and no abnormality was detected on systemic examination. No lymphadenopathy was seen. Sputum was sent for microscopy which revealed AFB. a. Give your probable diagnosis with reasons (2) b. How will you manage this patient? (2) c. Explain the importance of immediate treatment initiation in this case (2) d. Write briefly on the objectives of national plan for this disease (4) --- PAPER 7: NMC January 2023 Formative, Community Medicine, Full Marks 35 SAQ: 1. Write on vision, goal and major activities conducted in Nepal to control HIV and STI in FY 2077/78 (2020/2021) (1+1+3=5) 2. Write on various medical and social factors which pose challenge to the control of Pulmonary Tuberculosis in the community (5) 3. Enumerate the agent, host and environmental factors that play a role in Enteric fever. Write briefly about the vaccines for this disease (3+2=5) 4. List the agent and host factors associated with the Dengue. Discuss on the role of environmental factors to control dengue outbreak (2+3=5) 5. Explain in brief about the control of diarrhoeal disease (5) PBQ: 6. A 20-year-old male comes to the emergency department of a hospital at night with history of dog-bite half an hour ago. He reports that the stray dog has been seen frequently in the locality. On examination, the bite was seen on the left leg with tears on the clothing. There was some bleeding seen as well. The wound does not require any suturing. The person appears apprehensive however his general condition is fair. a. According to the above given information, how will you categorize this young person's exposure to Rabies virus (RABV)? (2) b. How will you manage this case of dog bite? (2) c. What are the modern vaccines for rabies? What is the advantage of intradermal vaccination? (2+1=3) d. Write about the elimination of deaths due to dog associated rabies (3) --- PAPER 8: NMC March 2025 Formative, Community Medicine, Full Marks 40 SAQ: 1. Write about the agent, host and environmental factors that play a role in Enteric fever. Write briefly about the vaccines for this disease (1+1+1+2) 2. Describe the public health importance of Plague. Write about pre-exposure chemoprophylaxis for plague (3+2) 3. Describe the post-exposure prophylaxis for Rabies in Nepal (5) 4. Discuss briefly on prevention of mother-to-child transmission (PMTCT) of HIV (5) 5. Write on goal, objectives and major activities of national lymphatic filariasis elimination program FY 2079/80 (1+2+2) 6. What are the methods of control of Dengue in a community? (5) PBQ: 7. A 50-year-old industrial worker, a diagnosed case of diabetes developed cough with blood in the sputum. On examination his BMI was 18kg/m2. Sputum examination revealed bacilli in the sputum. He was put under anti-tubercular medication. He revealed that another worker was having the same health problem. a. List the factors mentioned in the problem which made the worker susceptible to tuberculosis (2) b. Write important features of the vaccine given to prevent this disease (4) c. List the investigations which help in detecting the resistant cases (1) d. What are social factors which makes it difficult to prevent and control this disease in the community? (3) --- PAPER 9: NMC January 2026 Formative, Community Medicine SAQ: 1. Mention the high-risk groups of HIV disease. Write briefly on prevention of mother-to-child transmission (2+3=5) 2. Write briefly on vision and main activities of National Malaria Control Program FY 2080/81 (2023/24) (1+4=5) 3. Write the preventive and control measures of Japanese encephalitis (5) 4. Describe the WHO categories for exposure to Rabies. What are the advantages of the intradermal vaccination for Rabies? (3+2=5) 5. Describe epidemiology of cholera. Briefly explain about its prevention (3+2=5) PBQ: 6. A 45-year-old construction worker, a diagnosed case of diabetes developed cough with blood in the sputum. On examination his BMI was 17kg/m2. Sputum examination revealed bacilli in the sputum and it was shown from a test that he was having drug resistant tuberculosis. a. What are the factors mentioned in the problem which made the worker susceptible to tuberculosis? (2) b. Write briefly on different types of drug resistance for tuberculosis cases (4) c. List the investigations to diagnose drug resistant tuberculosis (2) d. What are social factors which makes it difficult to prevent and control this disease in the community? (2) --- **KEY K PARK CONTENT TO USE FOR ANSWERS:** POLIOMYELITIS ELIMINATION (K Park): - Strategy: 1) High routine immunization (OPV schedule: 6,10,14 weeks + booster 18 months), 2) Pulse Immunization/NIDs (National Immunization Days) - 2 rounds/year to all children <5yrs regardless of previous vaccination, 3) AFP surveillance (Acute Flaccid Paralysis) - mandatory reporting of all AFP cases, 4) Mopping-up operations in high risk areas, 5) Certification: 3 years zero AFP with NPAFP rate >1/100,000 - Vaccines: OPV (oral) and IPV (injectable); bOPV in NIDs - Nepal certified polio-free DENGUE (K Park): - Probable case: Acute febrile illness (2-7 days) + 2 of: headache, retro-orbital pain, myalgia, arthralgia, rash, leucopenia, thrombocytopenia, rising haematocrit - Warning signs (WHO 2009): Abdominal pain/tenderness, persistent vomiting, clinical fluid accumulation, mucosal bleeding, lethargy/restlessness, liver enlargement >2cm, increase in HCT + rapid decrease in platelet count - Investigations: NS1 antigen (Day 1-5), IgM/IgG antibody (Day 5 onwards), CBC with platelets, HCT, LFT - Management: Supportive only; Paracetamol (NOT aspirin/ibuprofen); oral fluids if tolerating; IV fluids if warning signs; platelet transfusion if <20,000 with bleeding DIARRHOEA: - Causes in <5 years: Rotavirus (most common), E.coli (ETEC), Shigella, Salmonella, Campylobacter, Giardia, Cryptosporidium, V.cholerae; predisposing: malnutrition, poor hygiene - Plan B (some dehydration): ORS 75ml/kg over 4 hours; reassess; Zinc 10mg/day for 10-14 days (reduces severity/duration by 25%); continue breastfeeding; no antibiotics for watery diarrhoea - Advice to mother (IMCI): Continue breastfeeding, give more ORS after each stool, continue feeding, give zinc, return if worse RABIES (K Park): - Categories: I (touch/licks intact skin - no PEP), II (nibbles/minor scratches no bleeding - wash+vaccine), III (transdermal bites/scratches, licks on broken skin/mucosa - wash+vaccine+RIG) - Wound wash: soap & water 15 minutes, then povidone iodine 2-3%, avoid suturing - Modern cell-culture vaccines: HDCV (Human Diploid Cell Vaccine), PCECV (Purified Chick Embryo Cell Vaccine), PVRV (Purified Vero Cell Rabies Vaccine) - Intradermal advantage: Uses 60-80% less vaccine volume, cost-effective, equally immunogenic - IM regimens: Essen (5 doses: D0,3,7,14,28); Zagreb (2-1-1: 2 doses D0, 1 dose D7, 1 dose D21) - ID regimen: 2-site ID (0.1ml each site) on D0,3,7,28 - RIG: HRIG 20IU/kg or ERIG 40IU/kg infiltrated around wound on Day 0 - Elimination of dog-mediated rabies: WHO global target to eliminate human deaths from dog-mediated rabies by 2030; "Zero by 30" strategy; vaccinate 70% of dog population, PEP access, surveillance LEPROSY (K Park): - PB Leprosy: 1-5 skin lesions, 1 nerve; MB: 6+ lesions, 2+ nerves; smear positive = always MB - Differentiation: PB - few lesions, well-defined edges, hypoaesthetic, dry; MB - multiple lesions, poorly-defined, less impaired sensation, smear positive - MDT: PB - Rifampicin 600mg monthly + Dapsone 100mg daily × 6 months; MB - Rifampicin 600mg monthly + Clofazimine 300mg monthly + Dapsone 100mg daily + Clofazimine 50mg daily × 12 months - Nepal National Leprosy Control Program: Goal - eliminate leprosy (prevalence <1/10,000); integrated into primary health care; MDT services free; contact tracing; disability prevention; rehabilitation DRUG DEPENDENCY (K Park): - WHO definition: A state arising from repeated administration of a drug causing harm to individual and/or society - Epidemiological determinants/Agent: Psychoactive drugs - opioids (heroin, morphine), cannabis, cocaine, amphetamines, alcohol, sedatives; properties: euphoria, tolerance, physical/psychological dependence - Host: Age 15-24 years (most vulnerable), male>>female, low self-esteem, family history, mental health disorders, trauma, curiosity - Environment: Peer pressure, drug availability/trafficking, urbanization, unemployment, poverty, lack of recreational facilities, social disruption INFLUENZA VACCINES (K Park): - Types: 1) Trivalent inactivated vaccine (TIV) - IM injection; 2) Live attenuated influenza vaccine (LAIV) - intranasal; 3) Quadrivalent inactivated vaccine (QIV) - covers 4 strains; 4) High-dose TIV - for >65 years; 5) Adjuvanted vaccine; 6) Cell-culture derived; 7) Recombinant hemagglutinin vaccine - Composition updated annually based on WHO surveillance - Target groups: elderly >65, healthcare workers, pregnant women, chronic disease patients, children 6months-5years JAPANESE ENCEPHALITIS (K Park): - Agent: JE virus (Flavivirus), reservoir: pigs + wading birds; vector: Culex tritaeniorhynchus mosquito - Epidemiology: Endemic in SE Asia; in Nepal: Terai region; peak: July-September (monsoon) - Clinical: Fever, headache, vomiting → seizures, altered consciousness, paralysis; CFR 20-30%; neurological sequelae in survivors - Control: 1) Vaccination (SA-14-14-2 live attenuated vaccine, JEVAX); 2) Vector control (Culex mosquito): drainage, larviciding, IRS; 3) Pig vaccination in endemic areas; 4) Avoid outdoor activity at night during peak season; 5) Mosquito nets/repellents LYMPHATIC FILARIASIS (K Park Nepal): - Causative agent: Wuchereria bancrofti; vector: Culex quinquefasciatus - MDA program Nepal: DEC (6mg/kg) + Albendazole (400mg) once annually to all eligible persons in endemic districts - Goal: Reduce microfilaria rate to <1%; achieve >65% therapeutic coverage for 5 consecutive years - Other activities: Morbidity management (hydrocele surgery, lymphoedema management), vector control - National program: National lymphatic filariasis elimination program under EDCD Nepal SILICOSIS/PNEUMOCONIOSIS (K Park): - Silicosis: Caused by inhalation of free crystalline silica (SiO2); in cement workers, quarry workers, miners - CXR "snow storm": Small rounded opacities in upper/mid zones; in advanced: progressive massive fibrosis - Provisional diagnosis: Silicosis (occupational history 25 years cement + typical CXR + no AFB) - Prevention: Engineering controls (wet drilling, dust suppression, ventilation, enclosure), Administrative (job rotation, reduced work hours), PPE (respirators), Medical surveillance (annual CXR, spirometry), Pre-employment examination - Socioeconomic consequences: Loss of income (sole earner), family poverty, children may drop school, wife may need to work, social stigma, healthcare costs, disability MALARIA INDICATORS (K Park): - Spleen Rate (SR): % population with enlarged spleen (>2yr age) - Parasite Rate (PR): % population with parasites in blood - Annual Blood Examination Rate (ABER): % population examined per year (target >10%) - Annual Parasite Incidence (API): Confirmed malaria cases per 1000 population per year - Slide Positivity Rate (SPR): % positive slides among examined - Infant Parasite Rate (IPR): % infants with malaria parasites SILICOSIS CASE TREATMENT/MALARIA MANAGEMENT: - P.falciparum uncomplicated: ACT = Artemether-Lumefantrine (AL) - 6 doses over 3 days (AL 80/480mg: 4 tabs at 0,8,24,36,48,60 hours for adults) - P.vivax: Chloroquine 25mg/kg over 3 days + Primaquine 0.25mg/kg/day for 14 days (test G6PD first) HIV: - Concentrated epidemic: Prevalence >5% in defined high-risk group but <1% in general population (e.g. IDU, FSW, MSM) - Generalized epidemic: Prevalence >1% in general population (indicates widespread transmission) - Nepal situation: Concentrated epidemic; declining since 2000; PWID, FSW, MSM, migrant workers are key populations NATIONAL IMMUNIZATION PROGRAM Nepal vaccines (K Park framework): - BCG: Birth, 0.1ml ID right deltoid - OPV: 6,10,14 weeks, 2 drops oral + booster at 18 months - DPT-HepB-Hib (Pentavalent): 6,10,14 weeks, 0.5ml IM anterolateral thigh - PCV (Pneumococcal): 6,10,14 weeks, 0.5ml IM - Rotavirus (Rota-Teq): 6,10 weeks, 1.5ml oral - IPV: 14 weeks, 0.5ml IM - MR (Measles-Rubella): 9 months, 0.5ml SC right upper arm; booster at 15 months - JE vaccine: 12 months, 0.5ml SC; booster at 24 months - TT: School girls class 6,7 and pregnant women - Td: 15-35yr women, school children TUBERCULOSIS (K Park): - AFB sputum positive + symptoms = smear positive PTB → Category I DOTS - DOTS Nepal: 6-month regimen: 2HRZE/4HR (Isoniazid H + Rifampicin R + Pyrazinamide Z + Ethambutol E) - BCG vaccine: Live attenuated Mycobacterium bovis; given at birth; 0.1ml ID; efficacy 70-80% against severe forms - Drug resistance types: Primary resistance (never treated), Acquired/Secondary (previously treated); MDR (H+R), XDR (MDR + fluoroquinolone + injectable), TDR (total drug resistance) - Investigations for resistance: Xpert MTB/RIF, Culture + Drug Susceptibility Testing (DST), Line Probe Assay (LPA) - Social factors hindering control: Poverty, overcrowding, malnutrition, migration, stigma, health system gaps, poor compliance STD/RTI SYNDROMIC APPROACH (K Park): - Definition: Treatment based on clinical syndromes without waiting for lab results; uses flow charts/algorithms - Advantages: Immediate treatment, no lab required (useful in resource-poor settings), treats common causative organisms - STD syndromes: 1) Urethral discharge (treat gonorrhoea + chlamydia), 2) Vaginal discharge (treat gonorrhoea+chlamydia+BV+trichomoniasis), 3) Genital ulcer disease (treat syphilis+chancroid+HSV), 4) Scrotal swelling, 5) Lower abdominal pain in women (PID) - Disadvantage: Overtreatment, may miss asymptomatic infections EMERGING & RE-EMERGING DISEASES (K Park): - Emerging: Diseases newly appearing in population - COVID-19, Nipah, Ebola, SARS, Hendra, MERS, Zika, West Nile - Re-emerging: Previously controlled diseases reappearing - TB, Cholera, Dengue, Plague, Diphtheria - Prevention/Control of COVID-19 as example: Vaccination, masking, hand hygiene, social distancing, surveillance, travel restrictions, contact tracing ENTERIC FEVER (Typhoid - K Park): - Agent: Salmonella typhi (typhoid), S. paratyphi A/B/C (paratyphoid); gram-negative rod - Host: Humans only reservoir; all ages; low immunity in endemic areas; risk: contaminated food/water ingestion - Environment: Poor sanitation, contaminated water supply, food handlers as carriers, overcrowding - Vaccines: 1) Vi polysaccharide (ViPS) vaccine - 1 dose SC/IM, ≥2 years, protects 3 years; 2) Ty21a oral live attenuated - 3 doses alternate days, protects 3-5 years; 3) Vi-TT conjugate vaccine (Typbar-TCV) - preferred, 1 dose, from 6 months, long-lasting CHOLERA (K Park): - Epidemiology: Agent - Vibrio cholerae O1/O139; El Tor biotype; feco-oral route; 'rice water' stools; IP: few hours to 5 days; reservoir: humans + environment (estuaries) - John Snow's Broad Street pump - classic epidemiological investigation - Prevention: Safe water (boiling/chlorination/ORS), hand washing, sanitation, food hygiene; Oral cholera vaccine (OCV: Shanchol, Dukoral) for high-risk areas; surveillance; case isolation; disinfection PMTCT of HIV (K Park): - 4 prongs: 1) Primary prevention of HIV in women of reproductive age, 2) Prevention of unintended pregnancies in HIV+women, 3) Prevention of HIV transmission from HIV+ mother to child, 4) Care, treatment and support - Prong 3 interventions: ART to mother during pregnancy, labour, delivery and postpartum; Option B+ (lifelong ART for all HIV+ pregnant women regardless of CD4); EID (early infant diagnosis); safe delivery practices; infant prophylaxis (NVP for 6 weeks); safe infant feeding (exclusive breastfeeding up to 6 months if replacement feeding not affordable/safe/acceptable/feasible/sustainable) PLAGUE (K Park): - Public health importance: Historically "Black Death" causing millions of deaths; WHO notifiable disease; reservoir in rodents; sudden epidemics possible; high CFR if untreated; bioterrorism potential - Types: Bubonic (lymphadenitis), Septicemic, Pneumonic (most dangerous - droplet spread) - Pre-exposure chemoprophylaxis: Doxycycline 100mg BD or Ciprofloxacin 500mg BD for 7 days for close contacts of pneumonic plague SILICOSIS - this 45yr factory worker has silicosis NOT TB: - "Snow storm" appearance = bilateral nodular opacities = silicosis - Sputum AFB negative confirms NOT TB - 25 years cement factory = chronic occupational silica exposure - Silicosis has NO specific treatment; management: remove from exposure, treat complications, bronchodilators, treat superimposed infections, lung transplant in severe cases TB SUSCEPTIBILITY FACTORS: - Factors in the case: Diabetes mellitus (3x higher risk), low BMI (malnutrition = immunosuppression), occupational exposure (construction/industrial dust), contact with another case (infectious contact) - BCG vaccine features: Live attenuated M. bovis, given at birth ID, efficacy 70-80% against severe forms (miliary TB, TB meningitis), duration ~10-15 years, does NOT prevent pulmonary TB reliably in adults DIARRHOEA CONTROL IN COMMUNITY OUTBREAK (K Park): - Immediate: Case finding and treatment (ORS, IV fluids), case isolation, epidemiological investigation (source), water testing - Water/sanitation: Emergency chlorination, boiling water advice, safe water distribution, improve latrines - Health education: Hand washing, food safety, safe water - Surveillance: Active case finding, line listing, spot map - Reporting to health authorities **FORMAT FOR PDF:** - Title at top: Exam name + Year + Subject - For each question: BOLD Q number, structured answer with headings - Use bullet points, sub-bullets, tables where helpful - Keep K Park references implicit (the style/content) - Exam-standard length answers **TECHNICAL INSTRUCTIONS:** Use Python reportlab to create PDFs. Save to: - /tmp/workspace/community_medicine_answers/paper4_june2017.pdf - /tmp/workspace/community_medicine_answers/paper5_june2019.pdf - /tmp/workspace/community_medicine_answers/paper6_jan2022.pdf - /tmp/workspace/community_medicine_answers/paper7_jan2023.pdf - /tmp/workspace/community_medicine_answers/paper8_mar2025.pdf - /tmp/workspace/community_medicine_answers/paper9_jan2026.pdf First run: mkdir -p /tmp/workspace/community_medicine_answers Use reportlab with proper fonts, margins, 0.75 inch margins, font size 10 for body text, 12 for headings, 14 for title. Each PDF should be clean, professional and printable. Return the exact file paths created and confirm all 6 PDFs are successfully generated.

Reading File
Reading File
Running Command

mkdir -p /tmp/workspace/community_medicine_answers && echo "Directory created"

Running Command

mkdir -p /tmp/workspace/community_medicine_answers && echo "Directory created successfully"

Writing File

~/community_medicine_answers/paper4_gen.py

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

OUTPUT = "/tmp/workspace/community_medicine_answers/paper4_june2017.pdf"

doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    rightMargin=0.75*inch,
    leftMargin=0.75*inch,
    topMargin=0.75*inch,
    bottomMargin=0.75*inch
)

W = A4[0] - 1.5*inch

styles = getSampleStyleSheet()

TITLE = ParagraphStyle('Title', parent=styles['Normal'], fontSize=14, leading=18,
                        alignment=TA_CENTER, fontName='Helvetica-Bold', spaceAfter=4)
SUBTITLE = ParagraphStyle('Subtitle', parent=styles['Normal'], fontSize=11, leading=14,
                           alignment=TA_CENTER, fontName='Helvetica-Bold', spaceAfter=8)
QHEAD = ParagraphStyle('QHead', parent=styles['Normal'], fontSize=12, leading=15,
                        fontName='Helvetica-Bold', spaceBefore=10, spaceAfter=4,
                        textColor=colors.HexColor('#1a3a5c'))
SUBHEAD = ParagraphStyle('SubHead', parent=styles['Normal'], fontSize=10.5, leading=14,
                          fontName='Helvetica-Bold', spaceBefore=6, spaceAfter=2)
BODY = ParagraphStyle('Body', parent=styles['Normal'], fontSize=10, leading=14,
                       fontName='Helvetica', spaceAfter=2, alignment=TA_JUSTIFY)
BULLET = ParagraphStyle('Bullet', parent=styles['Normal'], fontSize=10, leading=13,
                         fontName='Helvetica', leftIndent=16, spaceAfter=1)
SUBBULLET = ParagraphStyle('SubBullet', parent=styles['Normal'], fontSize=10, leading=13,
                            fontName='Helvetica', leftIndent=32, spaceAfter=1)
NOTE = ParagraphStyle('Note', parent=styles['Normal'], fontSize=9.5, leading=13,
                       fontName='Helvetica-Oblique', textColor=colors.HexColor('#444444'))

def hr():
    return HRFlowable(width="100%", thickness=1, color=colors.HexColor('#1a3a5c'), spaceAfter=4, spaceBefore=4)

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

def p(text, style=BODY):
    return Paragraph(text, style)

def b(text):
    return Paragraph(f"• {text}", BULLET)

def sb(text):
    return Paragraph(f"– {text}", SUBBULLET)

def q(text):
    return Paragraph(text, QHEAD)

def sh(text):
    return Paragraph(text, SUBHEAD)

story = []

# ── HEADER ──────────────────────────────────────────────────────────────────
story += [
    p("NEPAL MEDICAL COLLEGE", TITLE),
    p("NMC June/July 2017 Sessional Examination", SUBTITLE),
    p("Subject: Community Medicine  |  Full Marks: 50  |  Time: 3 Hours", SUBTITLE),
    p("Model Answers Based on K Park's Textbook of Preventive and Social Medicine", NOTE),
    hr(), sp(6),
]

# ════════════════════════════════════════════════════════════════════════════
story += [p("<b>SHORT ANSWER QUESTIONS (SAQ) — 6 × 5 = 30 Marks</b>", SUBTITLE), hr()]

# ── Q1 ──────────────────────────────────────────────────────────────────────
story += [
    q("Q1. Describe the strategy for elimination of Poliomyelitis in Nepal. [5 marks]"),
    sh("Introduction"),
    p("Poliomyelitis is an acute viral infectious disease caused by poliovirus (types 1, 2, 3). Nepal was certified polio-free along with the South-East Asia Region by WHO in March 2014. The Global Polio Eradication Initiative (GPEI) launched in 1988 provided the framework. K Park outlines four key strategies:"),
    sp(3),
    sh("1. High Routine Immunization Coverage"),
    b("OPV Schedule in Nepal (NIP): 6 weeks, 10 weeks, 14 weeks + booster at 18 months"),
    b("IPV (Injectable Polio Vaccine): given at 14 weeks alongside OPV (added to NIP for extra mucosal immunity)"),
    b("Target: ≥90% coverage in all districts; every missed child is a reservoir"),
    b("OPV produces both humoral and mucosal (secretory IgA) immunity — interrupts fecal-oral transmission"),
    sp(3),
    sh("2. Supplementary Immunization Activities (SIAs) / Pulse Immunization"),
    b("National Immunization Days (NIDs): 2 rounds per year (usually Jan–Feb)"),
    b("All children <5 years vaccinated regardless of previous vaccination status"),
    b("Oral bOPV (bivalent: types 1+3) used in NIDs; covers entire country simultaneously"),
    b("Sub-National Immunization Days (SNIDs): in high-risk districts"),
    b("Rationale: Creates sufficient herd immunity to interrupt wild poliovirus transmission rapidly"),
    sp(3),
    sh("3. Acute Flaccid Paralysis (AFP) Surveillance"),
    b("AFP is the hallmark clinical presentation of poliomyelitis"),
    b("Non-Polio AFP Rate (NPAFP): Target ≥1 per 100,000 children <15 years (sensitive surveillance indicator)"),
    b("All AFP cases → mandatory reporting within 24 hours → stool specimens (2 samples, 24–48 hrs apart) within 14 days of onset"),
    b("Specimens sent to WHO-accredited laboratory (National Public Health Laboratory, Teku, Nepal)"),
    b("Virological classification within 60 days of onset"),
    sp(3),
    sh("4. Mop-Up Immunization"),
    b("Targeted house-to-house immunization in areas with confirmed polio case or high risk (migratory population, low coverage, open borders)"),
    b("Nepal-India border areas historically given special attention"),
    b("Conducted within 4 weeks of detecting a case/high-risk signal"),
    sp(3),
    sh("5. Certification"),
    b("3 consecutive years of zero AFP cases with adequate surveillance performance"),
    b("NPAFP rate ≥1/100,000 under-15 children maintained"),
    b("Independent Certification Commission verifies absence of wild poliovirus"),
    b("<b>Nepal Achievement:</b> Certified polio-free — South-East Asia Region declared polio-free on 27 March 2014"),
    sp(3),
    sh("Vaccines Used"),
    p("• <b>OPV (Oral Polio Vaccine / Sabin):</b> Live attenuated; oral; cheap; induces gut immunity; used in NIDs and routine<br/>"
      "• <b>IPV (Inactivated Polio Vaccine / Salk):</b> Killed; injectable; no VAPP risk; added to Nepal NIP schedule<br/>"
      "• <b>bOPV:</b> Bivalent (types 1+3) — used after type 2 eradication (2016 switch)"),
    sp(6),
]

# ── Q2 ──────────────────────────────────────────────────────────────────────
story += [
    q("Q2. What are the occupational hazards of carpet weavers? How can we prevent these hazards? [3+2 marks]"),
    sh("Occupational Hazards of Carpet Weavers (3 marks)"),
    p("<b>A. Physical/Musculoskeletal Hazards:</b>"),
    b("Musculoskeletal disorders: Prolonged sitting in awkward posture → cervical spondylosis, back pain, knee joint pain"),
    b("Repetitive strain injury (RSI): Wrist, finger, shoulder pain from repeated knotting movements"),
    b("Occupational Overuse Syndrome"),
    sp(2),
    p("<b>B. Occupational Lung Disease:</b>"),
    b("Wool and fiber dust inhalation → occupational asthma, allergic rhinitis"),
    b("Byssinosis-like syndrome from natural fiber dust"),
    b("Risk of TB: poorly ventilated, crowded workplaces"),
    sp(2),
    p("<b>C. Eye Hazards:</b>"),
    b("Eye strain (asthenopia): Fine, detailed work in poor lighting"),
    b("Conjunctivitis from dust and fiber particles"),
    sp(2),
    p("<b>D. Chemical Hazards:</b>"),
    b("Exposure to synthetic dyes and bleaching agents → dermatitis, allergies, possible carcinogenicity"),
    b("Fumes from chemical dyes → respiratory irritation"),
    sp(2),
    p("<b>E. Psychosocial Hazards:</b>"),
    b("Child labor: Children employed for small fingers — deprived of education, physical/cognitive development"),
    b("Long working hours, monotony → stress, fatigue, mental health problems"),
    b("Poor wages, job insecurity → occupational stress"),
    sp(2),
    p("<b>F. Noise:</b>"),
    b("Loom noise can cause noise-induced hearing loss over time"),
    sp(3),
    sh("Prevention of Hazards (2 marks)"),
    p("<b>Engineering Controls:</b>"),
    b("Ergonomic workstations: Adjustable looms, proper sitting height to prevent musculoskeletal disorders"),
    b("Adequate ventilation and exhaust systems to remove dust and chemical fumes"),
    b("Good lighting to prevent eye strain"),
    sp(2),
    p("<b>Administrative Controls:</b>"),
    b("Regulation of working hours; mandatory rest breaks"),
    b("Prohibition of child labor (Children's Act, Labor Act Nepal)"),
    b("Job rotation to minimize repetitive strain"),
    sp(2),
    p("<b>Personal Protective Equipment (PPE):</b>"),
    b("Dust masks/respirators for fiber and dye dust"),
    b("Protective eyewear in dusty environments"),
    b("Gloves when handling chemical dyes"),
    sp(2),
    p("<b>Medical Surveillance:</b>"),
    b("Pre-employment and periodic health check-ups"),
    b("Lung function tests (spirometry) annually"),
    b("Early treatment and removal from exposure if disease develops"),
    sp(2),
    p("<b>Legislation:</b>"),
    b("Enforcement of Factories Act/Labor Act provisions on occupational safety"),
    b("Registration of carpet factories; regular inspection"),
    sp(6),
]

# ── Q3 ──────────────────────────────────────────────────────────────────────
story += [
    q("Q3. Describe the epidemiology (agent, host and environmental factors) of Drug Dependence. [5 marks]"),
    sh("Definition (K Park)"),
    p("Drug dependence is defined by WHO as: <i>'A state, psychic and sometimes also physical, resulting from the interaction between a living organism and a drug, characterized by behavioral and other responses that always include a compulsion to take the drug on a continuous or periodic basis in order to experience its psychic effects, and sometimes to avoid the discomfort of its absence.'</i>"),
    sp(3),
    sh("Agent Factors"),
    b("<b>Types of Dependence-Producing Drugs:</b>"),
    sb("Opioids: Heroin (most abused), morphine, codeine, pethidine — cause strong physical + psychological dependence"),
    sb("Cannabis group: Ganja, charas, hashish — psychological dependence, less physical dependence"),
    sb("Cocaine: CNS stimulant; intense psychological dependence; no physical dependence"),
    sb("Amphetamines: Stimulants; 'speed', 'crystal meth' — psychological dependence"),
    sb("Sedatives/Hypnotics: Benzodiazepines, barbiturates — physical + psychological dependence"),
    sb("Alcohol: Most widely abused; both physical and psychological dependence"),
    sb("Hallucinogens: LSD, PCP — primarily psychological dependence"),
    sb("Tobacco/Nicotine: Physical + psychological dependence"),
    b("<b>Drug Properties promoting dependence:</b>"),
    sb("Euphoria/pleasure effect, rapid onset of action, tolerance development (need increasing doses), withdrawal symptoms on cessation"),
    sp(3),
    sh("Host Factors"),
    b("<b>Age:</b> Peak onset 15–24 years; adolescents most vulnerable due to identity crises, peer influence, risk-taking behavior"),
    b("<b>Sex:</b> Males >> Females (male-to-female ratio ≈ 4:1 in South Asia)"),
    b("<b>Personality:</b> Low self-esteem, thrill-seeking, poor impulse control, antisocial personality"),
    b("<b>Mental health:</b> Depression, anxiety, PTSD — 'self-medication' of mental illness"),
    b("<b>Family history:</b> Genetic predisposition to addiction; family history of substance abuse"),
    b("<b>Prior exposure:</b> Tobacco/alcohol use → gateway to harder drugs"),
    b("<b>Knowledge/Attitude:</b> Lack of awareness about dangers; curiosity and experimentation"),
    sp(3),
    sh("Environmental Factors"),
    b("<b>Peer pressure:</b> Most important proximal factor — peer group use normalizes drug-taking"),
    b("<b>Availability and Trafficking:</b> Easy access due to Nepal's geographic location on drug trafficking routes"),
    b("<b>Family environment:</b> Dysfunctional families, child abuse, neglect, parental substance abuse"),
    b("<b>Socioeconomic factors:</b> Poverty, unemployment, poor housing → stress → substance abuse as coping mechanism"),
    b("<b>Urbanization and migration:</b> Rapid urbanization → social disruption, rootlessness, exposure"),
    b("<b>Lack of recreational facilities:</b> Idle youth with no positive activities are vulnerable"),
    b("<b>Media and advertising:</b> Glamorization of substance use"),
    b("<b>Social disruption:</b> Armed conflict, displacement, weak community bonds"),
    sp(3),
    sh("Consequences"),
    b("Medical: HIV/AIDS, Hepatitis B/C (IV drug users sharing needles), TB, malnutrition, liver disease, psychosis"),
    b("Social: Family breakdown, domestic violence, crime, loss of productivity"),
    b("Economic: Financial ruin of families; national burden"),
    sp(6),
]

# ── Q4 ──────────────────────────────────────────────────────────────────────
story += [
    q("Q4. Briefly discuss what is syndromic approach with sexually transmitted diseases (STDs) as an example. [5 marks]"),
    sh("Syndromic Approach — Definition"),
    p("The <b>syndromic approach</b> to STD/RTI management is a clinical algorithm-based strategy in which the patient is treated on the basis of presenting <b>syndrome</b> (a cluster of symptoms and signs) without awaiting laboratory confirmation. It uses standardized flow-charts to guide immediate treatment targeting all common organisms responsible for that particular syndrome."),
    sp(3),
    sh("Rationale (Why Syndromic Approach?)"),
    b("Laboratory facilities for STD diagnosis (culture, serology) are unavailable or costly in resource-poor settings"),
    b("Delays in treatment lead to complications (PID, infertility, neonatal infections) and continued transmission"),
    b("Most STDs are caused by predictable polymicrobial combinations"),
    b("Syndromic approach enables same-day treatment at first point of contact"),
    sp(3),
    sh("STD Syndromes and Their Treatment (Key Examples)"),
    p("The following are the major STD syndromes recognized by WHO/NACO:"),
    sp(3),
    p("<b>1. Urethral Discharge Syndrome (Male)</b>"),
    b("Organisms: Neisseria gonorrhoeae + Chlamydia trachomatis (almost always co-exist)"),
    b("Treatment: Cefixime 400mg stat (for gonorrhoea) + Azithromycin 1g stat (for chlamydia)"),
    sp(2),
    p("<b>2. Vaginal Discharge Syndrome (Female)</b>"),
    b("Organisms: Gonorrhoea + Chlamydia + Bacterial Vaginosis (BV) + Trichomonas vaginalis"),
    b("Treatment: Cefixime + Azithromycin + Metronidazole 2g stat (for BV/TV)"),
    sp(2),
    p("<b>3. Genital Ulcer Disease (GUD)</b>"),
    b("Organisms: Treponema pallidum (syphilis) + Haemophilus ducreyi (chancroid) + HSV-2"),
    b("Treatment: Benzathine penicillin 2.4 MU IM stat + Azithromycin 1g stat + Acyclovir 400mg TDS×7days"),
    sp(2),
    p("<b>4. Scrotal Swelling Syndrome</b>"),
    b("Organisms: Gonorrhoea + Chlamydia (epididymo-orchitis)"),
    b("Treatment: Cefixime + Doxycycline 100mg BD×14 days"),
    sp(2),
    p("<b>5. Lower Abdominal Pain in Women (Pelvic Inflammatory Disease — PID)</b>"),
    b("Organisms: Gonorrhoea + Chlamydia + anaerobes"),
    b("Treatment: Cefixime + Metronidazole + Doxycycline"),
    sp(3),
    sh("Advantages of Syndromic Approach"),
    b("Immediate, same-day treatment at first visit"),
    b("No laboratory required — ideal for rural PHC settings in Nepal"),
    b("Reduces complications (PID, infertility, neonatal ophthalmia)"),
    b("Reduces transmission to partners"),
    b("Cost-effective and reproducible by paramedics"),
    sp(3),
    sh("Disadvantages"),
    b("Overtreatment: Patients treated for organisms they may not have"),
    b("Asymptomatic infections missed (no syndromic trigger)"),
    b("Does not distinguish specific etiology — resistance patterns cannot be monitored"),
    b("Women with cervical infections often asymptomatic → missed by syndrome approach"),
    sp(6),
]

# ── Q5 ──────────────────────────────────────────────────────────────────────
story += [
    q("Q5. Enumerate the common emerging and re-emerging diseases. Describe the prevention and control of any one emerging disease. [2+3 marks]"),
    sh("Definitions"),
    b("<b>Emerging Infectious Diseases (EIDs):</b> Infections newly appearing in a population, or rapidly increasing in incidence or geographic range (K Park)"),
    b("<b>Re-emerging diseases:</b> Previously controlled diseases reappearing with increased incidence or in new geographic areas"),
    sp(3),
    sh("Common Emerging Diseases (2 marks)"),
    p("• COVID-19 (SARS-CoV-2) • SARS • MERS-CoV • Nipah virus disease • Ebola/Marburg hemorrhagic fevers<br/>"
      "• Hendra virus • Zika virus • West Nile fever • Avian Influenza (H5N1, H7N9) • Monkeypox<br/>"
      "• Lassa fever • Hantavirus pulmonary syndrome • Legionnaires' disease"),
    sp(2),
    sh("Common Re-emerging Diseases"),
    p("• Tuberculosis (MDR/XDR-TB) • Cholera (El Tor biotype) • Dengue fever • Malaria (drug-resistant)<br/>"
      "• Plague • Diphtheria • Measles • Yellow fever • Chikungunya"),
    sp(3),
    sh("Prevention and Control of COVID-19 (As an Emerging Disease) [3 marks]"),
    p("<b>Agent:</b> SARS-CoV-2 (Betacoronavirus); droplet + aerosol transmission; IP: 2–14 days"),
    sp(2),
    p("<b>1. Vaccination (Most important control measure):</b>"),
    b("WHO Emergency Use Listing: mRNA vaccines (Pfizer-BioNTech, Moderna), viral vector (AstraZeneca, Janssen), inactivated vaccines (Covaxin, CoronaVac)"),
    b("Nepal: Received COVAX doses; vaccinated priority groups (health workers, elderly) first"),
    b("Target: 70% population vaccinated for herd immunity"),
    sp(2),
    p("<b>2. Non-Pharmacological Interventions (NPIs):</b>"),
    b("Mask wearing (medical masks, N95 in high-risk settings)"),
    b("Physical/social distancing ≥1 meter"),
    b("Hand hygiene: soap & water ≥20 seconds or alcohol-based hand rub (ABHR)"),
    b("Ventilation: Open windows; avoid crowded indoor spaces"),
    sp(2),
    p("<b>3. Surveillance and Case Detection:</b>"),
    b("Integrated Disease Surveillance (IDS): Syndromic and event-based surveillance"),
    b("Genomic surveillance for variant detection"),
    b("Rapid diagnostic testing (RT-PCR, antigen RDTs)"),
    sp(2),
    p("<b>4. Isolation and Quarantine:</b>"),
    b("Confirmed cases: isolation ≥10 days from symptom onset"),
    b("Contacts: 14-day quarantine"),
    b("Dedicated isolation facilities/hospitals"),
    sp(2),
    p("<b>5. Contact Tracing:</b>"),
    b("Identify, notify and monitor all contacts of confirmed cases"),
    b("Digital tools (contact tracing apps) used in many countries"),
    sp(2),
    p("<b>6. International Measures:</b>"),
    b("Travel restrictions and screening at points of entry"),
    b("IHR (International Health Regulations) 2005 compliance"),
    b("WHO PHEIC (Public Health Emergency of International Concern) declaration"),
    sp(6),
]

# ── Q6 ──────────────────────────────────────────────────────────────────────
story += [
    q("Q6. Describe the Normal Probability Curve (Normal Distribution). [5 marks]"),
    sh("Definition"),
    p("The <b>Normal Distribution</b> (Gaussian Distribution) is a continuous probability distribution that is perfectly symmetrical and bell-shaped. It was described mathematically by Carl Friedrich Gauss. In biological and medical data, many variables (height, weight, blood pressure, IQ scores) follow a normal distribution."),
    sp(3),
    sh("Characteristics of the Normal Curve"),
    b("<b>Bell-shaped:</b> Symmetrical around the central mean — both sides are mirror images"),
    b("<b>Unimodal:</b> Has a single peak at the mean"),
    b("<b>Mean = Median = Mode:</b> All three measures of central tendency coincide at the centre"),
    b("<b>Asymptotic:</b> The tails extend infinitely on both sides but never touch the x-axis"),
    b("<b>Total area = 1 (100%):</b> The entire area under the curve equals 1"),
    b("<b>Defined by 2 parameters:</b> Mean (μ) — location; Standard Deviation (σ) — spread/shape"),
    sp(3),
    sh("Mathematical Expression"),
    p("f(x) = (1/σ√2π) × e^[−(x−μ)²/2σ²]"),
    p("where μ = mean, σ = standard deviation, π = 3.14159, e = 2.71828"),
    sp(3),
    sh("Properties: 1-2-3 Sigma Rule (Empirical Rule)"),
    p("This is the most important property for medical/exam use:"),
    data = [
        ["Range", "Area Under Curve", "% of Observations"],
        ["μ ± 1σ", "0.6827", "68.27%"],
        ["μ ± 2σ", "0.9545", "95.45%"],
        ["μ ± 3σ", "0.9973", "99.73%"],
        ["μ ± 1.96σ", "0.9500", "95.00%"],
        ["μ ± 2.58σ", "0.9900", "99.00%"],
    ]
    t = Table(data, colWidths=[W*0.3, W*0.35, W*0.35])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1a3a5c')),
        ('TEXTCOLOR', (0,0), (-1,0), colors.white),
        ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
        ('FONTSIZE', (0,0), (-1,-1), 9),
        ('ALIGN', (0,0), (-1,-1), 'CENTER'),
        ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f0f4f8'), colors.white]),
        ('GRID', (0,0), (-1,-1), 0.5, colors.grey),
        ('TOPPADDING', (0,0), (-1,-1), 4),
        ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ]))
    story.append(sp(4))
    story.append(t)
    story.append(sp(4))
]

story += [
    sh("Standard Normal Distribution (Z-distribution)"),
    b("When μ=0 and σ=1, the normal distribution becomes the <b>standard normal distribution (Z-distribution)</b>"),
    b("Z-score (standard score): Z = (X − μ) / σ  — converts any normal value to standard units"),
    b("Z-tables give probabilities for any value"),
    sp(3),
    sh("Medical Applications"),
    b("Setting reference ranges: Normal range = Mean ± 2SD covers 95% of healthy population"),
    b("Growth charts: Height/weight norms in children"),
    b("Basis for parametric statistical tests (t-test, ANOVA, Pearson's correlation)"),
    b("Hypothesis testing: Z-test and t-test assume normality"),
    b("Sample size calculations for clinical trials"),
    sp(6),
]

# ════════════════════════════════════════════════════════════════════════════
story += [p("<b>PROBLEM-BASED QUESTIONS (PBQ) — 20 Marks</b>", SUBTITLE), hr()]

# ── Q7 ──────────────────────────────────────────────────────────────────────
story += [
    q("Q7. Clinical Case — 20-year-old male, high grade fever, body ache, severe headache, rash, 3 days"),
    sh("a) Differential Diagnosis (2 marks)"),
    b("<b>1. Dengue Fever</b> — Most likely: fever 3 days, myalgia, headache, rash, age, no systemic pathology"),
    b("<b>2. Typhoid/Enteric Fever</b> — High fever, headache, body ache; rose spots possible but on trunk"),
    b("<b>3. Viral Exanthem</b> — Viral fever with rash (measles, rubella, chickenpox ruled out with history)"),
    b("<b>4. Leptospirosis</b> — Fever + myalgia + rash; history of water/rodent contact to be asked"),
    b("<b>5. Meningococcemia</b> — Fever + rash (petechial/purpuric) + headache — to be ruled out urgently"),
    sp(3),
    sh("b) WHO Case Definition — Probable Case of Dengue (2 marks)"),
    p("<b>Probable Dengue (WHO 2009 Revised Guidelines):</b>"),
    p("A person who lives in/travels to a <b>dengue-endemic area</b> with fever of <b>2–7 days</b> PLUS any <b>TWO</b> of the following:"),
    b("Headache / retro-orbital pain"),
    b("Myalgia / arthralgia ('breakbone fever')"),
    b("Rash (maculopapular, morbilliform or petechial)"),
    b("Leukopenia (WBC <5000/mm³)"),
    b("Thrombocytopenia (platelet <100,000/mm³)"),
    b("Positive tourniquet test"),
    b("Any warning sign (see below)"),
    p("<b>This patient fulfills probable dengue:</b> endemic area + fever 3 days + headache + body ache/myalgia + rash"),
    sp(3),
    sh("c) Warning Signs in Dengue (WHO 2009) [2 marks]"),
    p("Warning signs appear as fever defervesces (day 3–7) and indicate dengue with warning signs (Group B):"),
    b("Abdominal pain or tenderness"),
    b("Persistent vomiting (≥3 episodes in 24 hours)"),
    b("Clinical fluid accumulation (ascites, pleural effusion)"),
    b("Mucosal bleeding (gums, nose, vagina)"),
    b("Lethargy / restlessness / irritability"),
    b("Liver enlargement >2 cm below costal margin"),
    b("Increase in HCT (hemoconcentration) + rapid decrease in platelet count"),
    p("<i>Any warning sign requires hospitalization and IV fluid management.</i>"),
    sp(3),
    sh("d) Investigations for Suspected Dengue (2 marks)"),
    b("<b>NS1 Antigen (Day 1–5):</b> Detects dengue non-structural protein 1; positive in early febrile phase; high sensitivity"),
    b("<b>Dengue IgM/IgG ELISA (Day 5 onwards):</b> IgM = primary infection; IgG rise = secondary infection; dengue titre ≥1:1280"),
    b("<b>CBC with Platelets:</b> Leukopenia, thrombocytopenia (<100,000 = dengue; <20,000 = critical)"),
    b("<b>Haematocrit (HCT):</b> Rise of ≥20% from baseline = plasma leakage; monitor every 6–12 hours"),
    b("<b>Liver Function Tests (LFT):</b> Raised AST/ALT (hepatitis in severe dengue)"),
    b("<b>Urine Albumin:</b> Albuminuria indicates plasma leakage"),
    b("<b>Blood cultures:</b> To rule out bacteraemia"),
    sp(3),
    sh("e) Management of Dengue (2 marks)"),
    p("<b>NO specific antiviral therapy. Management is supportive.</b>"),
    sp(2),
    p("<b>Group A — Dengue without warning signs (can be treated at home):</b>"),
    b("Paracetamol 500mg–1g every 6 hours for fever (NOT aspirin or NSAIDs — cause gastric bleeding + platelet dysfunction)"),
    b("Oral fluids: ORS, fruit juices, coconut water — maintain urine output ≥500 ml/day"),
    b("Rest; return to hospital if warning signs develop"),
    b("Daily monitoring of CBC and platelets"),
    sp(2),
    p("<b>Group B — Dengue with Warning Signs (Hospitalize):</b>"),
    b("IV fluid resuscitation: Isotonic crystalloid (NS or Ringer's Lactate); start 5–7 ml/kg/hr"),
    b("Strict fluid balance monitoring; adjust IV rate based on HCT and clinical response"),
    b("Platelet transfusion ONLY if: platelet <20,000/mm³ WITH active bleeding"),
    b("Monitor vital signs, urine output every 1–2 hours"),
    sp(2),
    p("<b>Group C — Severe Dengue (ICU):</b>"),
    b("Rapid IV fluid bolus for dengue shock syndrome"),
    b("Blood transfusion if massive haemorrhage"),
    b("ICU monitoring"),
    sp(6),
]

# ── Q8 ──────────────────────────────────────────────────────────────────────
story += [
    q("Q8. Clinical Case — 2-year-old female, 13 kg, loose watery stools ×3–4, 2 days"),
    sh("a) Common Causes of Diarrhoea in Under-5 Children (4 marks)"),
    p("<b>Infectious Causes (Most Important):</b>"),
    b("<b>Viral (most common overall):</b> Rotavirus (most common cause of severe diarrhoea in <5 years), Norovirus, Adenovirus, Astrovirus"),
    b("<b>Bacterial:</b> Enterotoxigenic E. coli (ETEC — most common bacterial cause), Shigella (bloody diarrhoea/dysentery), Salmonella typhi/non-typhi, Campylobacter jejuni, Vibrio cholerae (rice-water stools), Clostridium difficile"),
    b("<b>Protozoal:</b> Giardia lamblia (chronic, fatty stools), Entamoeba histolytica (amoebic dysentery — bloody mucoid stools), Cryptosporidium parvum (important in malnourished/HIV+)"),
    sp(2),
    p("<b>Non-Infectious Causes:</b>"),
    b("Malnutrition and malabsorption (lactose intolerance)"),
    b("Antibiotic-associated diarrhoea"),
    b("Intussusception (acute, bloody stools + colicky pain)"),
    b("Food allergy"),
    sp(2),
    p("<b>Predisposing Factors:</b>"),
    b("Malnutrition (immune compromise, intestinal mucosal atrophy)"),
    b("Poor sanitation and unsafe water supply"),
    b("Lack of hand washing / poor hygiene practices"),
    b("Bottle feeding (not breastfed) — 25× higher risk than breastfed infants"),
    b("Age: 6–11 months (weaning period) highest risk"),
    sp(3),
    sh("b) Classification of Hydration Status (IMCI/WHO) [2 marks]"),
    p("Based on <b>IMCI Assessment</b> of this child:"),
    b("Restless and irritable: YES"),
    b("Thirsty (drinks eagerly): YES"),
    b("Skin pinch goes back slowly (2–3 seconds): YES"),
    b("Eyes: mildly sunken"),
    b("No severe features (not unconscious, no very sunken eyes, not drinking poorly)"),
    sp(2),
    p("<b>Classification: SOME DEHYDRATION (Plan B)</b>"),
    sp(2),
    data2 = [
        ["Signs", "No Dehydration", "Some Dehydration", "Severe Dehydration"],
        ["Condition", "Well, alert", "Restless, irritable", "Lethargic/unconscious"],
        ["Eyes", "Normal", "Sunken", "Very sunken & dry"],
        ["Thirst", "Normal", "Thirsty, drinks eagerly", "Drinks poorly or unable"],
        ["Skin pinch", "Goes back quickly", "Goes back slowly", "Goes back very slowly"],
        ["Treatment", "Plan A (home)", "Plan B (ORS)", "Plan C (IV fluids)"],
    ]
    t2 = Table(data2, colWidths=[W*0.2, W*0.2, W*0.25, W*0.25])
    t2.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1a3a5c')),
        ('TEXTCOLOR', (0,0), (-1,0), colors.white),
        ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
        ('FONTSIZE', (0,0), (-1,-1), 8),
        ('ALIGN', (0,0), (-1,-1), 'CENTER'),
        ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f0f4f8'), colors.white]),
        ('GRID', (0,0), (-1,-1), 0.5, colors.grey),
        ('TOPPADDING', (0,0), (-1,-1), 4),
        ('BOTTOMPADDING', (0,0), (-1,-1), 4),
        ('BACKGROUND', (2,0), (2,-1), colors.HexColor('#fff3cd')),
        ('BACKGROUND', (2,0), (2,0), colors.HexColor('#1a3a5c')),
    ]))
    story.append(sp(4))
    story.append(t2)
    story.append(sp(4))
]

story += [
    sh("c) Treatment of This Child (Plan B) [2 marks]"),
    p("<b>PLAN B: Give ORS in clinic for 4 hours</b>"),
    b("<b>ORS Volume = 75 ml/kg over 4 hours</b> → 13 kg × 75 ml = 975 ml of ORS over 4 hours (≈244 ml/hour)"),
    b("Give in small sips frequently (5 ml every 1–2 minutes for very small children); cup and spoon preferred"),
    b("If vomiting: wait 10 minutes, then give more slowly"),
    b("After 4 hours, reassess: if improved → Plan A (home); if still some dehydration → repeat Plan B; if worse → Plan C"),
    sp(2),
    p("<b>Zinc Supplementation (vital adjunct):</b>"),
    b("Zinc 10 mg/day for 10–14 days (for children <6 months); 20 mg/day for ≥6 months"),
    b("Zinc reduces duration of diarrhoea by 25% and severity by 30%"),
    b("Prevents subsequent diarrhoeal episodes for 2–3 months"),
    sp(2),
    p("<b>Continue Breastfeeding</b> throughout treatment. Do NOT withhold feeds."),
    sp(3),
    sh("d) Advice to the Mother (2 marks)"),
    p("Following IMCI counselling principles:"),
    b("<b>1. Continue breastfeeding</b> (or age-appropriate feeding) — do not stop food; continue or increase food intake after rehydration"),
    b("<b>2. Give extra ORS after each watery stool:</b> <10 kg child: 50–100 ml after each stool; >10 kg: 100–200 ml after each stool"),
    b("<b>3. Give Zinc</b> every day for 14 days — explain importance"),
    b("<b>4. When to return immediately (danger signs):</b>"),
    sb("Child becomes sicker or is not improving"),
    sb("Unable to drink or breastfeed"),
    sb("Blood in stool"),
    sb("High fever develops"),
    sb("Child passes many watery stools"),
    b("<b>5. Prevention advice:</b> Exclusive breastfeeding, hand washing with soap, safe water/food, rotavirus vaccination for younger siblings"),
    sp(8),
    hr(),
    p("<i>Answers prepared based on K Park's Textbook of Preventive and Social Medicine (25th Edition) and WHO/IMCI Guidelines. For educational purposes — Nepal Medical College, NMC June/July 2017 Sessional.</i>", NOTE),
]

doc.build(story)
print(f"SUCCESS: {OUTPUT}")
Writing File

~/community_medicine_answers/create_paper1.py

#!/usr/bin/env python3
"""Paper 1: Community Medicine Dept Formative Exam, V Semester, June 9, 2014"""

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

OUTPUT_PATH = "/tmp/workspace/community_medicine_answers/paper1_2014_formative.pdf"

# ── Styles ──────────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
    OUTPUT_PATH, pagesize=A4,
    topMargin=1.8*cm, bottomMargin=1.8*cm,
    leftMargin=2.0*cm, rightMargin=2.0*cm
)
styles = getSampleStyleSheet()

NAVY   = colors.HexColor("#1a2e5a")
TEAL   = colors.HexColor("#006080")
LGRAY  = colors.HexColor("#f0f4f8")
DGRAY  = colors.HexColor("#4a4a4a")

def sty(name, **kw):
    return ParagraphStyle(name, **kw)

title_sty   = sty("Title2",    fontSize=16, textColor=NAVY,  alignment=TA_CENTER,
                  fontName="Helvetica-Bold", spaceAfter=4, leading=20)
sub_sty     = sty("Sub",       fontSize=11, textColor=TEAL,  alignment=TA_CENTER,
                  fontName="Helvetica-Bold", spaceAfter=2, leading=14)
meta_sty    = sty("Meta",      fontSize=9,  textColor=DGRAY, alignment=TA_CENTER,
                  fontName="Helvetica", spaceAfter=6, leading=12)
sec_sty     = sty("Sec",       fontSize=12, textColor=colors.white, fontName="Helvetica-Bold",
                  spaceAfter=0, leading=15, leftIndent=0)
q_sty       = sty("QHead",     fontSize=11, textColor=NAVY,  fontName="Helvetica-Bold",
                  spaceAfter=3, spaceBefore=8, leading=14)
h2_sty      = sty("H2",        fontSize=10, textColor=TEAL,  fontName="Helvetica-Bold",
                  spaceAfter=2, spaceBefore=4, leading=13)
body_sty    = sty("Body",      fontSize=9,  textColor=DGRAY, fontName="Helvetica",
                  spaceAfter=2, leading=13, leftIndent=10)
bullet_sty  = sty("Bullet",    fontSize=9,  textColor=DGRAY, fontName="Helvetica",
                  spaceAfter=2, leading=13, leftIndent=20, bulletIndent=10)
sub_b_sty   = sty("SubBullet", fontSize=9,  textColor=DGRAY, fontName="Helvetica",
                  spaceAfter=1, leading=12, leftIndent=35, bulletIndent=25)
note_sty    = sty("Note",      fontSize=8,  textColor=colors.HexColor("#7a3000"),
                  fontName="Helvetica-Oblique", spaceAfter=3, leading=11, leftIndent=10)
ans_sty     = sty("Ans",       fontSize=9,  textColor=DGRAY, fontName="Helvetica",
                  spaceAfter=2, leading=13, leftIndent=10, alignment=TA_JUSTIFY)

def section_header(text):
    """Coloured section banner."""
    t = Table([[Paragraph(text, sec_sty)]], colWidths=[17.0*cm])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), NAVY),
        ('TOPPADDING',  (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('LEFTPADDING', (0,0), (-1,-1), 8),
    ]))
    return t

def q_header(text):
    return Paragraph(text, q_sty)

def h2(text):
    return Paragraph(text, h2_sty)

def body(text):
    return Paragraph(text, body_sty)

def bullet(text):
    return Paragraph(f"&#8226; {text}", bullet_sty)

def sub_bullet(text):
    return Paragraph(f"&#9702; {text}", sub_b_sty)

def note(text):
    return Paragraph(f"<i>Note: {text}</i>", note_sty)

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

def hr():
    return HRFlowable(width="100%", thickness=0.5, color=colors.HexColor("#cccccc"),
                      spaceAfter=4, spaceBefore=4)

def simple_table(data, col_widths, header_bg=TEAL):
    t = Table(data, colWidths=col_widths, repeatRows=1)
    style = [
        ('BACKGROUND',   (0,0), (-1,0), header_bg),
        ('TEXTCOLOR',    (0,0), (-1,0), colors.white),
        ('FONTNAME',     (0,0), (-1,0), 'Helvetica-Bold'),
        ('FONTSIZE',     (0,0), (-1,-1), 8),
        ('GRID',         (0,0), (-1,-1), 0.4, colors.HexColor("#aaaaaa")),
        ('ROWBACKGROUNDS',(0,1),(-1,-1), [colors.white, LGRAY]),
        ('VALIGN',       (0,0), (-1,-1), 'TOP'),
        ('TOPPADDING',   (0,0), (-1,-1), 3),
        ('BOTTOMPADDING',(0,0), (-1,-1), 3),
        ('LEFTPADDING',  (0,0), (-1,-1), 5),
        ('RIGHTPADDING', (0,0), (-1,-1), 5),
    ]
    t.setStyle(TableStyle(style))
    return t

# ── Build story ──────────────────────────────────────────────────────────────
story = []

# Header
story.append(Paragraph("NEPAL MEDICAL COLLEGE", title_sty))
story.append(Paragraph("Department of Community Medicine", sub_sty))
story.append(Paragraph("Formative Examination — MBBS V Semester", sub_sty))
story.append(Paragraph("Date: June 9, 2014 | Total Marks: 35 (SAQ 25 + PBQ 10)", meta_sty))
story.append(Paragraph("Reference: K Park's Textbook of Preventive &amp; Social Medicine", meta_sty))
story.append(HRFlowable(width="100%", thickness=2, color=NAVY, spaceAfter=8, spaceBefore=4))

# ═══════════════════════════════════════════════════════════════════
# SAQ SECTION
# ═══════════════════════════════════════════════════════════════════
story.append(section_header("  SECTION A: SHORT ANSWER QUESTIONS (SAQ)  |  5 × 5 = 25 Marks"))
story.append(sp(6))

# ─── Q1 ─────────────────────────────────────────────────────────────
story.append(q_header("Q1. What is the mass drug administration strategy for control of Lymphatic Filariasis in Nepal?"))
story.append(hr())

story.append(h2("Definition & Background"))
story.append(bullet("<b>Lymphatic Filariasis (LF)</b> — caused by <i>Wuchereria bancrofti</i> (99%), transmitted by <i>Culex quinquefasciatus</i> in Nepal."))
story.append(bullet("Nepal has 61 endemic districts; WHO's Global Programme to Eliminate LF targets 2030."))

story.append(h2("Mass Drug Administration (MDA) Strategy — K Park"))
story.append(body("<b>Principle:</b> Treat the ENTIRE eligible population of endemic districts (not just infected persons) annually to interrupt transmission."))
story.append(sp(3))

story.append(h2("Drug Regimen (Annual Single Dose)"))
mda_data = [
    ["Drug", "Dose", "Route", "Frequency"],
    ["Diethylcarbamazine (DEC)", "6 mg/kg body weight", "Oral", "Once yearly"],
    ["Albendazole", "400 mg (fixed dose)", "Oral", "Once yearly (co-administered)"],
]
story.append(simple_table(mda_data, [5.5*cm, 4*cm, 3*cm, 4*cm]))
story.append(sp(4))

story.append(h2("Exclusion Criteria"))
story.append(bullet("Pregnant women"))
story.append(bullet("Children under 2 years of age"))
story.append(bullet("Severely ill persons"))
story.append(bullet("Persons with known hypersensitivity to drugs"))

story.append(h2("Implementation in Nepal"))
story.append(bullet("<b>Coordinating body:</b> Epidemiology &amp; Disease Control Division (EDCD), Nepal"))
story.append(bullet("<b>Target:</b> Achieve ≥65% therapeutic coverage of total population in endemic districts"))
story.append(bullet("<b>Duration:</b> MDA continued for <b>5 consecutive years</b> to interrupt transmission (due to ~5 year lifespan of adult worms)"))
story.append(bullet("<b>Surveillance:</b> Transmission Assessment Surveys (TAS) after 5 rounds to assess interruption"))
story.append(bullet("<b>Drug distribution:</b> Community-directed treatment through ANMs, FCHVs and health workers"))
story.append(bullet("<b>Morbidity management:</b> Lymphoedema management and hydrocele surgery alongside MDA"))

story.append(h2("Goal"))
story.append(body("Break the transmission cycle so that microfilariae level in the community falls below the threshold needed for mosquito transmission. Eventual target: <b>Elimination as a public health problem by 2030</b>."))
story.append(sp(8))

# ─── Q2 ─────────────────────────────────────────────────────────────
story.append(q_header("Q2. List water-borne viral diseases. Describe clinical features of Hepatitis A / Hepatitis E."))
story.append(hr())

story.append(h2("Water-borne Viral Diseases"))
wb_data = [
    ["Disease", "Causative Virus", "Special Note"],
    ["Hepatitis A", "HAV (Picornavirus, RNA)", "Faeco-oral, endemic Nepal"],
    ["Hepatitis E", "HEV (Hepevirus, RNA)", "Epidemics; fatal in pregnancy"],
    ["Poliomyelitis", "Poliovirus (Enterovirus)", "Nepal declared polio-free"],
    ["Viral Gastroenteritis", "Rotavirus, Norovirus, Adenovirus", "Common in children"],
    ["Enteroviral infections", "Coxsackievirus, Echovirus", "Hand-foot-mouth disease etc."],
]
story.append(simple_table(wb_data, [4*cm, 5*cm, 7.5*cm]))
story.append(sp(4))

story.append(h2("A. Hepatitis A — Clinical Features"))
story.append(bullet("<b>Incubation period:</b> 15–50 days (average 28–30 days)"))
story.append(bullet("<b>Infectious period:</b> 2 weeks before to 1 week after jaundice onset"))
story.append(sp(2))
story.append(body("<b>Prodromal Phase (Pre-icteric, 3–10 days):</b>"))
story.append(sub_bullet("Fever (low-grade), malaise, anorexia, nausea, vomiting"))
story.append(sub_bullet("Right upper quadrant discomfort / hepatic tenderness"))
story.append(sub_bullet("Dark urine (bilirubinuria), pale stools — signals onset of jaundice"))
story.append(sp(2))
story.append(body("<b>Icteric Phase (2–6 weeks):</b>"))
story.append(sub_bullet("Jaundice (icterus of sclera and skin)"))
story.append(sub_bullet("Hepatomegaly, splenomegaly (10–15%)"))
story.append(sub_bullet("Symptoms typically improve as jaundice appears"))
story.append(sub_bullet("Pruritus (bile salt deposition)"))
story.append(sp(2))
story.append(body("<b>Convalescent Phase:</b>"))
story.append(sub_bullet("Jaundice resolves, appetite returns; complete recovery usual"))
story.append(sub_bullet("No chronic carrier state — lifelong immunity after infection"))
story.append(bullet("<b>Diagnosis:</b> Anti-HAV IgM (acute); Anti-HAV IgG (past/immunity); elevated ALT/AST"))
story.append(bullet("<b>Management:</b> Symptomatic; rest, adequate nutrition, avoid hepatotoxic drugs/alcohol"))

story.append(h2("B. Hepatitis E — Clinical Features"))
story.append(bullet("<b>Incubation period:</b> 15–64 days (average 40 days)"))
story.append(bullet("<b>Similar prodrome and icteric phase</b> to Hepatitis A"))
story.append(bullet("<b>KEY DIFFERENCE — Pregnant women:</b> Case fatality rate 15–25% in third trimester (fulminant hepatitis, acute liver failure)"))
story.append(bullet("Associated with <b>epidemic outbreaks</b> linked to contaminated water supplies (e.g., floods, disaster settings)"))
story.append(bullet("<b>Cholestatic hepatitis</b> more common in HEV than HAV"))
story.append(bullet("<b>Diagnosis:</b> Anti-HEV IgM; HEV RNA (PCR)"))
story.append(bullet("<b>Zoonotic reservoir:</b> Pigs (genotype 3 and 4 — found in higher-income countries)"))
story.append(bullet("<b>Prevention (both A &amp; E):</b> Safe water supply, proper sewage disposal, hand washing, food hygiene; HAV vaccine available (inactivated); HEV vaccine (Hecolin) available in China"))
story.append(sp(8))

# ─── Q3 ─────────────────────────────────────────────────────────────
story.append(q_header("Q3. State all programmes related to childhood prevention of communicable disease."))
story.append(hr())

story.append(h2("National Childhood Immunization Programme (EPI) — Nepal"))
story.append(body("Nepal's Expanded Programme on Immunization (EPI) is the cornerstone of childhood communicable disease prevention."))
story.append(sp(3))

epi_data = [
    ["Vaccine", "Schedule", "Disease Prevented", "Route"],
    ["BCG", "At birth", "Tuberculosis", "Intradermal"],
    ["OPV-0 (bOPV)", "At birth", "Poliomyelitis", "Oral"],
    ["Hepatitis B (HBV-0)", "At birth", "Hepatitis B", "IM"],
    ["Pentavalent (DPT-HepB-Hib)", "6, 10, 14 weeks", "Diphtheria, Pertussis, Tetanus, HepB, Hib (meningitis)", "IM"],
    ["OPV (bOPV)", "6, 10, 14 weeks", "Poliomyelitis", "Oral"],
    ["IPV", "14 weeks", "Poliomyelitis", "IM"],
    ["PCV (Pneumococcal)", "6, 10, 14 weeks", "Pneumococcal disease", "IM"],
    ["Rotavirus vaccine (RVV)", "6, 10 weeks", "Rotavirus diarrhoea", "Oral"],
    ["Measles-Rubella (MR)", "9 months &amp; 15 months", "Measles, Rubella", "SC"],
    ["Japanese Encephalitis (JE)", "12 months", "JE (endemic districts)", "SC"],
    ["DPT booster", "18 months", "Diphtheria, Pertussis, Tetanus", "IM"],
    ["Typhoid Vi", "15–24 months (select areas)", "Typhoid fever", "IM"],
    ["Td (adolescent)", "10 &amp; 16 years", "Tetanus, Diphtheria", "IM"],
]
story.append(simple_table(epi_data, [3.5*cm, 3.5*cm, 6.5*cm, 2.5*cm]))
story.append(sp(4))

story.append(h2("Other Childhood Prevention Programmes"))
story.append(bullet("<b>National Immunization Day (NID)/Sub-NID:</b> Pulse polio — bOPV to all children 0–5 yrs regardless of immunization status"))
story.append(bullet("<b>Integrated Management of Childhood Illness (IMCI):</b> Prevention and management protocol for ARI, diarrhoea, malaria, malnutrition, measles"))
story.append(bullet("<b>Vitamin A supplementation programme:</b> Twice yearly (6 monthly); reduces mortality from measles, diarrhoea, ARI"))
story.append(bullet("<b>Iron and Folic Acid (IFA) supplementation:</b> For children 6 months–5 years to prevent anaemia-related susceptibility"))
story.append(bullet("<b>Deworming (Albendazole):</b> 6-monthly for children 1–5 years — reduces helminth-associated malnutrition and susceptibility"))
story.append(bullet("<b>Malaria prevention (endemic Terai):</b> LLIN distribution, IRS, larval control for children"))
story.append(bullet("<b>DOTS Programme:</b> BCG at birth + contact tracing for TB in children"))
story.append(sp(8))

# ─── Q4 ─────────────────────────────────────────────────────────────
story.append(q_header("Q4. Write down WHO criteria for management of No Dehydration in a child with diarrhoea."))
story.append(hr())

story.append(h2("WHO/IMCI Dehydration Classification — Summary Table"))
dehy_data = [
    ["Sign/Symptom", "No Dehydration (Plan A)", "Some Dehydration (Plan B)", "Severe Dehydration (Plan C)"],
    ["General condition", "Alert, well", "Restless, irritable", "Lethargic/unconscious"],
    ["Eyes", "Normal", "Sunken", "Very sunken and dry"],
    ["Tears", "Present", "Absent", "Absent"],
    ["Mouth/Tongue", "Moist", "Dry", "Very dry"],
    ["Thirst", "Drinks normally", "Drinks eagerly, thirsty", "Drinks poorly or unable to drink"],
    ["Skin pinch", "Goes back immediately", "Goes back slowly", "Goes back very slowly (>2 sec)"],
    ["Management", "PLAN A (Home therapy)", "PLAN B (ORS in facility)", "PLAN C (IV fluids)"],
]
story.append(simple_table(dehy_data, [3.8*cm, 3.8*cm, 3.8*cm, 3.8*cm]))
story.append(sp(4))

story.append(h2("WHO PLAN A — Treatment of No Dehydration (Home Therapy)"))
story.append(body("<b>Goal:</b> Prevent dehydration from progressing by giving extra fluids at home."))
story.append(sp(3))
story.append(body("<b>THREE RULES (K Park / WHO IMCI):</b>"))
story.append(sp(2))

story.append(body("<b>Rule 1: Give extra fluids (as much as child will take)</b>"))
story.append(sub_bullet("ORS solution: After each loose stool — Children &lt;2 yrs: 50–100 mL; Children 2–10 yrs: 100–200 mL; Older children/adults: as much as wanted"))
story.append(sub_bullet("If ORS not available: Acceptable home fluids — rice water, dal soup, plain water, yogurt drinks, coconut water"))
story.append(sub_bullet("Continue breastfeeding (do not stop)"))
story.append(sub_bullet("<b>Avoid:</b> Carbonated drinks, sweetened juices, ORS mixed with excess sugar"))
story.append(sp(2))

story.append(body("<b>Rule 2: Continue feeding (do not withhold food)</b>"))
story.append(sub_bullet("Breastfed infants: Continue breastfeeding on demand"))
story.append(sub_bullet("Older children: Offer food every 3–4 hours; easily digestible foods (rice, bread, banana, potatoes)"))
story.append(sub_bullet("Zinc supplementation: 20 mg/day for 10–14 days (children &gt;6 months); 10 mg/day for infants &lt;6 months"))
story.append(sp(2))

story.append(body("<b>Rule 3: Return to health worker if child develops any of the following (danger signs):</b>"))
story.append(sub_bullet("Cannot drink or is drinking poorly"))
story.append(sub_bullet("Becomes sicker"))
story.append(sub_bullet("Develops fever"))
story.append(sub_bullet("Blood in stools"))
story.append(sub_bullet("Signs of dehydration (sunken eyes, decreased urine output, skin pinch slow)"))
story.append(sp(3))

story.append(note("Antibiotics are NOT routinely recommended for Plan A. Antiparasitic treatment only if Giardia/Entamoeba confirmed."))
story.append(sp(8))

# ─── Q5 ─────────────────────────────────────────────────────────────
story.append(q_header("Q5. Enumerate eruptive fevers in Nepal. Briefly describe clinical manifestations of Dengue fever (also mention Measles, Chickenpox)."))
story.append(hr())

story.append(h2("Eruptive (Exanthematous) Fevers Seen in Nepal"))
erupt_data = [
    ["Disease", "Causative Agent", "Rash Character", "Distribution"],
    ["Measles", "Measles virus (Paramyxovirus)", "Maculopapular; starts face, spreads downward", "Face → trunk → extremities"],
    ["Chickenpox (Varicella)", "Varicella-Zoster Virus", "Vesicular; successive crops", "Centripetal (trunk > face > limbs)"],
    ["Dengue Fever", "Dengue virus (Flavivirus, 4 serotypes)", "Maculopapular; 'islands of white in sea of red'", "Trunk, may spread to limbs"],
    ["Rubella", "Rubella virus (Togavirus)", "Fine maculopapular, fades quickly (3 days)", "Face → trunk"],
    ["Typhus (Scrub/Murine)", "Rickettsia spp.", "Maculopapular; starts on trunk", "Trunk → periphery"],
    ["Scarlet fever", "Group A Streptococcus", "Diffuse red, sandpaper texture", "Trunk, spares face/palms"],
    ["Enteric fever", "Salmonella typhi", "Rose spots (faint, few lesions)", "Abdomen"],
    ["Roseola infantum", "HHV-6", "Rosy maculopapular post-fever", "Trunk, usually infants"],
]
story.append(simple_table(erupt_data, [3.5*cm, 4*cm, 5*cm, 4*cm]))
story.append(sp(4))

story.append(h2("1. Dengue Fever — Clinical Features (K Park)"))
story.append(bullet("<b>Causative agent:</b> Dengue virus — 4 serotypes (DENV 1-4); Flavivirus; transmitted by <i>Aedes aegypti</i>"))
story.append(bullet("<b>Incubation period:</b> 4–10 days (range 3–14 days)"))
story.append(sp(2))
story.append(body("<b>WHO Classification (2009) and Clinical Features:</b>"))
story.append(sp(2))
story.append(body("<i>a) Dengue without warning signs:</i>"))
story.append(sub_bullet("Sudden high fever (39–40°C), lasting 5–7 days (biphasic/saddleback pattern)"))
story.append(sub_bullet("Severe headache, retro-orbital pain (pathognomonic)"))
story.append(sub_bullet("Severe myalgia and arthralgia — 'breakbone fever'"))
story.append(sub_bullet("Flushed face, relative bradycardia"))
story.append(sub_bullet("Maculopapular rash 3–4 days after fever: 'islands of white in sea of red'"))
story.append(sub_bullet("Mild haemorrhagic manifestations: petechiae, positive tourniquet test"))
story.append(sub_bullet("Leucopenia and thrombocytopenia on CBC"))
story.append(sp(2))
story.append(body("<i>b) Dengue with warning signs (require close monitoring):</i>"))
story.append(sub_bullet("Abdominal pain/tenderness, persistent vomiting, clinical fluid accumulation"))
story.append(sub_bullet("Mucosal bleeding, lethargy/restlessness, liver enlargement >2cm"))
story.append(sub_bullet("Rapid rise in haematocrit concurrent with rapid decrease in platelet count"))
story.append(sp(2))
story.append(body("<i>c) Severe Dengue:</i>"))
story.append(sub_bullet("Dengue Shock Syndrome (DSS): hypotension, rapid weak pulse, cold clammy skin"))
story.append(sub_bullet("Severe bleeding: GI bleeding, haemoptysis"))
story.append(sub_bullet("Severe organ involvement: liver (AST/ALT >1000), CNS (encephalitis), heart"))
story.append(sp(2))
story.append(body("<b>Management:</b> Supportive — paracetamol (avoid NSAIDs/aspirin), oral rehydration, IV fluids for severe cases, platelet transfusion if &lt;10,000 or active bleeding. No specific antiviral."))
story.append(sp(3))

story.append(h2("2. Measles — Clinical Features"))
story.append(bullet("<b>Incubation:</b> 10–12 days; Prodrome: 3–4 days (3 Cs: Cough, Coryza, Conjunctivitis + fever)"))
story.append(bullet("<b>Pathognomonic:</b> Koplik's spots (bluish-white spots on buccal mucosa) — 1–2 days before rash"))
story.append(bullet("<b>Rash:</b> Maculopapular, starts behind ears, spreads downward (cephalocaudal); fades in same order"))
story.append(bullet("<b>Complications:</b> Pneumonia (leading cause of death), otitis media, encephalitis (1:1000), SSPE (rare, late)"))
story.append(bullet("<b>Prevention:</b> MR vaccine at 9 months and 15 months (Nepal EPI)"))
story.append(sp(3))

story.append(h2("3. Chickenpox (Varicella) — Clinical Features"))
story.append(bullet("<b>Incubation:</b> 14–16 days (10–21 days); Prodrome: 1–2 days fever, malaise"))
story.append(bullet("<b>Rash:</b> Successive crops of vesicles — macule → papule → vesicle → pustule → scab simultaneously present (pleomorphic)"))
story.append(bullet("<b>Distribution:</b> Centripetal — trunk &gt; face &gt; limbs; spare palms and soles"))
story.append(bullet("<b>Complications:</b> Secondary bacterial infection (most common), pneumonia (adults), encephalitis, Reye's syndrome (aspirin use), congenital varicella syndrome"))
story.append(bullet("<b>Prevention:</b> Live attenuated VZV vaccine (not currently in Nepal routine EPI); isolation until all lesions crusted; VZIG for susceptible contacts"))
story.append(sp(12))

# ═══════════════════════════════════════════════════════════════════
# PBQ SECTION
# ═══════════════════════════════════════════════════════════════════
story.append(section_header("  SECTION B: PROBLEM-BASED QUESTION (PBQ)  |  1 × 10 = 10 Marks"))
story.append(sp(6))

story.append(q_header("PBQ. Mrs. Sukhmaya, aged 30, presents with diarrhoea and fever for 6 weeks, 15% weight loss, treatment non-responsive. Husband works in Malaysia (5 years), visits periodically."))
story.append(hr())

# Case summary box
case_data = [["CLINICAL SCENARIO"],
             ["Mrs. Sukhmaya, 30 years | Diarrhoea + Fever x 6 weeks | Weight loss 15% | Treatment-non-responsive\nHusband working in Malaysia x 5 years (visiting periodically) → Risk factor for heterosexual HIV transmission"]]
ct = Table(case_data, colWidths=[17*cm])
ct.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), colors.HexColor("#8b0000")),
    ('TEXTCOLOR', (0,0), (-1,0), colors.white),
    ('FONTNAME', (0,0), (-1,-1), 'Helvetica-Bold'),
    ('FONTSIZE', (0,0), (-1,-1), 9),
    ('BACKGROUND', (0,1), (-1,-1), colors.HexColor("#fff0f0")),
    ('FONTNAME', (0,1), (-1,-1), 'Helvetica'),
    ('TOPPADDING', (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('LEFTPADDING', (0,0), (-1,-1), 8),
]))
story.append(ct)
story.append(sp(6))

story.append(q_header("Part (a): Provisional Diagnosis and Supporting Clinical Features [3 Marks]"))
story.append(body("<b>Provisional Diagnosis: HIV/AIDS (WHO Clinical Stage 3)</b>"))
story.append(sp(3))
story.append(h2("Clinical Features Supporting HIV Diagnosis:"))
story.append(bullet("<b>Chronic diarrhoea</b> — persisting &gt;6 weeks (defining feature; excludes common self-limiting infections)"))
story.append(bullet("<b>Prolonged fever</b> — &gt;1 month, unexplained by other pathology"))
story.append(bullet("<b>Significant weight loss</b> — 15% of body weight (severe unexplained weight loss &gt;10% = Stage 3 criterion)"))
story.append(bullet("<b>Treatment non-responsiveness</b> — to standard anti-infective therapy, suggesting an immunocompromised state"))
story.append(bullet("<b>Epidemiological risk factor</b> — husband is a migrant worker in Malaysia (high HIV burden country); periodic conjugal visits = sexual exposure risk; Nepal has high HIV prevalence among returning migrants and their spouses"))
story.append(sp(3))
story.append(note("Differential diagnoses to exclude: TB (can co-exist), malignancy, malabsorption syndrome — but HIV unifies all features."))
story.append(sp(6))

story.append(q_header("Part (b): WHO Clinical Staging of this Patient [4 Marks]"))
story.append(h2("WHO Clinical Staging of HIV (K Park)"))
stage_data = [
    ["WHO Stage", "Key Features", "Clinical Conditions"],
    ["Stage 1\n(Asymptomatic)", "CD4 usually >500", "Asymptomatic\nPersistent Generalized Lymphadenopathy (PGL)"],
    ["Stage 2\n(Mild symptoms)", "CD4 ~350-499", "Unexplained weight loss <10%\nMinor mucocutaneous: seborrhoeic dermatitis, herpes zoster, recurrent oral ulcers\nRecurrent URTI"],
    ["Stage 3\n(Moderate)\n[THIS PATIENT]", "CD4 ~200-349", "Unexplained SEVERE weight loss >10%\nChronic diarrhoea >1 month\nProlonged fever >1 month\nSevere bacterial infections (pneumonia, empyema)\nOral hairy leukoplakia, oral candidiasis\nPulmonary TB\nAcute necrotizing ulcerative stomatitis"],
    ["Stage 4\n(Severe/AIDS)", "CD4 <200", "HIV wasting syndrome\nPCP (Pneumocystis pneumonia)\nCerebral toxoplasmosis\nCryptococcal meningitis\nCMV retinitis\nKaposi's sarcoma\nHIV encephalopathy"],
]
story.append(simple_table(stage_data, [3*cm, 3*cm, 10.5*cm]))
story.append(sp(4))
story.append(body("<b>This patient's Stage Assessment:</b>"))
story.append(bullet("Chronic diarrhoea &gt;1 month ✓ (Stage 3 criterion)"))
story.append(bullet("Prolonged fever &gt;1 month ✓ (Stage 3 criterion)"))
story.append(bullet("Weight loss 15% — i.e., &gt;10% ✓ (Stage 3 criterion)"))
story.append(bullet("<b>Conclusion: WHO Clinical Stage 3</b> — Moderate HIV disease"))
story.append(sp(6))

story.append(q_header("Part (c): Confirmation of Diagnosis and Starting Therapy [3 Marks]"))
story.append(h2("Diagnostic Confirmation"))
story.append(bullet("<b>Step 1 — HIV Antibody Testing:</b> ELISA (high sensitivity screening test) — if reactive, confirm with second ELISA using different antigen system"))
story.append(bullet("<b>Step 2 — Confirmatory Test:</b> Western Blot (gold standard confirmatory) — detects antibodies to specific HIV proteins (gp120, gp41, p24)"))
story.append(bullet("<b>Step 3 — Baseline Investigations after confirmation:</b>"))
story.append(sub_bullet("CD4+ T-lymphocyte count (immunological staging; guides ART initiation)"))
story.append(sub_bullet("HIV RNA Viral Load (PCR) — baseline, monitors treatment response"))
story.append(sub_bullet("FBC, LFT, RFT, Blood glucose (baseline organ function)"))
story.append(sub_bullet("TB screening — sputum AFB smear/Xpert MTB/RIF (highest priority OI in Nepal)"))
story.append(sp(3))

story.append(h2("Antiretroviral Therapy (ART) — WHO First-Line Regimen"))
story.append(body("<b>Indication:</b> ART recommended for ALL HIV-positive individuals (WHO 2016 'Treat All' policy), regardless of CD4 count. Nepal follows this."))
story.append(sp(3))
art_data = [
    ["Drug", "Class", "Dose"],
    ["Tenofovir (TDF)", "NRTI", "300 mg once daily"],
    ["Lamivudine (3TC)", "NRTI", "300 mg once daily"],
    ["Efavirenz (EFV)", "NNRTI", "600 mg once daily (at night)"],
    ["Combined formulation: TDF + 3TC + EFV (single tablet regimen)", "", "One tablet once daily"],
]
story.append(simple_table(art_data, [6*cm, 3*cm, 7.5*cm]))
story.append(sp(3))
story.append(body("<b>Additional Management:</b>"))
story.append(bullet("<b>Co-trimoxazole prophylaxis</b> (Cotrimoxazole preventive therapy — CPT): Reduces OI morbidity in Stage 3/4"))
story.append(bullet("<b>TB treatment</b> if TB confirmed: HRZE intensive phase then HR continuation; ART started within 2 weeks if CD4 &lt;50, otherwise within 8 weeks"))
story.append(bullet("<b>PPTCT</b> (Prevention of Parent-to-Child Transmission): Counsel on safe sex, condom use; test husband if not done"))
story.append(bullet("<b>Nutritional support:</b> High-protein diet; vitamin and micronutrient supplementation"))
story.append(bullet("<b>Follow-up:</b> CD4 and viral load monitoring every 6 months; adherence counselling"))
story.append(sp(8))

# Footer
story.append(HRFlowable(width="100%", thickness=1, color=NAVY, spaceAfter=4))
story.append(Paragraph("Reference: K Park's Textbook of Preventive &amp; Social Medicine, 25th Edition | Nepal Medical College", meta_sty))
story.append(Paragraph("Community Medicine Dept Formative Exam — MBBS V Semester — June 2014", meta_sty))

doc.build(story)
print(f"Paper 1 created: {OUTPUT_PATH}")
Running Command

cd /tmp/workspace/community_medicine_answers && python3 paper4_gen.py 2>&1

What happened where is the pdf

Running Command

mkdir -p /tmp/workspace/community_medicine_answers && echo "Directory ready"

Where is it

Writing File

~/community_medicine_answers/generate_pdfs.py

#!/usr/bin/env python3
"""Generate Community Medicine Answer PDFs for NMC MBBS 5th Semester - based on K Park"""

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

OUT = "/tmp/workspace/community_medicine_answers"
os.makedirs(OUT, exist_ok=True)

# ─── Style helpers ────────────────────────────────────────────────────────────
def make_styles():
    base = getSampleStyleSheet()
    styles = {
        "title": ParagraphStyle("title", parent=base["Heading1"],
                                fontSize=14, textColor=colors.HexColor("#1a3c5e"),
                                alignment=TA_CENTER, spaceAfter=4),
        "subtitle": ParagraphStyle("subtitle", parent=base["Normal"],
                                   fontSize=10, textColor=colors.HexColor("#1a3c5e"),
                                   alignment=TA_CENTER, spaceAfter=10),
        "qnum": ParagraphStyle("qnum", parent=base["Normal"],
                               fontSize=11, textColor=colors.HexColor("#8b0000"),
                               fontName="Helvetica-Bold", spaceBefore=10, spaceAfter=3),
        "head2": ParagraphStyle("head2", parent=base["Normal"],
                                fontSize=10, fontName="Helvetica-Bold",
                                textColor=colors.HexColor("#1a3c5e"),
                                spaceBefore=6, spaceAfter=2),
        "body": ParagraphStyle("body", parent=base["Normal"],
                               fontSize=9.5, leading=14,
                               spaceAfter=2, alignment=TA_JUSTIFY),
        "bullet": ParagraphStyle("bullet", parent=base["Normal"],
                                 fontSize=9.5, leading=13,
                                 leftIndent=14, firstLineIndent=-10,
                                 spaceAfter=1),
        "sub": ParagraphStyle("sub", parent=base["Normal"],
                              fontSize=9, leading=12,
                              leftIndent=26, firstLineIndent=-10,
                              spaceAfter=1),
        "note": ParagraphStyle("note", parent=base["Normal"],
                               fontSize=8.5, textColor=colors.HexColor("#555555"),
                               leftIndent=10, spaceAfter=4),
    }
    return styles

S = make_styles()

def doc(filename, title, subtitle):
    path = os.path.join(OUT, filename)
    pdf = SimpleDocTemplate(path, pagesize=A4,
                            leftMargin=0.75*inch, rightMargin=0.75*inch,
                            topMargin=0.75*inch, bottomMargin=0.75*inch)
    return pdf, path

def rule(): return HRFlowable(width="100%", thickness=0.5,
                               color=colors.HexColor("#1a3c5e"), spaceAfter=6)

def H(text): return Paragraph(text, S["head2"])
def B(text): return Paragraph(f"• {text}", S["bullet"])
def Sub(text): return Paragraph(f"– {text}", S["sub"])
def P(text): return Paragraph(text, S["body"])
def Q(text): return Paragraph(text, S["qnum"])
def N(text): return Paragraph(text, S["note"])

def hdr(title_txt, subtitle_txt, story):
    story.append(Paragraph(title_txt, S["title"]))
    story.append(Paragraph(subtitle_txt, S["subtitle"]))
    story.append(rule())

def make_table(data, col_widths=None):
    t = Table(data, colWidths=col_widths, repeatRows=1)
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), colors.HexColor("#1a3c5e")),
        ('TEXTCOLOR', (0,0), (-1,0), colors.white),
        ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
        ('FONTSIZE', (0,0), (-1,-1), 9),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor("#eef3f8")]),
        ('GRID', (0,0), (-1,-1), 0.4, colors.HexColor("#aaaaaa")),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
        ('LEFTPADDING', (0,0), (-1,-1), 4),
        ('RIGHTPADDING', (0,0), (-1,-1), 4),
        ('TOPPADDING', (0,0), (-1,-1), 3),
        ('BOTTOMPADDING', (0,0), (-1,-1), 3),
    ]))
    return t

# ══════════════════════════════════════════════════════════════════════════════
# PAPER 1 — 2014 Formative, V Semester
# ══════════════════════════════════════════════════════════════════════════════
def paper1():
    pdf, path = doc("paper1_2014_formative.pdf", "", "")
    story = []
    hdr("COMMUNITY MEDICINE DEPARTMENT",
        "Formative Exam — V Semester | Date: 9th June 2014 | Time: 40 min | SAQ(5×5=25) + PBQ(1×10=10)",
        story)

    story.append(Q("Q1. Mass Drug Strategy for Control of Lymphatic Filariasis in Nepal"))
    story.append(H("Definition"))
    story.append(P("Lymphatic Filariasis (LF) is caused by <i>Wuchereria bancrofti</i>, transmitted by <i>Culex quinquefasciatus</i> mosquito. Nepal aims for elimination (microfilaria rate &lt;1%)."))
    story.append(H("Mass Drug Administration (MDA) — Core Strategy"))
    story.append(B("Drug combination: <b>DEC (Diethylcarbamazine) 6 mg/kg</b> + <b>Albendazole 400 mg</b>"))
    story.append(B("Given <b>once annually</b> to ALL eligible persons in endemic districts"))
    story.append(B("Coverage target: ≥65% of total population for ≥5 consecutive years"))
    story.append(B("Coordinated by EDCD (Epidemiology & Disease Control Division), Nepal"))
    story.append(H("Exclusions from MDA"))
    for x in ["Pregnant women","Children &lt;2 years","Severely ill persons"]:
        story.append(Sub(x))
    story.append(H("Supporting Activities"))
    story.append(B("Morbidity Management: Lymphoedema care, hydrocele surgery"))
    story.append(B("Vector control: reduce <i>Culex</i> breeding sites"))
    story.append(B("Surveillance: monitor microfilaria rates post-MDA"))
    story.append(N("(K Park: LF elimination program; WHO global programme to eliminate LF)"))
    story.append(Spacer(1,6))

    story.append(Q("Q2. Water-Borne Viral Diseases & Clinical Features — Hepatitis A"))
    story.append(H("Water-Borne Viral Diseases (K Park)"))
    tbl = make_table([
        ["Disease","Virus","Transmission"],
        ["Hepatitis A","HAV (Picornavirus)","Feco-oral, contaminated water/food"],
        ["Hepatitis E","HEV (Calicivirus)","Feco-oral, floods, waterborne outbreaks"],
        ["Poliomyelitis","Poliovirus (Enterovirus)","Feco-oral, contaminated water"],
        ["Rotavirus diarrhoea","Rotavirus","Feco-oral"],
    ], col_widths=[1.8*inch, 1.5*inch, 3*inch])
    story.append(tbl)
    story.append(Spacer(1,5))
    story.append(H("Clinical Features of Hepatitis A"))
    story.append(B("<b>Incubation period:</b> 15–50 days (average 28 days)"))
    story.append(H("Phases:"))
    story.append(Sub("<b>Pre-icteric (4–7 days):</b> Fever, malaise, anorexia, nausea, vomiting, abdominal pain, dark urine"))
    story.append(Sub("<b>Icteric phase:</b> Jaundice (scleral icterus first), hepatomegaly, tender liver, pale stools"))
    story.append(Sub("<b>Recovery:</b> Jaundice fades; complete recovery in 4–6 weeks; NO chronic state"))
    story.append(B("Lab: Elevated ALT/AST (>10× normal), bilirubin raised, Anti-HAV IgM positive (diagnostic)"))
    story.append(B("Prognosis: Excellent; case fatality rate &lt;0.1%"))
    story.append(N("Note: Hepatitis E is similar but CFR 15–25% in pregnant women; NO chronic state"))
    story.append(Spacer(1,6))

    story.append(Q("Q3. Programmes of Childhood Related to Prevention of Communicable Disease"))
    story.append(H("National Immunization Programme (NIP) — Nepal"))
    progs = [
        ("BCG","At birth — prevents TB meningitis, miliary TB"),
        ("OPV + IPV","6,10,14 weeks + booster 18 months — polio"),
        ("Pentavalent (DPT-HepB-Hib)","6,10,14 weeks — diphtheria, pertussis, tetanus, hepatitis B, Hib meningitis"),
        ("PCV (Pneumococcal)","6,10,14 weeks — pneumonia, meningitis"),
        ("Rotavirus vaccine","6,10 weeks — rotavirus diarrhoea"),
        ("MR (Measles-Rubella)","9 months + booster 15 months — measles, rubella"),
        ("JE vaccine","12 months + booster 24 months — Japanese encephalitis"),
        ("TT/Td","School girls & pregnant women — tetanus"),
    ]
    for v, d in progs:
        story.append(B(f"<b>{v}:</b> {d}"))
    story.append(H("Other Programmes"))
    story.append(B("IMCI (Integrated Management of Childhood Illness) — diarrhoea, pneumonia, malaria, malnutrition"))
    story.append(B("Vitamin A supplementation — 6 months to 5 years, twice yearly"))
    story.append(B("ORS programme — diarrhoea prevention of dehydration"))
    story.append(B("Safe water & sanitation programme — prevention of water-borne diseases"))
    story.append(Spacer(1,6))

    story.append(Q("Q4. WHO Criteria for Management of No Dehydration (Plan A) in Diarrhoea"))
    story.append(H("Classification of Dehydration (WHO/IMCI)"))
    tbl2 = make_table([
        ["Sign","No Dehydration","Some Dehydration","Severe Dehydration"],
        ["Condition","Well, alert","Restless/irritable","Lethargic/unconscious"],
        ["Eyes","Normal","Sunken","Very sunken"],
        ["Thirst","Normal","Thirsty, eager to drink","Unable to drink/drinks poorly"],
        ["Skin pinch","Returns immediately","Returns slowly (&lt;2 sec)","Returns very slowly (&gt;2 sec)"],
        ["Plan","A","B","C"],
    ], col_widths=[1.3*inch, 1.4*inch, 1.6*inch, 1.9*inch])
    story.append(tbl2)
    story.append(H("Plan A — No Dehydration Management"))
    story.append(B("<b>ORS:</b> Give extra fluids after each loose stool"))
    story.append(Sub("Children &lt;2 yrs: 50–100 ml ORS per stool"))
    story.append(Sub("Children ≥2 yrs: 100–200 ml ORS per stool"))
    story.append(B("<b>Zinc:</b> 10 mg/day (&lt;6 months) or 20 mg/day (≥6 months) for 10–14 days"))
    story.append(B("<b>Continue feeding:</b> Breastfeed frequently; do not stop food"))
    story.append(B("<b>Return signs:</b> Return if child develops sunken eyes, unable to drink, skin pinch slow"))
    story.append(B("<b>No routine antibiotics</b> for watery diarrhoea"))
    story.append(Spacer(1,6))

    story.append(Q("Q5. Eruptive Fevers in Nepal + Clinical Manifestation of Dengue Fever"))
    story.append(H("Eruptive Fevers Seen in Nepal"))
    story.append(B("Dengue fever"))
    story.append(B("Measles"))
    story.append(B("Chickenpox (Varicella)"))
    story.append(B("Typhus fever (Scrub typhus, epidemic typhus)"))
    story.append(B("Scarlet fever"))
    story.append(B("Rubella"))
    story.append(H("Clinical Manifestations of Dengue Fever (K Park)"))
    story.append(B("<b>Incubation:</b> 3–14 days (average 5–7 days)"))
    story.append(B("<b>Classic dengue ('break-bone fever'):</b>"))
    story.append(Sub("Sudden onset HIGH GRADE FEVER (104–106°F)"))
    story.append(Sub("Severe HEADACHE, retro-orbital pain"))
    story.append(Sub("Severe MYALGIA and ARTHRALGIA (bone-breaking pain)"))
    story.append(Sub("RASH: Maculopapular or petechial rash — starts on trunk, spreads; 'islands of white in sea of red'"))
    story.append(Sub("Flushed face, injected conjunctivae"))
    story.append(Sub("Fever is biphasic (saddle-back pattern)"))
    story.append(B("<b>Lab:</b> Leucopenia, thrombocytopenia, raised HCT"))
    story.append(B("<b>Warning signs (proceed to hospital):</b> Abdominal pain, persistent vomiting, mucosal bleeding, rapid breathing, restlessness"))
    story.append(B("<b>Prevention:</b> Source reduction (empty stagnant water), mosquito nets, insect repellents, fogging during outbreaks"))
    story.append(Spacer(1,6))

    story.append(rule())
    story.append(Q("PBQ — Mrs. Sukhmaya, 30 years, Diarrhoea + Fever 6 weeks, 15% weight loss, Husband in Malaysia"))
    story.append(H("(a) Provisional Diagnosis & Clinical Features to Support It [3 marks]"))
    story.append(B("<b>Provisional Diagnosis: HIV/AIDS</b>"))
    story.append(H("Reasoning:"))
    story.append(Sub("Chronic diarrhoea &gt;1 month + Fever &gt;1 month = WHO Stage 3 indicator conditions"))
    story.append(Sub("Weight loss &gt;10% body weight (15% here) = significant immunosuppression"))
    story.append(Sub("Husband working in Malaysia (migrant worker) → high-risk group for HIV → sexual transmission to wife"))
    story.append(Sub("No improvement with treatment → suggests opportunistic infections"))
    story.append(Sub("Combined: Diarrhoea + weight loss + fever in reproductive-age woman with HIV-risk partner = HIV/AIDS until proven otherwise"))

    story.append(H("(b) WHO Clinical Stages of HIV Disease [4 marks]"))
    stg = make_table([
        ["Stage","CD4 (approx)","Key Features"],
        ["Stage 1","&gt;500","Asymptomatic; Persistent Generalized Lymphadenopathy (PGL)"],
        ["Stage 2","350–499","Weight loss &lt;10%; Minor mucocutaneous: oral ulcers, angular cheilitis, seborrhoeic dermatitis, recurrent RTI"],
        ["Stage 3","200–349","Weight loss &gt;10%; Chronic diarrhoea &gt;1 month; Fever &gt;1 month; Oral candidiasis; Pulmonary TB; Severe bacterial infections"],
        ["Stage 4","&lt;200","AIDS-defining: PCP, CMV retinitis, Cryptococcal meningitis, Cerebral toxoplasmosis, HIV wasting syndrome, HIV encephalopathy"],
    ], col_widths=[0.6*inch, 1.1*inch, 4.5*inch])
    story.append(stg)
    story.append(P("<b>This patient is WHO Stage 3:</b> Chronic diarrhoea + fever &gt;1 month + weight loss &gt;10%"))

    story.append(H("(c) Confirmation of Diagnosis & Starting Therapy [3 marks]"))
    story.append(H("Diagnostic Tests:"))
    story.append(B("<b>Screening:</b> ELISA (Enzyme-Linked Immunosorbent Assay) — 2 different ELISA tests (different antigens)"))
    story.append(B("<b>Confirmatory:</b> Western Blot OR HIV RNA PCR"))
    story.append(B("<b>Additional:</b> CD4 count, CBC, LFT, renal function, STI screen, Hepatitis B/C"))
    story.append(H("Treatment (WHO/Nepal National ART Guidelines):"))
    story.append(B("<b>Start ART regardless of CD4 count</b> in all confirmed HIV patients (WHO 2015 'test and treat')"))
    story.append(B("<b>First-line ART:</b> TDF (Tenofovir) + 3TC (Lamivudine) + EFV (Efavirenz) — once daily single tablet"))
    story.append(B("Treat opportunistic infections first (e.g., oral Fluconazole for candidiasis, Cotrimoxazole prophylaxis)"))
    story.append(B("<b>Cotrimoxazole preventive therapy (CPT)</b> for all Stage 3/4 patients"))
    story.append(B("Nutrition support, psychosocial counselling, partner testing & disclosure"))

    pdf.build(story)
    return path

# ══════════════════════════════════════════════════════════════════════════════
# PAPER 2 — NMC August 2014 Sessional
# ══════════════════════════════════════════════════════════════════════════════
def paper2():
    pdf, path = doc("paper2_aug2014.pdf", "", "")
    story = []
    hdr("NEPAL MEDICAL COLLEGE — AUGUST 2014 SESSIONAL",
        "MBBS 5th Semester | Subject: Community Medicine | Full Marks: 50 | Time: 1 Hr 40 Min",
        story)

    story.append(Q("Q1. Strategy for Elimination of Poliomyelitis in Nepal"))
    story.append(H("Four Pillars of Polio Eradication (K Park)"))
    story.append(B("<b>1. High Routine Immunization Coverage"))
    story.append(Sub("OPV (Oral Polio Vaccine) at 6, 10, 14 weeks + booster at 18 months"))
    story.append(Sub("IPV at 14 weeks (injectable)"))
    story.append(Sub("Target: ≥90% coverage"))
    story.append(B("<b>2. Supplementary Immunization Activities (SIAs) / Pulse Immunization"))
    story.append(Sub("National Immunization Days (NIDs): 2 rounds/year, 4 weeks apart"))
    story.append(Sub("bOPV (bivalent OPV types 1&3) given to ALL children &lt;5 years"))
    story.append(Sub("Regardless of previous vaccination history"))
    story.append(B("<b>3. Acute Flaccid Paralysis (AFP) Surveillance"))
    story.append(Sub("Report ALL AFP cases in children &lt;15 years"))
    story.append(Sub("NPAFP rate target: ≥2/100,000 children &lt;15 years/year"))
    story.append(Sub("Stool specimens for poliovirus isolation within 14 days of onset"))
    story.append(B("<b>4. Mopping-Up Operations"))
    story.append(Sub("House-to-house vaccination in high-risk/inaccessible areas"))
    story.append(Sub("Targeted at areas with poor routine coverage"))
    story.append(H("Nepal's Achievement"))
    story.append(B("Nepal certified POLIO-FREE; last case in 2010; WHO certification achieved"))
    story.append(Spacer(1,6))

    story.append(Q("Q2. Malariometric Indices + Treatment of Uncomplicated Malaria in Nepal"))
    story.append(H("Malariometric Indices (K Park)"))
    tbl = make_table([
        ["Index","Definition","Significance"],
        ["Spleen Rate (SR)","% population with palpable spleen (>2 yrs)","Reflects past/current malaria transmission"],
        ["Parasite Rate (PR)","% population with malaria parasites on blood smear","Active transmission indicator"],
        ["Infant Parasite Rate (IPR)","% infants &lt;1 yr with parasites","Most sensitive indicator of recent transmission"],
        ["Annual Blood Exam Rate (ABER)","% population blood-tested per year","Quality of surveillance (target ≥10%)"],
        ["Annual Parasite Incidence (API)","Confirmed cases per 1000 population/year","Burden measure"],
        ["Slide Positivity Rate (SPR)","% positive slides among slides examined","Treatment load indicator"],
    ], col_widths=[1.5*inch, 2.2*inch, 2.5*inch])
    story.append(tbl)
    story.append(H("Treatment of Uncomplicated Malaria — Nepal (EDCD Guidelines based on K Park)"))
    story.append(B("<b>P. falciparum (uncomplicated):</b>"))
    story.append(Sub("ACT: Artemether-Lumefantrine (AL) — 6 doses over 3 days"))
    story.append(Sub("+ Single dose Primaquine 0.75 mg/kg on Day 1 (gametocytocidal)"))
    story.append(B("<b>P. vivax:</b>"))
    story.append(Sub("Chloroquine 25 mg/kg over 3 days (10+10+5 mg/kg)"))
    story.append(Sub("+ Primaquine 0.25 mg/kg/day for 14 days (radical cure of liver stage)"))
    story.append(Sub("Check G6PD before Primaquine — contraindicated in G6PD deficiency"))
    story.append(Spacer(1,6))

    story.append(Q("Q3. Pneumoconiosis — Definition + Medical Control Measures"))
    story.append(H("Definition (K Park)"))
    story.append(P("Pneumoconiosis is the <b>accumulation of dust in the lungs causing tissue reaction</b>. It is an irreversible, progressive occupational lung disease."))
    story.append(H("Types"))
    story.append(B("Silicosis — free crystalline silica (quarry workers, miners, stone cutters)"))
    story.append(B("Coal Workers' Pneumoconiosis (CWP) — coal dust"))
    story.append(B("Asbestosis — asbestos fibers → mesothelioma risk"))
    story.append(B("Byssinosis — cotton/hemp dust (textile workers)"))
    story.append(H("Medical Control Measures"))
    story.append(B("<b>Pre-employment medical examination:</b> Baseline CXR, spirometry, exclude high-risk persons"))
    story.append(B("<b>Periodic medical examination:</b> Annual CXR, pulmonary function tests"))
    story.append(B("<b>Early detection and removal:</b> Transfer worker from dusty environment when early changes detected"))
    story.append(B("<b>Treatment of complications:</b> Bronchodilators, treat superimposed TB/infections"))
    story.append(B("<b>Workers' compensation:</b> Disability benefits, rehabilitation"))
    story.append(B("<b>Health education:</b> Educate workers about risks, proper PPE use"))
    story.append(Spacer(1,6))

    story.append(Q("Q4. National Kalaazar (Visceral Leishmaniasis) Control Program — Nepal"))
    story.append(H("Diagnosis"))
    story.append(B("<b>rK39 Rapid Diagnostic Test (RDT):</b> Primary screening tool at PHC level — simple, sensitive"))
    story.append(B("<b>Gold standard:</b> Splenic/bone marrow aspirate showing Leishman-Donovan (LD) bodies"))
    story.append(B("<b>DAT (Direct Agglutination Test):</b> Used in field settings"))
    story.append(B("<b>PCR:</b> Most sensitive, used in reference labs"))
    story.append(H("Treatment in Nepal"))
    story.append(B("<b>First line: Miltefosine</b> (oral) 2.5 mg/kg/day for 28 days"))
    story.append(B("<b>Alternatives:</b> Liposomal Amphotericin B (AmBisome) single dose 10 mg/kg IV"))
    story.append(B("<b>SSG (Sodium Stibogluconate):</b> 20 mg/kg/day IM/IV for 30 days — use if Miltefosine fails"))
    story.append(H("Prevention"))
    story.append(B("Indoor Residual Spraying (IRS) with DDT/synthetic pyrethroids (Phlebotomus vector control)"))
    story.append(B("Long-Lasting Insecticidal Nets (LLIN) — prevents sandfly bites (bites at night/indoors)"))
    story.append(B("Early diagnosis and treatment (reduce reservoir)"))
    story.append(B("Avoid sleeping on floor, use repellents"))
    story.append(Spacer(1,6))

    story.append(Q("Q5. WHO Recommended Multidrug Therapy (MDT) for Leprosy"))
    story.append(H("Classification for MDT (K Park — WHO)"))
    story.append(B("<b>Paucibacillary (PB):</b> 1–5 skin lesions, 1 nerve trunk involved, smear negative"))
    story.append(B("<b>Multibacillary (MB):</b> ≥6 skin lesions, ≥2 nerves involved, OR any smear positive"))
    story.append(H("MDT Regimens"))
    tbl = make_table([
        ["Type","Drug","Dose","Frequency","Duration"],
        ["PB Leprosy","Rifampicin","600 mg","Monthly supervised","6 months"],
        ["","Dapsone","100 mg","Daily self-administered","6 months"],
        ["MB Leprosy","Rifampicin","600 mg","Monthly supervised","12 months"],
        ["","Clofazimine","300 mg","Monthly supervised","12 months"],
        ["","Clofazimine","50 mg","Daily self-administered","12 months"],
        ["","Dapsone","100 mg","Daily self-administered","12 months"],
    ], col_widths=[1.1*inch, 1.1*inch, 0.9*inch, 1.8*inch, 1.3*inch])
    story.append(tbl)
    story.append(H("Key Points"))
    story.append(B("MDT cures leprosy and prevents resistance and relapse"))
    story.append(B("MDT services are FREE in Nepal"))
    story.append(B("Rifampicin is bactericidal (kills 99.9% bacilli in first dose)"))
    story.append(Spacer(1,6))

    story.append(Q("Q6. Epidemiology of Drug Dependence — Agent, Host, Environmental Factors"))
    story.append(H("Agent Factors"))
    story.append(B("Drugs of abuse: Opioids (heroin, morphine, codeine), Cannabis (marijuana), Cocaine, Amphetamines (methamphetamine), Alcohol, Sedatives/hypnotics, Inhalants"))
    story.append(B("Drug properties: Euphoria, tolerance (need more for same effect), physical dependence (withdrawal on stopping), psychological dependence (craving)"))
    story.append(H("Host Factors"))
    story.append(B("Age: Peak 15–24 years (adolescents most vulnerable)"))
    story.append(B("Sex: Male &gt; Female (3:1 ratio)"))
    story.append(B("Personality: Low self-esteem, thrill-seeking, rebelliousness, mental illness (depression, anxiety)"))
    story.append(B("Family history of substance abuse"))
    story.append(B("Curiosity and experimentation"))
    story.append(H("Environmental Factors"))
    story.append(B("Peer pressure — most powerful factor in initiation"))
    story.append(B("Easy drug availability (trafficking, accessibility)"))
    story.append(B("Socioeconomic: Unemployment, poverty, social disruption"))
    story.append(B("Urbanization and migration"))
    story.append(B("Lack of recreational facilities for youth"))
    story.append(B("Weak family structure, emotional neglect"))
    story.append(Spacer(1,6))

    story.append(rule())
    story.append(Q("PBQ 7 — 2-year-old girl, 13 kg, loose watery stools 2 days, restless, thirsty, skin pinch slow"))
    story.append(H("(a) Common Causes of Diarrhoea in Under-5 Children [4]"))
    story.append(B("<b>Viral (most common):</b> Rotavirus (single most common cause — 40%), Norovirus, Adenovirus"))
    story.append(B("<b>Bacterial:</b> ETEC (traveller's/watery diarrhoea), Shigella (bloody), Salmonella, Campylobacter, V.cholerae"))
    story.append(B("<b>Parasitic:</b> Giardia lamblia, Cryptosporidium, Entamoeba histolytica (bloody)"))
    story.append(B("<b>Predisposing factors:</b> Malnutrition, poor hygiene, unsafe water, not breastfed, crowding"))
    story.append(H("(b) Classification of Hydration Status [2]"))
    story.append(B("<b>This child: SOME DEHYDRATION</b> (Plan B)"))
    story.append(Sub("Restless/irritable ✓, Thirsty/eager to drink ✓, Skin pinch goes back slowly ✓"))
    story.append(Sub("Two or more signs of some dehydration present"))
    story.append(H("(c) Treatment — Plan B [2]"))
    story.append(B("<b>ORS: 75 ml/kg over 4 hours</b> = 75 × 13 = 975 ml ORS over 4 hours"))
    story.append(B("Give in sips; reassess every 1–2 hours"))
    story.append(B("<b>Zinc:</b> 20 mg/day for 10–14 days (reduces severity and duration by 25%)"))
    story.append(B("Continue breastfeeding throughout"))
    story.append(B("Reassess after 4 hours: if improved → Plan A; if worse → Plan C"))
    story.append(B("No antibiotics (watery diarrhoea, no blood/mucus)"))
    story.append(H("(d) Advice to Mother [2]"))
    story.append(B("Continue breastfeeding frequently"))
    story.append(B("Give extra ORS after every stool at home"))
    story.append(B("Continue giving zinc for full 10–14 days"))
    story.append(B("Continue normal feeding — do NOT stop food"))
    story.append(B("Wash hands with soap before feeding and after changing nappies"))
    story.append(B("Return immediately if: child cannot drink, skin pinch very slow, blood in stool, high fever"))
    story.append(Spacer(1,6))

    story.append(Q("PBQ 8 — 15-yr boy, stray dog bite, left calf, 1×1.5 cm, bleeding"))
    story.append(H("(a) Category of Contact [1]"))
    story.append(B("<b>Category III exposure</b> — transdermal bite (skin broken, wound bleeding)"))
    story.append(H("(b) Type of Exposure [1]"))
    story.append(B("<b>Severe exposure</b> — single transdermal bite on exposed site (calf), wound bleeding"))
    story.append(H("(c) Wound Treatment [4]"))
    story.append(B("<b>IMMEDIATE thorough wound washing:</b>"))
    story.append(Sub("Wash with <b>soap and running water for minimum 15 minutes</b> (most important first-aid step)"))
    story.append(Sub("Apply <b>povidone iodine 2–3%</b> or <b>70% ethanol</b> after washing"))
    story.append(B("<b>Do NOT suture</b> the wound immediately (suturing spreads virus)"))
    story.append(B("Tetanus toxoid if not previously immunized"))
    story.append(B("Antibiotics for secondary infection prevention"))
    story.append(B("Document wound size, location, animal details"))
    story.append(H("(d) Post-Exposure Prophylaxis (PEP) [4]"))
    story.append(B("<b>Category III → Requires: Vaccine + RIG</b>"))
    story.append(H("Vaccine (modern cell culture vaccines):"))
    story.append(Sub("HDCV / PCECV / PVRV — any one"))
    story.append(Sub("<b>IM Essen regimen:</b> 5 doses on Days 0, 3, 7, 14, 28 (0.5 ml IM deltoid)"))
    story.append(Sub("<b>OR Zagreb (2-1-1):</b> 2 doses Day 0 (both arms) + 1 dose Day 7 + 1 dose Day 21"))
    story.append(Sub("<b>OR Intradermal (ID) regimen:</b> 0.1 ml 2 sites Days 0, 3, 7, 28 (cost-saving)"))
    story.append(H("Rabies Immunoglobulin (RIG) — Day 0 only:"))
    story.append(Sub("HRIG (Human RIG): 20 IU/kg body weight — infiltrate around wound"))
    story.append(Sub("OR ERIG (Equine RIG): 40 IU/kg — infiltrate around wound"))
    story.append(Sub("Any remaining RIG given IM at distant site"))
    story.append(Sub("RIG must be given on Day 0 BEFORE or SAME day as first vaccine dose"))

    pdf.build(story)
    return path

# ══════════════════════════════════════════════════════════════════════════════
# PAPER 3 — NMC May 2016 Sessional
# ══════════════════════════════════════════════════════════════════════════════
def paper3():
    pdf, path = doc("paper3_may2016.pdf", "", "")
    story = []
    hdr("NEPAL MEDICAL COLLEGE — MAY 2016 SESSIONAL",
        "MBBS 17th / 5th Semester | Subject: Community Medicine | Full Marks: 50 | Time: 1 Hr 40 Min",
        story)

    story.append(Q("Q1. Treatment of Typhoid Fever + Preventive Measures"))
    story.append(H("Treatment (K Park)"))
    story.append(B("<b>First-line drugs:</b>"))
    story.append(Sub("Fluoroquinolones: Ciprofloxacin 500 mg BD × 7–10 days OR Ofloxacin 400 mg BD × 7 days"))
    story.append(Sub("Azithromycin: 1 g stat then 500 mg/day × 6 days (for uncomplicated cases)"))
    story.append(B("<b>For MDR typhoid (resistant to Amp, Chlor, TMP-SMX):</b>"))
    story.append(Sub("Ceftriaxone 2 g IV/day × 10–14 days"))
    story.append(Sub("Azithromycin remains effective"))
    story.append(B("<b>Supportive:</b> Antipyretics, nutrition, hydration, bed rest"))
    story.append(B("<b>Complications management:</b> Perforation → surgery; Bleeding → transfusion"))
    story.append(H("Preventive Measures (K Park)"))
    story.append(B("<b>Specific protection — Vaccination:</b>"))
    story.append(Sub("Vi polysaccharide vaccine: 1 dose SC/IM, ≥2 years, protects 3 years"))
    story.append(Sub("Ty21a oral (Vivotif): 3 capsules alternate days, ≥6 years, protects 3–5 years"))
    story.append(Sub("Vi-TT conjugate (Typbar-TCV): 1 dose from 6 months, long-lasting protection"))
    story.append(B("<b>Non-specific prevention:</b> Safe water (boiling/chlorination), food hygiene, handwashing, sanitation improvement (proper latrines), health education, control of carriers, fly control"))
    story.append(Spacer(1,6))

    story.append(Q("Q2. Agent, Host, Environmental Factors of Tetanus + Prevention of Neonatal Tetanus"))
    story.append(H("Agent"))
    story.append(B("<i>Clostridium tetani</i> — gram +ve, spore-forming, anaerobic bacillus"))
    story.append(B("Produces <b>tetanospasmin</b> (neurotoxin) → blocks inhibitory neurons → spasms"))
    story.append(B("Spores survive in soil/environment for years; heat-resistant"))
    story.append(H("Host Factors"))
    story.append(B("No natural immunity — all ages susceptible"))
    story.append(B("Neonates most vulnerable (unhygienic cord cutting/dressing)"))
    story.append(B("Unimmunized persons, elderly with waned immunity"))
    story.append(B("IV drug users, those with penetrating wounds"))
    story.append(H("Environmental Factors"))
    story.append(B("Soil, animal/human faeces, rusty metal, manure"))
    story.append(B("Agricultural/rural areas (more soil contact)"))
    story.append(B("Lack of clean delivery services"))
    story.append(H("Prevention of Neonatal Tetanus (K Park)"))
    story.append(B("<b>1. Immunization of pregnant women:</b>"))
    story.append(Sub("TT1: As early as possible in pregnancy"))
    story.append(Sub("TT2: At least 4 weeks after TT1 → protects mother AND transfers antibodies to baby"))
    story.append(Sub("For subsequent pregnancies: 1 booster dose if within 3 years; 2 doses if &gt;3 years"))
    story.append(Sub("5 doses of TT in lifetime = lifelong protection"))
    story.append(B("<b>2. Clean delivery (5 cleans):</b> Clean hands, surface, blade, cord, cord tie"))
    story.append(B("<b>3. Clean cord care:</b> Do not apply cow dung/mud/ash; keep dry and clean"))
    story.append(B("<b>4. Skilled birth attendant</b> at delivery"))
    story.append(B("<b>5. Elimination target:</b> WHO target &lt;1 case per 1000 live births in every district"))
    story.append(Spacer(1,6))

    story.append(Q("Q3. Strategy for Elimination of Poliomyelitis in Nepal"))
    story.append(P("(Same four-pillar strategy as Paper 2, Q1 — see above for full detail)"))
    story.append(B("<b>Four pillars:</b> 1) Routine immunization (OPV/IPV schedule)  2) NIDs/SIAs (bOPV pulse)  3) AFP surveillance  4) Mopping-up"))
    story.append(B("Nepal certified polio-free; last indigenous case 2010"))
    story.append(Spacer(1,6))

    story.append(Q("Q4. Diagnosis and Treatment of Multidrug Resistant Tuberculosis (MDR-TB)"))
    story.append(H("Definition (K Park/WHO)"))
    story.append(B("<b>MDR-TB:</b> Resistant to at least Isoniazid (H) AND Rifampicin (R)"))
    story.append(B("<b>XDR-TB:</b> MDR-TB + resistant to fluoroquinolone + one injectable second-line drug"))
    story.append(H("Diagnosis"))
    story.append(B("<b>Xpert MTB/RIF (GeneXpert):</b> Rapid molecular test — detects TB AND Rifampicin resistance in 2 hours; WHO recommended first test"))
    story.append(B("<b>Culture + Drug Susceptibility Testing (DST):</b> Gold standard — solid (LJ media 6–8 wks) or liquid MGIT (2 weeks)"))
    story.append(B("<b>Line Probe Assay (LPA):</b> Rapid test for H and R resistance"))
    story.append(H("Treatment — WHO Shorter MDR-TB Regimen (9–11 months):"))
    story.append(B("Intensive phase (4–6 months): Moxifloxacin + Clofazimine + Ethambutol + Pyrazinamide + Isoniazid (high dose) + Kanamycin + Prothionamide"))
    story.append(B("Continuation phase (5 months): Moxifloxacin + Clofazimine + Ethambutol + Pyrazinamide"))
    story.append(H("WHO Longer Regimen (18–24 months) — Group A drugs first:"))
    story.append(B("Group A (use all 3): Levofloxacin/Moxifloxacin + Bedaquiline + Linezolid"))
    story.append(B("Group B (add 1–2): Clofazimine + Cycloserine"))
    story.append(B("Group C (add to complete): Ethambutol, Pyrazinamide, Delamanid, Amikacin"))
    story.append(H("Key Points"))
    story.append(B("Managed under directly observed therapy (DOTS-Plus)"))
    story.append(B("Adverse drug effects must be monitored (audiotoxicity, nephrotoxicity with injectables)"))
    story.append(Spacer(1,6))

    story.append(Q("Q5. Occupational Hazards of Carpet Weavers + Prevention"))
    story.append(H("Hazards (K Park)"))
    story.append(B("<b>Musculoskeletal:</b> Back pain, neck pain, shoulder pain (prolonged awkward posture); Carpal tunnel syndrome (repetitive hand movements)"))
    story.append(B("<b>Visual:</b> Eye strain, headache, visual problems (close concentrated work in poor light)"))
    story.append(B("<b>Respiratory:</b> Wool dust inhalation → allergic rhinitis, occupational asthma; chemical dyes → respiratory sensitization"))
    story.append(B("<b>Skin:</b> Dermatitis from chemical dyes, synthetic dyes"))
    story.append(B("<b>Psychosocial:</b> Monotonous repetitive work, child labour exploitation, long hours"))
    story.append(B("<b>Biological:</b> Anthrax (bacillus anthracis from raw wool) — rare but possible"))
    story.append(H("Prevention"))
    story.append(B("<b>Ergonomic measures:</b> Adjustable looms at correct height, proper seating with back support, work at eye level"))
    story.append(B("<b>Adequate lighting:</b> Minimum 300 lux at work surface"))
    story.append(B("<b>Rest breaks:</b> Frequent short breaks, stretching exercises"))
    story.append(B("<b>PPE:</b> Dust masks, gloves for dye handling"))
    story.append(B("<b>Health surveillance:</b> Periodic medical examination, spirometry for respiratory function"))
    story.append(B("<b>No child labour:</b> Enforce minimum age laws; education alternatives"))
    story.append(B("<b>Health education:</b> Workers trained on hazards and safety measures"))
    story.append(Spacer(1,6))

    story.append(Q("Q6. Normal Probability Curve (K Park)"))
    story.append(H("Definition"))
    story.append(P("The normal (Gaussian) probability curve is a <b>bell-shaped, symmetrical, continuous probability distribution</b>. It is the most important distribution in statistics and the basis of many statistical tests."))
    story.append(H("Key Properties"))
    story.append(B("<b>Symmetrical:</b> Bell-shaped curve; equal halves on both sides of mean"))
    story.append(B("<b>Mean = Median = Mode</b> (all coincide at center)"))
    story.append(B("<b>Asymptotic:</b> Tails approach but never touch the x-axis"))
    story.append(B("<b>Defined by two parameters:</b> Mean (μ) and Standard Deviation (σ)"))
    story.append(B("<b>Total area under curve = 1</b> (100% of observations)"))
    story.append(H("Area Under Curve — Critical Values"))
    tbl = make_table([
        ["Range","% of Observations"],
        ["μ ± 1σ","68.27%"],
        ["μ ± 2σ","95.45%"],
        ["μ ± 3σ","99.73%"],
        ["μ ± 1.96σ","95% (used in 95% CI)"],
        ["μ ± 2.58σ","99% (used in 99% CI)"],
    ], col_widths=[2*inch, 2*inch])
    story.append(tbl)
    story.append(H("Standard Normal Deviate (Z-score)"))
    story.append(B("Z = (X − μ) / σ"))
    story.append(B("Converts any normal distribution to standard normal (mean=0, SD=1)"))
    story.append(H("Uses in Medicine"))
    story.append(B("Reference ranges (e.g., normal lab values = mean ± 2SD)"))
    story.append(B("Confidence intervals, hypothesis testing, p-values"))
    story.append(B("Growth charts, epidemiological studies"))
    story.append(Spacer(1,6))

    story.append(rule())
    story.append(Q("PBQ 7 — 30-yr male, fever + chills 5 days, travel to Terai 3 weeks ago"))
    story.append(H("(a) Differential Diagnosis [3]"))
    story.append(B("<b>1. Malaria (P. falciparum or P. vivax)</b> — most likely (Terai travel, fever+chills pattern)"))
    story.append(B("2. Dengue fever (fever + headache + nausea in Terai)"))
    story.append(B("3. Typhoid fever (prolonged fever, travel history)"))
    story.append(H("(b) Treatment if P. falciparum [2]"))
    story.append(B("<b>ACT: Artemether-Lumefantrine (AL) for 3 days</b> (6 doses)"))
    story.append(B("+ Single dose Primaquine 0.75 mg/kg (gametocytocidal)"))
    story.append(B("Supportive: antipyretics, hydration"))
    story.append(B("Admit if severe malaria signs: impaired consciousness, severe anaemia, pulmonary oedema"))
    story.append(H("(c) Malariometric Indices [3]"))
    story.append(P("SR, PR, IPR, ABER, API, SPR — (detailed table in Paper 2, Q2 above)"))
    story.append(H("(d) Advice for Prevention [2]"))
    story.append(B("Use Long-Lasting Insecticidal Nets (LLIN) while sleeping"))
    story.append(B("Apply insect repellents on exposed skin (DEET-based)"))
    story.append(B("Wear protective clothing (long sleeves, full trousers) especially at dusk/dawn"))
    story.append(B("Indoor Residual Spraying (IRS) if living in endemic area"))
    story.append(B("Chemoprophylaxis if travelling to high-risk area: Chloroquine (for P. vivax areas)"))
    story.append(Spacer(1,6))

    story.append(Q("PBQ 8 — 20-yr female, stray dog bite, left calf, 1×1.5 cm, bleeding"))
    story.append(H("(a) Category of Contact [2]"))
    story.append(B("<b>Category III</b> — transdermal bite with skin broken and wound bleeding"))
    story.append(H("(b) Wound Treatment [4]"))
    story.append(B("Immediately wash wound with soap and running water for <b>minimum 15 minutes</b>"))
    story.append(B("Apply <b>povidone iodine 2–3%</b> or 70% ethanol to wound"))
    story.append(B("<b>Do NOT suture</b> immediately; if suturing needed, first give RIG locally"))
    story.append(B("Tetanus prophylaxis (TT if not immunized)"))
    story.append(B("Antibiotics for infection prevention (Amoxicillin-Clavulanate)"))
    story.append(H("(c) Post-Exposure Prophylaxis [4]"))
    story.append(B("<b>Cat III: Vaccine + RIG (both required)</b>"))
    story.append(B("<b>Vaccine:</b> PCECV or HDCV or PVRV"))
    story.append(Sub("IM Essen: Days 0, 3, 7, 14, 28 (5 doses)"))
    story.append(Sub("OR ID 2-site regimen: 0.1 ml × 2 sites on Days 0, 3, 7, 28 (more cost-effective)"))
    story.append(B("<b>RIG (on Day 0 only):</b>"))
    story.append(Sub("HRIG 20 IU/kg — infiltrate as much as possible around wound"))
    story.append(Sub("OR ERIG 40 IU/kg — give ERIG skin test first"))
    story.append(B("Observe dog for 10 days — if dog survives healthy, may stop vaccines after day 7"))

    pdf.build(story)
    return path

print("Papers 1-3 functions defined. Building PDFs...")
p1 = paper1()
print(f"Paper 1 created: {p1}")
p2 = paper2()
print(f"Paper 2 created: {p2}")
p3 = paper3()
print(f"Paper 3 created: {p3}")
print("DONE with papers 1-3")
Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.

Run the Python script to generate all 9 PDF answer sheets

Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.

Download the generated PDF files to your device once ready

Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.

Please try to make the PDF

Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.

Purchase credits or subscribe to continue

Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.

Purchase Orris credits to continue PDF generation

Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.
This is a shared conversation. Sign in to Orris to start your own chat.