~/bhms-pathology/create_docx.py
from docx import Document
from docx.shared import Pt, Inches, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.oxml.ns import qn
from docx.oxml import OxmlElement
doc = Document()
# ββ Page margins ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
from docx.shared import Inches
section = doc.sections[0]
section.top_margin = Inches(1)
section.bottom_margin = Inches(1)
section.left_margin = Inches(1.1)
section.right_margin = Inches(1.1)
# ββ Base font βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
normal_style = doc.styles["Normal"]
normal_style.font.name = "Arial"
normal_style.font.size = Pt(11)
# ββ Helper colours ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
RED = RGBColor(0xC0, 0x00, 0x00)
DARK_B = RGBColor(0x1F, 0x3E, 0x6E)
GREEN = RGBColor(0x17, 0x6B, 0x17)
ORANGE = RGBColor(0xD9, 0x6B, 0x00)
PURPLE = RGBColor(0x5C, 0x00, 0x7A)
TEAL = RGBColor(0x00, 0x70, 0x70)
BLACK = RGBColor(0x00, 0x00, 0x00)
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
# ββ Utility: shade a table cell βββββββββββββββββββββββββββββββββββββββββββββββ
def shade_cell(cell, hex_color):
tc = cell._tc
tcPr = tc.get_or_add_tcPr()
shd = OxmlElement("w:shd")
shd.set(qn("w:val"), "clear")
shd.set(qn("w:color"), "auto")
shd.set(qn("w:fill"), hex_color)
tcPr.append(shd)
# ββ Utility: heading paragraph ββββββββββββββββββββββββββββββββββββββββββββββββ
def add_section_heading(text, color=DARK_B, size=14):
p = doc.add_paragraph()
p.paragraph_format.space_before = Pt(10)
p.paragraph_format.space_after = Pt(4)
run = p.add_run(text)
run.bold = True
run.font.size = Pt(size)
run.font.color.rgb = color
return p
# ββ Utility: question heading βββββββββββββββββββββββββββββββββββββββββββββββββ
def add_question(text):
p = doc.add_paragraph()
p.paragraph_format.space_before = Pt(8)
p.paragraph_format.space_after = Pt(2)
run = p.add_run(text)
run.bold = True
run.font.size = Pt(11.5)
run.font.color.rgb = RGBColor(0x1A, 0x1A, 0x8C)
return p
# ββ Utility: bullet point βββββββββββββββββββββββββββββββββββββββββββββββββββββ
def add_bullet(text, level=0, bold_prefix=None):
p = doc.add_paragraph(style="List Bullet")
p.paragraph_format.left_indent = Inches(0.3 + level * 0.3)
p.paragraph_format.space_after = Pt(1)
if bold_prefix:
r = p.add_run(bold_prefix + " ")
r.bold = True
r.font.size = Pt(11)
r.font.color.rgb = BLACK
r2 = p.add_run(text)
r2.font.size = Pt(11)
else:
r = p.add_run(text)
r.font.size = Pt(11)
return p
# ββ Utility: normal paragraph βββββββββββββββββββββββββββββββββββββββββββββββββ
def add_para(text, bold=False, italic=False, color=BLACK, size=11):
p = doc.add_paragraph()
p.paragraph_format.space_after = Pt(2)
r = p.add_run(text)
r.bold = bold
r.italic = italic
r.font.size = Pt(size)
r.font.color.rgb = color
return p
# ββ Utility: simple table βββββββββββββββββββββββββββββββββββββββββββββββββββββ
def add_table(headers, rows, header_bg="1F3E6E"):
table = doc.add_table(rows=1, cols=len(headers))
table.style = "Table Grid"
hdr = table.rows[0].cells
for i, h in enumerate(headers):
shade_cell(hdr[i], header_bg)
run = hdr[i].paragraphs[0].add_run(h)
run.bold = True
run.font.color.rgb = WHITE
run.font.size = Pt(10.5)
hdr[i].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
for row_data in rows:
row = table.add_row().cells
for i, val in enumerate(row_data):
run = row[i].paragraphs[0].add_run(val)
run.font.size = Pt(10)
row[i].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.LEFT
doc.add_paragraph() # spacer
return table
# ββ Utility: MCQ rapid fire βββββββββββββββββββββββββββββββββββββββββββββββββββ
def add_mcq(q, a):
p = doc.add_paragraph()
p.paragraph_format.space_before = Pt(4)
p.paragraph_format.space_after = Pt(1)
r1 = p.add_run(q + " ")
r1.bold = True
r1.font.size = Pt(11)
r1.font.color.rgb = RGBColor(0x1A, 0x1A, 0x8C)
r2 = p.add_run("β " + a)
r2.font.size = Pt(11)
r2.font.color.rgb = GREEN
r2.bold = True
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# COVER / TITLE PAGE
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
title_p = doc.add_paragraph()
title_p.alignment = WD_ALIGN_PARAGRAPH.CENTER
title_p.paragraph_format.space_before = Pt(40)
r = title_p.add_run("BHMS 2nd Year Pathology")
r.bold = True; r.font.size = Pt(26); r.font.color.rgb = DARK_B
sub_p = doc.add_paragraph()
sub_p.alignment = WD_ALIGN_PARAGRAPH.CENTER
r2 = sub_p.add_run("Question & Answer Practice Set")
r2.bold = True; r2.font.size = Pt(18); r2.font.color.rgb = RED
sub2 = doc.add_paragraph()
sub2.alignment = WD_ALIGN_PARAGRAPH.CENTER
r3 = sub2.add_run("Based on Harsh Mohan's Textbook of Pathology (9th Edition)")
r3.italic = True; r3.font.size = Pt(12); r3.font.color.rgb = RGBColor(0x55,0x55,0x55)
doc.add_paragraph()
line_p = doc.add_paragraph()
line_p.alignment = WD_ALIGN_PARAGRAPH.CENTER
r4 = line_p.add_run("β" * 55)
r4.font.color.rgb = RGBColor(0xAA,0xAA,0xAA)
note_p = doc.add_paragraph()
note_p.alignment = WD_ALIGN_PARAGRAPH.CENTER
rn = note_p.add_run("Sections: Cell Injury | Inflammation | Neoplasia | Hematology\n"
"Cardiovascular | Respiratory | Renal | Immunology | Rapid Fire MCQs")
rn.italic = True; rn.font.size = Pt(11); rn.font.color.rgb = RGBColor(0x33,0x33,0x33)
doc.add_page_break()
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# SECTION A β CELL INJURY & ADAPTATIONS
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
add_section_heading("SECTION A: CELL INJURY & ADAPTATIONS", color=RED, size=15)
add_question("Q1. Define necrosis. What are its types?")
add_bullet("Necrosis = pathological, uncontrolled cell death accompanied by inflammation")
add_bullet("Coagulative β most common; firm, pale; heart/kidney infarct; architecture preserved", level=1)
add_bullet("Liquefactive β brain infarct, abscess; cell digested, pus forms", level=1)
add_bullet("Caseous β TB; cheese-like, crumbled; architecture completely lost", level=1)
add_bullet("Fat necrosis β pancreas (enzymatic) / breast (traumatic)", level=1)
add_bullet("Gangrenous β Dry (no bacteria) vs Wet (bacteria present)", level=1)
add_bullet("Fibrinoid β blood vessel walls; autoimmune diseases (SLE, RA)", level=1)
add_question("Q2. Differentiate apoptosis from necrosis.")
add_table(
["Feature", "Apoptosis", "Necrosis"],
[
["Type", "Programmed", "Pathological"],
["Stimulus", "Physiological or controlled", "Always pathological"],
["Cells", "Single cells", "Groups of cells"],
["Inflammation", "Absent", "Present"],
["Cell membrane", "Intact (blebs form)", "Ruptures"],
["ATP", "Required", "Not required"],
["Chromatin", "Condensed (pyknosis)", "Karyolysis / karyorrhexis"],
["Example", "Embryogenesis, thymus involution", "Myocardial infarct, abscess"],
]
)
add_question("Q3. What is metaplasia? Give examples.")
add_bullet("Change of one adult differentiated cell type to another adult cell type")
add_bullet("Reversible; response to chronic irritation")
add_bullet("Smoker's bronchus: ciliated columnar β squamous (squamous metaplasia)", level=1)
add_bullet("Barrett's esophagus: squamous β columnar (intestinal metaplasia) β risk of adenocarcinoma", level=1)
add_bullet("Bladder: transitional β squamous (in schistosomiasis, stones)", level=1)
add_question("Q4. Differentiate dystrophic vs metastatic calcification.")
add_table(
["Feature", "Dystrophic", "Metastatic"],
[
["Tissue", "Dead / necrotic", "Normal / living"],
["Serum Calcium", "Normal", "Elevated (hypercalcemia)"],
["Causes", "TB, atherosclerosis, old infarct", "Hyperparathyroidism, Vit D toxicity"],
["Significance", "Local only", "Systemic β organ damage"],
]
)
add_question("Q5. What are the changes in reversible cell injury?")
add_bullet("Cell swelling β most common and earliest change")
add_bullet("Fatty change (steatosis)")
add_bullet("Clumping of nuclear chromatin")
add_bullet("Detachment of ribosomes from ER")
add_bullet("Myelin figures β whorled phospholipid membranes")
add_bullet("Blebbing of plasma membrane")
add_para("All changes are reversible if the stimulus is removed.", italic=True, color=GREEN)
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# SECTION B β INFLAMMATION
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
add_section_heading("SECTION B: INFLAMMATION", color=ORANGE, size=15)
add_question("Q6. Name the cardinal signs of inflammation and their mediators.")
add_table(
["Sign", "Latin", "Mediator"],
[
["Redness", "Rubor", "Histamine, PGE2 (vasodilation)"],
["Heat", "Calor", "Histamine, PGE2"],
["Swelling", "Tumor", "Histamine, bradykinin (β permeability)"],
["Pain", "Dolor", "Bradykinin, PGE2"],
["Loss of function", "Functio laesa", "All of the above combined"],
]
)
add_question("Q7. Write the sequence of cellular events in acute inflammation.")
add_bullet("Margination β WBCs move to vessel periphery")
add_bullet("Rolling β loose adhesion via selectins")
add_bullet("Pavementing β WBCs line vessel wall via integrins")
add_bullet("Emigration / Diapedesis β WBCs squeeze between endothelial cells")
add_bullet("Chemotaxis β directed migration toward agent (C5a, LTB4, IL-8)")
add_bullet("Phagocytosis β Recognition β Engulfment β Killing (oxidative burst: H2O2, HOCl, superoxide)")
add_question("Q8. What are the outcomes of acute inflammation?")
add_bullet("Resolution β complete restoration; e.g. lobar pneumonia", bold_prefix="1.")
add_bullet("Suppuration β abscess formation (pus = dead neutrophils + debris)", bold_prefix="2.")
add_bullet("Organization β replacement by granulation tissue β fibrous scar", bold_prefix="3.")
add_bullet("Chronic inflammation β if stimulus persists", bold_prefix="4.")
add_bullet("Death β if overwhelming infection (septicemia)", bold_prefix="5.")
add_question("Q9. What is a granuloma? Name conditions producing caseating and non-caseating granulomas.")
add_bullet("Granuloma = collection of activated macrophages (epithelioid cells) surrounded by lymphocytes Β± giant cells Β± necrosis")
add_bullet("Caseating granuloma (central caseous necrosis):", bold_prefix="")
add_bullet("Tuberculosis (most important), Histoplasmosis", level=1)
add_bullet("Non-caseating granuloma:", bold_prefix="")
add_bullet("Sarcoidosis, Crohn's disease, Leprosy (tuberculoid type), Foreign body reaction, Berylliosis", level=1)
add_question("Q10. What is the difference between primary and secondary wound healing?")
add_table(
["Feature", "Primary Intention", "Secondary Intention"],
[
["Wound type", "Clean, sutured, edges opposed", "Open wound, gaping edges"],
["Granulation tissue", "Minimal", "Abundant"],
["Scarring", "Minimal", "Prominent"],
["Time to heal", "Faster", "Slower"],
["Example", "Surgical incision", "Burn wound, large ulcer"],
]
)
add_question("Q11. Name local and systemic factors that delay wound healing.")
add_bullet("Local: Infection (most important), poor blood supply, foreign body, radiation, haematoma, movement")
add_bullet("Systemic factors:")
add_bullet("Vitamin C deficiency β impairs collagen synthesis", level=1)
add_bullet("Zinc deficiency β impairs enzyme function", level=1)
add_bullet("Diabetes mellitus β impaired neutrophil function, micro-angiopathy", level=1)
add_bullet("Corticosteroids β suppress inflammation, reduce collagen", level=1)
add_bullet("Anemia, malnutrition, malignancy, immunosuppression", level=1)
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# SECTION C β NEOPLASIA
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
add_section_heading("SECTION C: NEOPLASIA (TUMORS)", color=RGBColor(0xB8, 0x86, 0x00), size=15)
add_question("Q12. Differentiate benign and malignant tumors.")
add_table(
["Feature", "Benign", "Malignant"],
[
["Growth rate", "Slow", "Rapid"],
["Encapsulation", "Yes", "No"],
["Invasion", "No", "Yes"],
["Metastasis", "No", "Yes"],
["Differentiation", "Well differentiated", "Poorly differentiated"],
["Mitoses", "Rare, normal", "Frequent, abnormal"],
["Necrosis", "Rare", "Common"],
["Nuclear changes", "Normal", "Hyperchromatic, pleomorphic"],
["Recurrence", "Rare", "Common"],
["Prognosis", "Good", "Poor"],
]
)
add_question("Q13. What is the TNM staging system?")
add_bullet("T = Primary Tumor size/extent: T0 (no tumor) β T1βT4 (increasing size)")
add_bullet("N = Regional lymph Node involvement: N0 (no nodes) β N1βN3 (increasing)")
add_bullet("M = distant Metastasis: M0 (absent) / M1 (present)")
add_bullet("Higher TNM stage = worse prognosis")
add_question("Q14. What are oncogenes and tumor suppressor genes? Give examples.")
add_bullet("Oncogenes β accelerators; gain-of-function mutation; drive uncontrolled proliferation")
add_bullet("RAS (most common, point mutation), MYC, HER2/neu, BCR-ABL", level=1)
add_bullet("Tumor suppressor genes β brakes; loss-of-function; both alleles must be lost (Knudson's 2-hit hypothesis)")
add_bullet("p53 (mutated in >50% cancers β 'guardian of genome'), Rb (retinoblastoma), BRCA1/2, APC", level=1)
add_question("Q15. Name viruses associated with human cancers.")
add_table(
["Virus", "Cancer"],
[
["HPV types 16, 18", "Cervical carcinoma, anal CA"],
["HBV, HCV", "Hepatocellular carcinoma"],
["EBV", "Burkitt's lymphoma, nasopharyngeal CA, Hodgkin's lymphoma"],
["HTLV-1", "Adult T-cell leukemia/lymphoma"],
["HHV-8", "Kaposi's sarcoma"],
]
)
add_question("Q16. What is paraneoplastic syndrome? Give examples.")
add_bullet("Symptoms caused by tumor products or immune response β NOT by direct invasion or metastasis")
add_bullet("Hypercalcemia β PTHrP; lung (squamous), breast, renal cell CA")
add_bullet("Cushing's syndrome β ectopic ACTH; small cell lung carcinoma")
add_bullet("SIADH (β Na) β ectopic ADH; small cell lung carcinoma")
add_bullet("Polycythemia β ectopic EPO; renal cell CA, hepatoma")
add_bullet("Acanthosis nigricans β GI cancers")
add_bullet("Trousseau syndrome (migratory thrombophlebitis) β pancreatic CA")
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# SECTION D β HEMATOLOGY
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
add_section_heading("SECTION D: HEMATOLOGY", color=GREEN, size=15)
add_question("Q17. Classify anemia based on MCV with examples.")
add_bullet("Microcytic (MCV <80 fL):", bold_prefix="")
add_bullet("Iron deficiency anemia (most common worldwide), Thalassemia, Sideroblastic anemia", level=1)
add_bullet("Normocytic (MCV 80β100 fL):", bold_prefix="")
add_bullet("Aplastic anemia, Hemolytic anemia, Acute blood loss, Renal failure", level=1)
add_bullet("Macrocytic (MCV >100 fL):", bold_prefix="")
add_bullet("Megaloblastic: B12/folate deficiency | Non-megaloblastic: liver disease, hypothyroidism, alcohol", level=1)
add_question("Q18. What are the lab findings in Iron Deficiency Anemia?")
add_bullet("Peripheral smear: microcytic hypochromic RBCs; pencil cells; target cells; anisocytosis/poikilocytosis")
add_bullet("β Serum iron, β Serum ferritin (earliest and most sensitive marker)")
add_bullet("β TIBC (Total Iron Binding Capacity)")
add_bullet("β Transferrin saturation (<15%)")
add_bullet("Bone marrow: absent iron stores")
add_bullet("Clinical features: Koilonychia (spoon nails), angular stomatitis, glossitis")
add_bullet("Plummer-Vinson syndrome = dysphagia + IDA + esophageal web", level=1)
add_question("Q19. What are the features of megaloblastic anemia?")
add_bullet("Causes: B12 deficiency (pernicious anemia, strict vegetarians, gastrectomy); Folate deficiency")
add_bullet("Peripheral smear: macro-ovalocytes + hypersegmented neutrophils (>5 lobes β pathognomonic)")
add_bullet("Bone marrow: hypercellular with megaloblasts (nucleus-cytoplasm asynchrony)")
add_bullet("B12 deficiency ONLY β Subacute Combined Degeneration of Spinal Cord (SACD)")
add_bullet("SACD: dorsal columns + lateral corticospinal tracts β tingling, weakness", level=1)
add_question("Q20. What is Philadelphia chromosome? In which disease is it seen?")
add_bullet("t(9;22) reciprocal translocation β seen in 95% of CML cases")
add_bullet("Creates BCR-ABL fusion gene on chromosome 22")
add_bullet("BCR-ABL = constitutively active tyrosine kinase β uncontrolled proliferation")
add_bullet("Treatment: Imatinib (Gleevec) β tyrosine kinase inhibitor")
add_bullet("Also seen in: 25% adult ALL, 5% childhood ALL")
add_question("Q21. What are Reed-Sternberg cells?")
add_bullet("Large binucleated cells with prominent eosinophilic nucleoli β 'owl eye' appearance")
add_bullet("Pathognomonic of Hodgkin's Lymphoma")
add_bullet("Origin: germinal center B cells")
add_bullet("Immunophenotype: CD15+, CD30+ (negative for CD20, CD45)")
add_question("Q22. Differentiate Hemophilia A and B.")
add_table(
["Feature", "Hemophilia A", "Hemophilia B"],
[
["Factor deficiency", "Factor VIII", "Factor IX"],
["Inheritance", "X-linked recessive", "X-linked recessive"],
["Severity", "More common, severe", "Less common"],
["Bleeding time", "Normal", "Normal"],
["PT", "Normal", "Normal"],
["APTT", "Prolonged", "Prolonged"],
["Treatment", "Factor VIII concentrate", "Factor IX concentrate"],
]
)
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# SECTION E β CARDIOVASCULAR
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
add_section_heading("SECTION E: CARDIOVASCULAR PATHOLOGY", color=RGBColor(0x00, 0x55, 0xAA), size=15)
add_question("Q23. Describe gross and microscopic changes in Myocardial Infarction.")
add_table(
["Time", "Gross Change", "Microscopic Change"],
[
["0β6 hours", "No gross change", "Wavy fibres, eosinophilia"],
["6β24 hours", "Pale blotchy area", "Coagulative necrosis begins"],
["1β3 days", "Yellow-white pallor", "Neutrophil infiltration (peak)"],
["3β7 days", "Yellow centre, red border", "Macrophages, early granulation"],
["1β2 weeks", "Red-grey, soft", "Granulation tissue (capillaries + fibroblasts)"],
["6β8 weeks", "White fibrous scar", "Dense collagenous scar"],
]
)
add_bullet("Most specific marker: Troponin I / Troponin T")
add_bullet("Most common vessel involved: Left Anterior Descending (LAD) artery")
add_question("Q24. What are Aschoff bodies? In which disease are they found?")
add_bullet("Pathognomonic lesion of Rheumatic Fever / Rheumatic Heart Disease")
add_bullet("Structure: central fibrinoid necrosis + Aschoff giant cells + Anitschkow cells (caterpillar cells) + lymphocytes")
add_bullet("Location: myocardium (most important), pericardium, endocardium")
add_bullet("Pathogenesis: Group A Streptococcal M protein cross-reacts with cardiac antigens (molecular mimicry)")
add_bullet("Most common valve: Mitral valve β Mitral stenosis ('fish-mouth' / 'button-hole' deformity)")
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# SECTION F β RESPIRATORY
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
add_section_heading("SECTION F: RESPIRATORY PATHOLOGY", color=PURPLE, size=15)
add_question("Q25. Describe the four stages of lobar pneumonia.")
add_table(
["Stage", "Duration", "Gross Findings", "Microscopic"],
[
["Congestion", "1β2 days", "Heavy, red, boggy", "Vascular engorgement, bacteria in alveoli"],
["Red hepatization", "2β4 days", "Liver-like, red", "RBCs + fibrin + neutrophils filling alveoli"],
["Grey hepatization", "4β8 days", "Firm, grey", "RBCs lysed; neutrophils + fibrin remain"],
["Resolution", ">8 days", "Normal consistency", "Enzymatic digestion; architecture restored"],
]
)
add_question("Q26. What is Ghon's complex? What is its significance?")
add_bullet("Ghon's complex = Ghon's focus + draining hilar lymph node")
add_bullet("Ghon's focus = subpleural caseous lesion (lower part of upper lobe or upper part of lower lobe)")
add_bullet("Represents primary tuberculosis in a non-immune host (usually children)")
add_bullet("Usually heals with calcification β Ranke complex (calcified primary TB on X-ray)")
add_bullet("If immunity is weak β progressive primary TB or miliary TB (haematogenous spread)")
add_bullet("Secondary TB: reactivation in upper lobes, cavitation, more destructive")
add_question("Q27. Classify lung carcinoma with key features.")
add_table(
["Type", "%", "Location", "Key Feature"],
[
["Squamous cell CA", "30%", "Central/hilar", "Cavitation; keratin pearls; PTHrP β hypercalcemia"],
["Adenocarcinoma", "35%", "Peripheral", "Most common in non-smokers; EGFR mutations"],
["Small cell (Oat cell)", "20%", "Central", "Worst prognosis; ectopic ACTH/ADH; Eaton-Lambert"],
["Large cell", "10%", "Peripheral", "Diagnosis of exclusion; poorly differentiated"],
]
)
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# SECTION G β RENAL & IMMUNOLOGY
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
add_section_heading("SECTION G: RENAL & IMMUNOLOGY", color=TEAL, size=15)
add_question("Q28. Differentiate nephrotic and nephritic syndrome.")
add_table(
["Feature", "Nephrotic", "Nephritic"],
[
["Proteinuria", ">3.5 g/day (massive)", "<3.5 g/day (mild)"],
["Hematuria", "Absent", "Present (RBC casts)"],
["Hypertension", "Mild / absent", "Prominent"],
["Edema", "Severe (periorbital, anasarca)", "Mild to moderate"],
["Oliguria", "Absent", "Present"],
["Hypoalbuminemia", "Yes (marked)", "Mild"],
["Hyperlipidemia", "Yes", "Absent"],
["Main example", "Minimal change disease", "Post-streptococcal GN"],
]
)
add_question("Q29. What are the types of hypersensitivity reactions? Give one example each.")
add_table(
["Type", "Name", "Mechanism", "Classic Example"],
[
["Type I", "Immediate / Anaphylactic", "IgE + mast cell degranulation", "Anaphylaxis, asthma, hay fever"],
["Type II", "Cytotoxic", "IgG/IgM + complement + cell lysis", "ABO hemolytic transfusion reaction"],
["Type III", "Immune complex", "Ag-Ab complexes deposited in tissues", "SLE, post-strep GN, serum sickness"],
["Type IV", "Delayed (cell-mediated)", "T lymphocytes (no antibody involved)", "Mantoux test, contact dermatitis"],
]
)
add_question("Q30. Write short notes on SLE (Systemic Lupus Erythematosus).")
add_bullet("Systemic autoimmune disease β predominantly young women")
add_bullet("Antibodies: anti-dsDNA (most specific), anti-Sm (most specific), ANA (most sensitive), anti-histone (drug-induced lupus)")
add_bullet("Clinical: butterfly (malar) rash, photosensitivity, arthritis, serositis, renal involvement, hemolytic anemia")
add_bullet("Renal: 'Wire loop' lesion β immune complex deposition (membranous pattern)")
add_bullet("Libman-Sacks endocarditis: sterile vegetations on both surfaces of mitral valve")
add_bullet("Labs: β ESR, β C3/C4 (complement consumed), pancytopenia")
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# SECTION H β SHORT NOTES (5-mark questions)
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
add_section_heading("SECTION H: HIGH-YIELD SHORT ANSWER QUESTIONS (5 marks)", color=RED, size=15)
add_question("Q31. What is caseous necrosis? Where is it seen?")
add_bullet("Cheese-like (Latin: caseus = cheese), crumbled, acellular necrosis")
add_bullet("Normal architecture completely lost")
add_bullet("Seen in Tuberculosis (pathognomonic)")
add_bullet("Microscopy: acellular pink debris, no recognizable cellular outlines")
add_bullet("Surrounded by granuloma: epithelioid cells + Langhans giant cells + lymphocytes")
add_question("Q32. What is Virchow's triad?")
add_bullet("Three factors predisposing to thrombosis:")
add_bullet("Endothelial injury (most important) β atherosclerosis, trauma, infection", level=1, bold_prefix="1.")
add_bullet("Abnormal blood flow β stasis (immobility, AF) or turbulence (valvular disease)", level=1, bold_prefix="2.")
add_bullet("Hypercoagulability β Factor V Leiden, protein C/S deficiency, pregnancy, malignancy, OCP", level=1, bold_prefix="3.")
add_question("Q33. What is amyloidosis? How is it diagnosed?")
add_bullet("Extracellular deposition of abnormal fibrillar protein (amyloid) in tissues")
add_bullet("Primary (AL) β from immunoglobulin light chains (multiple myeloma)")
add_bullet("Secondary (AA) β serum amyloid A protein; chronic infections, RA")
add_bullet("Organs: kidney (most common), liver, spleen, heart, adrenal")
add_bullet("Diagnosis: Congo red stain β apple-green birefringence under polarized light (beta-pleated sheet)")
add_bullet("'Lardaceous spleen' (large deposits) vs 'Sago spleen' (small follicular deposits)")
add_question("Q34. Differentiate CML and CLL.")
add_table(
["Feature", "CML", "CLL"],
[
["Age", "40β60 years", ">60 years"],
["WBC type", "Myeloid series", "B lymphocytes (CD5+)"],
["Key marker", "Philadelphia chromosome (BCR-ABL)", "Smudge/basket cells on smear"],
["Smear", "Full spectrum of myeloid cells", "Mature lymphocytes + smudge cells"],
["Splenomegaly", "Massive", "Mild to moderate"],
["Treatment", "Imatinib (tyrosine kinase inhibitor)", "Watch and wait / Chlorambucil"],
]
)
add_question("Q35. What is DIC (Disseminated Intravascular Coagulation)?")
add_bullet("Widespread activation of coagulation β microthrombi throughout vasculature")
add_bullet("Consumption of clotting factors and platelets β paradoxical bleeding")
add_bullet("Causes: Sepsis (commonest), obstetric complications, malignancy, massive transfusion, snake bite")
add_bullet("Labs: β Platelets, β Fibrinogen, β PT, β APTT, β D-dimer (pathognomonic), schistocytes on smear")
add_bullet("Treatment: treat underlying cause; FFP, cryoprecipitate, platelet transfusion")
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# SECTION I β RAPID FIRE MCQs
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
add_section_heading("SECTION I: MCQ-STYLE RAPID FIRE", color=RGBColor(0xAA, 0x00, 0x55), size=15)
add_para("Cover the right column and test yourself!", italic=True, color=RGBColor(0x66,0x66,0x66))
doc.add_paragraph()
mcqs = [
("Q36. Most common type of necrosis in solid organs?", "Coagulative necrosis"),
("Q37. Most specific cardiac marker in MI?", "Troponin I / Troponin T"),
("Q38. Pathognomonic cell of Hodgkin's lymphoma?", "Reed-Sternberg cell (owl-eye)"),
("Q39. Most common anemia worldwide?", "Iron deficiency anemia"),
("Q40. Marker of megaloblastic anemia on peripheral smear?", "Hypersegmented neutrophils (>5 lobes)"),
("Q41. Philadelphia chromosome is seen in?", "CML β t(9;22)"),
("Q42. Oncogenic virus causing cervical carcinoma?", "HPV types 16 and 18"),
("Q43. 'Owl eye' nucleoli are seen in?", "Reed-Sternberg cells (Hodgkin's lymphoma)"),
("Q44. Wire-loop lesion in kidney is seen in?", "SLE (Systemic Lupus Erythematosus)"),
("Q45. Guardian of the genome?", "p53 tumor suppressor gene"),
("Q46. Apple-green birefringence with Congo red stain?", "Amyloidosis"),
("Q47. Most common valve affected in Rheumatic Heart Disease?", "Mitral valve (mitral stenosis)"),
("Q48. Caseous necrosis is pathognomonic of?", "Tuberculosis"),
("Q49. Most common carcinoma of the breast?", "Invasive ductal carcinoma (IDC)"),
("Q50. Krukenberg tumor is metastasis to?", "Ovary (from gastric carcinoma β signet ring cells)"),
]
for q, a in mcqs:
add_mcq(q, a)
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# FOOTER NOTE
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
doc.add_page_break()
foot_p = doc.add_paragraph()
foot_p.alignment = WD_ALIGN_PARAGRAPH.CENTER
r = foot_p.add_run("Exam Strategy Tips")
r.bold = True; r.font.size = Pt(14); r.font.color.rgb = DARK_B
tips = [
"2-mark questions: definitions (necrosis, apoptosis, granuloma, metaplasia)",
"5-mark questions: differentiation tables (benign vs malignant, hypersensitivity, anemia classification)",
"10-mark questions: MI changes, Rheumatic Heart Disease, Tuberculosis, Leukemias",
"Always underline pathognomonic features and key words in your answers",
"Start every answer with a clear definition",
"Use tables wherever possible β examiners appreciate organized, structured answers",
]
for tip in tips:
add_bullet(tip)
doc.add_paragraph()
final = doc.add_paragraph()
final.alignment = WD_ALIGN_PARAGRAPH.CENTER
rf = final.add_run("Best of luck in your BHMS examinations!")
rf.bold = True; rf.font.size = Pt(13); rf.font.color.rgb = GREEN
# ββ Save ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
out_path = "/tmp/workspace/bhms-pathology/BHMS_Pathology_QA_Notes.docx"
doc.save(out_path)
print(f"Saved: {out_path}")