Viva questions for general pathology

Asking for Preferences
Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
I have a solid overview of the major general pathology topics from Robbins. I'll now compile comprehensive MBBS-level viva questions directly from my knowledge of this standard textbook, covering all major general pathology topics.

General Pathology — MBBS Viva Questions

Based on Robbins & Kumar Basic Pathology

1. Cell Injury, Death & Adaptation

Q1. What is the difference between reversible and irreversible cell injury? A. Reversible injury: cell swelling, fatty change, loss of microvilli, membrane blebbing — all correctable if stimulus removed. Irreversible injury is marked by membrane damage (plasma + mitochondrial + lysosomal), massive Ca²⁺ influx, and inability to restore ATP. Key morphologic point of no return: flocculent densities in mitochondria + karyolysis.

Q2. What are the morphologic features of reversible cell injury? A.
  • Cellular swelling (hydropic change)
  • Fatty change (especially liver, heart, kidney)
  • Plasma membrane blebbing
  • Clumping of nuclear chromatin
  • ER dilation, ribosome detachment

Q3. Name the types of necrosis with one key example each.
TypeExample
CoagulativeMyocardial infarction
LiquefactiveBrain infarct / pyogenic abscess
CaseousTuberculosis
Fat necrosisAcute pancreatitis
FibrinoidImmune vasculitis, malignant hypertension
GangrenousIschemic limb (wet/dry)

Q4. Compare necrosis and apoptosis.
FeatureNecrosisApoptosis
StimulusPathologicPhysiologic or pathologic
Cell sizeSwellsShrinks
MembraneDisruptedIntact (blebs form)
InflammationYesNo
DNARandom degradationLadder pattern (180 bp)
Enzymes involvedLysosomalCaspases

Q5. What are the key biochemical mechanisms of cell injury? A.
  1. ATP depletion → Na/K pump failure → cell swelling
  2. Mitochondrial damage → cytochrome c release → apoptosis
  3. Intracellular Ca²⁺ increase → activates phospholipases, proteases, endonucleases
  4. Free radical injury (ROS) — lipid peroxidation, protein oxidation, DNA damage
  5. Membrane permeability defects
  6. DNA/protein damage

Q6. What are free radicals? How are they neutralized? A. Highly reactive species with unpaired electrons. Sources: radiation, reperfusion, drugs, metabolic reactions (cytochrome P450). Neutralized by:
  • Superoxide dismutase → H₂O₂
  • Catalase → H₂O + O₂
  • Glutathione peroxidase → detoxifies H₂O₂ and lipid peroxides
  • Vitamins C, E, A; ceruloplasmin, transferrin (chelate iron)

Q7. What is ischemia-reperfusion injury? A. Paradoxical worsening of cell damage when blood flow is restored. Mechanisms: burst of ROS from mitochondria and xanthine oxidase; Ca²⁺ overload; complement activation; neutrophil recruitment.

Q8. Define and classify cellular adaptations. A.
  • Hypertrophy — increased cell size (e.g., cardiac hypertrophy in hypertension)
  • Hyperplasia — increased cell number (e.g., endometrial hyperplasia under estrogen)
  • Atrophy — decreased cell size/number (e.g., disuse atrophy, denervation)
  • Metaplasia — one differentiated cell type replaced by another (e.g., Barrett esophagus, squamous metaplasia in bronchus of smokers)
  • Dysplasia — disordered growth, pre-neoplastic (not strictly an adaptation)

Q9. What is dystrophic vs. metastatic calcification?
FeatureDystrophicMetastatic
Serum Ca²⁺NormalElevated
TissueDead/damagedNormal
CauseNecrosis, atherosclerosis, TBHyperparathyroidism, hypervitaminosis D
ExamplePsammoma bodies, atherosclerotic plaquesCalcium deposits in lungs, kidneys, gastric mucosa

Q10. What are psammoma bodies? In which tumors are they seen? A. Concentric laminated calcifications in areas of dystrophic calcification. Seen in:
  • Papillary thyroid carcinoma
  • Papillary serous ovarian carcinoma
  • Meningioma
  • Mesothelioma

2. Inflammation

Q11. Define acute inflammation and its cardinal signs. A. A rapid, stereotyped vascular and cellular reaction to injury or infection. Cardinal signs (Celsus + Virchow): Rubor (redness), Calor (heat), Tumor (swelling), Dolor (pain), Functio laesa (loss of function).

Q12. Describe the vascular changes in acute inflammation. A.
  1. Transient vasoconstriction (seconds)
  2. Vasodilation → increased blood flow (redness, heat)
  3. Increased vascular permeability → protein-rich exudate leaks
  4. Stasis → margination of leukocytes

Q13. What are the mechanisms of increased vascular permeability? A.
  • Endothelial contraction (most common) — histamine, bradykinin, leukotrienes → gaps form in venular endothelium
  • Endothelial injury — direct damage (burns, toxins), neutrophil-mediated
  • Transcytosis — VEGF-induced (through vesicular channels)
  • Leakiness in new vessels (angiogenesis)

Q14. Describe leukocyte migration (extravasation) step by step. A.
  1. Margination — leukocytes move to vessel periphery
  2. Rolling — selectin-PSGL-1 interactions (E-selectin, P-selectin, L-selectin)
  3. Adhesion — integrins (LFA-1, Mac-1) bind ICAM-1 on endothelium; activated by chemokines
  4. Transmigration (diapedesis) — through intercellular junctions via PECAM-1 (CD31)
  5. Chemotaxis — toward the injury site via C5a, IL-8, LTB₄, bacterial products (fMLP)

Q15. What is the leukocyte adhesion deficiency (LAD)? A. Autosomal recessive deficiency of CD18 (β₂ integrin subunit). Results in failure of neutrophil adhesion and transmigration. Clinically: recurrent bacterial infections, delayed umbilical cord separation, leukocytosis without pus formation.

Q16. What are the mediators of inflammation? Classify them. A.
Cell-derived:
  • Preformed: histamine (mast cells), serotonin (platelets)
  • Newly synthesized: prostaglandins, leukotrienes, PAF, cytokines (TNF, IL-1, IL-6), NO, lysosomal enzymes, ROS
Plasma-derived (liver):
  • Complement system (C3a, C5a — anaphylatoxins; C5b-9 MAC)
  • Kinin system (bradykinin)
  • Coagulation/fibrinolytic system

Q17. What is the role of arachidonic acid metabolites in inflammation? A. Arachidonic acid → metabolized by:
  • COX pathway → PGE₂ (fever, pain), PGI₂ (vasodilation), TXA₂ (platelet aggregation)
  • LOX pathway → LTB₄ (neutrophil chemotaxis), LTC₄, LTD₄, LTE₄ (bronchoconstriction, vasoconstriction — slow reacting substances of anaphylaxis)

Q18. Compare exudate vs. transudate.
FeatureExudateTransudate
Protein>3 g/dL<3 g/dL
Specific gravity>1.020<1.020
CellsMany (PMNs)Few
MechanismInflammationHydrostatic/osmotic pressure change
ExamplePneumonia, peritonitisCCF, nephrotic syndrome

Q19. What are the outcomes of acute inflammation? A.
  1. Resolution — complete restoration (if minimal necrosis)
  2. Healing by fibrosis — if extensive tissue destruction
  3. Abscess formation — walled-off collection of pus
  4. Progression to chronic inflammation
  5. Lymphangitis/bacteremia — spread

Q20. What is chronic inflammation? What cells predominate? A. Prolonged inflammation (weeks to months) with simultaneous active inflammation, tissue destruction, and repair. Key cells:
  • Macrophages (dominant — secrete cytokines, growth factors, enzymes)
  • Lymphocytes (T and B)
  • Plasma cells
  • Eosinophils (parasitic, allergic)
  • Mast cells
  • Fibroblasts (repair)

Q21. What is a granuloma? How is it formed? A. A focal aggregate of epithelioid macrophages (activated macrophages with abundant pink cytoplasm resembling epithelium) + surrounding lymphocytes ± Langhans giant cells ± central necrosis.
Formed when the inciting agent resists destruction → persistent macrophage activation → IL-12 secretion → Th1 cells → IFN-γ → epithelioid transformation.

Q22. Give examples of granulomatous diseases.
DiseaseType of Granuloma
TuberculosisCaseating (central caseous necrosis)
SarcoidosisNon-caseating
LeprosyNon-caseating (tuberculoid type)
Crohn's diseaseNon-caseating
Foreign body reactionNon-caseating (foreign body giant cells)
Fungal infectionsCaseating or non-caseating

Q23. What are giant cells? Name the types. A. Multinucleated cells formed by fusion of macrophages.
  • Langhans giant cell — nuclei arranged in a horseshoe/peripheral pattern (TB)
  • Foreign body giant cell — nuclei scattered randomly
  • Touton giant cell — ring of nuclei with foamy cytoplasm peripherally (fat necrosis, xanthoma)
  • Osteoclast-type giant cell — in bone tumors
  • Reed-Sternberg cell — Hodgkin lymphoma (not a true giant cell but resembles)

3. Healing and Repair

Q24. What are the phases of wound healing by primary intention? A.
  1. Hemostasis (minutes) — platelet plug, fibrin clot
  2. Inflammation (1–3 days) — neutrophils, then macrophages
  3. Proliferation (3–14 days) — angiogenesis, fibroblast proliferation, collagen deposition, epithelialization
  4. Remodeling (weeks–months) — type III → type I collagen; MMPs degrade excess ECM; tensile strength increases (never exceeds ~80% of original)

Q25. Compare healing by primary vs. secondary intention.
FeaturePrimarySecondary
Wound edgesApposedSeparated
Tissue lossMinimalExtensive
Granulation tissueLessMore
ScarSmall, fineLarge
ContractionMinimalSignificant (myofibroblasts)
Infection riskLowerHigher

Q26. What is granulation tissue? What does it consist of? A. Pink, soft, granular, highly vascular tissue that fills wound defects. Consists of:
  • New capillaries (angiogenesis — VEGF, bFGF driven)
  • Proliferating fibroblasts
  • Loose ECM (fibronectin, proteoglycans)
  • Macrophages
  • Myofibroblasts (wound contraction)

Q27. What factors impair wound healing? A.
  • Local: infection, foreign body, poor blood supply, movement, radiation, hematoma
  • Systemic: malnutrition (especially vitamin C — collagen synthesis), diabetes mellitus, corticosteroids, aging, uremia, chemotherapy/immunosuppression

Q28. What are the complications of wound healing? A.
  • Deficient healing — wound dehiscence, ulceration
  • Excessive healing — keloid (extends beyond wound margins; type I collagen; more common in dark-skinned individuals), hypertrophic scar (stays within margins)
  • Contracture — serious across joints (burn wounds)
  • Desmoid tumor — exuberant fibromatosis
  • Proud flesh — excessive granulation tissue

4. Hemodynamic Disorders

Q29. Define edema. Classify its causes. A. Abnormal accumulation of fluid in the interstitial tissue or body cavities.
  • Increased hydrostatic pressure — CCF, portal hypertension, venous obstruction
  • Decreased oncotic pressure — nephrotic syndrome, cirrhosis, protein-losing enteropathy, malnutrition
  • Lymphatic obstruction — filariasis (elephantiasis), post-mastectomy
  • Na⁺ retention — renal failure
  • Increased vascular permeability — inflammation, burns

Q30. What is the difference between hyperemia and congestion?
HyperemiaCongestion (Passive)
MechanismActive — arteriolar dilationPassive — impaired venous drainage
BloodOxygenated (red)Deoxygenated (blue-red)
ExampleInflammation, exerciseCCF, portal hypertension

Q31. What are the morphologic features of chronic passive venous congestion of the liver ("nutmeg liver")? A. Central veins and sinusoids dilated and congested (right heart failure). Red central zones of congestion alternating with pale periportal areas → gross nutmeg appearance. Microscopically: centrilobular necrosis ± cardiac cirrhosis (chronic).

Q32. What is a thrombus? What is Virchow's triad? A. A solid mass formed from blood constituents within the vascular system in life. Virchow's triad:
  1. Endothelial injury (most important) — atherosclerosis, trauma, inflammation
  2. Stasis or turbulence — atrial fibrillation, prolonged immobility, aneurysm
  3. Hypercoagulability — factor V Leiden, antiphospholipid syndrome, pregnancy, malignancy

Q33. What are the lines of Zahn? A. Alternating pale (platelet + fibrin) and dark (RBC) laminations visible in ante-mortem thrombi in the heart and aorta. Help distinguish ante-mortem thrombus from post-mortem clot (homogeneous "currant jelly" or "chicken fat" — no lines of Zahn).

Q34. What is an embolism? Classify types. A. A detached intravascular mass (solid, liquid, gas) carried in the blood to a site distant from its origin.
  • Thromboembolism — most common (DVT → pulmonary embolism)
  • Fat embolism — long bone fractures, liposuction
  • Air/gas embolism — IV lines, decompression sickness (caisson disease)
  • Amniotic fluid embolism — obstetric emergency (DIC)
  • Tumor embolism
  • Septic embolism — infective endocarditis

Q35. What is an infarct? What factors determine its severity? A. An area of ischemic necrosis caused by occlusion of arterial supply or venous drainage. Factors:
  • Nature of blood supply (dual → liver, lung more resistant)
  • Rate of occlusion (gradual → collaterals develop)
  • Tissue vulnerability (neurons — 3–5 min; myocardium — 20–30 min; fibroblasts — hours)
  • Oxygen-carrying capacity of blood
Red (hemorrhagic) infarcts — loose tissue, dual supply, venous occlusion (lung, small bowel, testes). White (anemic) infarcts — solid tissue, end-artery (heart, spleen, kidney).

Q36. What is DIC (Disseminated Intravascular Coagulation)? A. Systemic activation of coagulation → widespread microthrombi → consumption of clotting factors and platelets → paradoxical bleeding. Causes: obstetric complications (abruption, septic abortion), sepsis (gram-negative), massive trauma, malignancy (APML). Lab: ↓ platelets, ↑ PT/PTT, ↑ D-dimers, ↓ fibrinogen, schistocytes on smear.

5. Neoplasia

Q37. Define neoplasm. Distinguish benign from malignant. A. A neoplasm (Willis definition): "an abnormal mass of tissue the growth of which exceeds and is uncoordinated with that of normal tissues and persists after cessation of the stimuli which evoked the change."
FeatureBenignMalignant
Growth rateSlowRapid
BordersWell-defined, encapsulatedIrregular, infiltrating
DifferentiationWell-differentiatedVariable to anaplastic
MitosesRare, normalFrequent, atypical
NecrosisAbsentOften present
MetastasisNeverHallmark
RecurrenceRareCommon

Q38. What is the difference between hyperplasia, metaplasia, and dysplasia? A.
  • Hyperplasia — increased number of cells (reversible, stimulus-dependent)
  • Metaplasia — replacement of one cell type by another (e.g., columnar → squamous in bronchus); reversible; pre-malignant risk if persistent
  • Dysplasia — disordered growth with loss of uniformity and architectural orientation; considered pre-neoplastic; hallmarks: nuclear pleomorphism, increased mitoses, abnormal differentiation

Q39. Define and explain anaplasia. A. Lack of differentiation in malignant tumors. Features:
  • Pleomorphism — variable size and shape of cells and nuclei
  • Hyperchromasia — dark-staining nuclei with coarse chromatin
  • Increased nuclear:cytoplasmic ratio (N:C ratio ↑)
  • Abnormal mitoses — tripolar, ring-shaped spindles
  • Giant cells — tumor giant cells with one large or two nuclei
  • Loss of polarity — disordered arrangement

Q40. What are the routes of metastasis? A.
  1. Lymphatic spread — most common for carcinomas; regional nodes first
  2. Hematogenous spread — most common for sarcomas; via veins (portal → liver; IVC → lungs)
  3. Seeding of body cavities (transcoelomic) — ovarian cancer → peritoneal spread ("omental cake")
  4. Perineural spread — adenoid cystic carcinoma, prostate cancer
  5. Direct extension

Q41. What are the hallmarks of cancer? (Hanahan & Weinberg) A.
  1. Sustaining proliferative signaling
  2. Evading growth suppressors
  3. Resisting cell death
  4. Enabling replicative immortality
  5. Inducing angiogenesis
  6. Activating invasion and metastasis
  7. (Emerging): Reprogramming energy metabolism (Warburg effect)
  8. Evading immune destruction
  9. Tumor-promoting inflammation
  10. Genomic instability and mutation

Q42. What are oncogenes and tumor suppressor genes? Give examples. A.
Oncogenes (gain-of-function mutations; dominant):
  • RAS — most commonly mutated oncogene (colorectal, pancreatic)
  • MYC — Burkitt lymphoma (t[8;14])
  • HER2/NEU — breast cancer
  • BCL-ABL — CML (Philadelphia chromosome t[9;22])
  • EGFR — lung adenocarcinoma
Tumor suppressor genes (loss-of-function; recessive — "two-hit hypothesis"):
  • TP53 — most commonly mutated TSG (Li-Fraumeni syndrome)
  • RB1 — retinoblastoma (familial bilateral)
  • APC — FAP (colorectal)
  • BRCA1/2 — breast, ovarian
  • CDKN2A (p16) — melanoma, pancreatic

Q43. What is the "two-hit hypothesis"? A. Proposed by Knudson for retinoblastoma. Both alleles of RB1 must be inactivated for tumor development. In hereditary form: first hit is germline (inherited), second is somatic mutation → early onset, bilateral. In sporadic form: both hits are somatic → late onset, unilateral.

Q44. What is the role of p53? A. Dubbed "guardian of the genome." In response to DNA damage:
  • Activates CDKN1A (p21) → G1 arrest (allows repair)
  • Activates DNA repair genes
  • If damage is irreparable → activates BAX → apoptosis
  • Mutated in >50% of human cancers; germline mutation → Li-Fraumeni syndrome

Q45. What is the Warburg effect? A. Even in the presence of oxygen, cancer cells preferentially use aerobic glycolysis rather than oxidative phosphorylation (the normal low-oxygen route). This provides carbon skeletons for biosynthesis needed for rapid proliferation. Basis of FDG-PET imaging.

Q46. What are paraneoplastic syndromes? Give examples. A. Clinical manifestations not due to direct tumor invasion/metastasis but to ectopic hormone production or immune mechanisms.
  • Hypercalcemia — PTHrP (squamous cell lung, breast, renal carcinoma)
  • SIADH — small cell lung carcinoma (ADH)
  • Cushing syndrome — ACTH (small cell lung)
  • Polycythemia — EPO (renal cell carcinoma, cerebellar hemangioblastoma)
  • Eaton-Lambert syndrome — small cell lung (anti-VGCC antibodies)
  • Acanthosis nigricans — gastric, lung carcinoma
  • Migratory thrombophlebitis (Trousseau sign) — pancreatic adenocarcinoma

6. Immunopathology

Q47. What is a hypersensitivity reaction? Classify (Gell & Coombs). A.
TypeNameMechanismExample
IAnaphylactic/ImmediateIgE + mast cellsAnaphylaxis, asthma, urticaria
IICytotoxicIgG/IgM + complementAutoimmune hemolytic anemia, Goodpasture
IIIImmune complexIgG complexes + complementSLE, serum sickness, post-strep GN
IVDelayed/Cell-mediatedT lymphocytesTB (Mantoux), contact dermatitis, graft rejection

Q48. What is autoimmunity? Give mechanisms and examples. A. Immune response against self-antigens. Mechanisms:
  • Breakdown of self-tolerance (failure of clonal deletion/anergy)
  • Molecular mimicry (e.g., rheumatic fever — streptococcal M protein → cardiac myosin)
  • Bystander activation
  • Epitope spreading
  • HLA associations
Examples: SLE (anti-dsDNA, anti-Sm), RA (anti-CCP, RF), Hashimoto's thyroiditis, type 1 DM, myasthenia gravis.

Q49. What is amyloidosis? How is amyloid identified? A. Abnormal extracellular deposition of misfolded proteins in a β-pleated sheet configuration. Types:
  • AL (primary) — immunoglobulin light chains (multiple myeloma, plasma cell dyscrasias)
  • AA (secondary) — serum amyloid A protein (chronic inflammation — TB, RA, Crohn's)
  • — Alzheimer's disease
  • ATTR — transthyretin (senile systemic, familial)
  • Aβ₂M — β₂-microglobulin (dialysis)
Identification:
  • H&E: amorphous eosinophilic deposits
  • Congo red stain → apple-green birefringence under polarized light (most specific)
  • Thioflavine T/S → yellow-green fluorescence
  • Electron microscopy: non-branching fibrils, 7.5–10 nm diameter

7. Genetic & Pediatric Disorders

Q50. Classify genetic disorders. A.
  1. Single-gene (Mendelian) — autosomal dominant (Marfan, NF1), autosomal recessive (cystic fibrosis, PKU), X-linked (hemophilia, DMD)
  2. Chromosomal disorders — trisomies (Down, Edwards, Patau), monosomy (Turner's), sex chromosome (Klinefelter's)
  3. Multifactorial — polygenic + environment (diabetes, hypertension, congenital heart disease)
  4. Mitochondrial — maternal inheritance (MELAS, Leber's optic neuropathy)
  5. Trinucleotide repeat disorders — anticipation (Huntington's, fragile X, myotonic dystrophy)

Q51. What is the difference between deletion, translocation, and inversion? A.
  • Deletion — loss of chromosomal segment (e.g., 5p deletion → cri-du-chat)
  • Translocation — segment moved to another chromosome; balanced (no loss) vs. unbalanced
  • Inversion — segment reversed; pericentric (includes centromere) vs. paracentric
  • Isochromosome — abnormal chromosome with identical arms
  • Ring chromosome — ends of chromosome fuse

Q52. What is imprinting? Give one example. A. Epigenetic phenomenon where gene expression depends on parental origin. The same deletion at 15q11-13 causes:
  • Prader-Willi syndrome if paternal chromosome 15 deleted (maternal allele silenced by imprinting)
  • Angelman syndrome if maternal chromosome 15 deleted (paternal allele silenced by imprinting)

Quick-Fire Staining & Special Tests

Stain/TestWhat it identifies
PAS (Periodic acid-Schiff)Glycogen, fungi, mucus
Congo red (polarized)Amyloid — apple-green birefringence
Ziehl-Neelsen (ZN)Acid-fast bacilli (TB, leprosy)
Grocott methenamine silver (GMS)Fungi
Von KossaCalcium (metastatic/dystrophic)
Prussian blueHemosiderin (iron)
Sudan IV / Oil Red OLipids/fat
Reticulin (silver)Reticular fibers
Masson's trichromeCollagen (blue-green)
Alcian blueAcid mucopolysaccharides
Thioflavine TAmyloid (fluorescent)

Examiner Tips

  • Always start answers by defining the term asked.
  • For necrosis questions, know the histology AND clinical example.
  • For neoplasia, be ready to compare benign vs. malignant and give examples for each feature.
  • Know the four cardinal signs of inflammation and be able to explain each at the molecular level.
  • Virchow's triad is a must-know for thrombosis questions.
  • When asked about staining, mention the stain name, color produced, AND what it identifies.
  • Link granuloma always to TB vs. sarcoidosis — examiners test the distinction repeatedly.

Sources: Robbins & Kumar Basic Pathology, 10th ed.; Robbins & Cotran Pathologic Basis of Disease, 10th ed.

Generate a Word document with all viva Q&As for printing

Reading File
Reading File
Running Command

ls /home/daytona/workspace/ && ls /home/daytona/skills/docx/

Running Command

mkdir -p /home/daytona/workspace/gen-path-viva && ls /home/daytona/workspace/gen-path-viva/

Writing File

~/gen-path-viva/generate.js

const {
  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
  HeadingLevel, AlignmentType, LevelFormat, BorderStyle, WidthType,
  VerticalAlign, PageNumber, Header, Footer, ShadingType
} = require('docx');
const fs = require('fs');

// ─── Helpers ────────────────────────────────────────────────────────────────

function h1(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_1,
    children: [new TextRun({ text, bold: true, color: '1F3864' })],
    spacing: { before: 360, after: 120 },
    pageBreakBefore: true,
  });
}

function h2(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_2,
    children: [new TextRun({ text, bold: true, color: '2E74B5' })],
    spacing: { before: 240, after: 80 },
  });
}

function qLine(num, text) {
  return new Paragraph({
    spacing: { before: 200, after: 60 },
    children: [
      new TextRun({ text: `Q${num}. `, bold: true, size: 24, color: '1F3864' }),
      new TextRun({ text, bold: true, size: 24 }),
    ],
  });
}

function aLine(text) {
  return new Paragraph({
    spacing: { before: 40, after: 100 },
    indent: { left: 360 },
    children: [
      new TextRun({ text: 'A. ', bold: true, size: 22, color: '375623' }),
      new TextRun({ text, size: 22 }),
    ],
  });
}

function bullet(text, bold_prefix) {
  const children = [];
  if (bold_prefix) {
    const idx = text.indexOf(bold_prefix) + bold_prefix.length;
    const rest = text.slice(idx);
    children.push(new TextRun({ text: bold_prefix, bold: true, size: 22 }));
    children.push(new TextRun({ text: rest, size: 22 }));
  } else {
    children.push(new TextRun({ text, size: 22 }));
  }
  return new Paragraph({
    numbering: { reference: 'bullets', level: 0 },
    children,
    spacing: { before: 40, after: 40 },
  });
}

function numbered(text) {
  return new Paragraph({
    numbering: { reference: 'numbered', level: 0 },
    children: [new TextRun({ text, size: 22 })],
    spacing: { before: 40, after: 40 },
  });
}

function spacer() {
  return new Paragraph({ children: [new TextRun('')], spacing: { before: 60, after: 60 } });
}

function divider() {
  return new Paragraph({
    border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: 'AAAAAA', space: 4 } },
    children: [new TextRun('')],
    spacing: { before: 120, after: 120 },
  });
}

function makeTable(headers, rows) {
  const headerCells = headers.map(h =>
    new TableCell({
      shading: { type: ShadingType.CLEAR, fill: '2E74B5' },
      verticalAlign: VerticalAlign.CENTER,
      children: [new Paragraph({
        alignment: AlignmentType.CENTER,
        children: [new TextRun({ text: h, bold: true, color: 'FFFFFF', size: 20 })],
      })],
    })
  );

  const dataRows = rows.map(row =>
    new TableRow({
      children: row.map((cell, i) =>
        new TableCell({
          shading: { type: ShadingType.CLEAR, fill: i === 0 ? 'EAF0FB' : 'FFFFFF' },
          verticalAlign: VerticalAlign.TOP,
          children: [new Paragraph({
            children: [new TextRun({ text: cell, size: 20 })],
            spacing: { before: 60, after: 60 },
            indent: { left: 80, right: 80 },
          })],
        })
      ),
    })
  );

  return new Table({
    width: { size: 9026, type: WidthType.DXA },
    rows: [
      new TableRow({ tableHeader: true, children: headerCells }),
      ...dataRows,
    ],
  });
}

// ─── Document ────────────────────────────────────────────────────────────────

const doc = new Document({
  styles: {
    default: {
      document: { run: { font: 'Arial', size: 22 } },
    },
    paragraphStyles: [
      {
        id: 'Heading1', name: 'Heading 1', basedOn: 'Normal', next: 'Normal', quickFormat: true,
        run: { size: 32, bold: true, font: 'Arial', color: '1F3864' },
        paragraph: { spacing: { before: 360, after: 120 }, outlineLevel: 0 },
      },
      {
        id: 'Heading2', name: 'Heading 2', basedOn: 'Normal', next: 'Normal', quickFormat: true,
        run: { size: 26, bold: true, font: 'Arial', color: '2E74B5' },
        paragraph: { spacing: { before: 240, after: 80 }, outlineLevel: 1 },
      },
    ],
  },
  numbering: {
    config: [
      {
        reference: 'bullets',
        levels: [{
          level: 0, format: LevelFormat.BULLET, text: '\u2022', alignment: AlignmentType.LEFT,
          style: { paragraph: { indent: { left: 720, hanging: 360 } } },
        }],
      },
      {
        reference: 'numbered',
        levels: [{
          level: 0, format: LevelFormat.DECIMAL, text: '%1.', alignment: AlignmentType.LEFT,
          style: { paragraph: { indent: { left: 720, hanging: 360 } } },
        }],
      },
    ],
  },
  sections: [{
    properties: {
      page: {
        size: { width: 11906, height: 16838 },
        margin: { top: 1080, bottom: 1080, left: 1080, right: 1080 },
      },
    },
    headers: {
      default: new Header({
        children: [new Paragraph({
          alignment: AlignmentType.RIGHT,
          children: [new TextRun({ text: 'General Pathology — MBBS Viva Questions', italics: true, size: 18, color: '888888' })],
          border: { bottom: { style: BorderStyle.SINGLE, size: 4, color: 'CCCCCC', space: 4 } },
        })],
      }),
    },
    footers: {
      default: new Footer({
        children: [new Paragraph({
          alignment: AlignmentType.CENTER,
          children: [
            new TextRun({ text: 'Page ', size: 18, color: '888888' }),
            new TextRun({ children: [PageNumber.CURRENT], size: 18, color: '888888' }),
            new TextRun({ text: ' of ', size: 18, color: '888888' }),
            new TextRun({ children: [PageNumber.TOTAL_PAGES], size: 18, color: '888888' }),
            new TextRun({ text: '   |   Source: Robbins & Kumar Basic Pathology', size: 18, color: '888888' }),
          ],
          border: { top: { style: BorderStyle.SINGLE, size: 4, color: 'CCCCCC', space: 4 } },
        })],
      }),
    },
    children: [

      // ═══ TITLE PAGE ═══
      new Paragraph({
        alignment: AlignmentType.CENTER,
        spacing: { before: 1440, after: 240 },
        children: [new TextRun({ text: 'General Pathology', bold: true, size: 56, color: '1F3864', font: 'Arial' })],
      }),
      new Paragraph({
        alignment: AlignmentType.CENTER,
        spacing: { before: 0, after: 240 },
        children: [new TextRun({ text: 'MBBS Viva Questions & Answers', bold: true, size: 36, color: '2E74B5', font: 'Arial' })],
      }),
      new Paragraph({
        alignment: AlignmentType.CENTER,
        spacing: { before: 0, after: 120 },
        children: [new TextRun({ text: 'Comprehensive Review — All Major Topics', size: 26, color: '555555', italics: true })],
      }),
      new Paragraph({
        alignment: AlignmentType.CENTER,
        spacing: { before: 0, after: 600 },
        children: [new TextRun({ text: 'Based on Robbins & Kumar Basic Pathology', size: 22, color: '888888' })],
      }),
      divider(),
      new Paragraph({
        alignment: AlignmentType.CENTER,
        spacing: { before: 200, after: 200 },
        children: [new TextRun({ text: 'Topics Covered:', bold: true, size: 24, color: '1F3864' })],
      }),
      ...[
        '1. Cell Injury, Death & Adaptation',
        '2. Inflammation (Acute & Chronic)',
        '3. Healing and Repair',
        '4. Hemodynamic Disorders',
        '5. Neoplasia',
        '6. Immunopathology & Amyloidosis',
        '7. Genetic Disorders',
        '8. Special Stains — Quick Reference',
      ].map(t => new Paragraph({
        alignment: AlignmentType.CENTER,
        spacing: { before: 60, after: 60 },
        children: [new TextRun({ text: t, size: 22, color: '333333' })],
      })),

      // ═══ SECTION 1: Cell Injury ═══
      h1('1. Cell Injury, Death & Adaptation'),

      qLine(1, 'What is the difference between reversible and irreversible cell injury?'),
      aLine('Reversible injury: cell swelling, fatty change, loss of microvilli, membrane blebbing — all correctable if stimulus is removed.'),
      aLine('Irreversible injury is marked by membrane damage (plasma + mitochondrial + lysosomal), massive Ca2+ influx, and inability to restore ATP.'),
      aLine('Key morphologic point of no return: flocculent densities in mitochondria + karyolysis.'),
      divider(),

      qLine(2, 'What are the morphologic features of reversible cell injury?'),
      aLine('Features include:'),
      bullet('Cellular swelling (hydropic change)'),
      bullet('Fatty change — especially liver, heart, kidney'),
      bullet('Plasma membrane blebbing'),
      bullet('Clumping of nuclear chromatin'),
      bullet('ER dilation with ribosome detachment'),
      divider(),

      qLine(3, 'Name the types of necrosis with one key example each.'),
      aLine(''),
      makeTable(
        ['Type', 'Example'],
        [
          ['Coagulative', 'Myocardial infarction'],
          ['Liquefactive', 'Brain infarct / pyogenic abscess'],
          ['Caseous', 'Tuberculosis'],
          ['Fat necrosis', 'Acute pancreatitis'],
          ['Fibrinoid', 'Immune vasculitis, malignant hypertension'],
          ['Gangrenous', 'Ischemic limb (wet/dry)'],
        ]
      ),
      spacer(),
      divider(),

      qLine(4, 'Compare necrosis and apoptosis.'),
      aLine(''),
      makeTable(
        ['Feature', 'Necrosis', 'Apoptosis'],
        [
          ['Stimulus', 'Pathologic', 'Physiologic or pathologic'],
          ['Cell size', 'Swells', 'Shrinks'],
          ['Membrane', 'Disrupted', 'Intact (blebs form)'],
          ['Inflammation', 'Yes', 'No'],
          ['DNA', 'Random degradation', 'Ladder pattern (180 bp)'],
          ['Enzymes', 'Lysosomal', 'Caspases'],
        ]
      ),
      spacer(),
      divider(),

      qLine(5, 'What are the key biochemical mechanisms of cell injury?'),
      aLine(''),
      numbered('ATP depletion — Na/K pump failure leads to cell swelling'),
      numbered('Mitochondrial damage — cytochrome c release triggers apoptosis'),
      numbered('Intracellular Ca2+ increase — activates phospholipases, proteases, endonucleases'),
      numbered('Free radical injury (ROS) — lipid peroxidation, protein oxidation, DNA damage'),
      numbered('Membrane permeability defects'),
      numbered('DNA and protein damage'),
      divider(),

      qLine(6, 'What are free radicals? How are they neutralized?'),
      aLine('Highly reactive species with unpaired electrons. Sources: radiation, reperfusion, drugs, metabolic reactions (cytochrome P450).'),
      aLine('Neutralized by:'),
      bullet('Superoxide dismutase (SOD) converts O2- to H2O2'),
      bullet('Catalase converts H2O2 to H2O + O2'),
      bullet('Glutathione peroxidase detoxifies H2O2 and lipid peroxides'),
      bullet('Vitamins C, E, A; ceruloplasmin, transferrin (chelate iron)'),
      divider(),

      qLine(7, 'What is ischemia-reperfusion injury?'),
      aLine('Paradoxical worsening of cell damage when blood flow is restored. Mechanisms: burst of ROS from mitochondria and xanthine oxidase; Ca2+ overload; complement activation; neutrophil recruitment.'),
      divider(),

      qLine(8, 'Define and classify cellular adaptations.'),
      aLine(''),
      bullet('Hypertrophy — increased cell size (e.g., cardiac hypertrophy in hypertension)'),
      bullet('Hyperplasia — increased cell number (e.g., endometrial hyperplasia under estrogen)'),
      bullet('Atrophy — decreased cell size/number (e.g., disuse atrophy, denervation)'),
      bullet('Metaplasia — one differentiated cell type replaced by another (e.g., Barrett esophagus, squamous metaplasia in bronchus of smokers)'),
      bullet('Dysplasia — disordered growth, pre-neoplastic'),
      divider(),

      qLine(9, 'What is dystrophic vs. metastatic calcification?'),
      aLine(''),
      makeTable(
        ['Feature', 'Dystrophic', 'Metastatic'],
        [
          ['Serum Ca2+', 'Normal', 'Elevated'],
          ['Tissue', 'Dead/damaged', 'Normal'],
          ['Cause', 'Necrosis, atherosclerosis, TB', 'Hyperparathyroidism, hypervitaminosis D'],
          ['Example', 'Psammoma bodies, atherosclerotic plaques', 'Calcium in lungs, kidneys, gastric mucosa'],
        ]
      ),
      spacer(),
      divider(),

      qLine(10, 'What are psammoma bodies? In which tumors are they seen?'),
      aLine('Concentric laminated calcifications in areas of dystrophic calcification. Seen in:'),
      bullet('Papillary thyroid carcinoma'),
      bullet('Papillary serous ovarian carcinoma'),
      bullet('Meningioma'),
      bullet('Mesothelioma'),

      // ═══ SECTION 2: Inflammation ═══
      h1('2. Inflammation'),

      qLine(11, 'Define acute inflammation and its cardinal signs.'),
      aLine('A rapid, stereotyped vascular and cellular reaction to injury or infection.'),
      aLine('Cardinal signs: Rubor (redness), Calor (heat), Tumor (swelling), Dolor (pain), Functio laesa (loss of function).'),
      divider(),

      qLine(12, 'Describe the vascular changes in acute inflammation.'),
      numbered('Transient vasoconstriction (seconds)'),
      numbered('Vasodilation — increased blood flow causing redness and heat'),
      numbered('Increased vascular permeability — protein-rich exudate leaks into interstitium'),
      numbered('Stasis — margination of leukocytes'),
      divider(),

      qLine(13, 'What are the mechanisms of increased vascular permeability?'),
      bullet('Endothelial contraction (most common) — histamine, bradykinin, leukotrienes form gaps in venular endothelium'),
      bullet('Endothelial injury — direct damage (burns, toxins) or neutrophil-mediated'),
      bullet('Transcytosis — VEGF-induced transport through vesicular channels'),
      bullet('Leakiness in new vessels formed during angiogenesis'),
      divider(),

      qLine(14, 'Describe leukocyte migration (extravasation) step by step.'),
      numbered('Margination — leukocytes move to vessel periphery'),
      numbered('Rolling — selectin-PSGL-1 interactions (E-selectin, P-selectin, L-selectin)'),
      numbered('Adhesion — integrins (LFA-1, Mac-1) bind ICAM-1 on endothelium; activated by chemokines'),
      numbered('Transmigration (diapedesis) — through intercellular junctions via PECAM-1 (CD31)'),
      numbered('Chemotaxis — toward injury site via C5a, IL-8, LTB4, bacterial products (fMLP)'),
      divider(),

      qLine(15, 'What is Leukocyte Adhesion Deficiency (LAD)?'),
      aLine('Autosomal recessive deficiency of CD18 (beta-2 integrin subunit). Results in failure of neutrophil adhesion and transmigration. Clinically: recurrent bacterial infections, delayed umbilical cord separation, leukocytosis without pus formation.'),
      divider(),

      qLine(16, 'Classify the mediators of inflammation.'),
      aLine('Cell-derived:'),
      bullet('Preformed: histamine (mast cells), serotonin (platelets)'),
      bullet('Newly synthesized: prostaglandins, leukotrienes, PAF, cytokines (TNF, IL-1, IL-6), NO, lysosomal enzymes, ROS'),
      aLine('Plasma-derived (liver):'),
      bullet('Complement system (C3a, C5a — anaphylatoxins; C5b-9 MAC)'),
      bullet('Kinin system (bradykinin)'),
      bullet('Coagulation/fibrinolytic system'),
      divider(),

      qLine(17, 'What is the role of arachidonic acid metabolites in inflammation?'),
      aLine('Arachidonic acid is metabolized by two pathways:'),
      bullet('COX pathway: PGE2 (fever, pain), PGI2 (vasodilation), TXA2 (platelet aggregation)'),
      bullet('LOX pathway: LTB4 (neutrophil chemotaxis); LTC4, LTD4, LTE4 (bronchoconstriction — SRS-A)'),
      divider(),

      qLine(18, 'Compare exudate vs. transudate.'),
      aLine(''),
      makeTable(
        ['Feature', 'Exudate', 'Transudate'],
        [
          ['Protein', '>3 g/dL', '<3 g/dL'],
          ['Specific gravity', '>1.020', '<1.020'],
          ['Cells', 'Many (PMNs)', 'Few'],
          ['Mechanism', 'Inflammation', 'Hydrostatic/osmotic pressure change'],
          ['Example', 'Pneumonia, peritonitis', 'CCF, nephrotic syndrome'],
        ]
      ),
      spacer(),
      divider(),

      qLine(19, 'What are the outcomes of acute inflammation?'),
      numbered('Resolution — complete restoration (if minimal necrosis)'),
      numbered('Healing by fibrosis — if extensive tissue destruction'),
      numbered('Abscess formation — walled-off collection of pus'),
      numbered('Progression to chronic inflammation'),
      numbered('Lymphangitis/bacteremia — spread'),
      divider(),

      qLine(20, 'What is chronic inflammation? What cells predominate?'),
      aLine('Prolonged inflammation (weeks to months) with simultaneous active inflammation, tissue destruction, and repair.'),
      aLine('Key cells: Macrophages (dominant), Lymphocytes, Plasma cells, Eosinophils (parasitic/allergic), Mast cells, Fibroblasts.'),
      divider(),

      qLine(21, 'What is a granuloma? How is it formed?'),
      aLine('A focal aggregate of epithelioid macrophages (activated macrophages with abundant pink cytoplasm) + surrounding lymphocytes +/- Langhans giant cells +/- central necrosis.'),
      aLine('Formed when the inciting agent resists destruction -> persistent macrophage activation -> IL-12 secretion -> Th1 cells -> IFN-gamma -> epithelioid transformation.'),
      divider(),

      qLine(22, 'Give examples of granulomatous diseases.'),
      aLine(''),
      makeTable(
        ['Disease', 'Type of Granuloma'],
        [
          ['Tuberculosis', 'Caseating (central caseous necrosis)'],
          ['Sarcoidosis', 'Non-caseating'],
          ['Leprosy (tuberculoid)', 'Non-caseating'],
          ["Crohn's disease", 'Non-caseating'],
          ['Foreign body reaction', 'Non-caseating (foreign body giant cells)'],
          ['Fungal infections', 'Caseating or non-caseating'],
        ]
      ),
      spacer(),
      divider(),

      qLine(23, 'What are giant cells? Name the types.'),
      aLine('Multinucleated cells formed by fusion of macrophages.'),
      bullet('Langhans giant cell — nuclei arranged in horseshoe/peripheral pattern (TB)'),
      bullet('Foreign body giant cell — nuclei scattered randomly'),
      bullet('Touton giant cell — ring of nuclei with foamy cytoplasm peripherally (fat necrosis, xanthoma)'),
      bullet('Osteoclast-type giant cell — seen in bone tumors'),

      // ═══ SECTION 3: Healing ═══
      h1('3. Healing and Repair'),

      qLine(24, 'What are the phases of wound healing by primary intention?'),
      numbered('Hemostasis (minutes) — platelet plug, fibrin clot'),
      numbered('Inflammation (1-3 days) — neutrophils, then macrophages'),
      numbered('Proliferation (3-14 days) — angiogenesis, fibroblast proliferation, collagen deposition, epithelialization'),
      numbered('Remodeling (weeks-months) — type III to type I collagen; MMPs degrade excess ECM; tensile strength increases to ~80% of original'),
      divider(),

      qLine(25, 'Compare healing by primary vs. secondary intention.'),
      aLine(''),
      makeTable(
        ['Feature', 'Primary Intention', 'Secondary Intention'],
        [
          ['Wound edges', 'Apposed', 'Separated'],
          ['Tissue loss', 'Minimal', 'Extensive'],
          ['Granulation tissue', 'Less', 'More prominent'],
          ['Scar', 'Small, fine', 'Large'],
          ['Contraction', 'Minimal', 'Significant (myofibroblasts)'],
          ['Infection risk', 'Lower', 'Higher'],
        ]
      ),
      spacer(),
      divider(),

      qLine(26, 'What is granulation tissue?'),
      aLine('Pink, soft, granular, highly vascular tissue that fills wound defects. Consists of:'),
      bullet('New capillaries (angiogenesis — VEGF, bFGF driven)'),
      bullet('Proliferating fibroblasts'),
      bullet('Loose ECM (fibronectin, proteoglycans)'),
      bullet('Macrophages and myofibroblasts (wound contraction)'),
      divider(),

      qLine(27, 'What factors impair wound healing?'),
      aLine('Local: infection, foreign body, poor blood supply, movement, radiation, hematoma.'),
      aLine('Systemic: malnutrition (especially vitamin C), diabetes mellitus, corticosteroids, aging, uremia, chemotherapy/immunosuppression.'),
      divider(),

      qLine(28, 'What are the complications of wound healing?'),
      bullet('Deficient healing: wound dehiscence, ulceration'),
      bullet('Keloid: scar extends beyond wound margins; type I collagen; more common in dark-skinned individuals'),
      bullet('Hypertrophic scar: stays within margins'),
      bullet('Contracture: serious complication across joints (burn wounds)'),
      bullet('Desmoid tumor: exuberant fibromatosis'),

      // ═══ SECTION 4: Hemodynamic ═══
      h1('4. Hemodynamic Disorders'),

      qLine(29, 'Define edema. Classify its causes.'),
      aLine('Abnormal accumulation of fluid in the interstitial tissue or body cavities.'),
      bullet('Increased hydrostatic pressure: CCF, portal hypertension, venous obstruction'),
      bullet('Decreased oncotic pressure: nephrotic syndrome, cirrhosis, malnutrition'),
      bullet('Lymphatic obstruction: filariasis (elephantiasis), post-mastectomy'),
      bullet('Na+ retention: renal failure'),
      bullet('Increased vascular permeability: inflammation, burns'),
      divider(),

      qLine(30, "What is the difference between hyperemia and congestion?"),
      aLine(''),
      makeTable(
        ['', 'Hyperemia (Active)', 'Congestion (Passive)'],
        [
          ['Mechanism', 'Arteriolar dilation', 'Impaired venous drainage'],
          ['Blood', 'Oxygenated (red)', 'Deoxygenated (blue-red)'],
          ['Example', 'Inflammation, exercise', 'CCF, portal hypertension'],
        ]
      ),
      spacer(),
      divider(),

      qLine(31, 'What are the morphologic features of chronic passive venous congestion of the liver ("nutmeg liver")?'),
      aLine('Central veins and sinusoids dilated and congested (right heart failure). Red central zones of congestion alternate with pale periportal areas — gross nutmeg appearance. Microscopically: centrilobular necrosis +/- cardiac cirrhosis (chronic).'),
      divider(),

      qLine(32, "What is a thrombus? What is Virchow's triad?"),
      aLine("A solid mass formed from blood constituents within the vascular system in life. Virchow's triad:"),
      numbered('Endothelial injury (most important) — atherosclerosis, trauma, inflammation'),
      numbered('Stasis or turbulence — atrial fibrillation, prolonged immobility, aneurysm'),
      numbered('Hypercoagulability — factor V Leiden, antiphospholipid syndrome, pregnancy, malignancy'),
      divider(),

      qLine(33, 'What are the lines of Zahn?'),
      aLine('Alternating pale (platelet + fibrin) and dark (RBC) laminations visible in ante-mortem thrombi in the heart and aorta. Help distinguish ante-mortem thrombus from post-mortem clot (homogeneous "currant jelly" or "chicken fat" — no lines of Zahn).'),
      divider(),

      qLine(34, 'What is an embolism? Classify types.'),
      aLine('A detached intravascular mass (solid, liquid, gas) carried in blood to a site distant from its origin.'),
      bullet('Thromboembolism — most common (DVT to pulmonary embolism)'),
      bullet('Fat embolism — long bone fractures, liposuction'),
      bullet('Air/gas embolism — IV lines, decompression sickness (caisson disease)'),
      bullet('Amniotic fluid embolism — obstetric emergency (DIC)'),
      bullet('Tumor embolism'),
      bullet('Septic embolism — infective endocarditis'),
      divider(),

      qLine(35, 'What is an infarct? What factors determine its severity?'),
      aLine('An area of ischemic necrosis caused by occlusion of arterial supply or venous drainage.'),
      aLine('Factors: nature of blood supply (dual = more resistant); rate of occlusion; tissue vulnerability (neurons 3-5 min, myocardium 20-30 min); oxygen-carrying capacity.'),
      bullet('Red (hemorrhagic) infarcts: loose tissue, dual supply, venous occlusion (lung, small bowel, testes)'),
      bullet('White (anemic) infarcts: solid tissue, end-artery (heart, spleen, kidney)'),
      divider(),

      qLine(36, 'What is DIC (Disseminated Intravascular Coagulation)?'),
      aLine('Systemic activation of coagulation -> widespread microthrombi -> consumption of clotting factors and platelets -> paradoxical bleeding.'),
      aLine('Causes: obstetric complications, sepsis (gram-negative), massive trauma, malignancy (APML).'),
      aLine('Lab findings: low platelets, raised PT/PTT, raised D-dimers, low fibrinogen, schistocytes on smear.'),

      // ═══ SECTION 5: Neoplasia ═══
      h1('5. Neoplasia'),

      qLine(37, 'Define neoplasm. Distinguish benign from malignant.'),
      aLine('A neoplasm (Willis) is "an abnormal mass of tissue the growth of which exceeds and is uncoordinated with that of normal tissues and persists after cessation of the stimuli which evoked the change."'),
      aLine(''),
      makeTable(
        ['Feature', 'Benign', 'Malignant'],
        [
          ['Growth rate', 'Slow', 'Rapid'],
          ['Borders', 'Well-defined, encapsulated', 'Irregular, infiltrating'],
          ['Differentiation', 'Well-differentiated', 'Variable to anaplastic'],
          ['Mitoses', 'Rare, normal', 'Frequent, atypical'],
          ['Necrosis', 'Absent', 'Often present'],
          ['Metastasis', 'Never', 'Hallmark'],
          ['Recurrence', 'Rare', 'Common'],
        ]
      ),
      spacer(),
      divider(),

      qLine(38, 'What is the difference between hyperplasia, metaplasia, and dysplasia?'),
      bullet('Hyperplasia — increased number of cells; reversible, stimulus-dependent'),
      bullet('Metaplasia — replacement of one cell type by another; reversible; pre-malignant risk if persistent'),
      bullet('Dysplasia — disordered growth with loss of uniformity; considered pre-neoplastic; features include nuclear pleomorphism, increased mitoses, abnormal differentiation'),
      divider(),

      qLine(39, 'Define and explain anaplasia.'),
      aLine('Lack of differentiation in malignant tumors. Features:'),
      bullet('Pleomorphism — variable size and shape of cells and nuclei'),
      bullet('Hyperchromasia — dark-staining nuclei with coarse chromatin'),
      bullet('Increased nuclear:cytoplasmic (N:C) ratio'),
      bullet('Abnormal mitoses — tripolar, ring-shaped spindles'),
      bullet('Tumor giant cells'),
      bullet('Loss of polarity — disordered arrangement'),
      divider(),

      qLine(40, 'What are the routes of metastasis?'),
      numbered('Lymphatic spread — most common for carcinomas; regional nodes first'),
      numbered('Hematogenous spread — most common for sarcomas; via veins (portal to liver; IVC to lungs)'),
      numbered('Seeding of body cavities (transcoelomic) — ovarian cancer -> peritoneal spread ("omental cake")'),
      numbered('Perineural spread — adenoid cystic carcinoma, prostate cancer'),
      numbered('Direct extension'),
      divider(),

      qLine(41, 'What are the hallmarks of cancer? (Hanahan & Weinberg)'),
      numbered('Sustaining proliferative signaling'),
      numbered('Evading growth suppressors'),
      numbered('Resisting cell death'),
      numbered('Enabling replicative immortality'),
      numbered('Inducing angiogenesis'),
      numbered('Activating invasion and metastasis'),
      numbered('Reprogramming energy metabolism (Warburg effect)'),
      numbered('Evading immune destruction'),
      numbered('Tumor-promoting inflammation'),
      numbered('Genomic instability and mutation'),
      divider(),

      qLine(42, 'What are oncogenes and tumor suppressor genes? Give examples.'),
      aLine('Oncogenes (gain-of-function; dominant):'),
      bullet('RAS — most commonly mutated oncogene (colorectal, pancreatic)'),
      bullet('MYC — Burkitt lymphoma (t[8;14])'),
      bullet('HER2/NEU — breast cancer'),
      bullet('BCL-ABL — CML (Philadelphia chromosome t[9;22])'),
      bullet('EGFR — lung adenocarcinoma'),
      aLine('Tumor suppressor genes (loss-of-function; recessive — "two-hit hypothesis"):'),
      bullet('TP53 — most commonly mutated TSG; Li-Fraumeni syndrome'),
      bullet('RB1 — retinoblastoma (familial bilateral)'),
      bullet('APC — FAP (colorectal)'),
      bullet('BRCA1/2 — breast, ovarian cancer'),
      bullet('CDKN2A (p16) — melanoma, pancreatic cancer'),
      divider(),

      qLine(43, 'What is the "two-hit hypothesis"?'),
      aLine('Proposed by Knudson for retinoblastoma. Both alleles of RB1 must be inactivated for tumor development.'),
      aLine('Hereditary form: first hit is germline (inherited), second is somatic mutation -> early onset, bilateral.'),
      aLine('Sporadic form: both hits are somatic -> late onset, unilateral.'),
      divider(),

      qLine(44, 'What is the role of p53?'),
      aLine('Dubbed "guardian of the genome." In response to DNA damage:'),
      bullet('Activates CDKN1A (p21) -> G1 arrest (allows repair)'),
      bullet('Activates DNA repair genes'),
      bullet('If damage irreparable -> activates BAX -> apoptosis'),
      bullet('Mutated in >50% of human cancers; germline mutation -> Li-Fraumeni syndrome'),
      divider(),

      qLine(45, 'What is the Warburg effect?'),
      aLine('Even in the presence of oxygen, cancer cells preferentially use aerobic glycolysis rather than oxidative phosphorylation. This provides carbon skeletons for biosynthesis needed for rapid proliferation. This is the basis of FDG-PET imaging.'),
      divider(),

      qLine(46, 'What are paraneoplastic syndromes? Give examples.'),
      aLine('Clinical manifestations not due to direct tumor invasion/metastasis but to ectopic hormone production or immune mechanisms.'),
      makeTable(
        ['Syndrome', 'Mediator', 'Tumor'],
        [
          ['Hypercalcemia', 'PTHrP', 'Squamous cell lung, breast, renal'],
          ['SIADH', 'ADH', 'Small cell lung carcinoma'],
          ['Cushing syndrome', 'ACTH', 'Small cell lung carcinoma'],
          ['Polycythemia', 'EPO', 'Renal cell carcinoma, cerebellar hemangioblastoma'],
          ['Eaton-Lambert syndrome', 'Anti-VGCC antibodies', 'Small cell lung carcinoma'],
          ['Acanthosis nigricans', 'TGF-alpha', 'Gastric, lung carcinoma'],
          ["Trousseau's sign (migratory thrombophlebitis)", 'Mucin', 'Pancreatic adenocarcinoma'],
        ]
      ),
      spacer(),

      // ═══ SECTION 6: Immunopathology ═══
      h1('6. Immunopathology & Amyloidosis'),

      qLine(47, 'What is a hypersensitivity reaction? Classify (Gell & Coombs).'),
      aLine(''),
      makeTable(
        ['Type', 'Name', 'Mechanism', 'Example'],
        [
          ['I', 'Anaphylactic/Immediate', 'IgE + mast cells', 'Anaphylaxis, asthma, urticaria'],
          ['II', 'Cytotoxic', 'IgG/IgM + complement', 'AIHA, Goodpasture syndrome'],
          ['III', 'Immune complex', 'IgG complexes + complement', 'SLE, serum sickness, post-strep GN'],
          ['IV', 'Delayed/Cell-mediated', 'T lymphocytes', 'TB (Mantoux), contact dermatitis, graft rejection'],
        ]
      ),
      spacer(),
      divider(),

      qLine(48, 'What is autoimmunity? Give mechanisms and examples.'),
      aLine('Immune response directed against self-antigens. Mechanisms:'),
      bullet('Breakdown of self-tolerance (failure of clonal deletion/anergy)'),
      bullet('Molecular mimicry — e.g., rheumatic fever (streptococcal M protein mimics cardiac myosin)'),
      bullet('Bystander activation and epitope spreading'),
      aLine('Examples: SLE (anti-dsDNA, anti-Sm), RA (anti-CCP, RF), Hashimoto thyroiditis, type 1 DM, myasthenia gravis.'),
      divider(),

      qLine(49, 'What is amyloidosis? How is amyloid identified?'),
      aLine('Abnormal extracellular deposition of misfolded proteins in a beta-pleated sheet configuration.'),
      makeTable(
        ['Type', 'Protein', 'Associated condition'],
        [
          ['AL (primary)', 'Immunoglobulin light chains', 'Multiple myeloma, plasma cell dyscrasias'],
          ['AA (secondary)', 'Serum amyloid A protein', 'Chronic inflammation (TB, RA, Crohn\'s)'],
          ['Abeta', 'Beta-amyloid', 'Alzheimer\'s disease'],
          ['ATTR', 'Transthyretin', 'Senile systemic, familial amyloidosis'],
          ['Abeta2M', 'Beta2-microglobulin', 'Long-term dialysis'],
        ]
      ),
      spacer(),
      aLine('Identification:'),
      bullet('H&E: amorphous eosinophilic deposits'),
      bullet('Congo red stain -> apple-green birefringence under POLARIZED LIGHT (most specific)'),
      bullet('Thioflavine T/S -> yellow-green fluorescence'),
      bullet('EM: non-branching fibrils, 7.5-10 nm diameter'),

      // ═══ SECTION 7: Genetic ═══
      h1('7. Genetic Disorders'),

      qLine(50, 'Classify genetic disorders.'),
      numbered('Single-gene (Mendelian): AD (Marfan, NF1), AR (cystic fibrosis, PKU), X-linked (hemophilia, DMD)'),
      numbered('Chromosomal disorders: trisomies (Down, Edwards, Patau), monosomy (Turner\'s), sex chromosome (Klinefelter\'s)'),
      numbered('Multifactorial: polygenic + environment (diabetes, hypertension, congenital heart disease)'),
      numbered('Mitochondrial: maternal inheritance (MELAS, Leber\'s optic neuropathy)'),
      numbered('Trinucleotide repeat disorders: anticipation (Huntington\'s, fragile X, myotonic dystrophy)'),
      divider(),

      qLine(51, 'What is the difference between deletion, translocation, and inversion?'),
      bullet('Deletion — loss of chromosomal segment (e.g., 5p deletion -> cri-du-chat)'),
      bullet('Translocation — segment moved to another chromosome; balanced (no loss) vs. unbalanced'),
      bullet('Inversion — segment reversed; pericentric (includes centromere) vs. paracentric'),
      bullet('Isochromosome — abnormal chromosome with identical arms'),
      bullet('Ring chromosome — ends of chromosome fuse'),
      divider(),

      qLine(52, 'What is genomic imprinting? Give an example.'),
      aLine('Epigenetic phenomenon where gene expression depends on parental origin. The same deletion at 15q11-13 causes:'),
      bullet('Prader-Willi syndrome — if paternal chromosome 15 is deleted (maternal allele silenced by imprinting)'),
      bullet('Angelman syndrome — if maternal chromosome 15 is deleted (paternal allele silenced by imprinting)'),

      // ═══ SECTION 8: Stains ═══
      h1('8. Special Stains — Quick Reference'),

      new Paragraph({
        spacing: { before: 120, after: 160 },
        children: [new TextRun({ text: 'Commonly asked in practicals and viva examinations:', size: 22, italics: true, color: '555555' })],
      }),

      makeTable(
        ['Stain / Test', 'What it identifies', 'Color produced'],
        [
          ['PAS (Periodic acid-Schiff)', 'Glycogen, fungi, mucus', 'Magenta/pink'],
          ['Congo red (polarized)', 'Amyloid', 'Apple-green birefringence'],
          ['Ziehl-Neelsen (ZN)', 'Acid-fast bacilli (TB, leprosy)', 'Red bacilli on blue background'],
          ['Grocott methenamine silver (GMS)', 'Fungi, Pneumocystis', 'Black fungi on green background'],
          ['Von Kossa', 'Calcium deposits', 'Black'],
          ['Prussian blue (Perls)', 'Hemosiderin (iron)', 'Blue'],
          ['Sudan IV / Oil Red O', 'Lipids/fat', 'Red/orange'],
          ['Reticulin (silver)', 'Reticular fibers', 'Black fibers'],
          ["Masson's trichrome", 'Collagen vs. muscle', 'Collagen blue-green, muscle red'],
          ['Alcian blue', 'Acid mucopolysaccharides', 'Blue'],
          ['Thioflavine T', 'Amyloid', 'Yellow-green fluorescence'],
          ['Toluidine blue', 'Mast cell granules, cartilage', 'Metachromatic purple'],
          ['Giemsa', 'Parasites, H. pylori, blood cells', 'Variable'],
          ['Orcein/Elastic stain', 'Elastic fibers', 'Brown/purple'],
        ]
      ),
      spacer(),

      // ═══ EXAMINER TIPS ═══
      h1('Examiner Tips for the Viva'),

      new Paragraph({
        spacing: { before: 120, after: 100 },
        children: [new TextRun({ text: 'Key strategies to score high:', bold: true, size: 24, color: '1F3864' })],
      }),
      bullet('Always start answers by defining the term asked.'),
      bullet('For necrosis questions, know the histology AND the clinical example.'),
      bullet("For neoplasia, be ready to compare benign vs. malignant and give examples for each feature."),
      bullet('Know the four cardinal signs of inflammation and explain each at the molecular level.'),
      bullet("Virchow's triad is must-know for every thrombosis question."),
      bullet('When asked about staining, mention the stain name, color produced, AND what it identifies.'),
      bullet('Link granuloma always to TB vs. sarcoidosis — examiners test the distinction repeatedly.'),
      bullet("For genetics, always know the mode of inheritance and a classic example."),
      bullet("p53 and RB1 are the two most commonly asked tumor suppressor genes — know their mechanisms."),
      bullet("For hypersensitivity, memorize one strong example per type (Types I-IV)."),
      spacer(),
      divider(),
      new Paragraph({
        alignment: AlignmentType.CENTER,
        spacing: { before: 240, after: 120 },
        children: [new TextRun({ text: 'Source: Robbins & Kumar Basic Pathology, 10th Edition  |  Robbins & Cotran Pathologic Basis of Disease, 10th Edition', size: 18, italics: true, color: '888888' })],
      }),
    ],
  }],
});

Packer.toBuffer(doc).then(buffer => {
  fs.writeFileSync('/home/daytona/workspace/gen-path-viva/General_Pathology_Viva_QA.docx', buffer);
  console.log('SUCCESS: Document created.');
});
Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.
This is a shared conversation. Sign in to Orris to start your own chat.