Analysis this 10 years pervious year question paper and tell me if there is pattern for repeating questions , imp topic and I have 3 days to prepare for the exam help me out
cd "/tmp/workspace/attachments/d796a7e2-2668-4999-a743-36cfb6df8727/" && python3 -c " import pdfplumber import json pdf_path = 'DocScanner 27-Jul-2026 10-26 AM.pdf' all_text = [] with pdfplumber.open(pdf_path) as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): text = page.extract_text() if text: all_text.append(f'=== PAGE {i+1} ===\n{text}') else: all_text.append(f'=== PAGE {i+1} === [no text extracted]') full = '\n\n'.join(all_text) print(full[:8000]) "
python3 -c " from PIL import Image import pypdf, io, os pdf_path = '/tmp/workspace/attachments/d796a7e2-2668-4999-a743-36cfb6df8727/DocScanner 27-Jul-2026 10-26 AM.pdf' out_dir = '/tmp/workspace/qp_pages' os.makedirs(out_dir, exist_ok=True) # Try extracting images from PDF pages reader = pypdf.PdfReader(pdf_path) print(f'Pages: {len(reader.pages)}') for i, page in enumerate(reader.pages): images = page.images print(f'Page {i+1}: {len(images)} images') if images: img_data = images[0].data with open(f'{out_dir}/page_{i+1:02d}.jpg', 'wb') as f: f.write(img_data) print(f' Saved page_{i+1:02d}.jpg, size={len(img_data)}') "
Analysis this 10 years pervious year question paper and tell me if there is pattern , imp topic and I have 3 days to prepare for the exam help me out
python3 -c " import os # Check if tesseract or any OCR tools are available import subprocess result = subprocess.run(['which', 'tesseract'], capture_output=True, text=True) print('tesseract:', result.stdout.strip()) result2 = subprocess.run(['python3', '-c', 'import pytesseract; print(pytesseract.__version__)'], capture_output=True, text=True) print('pytesseract:', result2.stdout.strip(), result2.stderr.strip()) result3 = subprocess.run(['python3', '-c', 'import easyocr; print(\"easyocr ok\")'], capture_output=True, text=True) print('easyocr:', result3.stdout.strip(), result3.stderr.strip()[:100]) "
pip install --user pytesseract 2>&1 | tail -3; apt-get install -y tesseract-ocr 2>&1 | tail -5
python3 -c " import sys sys.path.insert(0, '/opt/amazon/genesis1p-tools/var/.local/lib/python3.12/site-packages') import pytesseract from PIL import Image import os pages_dir = '/tmp/workspace/qp_pages' out_file = '/tmp/workspace/qp_text.txt' all_text = [] for i in range(1, 25): img_path = f'{pages_dir}/page_{i:02d}.jpg' if os.path.exists(img_path): try: img = Image.open(img_path) text = pytesseract.image_to_string(img) all_text.append(f'=== PAGE {i} ===\n{text}') print(f'Page {i}: {len(text)} chars') except Exception as e: print(f'Page {i} error: {e}') with open(out_file, 'w') as f: f.write('\n\n'.join(all_text)) print('Done. Total pages:', len(all_text)) " 2>&1
python3 -c " # Try markitdown on the PDF from markitdown import MarkItDown md = MarkItDown() result = md.convert('/tmp/workspace/attachments/d796a7e2-2668-4999-a743-36cfb6df8727/DocScanner 27-Jul-2026 10-26 AM.pdf') print(result.text_content[:3000]) " 2>&1
python3 -c " import base64, os # Convert first few pages to base64 to use with analyse_media via data URL img_path = '/tmp/workspace/qp_pages/page_01.jpg' with open(img_path, 'rb') as f: data = f.read() b64 = base64.b64encode(data).decode() print(f'Page 1 size: {len(data)} bytes, b64 length: {len(b64)}') print('data:image/jpeg;base64,' + b64[:100] + '...') # Also serve files via a simple HTTP server - check if we can import subprocess r = subprocess.run(['python3', '-m', 'http.server', '--help'], capture_output=True, text=True) print('http.server available:', 'usage' in r.stdout.lower() or 'usage' in r.stderr.lower()) "
# Start a background HTTP server to serve the images, then use analyse_media with the URL python3 -m http.server 8765 --directory /tmp/workspace/qp_pages & SERVER_PID=$! echo "Server PID: $SERVER_PID" sleep 2 # Test if it's running curl -s -I http://localhost:8765/page_01.jpg | head -5 echo "---" echo $SERVER_PID > /tmp/http_server_pid.txt
I need you to read and extract ALL text from 24 scanned question paper images saved at /tmp/workspace/qp_pages/page_01.jpg through page_24.jpg. These are pages from a 10-year previous year question paper (likely an Indian university or board exam). The images are scanned pages. Your job: 1. Use the `analyse_media` tool with localhost URLs to read each page image. The images are served at http://localhost:8765/page_01.jpg, http://localhost:8765/page_02.jpg ... http://localhost:8765/page_24.jpg 2. For EACH page, extract: the exam year (if shown), subject name, all question numbers and their full question text. 3. After reading all pages, compile a COMPLETE structured list of all questions organized by year and topic. 4. Identify which topics/questions repeat across years. 5. Return the COMPLETE raw transcript of all questions + a summary of repeating topics. Use analyse_media tool for EACH page URL (batch them in groups of 4-5 at a time for efficiency). Return: - Full question list by year - Topics that appear in 2+ years (repeat topics) - Topics that appear in 3+ years (very frequently tested) - The subject/course name of this exam
~/qp_pages
| Topic | How Many Years |
|---|---|
| Hypertension in Elderly | 7 years - 2016, 2017, 2018, 2019, 2021, 2022, 2024 |
| Depression in Elderly | 6 years - 2016, 2018, 2019, 2020, 2022, 2023 |
| Dementia / Alzheimer's Disease | 6 years - 2016, 2017, 2018, 2019, 2022, 2023 |
| Sleep Disorders in Elderly | 5 years - 2020, 2021, 2022, 2024, 2025 |
| Physiological/Anatomical Changes of Ageing | 5 years - 2016, 2017, 2019, 2021, 2024 |
| Topic | How Many Years |
|---|---|
| Milestones of Development (0-2 yrs) | 6 years - 2020, 2021, 2022, 2023, 2024, 2025 |
| Lumbar Puncture (indications + procedure) | 6 years - 2016, 2020, 2021, 2022, 2023, 2024 |
| National Immunization Schedule | 5 years - 2020, 2022, 2023, 2024, 2025 |
| Cerebral Palsy | 5 years - 2016, 2019, 2024, + short notes multiple years |
| Fallot's Tetralogy + Nada's Criteria | 5 years - 2020, 2022, 2023, 2024, 2025(VSD variant) |
| Juvenile Idiopathic Arthritis (JIA) | 5 years - 2020, 2021, 2022, 2023, 2024 |
| Cephalhaematoma | 5 years - 2020, 2021, 2022, 2023, 2025 |
Can you predict what question can come this year
"Define Cerebral Palsy. Discuss its classification, aetiopathogenesis, clinical picture and management."
"Define Down's Syndrome. Discuss its aetiology, clinical picture and management."
(a) National Immunization Schedule (b) Advantages of Breast Feeding (c) Meningomyelocele OR Febrile Seizures
(a) Milestones of development upto 1Β½ years of age β almost guaranteed, appeared 6 consecutive years (b) Cephalhaematoma β appeared 5 consecutive years (2020-2025), may extend (c) Juvenile Idiopathic Arthritis (JIA) β appeared 5 consecutive years (2020-2024), skipped 2025 - DUE (d) Rickets β appeared 2018, 2021 - 4 year gap, due in 2026
"Define Stroke. Discuss types of stroke, clinical presentation, and management challenges in the elderly."
"Discuss the clinical manifestations, pathophysiology and principles of management of Diabetes Mellitus among the elderly."
"What are the anatomical, physiological and cognitive changes related to ageing? How do they impact clinical management of the elderly?"
(a) Dementia / Alzheimer's Disease (b) Depression in Elderly (c) Hypertension in Elderly OR Osteoporosis
(a) Falls in Elderly β appeared 2020 and 2022, absent since - 3-year gap (b) Osteoarthritis β appeared 2020, 2021, 2022 - absent 2023, 2024, 2025 - overdue (c) Malnutrition / Nutrition in Elderly β appeared 2019, 2020, 2022 - absent 3 years (d) Peripheral Neuropathy β appeared 2018 and 2025 (long Q) - may appear as short note in 2026
| Paediatrics | Geriatrics | |
|---|---|---|
| Long Q 1 | Cerebral Palsy | Stroke OR Diabetes Mellitus |
| Long Q 2 | Down's Syndrome | Physiological Changes of Ageing |
| Short Notes | Immunization, Breast Feeding, Meningomyelocele | Dementia, Depression, Hypertension |
| Brief Answers | Milestones, JIA, Cephalhaematoma, Rickets | Falls, Osteoarthritis, Malnutrition, Peripheral Neuropathy |
| Topic | Confidence |
|---|---|
| Milestones of Development | βββββ Near certain |
| Physiological Changes of Ageing | βββββ Near certain |
| Dementia (short note) | βββββ Near certain |
| Depression (short note) | βββββ Near certain |
| National Immunization Schedule | βββββ Near certain |
| Cerebral Palsy (long Q) | ββββ Very likely |
| JIA (brief) | ββββ Very likely |
| Hypertension in Elderly | ββββ Very likely |
| Down's Syndrome | βββ Likely |
| Diabetes Mellitus in Elderly | βββ Likely |
| Stroke (long Q) | βββ Likely |
| COPD | βββ Likely |
| Falls in Elderly | βββ Likely |
Now just give a neat list to topic I have to study
If I do this much will be able to score good marks
| What you cover | Likely score |
|---|---|
| Only Long Answers | 55 - 65 |
| Long Answers + Short Notes | 62 - 70 |
| Everything on the list | 68 - 75 |
Generate a quick reference PDF for these 36 topics
ls /tmp/workspace/ && mkdir -p /tmp/workspace/qr-pdf
Can I trust you with the prediction
| Use predictions for... | Don't use predictions to... |
|---|---|
| Deciding which topics to prioritize first | Skip entire sections of the syllabus |
| Knowing which long answers to write really well | Prepare only 6 topics and gamble |
| Identifying easy marks in short notes | Ignore topics that "didn't appear recently" |
Make a final list
| # | Topic | Priority |
|---|---|---|
| 1 | Cerebral Palsy | π΄ Must |
| 2 | Fallot's Tetralogy + Nada's Criteria | π΄ Must |
| 3 | Protein Energy Malnutrition / Marasmus / Kwashiorkor | π΄ Must |
| 4 | Down's Syndrome | π΄ Must |
| 5 | Hydrocephalus | π High |
| 6 | Duchenne Muscular Dystrophy | π High |
| 7 | National Immunization Schedule | π΄ Must |
| 8 | Lumbar Puncture | π΄ Must |
| 9 | Milestones of Development (0β2 yrs) | π΄ Must |
| 10 | Cephalhaematoma | π΄ Must |
| 11 | Juvenile Idiopathic Arthritis | π΄ Must |
| 12 | Advantages of Breast Feeding | π High |
| 13 | Meningomyelocele | π High |
| 14 | Club Foot | π High |
| 15 | Rickets | π High |
| 16 | Pneumonia | π‘ Good |
| 17 | Febrile Seizures | π‘ Good |
| 18 | Ventricular Septal Defect | π‘ Good |
| 19 | Apgar Score | π‘ Good |
| # | Topic | Priority |
|---|---|---|
| 1 | Hypertension in Elderly | π΄ Must |
| 2 | Physiological & Anatomical Changes of Ageing | π΄ Must |
| 3 | Sleep Disorders in Elderly | π΄ Must |
| 4 | Depression in Elderly | π΄ Must |
| 5 | Dementia / Alzheimer's Disease | π΄ Must |
| 6 | Stroke in Elderly | π΄ Must |
| 7 | Diabetes Mellitus in Elderly | π High |
| 8 | COPD in Elderly | π High |
| 9 | Falls in Elderly | π High |
| 10 | Osteoarthritis | π High |
| 11 | Malnutrition / Nutrition in Elderly | π High |
| 12 | Peripheral Neuropathy | π High |
| 13 | Constipation in Elderly | π‘ Good |
| 14 | Osteoporosis | π‘ Good |
| 15 | MMSE | π‘ Good |
| 16 | Socio-economic Impact of Ageing | π‘ Good |
| 17 | Burden of Disease in Elderly (India) | π‘ Good |
Generate a 3-day study schedule with time blocks
| Time | Subject | Topic | Task |
|---|---|---|---|
| 6:00 β 7:30 AM | Paediatrics | Cerebral Palsy | Read + write key points |
| 7:30 β 9:00 AM | Paediatrics | Fallot's Tetralogy + Nada's Criteria | Read + make short notes |
| 9:00 β 9:30 AM | β Break | β | β |
| 9:30 β 11:00 AM | Paediatrics | PEM / Marasmus / Kwashiorkor | Read + compare table |
| 11:00 β 12:00 PM | Paediatrics | Down's Syndrome | Read + clinical features list |
| 12:00 β 1:00 PM | π½οΈ Lunch | β | β |
| 1:00 β 2:00 PM | Paediatrics | National Immunization Schedule | Memorize the chart |
| 2:00 β 2:45 PM | Paediatrics | Lumbar Puncture | Steps + indications |
| 2:45 β 3:30 PM | Paediatrics | Milestones of Development | 0, 3, 6, 9, 12, 18 months, 2 yrs |
| 3:30 β 4:00 PM | Paediatrics | Cephalhaematoma + JIA | Quick notes each |
| 4:00 β 4:30 PM | β Break | β | β |
| 4:30 β 6:00 PM | Geriatrics | Hypertension in Elderly | Full long answer format |
| 6:00 β 7:30 PM | Geriatrics | Physiological & Anatomical Changes of Ageing | Organ system by organ system |
| 7:30 β 8:00 PM | π½οΈ Dinner | β | β |
| 8:00 β 9:00 PM | Geriatrics | Sleep Disorders in Elderly | Types + management |
| 9:00 β 10:00 PM | Geriatrics | Depression + Dementia | Side-by-side comparison notes |
| 10:00 β 10:30 PM | Geriatrics | Stroke in Elderly | Types + management |
| 10:30 PM | π΄ Sleep | β | β |
| Time | Subject | Topic | Task |
|---|---|---|---|
| 6:00 β 7:00 AM | Revision | Cerebral Palsy + Fallot's | Re-read yesterday's notes |
| 7:00 β 8:00 AM | Revision | Hypertension + Ageing Changes | Re-read yesterday's notes |
| 8:00 β 8:30 AM | β Break | β | β |
| 8:30 β 9:30 AM | Paediatrics | Hydrocephalus | Definition, types, management |
| 9:30 β 10:30 AM | Paediatrics | Duchenne Muscular Dystrophy | Aetiopathogenesis, Gower's sign, management |
| 10:30 β 11:15 AM | Paediatrics | Breast Feeding + Meningomyelocele | Quick notes each |
| 11:15 β 12:00 PM | Paediatrics | Club Foot + Rickets | Quick notes each |
| 12:00 β 1:00 PM | π½οΈ Lunch | β | β |
| 1:00 β 2:30 PM | Geriatrics | Diabetes Mellitus in Elderly | Pathophysiology + management |
| 2:30 β 3:30 PM | Geriatrics | COPD in Elderly | Etiology + clinical + management |
| 3:30 β 4:15 PM | Geriatrics | Falls in Elderly | Causes + prevention + management |
| 4:15 β 4:45 PM | β Break | β | β |
| 4:45 β 5:30 PM | Geriatrics | Osteoarthritis | Clinical features + management |
| 5:30 β 6:15 PM | Geriatrics | Malnutrition + Peripheral Neuropathy | Quick notes each |
| 6:15 β 7:00 PM | Paediatrics | Pneumonia + Febrile Seizures | Quick notes each |
| 7:00 β 8:00 PM | π½οΈ Dinner | β | β |
| 8:00 β 9:30 PM | Practice | Write Cerebral Palsy answer in full | Timed: 20 min |
| 9:30 β 10:30 PM | Practice | Write Hypertension in Elderly in full | Timed: 20 min |
| 10:30 PM | π΄ Sleep | β | β |
| Time | Subject | Topic | Task |
|---|---|---|---|
| 6:00 β 7:00 AM | Paediatrics | VSD + Apgar Score | Quick notes |
| 7:00 β 8:00 AM | Geriatrics | Constipation + Osteoporosis | Quick notes |
| 8:00 β 8:30 AM | Geriatrics | MMSE + Socio-economic Impact of Ageing | Quick notes |
| 8:30 β 9:00 AM | β Break | β | β |
| 9:00 β 10:30 AM | REVISION | All Paediatrics Must topics | Re-read all notes |
| 10:30 β 12:00 PM | REVISION | All Geriatrics Must topics | Re-read all notes |
| 12:00 β 1:00 PM | π½οΈ Lunch | β | β |
| 1:00 β 2:30 PM | REVISION | All High priority topics (both parts) | Skim notes |
| 2:30 β 3:30 PM | Practice | Write Ageing Changes answer in full | Timed: 20 min |
| 3:30 β 4:00 PM | Practice | Write PEM / Marasmus answer in full | Timed: 20 min |
| 4:00 β 4:30 PM | β Break | β | β |
| 4:30 β 5:30 PM | Quick drill | Immunization chart + Milestones | Recite from memory |
| 5:30 β 6:30 PM | Quick drill | Depression vs Dementia differences | Write comparison table |
| 6:30 β 7:30 PM | π½οΈ Dinner | β | β |
| 7:30 β 8:30 PM | Final scan | Go through all short notes once | Light reading only |
| 8:30 β 9:00 PM | Exam prep | Keep stationery ready, check exam details | Logistics |
| 9:00 PM | π΄ Sleep early | β | Rest is part of prep |
| Time | Action |
|---|---|
| Wake up early | Light revision of your written notes only |
| 1 hour before exam | Stop studying. Relax. |
| In exam hall | Read all 8 questions first (both parts), then choose your best 3 per part |
| First 5 min | Plan which 6 questions you will attempt |
| Write clearly | Definition β Classification β Clinical Features β Management |
| Time per question | ~25-30 min per long answer |
| Day | Hours of Study | Topics Covered |
|---|---|---|
| Day 1 (Mon) | ~11 hours | 12 Must topics |
| Day 2 (Tue) | ~11 hours | 12 High topics + revision + 2 practice answers |
| Day 3 (Wed) | ~10 hours | 12 Good topics + full revision + 4 practice answers |
Create a one-page checklist for last-minute revision
python3 << 'EOF' from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.units import cm from reportlab.platypus import SimpleDocTemplate, Table, TableStyle, Paragraph, Spacer, HRFlowable from reportlab.lib.styles import ParagraphStyle from reportlab.lib.enums import TA_CENTER, TA_LEFT from reportlab.pdfbase import pdfmetrics output = "/tmp/workspace/qr-pdf/Last_Minute_Checklist.pdf" doc = SimpleDocTemplate( output, pagesize=A4, topMargin=0.6*cm, bottomMargin=0.6*cm, leftMargin=1.0*cm, rightMargin=1.0*cm ) # Colors RED = colors.HexColor("#C0392B") ORANGE = colors.HexColor("#E67E22") GREEN = colors.HexColor("#27AE60") BLUE = colors.HexColor("#2980B9") DGRAY = colors.HexColor("#2C3E50") LGRAY = colors.HexColor("#ECF0F1") WHITE = colors.white YELLOW = colors.HexColor("#F9E79F") PINK = colors.HexColor("#FADBD8") LGREEN = colors.HexColor("#D5F5E3") LORANGE = colors.HexColor("#FDEBD0") story = [] # ββ HEADER ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ header_data = [[ Paragraph( '<font color="white"><b>PAPER XIII β PAEDIATRICS & GERIATRICS</b><br/>' 'Last-Minute Revision Checklist | BPT / BOT | Exam: 30 July 2026</font>', ParagraphStyle('h', fontSize=12, leading=16, alignment=TA_CENTER) ) ]] header_table = Table(header_data, colWidths=[19*cm]) header_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), DGRAY), ('ALIGN', (0,0), (-1,-1), 'CENTER'), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('TOPPADDING', (0,0), (-1,-1), 8), ('BOTTOMPADDING', (0,0), (-1,-1), 8), ('ROUNDEDCORNERS', [4]), ])) story.append(header_table) story.append(Spacer(1, 0.25*cm)) # ββ LEGEND ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ legend_data = [[ Paragraph('<b>π΄ MUST KNOW</b> β Very likely in exam', ParagraphStyle('l', fontSize=8, alignment=TA_CENTER)), Paragraph('<b>π HIGH PRIORITY</b> β Probable question', ParagraphStyle('l', fontSize=8, alignment=TA_CENTER)), Paragraph('<b>π‘ GOOD TO KNOW</b> β Easy marks if comes', ParagraphStyle('l', fontSize=8, alignment=TA_CENTER)), Paragraph('<b>β</b> Tick when revised', ParagraphStyle('l', fontSize=8, alignment=TA_CENTER)), ]] leg_table = Table(legend_data, colWidths=[4.75*cm]*4) leg_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (0,0), PINK), ('BACKGROUND', (1,0), (1,0), LORANGE), ('BACKGROUND', (2,0), (2,0), YELLOW), ('BACKGROUND', (3,0), (3,0), LGRAY), ('ALIGN', (0,0), (-1,-1), 'CENTER'), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4), ('BOX', (0,0), (-1,-1), 0.5, colors.grey), ('INNERGRID', (0,0), (-1,-1), 0.5, colors.grey), ])) story.append(leg_table) story.append(Spacer(1, 0.25*cm)) # ββ HELPER STYLES ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ def sec_hdr(text, bg): return Paragraph( f'<font color="white"><b>{text}</b></font>', ParagraphStyle('sh', fontSize=9, alignment=TA_CENTER) ), bg def row(priority, topic, hint): box = "β" if priority == "R": bg, dot = PINK, "π΄" elif priority == "O": bg, dot = LORANGE, "π " else: bg, dot = YELLOW, "π‘" t = Paragraph(f'{dot} <b>{topic}</b>', ParagraphStyle('t', fontSize=8, leading=10)) h = Paragraph(f'<i>{hint}</i>', ParagraphStyle('h', fontSize=7, leading=9, textColor=colors.HexColor("#555555"))) return [box, t, h, bg] # ββ DATA βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ paeds_rows = [ row("R","Cerebral Palsy", "Def β Classification (spastic/athetoid/ataxic) β Aetio β Clinical β Mgmt"), row("R","Fallot's Tetralogy", "Nada's criteria | 4 defects: VSD, PS, RVH, Overriding Aorta | Tet spell Rx"), row("R","PEM / Marasmus / Kwashiorkor","Classify: Mild/Mod/Severe | Compare Marasmus vs Kwashiorkor table | Mgmt"), row("R","Down's Syndrome", "Trisomy 21 | Simian crease, epicanthic fold | IQ, cardiac defects | Mgmt"), row("R","National Immunization Sched.","BCG, OPV, DPT, HepB, IPV, MR, JE β ages for each. Vitamin A doses"), row("R","Lumbar Puncture", "Indications, contraindications, L3-L4 level, procedure steps, CSF findings"), row("R","Milestones of Development", "0β3β6β9β12β18 months, 2 yrs: gross motor, fine motor, speech, social"), row("R","Cephalhaematoma", "Subperiosteal bleed, doesn't cross suture, vs caput succedaneum"), row("R","Juvenile Idiopathic Arthritis","Pauci/Poly/Systemic types | RF, ANA | Uveitis | NSAIDs, DMARDs"), row("O","Hydrocephalus", "Obstructive vs communicating | Sunset sign | VP shunt"), row("O","Duchenne Muscular Dystrophy","X-linked recessive | Dystrophin | Gower's sign | Pseudohypertrophy | CKβ"), row("O","Advantages of Breast Feeding","Colostrum, IgA, bonding, nutrition, anti-infective factors"), row("O","Meningomyelocele", "Neural tube defect | L/S region | Arnold-Chiari | Surgical closure"), row("O","Club Foot (CTEV)", "Cavus, Adductus, Varus, Equinus | Ponseti method | Denis Browne splint"), row("O","Rickets", "Vit D deficiency | Craniotabes, rachitic rosary, Harrison's sulcus | Rx: Vit D"), row("Y","Pneumonia", "Streptococcal | Consolidation | Fever, cough, tachypnoea | Amoxicillin"), row("Y","Febrile Seizures", "6mβ5yr, temp >38Β°C, simple vs complex | Diazepam | Reassure parents"), row("Y","Ventricular Septal Defect", "Holosystolic murmur L sternal border | Eisenmenger | Surgical closure"), row("Y","Apgar Score", "A-Appearance P-Pulse G-Grimace A-Activity R-Respiration | 0/1/2 each"), ] geri_rows = [ row("R","Hypertension in Elderly", "ISH (SBPβ₯140, DBP<90) | Thiazide/CCB first line | Target <150/90 in >60yr"), row("R","Physiological Changes of Ageing","CVS: βCO | Resp: βFEV1 | Renal: βGFR | CNS: βneurons | MSK: βBMD"), row("R","Sleep Disorders in Elderly", "Insomnia, OSA, RLS | Non-pharm first (sleep hygiene) | CBT-I | Melatonin"), row("R","Depression in Elderly", "GDS scale | Bio-psycho-social factors | SSRIs | ECT if severe | Suicide risk"), row("R","Dementia / Alzheimer's", "MMSE <24 | Stages: mild/mod/severe | Cholinesterase inhibitors | Memantine"), row("R","Stroke in Elderly", "Ischaemic (80%) vs Haemorrhagic | FAST | tPA <4.5h | Rehab, aspirin"), row("O","Diabetes Mellitus in Elderly","Atypical presentation | HbA1c target <7.5 | Metformin | Hypoglycaemia risk"), row("O","COPD in Elderly", "Smoking hx | FEV1/FVC <0.7 | GOLD staging | SABA, LABA, ICS | O2 therapy"), row("O","Falls in Elderly", "Intrinsic (vision, BP, meds) + Extrinsic (floor, lighting) | Timed Up & Go test"), row("O","Osteoarthritis", "Wear & tear | Weight-bearing joints | Heberden/Bouchard nodes | NSAIDs, TKR"), row("O","Malnutrition / Nutrition", "MNA tool | Protein 1β1.2g/kg | Vit D, Ca, B12 deficiency common in elderly"), row("O","Peripheral Neuropathy", "DM, B12 def, alcohol | Glove-stocking pattern | NCS | Gabapentin, B12"), row("Y","Constipation in Elderly", "Immobility, low fibre, drugs | Bulk laxatives, osmotic laxatives, enema"), row("Y","Osteoporosis", "T-score β€ -2.5 | DEXA scan | Ca+Vit D | Bisphosphonates | Fall prevention"), row("Y","MMSE", "30-point scale | Orientation(10), Memory(3), Attention(5), Language(8), Copy(1)"), row("Y","Socio-economic Impact of Ageing","Retirement, poverty, isolation, dependency ratio, elder abuse"), row("Y","Burden of Disease / India", "60+ = 10.5% population | NCDs dominant | Lack of geriatric services"), ] def build_section(title, bg_color, rows_data, col_widths): """Build a section header + rows as a Table.""" # Section header spanning all cols hdr = Paragraph(f'<font color="white"><b>{title}</b></font>', ParagraphStyle('sh', fontSize=9.5, alignment=TA_CENTER)) table_rows = [[hdr, '', '', '']] styles = [ ('SPAN', (0,0), (-1,0)), ('BACKGROUND', (0,0), (-1,0), bg_color), ('ALIGN', (0,0), (-1,0), 'CENTER'), ('TOPPADDING', (0,0), (-1,0), 5), ('BOTTOMPADDING', (0,0), (-1,0), 5), ('INNERGRID', (0,1), (-1,-1), 0.3, colors.HexColor("#CCCCCC")), ('BOX', (0,0), (-1,-1), 0.5, colors.HexColor("#AAAAAA")), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ] for i, r in enumerate(rows_data, start=1): bg = r[3] table_rows.append([r[0], r[1], r[2], '']) styles += [ ('BACKGROUND', (0,i), (-1,i), bg), ('ALIGN', (0,i), (0,i), 'CENTER'), ('TOPPADDING', (0,i), (-1,i), 2), ('BOTTOMPADDING',(0,i),(-1,-1), 2), ] t = Table(table_rows, colWidths=col_widths) t.setStyle(TableStyle(styles)) return t # Two-column layout: Paeds left, Geri right # Build each as its own table then put side by side cw_p = [0.6*cm, 5.0*cm, 3.8*cm, 0*cm] # check | topic | hint | (bg col hidden) cw_g = [0.6*cm, 5.0*cm, 3.5*cm, 0*cm] paeds_tbl = build_section("PAEDIATRICS (Part I)", BLUE, paeds_rows, cw_p) geri_tbl = build_section("GERIATRICS (Part II)", GREEN, geri_rows, cw_g) combined = Table([[paeds_tbl, geri_tbl]], colWidths=[9.6*cm, 9.4*cm]) combined.setStyle(TableStyle([ ('VALIGN', (0,0), (-1,-1), 'TOP'), ('LEFTPADDING', (0,0), (-1,-1), 2), ('RIGHTPADDING', (0,0), (-1,-1), 2), ])) story.append(combined) story.append(Spacer(1, 0.2*cm)) # ββ EXAM-DAY TIPS BAR ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ tips = [ "Read ALL 8 Qs first", "Attempt best 3 per part", "25-30 min per long Q", "Always: Def β Classification β Clinical β Management", "Attempt ALL 6 β no blanks", ] tips_text = " | ".join(f"β {t}" for t in tips) tip_data = [[Paragraph(f'<font color="white"><b>EXAM DAY TIPS: </b>{tips_text}</font>', ParagraphStyle('tp', fontSize=7.5, alignment=TA_CENTER))]] tip_table = Table(tip_data, colWidths=[19*cm]) tip_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), DGRAY), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ])) story.append(tip_table) doc.build(story) print("PDF created:", output) import os; print("Size:", os.path.getsize(output), "bytes") EOF
mkdir -p /tmp/workspace/qr-pdf && python3 << 'EOF' from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.units import cm from reportlab.platypus import SimpleDocTemplate, Table, TableStyle, Paragraph, Spacer from reportlab.lib.styles import ParagraphStyle from reportlab.lib.enums import TA_CENTER, TA_LEFT output = "/tmp/workspace/qr-pdf/Last_Minute_Checklist.pdf" doc = SimpleDocTemplate( output, pagesize=A4, topMargin=0.6*cm, bottomMargin=0.6*cm, leftMargin=1.0*cm, rightMargin=1.0*cm ) RED=colors.HexColor("#C0392B"); ORANGE=colors.HexColor("#E67E22") BLUE=colors.HexColor("#2980B9"); GREEN=colors.HexColor("#27AE60") DGRAY=colors.HexColor("#2C3E50"); LGRAY=colors.HexColor("#ECF0F1") WHITE=colors.white; YELLOW=colors.HexColor("#FEF9E7") PINK=colors.HexColor("#FDEDEC"); LGREEN=colors.HexColor("#EAFAF1") LORANGE=colors.HexColor("#FEF5E7"); LBLUE=colors.HexColor("#EBF5FB") story = [] # HEADER hdr_data = [[Paragraph( '<font color="white"><b>PAPER XIII β PAEDIATRICS & GERIATRICS | BPT / BOT' ' | Last-Minute Revision Checklist | Exam: 30 July 2026</b></font>', ParagraphStyle('h', fontSize=11, leading=15, alignment=TA_CENTER) )]] hdr = Table(hdr_data, colWidths=[19*cm]) hdr.setStyle(TableStyle([ ('BACKGROUND',(0,0),(-1,-1),DGRAY), ('TOPPADDING',(0,0),(-1,-1),7),('BOTTOMPADDING',(0,0),(-1,-1),7), ])) story.append(hdr); story.append(Spacer(1,0.2*cm)) # LEGEND leg_data = [[ Paragraph('<b>π΄ MUST KNOW</b> β Near-certain to appear', ParagraphStyle('l',fontSize=7.5,alignment=TA_CENTER)), Paragraph('<b>π HIGH PRIORITY</b> β Very probable', ParagraphStyle('l',fontSize=7.5,alignment=TA_CENTER)), Paragraph('<b>π‘ GOOD TO KNOW</b> β Easy marks if it comes', ParagraphStyle('l',fontSize=7.5,alignment=TA_CENTER)), Paragraph('<b>β Tick</b> each box when revised', ParagraphStyle('l',fontSize=7.5,alignment=TA_CENTER)), ]] leg = Table(leg_data, colWidths=[4.75*cm]*4) leg.setStyle(TableStyle([ ('BACKGROUND',(0,0),(0,0),PINK),('BACKGROUND',(1,0),(1,0),LORANGE), ('BACKGROUND',(2,0),(2,0),YELLOW),('BACKGROUND',(3,0),(3,0),LGRAY), ('ALIGN',(0,0),(-1,-1),'CENTER'),('VALIGN',(0,0),(-1,-1),'MIDDLE'), ('TOPPADDING',(0,0),(-1,-1),4),('BOTTOMPADDING',(0,0),(-1,-1),4), ('BOX',(0,0),(-1,-1),0.5,colors.grey),('INNERGRID',(0,0),(-1,-1),0.5,colors.grey), ])) story.append(leg); story.append(Spacer(1,0.2*cm)) def mkrow(pri, topic, hint): if pri=="R": bg,dot = PINK, "π΄" elif pri=="O": bg,dot = LORANGE, "π " else: bg,dot = YELLOW, "π‘" t = Paragraph(f'{dot} <b>{topic}</b>', ParagraphStyle('t',fontSize=7.8,leading=10)) h = Paragraph(f'<font color="#555555"><i>{hint}</i></font>', ParagraphStyle('h',fontSize=6.8,leading=9)) return ["β", t, h, bg] paeds = [ mkrow("R","Cerebral Palsy", "Definition β Spastic/Athetoid/Ataxic/Mixed β Aetio β Clinical β Mgmt (physio, OT, drugs)"), mkrow("R","Fallot's Tetralogy", "Nada's criteria | 4 defects: VSD+PS+RVH+Overriding Ao | Tet spell: knee-chest, O2, morphine | Surgery"), mkrow("R","PEM / Marasmus / Kwashiorkor","Grades: Mild/Mod/Severe | Marasmus=calorie | Kwash=protein | Compare table | F-75βF-100 diet"), mkrow("R","Down's Syndrome", "Trisomy 21 | Simian crease, epicanthic fold, flat occiput | IQ 40-70 | VSD, ASD | Mgmt: early intervention"), mkrow("R","National Immunization Sched.","BCG(birth) OPV(0,6,10,14w) DPT HepB IPV(6,10,14w) MR(9m,16m) JE(9-12m) VitA(9m+)"), mkrow("R","Lumbar Puncture", "L3-L4 space | Indications: meningitis, encephalitis | Contraind: raised ICP, coagulopathy | Steps | CSF normal values"), mkrow("R","Milestones of Development", "3m:head control | 6m:sit support | 9m:stand hold | 12m:walk,2 words | 18m:walk stairs | 2yr:phrases"), mkrow("R","Cephalhaematoma", "Subperiosteal bleed | Doesn't cross suture | No Rx needed | vs Caput: crosses suture, present at birth"), mkrow("R","Juvenile Idiopathic Arthritis","Pauci(<5j)/Poly(β₯5j)/Systemic | ANA+, RFΒ± | Uveitis risk | NSAIDs, Methotrexate, biologics"), mkrow("O","Hydrocephalus", "Obstructive vs Communicating | Bulging fontanelle, sunset sign, βHC | CT/MRI | VP shunt"), mkrow("O","Duchenne Muscular Dystrophy", "X-linked rec | Dystrophin absent | Gower's sign | Calf pseudohypertrophy | CKββ | Steroids, physio"), mkrow("O","Breast Feeding Advantages", "Colostrum (IgA) | LCPUFA for brain | Anti-infective | Bonding | Reduces infections/allergies | WHO: 6m exclusive"), mkrow("O","Meningomyelocele", "Lumbosacral NTD | Arnold-Chiari II | Folic acid prevention | Surgical closure within 24-48h | Bladder care"), mkrow("O","Club Foot (CTEV)", "Cavus+Adductus+Varus+Equinus | Ponseti: serial casting Γ 6-8wks β tenotomy β Denis Browne splint"), mkrow("O","Rickets", "Vit D deficiency | Craniotabes, rachitic rosary, Harrison's sulcus, genu varum | X-ray: cupping/fraying | VitD+Ca"), mkrow("Y","Pneumonia", "Strep pneumoniae | Tachypnoea, fever, crepitations | CXR consolidation | Amoxicillin 7-10 days"), mkrow("Y","Febrile Seizures", "6m-5yr, T>38Β°C | Simple(<15min,generalised) vs Complex | Diazepam PR/IV | Reassure parents"), mkrow("Y","Ventricular Septal Defect", "Holosystolic murmur LLSB | Small=closes spontaneously | Large=Eisenmenger | Patch repair"), mkrow("Y","Apgar Score", "0-1-2 each: Appearance Pulse Grimace Activity Respiration | β₯7 normal | <4 needs resuscitation"), ] geri = [ mkrow("R","Hypertension in Elderly", "ISH: SBPβ₯140+DBP<90 | Thiazide/CCB/ACEi first line | Target <150/90 (>60yr) | White coat HTN"), mkrow("R","Physiological Changes/Ageing","CVS:βCO,βSVR | Resp:βFVC,βFEV1 | Renal:βGFR | CNS:βneurons | MSK:βBMD,sarcopenia | Immune:βT-cell"), mkrow("R","Sleep Disorders in Elderly", "Insomnia(most common) OSA RLS | Sleep hygiene first | CBT-I | Melatonin | Avoid BZDs | CPAP for OSA"), mkrow("R","Depression in Elderly", "GDS-15 scale | Bio(neurotransmitters)+Psych(loss)+Social(isolation) | SSRIs | ECT | Suicide risk assessment"), mkrow("R","Dementia / Alzheimer's", "MMSE<24 | Alzheimer(60%)>Vascular>Lewy Body | Stages: mild/mod/severe | Donepezil | Memantine | Caregiver support"), mkrow("R","Stroke in Elderly", "Ischaemic 80% | FAST (Face-Arm-Speech-Time) | CT to exclude haemorrhage | tPA<4.5h | Aspirin 300mg | Rehab"), mkrow("O","Diabetes Mellitus in Elderly","Atypical: falls, confusion, incontinence | HbA1c target 7-7.5% | Metformin | Hypoglycaemia danger | Foot care"), mkrow("O","COPD in Elderly", "Smoking hx | FEV1/FVC<0.7 post-bronchodilator | GOLD I-IV | SABAβLABAβICS | O2 if SpO2<88% | Pulm rehab"), mkrow("O","Falls in Elderly", "Intrinsic: BP, vision, neuropathy, meds | Extrinsic: floor, lighting | Timed Up & Go test | Hip protectors | Vit D"), mkrow("O","Osteoarthritis", "Wear & tear | Knee>Hip>Hand | Heberden(DIP)/Bouchard(PIP) nodes | X-ray: JSN,osteophytes | NSAIDs, TKR"), mkrow("O","Malnutrition / Nutrition", "MNA screening tool | Protein 1-1.2g/kg/day | Vit D 800IU | Ca 1200mg | B12 supplementation | Oral nutritional supp"), mkrow("O","Peripheral Neuropathy", "DM>B12 def>alcohol>drugs | Glove-stocking sensory loss | NCS/EMG | Gabapentin/Pregabalin | B12 injections"), mkrow("Y","Constipation in Elderly", "Immobility+low fibre+drugs | Rome III criteria | Bulk laxatives (ispaghula) β osmotic (lactulose) β stimulant"), mkrow("Y","Osteoporosis", "T-score β€ -2.5 (DEXA) | Ca+VitD | Bisphosphonates (alendronate) | FRAX tool | Fall prevention"), mkrow("Y","MMSE", "30 points: Orientation(10)+Registration(3)+Attention(5)+Recall(3)+Language(8)+Copy(1) | <24=cognitive impairment"), mkrow("Y","Socio-economic Impact/Ageing","βDependency ratio | Retirement+poverty | Social isolation | Elder abuse | Lack of geriatric services in India"), mkrow("Y","Burden of Disease (India)", "60+=10.5% population (140M) | NCDs: HTN,DM,COPD,stroke dominant | Multimorbidity common | Policy gap"), ] def build_section(title, bg, rows, cws): hdr = Paragraph(f'<font color="white"><b> {title}</b></font>', ParagraphStyle('sh',fontSize=9,alignment=TA_LEFT)) trows = [[hdr,'','','']] sts = [ ('SPAN',(0,0),(-1,0)),('BACKGROUND',(0,0),(-1,0),bg), ('TOPPADDING',(0,0),(-1,0),5),('BOTTOMPADDING',(0,0),(-1,0),5), ('BOX',(0,0),(-1,-1),0.5,colors.HexColor("#AAAAAA")), ('INNERGRID',(0,1),(-1,-1),0.3,colors.HexColor("#CCCCCC")), ('VALIGN',(0,0),(-1,-1),'MIDDLE'), ] for i,r in enumerate(rows,1): trows.append([r[0],r[1],r[2],'']) sts += [ ('BACKGROUND',(0,i),(-1,i),r[3]), ('ALIGN',(0,i),(0,i),'CENTER'), ('TOPPADDING',(0,i),(-1,i),2), ('BOTTOMPADDING',(0,i),(-1,i),2), ] t = Table(trows, colWidths=cws) t.setStyle(TableStyle(sts)) return t cw_p = [0.55*cm, 4.6*cm, 4.25*cm, 0.01*cm] cw_g = [0.55*cm, 4.5*cm, 4.2*cm, 0.01*cm] pt = build_section("PAEDIATRICS β Part I", BLUE, paeds, cw_p) gt = build_section("GERIATRICS β Part II", GREEN, geri, cw_g) combo = Table([[pt, gt]], colWidths=[9.55*cm, 9.45*cm]) combo.setStyle(TableStyle([('VALIGN',(0,0),(-1,-1),'TOP'), ('LEFTPADDING',(0,0),(-1,-1),1), ('RIGHTPADDING',(0,0),(-1,-1),1)])) story.append(combo); story.append(Spacer(1,0.2*cm)) # EXAM TIPS BAR tips = "β Read ALL 8 questions first | β Pick your best 3 per part | β Structure every answer: Def β Classification β Clinical Features β Management | β 25-30 min per long Q | β Never leave a question blank" tip_data = [[Paragraph(f'<font color="white"><b>EXAM DAY: </b>{tips}</font>', ParagraphStyle('tp',fontSize=7.5,alignment=TA_CENTER))]] tip_tbl = Table(tip_data, colWidths=[19*cm]) tip_tbl.setStyle(TableStyle([ ('BACKGROUND',(0,0),(-1,-1),DGRAY), ('TOPPADDING',(0,0),(-1,-1),5),('BOTTOMPADDING',(0,0),(-1,-1),5), ])) story.append(tip_tbl) doc.build(story) import os sz = os.path.getsize(output) print(f"Done: {output} ({sz:,} bytes)") EOF
Last Minute Checklist
PDF Document Β· PDF