This is my medicine cbdc for 4th yr. Help to understand this and make this easy to understand.
cd /tmp/workspace && python3 -c " import pdfplumber pdf_path = '/tmp/workspace/attachments/dfa70c32-5bd9-4a89-8bd9-1bb2b7e63c61/Practice of Medicine-CBDC-4BHMS-7.05.2026 (1).pdf' with pdfplumber.open(pdf_path) as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages[:5]): print(f'--- PAGE {i+1} ---') text = page.extract_text() if text: print(text[:2000]) print() "
cd /tmp/workspace && python3 -c " import pdfplumber pdf_path = '/tmp/workspace/attachments/dfa70c32-5bd9-4a89-8bd9-1bb2b7e63c61/Practice of Medicine-CBDC-4BHMS-7.05.2026 (1).pdf' with pdfplumber.open(pdf_path) as pdf: # Read pages 6-17 to get term-wise content and teaching hours for i in range(5, 17): print(f'--- PAGE {i+1} ---') text = pdf.pages[i].extract_text() if text: print(text[:3000]) print() "
| Component | Hours |
|---|---|
| Theory / Lectures | 300 hrs |
| Clinical (OPD, IPD, Specialty Clinics) | 210 hrs |
| Seminars & Tutorials | 70 hrs |
| Simulation, Case-Based Learning, Projects | 20 hrs |
| Total | 600 hrs |
| # | System | Hours | Priority |
|---|---|---|---|
| 1 | CVS | 45 | π΄ Highest |
| 3 | CNS & PNS | 40 | π΄ Very High |
| 2 | Musculoskeletal | 35 | π High |
| 4 | Haematopoietic | 35 | π High |
| 5 | Psychiatry | 30 | π‘ Medium |
| 6 | Dermatology & STDs | 30 | π‘ Medium |
| 7 | Paediatrics | 30 | π‘ Medium |
| 8 | Nutrition & Metabolism | 20 | π‘ Medium |
| 9 | Geriatrics | 6 | π’ Low |
| 10 | Environmental Exposure | 4 | π’ Low |
| 11 | Palliative Care | 10 | π’ Low |
| 12 | Critical Care | 10 | π’ Low |
| 13 | Miscellaneous | 5 | π’ Low |
Can you make a pdf of this
ls /tmp/workspace/ 2>/dev/null || mkdir -p /tmp/workspace
mkdir -p /tmp/workspace/cbdc-summary && python3 << 'EOF' from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.units import mm, cm from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable, PageBreak from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY from reportlab.platypus import KeepTogether output_path = "/tmp/workspace/cbdc-summary/PM_CBDC_4BHMS_Summary.pdf" doc = SimpleDocTemplate( output_path, pagesize=A4, rightMargin=2*cm, leftMargin=2*cm, topMargin=2*cm, bottomMargin=2*cm ) W, H = A4 styles = getSampleStyleSheet() # Custom styles title_style = ParagraphStyle('Title', parent=styles['Normal'], fontSize=20, textColor=colors.HexColor('#1a3c6e'), alignment=TA_CENTER, spaceAfter=4, fontName='Helvetica-Bold') subtitle_style = ParagraphStyle('Subtitle', parent=styles['Normal'], fontSize=11, textColor=colors.HexColor('#444444'), alignment=TA_CENTER, spaceAfter=2) section_style = ParagraphStyle('Section', parent=styles['Normal'], fontSize=13, textColor=colors.white, fontName='Helvetica-Bold', alignment=TA_LEFT, spaceAfter=4, spaceBefore=8) subsection_style = ParagraphStyle('Subsection', parent=styles['Normal'], fontSize=11, textColor=colors.HexColor('#1a3c6e'), fontName='Helvetica-Bold', spaceAfter=4, spaceBefore=6) body_style = ParagraphStyle('Body', parent=styles['Normal'], fontSize=9.5, textColor=colors.HexColor('#222222'), spaceAfter=3, leading=14) bullet_style = ParagraphStyle('Bullet', parent=styles['Normal'], fontSize=9.5, textColor=colors.HexColor('#333333'), leftIndent=14, spaceAfter=2, leading=13, bulletIndent=4) note_style = ParagraphStyle('Note', parent=styles['Normal'], fontSize=9, textColor=colors.HexColor('#555555'), spaceAfter=3, leading=13, fontName='Helvetica-Oblique') tip_style = ParagraphStyle('Tip', parent=styles['Normal'], fontSize=9.5, textColor=colors.HexColor('#1a3c6e'), leftIndent=10, spaceAfter=3, leading=13) elements = [] # ββββββββββββββββ TITLE PAGE ββββββββββββββββ elements.append(Spacer(1, 1.5*cm)) # Header banner header_data = [[Paragraph('π Practice of Medicine', ParagraphStyle('H', parent=styles['Normal'], fontSize=22, textColor=colors.white, fontName='Helvetica-Bold', alignment=TA_CENTER))]] header_table = Table(header_data, colWidths=[W - 4*cm]) header_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), colors.HexColor('#1a3c6e')), ('ROUNDEDCORNERS', [8]), ('TOPPADDING', (0,0), (-1,-1), 14), ('BOTTOMPADDING', (0,0), (-1,-1), 14), ])) elements.append(header_table) elements.append(Spacer(1, 0.3*cm)) sub_data = [[Paragraph('CBDC Summary Guide | 4th Year BHMS | HomUG PM-III', ParagraphStyle('S', parent=styles['Normal'], fontSize=12, textColor=colors.HexColor('#1a3c6e'), alignment=TA_CENTER, fontName='Helvetica-Bold'))]] sub_table = Table(sub_data, colWidths=[W - 4*cm]) sub_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), colors.HexColor('#e8f0fb')), ('TOPPADDING', (0,0), (-1,-1), 8), ('BOTTOMPADDING', (0,0), (-1,-1), 8), ('BOX', (0,0), (-1,-1), 1, colors.HexColor('#1a3c6e')), ])) elements.append(sub_table) elements.append(Spacer(1, 0.5*cm)) elements.append(HRFlowable(width="100%", thickness=1.5, color=colors.HexColor('#1a3c6e'))) elements.append(Spacer(1, 0.3*cm)) # ββββββββββββββββ WHAT IS THIS CBDC ββββββββββββββββ def section_banner(text, color='#1a3c6e'): data = [[Paragraph(text, ParagraphStyle('SB', parent=styles['Normal'], fontSize=12, textColor=colors.white, fontName='Helvetica-Bold', alignment=TA_LEFT))]] t = Table(data, colWidths=[W - 4*cm]) t.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), colors.HexColor(color)), ('TOPPADDING', (0,0), (-1,-1), 7), ('BOTTOMPADDING', (0,0), (-1,-1), 7), ('LEFTPADDING', (0,0), (-1,-1), 10), ])) return t elements.append(section_banner('π― What is this CBDC?')) elements.append(Spacer(1, 0.2*cm)) elements.append(Paragraph( "This is your <b>Competency-Based Curriculum Document</b> for the final year of BHMS. " "It defines what topics to study, how many hours each system gets, how you will be taught, and what skills you are expected to master by graduation.", body_style)) elements.append(Spacer(1, 0.3*cm)) # ββββββββββββββββ OVERALL STRUCTURE ββββββββββββββββ elements.append(section_banner('π Overall Teaching Hours Structure')) elements.append(Spacer(1, 0.2*cm)) struct_data = [ ['Component', 'Hours'], ['Theory / Lectures', '300'], ['Clinical (OPD, IPD, Specialty Clinics)', '210'], ['Seminars & Tutorials', '70'], ['Simulation, Case-Based Learning, Projects', '20'], ['TOTAL', '600'], ] struct_table = Table(struct_data, colWidths=[11*cm, 4*cm]) struct_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1a3c6e')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9.5), ('ALIGN', (1,0), (1,-1), 'CENTER'), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#cccccc')), ('ROWBACKGROUNDS', (0,1), (-1,-2), [colors.HexColor('#f5f8ff'), colors.white]), ('BACKGROUND', (0,-1), (-1,-1), colors.HexColor('#c8daf7')), ('FONTNAME', (0,-1), (-1,-1), 'Helvetica-Bold'), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (0,-1), 8), ])) elements.append(struct_table) elements.append(Spacer(1, 0.4*cm)) # ββββββββββββββββ TERM WISE ββββββββββββββββ elements.append(section_banner('π Term-Wise Topic Distribution')) elements.append(Spacer(1, 0.2*cm)) term_data = [ [Paragraph('<b>TERM I</b>', ParagraphStyle('TH', parent=styles['Normal'], fontSize=10, textColor=colors.white, fontName='Helvetica-Bold', alignment=TA_CENTER)), Paragraph('<b>TERM II</b>', ParagraphStyle('TH', parent=styles['Normal'], fontSize=10, textColor=colors.white, fontName='Helvetica-Bold', alignment=TA_CENTER))], [ Paragraph('1. Cardiovascular System (CVS)<br/>2. Musculoskeletal & Connective Tissue<br/>3. CNS & Peripheral Nervous System<br/>4. Haematopoietic System (Blood)<br/>5. Psychiatric Disorders<br/>6. Dermatology & STDs', ParagraphStyle('TC', parent=styles['Normal'], fontSize=9.5, leading=14, leftIndent=5)), Paragraph('7. Paediatric Diseases<br/>8. Nutritional & Metabolic Disorders<br/>9. Geriatric Disorders<br/>10. Environmental Exposure Disorders<br/>11. Palliative & End-of-Life Care<br/>12. Critical Care Medicine<br/>13. Miscellaneous', ParagraphStyle('TC', parent=styles['Normal'], fontSize=9.5, leading=14, leftIndent=5)), ] ] term_table = Table(term_data, colWidths=[7.5*cm, 7.5*cm]) term_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (0,0), colors.HexColor('#2e6db4')), ('BACKGROUND', (1,0), (1,0), colors.HexColor('#27a085')), ('BACKGROUND', (0,1), (0,1), colors.HexColor('#edf3fd')), ('BACKGROUND', (1,1), (1,1), colors.HexColor('#edfaf6')), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#aaaaaa')), ('TOPPADDING', (0,0), (-1,-1), 7), ('BOTTOMPADDING', (0,0), (-1,-1), 7), ('LEFTPADDING', (0,0), (-1,-1), 8), ('VALIGN', (0,0), (-1,-1), 'TOP'), ])) elements.append(term_table) elements.append(Spacer(1, 0.4*cm)) # ββββββββββββββββ THEORY HOURS TABLE ββββββββββββββββ elements.append(section_banner('β±οΈ Theory Hours Per System (Priority Guide)')) elements.append(Spacer(1, 0.2*cm)) hrs_data = [ ['#', 'System', 'Hours', 'Priority'], ['1', 'Disorders of CVS', '45', 'π΄ Highest'], ['3', 'CNS & Peripheral Nervous System', '40', 'π΄ Very High'], ['2', 'Musculoskeletal & Connective Tissue', '35', 'π High'], ['4', 'Haematopoietic System', '35', 'π High'], ['5', 'Psychiatric Disorders', '30', 'π‘ Medium'], ['6', 'Dermatological & STDs', '30', 'π‘ Medium'], ['7', 'Paediatric Diseases', '30', 'π‘ Medium'], ['8', 'Nutritional & Metabolic Disorders', '20', 'π‘ Medium'], ['9', 'Geriatric Disorders', '6', 'π’ Low'], ['10', 'Environmental Exposure', '4', 'π’ Low'], ['11', 'Palliative & End-of-Life Care', '10', 'π’ Low'], ['12', 'Critical Care Medicine', '10', 'π’ Low'], ['13', 'Miscellaneous', '5', 'π’ Low'], ['', 'TOTAL', '300', ''], ] hrs_table = Table(hrs_data, colWidths=[1*cm, 9*cm, 2*cm, 3*cm]) hrs_style = [ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1a3c6e')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9), ('ALIGN', (2,0), (2,-1), 'CENTER'), ('GRID', (0,0), (-1,-1), 0.4, colors.HexColor('#cccccc')), ('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4), ('LEFTPADDING', (0,0), (-1,-1), 6), ('BACKGROUND', (0,-1), (-1,-1), colors.HexColor('#c8daf7')), ('FONTNAME', (0,-1), (-1,-1), 'Helvetica-Bold'), ] for i, row in enumerate(hrs_data[1:-1], 1): if row[3].startswith('π΄'): hrs_style.append(('BACKGROUND', (0,i), (-1,i), colors.HexColor('#ffeaea'))) elif row[3].startswith('π '): hrs_style.append(('BACKGROUND', (0,i), (-1,i), colors.HexColor('#fff3e0'))) elif row[3].startswith('π‘'): hrs_style.append(('BACKGROUND', (0,i), (-1,i), colors.HexColor('#fffff0'))) elif row[3].startswith('π’'): hrs_style.append(('BACKGROUND', (0,i), (-1,i), colors.HexColor('#f0fff0'))) hrs_table.setStyle(TableStyle(hrs_style)) elements.append(hrs_table) elements.append(PageBreak()) # ββββββββββββββββ TOPIC BREAKDOWNS ββββββββββββββββ elements.append(section_banner('π Topic-by-Topic Breakdown')) elements.append(Spacer(1, 0.3*cm)) systems = [ { 'title': 'π« (a) CVS β 45 hrs | 14 topics', 'color': '#ffeaea', 'topics': [ 'Heart failure', 'Ischemic heart disease', 'Rheumatic fever (Acute & Chronic)', 'Valvular heart diseases: Mitral, Tricuspid, Aortic, Pulmonary (Stenosis & Regurgitation)', 'Infective Endocarditis', 'Hypertension', 'Cardiomyopathies', 'Arrhythmias, Supraventricular Tachycardia', 'Cor pulmonale & Pulmonary hypertension', 'Congenital heart diseases (ASD, VSD, COA, PDA, TOF)', 'Disorders of Myocardium', 'Diseases of Pericardium', 'Disease of Aorta', 'Vascular Disorders of Extremities' ], 'remedies': 'Crataegus oxyacantha, Cactus grandiflorus, Digitalis' }, { 'title': '𦴠(b) Musculoskeletal β 35 hrs | 13 topics', 'color': '#fff3e0', 'topics': [ 'Ankylosing Spondylitis, SLE, Systemic Sclerosis, Sjogren\'s Syndrome', 'Reiter\'s syndrome / Reactive arthritis', 'Psoriatic arthritis (PsA)', 'Vasculitis', 'Arthropathies: RA, OA, Neurogenic arthropathy', 'Gout and Pseudo Gout', 'Osteoporosis & Osteomalacia', 'Cervical and Lumbar Spondylosis', 'Approach to Low Backache', 'Fibromyalgia', 'Inflammatory Muscle Diseases', 'Infectious arthritis', 'Soft tissue rheumatism & Regional Rheumatic Pain Syndromes' ], 'remedies': 'Rhus toxicodendron, Calcarea carbonica, Bryonia alba' }, { 'title': 'π§ (c) CNS & PNS β 40 hrs | 14 topics', 'color': '#ffeaea', 'topics': [ 'Stroke: Ischemic & Intracranial haemorrhage', 'Dementia / Alzheimer\'s Disease', 'Seizure Disorders & Epilepsy', 'Brain Infections: Meningitis, Encephalitis', 'Movement Disorders: Parkinson\'s, Cerebellar Disorders', 'Hyperkinetic disorders: Tremor, Chorea', 'Ataxic disorders', 'Neuralgia: Trigeminal neuralgia, Bell\'s Palsy', 'Demyelinating Disorders', 'Disorders of Peripheral Nervous System', 'Polymyositis, Muscular Dystrophies', 'Motor Neuron Disease, Myasthenia Gravis, Spinal Muscular Atrophies', 'Spinal Cord Disorders', 'Intracranial and Spinal Cord Tumors' ], 'remedies': 'Cicuta virosa (seizures), Gelsemium sempervirens (neurological weakness)' }, { 'title': 'π©Έ (d) Haematopoietic System β 35 hrs | 13 topics', 'color': '#fff3e0', 'topics': [ 'Anaemia: Introduction and classification', 'Iron deficiency anaemia', 'Megaloblastic anaemia & Pernicious Anaemia', 'Aplastic anaemia (Bone marrow failure)', 'G6PD Deficiency, Sickle cell syndrome', 'Acquired Haemolytic anaemia (blood transfusion reactions)', 'Leukaemia: Acute & Chronic (Myeloid & Lymphoid)', 'Lymphomas: Hodgkin\'s & Non-Hodgkin\'s', 'Clotting factor disorders: Haemophilia, DIC', 'Platelet Disorders: ITP, Thrombocytosis, Thrombasthenia', 'Von Willebrand disease', 'Multiple Myeloma', 'Splenomegaly & Polycythaemia vera' ], 'remedies': 'Ferrum metallicum, China officinalis, Phosphorus' }, { 'title': 'π§© (e) Psychiatric Disorders β 30 hrs | 7 topics', 'color': '#fffff0', 'topics': [ 'Mood disorders: Major/Minor Depression, Dysthymia, Bipolar Disorder', 'Anxiety Disorders: GAD, OCD, Panic disorder, Phobias', 'Psychotic disorders: Schizophrenia, Acute psychosis', 'Organic Brain Syndromes: Delirium and Dementia', 'Personality disorders', 'Substance Abuse', 'Hysteria / Conversion disorder / Somatoform disorders' ], 'remedies': 'Aurum metallicum (depression), Hyoscyamus niger (psychotic states), Ignatia' }, { 'title': 'π©Ί (f) Dermatology & STDs β 30 hrs | 14 topics', 'color': '#fffff0', 'topics': [ 'Bacterial infections', 'Fungal infections', 'Viral infections', 'Scabies (Parasitic infestation)', 'Eczema & Dermatitis', 'Acne (Sebaceous gland disorders)', 'Urticaria and Angioedema', 'Psoriasis (Papulosquamous)', 'Lichen Planus', 'Pigment disorders', 'Hair & Nail disorders', 'Syphilis / HIV / Gonorrhoea', 'Vesiculo-bullous disorders', 'Vitiligo' ], 'remedies': 'Sulphur (skin), Thuja occidentalis (warts), Graphites (eczema)' }, ] for sys in systems: block = [] title_data = [[Paragraph(sys['title'], ParagraphStyle('ST', parent=styles['Normal'], fontSize=11, fontName='Helvetica-Bold', textColor=colors.HexColor('#1a3c6e')))]] title_t = Table(title_data, colWidths=[W - 4*cm]) title_t.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), colors.HexColor(sys['color'])), ('TOPPADDING', (0,0), (-1,-1), 6), ('BOTTOMPADDING', (0,0), (-1,-1), 6), ('LEFTPADDING', (0,0), (-1,-1), 10), ('BOX', (0,0), (-1,-1), 0.5, colors.HexColor('#aaaaaa')), ])) block.append(title_t) topics_text = ' | '.join(sys['topics']) block.append(Paragraph( '<b>Topics:</b> ' + topics_text, ParagraphStyle('T', parent=styles['Normal'], fontSize=8.5, leading=13, leftIndent=10, spaceAfter=2, textColor=colors.HexColor('#333333')) )) block.append(Paragraph( '<b>Key Homeopathic Remedies:</b> <i>' + sys['remedies'] + '</i>', ParagraphStyle('R', parent=styles['Normal'], fontSize=8.5, leading=13, leftIndent=10, spaceAfter=6, textColor=colors.HexColor('#1a5e40')) )) elements.append(KeepTogether(block)) # Second set of systems systems2 = [ { 'title': 'πΆ (g) Paediatric Diseases β 30 hrs | 17 topics', 'color': '#f0fff0', 'topics': [ 'Growth & development, Failure to thrive', 'ADHD & anxiety in children', 'Neonatal conditions (jaundice, birth defects, seizures)', 'Immunization in children', 'GI disorders: Diarrhoea, Pica, Constipation', 'Approach to fever', 'URTI, LRTI, Pertussis, Hypersensitive airway', 'Otitis media', 'Acute rheumatic fever', 'Acute glomerulonephritis, Nephrotic syndrome', 'Indian childhood Cirrhosis', 'Cerebral Palsy, Hydrocephalus, Autism, ADHD, Intellectual disability', 'Febrile Convulsions', 'Atopic Dermatitis, Pyoderma', 'Abdominal pain, Evening colic', 'Helminthic infections', 'Adolescent care' ], 'remedies': 'Chamomilla (teething), Calcarea phosphorica (nutritional), Belladonna (fever)' }, { 'title': 'π (h) Nutritional & Metabolic Disorders β 20 hrs | 9 topics', 'color': '#f0fff0', 'topics': [ 'Stunting, Underweight', 'Protein Energy Malnutrition (PEM)', 'Fat-soluble vitamin deficiencies (A, D, E, K)', 'Water-soluble vitamin deficiencies (B complex, C)', 'Overnutrition & Obesity', 'Iodine deficiency', 'Micronutrient deficiencies', 'Wilson\'s disease, Haemochromatosis, Porphyria', 'Amyloidosis' ], 'remedies': 'Phytolacca berry (weight), Natrum muriaticum (thyroid), Calcarea carbonica' }, { 'title': 'π΄ (i) Geriatric Disorders β 6 hrs | 4 topics', 'color': '#f5f5f5', 'topics': [ 'Geriatric care & disabilities', 'Common Geriatric problems (multimorbidity)', 'Gait disorders', 'Elder abuse' ], 'remedies': 'Baryta carbonica (memory loss), Rhus toxicodendron (arthritis)' }, { 'title': 'π (j) Environmental Exposure β 4 hrs | 4 topics', 'color': '#f5f5f5', 'topics': [ 'Diseases of altitude', 'Diseases of cold exposure', 'Diseases of heat exposure', 'Environmental poisoning' ], 'remedies': 'Carbo vegetabilis (respiratory distress), Camphora' }, { 'title': 'π (k) Palliative & End-of-Life Care β 10 hrs | 10 topics', 'color': '#f5f5f5', 'topics': [ 'Principles of palliative care', 'Indications for palliative care', 'Symptom management', 'End-of-life care', 'Psychosocial and spiritual support', 'Homeopathic care in palliative settings', 'Communication with patients and families', 'Multidisciplinary care', 'Ethical and legal issues', 'Impact on quality of life' ], 'remedies': 'Arsenicum album (restlessness), Ignatia (grief), Opium' }, { 'title': 'π¨ (l) Critical Care Medicine β 10 hrs | 10 topics', 'color': '#f5f5f5', 'topics': [ 'Recognition & management of critical emergencies', 'Multidisciplinary critical care team collaboration', 'Life-saving procedures', 'Interpretation of data & decision-making', 'Management protocols for life-threatening conditions', 'Homeopathic remedies for acute emergencies', 'Protocols for stabilizing critically ill patients', 'Infection control in critical care units', 'Ethical issues in critical care', 'Innovations in critical care' ], 'remedies': 'Camphora (acute emergencies), Arsenicum album, Carbo vegetabilis' }, { 'title': 'π¬ (m) Miscellaneous β 5 hrs | 3 topics', 'color': '#f5f5f5', 'topics': [ 'Stem cell biology and current status of therapy', 'Telemedicine and Tele-homoeopathy', 'Integrative healthcare: current status and possibilities' ], 'remedies': 'Evidence-based integration of Homeopathy with modern medicine' }, ] for sys in systems2: block = [] title_data = [[Paragraph(sys['title'], ParagraphStyle('ST', parent=styles['Normal'], fontSize=11, fontName='Helvetica-Bold', textColor=colors.HexColor('#1a3c6e')))]] title_t = Table(title_data, colWidths=[W - 4*cm]) title_t.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), colors.HexColor(sys['color'])), ('TOPPADDING', (0,0), (-1,-1), 6), ('BOTTOMPADDING', (0,0), (-1,-1), 6), ('LEFTPADDING', (0,0), (-1,-1), 10), ('BOX', (0,0), (-1,-1), 0.5, colors.HexColor('#aaaaaa')), ])) block.append(title_t) topics_text = ' | '.join(sys['topics']) block.append(Paragraph( '<b>Topics:</b> ' + topics_text, ParagraphStyle('T', parent=styles['Normal'], fontSize=8.5, leading=13, leftIndent=10, spaceAfter=2, textColor=colors.HexColor('#333333')) )) block.append(Paragraph( '<b>Key Homeopathic Remedies:</b> <i>' + sys['remedies'] + '</i>', ParagraphStyle('R', parent=styles['Normal'], fontSize=8.5, leading=13, leftIndent=10, spaceAfter=6, textColor=colors.HexColor('#1a5e40')) )) elements.append(KeepTogether(block)) elements.append(PageBreak()) # ββββββββββββββββ ASSESSMENT ββββββββββββββββ elements.append(section_banner('π Assessment Methods')) elements.append(Spacer(1, 0.2*cm)) assess_data = [ ['Method', 'Description'], ['Theory Exams', 'University-style written papers covering all 13 systems'], ['OSCE', 'Objective Structured Clinical Examination β 10 dedicated hours\nStructured stations to evaluate practical & communication skills'], ['Mini-CEX / DOPS', 'Direct observation & feedback on clinical performance β 10 hrs\nReal or simulated clinical settings'], ['Clinical Hours', '210 hours in OPD, IPD & specialty clinics (Cardiology, Paediatrics,\nDermatology, Psychiatry, Oncology, Nephrology, etc.)'], ['Seminars/Tutorials', '70 hours of discussion-based learning'], ['Case-Based Discussion', 'PBL + Case-Based Learning β 10 hours total'], ['Projects & Assignments', 'Chart/Model making + research assignments β 10 hours'], ] assess_table = Table(assess_data, colWidths=[5*cm, 10*cm]) assess_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1a3c6e')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9), ('GRID', (0,0), (-1,-1), 0.4, colors.HexColor('#cccccc')), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f5f8ff'), colors.white]), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 7), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('FONTNAME', (0,1), (0,-1), 'Helvetica-Bold'), ])) elements.append(assess_table) elements.append(Spacer(1, 0.4*cm)) # ββββββββββββββββ STUDY TIPS ββββββββββββββββ elements.append(section_banner('π‘ Key Takeaways & Study Tips', color='#1a5e40')) elements.append(Spacer(1, 0.2*cm)) tips = [ ('π΄ CVS + CNS = 85 hrs', 'These two systems alone account for the most theory hours. Make them your top priority.'), ('π Musculoskeletal + Blood = 70 hrs', 'Second priority tier. Cover all anemias thoroughly β high exam frequency.'), ('π‘ Psychiatry + Derm + Paeds = 90 hrs', 'Medium priority. 30 hrs each β study broadly and know differentials.'), ('π’ Geriatrics, Environmental, Palliative, Critical Care = 30 hrs combined', 'Study key principles; do not over-invest time here.'), ('π₯ Homeopathic Integration is MANDATORY', 'Every system requires knowledge of key remedies. Don\'t skip this - it differentiates BHMS exams.'), ('π©Ί Bedside Clinics are Co-equal', '210 clinical hours means hands-on skills are as important as theory. Attend all OPD/IPD postings.'), ('π OSCE Prep', 'Practice case presentations, history-taking, and clinical exam skills. Mini-CEX is a direct observation assessment.'), ] tips_data = [[Paragraph(f'<b>{t[0]}</b>', ParagraphStyle('TK', parent=styles['Normal'], fontSize=9, fontName='Helvetica-Bold', textColor=colors.HexColor('#1a3c6e'))), Paragraph(t[1], ParagraphStyle('TV', parent=styles['Normal'], fontSize=9, leading=13))] for t in tips] tips_data.insert(0, [Paragraph('<b>Point</b>', ParagraphStyle('TH', parent=styles['Normal'], fontSize=9.5, fontName='Helvetica-Bold', textColor=colors.white)), Paragraph('<b>Details</b>', ParagraphStyle('TH', parent=styles['Normal'], fontSize=9.5, fontName='Helvetica-Bold', textColor=colors.white))]) tips_table = Table(tips_data, colWidths=[5.5*cm, 9.5*cm]) tips_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1a5e40')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTSIZE', (0,0), (-1,-1), 9), ('GRID', (0,0), (-1,-1), 0.4, colors.HexColor('#cccccc')), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f0fff4'), colors.white]), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 7), ('VALIGN', (0,0), (-1,-1), 'TOP'), ])) elements.append(tips_table) elements.append(Spacer(1, 0.5*cm)) # Footer elements.append(HRFlowable(width="100%", thickness=1, color=colors.HexColor('#1a3c6e'))) elements.append(Spacer(1, 0.2*cm)) elements.append(Paragraph( 'Practice of Medicine | CBDC Summary Guide | 4th Year BHMS | HomUG PM-III | Generated by Orris', ParagraphStyle('Footer', parent=styles['Normal'], fontSize=8, textColor=colors.HexColor('#888888'), alignment=TA_CENTER) )) doc.build(elements) print("PDF created successfully at:", output_path) EOF
PM CBDC 4BHMS Summary
PDF Document Β· PDF
Can also a make pdf of blueprint of our question paper, look it has been shown very hard.. by denoting alphabet which is a task.. can you decide all that and make. A pdf of that too
python3 -c " import pdfplumber pdf_path = '/tmp/workspace/attachments/dfa70c32-5bd9-4a89-8bd9-1bb2b7e63c61/Practice of Medicine-CBDC-4BHMS-7.05.2026 (1).pdf' with pdfplumber.open(pdf_path) as pdf: for i in range(293, 303): print(f'--- PAGE {i+1} ---') text = pdf.pages[i].extract_text() if text: print(text) print() "
python3 << 'EOF' from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.units import mm, cm from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable, PageBreak, KeepTogether from reportlab.lib.enums import TA_CENTER, TA_LEFT output_path = "/tmp/workspace/cbdc-summary/PM_QuestionPaper_Blueprint.pdf" doc = SimpleDocTemplate( output_path, pagesize=A4, rightMargin=1.8*cm, leftMargin=1.8*cm, topMargin=2*cm, bottomMargin=2*cm ) W, H = A4 styles = getSampleStyleSheet() def banner(text, bg='#1a3c6e', fg='white', size=12): data = [[Paragraph(text, ParagraphStyle('B', parent=styles['Normal'], fontSize=size, textColor=colors.HexColor(fg), fontName='Helvetica-Bold', alignment=TA_LEFT))]] t = Table(data, colWidths=[W - 3.6*cm]) t.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), colors.HexColor(bg)), ('TOPPADDING', (0,0), (-1,-1), 8), ('BOTTOMPADDING', (0,0), (-1,-1), 8), ('LEFTPADDING', (0,0), (-1,-1), 12), ])) return t def center_banner(text, bg='#1a3c6e', fg='white', size=18): data = [[Paragraph(text, ParagraphStyle('CB', parent=styles['Normal'], fontSize=size, textColor=colors.HexColor(fg), fontName='Helvetica-Bold', alignment=TA_CENTER))]] t = Table(data, colWidths=[W - 3.6*cm]) t.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), colors.HexColor(bg)), ('TOPPADDING', (0,0), (-1,-1), 12), ('BOTTOMPADDING', (0,0), (-1,-1), 12), ('LEFTPADDING', (0,0), (-1,-1), 10), ])) return t body = ParagraphStyle('body', parent=styles['Normal'], fontSize=9.5, leading=14, textColor=colors.HexColor('#222')) small = ParagraphStyle('small', parent=styles['Normal'], fontSize=8.5, leading=13, textColor=colors.HexColor('#444')) elements = [] # ββ TITLE ββ elements.append(Spacer(1, 0.3*cm)) elements.append(center_banner('Question Paper Blueprint', bg='#1a3c6e', size=20)) elements.append(Spacer(1, 0.15*cm)) elements.append(center_banner('Practice of Medicine | HomUG PM-III | 4th Year BHMS', bg='#2e6db4', size=11)) elements.append(Spacer(1, 0.5*cm)) # ββ SECTION 1: OVERALL EXAM SCHEME ββ elements.append(banner('π Overall Examination Scheme')) elements.append(Spacer(1, 0.2*cm)) scheme_data = [ ['Assessment', 'When', 'Marks', 'Components'], ['PA I\n(Periodical Assessment)', 'End of 3 months\n(Term I)', '20 Marks', 'Viva Voce'], ['TT I\n(Term Test)', 'End of 6 months\n(Term I end)', '100 Marks', 'Practical + Viva\nβ’ Case taking, processing,\n prescription: 20 marks\nβ’ Clinical exam + OSCE/\n Mini-CEX: 20 marks\nβ’ Spotting: 10 marks\nβ’ Viva voce: 50 marks'], ['PA II\n(Periodical Assessment)', 'End of 9 months\n(Term II)', '20 Marks', 'Viva Voce'], ['FUE\n(Final University Exam)', 'End of 12 months\n(Term II end)', '300 marks Theory\n+200 marks Practical\n+Viva+IA\n= 500 marks total', '3 Theory Papers (100 each)\nPractical/Clinical: 100 marks\nViva Voce: 80 marks\nInternal Assessment: 20 marks'], ] scheme_table = Table(scheme_data, colWidths=[3.2*cm, 3*cm, 3.5*cm, 6.3*cm]) scheme_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1a3c6e')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 8.5), ('GRID', (0,0), (-1,-1), 0.4, colors.HexColor('#bbbbbb')), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f5f8ff'), colors.white]), ('BACKGROUND', (0,-1), (-1,-1), colors.HexColor('#fff3cd')), ('FONTNAME', (0,-1), (0,-1), 'Helvetica-Bold'), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 6), ])) elements.append(scheme_table) elements.append(Spacer(1, 0.4*cm)) # ββ SECTION 2: FUE PAPER LAYOUT ββ elements.append(banner('π FUE Theory Paper Layout β Each Paper: 100 Marks', bg='#1a5e40')) elements.append(Spacer(1, 0.2*cm)) layout_data = [ ['Question Type', 'No. of Qs', 'Marks Each', 'Total', 'Rules'], ['LAQ\n(Long Answer)', '5', '10', '50', 'β ALL compulsory\nβ Must Know topics ONLY\nβ No Desirable/Nice to Know'], ['SAQ\n(Short Answer)', '8', '5', '40', 'β ALL compulsory\nβ Must Know: 4 questions\nβ Desirable to Know: 2 questions'], ['MCQ\n(Multiple Choice)', '10', '1', '10', 'β ALL compulsory\nβ Must Know: 7\nβ Desirable to Know: 2\nβ Nice to Know: 1'], ['TOTAL', '23 questions', 'β', '100 marks', '3 Papers = 300 marks total'], ] layout_table = Table(layout_data, colWidths=[2.5*cm, 2*cm, 2.5*cm, 1.8*cm, 7.2*cm]) layout_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1a5e40')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 8.5), ('GRID', (0,0), (-1,-1), 0.4, colors.HexColor('#bbbbbb')), ('ROWBACKGROUNDS', (0,1), (-1,-2), [colors.HexColor('#f0fff4'), colors.white]), ('BACKGROUND', (0,-1), (-1,-1), colors.HexColor('#c8daf7')), ('FONTNAME', (0,-1), (-1,-1), 'Helvetica-Bold'), ('BACKGROUND', (0,1), (-1,1), colors.HexColor('#ffeaea')), ('BACKGROUND', (0,2), (-1,2), colors.HexColor('#fff3e0')), ('BACKGROUND', (0,3), (-1,3), colors.HexColor('#fffff0')), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 6), ('ALIGN', (1,0), (3,-1), 'CENTER'), ])) elements.append(layout_table) elements.append(Spacer(1, 0.4*cm)) # ββ SECTION 3: PRACTICAL MARKS BREAKDOWN ββ elements.append(banner('π©Ί Practical / Clinical Assessment β 100 Marks (FUE)', bg='#7b2d8b')) elements.append(Spacer(1, 0.2*cm)) prac_data = [ ['Component', 'Marks', 'What is Assessed'], ['Case Taking', '25', 'Thorough history, symptoms and signs in detail'], ['Examination Skills', '20', 'Proper demonstration of clinical examination skills'], ['Bedside Q&A Session', '20', 'Understanding of diagnosis, differential diagnosis, clinical concepts'], ['Spotters (5 spotters Γ 3 marks)', '15', 'Instruments: ID, Indications, Contraindications\nX-Ray: ID, Observations, DDs\nECG / Haematology / Biochemistry: Observations, Causes, Dx/DDx'], ['Assignments + Records', '20\n(10+10)', 'Content accuracy, organisation, and overall quality of work'], ['TOTAL', '100', ''], ] prac_table = Table(prac_data, colWidths=[5*cm, 2*cm, 9*cm]) prac_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#7b2d8b')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 8.5), ('GRID', (0,0), (-1,-1), 0.4, colors.HexColor('#bbbbbb')), ('ROWBACKGROUNDS', (0,1), (-1,-2), [colors.HexColor('#fdf5ff'), colors.white]), ('BACKGROUND', (0,-1), (-1,-1), colors.HexColor('#c8daf7')), ('FONTNAME', (0,-1), (-1,-1), 'Helvetica-Bold'), ('ALIGN', (1,0), (1,-1), 'CENTER'), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 6), ])) elements.append(prac_table) elements.append(PageBreak()) # ββ SECTION 4: THEME TABLE β Alphabet decoded ββ elements.append(banner('π€ Theme Table β All Alphabets Decoded (A to V)', bg='#b5340a')) elements.append(Spacer(1, 0.15*cm)) elements.append(Paragraph( '<b>Each alphabet = a Theme/Topic group with a fixed marks allocation across the 3 papers.</b>', ParagraphStyle('note', parent=styles['Normal'], fontSize=9, textColor=colors.HexColor('#555'), spaceAfter=6, leftIndent=4) )) theme_data = [ ['Code', 'Marks', 'Topic / Subject', 'Paper', 'Question Mix'], ['A', '8', 'Clinico-pathological evaluation of common signs & symptoms\nwith miasmatic integration', 'I', 'SAQ: 1, MCQ: 3'], ['B', '6', 'Introduction to Medical Genetics', 'I', 'SAQ: 1, MCQ: 1'], ['C', '6', 'Immunity & Susceptibility β General considerations', 'I', 'SAQ: 1, MCQ: 1'], ['D', '16', 'Infectious Diseases and Tropical Diseases', 'I', 'LAQ: 1, SAQ: 1, MCQ: 1'], ['E', '16', 'Pulmonary Disorders', 'I', 'LAQ: 1, SAQ: 1, MCQ: 1'], ['F', '16', 'Endocrine Diseases and Metabolic Disorders', 'I', 'LAQ: 1, SAQ: 1, MCQ: 1'], ['G', '16', 'Disorders of Water & Electrolyte Balance', 'I', 'LAQ: 1, SAQ: 1, MCQ: 1'], ['H', '16', 'Diseases of Digestive System and Peritoneum', 'I', 'LAQ: 1, SAQ: 1, MCQ: 1'], ['I', '12', 'Diseases of Liver, Gallbladder and Pancreas', 'II', 'SAQ: 2, MCQ: 2'], ['J', '16', 'Diseases of Kidney', 'II', 'LAQ: 1, SAQ: 1, MCQ: 1'], ['K', '16', 'Disorders of Cardiovascular System (CVS)', 'II', 'LAQ: 1, SAQ: 1, MCQ: 1'], ['L', '16', 'Musculoskeletal and Connective Tissue Disorders', 'II', 'LAQ: 1, SAQ: 1, MCQ: 1'], ['M', '16', 'Disorders of CNS and Peripheral Nervous System', 'II', 'LAQ: 1, SAQ: 1, MCQ: 1'], ['N', '17', 'Disorders of Haematopoietic System', 'II', 'LAQ: 1, SAQ: 1, MCQ: 2'], ['O', '7', 'Nutritional and Metabolic Disorders', 'II', 'SAQ: 1, MCQ: 2'], ['P', '21', 'Psychiatric Disorders', 'III', 'LAQ: 1, SAQ: 2, MCQ: 1'], ['Q', '27', 'Dermatological and Sexually Transmitted Disorders', 'III', 'LAQ: 2, SAQ: 1, MCQ: 2'], ['R', '27', 'Paediatric Diseases', 'III', 'LAQ: 2, SAQ: 1, MCQ: 2'], ['S', '7', 'Geriatric Disorders', 'III', 'SAQ: 1, MCQ: 2'], ['T', '6', 'Disorders Associated with Environmental Exposure', 'III', 'SAQ: 1, MCQ: 1'], ['U', '6', 'Palliative and End-of-Life Care', 'III', 'SAQ: 1, MCQ: 1'], ['V', '6', 'Miscellaneous (Stem Cell Biology, Tele-medicine,\nIntegrative Healthcare)', 'III', 'SAQ: 1, MCQ: 1'], ] # Color coding per paper paper_colors = {'I': '#edf3fd', 'II': '#fff9ed', 'III': '#f0fff4'} high_marks = {'16': '#ffeaea', '17': '#ffeaea', '21': '#ffeaea', '27': '#ffe0e0', '27': '#ffd6d6'} theme_table = Table(theme_data, colWidths=[1.2*cm, 1.5*cm, 8*cm, 1.5*cm, 3.8*cm]) ts = [ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#b5340a')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 8.5), ('GRID', (0,0), (-1,-1), 0.4, colors.HexColor('#bbbbbb')), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('ALIGN', (0,0), (1,-1), 'CENTER'), ('ALIGN', (3,0), (3,-1), 'CENTER'), ('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4), ('LEFTPADDING', (0,0), (-1,-1), 5), ('FONTNAME', (0,1), (0,-1), 'Helvetica-Bold'), ] # Color rows by paper paper_row_colors = { 'I': colors.HexColor('#edf3fd'), 'II': colors.HexColor('#fff9ed'), 'III': colors.HexColor('#f0fff4'), } for i, row in enumerate(theme_data[1:], 1): paper = row[3] ts.append(('BACKGROUND', (0,i), (-1,i), paper_row_colors.get(paper, colors.white))) # highlight high-marks themes if int(row[1]) >= 21: ts.append(('BACKGROUND', (1,i), (1,i), colors.HexColor('#ff4444'))) ts.append(('TEXTCOLOR', (1,i), (1,i), colors.white)) ts.append(('FONTNAME', (1,i), (1,i), 'Helvetica-Bold')) elif int(row[1]) >= 16: ts.append(('BACKGROUND', (1,i), (1,i), colors.HexColor('#ff9900'))) ts.append(('TEXTCOLOR', (1,i), (1,i), colors.white)) ts.append(('FONTNAME', (1,i), (1,i), 'Helvetica-Bold')) elif int(row[1]) <= 7: ts.append(('BACKGROUND', (1,i), (1,i), colors.HexColor('#aaaaaa'))) ts.append(('TEXTCOLOR', (1,i), (1,i), colors.white)) theme_table.setStyle(TableStyle(ts)) elements.append(theme_table) elements.append(Spacer(1, 0.25*cm)) # Legend legend_data = [[ Paragraph('<b>Marks Legend:</b>', small), Paragraph('π΄ 27-21 marks (Very High weight)', small), Paragraph('π 16-17 marks (High weight)', small), Paragraph('βͺ 6-8 marks (Low weight)', small), ]] leg_t = Table(legend_data, colWidths=[3*cm, 4.5*cm, 4.5*cm, 4*cm]) leg_t.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), colors.HexColor('#f8f8f8')), ('BOX', (0,0), (-1,-1), 0.5, colors.HexColor('#aaaaaa')), ('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4), ('LEFTPADDING', (0,0), (-1,-1), 6), ])) elements.append(leg_t) elements.append(Spacer(1, 0.1*cm)) paper_legend_data = [[ Paragraph('<b>Paper Color:</b>', small), Paragraph('π΅ Blue = Paper I', small), Paragraph('π‘ Yellow = Paper II', small), Paragraph('π’ Green = Paper III', small), ]] pleg_t = Table(paper_legend_data, colWidths=[3*cm, 3.5*cm, 3.5*cm, 6*cm]) pleg_t.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), colors.HexColor('#f8f8f8')), ('BOX', (0,0), (-1,-1), 0.5, colors.HexColor('#aaaaaa')), ('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4), ('LEFTPADDING', (0,0), (-1,-1), 6), ])) elements.append(pleg_t) elements.append(PageBreak()) # ββ SECTION 5: PAPER-WISE BLUEPRINTS ββ elements.append(banner('π Paper-wise Question Blueprint (Decoded)', bg='#1a3c6e')) elements.append(Spacer(1, 0.3*cm)) papers = [ { 'title': 'PAPER I β 100 Marks', 'bg': '#2e6db4', 'mcq': [ ('1', 'A', 'Clinico-pathological signs & symptoms + miasmatic integration', 'Must Know'), ('2', 'A', 'Clinico-pathological signs & symptoms + miasmatic integration', 'Must Know'), ('3', 'A', 'Clinico-pathological signs & symptoms + miasmatic integration', 'Must Know'), ('4', 'B', 'Introduction to Medical Genetics', 'Must Know'), ('5', 'C', 'Immunity & Susceptibility', 'Must Know'), ('6', 'D', 'Infectious & Tropical Diseases', 'Must Know'), ('7', 'E', 'Pulmonary Disorders', 'Must Know'), ('8', 'F', 'Endocrine & Metabolic Disorders', 'Desirable to Know'), ('9', 'G', 'Water & Electrolyte Balance', 'Desirable to Know'), ('10', 'H', 'Digestive System & Peritoneum', 'Nice to Know'), ], 'saq': [ ('11', 'A', 'Clinico-pathological signs & symptoms + miasmatic integration', 'Must Know'), ('12', 'B', 'Introduction to Medical Genetics', 'Must Know'), ('13', 'C', 'Immunity & Susceptibility', 'Must Know'), ('14', 'D', 'Infectious & Tropical Diseases', 'Must Know'), ('15', 'E', 'Pulmonary Disorders', 'Desirable to Know'), ('16', 'F', 'Endocrine & Metabolic Disorders', 'Desirable to Know'), ('17', 'G', 'Water & Electrolyte Balance', 'Must Know'), ('18', 'H', 'Digestive System & Peritoneum', 'Must Know'), ], 'laq': [ ('19', 'D', 'Infectious & Tropical Diseases', 'Must Know'), ('20', 'E', 'Pulmonary Disorders', 'Must Know'), ('21', 'F', 'Endocrine & Metabolic Disorders', 'Must Know'), ('22', 'G', 'Water & Electrolyte Balance', 'Must Know'), ('23', 'H', 'Digestive System & Peritoneum', 'Must Know'), ], }, { 'title': 'PAPER II β 100 Marks', 'bg': '#b56c00', 'mcq': [ ('1', 'I', 'Liver, Gallbladder & Pancreas', 'Must Know'), ('2', 'I', 'Liver, Gallbladder & Pancreas', 'Must Know'), ('3', 'J', 'Diseases of Kidney', 'Must Know'), ('4', 'K', 'Cardiovascular System (CVS)', 'Must Know'), ('5', 'L', 'Musculoskeletal & Connective Tissue', 'Must Know'), ('6', 'M', 'CNS & Peripheral Nervous System', 'Must Know'), ('7', 'N', 'Haematopoietic System', 'Must Know'), ('8', 'N', 'Haematopoietic System', 'Desirable to Know'), ('9', 'O', 'Nutritional & Metabolic Disorders', 'Desirable to Know'), ('10', 'O', 'Nutritional & Metabolic Disorders', 'Nice to Know'), ], 'saq': [ ('11', 'I', 'Liver, Gallbladder & Pancreas', 'Must Know'), ('12', 'I', 'Liver, Gallbladder & Pancreas', 'Must Know'), ('13', 'J', 'Diseases of Kidney', 'Must Know'), ('14', 'K', 'Cardiovascular System (CVS)', 'Must Know'), ('15', 'L', 'Musculoskeletal & Connective Tissue', 'Desirable to Know'), ('16', 'M', 'CNS & Peripheral Nervous System', 'Desirable to Know'), ('17', 'N', 'Haematopoietic System', 'Must Know'), ('18', 'O', 'Nutritional & Metabolic Disorders', 'Must Know'), ], 'laq': [ ('19', 'J', 'Diseases of Kidney', 'Must Know'), ('20', 'K', 'Cardiovascular System (CVS)', 'Must Know'), ('21', 'L', 'Musculoskeletal & Connective Tissue', 'Must Know'), ('22', 'M', 'CNS & Peripheral Nervous System', 'Must Know'), ('23', 'N', 'Haematopoietic System', 'Must Know'), ], }, { 'title': 'PAPER III β 100 Marks', 'bg': '#1a5e40', 'mcq': [ ('1', 'P', 'Psychiatric Disorders', 'Must Know'), ('2', 'Q', 'Dermatological & STDs', 'Must Know'), ('3', 'Q', 'Dermatological & STDs', 'Must Know'), ('4', 'R', 'Paediatric Diseases', 'Must Know'), ('5', 'R', 'Paediatric Diseases', 'Must Know'), ('6', 'S', 'Geriatric Disorders', 'Must Know'), ('7', 'S', 'Geriatric Disorders', 'Must Know'), ('8', 'T', 'Environmental Exposure Disorders', 'Desirable to Know'), ('9', 'U', 'Palliative & End-of-Life Care', 'Desirable to Know'), ('10', 'V', 'Miscellaneous (Stem Cell/Tele-med/Integrative)', 'Nice to Know'), ], 'saq': [ ('11', 'P', 'Psychiatric Disorders', 'Must Know'), ('12', 'P', 'Psychiatric Disorders', 'Must Know'), ('13', 'Q', 'Dermatological & STDs', 'Must Know'), ('14', 'R', 'Paediatric Diseases', 'Must Know'), ('15', 'S', 'Geriatric Disorders', 'Desirable to Know'), ('16', 'T', 'Environmental Exposure Disorders', 'Desirable to Know'), ('17', 'U', 'Palliative & End-of-Life Care', 'Must Know'), ('18', 'V', 'Miscellaneous', 'Must Know'), ], 'laq': [ ('19', 'P', 'Psychiatric Disorders', 'Must Know'), ('20', 'Q', 'Dermatological & STDs', 'Must Know'), ('21', 'Q', 'Dermatological & STDs', 'Must Know'), ('22', 'R', 'Paediatric Diseases', 'Must Know'), ('23', 'R', 'Paediatric Diseases', 'Must Know'), ], }, ] kn_colors = { 'Must Know': colors.HexColor('#e8f5e9'), 'Desirable to Know': colors.HexColor('#fff9e6'), 'Nice to Know': colors.HexColor('#f5f5f5'), } kn_badge = { 'Must Know': ('β Must Know', '#1a5e40'), 'Desirable to Know': ('β‘ Desirable', '#b56c00'), 'Nice to Know': ('βΉοΈ Nice to Know', '#555555'), } for paper in papers: block = [] # Paper title banner title_data = [[Paragraph(paper['title'], ParagraphStyle('PT', parent=styles['Normal'], fontSize=13, fontName='Helvetica-Bold', textColor=colors.white, alignment=TA_CENTER))]] pt = Table(title_data, colWidths=[W - 3.6*cm]) pt.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), colors.HexColor(paper['bg'])), ('TOPPADDING', (0,0), (-1,-1), 8), ('BOTTOMPADDING', (0,0), (-1,-1), 8), ])) block.append(pt) block.append(Spacer(1, 0.15*cm)) def make_q_table(q_list, q_type, mark_each, bg_header): header = [ Paragraph(f'<b>Q#</b>', ParagraphStyle('h', parent=styles['Normal'], fontSize=8.5, textColor=colors.white, fontName='Helvetica-Bold', alignment=TA_CENTER)), Paragraph(f'<b>Code</b>', ParagraphStyle('h', parent=styles['Normal'], fontSize=8.5, textColor=colors.white, fontName='Helvetica-Bold', alignment=TA_CENTER)), Paragraph(f'<b>{q_type} β {mark_each} mark(s) each</b>', ParagraphStyle('h', parent=styles['Normal'], fontSize=8.5, textColor=colors.white, fontName='Helvetica-Bold')), Paragraph('<b>Category</b>', ParagraphStyle('h', parent=styles['Normal'], fontSize=8.5, textColor=colors.white, fontName='Helvetica-Bold')), ] rows = [header] for q in q_list: kn = q[3] badge_text, badge_color = kn_badge[kn] rows.append([ Paragraph(q[0], ParagraphStyle('qn', parent=styles['Normal'], fontSize=8.5, alignment=TA_CENTER)), Paragraph(f'<b>{q[1]}</b>', ParagraphStyle('qc', parent=styles['Normal'], fontSize=10, fontName='Helvetica-Bold', alignment=TA_CENTER, textColor=colors.HexColor('#1a3c6e'))), Paragraph(q[2], ParagraphStyle('qt', parent=styles['Normal'], fontSize=8.5, leading=12)), Paragraph(badge_text, ParagraphStyle('qk', parent=styles['Normal'], fontSize=7.5, textColor=colors.HexColor(badge_color), fontName='Helvetica-Bold')), ]) t = Table(rows, colWidths=[1*cm, 1.4*cm, 9.5*cm, 4.1*cm]) ts = [ ('BACKGROUND', (0,0), (-1,0), colors.HexColor(bg_header)), ('FONTSIZE', (0,0), (-1,-1), 8.5), ('GRID', (0,0), (-1,-1), 0.3, colors.HexColor('#cccccc')), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('ALIGN', (0,0), (1,-1), 'CENTER'), ('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4), ('LEFTPADDING', (0,0), (-1,-1), 5), ] for i, q in enumerate(q_list, 1): ts.append(('BACKGROUND', (0,i), (-1,i), kn_colors[q[3]])) t.setStyle(TableStyle(ts)) return t # MCQ block.append(Paragraph('<b>Section I β MCQs (Q1β10, 1 mark each = 10 marks)</b>', ParagraphStyle('sh', parent=styles['Normal'], fontSize=9, textColor=colors.HexColor('#444'), spaceAfter=3))) block.append(make_q_table(paper['mcq'], 'MCQ', '1', '#555555')) block.append(Spacer(1, 0.15*cm)) # SAQ block.append(Paragraph('<b>Section II β SAQs (Q11β18, 5 marks each = 40 marks)</b>', ParagraphStyle('sh', parent=styles['Normal'], fontSize=9, textColor=colors.HexColor('#444'), spaceAfter=3))) block.append(make_q_table(paper['saq'], 'SAQ', '5', '#b56c00')) block.append(Spacer(1, 0.15*cm)) # LAQ block.append(Paragraph('<b>Section III β LAQs (Q19β23, 10 marks each = 50 marks)</b>', ParagraphStyle('sh', parent=styles['Normal'], fontSize=9, textColor=colors.HexColor('#444'), spaceAfter=3))) block.append(make_q_table(paper['laq'], 'LAQ', '10', '#b5340a')) block.append(Spacer(1, 0.3*cm)) elements.append(KeepTogether(block[:4])) for item in block[4:]: elements.append(item) elements.append(PageBreak()) # ββ SECTION 6: QUICK CHEAT SHEET ββ elements.append(banner('β‘ Quick Reference: Alphabet β Topic Cheat Sheet', bg='#333333')) elements.append(Spacer(1, 0.2*cm)) cheat_data = [ ['Code', 'Topic', 'Marks', 'Paper'], ['A', 'Clinico-pathological signs + miasmatic integration', '8', 'I'], ['B', 'Medical Genetics', '6', 'I'], ['C', 'Immunity & Susceptibility', '6', 'I'], ['D', 'Infectious & Tropical Diseases', '16', 'I'], ['E', 'Pulmonary Disorders', '16', 'I'], ['F', 'Endocrine & Metabolic Disorders', '16', 'I'], ['G', 'Water & Electrolyte Balance', '16', 'I'], ['H', 'Digestive System & Peritoneum', '16', 'I'], ['I', 'Liver, Gallbladder & Pancreas', '12', 'II'], ['J', 'Diseases of Kidney', '16', 'II'], ['K', 'CVS (Heart & Vessels)', '16', 'II'], ['L', 'Musculoskeletal & Connective Tissue', '16', 'II'], ['M', 'CNS & Peripheral Nervous System', '16', 'II'], ['N', 'Haematopoietic System (Blood)', '17', 'II'], ['O', 'Nutritional & Metabolic Disorders', '7', 'II'], ['P', 'Psychiatric Disorders', '21', 'III'], ['Q', 'Dermatology & STDs', '27', 'III'], ['R', 'Paediatric Diseases', '27', 'III'], ['S', 'Geriatric Disorders', '7', 'III'], ['T', 'Environmental Exposure Disorders', '6', 'III'], ['U', 'Palliative & End-of-Life Care', '6', 'III'], ['V', 'Miscellaneous', '6', 'III'], ] cheat_table = Table(cheat_data, colWidths=[1.5*cm, 10.5*cm, 2*cm, 2*cm]) cts = [ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#333333')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9), ('GRID', (0,0), (-1,-1), 0.4, colors.HexColor('#cccccc')), ('ALIGN', (0,0), (0,-1), 'CENTER'), ('ALIGN', (2,0), (3,-1), 'CENTER'), ('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4), ('LEFTPADDING', (0,0), (-1,-1), 6), ('FONTNAME', (0,1), (0,-1), 'Helvetica-Bold'), ] paper_row_colors2 = {'I': colors.HexColor('#edf3fd'), 'II': colors.HexColor('#fff9ed'), 'III': colors.HexColor('#f0fff4')} for i, row in enumerate(cheat_data[1:], 1): cts.append(('BACKGROUND', (0,i), (-1,i), paper_row_colors2.get(row[3], colors.white))) marks = int(row[2]) if marks >= 21: cts.append(('BACKGROUND', (2,i), (2,i), colors.HexColor('#cc0000'))) cts.append(('TEXTCOLOR', (2,i), (2,i), colors.white)) cts.append(('FONTNAME', (2,i), (2,i), 'Helvetica-Bold')) elif marks >= 16: cts.append(('BACKGROUND', (2,i), (2,i), colors.HexColor('#ff8800'))) cts.append(('TEXTCOLOR', (2,i), (2,i), colors.white)) cts.append(('FONTNAME', (2,i), (2,i), 'Helvetica-Bold')) cheat_table.setStyle(TableStyle(cts)) elements.append(cheat_table) elements.append(Spacer(1, 0.4*cm)) elements.append(HRFlowable(width="100%", thickness=1, color=colors.HexColor('#1a3c6e'))) elements.append(Spacer(1, 0.15*cm)) elements.append(Paragraph( 'Practice of Medicine | Question Paper Blueprint | HomUG PM-III | 4th Year BHMS | Generated by Orris', ParagraphStyle('footer', parent=styles['Normal'], fontSize=8, textColor=colors.HexColor('#888'), alignment=TA_CENTER) )) doc.build(elements) print("Blueprint PDF created at:", output_path) EOF
python3 << 'EOF' from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.units import cm from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable, PageBreak, KeepTogether from reportlab.lib.enums import TA_CENTER, TA_LEFT output_path = "/tmp/workspace/cbdc-summary/PM_QuestionPaper_Blueprint.pdf" doc = SimpleDocTemplate(output_path, pagesize=A4, rightMargin=1.8*cm, leftMargin=1.8*cm, topMargin=2*cm, bottomMargin=2*cm) W, H = A4 styles = getSampleStyleSheet() WHITE = colors.white NAVY = colors.HexColor('#1a3c6e') BLUE2 = colors.HexColor('#2e6db4') GREEN_D = colors.HexColor('#1a5e40') ORANGE = colors.HexColor('#b56c00') RED_D = colors.HexColor('#b5340a') PURPLE = colors.HexColor('#7b2d8b') DARK = colors.HexColor('#333333') def banner(text, bg=None, fg=None, size=12, align=TA_LEFT): if bg is None: bg = NAVY if fg is None: fg = WHITE data = [[Paragraph(text, ParagraphStyle('B', parent=styles['Normal'], fontSize=size, textColor=fg, fontName='Helvetica-Bold', alignment=align))]] t = Table(data, colWidths=[W - 3.6*cm]) t.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), bg), ('TOPPADDING', (0,0), (-1,-1), 8), ('BOTTOMPADDING', (0,0), (-1,-1), 8), ('LEFTPADDING', (0,0), (-1,-1), 12), ])) return t body = ParagraphStyle('body', parent=styles['Normal'], fontSize=9.5, leading=14) small = ParagraphStyle('small', parent=styles['Normal'], fontSize=8.5, leading=13, textColor=colors.HexColor('#444444')) elements = [] # ββ TITLE ββ elements.append(Spacer(1, 0.3*cm)) elements.append(banner('Question Paper Blueprint', bg=NAVY, size=20, align=TA_CENTER)) elements.append(Spacer(1, 0.1*cm)) elements.append(banner('Practice of Medicine | HomUG PM-III | 4th Year BHMS', bg=BLUE2, size=11, align=TA_CENTER)) elements.append(Spacer(1, 0.5*cm)) # ββ SECTION 1: OVERALL SCHEME ββ elements.append(banner('π Overall Examination Scheme')) elements.append(Spacer(1, 0.2*cm)) scheme_data = [ ['Assessment', 'When', 'Marks', 'Components'], ['PA I\n(Periodical Assessment)', 'End of 3 months\n(Term I)', '20 Marks', 'Viva Voce'], ['TT I\n(Term Test)', 'End of 6 months\n(Term I end)', '100 Marks', 'β’ Viva voce: 50 marks\nβ’ Case taking + prescription: 20 marks\nβ’ Clinical exam / OSCE / Mini-CEX: 20 marks\nβ’ Spotting: 10 marks'], ['PA II\n(Periodical Assessment)', 'End of 9 months\n(Term II)', '20 Marks', 'Viva Voce'], ['FUE\n(Final University Exam)', 'End of 12 months', '500 Marks\nTotal', '3 Theory Papers: 300 marks (100 each)\nPractical / Clinical: 100 marks\nViva Voce: 80 marks\nInternal Assessment: 20 marks'], ] st = Table(scheme_data, colWidths=[3.2*cm, 3*cm, 3*cm, 6.8*cm]) st.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), NAVY), ('TEXTCOLOR', (0,0), (-1,0), WHITE), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 8.5), ('GRID', (0,0), (-1,-1), 0.4, colors.HexColor('#bbbbbb')), ('ROWBACKGROUNDS', (0,1), (-1,-2), [colors.HexColor('#f5f8ff'), WHITE]), ('BACKGROUND', (0,-1), (-1,-1), colors.HexColor('#fff3cd')), ('FONTNAME', (0,-1), (0,-1), 'Helvetica-Bold'), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 6), ])) elements.append(st) elements.append(Spacer(1, 0.4*cm)) # ββ SECTION 2: FUE PAPER LAYOUT ββ elements.append(banner('π FUE Theory Paper Layout β Each Paper: 100 Marks', bg=GREEN_D)) elements.append(Spacer(1, 0.2*cm)) layout_data = [ ['Type', 'No.', 'Marks\nEach', 'Total', 'Rules'], ['LAQ\n(Long Answer)', '5', '10', '50', 'β ALL compulsory\nβ Must Know topics ONLY\nβ NO Desirable / Nice to Know'], ['SAQ\n(Short Answer)', '8', '5', '40', 'β ALL compulsory\nβ Must Know: 4 qs\nβ Desirable to Know: 2 qs'], ['MCQ\n(Multiple Choice)', '10', '1', '10', 'β ALL compulsory\nβ Must Know: 7 | Desirable: 2 | Nice to Know: 1'], ['TOTAL', '23', 'β', '100', '3 Papers Γ 100 = 300 marks theory'], ] lt = Table(layout_data, colWidths=[2.5*cm, 1.5*cm, 2*cm, 1.5*cm, 8.5*cm]) lt.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), GREEN_D), ('TEXTCOLOR', (0,0), (-1,0), WHITE), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 8.5), ('GRID', (0,0), (-1,-1), 0.4, colors.HexColor('#bbbbbb')), ('BACKGROUND', (0,1), (-1,1), colors.HexColor('#ffeaea')), ('BACKGROUND', (0,2), (-1,2), colors.HexColor('#fff3e0')), ('BACKGROUND', (0,3), (-1,3), colors.HexColor('#fffff0')), ('BACKGROUND', (0,-1), (-1,-1), colors.HexColor('#c8daf7')), ('FONTNAME', (0,-1), (-1,-1), 'Helvetica-Bold'), ('ALIGN', (1,0), (3,-1), 'CENTER'), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 6), ])) elements.append(lt) elements.append(Spacer(1, 0.4*cm)) # ββ SECTION 3: PRACTICAL ββ elements.append(banner('π©Ί Practical / Clinical β 100 Marks (FUE)', bg=PURPLE)) elements.append(Spacer(1, 0.2*cm)) prac_data = [ ['Component', 'Marks', 'What is Assessed'], ['Case Taking', '25', 'Thorough history, symptoms and signs in detail'], ['Examination Skills', '20', 'Proper demonstration of clinical examination technique'], ['Bedside Q&A Session', '20', 'Diagnosis, differential diagnosis, clinical reasoning'], ['Spotters (5 Γ 3 marks)', '15', 'Instruments: ID, Indications, Contraindications\nX-Ray: ID, Observations, Differential Diagnoses\nECG / Blood reports: Observations, Causes, Dx/DDx'], ['Assignments + Records', '20\n(10+10)', 'Content accuracy, organisation, and quality of work'], ['TOTAL', '100', ''], ] pt = Table(prac_data, colWidths=[5*cm, 2*cm, 9*cm]) pt.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), PURPLE), ('TEXTCOLOR', (0,0), (-1,0), WHITE), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 8.5), ('GRID', (0,0), (-1,-1), 0.4, colors.HexColor('#bbbbbb')), ('ROWBACKGROUNDS', (0,1), (-1,-2), [colors.HexColor('#fdf5ff'), WHITE]), ('BACKGROUND', (0,-1), (-1,-1), colors.HexColor('#c8daf7')), ('FONTNAME', (0,-1), (-1,-1), 'Helvetica-Bold'), ('ALIGN', (1,0), (1,-1), 'CENTER'), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 6), ])) elements.append(pt) elements.append(PageBreak()) # ββ SECTION 4: THEME TABLE ββ elements.append(banner('π€ Theme Table β All Alphabets Decoded (A to V)', bg=RED_D)) elements.append(Spacer(1, 0.15*cm)) elements.append(Paragraph( '<b>Each code letter = a fixed topic group with a set marks allocation spread across one paper.</b>', ParagraphStyle('note', parent=styles['Normal'], fontSize=9, textColor=colors.HexColor('#555555'), spaceAfter=5, leftIndent=4) )) theme_data = [ ['Code', 'Marks', 'Topic / Subject', 'Paper', 'Question Mix'], ['A', '8', 'Clinico-pathological signs & symptoms with miasmatic integration', 'I', 'SAQ: 1, MCQ: 3'], ['B', '6', 'Introduction to Medical Genetics', 'I', 'SAQ: 1, MCQ: 1'], ['C', '6', 'Immunity & Susceptibility β General considerations', 'I', 'SAQ: 1, MCQ: 1'], ['D', '16', 'Infectious Diseases and Tropical Diseases', 'I', 'LAQ: 1, SAQ: 1, MCQ: 1'], ['E', '16', 'Pulmonary Disorders', 'I', 'LAQ: 1, SAQ: 1, MCQ: 1'], ['F', '16', 'Endocrine Diseases and Metabolic Disorders', 'I', 'LAQ: 1, SAQ: 1, MCQ: 1'], ['G', '16', 'Disorders of Water & Electrolyte Balance', 'I', 'LAQ: 1, SAQ: 1, MCQ: 1'], ['H', '16', 'Diseases of Digestive System and Peritoneum', 'I', 'LAQ: 1, SAQ: 1, MCQ: 1'], ['I', '12', 'Diseases of Liver, Gallbladder and Pancreas', 'II', 'SAQ: 2, MCQ: 2'], ['J', '16', 'Diseases of Kidney', 'II', 'LAQ: 1, SAQ: 1, MCQ: 1'], ['K', '16', 'Disorders of Cardiovascular System (CVS)', 'II', 'LAQ: 1, SAQ: 1, MCQ: 1'], ['L', '16', 'Musculoskeletal and Connective Tissue Disorders', 'II', 'LAQ: 1, SAQ: 1, MCQ: 1'], ['M', '16', 'Disorders of CNS and Peripheral Nervous System', 'II', 'LAQ: 1, SAQ: 1, MCQ: 1'], ['N', '17', 'Disorders of Haematopoietic System', 'II', 'LAQ: 1, SAQ: 1, MCQ: 2'], ['O', '7', 'Nutritional and Metabolic Disorders', 'II', 'SAQ: 1, MCQ: 2'], ['P', '21', 'Psychiatric Disorders', 'III', 'LAQ: 1, SAQ: 2, MCQ: 1'], ['Q', '27', 'Dermatological and Sexually Transmitted Disorders', 'III', 'LAQ: 2, SAQ: 1, MCQ: 2'], ['R', '27', 'Paediatric Diseases', 'III', 'LAQ: 2, SAQ: 1, MCQ: 2'], ['S', '7', 'Geriatric Disorders', 'III', 'SAQ: 1, MCQ: 2'], ['T', '6', 'Disorders Associated with Environmental Exposure', 'III', 'SAQ: 1, MCQ: 1'], ['U', '6', 'Palliative and End-of-Life Care', 'III', 'SAQ: 1, MCQ: 1'], ['V', '6', 'Miscellaneous (Stem Cell, Tele-medicine, Integrative Healthcare)', 'III', 'SAQ: 1, MCQ: 1'], ] theme_table = Table(theme_data, colWidths=[1.2*cm, 1.5*cm, 9*cm, 1.5*cm, 3.8*cm]) tts = [ ('BACKGROUND', (0,0), (-1,0), RED_D), ('TEXTCOLOR', (0,0), (-1,0), WHITE), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 8.5), ('GRID', (0,0), (-1,-1), 0.4, colors.HexColor('#bbbbbb')), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('ALIGN', (0,0), (1,-1), 'CENTER'), ('ALIGN', (3,0), (3,-1), 'CENTER'), ('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4), ('LEFTPADDING', (0,0), (-1,-1), 5), ('FONTNAME', (0,1), (0,-1), 'Helvetica-Bold'), ] paper_row_bg = {'I': colors.HexColor('#edf3fd'), 'II': colors.HexColor('#fff9ed'), 'III': colors.HexColor('#f0fff4')} for i, row in enumerate(theme_data[1:], 1): tts.append(('BACKGROUND', (0,i), (-1,i), paper_row_bg.get(row[3], WHITE))) m = int(row[1]) if m >= 21: tts.extend([('BACKGROUND',(1,i),(1,i),colors.HexColor('#cc0000')), ('TEXTCOLOR',(1,i),(1,i),WHITE), ('FONTNAME',(1,i),(1,i),'Helvetica-Bold')]) elif m >= 16: tts.extend([('BACKGROUND',(1,i),(1,i),colors.HexColor('#ff8800')), ('TEXTCOLOR',(1,i),(1,i),WHITE), ('FONTNAME',(1,i),(1,i),'Helvetica-Bold')]) elif m <= 8: tts.extend([('BACKGROUND',(1,i),(1,i),colors.HexColor('#aaaaaa')), ('TEXTCOLOR',(1,i),(1,i),WHITE)]) theme_table.setStyle(TableStyle(tts)) elements.append(theme_table) elements.append(Spacer(1, 0.2*cm)) # legend rows leg = Table([ [Paragraph('<b>Marks colour:</b>', small), Paragraph('π΄ Red = 27 marks (highest)', small), Paragraph('π Orange = 16-17 marks', small), Paragraph('βͺ Grey = 6-8 marks (low)', small)], [Paragraph('<b>Row colour:</b>', small), Paragraph('π΅ Blue = Paper I', small), Paragraph('π‘ Yellow = Paper II', small), Paragraph('π’ Green = Paper III', small)], ], colWidths=[3*cm, 4.5*cm, 4.5*cm, 4*cm]) leg.setStyle(TableStyle([ ('BACKGROUND',(0,0),(-1,-1),colors.HexColor('#f8f8f8')), ('BOX',(0,0),(-1,-1),0.5,colors.HexColor('#aaaaaa')), ('TOPPADDING',(0,0),(-1,-1),4),('BOTTOMPADDING',(0,0),(-1,-1),4),('LEFTPADDING',(0,0),(-1,-1),6), ('GRID',(0,0),(-1,-1),0.3,colors.HexColor('#dddddd')), ])) elements.append(leg) elements.append(PageBreak()) # ββ SECTION 5: PAPER-WISE BLUEPRINTS ββ elements.append(banner('π Paper-wise Question Blueprint β Every Question Decoded', bg=NAVY)) elements.append(Spacer(1, 0.3*cm)) KN_BG = {'Must Know': colors.HexColor('#e8f5e9'), 'Desirable to Know': colors.HexColor('#fff9e6'), 'Nice to Know': colors.HexColor('#f5f5f5')} KN_LBL = {'Must Know': ('Must Know','#1a5e40'), 'Desirable to Know': ('Desirable','#b56c00'), 'Nice to Know': ('Nice to Know','#777777')} papers = [ { 'title': 'PAPER I β 100 Marks', 'bg': BLUE2, 'mcq': [ ('1','A','Clinico-pathological signs & symptoms + miasmatic integration','Must Know'), ('2','A','Clinico-pathological signs & symptoms + miasmatic integration','Must Know'), ('3','A','Clinico-pathological signs & symptoms + miasmatic integration','Must Know'), ('4','B','Introduction to Medical Genetics','Must Know'), ('5','C','Immunity & Susceptibility','Must Know'), ('6','D','Infectious & Tropical Diseases','Must Know'), ('7','E','Pulmonary Disorders','Must Know'), ('8','F','Endocrine & Metabolic Disorders','Desirable to Know'), ('9','G','Water & Electrolyte Balance','Desirable to Know'), ('10','H','Digestive System & Peritoneum','Nice to Know'), ], 'saq': [ ('11','A','Clinico-pathological signs & symptoms + miasmatic integration','Must Know'), ('12','B','Introduction to Medical Genetics','Must Know'), ('13','C','Immunity & Susceptibility','Must Know'), ('14','D','Infectious & Tropical Diseases','Must Know'), ('15','E','Pulmonary Disorders','Desirable to Know'), ('16','F','Endocrine & Metabolic Disorders','Desirable to Know'), ('17','G','Water & Electrolyte Balance','Must Know'), ('18','H','Digestive System & Peritoneum','Must Know'), ], 'laq': [ ('19','D','Infectious & Tropical Diseases','Must Know'), ('20','E','Pulmonary Disorders','Must Know'), ('21','F','Endocrine & Metabolic Disorders','Must Know'), ('22','G','Water & Electrolyte Balance','Must Know'), ('23','H','Digestive System & Peritoneum','Must Know'), ], }, { 'title': 'PAPER II β 100 Marks', 'bg': ORANGE, 'mcq': [ ('1','I','Liver, Gallbladder & Pancreas','Must Know'), ('2','I','Liver, Gallbladder & Pancreas','Must Know'), ('3','J','Diseases of Kidney','Must Know'), ('4','K','Cardiovascular System (CVS)','Must Know'), ('5','L','Musculoskeletal & Connective Tissue','Must Know'), ('6','M','CNS & Peripheral Nervous System','Must Know'), ('7','N','Haematopoietic System','Must Know'), ('8','N','Haematopoietic System','Desirable to Know'), ('9','O','Nutritional & Metabolic Disorders','Desirable to Know'), ('10','O','Nutritional & Metabolic Disorders','Nice to Know'), ], 'saq': [ ('11','I','Liver, Gallbladder & Pancreas','Must Know'), ('12','I','Liver, Gallbladder & Pancreas','Must Know'), ('13','J','Diseases of Kidney','Must Know'), ('14','K','Cardiovascular System (CVS)','Must Know'), ('15','L','Musculoskeletal & Connective Tissue','Desirable to Know'), ('16','M','CNS & Peripheral Nervous System','Desirable to Know'), ('17','N','Haematopoietic System','Must Know'), ('18','O','Nutritional & Metabolic Disorders','Must Know'), ], 'laq': [ ('19','J','Diseases of Kidney','Must Know'), ('20','K','Cardiovascular System (CVS)','Must Know'), ('21','L','Musculoskeletal & Connective Tissue','Must Know'), ('22','M','CNS & Peripheral Nervous System','Must Know'), ('23','N','Haematopoietic System','Must Know'), ], }, { 'title': 'PAPER III β 100 Marks', 'bg': GREEN_D, 'mcq': [ ('1','P','Psychiatric Disorders','Must Know'), ('2','Q','Dermatological & STDs','Must Know'), ('3','Q','Dermatological & STDs','Must Know'), ('4','R','Paediatric Diseases','Must Know'), ('5','R','Paediatric Diseases','Must Know'), ('6','S','Geriatric Disorders','Must Know'), ('7','S','Geriatric Disorders','Must Know'), ('8','T','Environmental Exposure Disorders','Desirable to Know'), ('9','U','Palliative & End-of-Life Care','Desirable to Know'), ('10','V','Miscellaneous (Stem Cell / Tele-medicine / Integrative)','Nice to Know'), ], 'saq': [ ('11','P','Psychiatric Disorders','Must Know'), ('12','P','Psychiatric Disorders','Must Know'), ('13','Q','Dermatological & STDs','Must Know'), ('14','R','Paediatric Diseases','Must Know'), ('15','S','Geriatric Disorders','Desirable to Know'), ('16','T','Environmental Exposure Disorders','Desirable to Know'), ('17','U','Palliative & End-of-Life Care','Must Know'), ('18','V','Miscellaneous','Must Know'), ], 'laq': [ ('19','P','Psychiatric Disorders','Must Know'), ('20','Q','Dermatological & STDs','Must Know'), ('21','Q','Dermatological & STDs','Must Know'), ('22','R','Paediatric Diseases','Must Know'), ('23','R','Paediatric Diseases','Must Know'), ], }, ] def make_q_table(q_list, q_type, mark_each, hdr_bg): hdr_style = ParagraphStyle('h', parent=styles['Normal'], fontSize=8.5, textColor=WHITE, fontName='Helvetica-Bold', alignment=TA_CENTER) hdr_style2 = ParagraphStyle('h2', parent=styles['Normal'], fontSize=8.5, textColor=WHITE, fontName='Helvetica-Bold') header = [ Paragraph('Q#', hdr_style), Paragraph('Code', hdr_style), Paragraph(f'{q_type} β {mark_each} mark(s) each | ALL COMPULSORY', hdr_style2), Paragraph('Category', hdr_style), ] rows = [header] for q in q_list: lbl, col = KN_LBL[q[3]] rows.append([ Paragraph(q[0], ParagraphStyle('qn', parent=styles['Normal'], fontSize=8.5, alignment=TA_CENTER)), Paragraph(f'<b>{q[1]}</b>', ParagraphStyle('qc', parent=styles['Normal'], fontSize=11, fontName='Helvetica-Bold', alignment=TA_CENTER, textColor=NAVY)), Paragraph(q[2], ParagraphStyle('qt', parent=styles['Normal'], fontSize=8.5, leading=12)), Paragraph(f'<b>{lbl}</b>', ParagraphStyle('qk', parent=styles['Normal'], fontSize=8, fontName='Helvetica-Bold', textColor=colors.HexColor(col))), ]) t = Table(rows, colWidths=[1*cm, 1.4*cm, 10*cm, 3.6*cm]) ts = [ ('BACKGROUND',(0,0),(-1,0), hdr_bg), ('FONTSIZE',(0,0),(-1,-1),8.5), ('GRID',(0,0),(-1,-1),0.3,colors.HexColor('#cccccc')), ('VALIGN',(0,0),(-1,-1),'MIDDLE'), ('ALIGN',(0,0),(1,-1),'CENTER'), ('TOPPADDING',(0,0),(-1,-1),4), ('BOTTOMPADDING',(0,0),(-1,-1),4), ('LEFTPADDING',(0,0),(-1,-1),5), ] for i, q in enumerate(q_list, 1): ts.append(('BACKGROUND',(0,i),(-1,i), KN_BG[q[3]])) t.setStyle(TableStyle(ts)) return t sh_style = ParagraphStyle('sh', parent=styles['Normal'], fontSize=9, textColor=colors.HexColor('#444444'), spaceAfter=3, spaceBefore=4) for paper in papers: # Paper title ptitle_data = [[Paragraph(paper['title'], ParagraphStyle('PT', parent=styles['Normal'], fontSize=13, fontName='Helvetica-Bold', textColor=WHITE, alignment=TA_CENTER))]] pt = Table(ptitle_data, colWidths=[W - 3.6*cm]) pt.setStyle(TableStyle([ ('BACKGROUND',(0,0),(-1,-1), paper['bg']), ('TOPPADDING',(0,0),(-1,-1),8), ('BOTTOMPADDING',(0,0),(-1,-1),8), ])) elements.append(pt) elements.append(Spacer(1, 0.15*cm)) elements.append(Paragraph('<b>Section I β MCQs (Q1-10, 1 mark each = 10 marks)</b>', sh_style)) elements.append(make_q_table(paper['mcq'], 'MCQ', '1', DARK)) elements.append(Spacer(1, 0.15*cm)) elements.append(Paragraph('<b>Section II β SAQs (Q11-18, 5 marks each = 40 marks)</b>', sh_style)) elements.append(make_q_table(paper['saq'], 'SAQ', '5', ORANGE)) elements.append(Spacer(1, 0.15*cm)) elements.append(Paragraph('<b>Section III β LAQs (Q19-23, 10 marks each = 50 marks)</b>', sh_style)) elements.append(make_q_table(paper['laq'], 'LAQ', '10', RED_D)) elements.append(Spacer(1, 0.3*cm)) elements.append(PageBreak()) # ββ SECTION 6: QUICK CHEAT SHEET ββ elements.append(banner('β‘ Quick Reference: All 22 Codes at a Glance', bg=DARK)) elements.append(Spacer(1, 0.2*cm)) cheat_data = [ ['Code', 'Topic', 'Marks', 'Paper'], ['A', 'Clinico-pathological signs & symptoms + miasmatic integration', '8', 'I'], ['B', 'Medical Genetics', '6', 'I'], ['C', 'Immunity & Susceptibility', '6', 'I'], ['D', 'Infectious & Tropical Diseases', '16', 'I'], ['E', 'Pulmonary Disorders', '16', 'I'], ['F', 'Endocrine & Metabolic Disorders', '16', 'I'], ['G', 'Water & Electrolyte Balance', '16', 'I'], ['H', 'Digestive System & Peritoneum', '16', 'I'], ['I', 'Liver, Gallbladder & Pancreas', '12', 'II'], ['J', 'Diseases of Kidney', '16', 'II'], ['K', 'CVS (Heart & Vessels)', '16', 'II'], ['L', 'Musculoskeletal & Connective Tissue', '16', 'II'], ['M', 'CNS & Peripheral Nervous System', '16', 'II'], ['N', 'Haematopoietic System (Blood)', '17', 'II'], ['O', 'Nutritional & Metabolic Disorders', '7', 'II'], ['P', 'Psychiatric Disorders', '21', 'III'], ['Q', 'Dermatology & STDs', '27', 'III'], ['R', 'Paediatric Diseases', '27', 'III'], ['S', 'Geriatric Disorders', '7', 'III'], ['T', 'Environmental Exposure Disorders', '6', 'III'], ['U', 'Palliative & End-of-Life Care', '6', 'III'], ['V', 'Miscellaneous', '6', 'III'], ] ct = Table(cheat_data, colWidths=[1.5*cm, 11*cm, 2*cm, 1.5*cm]) cts = [ ('BACKGROUND',(0,0),(-1,0),DARK), ('TEXTCOLOR',(0,0),(-1,0),WHITE), ('FONTNAME',(0,0),(-1,0),'Helvetica-Bold'), ('FONTSIZE',(0,0),(-1,-1),9), ('GRID',(0,0),(-1,-1),0.4,colors.HexColor('#cccccc')), ('ALIGN',(0,0),(0,-1),'CENTER'), ('ALIGN',(2,0),(3,-1),'CENTER'), ('TOPPADDING',(0,0),(-1,-1),4), ('BOTTOMPADDING',(0,0),(-1,-1),4), ('LEFTPADDING',(0,0),(-1,-1),6), ('FONTNAME',(0,1),(0,-1),'Helvetica-Bold'), ] for i, row in enumerate(cheat_data[1:], 1): cts.append(('BACKGROUND',(0,i),(-1,i), paper_row_bg.get(row[3], WHITE))) m = int(row[2]) if m >= 21: cts.extend([('BACKGROUND',(2,i),(2,i),colors.HexColor('#cc0000')), ('TEXTCOLOR',(2,i),(2,i),WHITE),('FONTNAME',(2,i),(2,i),'Helvetica-Bold')]) elif m >= 16: cts.extend([('BACKGROUND',(2,i),(2,i),colors.HexColor('#ff8800')), ('TEXTCOLOR',(2,i),(2,i),WHITE),('FONTNAME',(2,i),(2,i),'Helvetica-Bold')]) ct.setStyle(TableStyle(cts)) elements.append(ct) elements.append(Spacer(1, 0.4*cm)) elements.append(HRFlowable(width="100%", thickness=1, color=NAVY)) elements.append(Spacer(1, 0.15*cm)) elements.append(Paragraph( 'Practice of Medicine | Question Paper Blueprint | HomUG PM-III | 4th Year BHMS | Generated by Orris', ParagraphStyle('footer', parent=styles['Normal'], fontSize=8, textColor=colors.HexColor('#888888'), alignment=TA_CENTER) )) doc.build(elements) print("Done:", output_path) EOF
PM QuestionPaper Blueprint
PDF Document Β· PDF
| Code | = | Topic |
|---|---|---|
| A | = | Clinico-pathological signs + miasmatic integration |
| BβH | = | Genetics, Immunity, Infectious, Pulmonary, Endocrine, Electrolytes, Digestive |
| IβO | = | Liver, Kidney, CVS, Musculoskeletal, CNS, Blood, Nutrition |
| PβV | = | Psychiatry, Dermatology, Paediatrics, Geriatrics, Environment, Palliative, Misc |