Firstly go through this qn pyq of my university
Can u make a chart in decreasing order of importance one column for topic one is subtopic one is for the qn came from it
mkdir -p /home/daytona/workspace/pyq-chart && ls /home/daytona/workspace/pyq-chaā¦
~/pyq-chart/build_chart.py
from openpyxl import Workbook
from openpyxl.styles import (Font, PatternFill, Alignment, Border, Side,
GradientFill)
from openpyxl.utils import get_column_letter
wb = Workbook()
ws = wb.active
ws.title = "PYQ Priority Chart"
# āāā Color palette āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
HEADER_BG = "1F4E79" # deep blue
HEADER_FG = "FFFFFF"
RANK1_BG = "C00000" # dark red ā must-do
RANK2_BG = "E36C09" # orange ā very important
RANK3_BG = "9BBB59" # green ā important
RANK4_BG = "4BACC6" # teal ā moderate
SUBHD_BG = "D9E1F2" # light blue for subtopic rows
ALT_BG = "F2F2F2" # light grey alternate
def cell_style(ws, row, col, value, bold=False, bg=None, fg="000000",
wrap=True, size=10, halign="left", valign="center", border=True):
c = ws.cell(row=row, column=col, value=value)
c.font = Font(name="Arial", bold=bold, color=fg, size=size)
if bg:
c.fill = PatternFill("solid", start_color=bg)
c.alignment = Alignment(horizontal=halign, vertical=valign, wrap_text=wrap)
if border:
thin = Side(style="thin", color="BFBFBF")
c.border = Border(left=thin, right=thin, top=thin, bottom=thin)
return c
# āāā DATA āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
# Each entry: (rank, topic, subtopic, questions_list, times_asked, years)
# Rank 1 = highest importance
data = [
# āāāāāāāāāā RANK 1 ā MOST REPEATED (5+ times) āāāāāāāāāā
(1, "Levels of Prevention & Natural History of Disease",
"Levels of Prevention (primary/secondary/tertiary/primordial)",
[
"Enumerate levels of prevention; apply to diabetes mellitus (2022 Supple P1)",
"Natural history of disease + stages + prevention application (2022 P1)",
"Differences between disease control, elimination, eradication; levels of prevention & modes of intervention (2019 Supple)",
"Primordial prevention is a subset of primary prevention ā E/W (2025 Supple P1, 2015 P2, 2020 P1)",
"Differences between primordial & primary prevention ā E/W (2020 P1)",
],
6, "2019ā2025"),
(1, "Levels of Prevention & Natural History of Disease",
"Natural History of Disease (stages, iceberg relation)",
[
"Natural history of disease ā stages + suitable illustration + prevention stages (2022 P1)",
"Differences: disease control vs elimination vs eradication; levels of prevention in NHD (2019 Supple)",
"Man viewed as 'agent' of his own disease ā E/W (2019 Supple)",
],
3, "2019ā2022"),
(1, "Iceberg Phenomenon of Disease",
"Iceberg Phenomenon ā significance of submerged portion & strategies",
[
"Describe iceberg phenomenon; significance of submerged portion; strategies under national programmes (2024 Supple P1)",
"Iceberg phenomenon of disease ā S/N (2019 P1, 2013 Supple)",
"We need to be more careful about the hidden part of the iceberg ā E/W (2022 P1)",
],
4, "2013ā2024"),
# āāāāāāāāāā RANK 2 ā VERY IMPORTANT (3ā4 times) āāāāāāāāāā
(2, "Determinants of Health",
"Determinants of Health (environmental, socio-economic, health services)",
[
"Enumerate determinants of health; environmental & socio-economic conditions (2023 P1, 2011 P1)",
"Enumerate determinants; how health services act as determinant (2015 Supple)",
"Define Health; enumerate indicators of Health; 'Health for All'? (2020 P1)",
],
3, "2011ā2023"),
(2, "Indicators of Health & Mortality",
"Health Indicators ā morbidity, mortality, disability",
[
"Characteristics of ideal indicator; morbidity indicators; IMR & CFR (2018 P1)",
"Ideal health indicator; mortality indicators; measures to reduce one; SMR in detail (2012 Supple, 2018 Supple)",
"Indicators of health; disability rates with examples; concept of disability limitation (2015 P1, 2025 Supple P1)",
],
4, "2012ā2025"),
(2, "Indicators of Health & Mortality",
"Standardised Mortality Ratio (SMR)",
[
"Detailed description of SMR (2012 Supple, 2018 Supple)",
"Measures taken to reduce a mortality indicator (detailed) (2012 Supple)",
],
2, "2012ā2018"),
(2, "Indicators of Health & Mortality",
"DALY (Disability-Adjusted Life Year)",
[
"DALY ā S/N (2017 P1, 2014 P1)",
],
2, "2014ā2017"),
(2, "Monitoring & Surveillance",
"Monitoring vs Surveillance (differentiation)",
[
"Differentiate monitoring and surveillance; AFP surveillance ā rationale & process in Polio eradication India (2025 Supple P1)",
"Monitoring and surveillance are different in public health ā E/W (2023 P1, 2020 P1, 2015 Supple)",
"Sentinel surveillance ā S/N (2011 Supple)",
],
4, "2011ā2025"),
# āāāāāāāāāā RANK 3 ā IMPORTANT (2 times) āāāāāāāāāā
(3, "Risk Factors & Causation",
"Risk Factors ā definition, types, relation to agent factors",
[
"Risk factors of CHD; preventive strategies of CHD (2012 P1, 2016 Supple)",
"Risk factors vs agent factors; intervention strategy; risk factors of a disease (2014 Supple)",
"Risk factors of coronary heart disease ā S/N (2013 Supple)",
"Name 4 NCDs of public health importance; risk factors & preventive measures of any one NCD (2022 P1)",
],
4, "2012ā2022"),
(3, "Risk Factors & Causation",
"Multifactorial Causation of Disease",
[
"Multifactorial causation of disease with suitable examples (2013 P1)",
"Multifactorial causation of disease ā S/N (2017 Supple)",
],
2, "2013ā2017"),
(3, "Definition & Concept of Health",
"Definition of Health (WHO & its defects)",
[
"Define Health; enumerate various indicators of Health; 'Health for All'? (2020 P1)",
"WHO definition of 'Health' has defects ā Explain (2012 P1)",
"The word disability and handicap are not synonymous ā E/W (2024 Supple P1, 2013 Supple)",
],
3, "2012ā2024"),
(3, "Human Development Index (HDI)",
"HDI ā components & significance",
[
"Human Development Index (HDI) ā S/N (2022 P1, 2011 P1)",
],
2, "2011ā2022"),
# āāāāāāāāāā RANK 4 ā MODERATE (1 time) āāāāāāāāāā
(4, "Rehabilitation",
"Rehabilitation ā concept & types",
[
"Rehabilitation ā S/N (2012 Supple)",
],
1, "2012"),
(4, "Occupational Health",
"Occupational Cancer",
[
"Occupational cancer ā S/N (2019 Supple)",
],
1, "2019"),
]
# āāā COLUMN CONFIG āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
COL_RANK = 1
COL_TOPIC = 2
COL_SUB = 3
COL_QNS = 4
COL_COUNT = 5
COL_YEARS = 6
ws.column_dimensions[get_column_letter(COL_RANK)].width = 8
ws.column_dimensions[get_column_letter(COL_TOPIC)].width = 30
ws.column_dimensions[get_column_letter(COL_SUB)].width = 35
ws.column_dimensions[get_column_letter(COL_QNS)].width = 65
ws.column_dimensions[get_column_letter(COL_COUNT)].width = 12
ws.column_dimensions[get_column_letter(COL_YEARS)].width = 14
# āāā TITLE ROW āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ws.merge_cells("A1:F1")
t = ws["A1"]
t.value = "CONCEPT OF HEALTH & DISEASE ā PYQ PRIORITY CHART (Decreasing Order of Importance)"
t.font = Font(name="Arial", bold=True, color="FFFFFF", size=13)
t.fill = PatternFill("solid", start_color=HEADER_BG)
t.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
ws.row_dimensions[1].height = 32
# āāā HEADER ROW āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
headers = ["Priority\nRank", "Topic", "Subtopic / Focus Area",
"Questions Asked (Year)", "Times\nAsked", "Year Range"]
for col, h in enumerate(headers, start=1):
cell_style(ws, 2, col, h, bold=True, bg=HEADER_BG, fg=HEADER_FG,
size=10, halign="center")
ws.row_dimensions[2].height = 30
# āāā RANK LABEL COLOURS āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
RANK_COLOUR = {1: RANK1_BG, 2: RANK2_BG, 3: RANK3_BG, 4: RANK4_BG}
RANK_LABEL = {
1: "ā
ā
ā
ā
\nMUST DO",
2: "ā
ā
ā
\nVERY IMP",
3: "ā
ā
\nIMPORTANT",
4: "ā
\nMODERATE",
}
# āāā DATA ROWS āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
row = 3
prev_rank = None
for rank, topic, subtopic, qns_list, count, years in data:
bg = RANK_COLOUR[rank]
qns_text = "\n".join(f"⢠{q}" for q in qns_list)
# Rank cell
cell_style(ws, row, COL_RANK, RANK_LABEL[rank],
bold=True, bg=bg, fg="FFFFFF", halign="center", size=9)
# Topic
cell_style(ws, row, COL_TOPIC, topic,
bold=True, bg=SUBHD_BG if rank >= 3 else "FFF2CC",
halign="left", size=10)
# Subtopic
cell_style(ws, row, COL_SUB, subtopic,
bold=False, bg="FFFFFF", halign="left", size=9)
# Questions
cell_style(ws, row, COL_QNS, qns_text,
bold=False, bg="FFFFFF", halign="left", size=9)
# Count
cell_style(ws, row, COL_COUNT, count,
bold=True, bg=bg, fg="FFFFFF", halign="center", size=11)
# Years
cell_style(ws, row, COL_YEARS, years,
bold=False, bg="FFFFFF", halign="center", size=9)
# Row height based on number of questions
ws.row_dimensions[row].height = max(40, len(qns_list) * 20)
row += 1
# āāā LEGEND āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
row += 1
ws.merge_cells(f"A{row}:F{row}")
leg = ws[f"A{row}"]
leg.value = "LEGEND: ā
ā
ā
ā
MUST DO = appeared 4ā6+ times | ā
ā
ā
VERY IMP = appeared 3ā4 times | ā
ā
IMPORTANT = appeared 2 times | ā
MODERATE = appeared once"
leg.font = Font(name="Arial", bold=True, size=9, color="1F4E79")
leg.fill = PatternFill("solid", start_color="DEEAF1")
leg.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
ws.row_dimensions[row].height = 22
# āāā FREEZE PANES āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ws.freeze_panes = "A3"
# āāā SAVE āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
out = "/home/daytona/workspace/pyq-chart/Health_Disease_PYQ_Priority.xlsx"
wb.save(out)
print(f"Saved: {out}")
cd /home/daytona/workspace/pyq-chart && python build_chart.py
~/pyq-chart/build_chart.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/pyq-chart/build_chart.py'
cd /home/daytona/workspace/pyq-chart && python build_chart.py
python3 -c "import xlsxwriter; print('xlsxwriter ok')"
python3 -c " from openpyxl import Workbook wb = Workbook() ws = wb.active ws['A1ā¦
python3 --version && pip show openpyxl | grep Version
python3 -c "import pandas; print(pandas.__version__)"
python3 -c " import pandas as pd df = pd.DataFrame({'test':['a','b']}) df.to_excā¦
which libreoffice && libreoffice --version
~/pyq-chart/build_csv.py
import csv
rows = [
# header
["Priority Rank", "Times Asked", "Year Range", "Topic", "Subtopic / Focus Area", "Questions Asked (Year)"],
# RANK 1 ā MUST DO
["ā
ā
ā
ā
MUST DO", "6", "2019ā2025",
"Levels of Prevention & Natural History of Disease",
"Levels of Prevention (primary / secondary / tertiary / primordial)",
"⢠Enumerate levels of prevention; apply to diabetes mellitus (2022 Supple P1)\n⢠Natural history of disease + stages + prevention application (2022 P1)\n⢠Differences: disease control vs elimination vs eradication; levels of prevention & modes of intervention (2019 Supple)\n⢠Primordial prevention is a subset of primary prevention ā E/W (2025 Supple P1, 2015 P2, 2020 P1)\n⢠Differences between primordial & primary prevention ā E/W (2020 P1)"],
["ā
ā
ā
ā
MUST DO", "4", "2013ā2024",
"Iceberg Phenomenon of Disease",
"Iceberg Phenomenon ā significance of submerged portion & strategies",
"⢠Describe iceberg phenomenon; significance of submerged portion; strategies under national programmes (2024 Supple P1)\n⢠Iceberg phenomenon of disease ā S/N (2019 P1, 2013 Supple)\n⢠We need to be more careful about the hidden part of the iceberg ā E/W (2022 P1)"],
["ā
ā
ā
ā
MUST DO", "3", "2019ā2022",
"Levels of Prevention & Natural History of Disease",
"Natural History of Disease (stages, relation to prevention)",
"⢠Natural history of disease ā stages + suitable illustration + prevention stages (2022 P1)\n⢠Differences: disease control vs elimination vs eradication; levels of prevention in NHD (2019 Supple)\n⢠Man viewed as 'agent' of his own disease ā E/W (2019 Supple)"],
# RANK 2 ā VERY IMPORTANT
["ā
ā
ā
VERY IMP", "4", "2012ā2025",
"Indicators of Health & Mortality",
"Health Indicators ā morbidity, mortality, disability indicators",
"⢠Characteristics of ideal indicator; morbidity indicators; IMR & CFR (2018 P1)\n⢠Ideal health indicator; mortality indicators; measures to reduce one; SMR in detail (2012 Supple, 2018 Supple)\n⢠Indicators of health; disability rates with examples; disability limitation (2015 P1, 2025 Supple P1)"],
["ā
ā
ā
VERY IMP", "4", "2011ā2025",
"Monitoring & Surveillance",
"Monitoring vs Surveillance (differentiation) + AFP Surveillance",
"⢠Differentiate monitoring and surveillance; AFP surveillance ā rationale & process in Polio eradication India (2025 Supple P1)\n⢠Monitoring and surveillance are different ā E/W (2023 P1, 2020 P1, 2015 Supple)\n⢠Sentinel surveillance ā S/N (2011 Supple)"],
["ā
ā
ā
VERY IMP", "3", "2011ā2023",
"Determinants of Health",
"Determinants of Health (environmental, socio-economic, health services)",
"⢠Enumerate determinants; environmental & socio-economic conditions (2023 P1, 2011 P1)\n⢠Enumerate determinants; how health services act as determinant (2015 Supple)\n⢠Define Health; enumerate indicators; 'Health for All'? (2020 P1)"],
["ā
ā
ā
VERY IMP", "2", "2012ā2018",
"Indicators of Health & Mortality",
"Standardised Mortality Ratio (SMR)",
"⢠Detailed description of SMR (2012 Supple, 2018 Supple)\n⢠Measures taken to reduce a mortality indicator (2012 Supple)"],
["ā
ā
ā
VERY IMP", "2", "2014ā2017",
"Indicators of Health & Mortality",
"DALY (Disability-Adjusted Life Year)",
"⢠DALY ā S/N (2017 P1, 2014 P1)"],
# RANK 3 ā IMPORTANT
["ā
ā
IMPORTANT", "4", "2012ā2022",
"Risk Factors & Causation",
"Risk Factors ā definition, types, CHD, vs agent factors",
"⢠Risk factors of CHD; preventive strategies of CHD (2012 P1, 2016 Supple)\n⢠Risk factors vs agent factors; intervention strategy (2014 Supple)\n⢠Risk factors of coronary heart disease ā S/N (2013 Supple)\n⢠Name 4 NCDs of public health importance; risk factors & preventive measures (2022 P1)"],
["ā
ā
IMPORTANT", "3", "2012ā2024",
"Definition & Concept of Health",
"Definition of Health (WHO & its defects); disability vs handicap",
"⢠Define Health; enumerate indicators; 'Health for All'? (2020 P1)\n⢠WHO definition of 'Health' has defects ā Explain (2012 P1)\n⢠The word disability and handicap are not synonymous ā E/W (2024 Supple P1, 2013 Supple)"],
["ā
ā
IMPORTANT", "2", "2013ā2017",
"Risk Factors & Causation",
"Multifactorial Causation of Disease",
"⢠Multifactorial causation of disease with suitable examples (2013 P1)\n⢠Multifactorial causation of disease ā S/N (2017 Supple)"],
["ā
ā
IMPORTANT", "2", "2011ā2022",
"Human Development Index (HDI)",
"HDI ā components & significance",
"⢠Human Development Index (HDI) ā S/N (2022 P1, 2011 P1)"],
# RANK 4 ā MODERATE
["ā
MODERATE", "1", "2012",
"Rehabilitation",
"Rehabilitation ā concept & types",
"⢠Rehabilitation ā S/N (2012 Supple)"],
["ā
MODERATE", "1", "2019",
"Occupational Health",
"Occupational Cancer",
"⢠Occupational cancer ā S/N (2019 Supple)"],
]
out = "/home/daytona/workspace/pyq-chart/Health_Disease_PYQ_Priority.csv"
with open(out, "w", newline="", encoding="utf-8") as f:
w = csv.writer(f)
w.writerows(rows)
print(f"CSV saved: {out}")
cd /home/daytona/workspace/pyq-chart && python3 build_csv.py && libreoffice --heā¦
libreoffice --headless --convert-to xlsx --outdir /tmp/ /home/daytona/workspace/ā¦
cp /tmp/Health_Disease_PYQ_Priority.xlsx /home/daytona/workspace/pyq-chart/Healtā¦
python3 -c " import zipfile, xml.dom.minidom with zipfile.ZipFile('/home/daytonaā¦
Health Disease PYQ Priority
Spreadsheet Ā· XLSX
| Column | Content |
|---|---|
| Priority Rank | ā ā ā ā MUST DO ā ā MODERATE |
| Times Asked | Number of times that subtopic appeared across all groups |
| Year Range | Earliest to latest year it appeared |
| Topic | Broad subject (e.g., Levels of Prevention) |
| Subtopic / Focus Area | Specific angle examined |
| Questions Asked (Year) | Every actual question with year & paper code |
| Rank | Topic | Times |
|---|---|---|
| ā ā ā ā | Levels of Prevention (incl. primordial) | 6 |
| ā ā ā ā | Iceberg Phenomenon | 4 |
| ā ā ā ā | Natural History of Disease | 3 |
| ā ā ā | Health Indicators / IMR / SMR / Disability | 4 |
| ā ā ā | Monitoring vs Surveillance / AFP | 4 |
| ā ā ā | Determinants of Health | 3 |
| ā ā | Risk Factors / CHD / NCD | 4 |
| ā ā | Definition of Health / WHO defects | 3 |
| ā ā | Multifactorial Causation / HDI / DALY | 2 each |
| ā | Rehabilitation / Occupational Cancer | 1 each |
Actually I just wanted u to be my coach for upcoming viva so in purpose of viva from which topic should I start from to build conceptual clarity
If you can't define health properly, nothing else makes sense.
Understand what influences health before studying disease
This is the single most important conceptual block
Each level of prevention maps to a stage in NHD ā once you see this, you never forget it
Risk factors ā agent factors ā this distinction is frequently asked
Now that you understand health & disease, how do we measure it?
Last because it applies all the above concepts at a systems level
Health definition
ā
What determines health (determinants)
ā
How disease develops (NHD + Iceberg)
ā
How we prevent it (Levels of prevention)
ā
What causes it (Risk factors / multifactorial)
ā
How we measure it (Indicators)
ā
How we track it (Surveillance)