Review the all topics in syllabus of shaly tantra And analysis the pyq and give me imp questions with number of how many times repeat topics wise according syllabus
cd /home/daytona/workspace/attachments/b5a20eaa-5e02-4cba-9da6-e459b0f89f6a/ && python3 -c " import pdfplumber # Extract syllabus PDF print('='*80) print('SYLLABUS PDF') print('='*80) with pdfplumber.open('3. NCISM_IIIBAMS_AyUG-ST.pdf') as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): text = page.extract_text() if text: print(f'--- Page {i+1} ---') print(text) "
cd /home/daytona/workspace/attachments/b5a20eaa-5e02-4cba-9da6-e459b0f89f6a/ && python3 -c " import pdfplumber print('='*80) print('PYQ PAPER') print('='*80) with pdfplumber.open('shalya paper.pdf') as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): text = page.extract_text() if text: print(f'--- Page {i+1} ---') print(text) "
cd /home/daytona/workspace/attachments/b5a20eaa-5e02-4cba-9da6-e459b0f89f6a/ && python3 -c " import pdfplumber with pdfplumber.open('shalya paper.pdf') as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages[:5]): print(f'--- Page {i+1} ---') # Try different methods text = page.extract_text() words = page.extract_words() print('Text:', repr(text[:200] if text else 'None')) print('Words count:', len(words)) if words: print('First 10 words:', [w[\"text\"] for w in words[:10]]) print() "
cd /home/daytona/workspace/attachments/b5a20eaa-5e02-4cba-9da6-e459b0f89f6a/ && python3 -c " import subprocess, sys # Check if pytesseract and pdf2image available try: import pytesseract from pdf2image import convert_from_path print('Libraries available') # Convert first few pages to images and OCR images = convert_from_path('shalya paper.pdf', first_page=1, last_page=8, dpi=200) print(f'Converted {len(images)} pages') for i, img in enumerate(images): text = pytesseract.image_to_string(img) print(f'--- Page {i+1} ---') print(text[:2000]) print() except ImportError as e: print(f'Missing: {e}') # Try alternate: ghostscript result = subprocess.run(['gs', '-dNOPAUSE', '-dBATCH', '-sDEVICE=pngmono', '-r150', '-sOutputFile=/tmp/page_%03d.png', 'shalya paper.pdf'], capture_output=True, text=True, timeout=60) print(result.stdout[:500]) print(result.stderr[:500]) "
cd /home/daytona/workspace/attachments/b5a20eaa-5e02-4cba-9da6-e459b0f89f6a/ && python3 -c " import pytesseract from pdf2image import convert_from_path # Get all pages images = convert_from_path('shalya paper.pdf', dpi=180) print(f'Total pages: {len(images)}') all_text = [] for i, img in enumerate(images): text = pytesseract.image_to_string(img) all_text.append((i+1, text)) print(f'--- Page {i+1} ---') print(text[:1500]) print() " 2>/dev/null
cd /home/daytona/workspace/attachments/b5a20eaa-5e02-4cba-9da6-e459b0f89f6a/ && python3 -c " import pytesseract from pdf2image import convert_from_path # Process in smaller batches for start_page in range(1, 39, 4): end_page = min(start_page + 3, 38) images = convert_from_path('shalya paper.pdf', first_page=start_page, last_page=end_page, dpi=150) for idx, img in enumerate(images): text = pytesseract.image_to_string(img) page_num = start_page + idx print(f'=== PAGE {page_num} ===') print(text[:1800]) print() " 2>/dev/null
Continue
mkdir -p /home/daytona/workspace/shalya-pyq && ls /home/daytona/workspace/shalya-pyq
~/shalya-pyq/build_excel.py
import openpyxl
from openpyxl.styles import (
Font, PatternFill, Alignment, Border, Side, GradientFill
)
from openpyxl.utils import get_column_letter
wb = openpyxl.Workbook()
# ─────────────────────────────────────────────
# COLOUR PALETTE
# ─────────────────────────────────────────────
C_HEADER_DARK = "1A3A5C" # dark navy
C_HEADER_MID = "1F6DA8" # medium blue
C_PAPER1_HDR = "155A8A" # deeper blue for paper-1 section
C_PAPER2_HDR = "7B2D8B" # purple for paper-2 section
C_RED_HDR = "C0392B" # red for critical rows
C_ORANGE_HDR = "E67E22" # orange for high freq
C_YELLOW_HDR = "F1C40F" # yellow for moderate freq
C_GREEN_HDR = "27AE60" # green for lower freq
C_ROW_ALT1 = "EBF5FB" # light blue alternating row
C_ROW_ALT2 = "FDFEFE" # near-white alternating row
C_FREQ_9 = "FADBD8" # very light red – freq ≥9
C_FREQ_7 = "FDEBD0" # light orange – freq 7
C_FREQ_5 = "FEF9E7" # light yellow – freq 5-6
C_FREQ_3 = "EAFAF1" # light green – freq 3-4
WHITE = "FFFFFF"
BLACK = "000000"
def hfill(hex_color):
return PatternFill("solid", fgColor=hex_color)
def ft(bold=False, color=WHITE, size=10, italic=False):
return Font(name="Calibri", bold=bold, color=color, size=size, italic=italic)
def border_thin():
s = Side(style="thin", color="B0BEC5")
return Border(left=s, right=s, top=s, bottom=s)
def border_medium():
s = Side(style="medium", color="607D8B")
return Border(left=s, right=s, top=s, bottom=s)
def align(h="left", v="center", wrap=True):
return Alignment(horizontal=h, vertical=v, wrap_text=wrap)
def freq_fill(n):
if n >= 9: return hfill(C_FREQ_9)
if n >= 7: return hfill(C_FREQ_7)
if n >= 5: return hfill(C_FREQ_5)
if n >= 3: return hfill(C_FREQ_3)
return hfill(C_ROW_ALT2)
def freq_font(n):
bold = (n >= 7)
color = BLACK
return Font(name="Calibri", bold=bold, color=color, size=10)
def write_header_row(ws, row, cols_vals, fill_color, font_color=WHITE, bold=True, size=11):
for col, val in enumerate(cols_vals, 1):
c = ws.cell(row=row, column=col, value=val)
c.fill = hfill(fill_color)
c.font = Font(name="Calibri", bold=bold, color=font_color, size=size)
c.alignment = align("center")
c.border = border_thin()
def write_data_row(ws, row, cols_vals, alt=True, freq=None):
bg = C_ROW_ALT1 if alt else C_ROW_ALT2
for col, val in enumerate(cols_vals, 1):
c = ws.cell(row=row, column=col, value=val)
if freq is not None and col == len(cols_vals): # last col = count
c.fill = freq_fill(freq)
c.font = freq_font(freq)
c.alignment = align("center", wrap=False)
else:
c.fill = hfill(bg)
c.font = Font(name="Calibri", size=10, color=BLACK)
c.alignment = align()
c.border = border_thin()
# ══════════════════════════════════════════════════════════════════
# SHEET 1 – OVERVIEW DASHBOARD
# ══════════════════════════════════════════════════════════════════
ws1 = wb.active
ws1.title = "Overview & Legend"
ws1.sheet_view.showGridLines = False
ws1.column_dimensions["A"].width = 28
ws1.column_dimensions["B"].width = 55
ws1.column_dimensions["C"].width = 18
ws1.column_dimensions["D"].width = 18
# Title banner
ws1.merge_cells("A1:D1")
c = ws1["A1"]
c.value = "SHALYA TANTRA – PYQ TOPIC-WISE ANALYSIS | GAU BAMS 4th Prof | 2016 – 2026"
c.fill = hfill(C_HEADER_DARK)
c.font = Font(name="Calibri", bold=True, color=WHITE, size=14)
c.alignment = align("center", wrap=False)
ws1.row_dimensions[1].height = 32
ws1.merge_cells("A2:D2")
c = ws1["A2"]
c.value = "19 exam papers analysed | 54 syllabus topics (NCISM) | Papers I & II"
c.fill = hfill(C_HEADER_MID)
c.font = ft(bold=False, color=WHITE, size=11)
c.alignment = align("center", wrap=False)
ws1.row_dimensions[2].height = 22
# colour legend
legend_title_row = 4
ws1.merge_cells(f"A{legend_title_row}:D{legend_title_row}")
c = ws1.cell(legend_title_row, 1, "FREQUENCY COLOUR LEGEND")
c.fill = hfill("2C3E50"); c.font = ft(bold=True, size=11)
c.alignment = align("center")
legend = [
("🔴 CRITICAL ≥ 9×", "Prepare without fail – appeared almost every year", C_FREQ_9),
("🟠 VERY HIGH 7–8×", "High probability – always in exam", C_FREQ_7),
("🟡 HIGH 5–6×", "Very likely – target for LAQ / SAQ", C_FREQ_5),
("🟢 MODERATE 3–4×", "Frequently tested – prepare for SAQ", C_FREQ_3),
("⚪ LOW 1–2×", "May appear – prepare as short notes", C_ROW_ALT2),
]
for i, (label, desc, color) in enumerate(legend, legend_title_row + 1):
ws1.cell(i, 1, label).fill = hfill(color)
ws1.cell(i, 1).font = Font(name="Calibri", bold=True, color=BLACK, size=10)
ws1.cell(i, 1).border = border_thin()
ws1.cell(i, 1).alignment = align()
ws1.merge_cells(f"B{i}:D{i}")
ws1.cell(i, 2, desc).fill = hfill(color)
ws1.cell(i, 2).font = Font(name="Calibri", color=BLACK, size=10)
ws1.cell(i, 2).border = border_thin()
ws1.cell(i, 2).alignment = align()
# Top 15 questions summary
r = legend_title_row + len(legend) + 2
ws1.merge_cells(f"A{r}:D{r}")
c = ws1.cell(r, 1, "⭐ TOP 20 MUST-PREPARE QUESTIONS (Both Papers Combined)")
c.fill = hfill(C_RED_HDR); c.font = ft(bold=True, size=12)
c.alignment = align("center")
write_header_row(ws1, r+1, ["Rank", "Question / Topic", "Paper", "Times"], C_HEADER_DARK)
top20 = [
(1, "Marma – importance in surgery, types, Viddha Lakshana", "Paper I", 9),
(2, "Appendicitis – pathophysiology, clinical features, management", "Paper II", 7),
(2, "Stana Vidradhi (Breast Abscess) – clinical features & treatment", "Paper II", 7),
(2, "BPH – etiopathology, symptoms, diagnosis, management", "Paper II", 7),
(2, "Agnikarma – types, indications, Samyak/Asamyak Dagdha Lakshana", "Paper I", 7),
(2, "Ksharasutra preparation method (with diagram)", "Paper I", 7),
(7, "Spinal Anaesthesia – technique, indications, contraindications", "Paper I", 6),
(7, "Sterilization – definition, methods; Autoclave in detail", "Paper I", 6),
(7, "Vidradhi – Nidana, Samprapti, Prakara, Lakshana, Chikitsa", "Paper I", 6),
(7, "Pranashta Shalya – identification, Nirharana Upaya", "Paper I", 6),
(7, "Yantra – definition, Guna, Dosha, types", "Paper I", 6),
(7, "Chhidrodara / Intestinal Perforation – causes, management", "Paper II", 6),
(7, "Pyloric Stenosis – causes, symptoms, treatment", "Paper II", 6),
(7, "Pleural Effusion – causes, complications", "Paper II", 6),
(15, "Kshara – Guna, Dosha, Pradhanyata, Prakara", "Paper I", 5),
(15, "Raktamokshana – types, indications, Jaloukavacharana", "Paper I", 5),
(15, "Blood Transfusion – method, importance, complications", "Paper I", 5),
(15, "Varicose Vein – causes, symptoms, management", "Paper I", 5),
(15, "Burns (Dagdha Vrana) – types, classification, management", "Paper I", 5),
(15, "Bhagandara (Fistula in Ano) – types, diagnosis, management", "Paper II", 5),
]
for i, (rank, q, paper, cnt) in enumerate(top20):
alt = (i % 2 == 0)
bg = C_ROW_ALT1 if alt else C_ROW_ALT2
ws1.cell(r+2+i, 1, rank).fill = freq_fill(cnt)
ws1.cell(r+2+i, 1).font = freq_font(cnt)
ws1.cell(r+2+i, 1).alignment = align("center", wrap=False)
ws1.cell(r+2+i, 1).border = border_thin()
ws1.cell(r+2+i, 2, q).fill = freq_fill(cnt)
ws1.cell(r+2+i, 2).font = freq_font(cnt)
ws1.cell(r+2+i, 2).alignment = align()
ws1.cell(r+2+i, 2).border = border_thin()
ws1.cell(r+2+i, 3, paper).fill = freq_fill(cnt)
ws1.cell(r+2+i, 3).font = freq_font(cnt)
ws1.cell(r+2+i, 3).alignment = align("center", wrap=False)
ws1.cell(r+2+i, 3).border = border_thin()
ws1.cell(r+2+i, 4, cnt).fill = freq_fill(cnt)
ws1.cell(r+2+i, 4).font = freq_font(cnt)
ws1.cell(r+2+i, 4).alignment = align("center", wrap=False)
ws1.cell(r+2+i, 4).border = border_thin()
# row heights
for row_num in range(r+2, r+2+len(top20)):
ws1.row_dimensions[row_num].height = 18
# ══════════════════════════════════════════════════════════════════
# SHEET 2 – PAPER I FULL ANALYSIS
# ══════════════════════════════════════════════════════════════════
ws2 = wb.create_sheet("Paper I – Fundamentals")
ws2.sheet_view.showGridLines = False
ws2.column_dimensions["A"].width = 6
ws2.column_dimensions["B"].width = 30
ws2.column_dimensions["C"].width = 52
ws2.column_dimensions["D"].width = 30
ws2.column_dimensions["E"].width = 12
ws2.merge_cells("A1:E1")
c = ws2["A1"]
c.value = "PAPER I – FUNDAMENTALS OF SHALYA TANTRA | Topic-wise PYQ Frequency"
c.fill = hfill(C_PAPER1_HDR); c.font = ft(bold=True, size=13)
c.alignment = align("center", wrap=False)
ws2.row_dimensions[1].height = 30
write_header_row(ws2, 2, ["T#", "Topic Name", "Important Question", "Years Asked", "Count"], C_HEADER_DARK)
ws2.row_dimensions[2].height = 20
paper1_data = [
# T#, Topic Name, Question, Years, Count
("1", "Introduction to Shalya Tantra", "Define Shalya & Shalyatantra, write its importance", "2017,2018,2019,2020,2023,2024", 6),
("1", "Introduction to Shalya Tantra", "Importance of Shalyatantra in Ashtanga Ayurveda", "2019,2021,2023,2026", 4),
("1", "Introduction to Shalya Tantra", "Chronological development of surgery / Sushruta's contribution", "2022", 1),
("2", "Yantra & Shastra", "Yantra – definition, types, Guna, Dosha, Karma", "2017,2019,2023,2024,2025,2026", 6),
("2", "Yantra & Shastra", "Ashtavidha Shastra Karma – names and types", "2018,2020,2023,2024", 4),
("2", "Yantra & Shastra", "Nadiyantra – description and uses", "2019,2024,2025", 3),
("2", "Yantra & Shastra", "Guna, Dosha of Shastra", "2018", 1),
("3", "Nirjantukarana (Sterilization)", "Define Sterilization, enlist methods", "2020,2021,2023,2024,2025,2026", 6),
("3", "Nirjantukarana (Sterilization)", "Autoclave method in detail", "2016,2022,2023,2024,2025", 5),
("3", "Nirjantukarana (Sterilization)", "Physical methods of sterilization", "2022,2023", 2),
("4", "Sangyaharana (Anaesthesia)", "Spinal / Regional Anaesthesia in detail", "2019,2020,2021,2022,2023,2026", 6),
("4", "Sangyaharana (Anaesthesia)", "Pudendal nerve block", "2023,2025", 2),
("4", "Sangyaharana (Anaesthesia)", "General Anaesthesia – types, description", "2017", 1),
("4", "Sangyaharana (Anaesthesia)", "Local Anaesthesia – drugs, techniques, indications", "2023", 1),
("5", "Trividha Karma", "Explain Trividha Karma in detail", "2019,2020,2021,2025", 4),
("5", "Trividha Karma", "Yogya for Ashtavidha Shastrakarma", "2016,2025", 2),
("6", "Shastra Karma", "Ashtavidha Shastra Karma in detail", "2020,2023", 2),
("6", "Shastra Karma", "Types of Seevana Karma with diagram", "2023,2024", 2),
("7", "Yogya (Surgical Training)", "Importance of Yogya / Short note on Yogya", "2018,2019,2021", 3),
("8", "Marma (Vital Points)", "Importance of Marma in surgery + types + Viddha Lakshana", "2016,17,18,19,21,22,23,24,25", 9),
("8", "Marma (Vital Points)", "Marmaghata Chikitsa", "2023,2025", 2),
("8", "Marma (Vital Points)", "Talahridaya / Indrabasti Marmaghata", "2021,2024", 2),
("9", "Kshara Karma", "Ksharasutra preparation method (with diagram)", "2016,17,18,19,23,24,25", 7),
("9", "Kshara Karma", "Kshara – Guna, Dosha, Prakara, Pradhanyata", "2017,2018,2019,2023,2025", 5),
("9", "Kshara Karma", "Kshara Karma in detail", "2020,2021,2023,2025", 4),
("9", "Kshara Karma", "Pratisaraniya Kshara preparation method", "2017,2021", 2),
("10", "Agnikarma", "Agnikarma – types, indications, Samyak/Asamyak Dagdha Lakshana", "2016,17,18,19,20,23,24", 7),
("10", "Agnikarma", "Upakarana for Agnikarma / Dahana Upakaranani", "2021,2025", 2),
("11", "Raktamokshana", "Raktamokshana – types, indications, procedures", "2017,2019,2021,2024,2026", 5),
("11", "Raktamokshana", "Jaloukavacharana – complete method", "2017,2021,2026", 3),
("11", "Raktamokshana", "Raktastambhaka Upaya", "2018,2020,2026", 3),
("11", "Raktamokshana", "Nirvisha Jalauka – names", "2018,2023,2025", 3),
("12", "Bandha Vidhi", "Importance / indications / types of Bandha Vidhi", "2016,2017,2019,2025", 4),
("12", "Bandha Vidhi", "Types of Bandages with figure/diagram", "2016,2017,2018", 3),
("13", "Pranashta Shalya", "Pranashta Shalya – definition, identification, management", "2017,19,21,23,25,26", 6),
("13", "Pranashta Shalya", "Nirharana Upaya of Pranashta Shalya", "2017,2019,2024", 3),
("14", "Fluid, Electrolyte, Acid-Base", "Acidosis and Alkalosis – symptomatology, management", "2023,2025", 2),
("14", "Fluid, Electrolyte, Acid-Base", "Parenteral Nutrition / IV fluid types", "2021,2025", 2),
("14", "Fluid, Electrolyte, Acid-Base", "Electrolyte changes in anuria/obstruction", "2017,2023", 2),
("15", "Rakta (Blood)", "Blood Transfusion – method, importance, complications", "2018,19,21,22,24", 5),
("15", "Rakta (Blood)", "Rakta Mahatva + types and management of Haemorrhage", "2025", 1),
("16", "Emergency Medicines", "Role of antibiotics in surgery", "2019,2025", 2),
("16", "Emergency Medicines", "Importance of emergency drugs in surgical practice", "2016", 1),
("17", "Naidanik Vidhi (Diagnostics)", "USG – importance and diagnostic use", "2016,2022,2023", 3),
("17", "Naidanik Vidhi (Diagnostics)", "X-Ray – importance and diagnostic use in surgery", "2023,2025", 2),
("17", "Naidanik Vidhi (Diagnostics)", "CT Scan – importance in surgery", "2024", 1),
("17", "Naidanik Vidhi (Diagnostics)", "MRI – importance and diagnostic use", "2021,2022", 2),
("17", "Naidanik Vidhi (Diagnostics)", "Role of biopsy in surgery", "2021,2023", 2),
("18", "Shat Kriyakala", "Shatkriyakala – what is it / importance in surgery", "2020,2026", 2),
("18", "Shat Kriyakala", "Clinical utility of Shatkriyakala in Nadivrana", "2025", 1),
("19", "Samanya Vyadhi – Vidradhi", "Vidradhi – Nidana, Samprapti, Prakara, Lakshana, Chikitsa", "2017,19,20,21,24,26", 6),
("19", "Samanya Vyadhi – Burns", "Dagdha Vrana / Burns – types, classification, management", "2016,2019,2021,2025,2026", 5),
("19", "Samanya Vyadhi – Arbuda", "Arbuda – Nidana, Prakara, Samprapti, Chikitsa", "2019,2020,2021,2025", 4),
("19", "Samanya Vyadhi – Vranashotha", "Vranashotha / Inflammation – stages, types, treatment", "2018,2023,2024,2026", 4),
("19", "Samanya Vyadhi – Shock", "Shock – definition, classification, management (Hypovolemic)", "2024,2025,2026", 3),
("19", "Samanya Vyadhi – Gangrene", "Gangrene / Kotha – types, Gas gangrene", "2019,2022,2023", 3),
("19", "Samanya Vyadhi – Granthi", "Granthi / Cyst – types, treatment", "2021,2024,2025", 3),
("20", "Vrana (Wound/Ulcer)", "Sadyovrana – types, clinical features, treatment", "2018,2019,2021,2025", 4),
("20", "Vrana (Wound/Ulcer)", "Nija Vrana / Ulcer – types, clinical features, treatment", "2024,2025", 2),
("20", "Vrana (Wound/Ulcer)", "Vrana – definition, Pariksha, Upadravas", "2016,2024", 2),
("20", "Vrana (Wound/Ulcer)", "Shashti Upakrama – importance in Vrana Chikitsa", "2025", 1),
("21", "Kshudra Roga", "Paronychia / Chippa – symptoms and treatment", "2018,2020,2021", 3),
("21", "Kshudra Roga", "Ganglion – description", "2019,2020", 2),
("22", "Manya Vikara (Neck)", "Galaganda / Goitre – types and treatment", "2020,2021,2025", 3),
("22", "Manya Vikara (Neck)", "Gandamala vs Galaganda + sebaceous cyst treatment", "2016,2017", 2),
("23", "Sira Vikara (Venous)", "Varicose Vein – causes, symptoms, management", "2018,22,23,24,26", 5),
("23", "Sira Vikara (Venous)", "DVT (Deep Vein Thrombosis)", "2020,2022,2023", 3),
("24", "Dhamani Vikara (Arterial)", "Raynaud's Disease – causes, symptoms, management", "2019,2022,2024", 3),
("24", "Dhamani Vikara (Arterial)", "Atherosclerosis – causes, symptoms", "2019,2022,2025", 3),
("24", "Dhamani Vikara (Arterial)", "Buerger's Disease", "2023,2026", 2),
("25", "Snayu Vikara (Tendons)", "Amputation – principles, indications, classifications", "2018", 1),
("26", "AIDS-HIV & Hepatitis", "Precautions during surgery of HIV infected patient", "2023,2024,2025", 3),
]
for i, (tno, tname, question, years, cnt) in enumerate(paper1_data):
alt = (i % 2 == 0)
row = i + 3
ws2.cell(row, 1, tno).fill = freq_fill(cnt) if cnt >= 3 else hfill(C_ROW_ALT1 if alt else C_ROW_ALT2)
ws2.cell(row, 1).font = Font(name="Calibri", bold=(cnt>=7), color=BLACK, size=10)
ws2.cell(row, 1).alignment = align("center", wrap=False)
ws2.cell(row, 1).border = border_thin()
ws2.cell(row, 2, tname).fill = hfill(C_ROW_ALT1 if alt else C_ROW_ALT2)
ws2.cell(row, 2).font = Font(name="Calibri", size=10, color=BLACK)
ws2.cell(row, 2).alignment = align()
ws2.cell(row, 2).border = border_thin()
ws2.cell(row, 3, question).fill = freq_fill(cnt)
ws2.cell(row, 3).font = Font(name="Calibri", bold=(cnt>=7), size=10, color=BLACK)
ws2.cell(row, 3).alignment = align()
ws2.cell(row, 3).border = border_thin()
ws2.cell(row, 4, years).fill = hfill(C_ROW_ALT1 if alt else C_ROW_ALT2)
ws2.cell(row, 4).font = Font(name="Calibri", size=9, color="555555", italic=True)
ws2.cell(row, 4).alignment = align()
ws2.cell(row, 4).border = border_thin()
ws2.cell(row, 5, cnt).fill = freq_fill(cnt)
ws2.cell(row, 5).font = freq_font(cnt)
ws2.cell(row, 5).alignment = align("center", wrap=False)
ws2.cell(row, 5).border = border_thin()
ws2.row_dimensions[row].height = 18
# freeze panes
ws2.freeze_panes = "A3"
# ══════════════════════════════════════════════════════════════════
# SHEET 3 – PAPER II FULL ANALYSIS
# ══════════════════════════════════════════════════════════════════
ws3 = wb.create_sheet("Paper II – Chikitsa Siddhanta")
ws3.sheet_view.showGridLines = False
ws3.column_dimensions["A"].width = 6
ws3.column_dimensions["B"].width = 32
ws3.column_dimensions["C"].width = 52
ws3.column_dimensions["D"].width = 28
ws3.column_dimensions["E"].width = 12
ws3.merge_cells("A1:E1")
c = ws3["A1"]
c.value = "PAPER II – SHALYA TANTRA CHIKITSA SIDDHANTA | Topic-wise PYQ Frequency"
c.fill = hfill(C_PAPER2_HDR); c.font = ft(bold=True, size=13)
c.alignment = align("center", wrap=False)
ws3.row_dimensions[1].height = 30
write_header_row(ws3, 2, ["T#", "Topic Name", "Important Question", "Years Asked", "Count"], "4A235A")
ws3.row_dimensions[2].height = 20
paper2_data = [
("27", "Bhagna (Skeletal Injuries)", "Kandabhagna (Fracture) – types, clinical features, treatment", "2019,2020,2021,2024", 4),
("27", "Bhagna (Skeletal Injuries)", "Sandhi Moksha (Dislocation) – types, Lakshana, Chikitsa", "2017,2021,2022,2023", 4),
("27", "Bhagna (Skeletal Injuries)", "Bhagna in detail – types, general management", "2018,2020,2022", 3),
("27", "Bhagna (Skeletal Injuries)", "Urvasthi Bhagna (Femur Fracture)", "2025", 1),
("27", "Bhagna (Skeletal Injuries)", "Humerus shaft fracture management", "2022", 1),
("28", "Asthi Sandhi Vikara", "Osteomyelitis (Asthi Vidradhi) – Aetiopathogenesis, management", "2018,2025", 2),
("28", "Asthi Sandhi Vikara", "Pott's Disease / Spinal Tuberculosis", "2022,2024,2025", 3),
("28", "Asthi Sandhi Vikara", "Ankylosing Spondylitis", "2020,2022", 2),
("29", "Shirobhighata (Head Injuries)", "Cranio-cerebral injuries – classification, management", "2023", 1),
("29", "Shirobhighata (Head Injuries)", "Chronic Subdural Haematoma", "2021,2026", 2),
("29", "Shirobhighata (Head Injuries)", "Acute Intra-cerebral Haematoma", "2018,2026", 2),
("30", "Kasheruka Vikara (Spine)", "Tuberculosis of Spine – Pott's Disease", "2022,2024,2025", 3),
("31", "Stana Roga (Breast)", "Stana Vidradhi (Breast Abscess) – clinical features, treatment", "2018,19,20,21,22,24,25", 7),
("31", "Stana Roga (Breast)", "Fibroadenoma of Breast", "2021,2023,2025", 3),
("31", "Stana Roga (Breast)", "Breast Carcinoma / Stana Arbuda", "2017,2021", 2),
("32", "Urah Vikara (Chest)", "Pleural Effusion – causes, complications", "2017,18,19,20,22,25", 6),
("32", "Urah Vikara (Chest)", "Pleurisy – symptoms and treatment", "2020", 1),
("33", "Anna Nalika Vikara (Oesophagus)", "Oesophageal Varices – description, management", "2019,21,22,23,25", 5),
("33", "Anna Nalika Vikara (Oesophagus)", "Oesophagitis – causes and symptoms", "2017,18,19,20,22", 5),
("33", "Anna Nalika Vikara (Oesophagus)", "Congenital anomalies of Oesophagus", "2022,2025", 2),
("34", "Gulma Roga", "Gulma – Sthana and types", "2017,2020,2024", 3),
("35", "Shoola Vyadhi (Acute Abdomen)", "Acute Abdomen – definition, symptoms, nomenclature", "2017,2022,2023,2026", 4),
("36", "Udara Roga", "Baddhagudodara (Intestinal Obstruction)", "2018,2021,2024,2025,2026", 5),
("36", "Udara Roga", "Jalodara (Ascites) – causes, clinical features, management", "2019,2022,2024,2025", 4),
("36", "Udara Roga", "Pleehodara / Splenomegaly", "2018,2019,2022,2025", 4),
("36", "Udara Roga", "Peritonitis – causes, diagnosis, management", "2017,2023,2026", 3),
("37", "Aamashaya Vikara (Stomach/Duodenum)", "Pyloric Stenosis – causes, symptoms, treatment", "2017,18,20,22,24,25", 6),
("37", "Aamashaya Vikara (Stomach/Duodenum)", "Peptic Ulcer – etiopathogenesis, management", "2017,19,22,24,25", 5),
("37", "Aamashaya Vikara (Stomach/Duodenum)", "Hematemesis – causes; Gastric vs Duodenal ulcer", "2021,2026", 2),
("38", "Kshudrantra Vikara (Small Intestine)", "Chhidrodara / Intestinal Perforation – causes, management", "2018,19,21,23,25,26", 6),
("38", "Kshudrantra Vikara (Small Intestine)", "Intestinal Obstruction – types, management", "2018,2022,2024,2025", 4),
("38", "Kshudrantra Vikara (Small Intestine)", "Volvulus – definition, types", "2017,2018,2022,2024", 4),
("38", "Kshudrantra Vikara (Small Intestine)", "Crohn's Disease – difference from UC, management", "2019,20,22,23,24", 5),
("38", "Kshudrantra Vikara (Small Intestine)", "Ulcerative Colitis – causes, symptoms, management", "2019,2021,2022,2023,2024", 5),
("38", "Kshudrantra Vikara (Small Intestine)", "Intussusception", "2017,2020,2023", 3),
("39", "Brihadantra Vikara (Large Intestine)", "Appendicitis – pathophysiology, clinical features, management", "2017,18,19,21,22,24,25", 7),
("40", "Guda Vikara (Ano-rectum)", "Bhagandara (Fistula in Ano) – types, diagnosis, management", "2018,21,23,25,26", 5),
("40", "Guda Vikara (Ano-rectum)", "Parikartika (Fissure in Ano) – treatment, types", "2017,19,24,25,26", 5),
("40", "Guda Vikara (Ano-rectum)", "Arsha (Haemorrhoids) – types, Samprapti, Chikitsa", "2020,2022,2023,2024", 4),
("40", "Guda Vikara (Ano-rectum)", "Rectal Polyp", "2018,2019,2021,2024", 4),
("40", "Guda Vikara (Ano-rectum)", "Sanniruddha Guda / Anal Stricture", "2022,2024,2025", 3),
("40", "Guda Vikara (Ano-rectum)", "Gudabhramsha (Rectal Prolapse)", "2019,2025,2026", 3),
("42", "Yakrit Vikara (Liver)", "Liver Abscess (Yakrut Vidradhi) – etiology, management", "2019,2024,2025,2026", 4),
("42", "Yakrit Vikara (Liver)", "Portal Hypertension + Obstructive Jaundice", "2017,2021,2024,2026", 4),
("43", "Pittashaya Vikara (Gall Bladder)", "Cholecystitis – causes, symptoms, diagnosis, management", "2019,20,22,24,25", 5),
("43", "Pittashaya Vikara (Gall Bladder)", "Cholelithiasis / Gall Bladder Stones", "2018,2019", 2),
("44", "Agnyashaya Vikara (Pancreas)", "Pancreatitis – types, etiopathogenesis, management", "2019,2022,2023,2025", 4),
("44", "Agnyashaya Vikara (Pancreas)", "CA Pancreas – etiology, clinical features", "2021", 1),
("45", "Pleeha Vikara (Spleen)", "Pleehodara / Splenomegaly – description, management", "2017,2019,2021,2025", 4),
("45", "Pleeha Vikara (Spleen)", "Splenic Rupture / Injury – surgical management", "2018,2021,2025", 3),
("46", "Vrikka Vikara (Kidney/Ureter)", "Vrikka Ashmari (Renal Calculus) – types, management", "2017,2021,2023,2025", 4),
("46", "Vrikka Vikara (Kidney/Ureter)", "Hydronephrosis", "2018,2026", 2),
("46", "Vrikka Vikara (Kidney/Ureter)", "Polycystic Kidney Disease", "2019,2022", 2),
("46", "Vrikka Vikara (Kidney/Ureter)", "Congenital anomalies of Kidney", "2020,2021,2022", 3),
("47", "Mutrashaya Vikara (Bladder)", "Haematuria – causes + Hydronephrosis", "2017,2018,2024,2026", 4),
("48", "Mutraghata & Mutrakrichra", "Mutraghata – Nidana, Prakara, Lakshana, Chikitsa", "2018,21,23,24,26", 5),
("48", "Mutraghata & Mutrakrichra", "Mutrakrichra – types", "2018,2019", 2),
("49", "Paurusha Granthi (Prostate)", "BPH – etiopathology, symptoms, diagnosis, management", "2017,19,20,22,23,24,26", 7),
("49", "Paurusha Granthi (Prostate)", "CA Prostate – clinical features, management", "2020", 1),
("50", "Mutramarga Vikara (Urethra)", "Urethritis – symptoms", "2018,2019,2020,2023", 4),
("50", "Mutramarga Vikara (Urethra)", "Urethral Stricture – causes, symptoms", "2020,2023,2026", 3),
("50", "Mutramarga Vikara (Urethra)", "Urethral Rupture / Injury", "2019,2023,2026", 3),
("51", "Medhra Vikara (Penis)", "Niruddha Prakasha (Phimosis) – symptoms, treatment", "2016,2021,2022", 3),
("51", "Medhra Vikara (Penis)", "Paraphimosis / Parivartika", "2023,2025", 2),
("52", "Mushka & Vrishan (Scrotum/Testis)", "Scrotal Filariasis", "2018,2024", 2),
("52", "Mushka & Vrishan (Scrotum/Testis)", "Torsion of Testis", "2025", 1),
("53", "Vriddhi Roga", "Hydrocele / Mutravriddhi – types, Ayurvedic treatment", "2018,2021,2022,2025", 4),
("53", "Vriddhi Roga", "Types of Vriddhi", "2017,2018,2021", 3),
("54", "Antravriddhi (Hernia)", "Inguinal Hernia – types, clinical features, management", "2018,2019,2020,2023,2025", 5),
("54", "Antravriddhi (Hernia)", "Femoral Hernia", "2024,2026", 2),
("54", "Antravriddhi (Hernia)", "Umbilical Hernia", "2018,2021,2022", 3),
("54", "Antravriddhi (Hernia)", "Incisional Hernia – causes, management", "2018,2022", 2),
]
for i, (tno, tname, question, years, cnt) in enumerate(paper2_data):
alt = (i % 2 == 0)
row = i + 3
ws3.cell(row, 1, tno).fill = freq_fill(cnt) if cnt >= 3 else hfill(C_ROW_ALT1 if alt else C_ROW_ALT2)
ws3.cell(row, 1).font = Font(name="Calibri", bold=(cnt>=7), color=BLACK, size=10)
ws3.cell(row, 1).alignment = align("center", wrap=False)
ws3.cell(row, 1).border = border_thin()
ws3.cell(row, 2, tname).fill = hfill(C_ROW_ALT1 if alt else C_ROW_ALT2)
ws3.cell(row, 2).font = Font(name="Calibri", size=10, color=BLACK)
ws3.cell(row, 2).alignment = align()
ws3.cell(row, 2).border = border_thin()
ws3.cell(row, 3, question).fill = freq_fill(cnt)
ws3.cell(row, 3).font = Font(name="Calibri", bold=(cnt>=7), size=10, color=BLACK)
ws3.cell(row, 3).alignment = align()
ws3.cell(row, 3).border = border_thin()
ws3.cell(row, 4, years).fill = hfill(C_ROW_ALT1 if alt else C_ROW_ALT2)
ws3.cell(row, 4).font = Font(name="Calibri", size=9, color="555555", italic=True)
ws3.cell(row, 4).alignment = align()
ws3.cell(row, 4).border = border_thin()
ws3.cell(row, 5, cnt).fill = freq_fill(cnt)
ws3.cell(row, 5).font = freq_font(cnt)
ws3.cell(row, 5).alignment = align("center", wrap=False)
ws3.cell(row, 5).border = border_thin()
ws3.row_dimensions[row].height = 18
ws3.freeze_panes = "A3"
# ══════════════════════════════════════════════════════════════════
# SHEET 4 – QUICK REVISION CHECKLIST
# ══════════════════════════════════════════════════════════════════
ws4 = wb.create_sheet("Quick Revision Checklist")
ws4.sheet_view.showGridLines = False
ws4.column_dimensions["A"].width = 6
ws4.column_dimensions["B"].width = 10
ws4.column_dimensions["C"].width = 50
ws4.column_dimensions["D"].width = 14
ws4.column_dimensions["E"].width = 16
ws4.merge_cells("A1:E1")
c = ws4["A1"]
c.value = "QUICK REVISION CHECKLIST – Shalya Tantra PYQ Top Questions (Tick when revised ✓)"
c.fill = hfill(C_RED_HDR); c.font = ft(bold=True, size=13)
c.alignment = align("center", wrap=False)
ws4.row_dimensions[1].height = 30
# Paper I section
ws4.merge_cells("A2:E2")
c = ws4.cell(2, 1, "PAPER I – FUNDAMENTALS OF SHALYA TANTRA")
c.fill = hfill(C_PAPER1_HDR); c.font = ft(bold=True, size=12)
c.alignment = align("center")
ws4.row_dimensions[2].height = 22
write_header_row(ws4, 3, ["✓", "Topic#", "Question to Prepare", "Frequency", "Priority"], C_HEADER_DARK)
ws4.row_dimensions[3].height = 18
p1_checklist = [
("8", "Marma – importance in surgery, types, Viddha Lakshana", "9×", "🔴 CRITICAL"),
("9", "Ksharasutra preparation method (with diagram)", "7×", "🟠 VERY HIGH"),
("10", "Agnikarma – types, indications, Samyak/Asamyak Dagdha Lakshana", "7×", "🟠 VERY HIGH"),
("19", "Vidradhi – Nidana, Samprapti, Prakara, Lakshana, Chikitsa", "6×", "🟠 VERY HIGH"),
("13", "Pranashta Shalya – definition, identification, Nirharana Upaya", "6×", "🟠 VERY HIGH"),
("4", "Spinal Anaesthesia – technique, indications, contraindications", "6×", "🟠 VERY HIGH"),
("3", "Sterilization – definition, methods, Autoclave", "6×", "🟠 VERY HIGH"),
("2", "Yantra – definition, types, Guna, Dosha", "6×", "🟠 VERY HIGH"),
("1", "Define Shalya & Shalyatantra, importance", "6×", "🟠 VERY HIGH"),
("9", "Kshara – Guna, Dosha, Prakara, Pradhanyata", "5×", "🟡 HIGH"),
("11", "Raktamokshana – types, indications, Jaloukavacharana", "5×", "🟡 HIGH"),
("15", "Blood Transfusion – method, importance, complications", "5×", "🟡 HIGH"),
("23", "Varicose Vein – causes, symptoms, management", "5×", "🟡 HIGH"),
("19", "Burns/Dagdha Vrana – types, classification, management", "5×", "🟡 HIGH"),
("9", "Kshara Karma in detail", "4×", "🟡 HIGH"),
("5", "Trividha Karma – explain in detail", "4×", "🟡 HIGH"),
("19", "Arbuda – Nidana, Prakara, Samprapti, Chikitsa", "4×", "🟡 HIGH"),
("19", "Vranashotha/Inflammation – stages, types, general treatment", "4×", "🟡 HIGH"),
("12", "Bandha Vidhi – importance, indications, types", "4×", "🟡 HIGH"),
("20", "Sadyovrana – types, clinical features, treatment", "4×", "🟡 HIGH"),
("11", "Jaloukavacharana – complete method", "3×", "🟢 MODERATE"),
("11", "Raktastambhaka Upaya", "3×", "🟢 MODERATE"),
("23", "DVT (Deep Vein Thrombosis)", "3×", "🟢 MODERATE"),
("24", "Raynaud's Disease", "3×", "🟢 MODERATE"),
("24", "Atherosclerosis", "3×", "🟢 MODERATE"),
("17", "USG – importance and diagnostic use", "3×", "🟢 MODERATE"),
("26", "Precautions during surgery of HIV infected patient", "3×", "🟢 MODERATE"),
("19", "Shock – definition, classification, management", "3×", "🟢 MODERATE"),
("19", "Gangrene/Kotha – types, Gas gangrene", "3×", "🟢 MODERATE"),
("7", "Importance of Yogya", "3×", "🟢 MODERATE"),
]
for i, (tno, question, freq, priority) in enumerate(p1_checklist):
row = 4 + i
alt = (i % 2 == 0)
bg = C_ROW_ALT1 if alt else C_ROW_ALT2
ws4.cell(row, 1, "□").fill = hfill(bg)
ws4.cell(row, 1).font = Font(name="Calibri", size=14, color="2196F3")
ws4.cell(row, 1).alignment = align("center", wrap=False)
ws4.cell(row, 1).border = border_thin()
ws4.cell(row, 2, tno).fill = hfill(bg)
ws4.cell(row, 2).font = Font(name="Calibri", size=10, bold=True, color=BLACK)
ws4.cell(row, 2).alignment = align("center", wrap=False)
ws4.cell(row, 2).border = border_thin()
ws4.cell(row, 3, question).fill = hfill(bg)
ws4.cell(row, 3).font = Font(name="Calibri", size=10, color=BLACK)
ws4.cell(row, 3).alignment = align()
ws4.cell(row, 3).border = border_thin()
ws4.cell(row, 4, freq).fill = hfill(bg)
ws4.cell(row, 4).font = Font(name="Calibri", size=10, bold=True, color=BLACK)
ws4.cell(row, 4).alignment = align("center", wrap=False)
ws4.cell(row, 4).border = border_thin()
ws4.cell(row, 5, priority).fill = hfill(bg)
ws4.cell(row, 5).font = Font(name="Calibri", size=10, color=BLACK)
ws4.cell(row, 5).alignment = align("center", wrap=False)
ws4.cell(row, 5).border = border_thin()
ws4.row_dimensions[row].height = 16
next_r = 4 + len(p1_checklist) + 1
# Paper II section header
ws4.merge_cells(f"A{next_r}:E{next_r}")
c = ws4.cell(next_r, 1, "PAPER II – SHALYA TANTRA CHIKITSA SIDDHANTA")
c.fill = hfill(C_PAPER2_HDR); c.font = ft(bold=True, size=12)
c.alignment = align("center")
ws4.row_dimensions[next_r].height = 22
write_header_row(ws4, next_r+1, ["✓", "Topic#", "Question to Prepare", "Frequency", "Priority"], "4A235A")
ws4.row_dimensions[next_r+1].height = 18
p2_checklist = [
("39", "Appendicitis – pathophysiology, clinical features, management", "7×", "🔴 CRITICAL"),
("31", "Stana Vidradhi (Breast Abscess) – clinical features & treatment", "7×", "🔴 CRITICAL"),
("49", "BPH – etiopathology, symptoms, diagnosis, management", "7×", "🔴 CRITICAL"),
("38", "Chhidrodara (Intestinal Perforation) – causes, symptoms, management", "6×", "🟠 VERY HIGH"),
("37", "Pyloric Stenosis – causes, symptoms, treatment", "6×", "🟠 VERY HIGH"),
("32", "Pleural Effusion – causes, complications", "6×", "🟠 VERY HIGH"),
("40", "Bhagandara (Fistula in Ano) – types, diagnosis, management", "5×", "🟡 HIGH"),
("40", "Parikartika (Fissure in Ano) – types, treatment", "5×", "🟡 HIGH"),
("33", "Oesophageal Varices – description, management", "5×", "🟡 HIGH"),
("33", "Oesophagitis – causes, symptoms", "5×", "🟡 HIGH"),
("37", "Peptic Ulcer – etiopathogenesis, clinical features, management", "5×", "🟡 HIGH"),
("43", "Cholecystitis – causes, symptoms, diagnosis, management", "5×", "🟡 HIGH"),
("38", "Ulcerative Colitis – causes, symptoms, management", "5×", "🟡 HIGH"),
("38", "Crohn's Disease – difference from UC, management", "5×", "🟡 HIGH"),
("48", "Mutraghata – Nidana, Prakara, Lakshana, Chikitsa", "5×", "🟡 HIGH"),
("54", "Inguinal Hernia – types, clinical features, management", "5×", "🟡 HIGH"),
("36", "Baddhagudodara (Intestinal Obstruction)", "5×", "🟡 HIGH"),
("27", "Kandabhagna (Fracture) – types, clinical features, treatment", "4×", "🟡 HIGH"),
("27", "Sandhi Moksha (Dislocation) – types, Lakshana, Chikitsa", "4×", "🟡 HIGH"),
("36", "Jalodara (Ascites) – causes, clinical features, management", "4×", "🟡 HIGH"),
("36", "Pleehodara / Splenomegaly", "4×", "🟡 HIGH"),
("40", "Arsha (Haemorrhoids) – types, Samprapti, Chikitsa", "4×", "🟡 HIGH"),
("40", "Rectal Polyp", "4×", "🟡 HIGH"),
("42", "Liver Abscess (Yakrut Vidradhi) – etiology, management", "4×", "🟡 HIGH"),
("42", "Portal Hypertension + Obstructive Jaundice", "4×", "🟡 HIGH"),
("44", "Pancreatitis – types, etiopathogenesis, management", "4×", "🟡 HIGH"),
("45", "Pleeha Abhighata / Splenomegaly – management", "4×", "🟡 HIGH"),
("46", "Vrikka Ashmari (Renal Calculus) – types, management", "4×", "🟡 HIGH"),
("47", "Haematuria – causes; Hydronephrosis", "4×", "🟡 HIGH"),
("53", "Hydrocele / Mutravriddhi – types, treatment", "4×", "🟡 HIGH"),
("35", "Acute Abdomen – definition, symptoms, nomenclature", "4×", "🟡 HIGH"),
("50", "Urethritis – symptoms and management", "4×", "🟡 HIGH"),
("31", "Fibroadenoma of Breast", "3×", "🟢 MODERATE"),
("28", "Pott's Disease / Spinal TB", "3×", "🟢 MODERATE"),
("34", "Gulma – Sthana and types", "3×", "🟢 MODERATE"),
("36", "Peritonitis – causes, diagnosis, management", "3×", "🟢 MODERATE"),
("38", "Volvulus – definition, types", "4×", "🟡 HIGH"),
("38", "Intussusception", "3×", "🟢 MODERATE"),
("40", "Sanniruddha Guda / Anal Stricture", "3×", "🟢 MODERATE"),
("40", "Gudabhramsha (Rectal Prolapse)", "3×", "🟢 MODERATE"),
("45", "Splenic Rupture – surgical management", "3×", "🟢 MODERATE"),
("46", "Congenital anomalies of Kidney", "3×", "🟢 MODERATE"),
("50", "Urethral Stricture / Urethral Rupture", "3×", "🟢 MODERATE"),
("51", "Phimosis (Niruddha Prakasha)", "3×", "🟢 MODERATE"),
("53", "Types of Vriddhi", "3×", "🟢 MODERATE"),
("54", "Umbilical Hernia", "3×", "🟢 MODERATE"),
]
for i, (tno, question, freq, priority) in enumerate(p2_checklist):
row = next_r + 2 + i
alt = (i % 2 == 0)
bg = C_ROW_ALT1 if alt else C_ROW_ALT2
ws4.cell(row, 1, "□").fill = hfill(bg)
ws4.cell(row, 1).font = Font(name="Calibri", size=14, color="7B2D8B")
ws4.cell(row, 1).alignment = align("center", wrap=False)
ws4.cell(row, 1).border = border_thin()
ws4.cell(row, 2, tno).fill = hfill(bg)
ws4.cell(row, 2).font = Font(name="Calibri", size=10, bold=True, color=BLACK)
ws4.cell(row, 2).alignment = align("center", wrap=False)
ws4.cell(row, 2).border = border_thin()
ws4.cell(row, 3, question).fill = hfill(bg)
ws4.cell(row, 3).font = Font(name="Calibri", size=10, color=BLACK)
ws4.cell(row, 3).alignment = align()
ws4.cell(row, 3).border = border_thin()
ws4.cell(row, 4, freq).fill = hfill(bg)
ws4.cell(row, 4).font = Font(name="Calibri", size=10, bold=True, color=BLACK)
ws4.cell(row, 4).alignment = align("center", wrap=False)
ws4.cell(row, 4).border = border_thin()
ws4.cell(row, 5, priority).fill = hfill(bg)
ws4.cell(row, 5).font = Font(name="Calibri", size=10, color=BLACK)
ws4.cell(row, 5).alignment = align("center", wrap=False)
ws4.cell(row, 5).border = border_thin()
ws4.row_dimensions[row].height = 16
ws4.freeze_panes = "A4"
# ══════════════════════════════════════════════════════════════════
# SHEET 5 – YEAR-WISE PAPER TRACKER
# ══════════════════════════════════════════════════════════════════
ws5 = wb.create_sheet("Year-wise Paper Tracker")
ws5.sheet_view.showGridLines = False
ws5.column_dimensions["A"].width = 12
ws5.column_dimensions["B"].width = 12
ws5.column_dimensions["C"].width = 55
ws5.column_dimensions["D"].width = 14
ws5.merge_cells("A1:D1")
c = ws5["A1"]
c.value = "YEAR-WISE EXAM PAPER TRACKER – GAU BAMS 4th Professional Shalya Tantra"
c.fill = hfill(C_HEADER_DARK); c.font = ft(bold=True, size=13)
c.alignment = align("center", wrap=False)
ws5.row_dimensions[1].height = 28
write_header_row(ws5, 2, ["Year", "Paper", "Q1 (LAQ – 10 Marks)", "Pattern"], C_HEADER_DARK)
year_data = [
("Sep 2025", "Paper I", "Bandha Vidhi – importance, indications, types with diagram", "LAQ"),
("Sep 2025", "Paper II", "Abdominal Injuries – causes, types, clinical features, treatment", "LAQ"),
("Mar 2026", "Paper I", "Raktamokshana – types; Jaloukavacharana complete method", "LAQ"),
("Mar 2026", "Paper II", "Bhagandara (Fistula in Ano) – classification, symptoms, management", "LAQ"),
("Mar 2025", "Paper I", "Bhagandara – causes, types, clinical features, management", "LAQ"),
("Mar 2025", "Paper II", "Urvasthi Bhagna (Femur Fracture) – detail with management", "LAQ"),
("Sep 2024", "Paper I", "Agnikarma – indications, types, Samyak/Asamyak Dagdha Lakshana", "LAQ"),
("Sep 2024", "Paper II", "Kandabhagna (Fracture) – types, clinical features, treatment", "LAQ"),
("Apr 2024", "Paper I", "Seevana Karma (Suturing) – nomenclature, Ayurveda & modern view", "LAQ"),
("Apr 2024", "Paper II", "Appendicitis – pathophysiology, causes, clinical features, management", "LAQ"),
("Oct 2023", "Paper I", "Importance of Shalyatantra + symptoms of Pranashta Shalya", "LAQ"),
("Oct 2023", "Paper II", "Sandhi Moksha (Dislocation) – types, clinical features, treatment", "LAQ"),
("Mar 2023", "Paper I", "Kshara Karma – types, guna, importance in Shalya Tantra", "LAQ"),
("Mar 2023", "Paper II", "Arsha – Ayurveda and modern point of view", "LAQ"),
("Sep 2022", "Paper I", "Vrana (Ulcer) – definition; Ayurveda & modern view", "LAQ"),
("Sep 2022", "Paper II", "Arsha – types (Ayurveda & modern), surgical treatment", "LAQ"),
("Mar 2022", "Paper I", "Shalya Tantra – definition, chronological development", "LAQ"),
("Mar 2022", "Paper II", "Breast Abscess – clinical features, diagnosis, management", "LAQ"),
("Jul 2021", "Paper I", "Raktamokshana – types, indications, contraindications, procedure", "LAQ"),
("Jul 2021", "Paper II", "Stana Vidradhi (Breast Abscess) – Ayurveda and modern view", "LAQ"),
("Feb 2021", "Paper I", "Anaesthesia – importance, complications; Spinal anaesthesia", "LAQ"),
("Feb 2021", "Paper II", "Udara Roga – causes, types; Baddhagudodara in detail", "LAQ"),
("Sep 2020", "Paper I", "Kshara Karma in detail", "LAQ"),
("Sep 2020", "Paper II", "Arsha – definition, types, symptoms, treatment", "LAQ"),
("Nov 2019", "Paper I", "Kshara – Nirukti, Guna, Dosha, types; importance", "LAQ"),
("Nov 2019", "Paper II", "Ulcerative Colitis in detail", "LAQ"),
("May 2019", "Paper I", "Raktamokshana in detail", "LAQ"),
("May 2019", "Paper II", "Acute Appendicitis in detail", "LAQ"),
("Nov 2018", "Paper I", "Agnikarma – importance, indications, types", "LAQ"),
("Oct 2018", "Paper II", "Bhagna (Fracture) in detail", "LAQ"),
("May 2018", "Paper I", "Kshara – Guna, Dosha; Ksharasutra preparation method", "LAQ"),
("May 2018", "Paper II", "Bhagandara – definition, types, symptoms; Ksharasutra Chikitsa", "LAQ"),
("Nov 2017", "Paper I", "Yantra – definition, sterilization method, general uses", "LAQ"),
("Nov 2017", "Paper II", "Arsha – Nirukti, types; treatment of Parikartika", "LAQ"),
("May 2017", "Paper I", "Raktamokshana – types; Siravedha in detail", "LAQ"),
("May 2017", "Paper II", "Bhagandara – causes of incontinence; treatment of Fistula in ano", "LAQ"),
("Oct 2016", "Paper I", "Agnikarma – importance, indications, period, types", "LAQ"),
]
for i, (year, paper, q, ptype) in enumerate(year_data):
row = 3 + i
alt = (i % 2 == 0)
bg = C_ROW_ALT1 if alt else C_ROW_ALT2
for col, val in enumerate([year, paper, q, ptype], 1):
c2 = ws5.cell(row, col, val)
c2.fill = hfill(bg)
c2.font = Font(name="Calibri", size=10, color=BLACK)
c2.alignment = align("center" if col in [1,2,4] else "left")
c2.border = border_thin()
ws5.row_dimensions[row].height = 16
ws5.freeze_panes = "A3"
# ══════════════════════════════════════════════════════════════════
# SAVE
# ══════════════════════════════════════════════════════════════════
out_path = "/home/daytona/workspace/shalya-pyq/Shalya_Tantra_PYQ_Analysis.xlsx"
wb.save(out_path)
print(f"Saved: {out_path}")
cd /home/daytona/workspace/shalya-pyq && python3 build_excel.py
ls -la /home/daytona/workspace/shalya-pyq/ && df -h /home/daytona/workspace/
# Save to /tmp first then copy to workspace (S3 mount has issues with openpyxl's seek) cd /home/daytona/workspace/shalya-pyq && python3 -c " import sys sys.path.insert(0, '.') # patch the save path to /tmp exec(open('build_excel.py').read().replace( '\"/home/daytona/workspace/shalya-pyq/Shalya_Tantra_PYQ_Analysis.xlsx\"', '\"/tmp/Shalya_Tantra_PYQ_Analysis.xlsx\"' )) " && cp /tmp/Shalya_Tantra_PYQ_Analysis.xlsx /home/daytona/workspace/shalya-pyq/Shalya_Tantra_PYQ_Analysis.xlsx && echo "Done" && ls -lh /home/daytona/workspace/shalya-pyq/
python3 -c " from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.units import cm, mm from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable, PageBreak) from reportlab.lib.enums import TA_CENTER, TA_LEFT doc = SimpleDocTemplate( '/tmp/Shalya_Tantra_ImpQ_Guide.pdf', pagesize=A4, rightMargin=1.5*cm, leftMargin=1.5*cm, topMargin=1.8*cm, bottomMargin=1.8*cm ) # Colour palette NAVY = colors.HexColor('#1A3A5C') BLUE = colors.HexColor('#1F6DA8') PURPLE = colors.HexColor('#7B2D8B') RED = colors.HexColor('#C0392B') ORANGE = colors.HexColor('#E67E22') YELLOW = colors.HexColor('#F1C40F') GREEN = colors.HexColor('#27AE60') LGRAY = colors.HexColor('#ECF0F1') LRED = colors.HexColor('#FADBD8') LORANGE = colors.HexColor('#FDEBD0') LYELLOW = colors.HexColor('#FEF9E7') LGREEN = colors.HexColor('#EAFAF1') WHITE = colors.white BLACK = colors.black styles = getSampleStyleSheet() title_style = ParagraphStyle('title', fontName='Helvetica-Bold', fontSize=16, textColor=WHITE, alignment=TA_CENTER, spaceAfter=4) subtitle_style = ParagraphStyle('subtitle', fontName='Helvetica', fontSize=10, textColor=WHITE, alignment=TA_CENTER, spaceAfter=2) section_style = ParagraphStyle('section', fontName='Helvetica-Bold', fontSize=12, textColor=WHITE, alignment=TA_CENTER, spaceBefore=8, spaceAfter=4) body_style = ParagraphStyle('body', fontName='Helvetica', fontSize=9, textColor=BLACK, spaceAfter=2) bold_style = ParagraphStyle('bold', fontName='Helvetica-Bold', fontSize=9, textColor=BLACK, spaceAfter=2) note_style = ParagraphStyle('note', fontName='Helvetica-Oblique', fontSize=8, textColor=colors.HexColor('#555555')) def freq_color(n): if n >= 9: return LRED if n >= 7: return LORANGE if n >= 5: return LYELLOW if n >= 3: return LGREEN return WHITE def badge(n): if n >= 9: return '★★★★ CRITICAL' if n >= 7: return '★★★ VERY HIGH' if n >= 5: return '★★ HIGH' if n >= 3: return '★ MODERATE' return ' LOW' story = [] # ─── TITLE PAGE ─────────────────────────────────────────────────── title_table = Table([[Paragraph( 'SHALYA TANTRA', title_style)], [Paragraph('PYQ Topic-wise Analysis & Important Questions Guide', subtitle_style)], [Paragraph('BAMS 4th Professional | Gujarat Ayurved University | 2016–2026', subtitle_style)], [Paragraph('19 Exam Papers Analysed | 54 Syllabus Topics (NCISM) | Papers I & II', subtitle_style)], ], colWidths=[17*cm]) title_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), NAVY), ('TOPPADDING', (0,0), (-1,-1), 8), ('BOTTOMPADDING', (0,0), (-1,-1), 8), ('ROWBACKGROUNDS', (0,0), (-1,-1), [NAVY]), ])) story.append(title_table) story.append(Spacer(1, 0.4*cm)) # ─── LEGEND ─────────────────────────────────────────────────────── leg_data = [ ['COLOUR', 'FREQUENCY', 'MEANING'], ['★★★★ CRITICAL', '≥ 9 times', 'Prepare without fail – appears almost every year'], ['★★★ VERY HIGH', '7–8 times', 'High probability – always expected in exam'], ['★★ HIGH', '5–6 times', 'Very likely – ideal for LAQ/SAQ preparation'], ['★ MODERATE', '3–4 times', 'Frequently tested – prepare as SAQ/short note'], [' LOW', '1–2 times', 'May appear – prepare as very short answer'], ] leg_table = Table(leg_data, colWidths=[4*cm, 3*cm, 10*cm]) leg_table.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), ('BACKGROUND', (0,1), (-1,1), LRED), ('BACKGROUND', (0,2), (-1,2), LORANGE), ('BACKGROUND', (0,3), (-1,3), LYELLOW), ('BACKGROUND', (0,4), (-1,4), LGREEN), ('BACKGROUND', (0,5), (-1,5), WHITE), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#B0BEC5')), ('PADDING', (0,0), (-1,-1), 4), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ])) story.append(leg_table) story.append(Spacer(1, 0.5*cm)) # ─── PAPER I ────────────────────────────────────────────────────── p1_hdr = Table([[Paragraph('PAPER I – FUNDAMENTALS OF SHALYA TANTRA', section_style)]], colWidths=[17*cm]) p1_hdr.setStyle(TableStyle([('BACKGROUND', (0,0), (-1,-1), BLUE), ('TOPPADDING', (0,0), (-1,-1), 6), ('BOTTOMPADDING', (0,0), (-1,-1), 6)])) story.append(p1_hdr) story.append(Spacer(1, 0.2*cm)) p1_hdr2 = ['T#', 'Topic / Question to Prepare', 'Years', 'N', 'Priority'] p1_rows = [ (8, 'Marma – importance in surgery, types, Viddha Lakshana', '2016–25', 9), (9, 'Ksharasutra – preparation method with diagram', '2016–25', 7), (10, 'Agnikarma – types, indications, Samyak/Asamyak Dagdha Lakshana', '2016–24', 7), (19, 'Vidradhi – Nidana, Samprapti, Prakara, Lakshana, Chikitsa', '2017–26', 6), (13, 'Pranashta Shalya – definition, identification, Nirharana Upaya', '2017–26', 6), (4, 'Spinal Anaesthesia – technique, indications, contraindications', '2019–26', 6), (3, 'Sterilization – definition, methods; Autoclave in detail', '2020–26', 6), (2, 'Yantra – definition, types, Guna, Dosha', '2017–26', 6), (1, 'Define Shalya & Shalyatantra, write importance', '2017–24', 6), (9, 'Kshara – Guna, Dosha, Prakara, Pradhanyata', '2017–25', 5), (11, 'Raktamokshana – types, indications, Jaloukavacharana', '2017–26', 5), (15, 'Blood Transfusion – method, importance, complications', '2018–24', 5), (23, 'Varicose Vein – causes, symptoms, management', '2018–26', 5), (19, 'Burns/Dagdha Vrana – types, classification, management', '2016–26', 5), (9, 'Kshara Karma in detail', '2020–25', 4), (5, 'Trividha Karma in detail', '2019–25', 4), (19, 'Arbuda – Nidana, Prakara, Samprapti, Chikitsa', '2019–25', 4), (19, 'Vranashotha/Inflammation – stages, types, treatment', '2018–26', 4), (12, 'Bandha Vidhi – importance, indications, types', '2016–25', 4), (20, 'Sadyovrana – types, clinical features, treatment', '2018–25', 4), (11, 'Jaloukavacharana – complete method', '2017–26', 3), (11, 'Raktastambhaka Upaya', '2018–26', 3), (23, 'DVT – etiology, clinical features', '2020–23', 3), (24, 'Raynaud's Disease – causes, symptoms, management', '2019–24', 3), (17, 'USG – importance and diagnostic use in surgery', '2016–23', 3), (26, 'HIV – precautions during surgery of HIV/Hepatitis patients', '2023–25', 3), (19, 'Shock – definition, classification, Hypovolemic management', '2024–26', 3), (19, 'Gangrene/Kotha – types, Gas Gangrene', '2019–23', 3), ] p1_data = [p1_hdr2] for tno, q, yrs, n in p1_rows: p1_data.append([str(tno), q, yrs, str(n), badge(n)]) p1_table = Table(p1_data, colWidths=[1*cm, 9.5*cm, 2.5*cm, 1.2*cm, 2.8*cm]) p1_ts = [ ('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), ('GRID', (0,0), (-1,-1), 0.4, colors.HexColor('#CCCCCC')), ('PADDING', (0,0), (-1,-1), 3), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('ALIGN', (0,0), (0,-1), 'CENTER'), ('ALIGN', (2,0), (3,-1), 'CENTER'), ('ALIGN', (4,0), (4,-1), 'CENTER'), ] for i, (tno, q, yrs, n) in enumerate(p1_rows, 1): bg = freq_color(n) p1_ts.append(('BACKGROUND', (0,i), (-1,i), bg)) if n >= 7: p1_ts.append(('FONTNAME', (1,i), (1,i), 'Helvetica-Bold')) p1_table.setStyle(TableStyle(p1_ts)) story.append(p1_table) story.append(PageBreak()) # ─── PAPER II ───────────────────────────────────────────────────── p2_hdr = Table([[Paragraph('PAPER II – SHALYA TANTRA CHIKITSA SIDDHANTA', section_style)]], colWidths=[17*cm]) p2_hdr.setStyle(TableStyle([('BACKGROUND', (0,0), (-1,-1), PURPLE), ('TOPPADDING', (0,0), (-1,-1), 6), ('BOTTOMPADDING', (0,0), (-1,-1), 6)])) story.append(p2_hdr) story.append(Spacer(1, 0.2*cm)) p2_hdr2 = ['T#', 'Topic / Question to Prepare', 'Years', 'N', 'Priority'] p2_rows = [ (39, 'Appendicitis – pathophysiology, clinical features, management', '2017–25', 7), (31, 'Stana Vidradhi (Breast Abscess) – clinical features & treatment', '2018–25', 7), (49, 'BPH – etiopathology, symptoms, diagnosis, management', '2017–26', 7), (38, 'Chhidrodara (Intestinal Perforation) – causes, symptoms, management', '2018–26', 6), (37, 'Pyloric Stenosis – causes, symptoms, treatment', '2017–25', 6), (32, 'Pleural Effusion – causes, complications', '2017–25', 6), (40, 'Bhagandara (Fistula in Ano) – types, diagnosis, management', '2018–26', 5), (40, 'Parikartika (Fissure in Ano) – types, treatment', '2017–26', 5), (33, 'Oesophageal Varices – description, management', '2019–25', 5), (33, 'Oesophagitis – causes, symptoms', '2017–22', 5), (37, 'Peptic Ulcer – etiopathogenesis, management', '2017–25', 5), (43, 'Cholecystitis – causes, symptoms, diagnosis, management', '2019–25', 5), (38, 'Ulcerative Colitis – causes, symptoms, management', '2019–24', 5), (38, 'Crohn Disease – difference from UC, management', '2019–24', 5), (48, 'Mutraghata – Nidana, Prakara, Lakshana, Chikitsa', '2018–26', 5), (54, 'Inguinal Hernia – types, clinical features, management', '2018–25', 5), (36, 'Baddhagudodara (Intestinal Obstruction)', '2018–26', 5), (27, 'Kandabhagna (Fracture) – types, clinical features, treatment', '2019–24', 4), (27, 'Sandhi Moksha (Dislocation) – types, Lakshana, Chikitsa', '2017–23', 4), (36, 'Jalodara (Ascites) – causes, clinical features, management', '2019–25', 4), (36, 'Pleehodara / Splenomegaly', '2018–25', 4), (40, 'Arsha (Haemorrhoids) – types, Samprapti, Chikitsa', '2020–24', 4), (40, 'Rectal Polyp', '2018–24', 4), (42, 'Liver Abscess – etiology, management', '2019–26', 4), (42, 'Portal Hypertension + Obstructive Jaundice', '2017–26', 4), (44, 'Pancreatitis – types, etiopathogenesis, management', '2019–25', 4), (45, 'Splenomegaly / Pleeha Abhighata – management', '2017–25', 4), (46, 'Vrikka Ashmari (Renal Calculus) – types, management', '2017–25', 4), (47, 'Haematuria – causes; Hydronephrosis in detail', '2017–26', 4), (53, 'Hydrocele – types, Ayurvedic treatment', '2018–25', 4), (35, 'Acute Abdomen – definition, symptoms, nomenclature', '2017–26', 4), (50, 'Urethritis – symptoms and management', '2018–23', 4), (38, 'Volvulus – definition, types', '2017–24', 4), (28, 'Pott Disease / Spinal TB', '2022–25', 3), (38, 'Intussusception', '2017–23', 3), (40, 'Sanniruddha Guda / Anal Stricture', '2022–25', 3), (40, 'Gudabhramsha (Rectal Prolapse)', '2019–26', 3), (51, 'Phimosis (Niruddha Prakasha) – symptoms, treatment', '2016–22', 3), (54, 'Umbilical Hernia', '2018–22', 3), (46, 'Congenital anomalies of Kidney', '2020–22', 3), ] p2_data = [p2_hdr2] for tno, q, yrs, n in p2_rows: p2_data.append([str(tno), q, yrs, str(n), badge(n)]) p2_table = Table(p2_data, colWidths=[1*cm, 9.5*cm, 2.5*cm, 1.2*cm, 2.8*cm]) p2_ts = [ ('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), ('GRID', (0,0), (-1,-1), 0.4, colors.HexColor('#CCCCCC')), ('PADDING', (0,0), (-1,-1), 3), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('ALIGN', (0,0), (0,-1), 'CENTER'), ('ALIGN', (2,0), (3,-1), 'CENTER'), ('ALIGN', (4,0), (4,-1), 'CENTER'), ] for i, (tno, q, yrs, n) in enumerate(p2_rows, 1): bg = freq_color(n) p2_ts.append(('BACKGROUND', (0,i), (-1,i), bg)) if n >= 7: p2_ts.append(('FONTNAME', (1,i), (1,i), 'Helvetica-Bold')) p2_table.setStyle(TableStyle(p2_ts)) story.append(p2_table) story.append(Spacer(1, 0.3*cm)) # footer note story.append(Paragraph( 'Source: Gujarat Ayurved University (GAU) Jamnagar – 4th Professional BAMS Shalya Tantra PYQ papers 2016–2026 (19 papers). ' 'N = number of times the topic appeared as a question. Syllabus: NCISM III BAMS AYUG-ST (Topics 1-54).', note_style)) doc.build(story) print('PDF saved.') " && cp /tmp/Shalya_Tantra_ImpQ_Guide.pdf /home/daytona/workspace/shalya-pyq/ && echo "Copied" && ls -lh /home/daytona/workspace/shalya-pyq/