attachment
attachment

This is 2nd sessional exam topic of medicine final yer mbbs

Asking for Preferences
Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Here is your complete IInd Sessional Exam Study Package - Final Year MBBS Medicine covering all three sections with notes, important exam questions, and mnemonics.

πŸ«€ SECTION 1: CARDIOVASCULAR


A. HEART FAILURE

Definition & Types

  • HFrEF (Heart Failure with Reduced EF): EF < 40% - systolic failure
  • HFpEF (Heart Failure with Preserved EF): EF β‰₯ 50% - diastolic failure
  • HFmrEF (Mid-range EF): EF 40-49%

NYHA Functional Classification (MUST KNOW)

ClassSymptoms
INo symptoms with ordinary activity
IISlight limitation - comfortable at rest
IIIMarked limitation - comfortable only at rest
IVSymptoms at rest - unable to carry any activity

ACC/AHA Staging (A β†’ B β†’ C β†’ D)

StageDescription
ARisk factors, no structural disease
BStructural disease, no symptoms
CStructural disease + current/prior symptoms
DRefractory HF requiring advanced therapy

Clinical Features

  • Left HF: Dyspnea, orthopnea, PND, basal crepitations, S3 gallop, displaced apex beat
  • Right HF: JVP raised, pitting edema, hepatomegaly, ascites

Investigations

  • CXR: Cardiomegaly, Kerley B lines, pulmonary edema
  • ECG: LVH, LBBB
  • Echo: EF assessment (gold standard)
  • BNP/NT-proBNP: raised (best biomarker)

Treatment of HFrEF - "BANANA" Drugs

B - Beta blockers (carvedilol, bisoprolol, metoprolol) A - ACE inhibitors / ARBs (enalapril, ramipril, losartan) N - Nitrates (for symptom relief) A - Aldosterone antagonists (spironolactone, eplerenone) N - Neprilysin inhibitor + ARB = Sacubitril/valsartan (ARNI) A - SGLT2 inhibitors (dapagliflozin, empagliflozin) - newer addition
  • Diuretics (furosemide) for fluid overload symptom relief
  • ICD/CRT for EF < 35%

B. ISCHEMIC HEART DISEASE (IHD)

Angina Types

TypeFeatures
StableExertional, relieved by rest/nitrates, fixed threshold
UnstableRest angina, new onset, crescendo pattern - MEDICAL EMERGENCY
Prinzmetal/VariantCoronary vasospasm, ST elevation, occurs at rest/night

Acute MI - Key Points

STEMI vs NSTEMI:
  • STEMI: ST elevation β‰₯ 1 mm (limb) / β‰₯ 2 mm (precordial) + troponin rise
  • NSTEMI: Troponin rise + ischemic symptoms, NO ST elevation
Biomarker Timeline:
MarkerRisePeakNormalize
Troponin I/T3-6 h12-24 h10-14 days
CK-MB4-8 h18-24 h48-72 h
Myoglobin1-3 h6-8 h24 h (earliest)
ECG changes in MI:
  • Hyperacute T waves (minutes)
  • ST elevation (hours)
  • Q waves (hours to days) - permanent
  • T wave inversion (days to weeks)
Complications of MI - DRESSLER syndrome (weeks later: fever, pleuritis, pericarditis) Mechanical complications: Papillary muscle rupture (MR), VSD, free wall rupture (day 3-5)

Treatment of STEMI

"MONA-B"
  • M - Morphine (pain relief)
  • O - Oxygen (if SpO2 < 90%)
  • N - Nitrates (sublingual)
  • A - Aspirin 300 mg stat + Clopidogrel/Ticagrelor
  • B - Beta blocker
Reperfusion: Primary PCI (within 90 min) > Thrombolysis (streptokinase, tPA - within 12 h)

C. HYPERTENSION

Classification (JNC 8 / ACC/AHA 2017)

CategorySystolicDiastolic
Normal< 120< 80
Elevated120-129< 80
Stage 1 HTN130-13980-89
Stage 2 HTNβ‰₯ 140β‰₯ 90
Hypertensive Crisis> 180> 120
Hypertensive Urgency (no end organ damage) vs Emergency (with end organ damage - eyes, brain, heart, kidneys)

Secondary Hypertension Causes

  • Renal: Renovascular (renal artery stenosis), CKD
  • Endocrine: Conn's (primary hyperaldosteronism), Cushing's, phaeochromocytoma
  • Coarctation of aorta

Treatment

  • First line: ACE inhibitor/ARB, CCB (amlodipine), Thiazide diuretic
  • DM + HTN: ACE inhibitor preferred (nephroprotective)
  • Heart failure + HTN: ACE inhibitor + beta blocker
  • HTN emergency: IV labetalol, sodium nitroprusside, IV nicardipine

D. VALVULAR HEART DISEASE

Valve LesionClassic FindingMurmur
Mitral StenosisLoud S1, Opening snapMid-diastolic rumble (apex)
Mitral RegurgitationSoft S1Pan-systolic at apex, radiates to axilla
Aortic StenosisSlow-rising pulse, narrow pulse pressureEjection systolic (aortic area) radiates to neck
Aortic RegurgitationWide pulse pressure, Corrigan's pulseEarly diastolic (left sternal border)
Most common cause of Mitral Stenosis: Rheumatic fever Mnemonic for MS features - "FRIGHT" F - Finger clubbing absent (no clubbing) R - Right heart failure (late) I - INR monitoring (if AF develops) G - Graham-Steell murmur (pulmonary regurgitation) H - Hemoptysis T - Thrombus in left atrium (AF risk)

E. COMMON ARRHYTHMIAS

Atrial Fibrillation

  • Irregularly irregular pulse, absent P waves on ECG
  • CHADS2-VASc score for stroke risk (anticoagulation decision)
  • Treatment: Rate control (beta blocker/digoxin) vs Rhythm control (amiodarone, cardioversion)

ECG Mnemonics

Causes of prolonged QT - "HALT" H - Hypocalcemia, Hypokalemia, Hypomagnesemia A - Amiodarone, Antipsychotics L - LQTS (congenital) T - Tricyclics

🩸 SECTION 2: HEMATOLOGY


A. ANEMIA - CLASSIFICATION & KEY FEATURES

Microcytic Anemia (MCV < 80 fL)

1. Iron Deficiency Anemia (IDA) - MOST COMMON
LabIDAThalassemiaACD
Serum Ferritin↓↓ (most sensitive)Normal/↑↑
Serum Iron↓Normal↓
TIBC↑Normal↓
Transferrin sat↓Normal↓
IDA Features: Koilonychia (spoon nails), angular stomatitis, atrophic glossitis, Plummer-Vinson syndrome (IDA + dysphagia + esophageal web)
Treatment: Ferrous sulfate 200 mg TID x 3-6 months (continue 3 months after Hb normalizes to replenish stores)
2. Thalassemia
  • Beta thalassemia major: severe hemolytic anemia from infancy, requires regular transfusions; skull X-ray shows "hair on end" appearance
  • Beta thalassemia trait (minor): mild microcytic anemia, Hb A2 > 3.5% (diagnostic)
  • Target cells, basophilic stippling on blood film

Macrocytic Anemia (MCV > 100 fL)

Megaloblastic Anemia (B12 or Folate deficiency)
  • Pernicious Anemia: anti-intrinsic factor antibodies, anti-parietal cell antibodies, B12 deficiency
  • Peripheral smear: Hypersegmented neutrophils (β‰₯ 5 lobes in 1 cell or β‰₯ 2 cells with 6 lobes) - PATHOGNOMONIC
  • B12 deficiency only: Subacute Combined Degeneration of Spinal Cord (SACDSC) - dorsal and lateral column damage
  • Treatment: IM Cyanocobalamin / Hydroxocobalamin
B12 vs Folate Deficiency:
FeatureB12Folate
Neurological featuresYES (SACDSC)No
Serum level↓Normal
CausesPernicious anemia, gastrectomy, terminal ileal diseasePoor diet, pregnancy, methotrexate, alcohol

Normocytic Anemia

  • Aplastic anemia, acute blood loss, hemolytic anemia, anemia of CKD

B. HEMOLYTIC ANEMIAS

Intravascular vs Extravascular Hemolysis

FeatureIntravascularExtravascular
HemoglobinuriaYESNo
HemoglobinemiaYESNo
JaundiceMildProminent
SplenomegalyAbsent/mildPresent
CausesG6PD, PNH, transfusion reactionSpherocytosis, sickle cell

Sickle Cell Disease

  • Valine replaces Glutamic acid at position 6 of beta-globin chain (Gluβ†’Val)
  • Crisis types: Vaso-occlusive (pain), Splenic sequestration, Aplastic crisis (Parvovirus B19)
  • Features: Autosplenectomy, susceptibility to encapsulated organisms (Pneumococcus, H. influenzae, Meningococcus)
  • Diagnosis: Hb electrophoresis (HbS)
  • Treatment of crisis: IV fluids, analgesia, oxygen; Hydroxyurea (reduces HbS, increases HbF)

G6PD Deficiency

  • X-linked recessive (affects males primarily)
  • Triggered by: oxidants (primaquine, dapsone, fava beans, infection)
  • Blood film: Heinz bodies, "bite cells"
  • Self-limiting hemolysis

C. LEUKEMIAS

Acute vs Chronic

FeatureALLAMLCLLCML
AgeChildrenAdults (any)ElderlyMiddle age
CellB/T lymphoblastMyeloblastB lymphocyteGranulocyte
Key featureMost common pediatric leukemiaAuer rodsSmudge cellsPhiladelphia chromosome
MarkerCD10 (CALLA)MPO+CD5, CD23BCR-ABL t(9;22)
Auer Rods - pathognomonic of AML (particularly M3 - APL) Philadelphia chromosome (t9;22) - CML (also in some ALL) Smudge cells - CLL Blast crisis - CML transformation to acute leukemia

Treatment Overview

  • ALL: Vincristine, prednisolone, L-asparaginase, methotrexate
  • AML: Cytarabine + anthracycline (7+3 regimen)
  • CML: Imatinib (tyrosine kinase inhibitor targeting BCR-ABL) - first line
  • CLL: Chlorambucil, fludarabine, rituximab

D. LYMPHOMAS

FeatureHodgkin LymphomaNon-Hodgkin Lymphoma
AgeBimodal (20s, >50s)Any, more common in elderly
SpreadContiguous, predictableNon-contiguous
Reed-Sternberg cellsYES - pathognomonicNo
B symptomsCommonLess common
PrognosisGenerally betterVariable
TreatmentABVD + RadiotherapyCHOP + Rituximab (R-CHOP)
Reed-Sternberg cells: Large binucleate cells with prominent "owl-eye" nucleoli
Ann Arbor Staging (I-IV)
  • Stage I: Single lymph node region
  • Stage II: β‰₯ 2 regions, same side of diaphragm
  • Stage III: Both sides of diaphragm
  • Stage IV: Extranodal involvement (liver, bone marrow)
"B symptoms" (constitutional): Fever >38Β°C, Night sweats, Weight loss >10% in 6 months

E. COAGULATION DISORDERS

ConditionPTAPTTPlateletsSpecific
Hemophilia A (Factor VIII)Normal↑NormalFactor VIII assay
Hemophilia B (Factor IX)Normal↑NormalFactor IX assay
von Willebrand DiseaseNormal↑ (usually)Normal/↓vWF antigen ↓
ITPNormalNormal↓↓Anti-platelet antibodies
DIC↑↑↓D-dimer ↑, fibrinogen ↓
Warfarin toxicity↑↑NormalVitamin K antagonist
Hemophilia A Treatment: Factor VIII concentrate; Desmopressin (DDAVP) for mild cases ITP Treatment: Steroids (first line), IVIG, rituximab, splenectomy (last resort)

🦴 SECTION 3: CONNECTIVE TISSUE RHEUMATOLOGY


A. RHEUMATOID ARTHRITIS (RA)

ACR/EULAR 2010 Criteria (score β‰₯ 6/10 = definite RA)

  • Joint involvement (up to 5 points)
  • Serology: RF/Anti-CCP (up to 3 points) - Anti-CCP more specific
  • Acute phase reactants: CRP/ESR (up to 1 point)
  • Duration β‰₯ 6 weeks (1 point)

Clinical Features

  • Symmetrical polyarthritis of small joints (MCP, PIP - spares DIP)
  • Morning stiffness > 1 hour (key feature)
  • Deformities: Ulnar deviation, Boutonniere deformity, Swan neck deformity, Z-thumb
  • Extra-articular: Rheumatoid nodules, pleural effusion, pericarditis, Felty's syndrome (RA + splenomegaly + neutropenia), scleritis

Treatment - "STEP UP"

S - Simple analgesia (NSAIDs for symptom relief) T - Traditional DMARDs: Methotrexate (first-line DMARD), hydroxychloroquine, sulfasalazine, leflunomide E - Escalation to biologic DMARDs: Anti-TNF (etanercept, adalimumab, infliximab), anti-IL6 (tocilizumab), anti-CD20 (rituximab) P - Prednisolone (short-term bridging during DMARD initiation)
Methotrexate side effects: Hepatotoxicity, bone marrow suppression, pneumonitis - give folic acid supplement

B. SYSTEMIC LUPUS ERYTHEMATOSUS (SLE)

ACR Criteria - Mnemonic "DOPAMINE RASH" (need 4/11)

D - Discoid rash O - Oral ulcers P - Photosensitivity A - Anti-nuclear antibody (ANA) - sensitive but not specific M - Malar rash ("butterfly" rash - spares nasolabial folds) I - Immunologic: Anti-dsDNA (specific), Anti-Sm (most specific), antiphospholipid antibodies N - Neurologic (seizures, psychosis) E - EMLA (ahem) - not used; Serositis (pleuritis, pericarditis)
Better mnemonic: "MD SOAP BRAIN"
  • Malar rash, Discoid rash, Serositis, Oral ulcers, Arthritis, Photosensitivity, Blood (hemolytic anemia/leukopenia/thrombocytopenia), Renal (>0.5g proteinuria), ANA, Immunologic, Neurologic

Antibodies in SLE

AntibodySignificance
ANASensitive screening test (95%+), not specific
Anti-dsDNASpecific for SLE, correlates with disease activity
Anti-SmMost specific (30-40% sensitivity)
Anti-Ro (SS-A)Neonatal lupus, subacute cutaneous lupus
Anti-phospholipidThrombosis, recurrent miscarriages

Lupus Nephritis - WHO/ISN Classes I-VI

  • Class III/IV (diffuse proliferative) = worst prognosis, most common to require aggressive treatment
  • Treatment: Mycophenolate + steroids (Class III/IV), hydroxychloroquine for all

C. SYSTEMIC SCLEROSIS (SCLERODERMA)

Limited vs Diffuse

FeatureLimited (lcSSc)Diffuse (dcSSc)
SkinDistal to elbows/faceProximal + trunk
CRESTYesNo
AntibodyAnti-centromereAnti-Scl-70 (topoisomerase I)
PrognosisBetterWorse
PAHLate complicationLess common
CREST Syndrome: Calcinosis, Raynaud's, Esophageal dysmotility, Sclerodactyly, Telangiectasia
Raynaud's Phenomenon: White β†’ Blue β†’ Red (ischemia β†’ cyanosis β†’ reperfusion); first manifestation in most patients

D. INFLAMMATORY MYOPATHIES

FeaturePolymyositisDermatomyositis
RashAbsentHeliotrope rash (eyelids), Gottron's papules (knuckles)
WeaknessProximalProximal
CPKElevatedElevated
EMGMyopathicMyopathic
MalignancyLessHigher association
TreatmentSteroids Β± methotrexateSteroids Β± methotrexate

E. GOUT & PSEUDOGOUT

Gout

  • Hyperuricemia + uric acid crystal deposition (monosodium urate)
  • Joints: 1st MTP (podagra) - MOST CLASSIC; also ankle, knee
  • Blood film/Crystal analysis: Negatively birefringent needle-shaped crystals
  • Radiograph: "Punched out" lesions with sclerotic margins, overhanging edges (NOT touching joint space - unlike RA)
  • Tophus: Urate deposits at helix of ear, Achilles tendon, olecranon bursa

Treatment

PhaseDrug
Acute attackColchicine (first line), NSAIDs, Steroids
Chronic/preventionAllopurinol (xanthine oxidase inhibitor) - start AFTER acute attack resolves
FebuxostatAlternative to allopurinol
Do NOT start allopurinol during acute attack - can worsen or prolong it

Pseudogout (CPPD)

  • Calcium pyrophosphate crystals: Positively birefringent, rhomboid-shaped
  • Chondrocalcinosis on X-ray (calcification of cartilage, especially knee menisci)
  • Associated with hemochromatosis, hyperparathyroidism, hypothyroidism

F. VASCULITIS

Classification by Vessel Size

Vessel SizeDisease
LargeGiant Cell Arteritis (GCA), Takayasu's arteritis
MediumPolyarteritis nodosa (PAN), Kawasaki disease
SmallANCA-associated: Granulomatosis with Polyangiitis (GPA/Wegener's), Microscopic Polyangiitis, Eosinophilic GPA (Churg-Strauss)
Small (immune complex)Henoch-Schonlein Purpura (IgA), cryoglobulinemia
GCA: Elderly >50 yrs; temporal headache, jaw claudication, visual loss; ESR markedly elevated; treat with high-dose prednisolone IMMEDIATELY (to prevent blindness); Biopsy: granulomatous inflammation with giant cells Takayasu's: Young Asian females; "pulseless disease"; upper limb BP difference

πŸ“ TOP EXAM QUESTIONS (Likely Asked)

Long Questions (10 marks)

  1. Describe the clinical features, investigations and management of heart failure
  2. Classify anemia. Describe the pathophysiology, clinical features and treatment of iron deficiency anemia
  3. Discuss SLE - criteria, clinical manifestations, antibody profile and treatment
  4. Describe the etiopathogenesis, clinical features and management of RA
  5. Write about acute MI - classification, ECG changes, complications and treatment

Short Notes (5 marks)

  1. NYHA classification of heart failure
  2. Reed-Sternberg cell and Hodgkin's lymphoma
  3. Philadelphia chromosome and CML
  4. ACR criteria for SLE
  5. CREST syndrome
  6. Gout - pathophysiology and treatment
  7. DIC - coagulation profile and management
  8. Sickle cell crisis - types and management
  9. Pernicious anemia
  10. Hypertensive emergency vs urgency

One-Liners / Very Short

  • Most sensitive test for IDA: Serum ferritin
  • Most specific antibody in SLE: Anti-Sm
  • Pathognomonic cells in AML: Auer rods
  • Pathognomonic cells in CLL: Smudge cells
  • Pathognomonic cells in Hodgkin's: Reed-Sternberg cells (owl-eye appearance)
  • Crystal in gout: Negatively birefringent, needle-shaped
  • Crystal in pseudogout: Positively birefringent, rhomboid
  • First-line DMARD in RA: Methotrexate
  • TKI for CML: Imatinib (Gleevec)
  • Treatment to prevent blindness in GCA: Immediate high-dose steroids

🧠 MASTER MNEMONICS SUMMARY

TopicMnemonic
Heart failure drugs (HFrEF)BANANA (Beta blocker, ACE/ARB, Nitrates, Aldosterone antag., ARNI, SGLT2i)
Acute MI treatmentMONA-B (Morphine, Oxygen, Nitrates, Aspirin, Beta blocker)
SLE criteriaMD SOAP BRAIN (Malar, Discoid, Serositis, Oral ulcers, Arthritis, Photosensitivity, Blood, Renal, ANA, Immunologic, Neurologic)
CREST syndromeC-R-E-S-T
B symptoms lymphomaFaN (Fever, Night sweats, iNvoluntary weight loss)
Raynaud's colorWBR = "Will Be Red" (White-Blue-Red)
Ann Arbor staging1 = One node region, 2 = both sides same diaphragm level...
Gout crystalNegative = Needles, Positive = Pseudogout Rhomboids

Sources: Harrison's Principles of Internal Medicine 22E (2025) - McGraw Hill; Goldman-Cecil Medicine International Edition; Katzung's Basic & Clinical Pharmacology 16E; Quick Compendium of Clinical Pathology 5E; Washington Manual of Medical Therapeutics; Firestein & Kelley's Textbook of Rheumatology

Good luck with your 2nd sessional! Focus especially on the classification tables, criteria (SLE/RA/Ann Arbor), and the drug mnemonics - those are exam favorites. Let me know if you want me to go deeper into any specific topic.

Create a Word document summary I can print for revision

Reading File
Running Command

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

Running Command

mkdir -p /home/daytona/workspace/mbbs-revision && ls /home/daytona/workspace/mbbs-revision

Writing File

~/mbbs-revision/generate_doc.js

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

// ─── Color palette ───────────────────────────────────────────────────────────
const C = {
  red:    "C0392B",  // cardiovascular
  blue:   "1A5276",  // hematology
  green:  "1E8449",  // rheumatology
  dark:   "212121",
  white:  "FFFFFF",
  lightRed:  "FADBD8",
  lightBlue: "D6EAF8",
  lightGreen:"D5F5E3",
  lightGrey: "F2F3F4",
  midGrey:   "D5D8DC",
  yellow:    "FFF9C4",
  orange:    "F39C12",
};

// ─── Helpers ──────────────────────────────────────────────────────────────────
function coloredHeading(text, color, level = HeadingLevel.HEADING_1) {
  return new Paragraph({
    heading: level,
    spacing: { before: 240, after: 80 },
    children: [
      new TextRun({ text, bold: true, color, size: level === HeadingLevel.HEADING_1 ? 32 : 26 })
    ]
  });
}

function sectionBanner(text, bgColor) {
  return new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({
        children: [
          new TableCell({
            shading: { fill: bgColor, type: ShadingType.CLEAR },
            margins: { top: 100, bottom: 100, left: 200, right: 200 },
            children: [new Paragraph({
              alignment: AlignmentType.CENTER,
              children: [new TextRun({ text, bold: true, color: C.white, size: 32 })]
            })]
          })
        ]
      })
    ]
  });
}

function subHeading(text, color) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_2,
    spacing: { before: 180, after: 60 },
    children: [new TextRun({ text, bold: true, color, size: 24 })]
  });
}

function subSubHeading(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_3,
    spacing: { before: 120, after: 40 },
    children: [new TextRun({ text, bold: true, color: C.dark, size: 22 })]
  });
}

function para(text, opts = {}) {
  return new Paragraph({
    spacing: { before: 40, after: 40 },
    children: [new TextRun({ text, size: 20, color: C.dark, ...opts })]
  });
}

function bullet(text, level = 0) {
  return new Paragraph({
    bullet: { level },
    spacing: { before: 30, after: 30 },
    children: [new TextRun({ text, size: 20 })]
  });
}

function boldBullet(label, value, color = C.dark) {
  return new Paragraph({
    bullet: { level: 0 },
    spacing: { before: 30, after: 30 },
    children: [
      new TextRun({ text: label + ": ", bold: true, size: 20, color }),
      new TextRun({ text: value, size: 20 })
    ]
  });
}

function mnemonicBox(title, items) {
  const rows = [
    new TableRow({
      children: [
        new TableCell({
          columnSpan: 2,
          shading: { fill: C.yellow, type: ShadingType.CLEAR },
          margins: { top: 80, bottom: 80, left: 160, right: 160 },
          children: [new Paragraph({ children: [new TextRun({ text: "🧠 MNEMONIC: " + title, bold: true, size: 22, color: C.orange })] })]
        })
      ]
    }),
    ...items.map(item => new TableRow({
      children: [
        new TableCell({
          width: { size: 12, type: WidthType.PERCENTAGE },
          shading: { fill: C.yellow, type: ShadingType.CLEAR },
          margins: { top: 60, bottom: 60, left: 160, right: 80 },
          children: [new Paragraph({ children: [new TextRun({ text: item.letter, bold: true, size: 22, color: C.orange })] })]
        }),
        new TableCell({
          shading: { fill: "FEFEFE", type: ShadingType.CLEAR },
          margins: { top: 60, bottom: 60, left: 160, right: 160 },
          children: [new Paragraph({ children: [new TextRun({ text: item.meaning, size: 20 })] })]
        })
      ]
    }))
  ];
  return new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, rows });
}

function makeTable(headers, rows, headerBg = C.dark, altBg = C.lightGrey) {
  const headerRow = new TableRow({
    tableHeader: true,
    children: headers.map(h => new TableCell({
      shading: { fill: headerBg, type: ShadingType.CLEAR },
      margins: { top: 80, bottom: 80, left: 120, right: 120 },
      verticalAlign: VerticalAlign.CENTER,
      children: [new Paragraph({
        alignment: AlignmentType.CENTER,
        children: [new TextRun({ text: h, bold: true, color: C.white, size: 18 })]
      })]
    }))
  });
  const dataRows = rows.map((row, ri) => new TableRow({
    children: row.map(cell => new TableCell({
      shading: { fill: ri % 2 === 0 ? C.white : altBg, type: ShadingType.CLEAR },
      margins: { top: 60, bottom: 60, left: 120, right: 120 },
      children: [new Paragraph({ children: [new TextRun({ text: cell, size: 18 })] })]
    }))
  }));
  return new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, rows: [headerRow, ...dataRows] });
}

function examBox(questions) {
  const rows = [
    new TableRow({
      children: [
        new TableCell({
          shading: { fill: C.orange, type: ShadingType.CLEAR },
          margins: { top: 80, bottom: 80, left: 160, right: 160 },
          children: [new Paragraph({ children: [new TextRun({ text: "⭐ LIKELY EXAM QUESTIONS", bold: true, size: 22, color: C.white })] })]
        })
      ]
    }),
    ...questions.map((q, i) => new TableRow({
      children: [
        new TableCell({
          shading: { fill: i % 2 === 0 ? "FEF9E7" : "FDEBD0", type: ShadingType.CLEAR },
          margins: { top: 60, bottom: 60, left: 160, right: 160 },
          children: [new Paragraph({ children: [new TextRun({ text: (i+1) + ". " + q, size: 19 })] })]
        })
      ]
    }))
  ];
  return new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, rows });
}

function spacer() {
  return new Paragraph({ spacing: { before: 120, after: 120 }, children: [new TextRun({ text: "" })] });
}

function pageBreak() {
  return new Paragraph({ children: [new PageBreak()] });
}

// ─── BUILD DOCUMENT ─────────────────────────────────────────────────────────
const children = [];

// ── TITLE PAGE ──
children.push(
  new Paragraph({ spacing: { before: 600, after: 200 }, alignment: AlignmentType.CENTER,
    children: [new TextRun({ text: "IInd SESSIONAL EXAM", bold: true, size: 52, color: C.red })] }),
  new Paragraph({ spacing: { before: 100, after: 100 }, alignment: AlignmentType.CENTER,
    children: [new TextRun({ text: "Final Year MBBS β€” Medicine", bold: true, size: 36, color: C.dark })] }),
  new Paragraph({ spacing: { before: 100, after: 400 }, alignment: AlignmentType.CENTER,
    children: [new TextRun({ text: "Quick Revision Notes  |  July 2026", size: 24, color: "888888", italics: true })] }),
  new Table({
    width: { size: 90, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({ children: [
        new TableCell({ shading: { fill: C.red, type: ShadingType.CLEAR }, margins: { top: 120, bottom: 120, left: 200, right: 200 },
          children: [new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text: "1. Cardiovascular", bold: true, color: C.white, size: 26 })] })] }),
        new TableCell({ shading: { fill: C.blue, type: ShadingType.CLEAR }, margins: { top: 120, bottom: 120, left: 200, right: 200 },
          children: [new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text: "2. Hematology", bold: true, color: C.white, size: 26 })] })] }),
        new TableCell({ shading: { fill: C.green, type: ShadingType.CLEAR }, margins: { top: 120, bottom: 120, left: 200, right: 200 },
          children: [new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text: "3. CTD Rheumatology", bold: true, color: C.white, size: 26 })] })] }),
      ]})
    ]
  }),
  pageBreak()
);

// ════════════════════════════════════════════════════════════════
// SECTION 1 – CARDIOVASCULAR
// ════════════════════════════════════════════════════════════════
children.push(
  sectionBanner("❀  SECTION 1: CARDIOVASCULAR", C.red),
  spacer(),

  // Heart Failure
  subHeading("A. HEART FAILURE", C.red),
  subSubHeading("Types by Ejection Fraction"),
  makeTable(
    ["Type", "EF", "Mechanism"],
    [
      ["HFrEF (Systolic)", "< 40%", "Reduced contractility"],
      ["HFmrEF (Mid-range)", "40–49%", "Mixed features"],
      ["HFpEF (Diastolic)", "β‰₯ 50%", "Impaired relaxation / filling"],
    ], C.red
  ),
  spacer(),

  subSubHeading("NYHA Functional Classification"),
  makeTable(
    ["Class", "Description"],
    [
      ["I", "No symptoms with ordinary activity"],
      ["II", "Slight limitation β€” comfortable at rest"],
      ["III", "Marked limitation β€” comfortable only at rest"],
      ["IV", "Symptoms at rest β€” unable to carry any activity"],
    ], C.red, C.lightRed
  ),
  spacer(),

  subSubHeading("ACC/AHA Staging"),
  makeTable(
    ["Stage", "Description"],
    [
      ["A", "Risk factors only, no structural disease"],
      ["B", "Structural disease, no symptoms"],
      ["C", "Structural disease + current or prior symptoms"],
      ["D", "Refractory HF requiring advanced/transplant therapy"],
    ], C.red, C.lightRed
  ),
  spacer(),

  subSubHeading("Clinical Features"),
  bullet("LEFT HF: Dyspnea, orthopnea, PND, basal crepitations, S3 gallop, displaced apex"),
  bullet("RIGHT HF: Raised JVP, pitting edema, hepatomegaly, ascites"),
  bullet("Best biomarker: BNP / NT-proBNP (elevated)"),
  bullet("Best investigation to assess EF: Echocardiography"),
  spacer(),

  subSubHeading("Treatment of HFrEF"),
  mnemonicBox("BANANA β€” HFrEF Drugs", [
    { letter: "B", meaning: "Beta blockers (carvedilol, bisoprolol, metoprolol)" },
    { letter: "A", meaning: "ACE inhibitors / ARBs (enalapril, ramipril, losartan)" },
    { letter: "N", meaning: "Nitrates β€” symptomatic relief" },
    { letter: "A", meaning: "Aldosterone antagonists (spironolactone, eplerenone)" },
    { letter: "N", meaning: "Neprilysin inhibitor + ARB = Sacubitril/Valsartan (ARNI)" },
    { letter: "A", meaning: "SGLT2 inhibitors (dapagliflozin, empagliflozin) β€” newer addition" },
  ]),
  spacer(),
  bullet("Diuretics (furosemide) for fluid overload symptom relief"),
  bullet("ICD/CRT indicated when EF < 35%"),
  spacer(),

  // IHD
  subHeading("B. ISCHEMIC HEART DISEASE", C.red),
  makeTable(
    ["Type", "Feature"],
    [
      ["Stable Angina", "Exertional, relieved by rest/nitrates, fixed threshold"],
      ["Unstable Angina", "Rest angina, new onset, or crescendo β€” MEDICAL EMERGENCY"],
      ["Prinzmetal/Variant", "Coronary vasospasm, ST elevation, occurs at rest/night"],
    ], C.red
  ),
  spacer(),

  subSubHeading("STEMI vs NSTEMI"),
  bullet("STEMI: ST elevation β‰₯ 1 mm (limb leads) / β‰₯ 2 mm (precordial) + troponin rise"),
  bullet("NSTEMI: Troponin rise + ischemic symptoms, NO ST elevation"),
  spacer(),

  subSubHeading("Cardiac Biomarker Timeline"),
  makeTable(
    ["Marker", "Rise", "Peak", "Normalise"],
    [
      ["Troponin I/T", "3–6 h", "12–24 h", "10–14 days"],
      ["CK-MB", "4–8 h", "18–24 h", "48–72 h"],
      ["Myoglobin", "1–3 h (earliest)", "6–8 h", "24 h"],
    ], C.red, C.lightRed
  ),
  spacer(),

  subSubHeading("ECG Changes in MI (Sequence)"),
  bullet("Hyperacute T waves (within minutes)"),
  bullet("ST elevation (hours)"),
  bullet("Q waves (hours to days) β€” permanent marker"),
  bullet("T wave inversion (days to weeks)"),
  spacer(),

  subSubHeading("Acute STEMI Treatment"),
  mnemonicBox("MONA-B β€” Acute MI Management", [
    { letter: "M", meaning: "Morphine β€” pain relief" },
    { letter: "O", meaning: "Oxygen β€” only if SpO2 < 90%" },
    { letter: "N", meaning: "Nitrates β€” sublingual GTN" },
    { letter: "A", meaning: "Aspirin 300 mg stat + Clopidogrel / Ticagrelor" },
    { letter: "B", meaning: "Beta blocker (IV if haemodynamically stable)" },
  ]),
  spacer(),
  bullet("Reperfusion: Primary PCI (gold standard, within 90 min of door) > Thrombolysis"),
  bullet("Thrombolysis (streptokinase, tPA) β€” if PCI unavailable, within 12 h of onset"),
  spacer(),

  // Hypertension
  subHeading("C. HYPERTENSION", C.red),
  makeTable(
    ["Category", "Systolic (mmHg)", "Diastolic (mmHg)"],
    [
      ["Normal", "< 120", "< 80"],
      ["Elevated", "120–129", "< 80"],
      ["Stage 1 HTN", "130–139", "80–89"],
      ["Stage 2 HTN", "β‰₯ 140", "β‰₯ 90"],
      ["Hypertensive Crisis", "> 180", "> 120"],
    ], C.red, C.lightRed
  ),
  spacer(),
  boldBullet("Urgency", "Crisis WITHOUT end organ damage β€” oral drugs, reduce over 24–48 h"),
  boldBullet("Emergency", "Crisis WITH end organ damage (brain, heart, kidney, eyes) β€” IV drugs, reduce by 25% in 1st hour"),
  spacer(),
  subSubHeading("Secondary Hypertension Causes"),
  bullet("Renal: Renovascular (renal artery stenosis), CKD"),
  bullet("Endocrine: Conn's syndrome (primary hyperaldosteronism), Cushing's, phaeochromocytoma"),
  bullet("Structural: Coarctation of aorta"),
  spacer(),

  // Valvular
  subHeading("D. VALVULAR HEART DISEASE", C.red),
  makeTable(
    ["Lesion", "Classic Sign", "Murmur"],
    [
      ["Mitral Stenosis", "Loud S1, Opening snap, malar flush", "Mid-diastolic rumble at apex"],
      ["Mitral Regurgitation", "Soft/absent S1, displaced apex", "Pansystolic at apex β€” radiates to axilla"],
      ["Aortic Stenosis", "Slow-rising pulse, narrow pulse pressure", "Ejection systolic (aortic area) β€” radiates to neck"],
      ["Aortic Regurgitation", "Wide pulse pressure, Corrigan's pulse, de Musset's sign", "Early diastolic at left sternal border"],
    ], C.red
  ),
  spacer(),
  bullet("Most common cause of Mitral Stenosis in India: Rheumatic fever"),
  bullet("Mitral stenosis: left atrial thrombus risk β€” anticoagulate if AF develops"),
  spacer(),
  pageBreak(),

  // ════════════════════════════════════════════════════════════════
  // SECTION 2 – HEMATOLOGY
  // ════════════════════════════════════════════════════════════════
  sectionBanner("🩸  SECTION 2: HEMATOLOGY", C.blue),
  spacer(),

  subHeading("A. ANEMIA", C.blue),
  subSubHeading("Classification by MCV"),
  makeTable(
    ["Type", "MCV", "Causes"],
    [
      ["Microcytic", "< 80 fL", "Iron deficiency, Thalassemia, Sideroblastic, ACD"],
      ["Normocytic", "80–100 fL", "Aplastic anemia, Acute blood loss, Hemolytic, CKD"],
      ["Macrocytic", "> 100 fL", "B12/Folate deficiency (megaloblastic), Liver disease, Hypothyroid"],
    ], C.blue, C.lightBlue
  ),
  spacer(),

  subSubHeading("Iron Studies Comparison (Microcytic Anemias)"),
  makeTable(
    ["Lab Test", "Iron Deficiency", "Thalassemia Trait", "Anemia of Chronic Disease"],
    [
      ["Serum Ferritin", "↓↓ (most sensitive)", "Normal / ↑", "↑"],
      ["Serum Iron", "↓", "Normal", "↓"],
      ["TIBC", "↑", "Normal", "↓"],
      ["Transferrin Sat", "↓", "Normal", "↓"],
    ], C.blue, C.lightBlue
  ),
  spacer(),

  subSubHeading("Iron Deficiency Anemia β€” Key Points"),
  bullet("Most common anemia worldwide"),
  bullet("Clinical: Koilonychia (spoon nails), angular stomatitis, atrophic glossitis, pagophagia (pica for ice)"),
  bullet("Plummer-Vinson syndrome: IDA + dysphagia + postcricoid esophageal web"),
  bullet("Treatment: Ferrous sulfate 200 mg TID x 3–6 months (continue 3 months after Hb normalises)"),
  spacer(),

  subSubHeading("Megaloblastic Anemia (B12 vs Folate)"),
  makeTable(
    ["Feature", "B12 Deficiency", "Folate Deficiency"],
    [
      ["Neurological (SACDSC)", "YES β€” dorsal + lateral column damage", "NO"],
      ["Peripheral smear", "Hypersegmented neutrophils (pathognomonic)", "Same"],
      ["Causes", "Pernicious anemia, gastrectomy, terminal ileum disease", "Poor diet, pregnancy, methotrexate, alcohol"],
      ["Treatment", "IM cyanocobalamin / hydroxocobalamin", "Oral folic acid 5 mg/day"],
    ], C.blue, C.lightBlue
  ),
  spacer(),
  bullet("Pernicious anemia: anti-intrinsic factor antibodies + anti-parietal cell antibodies (autoimmune)"),
  spacer(),

  subHeading("B. HEMOLYTIC ANEMIAS", C.blue),
  makeTable(
    ["Feature", "Intravascular", "Extravascular"],
    [
      ["Hemoglobinuria", "YES (urine turns dark)", "No"],
      ["Hemoglobinemia", "YES", "No"],
      ["Jaundice", "Mild", "Prominent"],
      ["Splenomegaly", "Absent / mild", "Present"],
      ["Examples", "G6PD, PNH, transfusion reaction", "Hereditary spherocytosis, Sickle cell"],
    ], C.blue
  ),
  spacer(),

  subSubHeading("Sickle Cell Disease"),
  bullet("Mutation: Glutamic acid β†’ Valine at position 6 of beta-globin chain"),
  bullet("Crisis types: Vaso-occlusive (pain), Splenic sequestration, Aplastic crisis (parvovirus B19)"),
  bullet("Features: Autosplenectomy β†’ susceptibility to encapsulated organisms (Pneumococcus, Hib, Meningococcus)"),
  bullet("Diagnosis: Hb electrophoresis showing HbS"),
  bullet("Treatment: Hydroxyurea (↑ HbF, ↓ HbS sickling); IV fluids + analgesia for crisis"),
  spacer(),

  subSubHeading("G6PD Deficiency"),
  bullet("X-linked recessive β€” affects males primarily"),
  bullet("Triggers: Primaquine, dapsone, fava beans, infections (oxidative stress)"),
  bullet("Blood film: Heinz bodies, bite cells"),
  bullet("Hemolysis is self-limiting once offending agent removed"),
  spacer(),

  subHeading("C. LEUKEMIAS", C.blue),
  makeTable(
    ["Feature", "ALL", "AML", "CLL", "CML"],
    [
      ["Age", "Children (peak 3–5 y)", "Adults (any age)", "Elderly (>60 y)", "Middle age (30–50 y)"],
      ["Cell Type", "Lymphoblast (B/T)", "Myeloblast", "Mature B lymphocyte", "Granulocyte"],
      ["Key Marker", "CD10 (CALLA), TdT", "MPO+, Auer rods", "CD5, CD23, smudge cells", "Philadelphia chr. (BCR-ABL)"],
      ["Translocation", "t(12;21) common", "t(15;17) in APL-M3", "β€”", "t(9;22)"],
      ["Treatment", "VCR + Pred + L-Asp", "7+3 (Cytarabine+Dauno)", "Chlorambucil/FCR", "Imatinib (TKI)"],
    ], C.blue
  ),
  spacer(),
  bullet("Auer rods β€” pathognomonic of AML (especially M3/APL)"),
  bullet("Smudge cells β€” pathognomonic of CLL"),
  bullet("Philadelphia chromosome t(9;22) β€” CML (also found in some ALL)"),
  bullet("Blast crisis = transformation of CML to acute leukemia"),
  spacer(),

  subHeading("D. LYMPHOMAS", C.blue),
  makeTable(
    ["Feature", "Hodgkin Lymphoma", "Non-Hodgkin Lymphoma"],
    [
      ["Age", "Bimodal: 20s and >50s", "Any age (more common elderly)"],
      ["Spread", "Contiguous, predictable", "Non-contiguous"],
      ["Pathognomonic cell", "Reed-Sternberg cell (owl-eye nucleoli)", "None specific"],
      ["B symptoms", "Common", "Less common"],
      ["Treatment", "ABVD + Radiotherapy", "R-CHOP (Rituximab-CHOP)"],
      ["Prognosis", "Generally better", "Variable by subtype"],
    ], C.blue, C.lightBlue
  ),
  spacer(),
  subSubHeading("Ann Arbor Staging (I–IV)"),
  makeTable(
    ["Stage", "Involvement"],
    [
      ["I", "Single lymph node region or single extranodal site"],
      ["II", "β‰₯ 2 regions on the SAME side of diaphragm"],
      ["III", "Lymph node regions on BOTH sides of diaphragm"],
      ["IV", "Disseminated extranodal involvement (liver, bone marrow)"],
    ], C.blue, C.lightBlue
  ),
  spacer(),
  bullet("B symptoms: Fever >38Β°C + Night sweats + Weight loss >10% in 6 months"),
  spacer(),

  subHeading("E. COAGULATION DISORDERS", C.blue),
  makeTable(
    ["Condition", "PT", "APTT", "Platelets", "Key Feature"],
    [
      ["Hemophilia A (Factor VIII)", "Normal", "↑", "Normal", "X-linked recessive, males"],
      ["Hemophilia B (Factor IX)", "Normal", "↑", "Normal", "X-linked recessive, males"],
      ["von Willebrand Disease", "Normal", "↑ (usually)", "Normal/↓", "vWF antigen ↓, most common inherited bleeding disorder"],
      ["ITP", "Normal", "Normal", "↓↓", "Anti-platelet antibodies, spleen enlargement minimal"],
      ["DIC", "↑", "↑", "↓", "D-dimer ↑, fibrinogen ↓, schistocytes on smear"],
      ["Warfarin toxicity", "↑ (mainly)", "↑", "Normal", "Vit K antagonist β€” reverse with Vit K / FFP"],
    ], C.blue
  ),
  spacer(),
  bullet("ITP Treatment: Corticosteroids (first line) β†’ IVIG β†’ Rituximab β†’ Splenectomy"),
  bullet("Hemophilia A Treatment: Factor VIII concentrate; DDAVP for mild cases"),
  spacer(),
  pageBreak(),

  // ════════════════════════════════════════════════════════════════
  // SECTION 3 – CTD RHEUMATOLOGY
  // ════════════════════════════════════════════════════════════════
  sectionBanner("🦴  SECTION 3: CONNECTIVE TISSUE & RHEUMATOLOGY", C.green),
  spacer(),

  subHeading("A. RHEUMATOID ARTHRITIS (RA)", C.green),
  subSubHeading("ACR/EULAR 2010 Criteria (score β‰₯ 6/10 = definite RA)"),
  makeTable(
    ["Domain", "Score"],
    [
      ["Joint involvement: 1 large joint", "0"],
      ["2–10 large joints", "1"],
      ["1–3 small joints", "2"],
      ["4–10 small joints", "3"],
      ["Serology: RF+/Anti-CCP+ low positive", "2"],
      ["Serology: RF+/Anti-CCP+ high positive (>3x ULN)", "3"],
      ["Acute phase: Abnormal CRP or ESR", "1"],
      ["Duration β‰₯ 6 weeks", "1"],
    ], C.green, C.lightGreen
  ),
  spacer(),
  bullet("Anti-CCP antibody: MORE SPECIFIC than RF for RA"),
  bullet("Morning stiffness > 1 hour β€” hallmark feature"),
  bullet("Distribution: Symmetrical polyarthritis of MCP, PIP joints β€” spares DIP"),
  spacer(),

  subSubHeading("Deformities in RA"),
  makeTable(
    ["Deformity", "Description"],
    [
      ["Ulnar deviation", "MCP joints deviated toward ulnar side"],
      ["Swan neck", "PIP hyperextension + DIP flexion"],
      ["Boutonnière", "PIP flexion + DIP hyperextension"],
      ["Z-deformity (thumb)", "MCP flexion + IP hyperextension"],
    ], C.green, C.lightGreen
  ),
  spacer(),
  bullet("Extra-articular: Rheumatoid nodules, pleural effusion, pericarditis, episcleritis"),
  bullet("Felty's syndrome: RA + splenomegaly + neutropenia"),
  spacer(),

  subSubHeading("RA Treatment"),
  bullet("NSAIDs: Short-term symptom relief only"),
  bullet("Glucocorticoids: Short-term bridging during DMARD initiation"),
  bullet("First-line csDMARD: Methotrexate (+ folic acid to prevent side effects)"),
  bullet("Other csDMARDs: Hydroxychloroquine, Sulfasalazine, Leflunomide"),
  bullet("Biological DMARDs (if inadequate response): Anti-TNF (etanercept, adalimumab, infliximab), Anti-IL6 (tocilizumab), Anti-CD20 (rituximab)"),
  bullet("MTX side effects: Hepatotoxicity, bone marrow suppression, pneumonitis β€” always co-prescribe folic acid"),
  spacer(),

  subHeading("B. SYSTEMIC LUPUS ERYTHEMATOSUS (SLE)", C.green),
  subSubHeading("ACR Criteria β€” need β‰₯ 4 of 11"),
  mnemonicBox("MD SOAP BRAIN β€” SLE Criteria", [
    { letter: "M", meaning: "Malar (butterfly) rash β€” spares nasolabial folds" },
    { letter: "D", meaning: "Discoid rash β€” scarring, follicular plugging" },
    { letter: "S", meaning: "Serositis β€” pleuritis or pericarditis" },
    { letter: "O", meaning: "Oral ulcers (painless)" },
    { letter: "A", meaning: "Arthritis β€” non-erosive, β‰₯ 2 peripheral joints" },
    { letter: "P", meaning: "Photosensitivity" },
    { letter: "B", meaning: "Blood β€” hemolytic anemia, leukopenia (<4000), lymphopenia, thrombocytopenia (<100k)" },
    { letter: "R", meaning: "Renal β€” proteinuria >0.5 g/day or cellular casts" },
    { letter: "A", meaning: "ANA β€” positive (sensitive screening test)" },
    { letter: "I", meaning: "Immunologic β€” anti-dsDNA, anti-Sm, antiphospholipid" },
    { letter: "N", meaning: "Neurologic β€” seizures or psychosis" },
  ]),
  spacer(),

  subSubHeading("Antibody Profile in SLE"),
  makeTable(
    ["Antibody", "Specificity/Significance"],
    [
      ["ANA", "Most sensitive (95%) β€” screening test; NOT specific"],
      ["Anti-dsDNA", "Specific for SLE; correlates with disease activity and lupus nephritis"],
      ["Anti-Sm", "MOST specific (30–40% sensitivity) β€” diagnostic of SLE"],
      ["Anti-Ro (SS-A)", "Neonatal lupus, subacute cutaneous lupus, Sjogren's overlap"],
      ["Anti-La (SS-B)", "Associated with Sjogren's overlap"],
      ["Anti-phospholipid", "Thrombosis, recurrent miscarriages (antiphospholipid syndrome)"],
    ], C.green, C.lightGreen
  ),
  spacer(),

  subSubHeading("Lupus Nephritis β€” ISN/RPS Classes"),
  makeTable(
    ["Class", "Pathology", "Notes"],
    [
      ["I", "Minimal mesangial", "Good prognosis"],
      ["II", "Mesangial proliferative", "Good prognosis"],
      ["III", "Focal proliferative (<50% glomeruli)", "Requires immunosuppression"],
      ["IV", "Diffuse proliferative (β‰₯50% glomeruli)", "Worst prognosis; most aggressive treatment"],
      ["V", "Membranous", "Nephrotic syndrome predominant"],
      ["VI", "Advanced sclerosing", "Poor prognosis"],
    ], C.green, C.lightGreen
  ),
  spacer(),
  bullet("Class IV treatment: Mycophenolate mofetil + steroids (or cyclophosphamide + steroids)"),
  bullet("Hydroxychloroquine: given to ALL SLE patients (reduces flares, protects against organ damage)"),
  spacer(),

  subHeading("C. SYSTEMIC SCLEROSIS (SCLERODERMA)", C.green),
  makeTable(
    ["Feature", "Limited (lcSSc)", "Diffuse (dcSSc)"],
    [
      ["Skin involvement", "Distal to elbows/knees + face", "Proximal limbs + trunk"],
      ["CREST syndrome", "YES", "No"],
      ["Antibody", "Anti-centromere (ACA)", "Anti-Scl-70 (topoisomerase I)"],
      ["Internal organs early", "Less common", "More common (lung, heart, kidney)"],
      ["PAH", "Late complication (common)", "Less common"],
      ["Prognosis", "Better", "Worse"],
    ], C.green, C.lightGreen
  ),
  spacer(),
  mnemonicBox("CREST Syndrome", [
    { letter: "C", meaning: "Calcinosis β€” calcium deposits under skin" },
    { letter: "R", meaning: "Raynaud's phenomenon β€” WHITE β†’ BLUE β†’ RED" },
    { letter: "E", meaning: "Esophageal dysmotility β€” GERD, dysphagia" },
    { letter: "S", meaning: "Sclerodactyly β€” tight, thickened fingers" },
    { letter: "T", meaning: "Telangiectasia β€” dilated blood vessels on skin/mucosa" },
  ]),
  spacer(),

  subHeading("D. INFLAMMATORY MYOPATHIES", C.green),
  makeTable(
    ["Feature", "Polymyositis", "Dermatomyositis"],
    [
      ["Rash", "Absent", "Heliotrope rash (eyelids) + Gottron's papules (knuckles)"],
      ["Weakness", "Proximal (symmetric)", "Proximal (symmetric)"],
      ["CPK", "Markedly elevated", "Markedly elevated"],
      ["Malignancy risk", "Low", "Higher β€” screen for occult cancer"],
      ["Antibody", "Anti-Jo-1 (antisynthetase)", "Anti-Mi-2"],
      ["Treatment", "Corticosteroids Β± methotrexate", "Corticosteroids Β± methotrexate"],
    ], C.green, C.lightGreen
  ),
  spacer(),

  subHeading("E. GOUT & PSEUDOGOUT", C.green),
  makeTable(
    ["Feature", "Gout", "Pseudogout (CPPD)"],
    [
      ["Crystal", "Monosodium urate (MSU)", "Calcium pyrophosphate dihydrate"],
      ["Birefringence", "NEGATIVE (needle-shaped)", "POSITIVE (rhomboid-shaped)"],
      ["Joints", "1st MTP (podagra), ankle, knee", "Knee, wrist (larger joints)"],
      ["X-ray", "Punched-out lesions, overhanging edges, tophi", "Chondrocalcinosis (cartilage calcification)"],
      ["Associations", "Obesity, alcohol, diuretics, CKD, myeloproliferative", "Hemochromatosis, hyperparathyroidism, hypothyroid"],
    ], C.green, C.lightGreen
  ),
  spacer(),
  subSubHeading("Gout Treatment"),
  makeTable(
    ["Phase", "Drug of Choice", "Notes"],
    [
      ["Acute attack", "Colchicine (1st line)", "NSAIDs (naproxen) or steroids if colchicine CI"],
      ["Prophylaxis", "Allopurinol (xanthine oxidase inhibitor)", "START only after acute attack resolves"],
      ["Allopurinol alternative", "Febuxostat", "Used if allopurinol intolerant"],
      ["Target uric acid", "< 6 mg/dL (< 5 in tophi)", "SGLT2 inhibitors also lower uric acid"],
    ], C.green, C.lightGreen
  ),
  spacer(),

  subHeading("F. VASCULITIS β€” BY VESSEL SIZE", C.green),
  makeTable(
    ["Vessel Size", "Disease", "Key Features"],
    [
      ["Large", "Giant Cell Arteritis (GCA)", "Age >50, temporal headache, jaw claudication, blindness risk β€” IMMEDIATE steroids"],
      ["Large", "Takayasu's Arteritis", "Young Asian females, 'pulseless disease', BP difference between arms"],
      ["Medium", "Polyarteritis Nodosa (PAN)", "ANCA-negative, no glomerulonephritis, aneurysms on angiography"],
      ["Medium", "Kawasaki Disease", "Children <5 y, fever >5 days, strawberry tongue, coronary artery aneurysms"],
      ["Small (ANCA+)", "GPA (Wegener's)", "c-ANCA (anti-PR3), saddle-nose, upper respiratory + lungs + kidneys"],
      ["Small (ANCA+)", "Microscopic Polyangiitis", "p-ANCA (anti-MPO), rapidly progressive GN, pulmonary hemorrhage"],
      ["Small (ANCA+)", "Eosinophilic GPA (Churg-Strauss)", "p-ANCA, asthma + eosinophilia + granulomas"],
      ["Small (Immune complex)", "IgA Vasculitis (HSP)", "Children, palpable purpura buttocks/legs, arthritis, GN, GI involvement"],
    ], C.green
  ),
  spacer(),
  pageBreak(),

  // ════════════════════════════════════════════════════════════════
  // EXAM PREP
  // ════════════════════════════════════════════════════════════════
  sectionBanner("⭐  EXAM PREPARATION GUIDE", C.orange),
  spacer(),

  subHeading("LONG QUESTIONS (10 marks)", C.orange),
  examBox([
    "Describe the clinical features, investigations and management of chronic heart failure",
    "Classify anemia. Describe pathophysiology, clinical features and treatment of iron deficiency anemia",
    "Discuss SLE β€” diagnostic criteria, clinical manifestations, antibody profile and treatment",
    "Describe etiopathogenesis, clinical features and management of Rheumatoid Arthritis",
    "Write about acute myocardial infarction β€” classification, ECG changes, complications and treatment",
    "Discuss Hodgkin's lymphoma β€” pathology, staging, clinical features and treatment",
    "Describe the laboratory profile of coagulation disorders (Hemophilia, DIC, ITP)",
  ]),
  spacer(),

  subHeading("SHORT NOTES (5 marks)", C.orange),
  examBox([
    "NYHA classification of heart failure",
    "Reed-Sternberg cell β€” description and significance",
    "Philadelphia chromosome and CML β€” BCR-ABL and imatinib",
    "ACR criteria for SLE (any 4 of 11)",
    "CREST syndrome β€” components and antibody",
    "Gout β€” pathophysiology, joints involved, crystal type and treatment",
    "DIC β€” coagulation profile and management principles",
    "Sickle cell crisis β€” types (vaso-occlusive, sequestration, aplastic)",
    "Pernicious anemia β€” pathogenesis, features and treatment",
    "Hypertensive emergency vs urgency",
    "G6PD deficiency β€” inheritance, triggers, blood film findings",
    "Ann Arbor staging of lymphoma",
    "Raynaud's phenomenon β€” types and management",
    "Takayasu's arteritis vs Giant Cell Arteritis",
    "Anti-CCP antibody in RA β€” significance vs RF",
  ]),
  spacer(),

  subHeading("ONE-LINERS β€” MUST MEMORISE", C.orange),
  makeTable(
    ["Topic", "Answer"],
    [
      ["Most sensitive test for IDA", "Serum ferritin"],
      ["Most specific antibody in SLE", "Anti-Sm"],
      ["Pathognomonic cell in AML", "Auer rods"],
      ["Pathognomonic cell in CLL", "Smudge cells"],
      ["Pathognomonic cell in HL", "Reed-Sternberg (owl-eye nucleoli)"],
      ["Crystal in gout", "Negatively birefringent, needle-shaped (MSU)"],
      ["Crystal in pseudogout", "Positively birefringent, rhomboid (CPPD)"],
      ["First-line DMARD in RA", "Methotrexate (+ folic acid)"],
      ["TKI for CML", "Imatinib (BCR-ABL inhibitor)"],
      ["Immediate treatment to prevent blindness in GCA", "High-dose prednisolone (60 mg/day)"],
      ["Mutation in sickle cell disease", "Glu β†’ Val at position 6 of beta-globin"],
      ["Best biomarker in heart failure", "BNP / NT-proBNP"],
      ["STEMI reperfusion gold standard", "Primary PCI within 90 minutes"],
      ["Antibody in diffuse scleroderma", "Anti-Scl-70 (topoisomerase I)"],
      ["Antibody in limited scleroderma/CREST", "Anti-centromere antibody (ACA)"],
      ["Rash pathognomonic for dermatomyositis", "Heliotrope rash + Gottron's papules"],
      ["Most common cause of megaloblastic anemia in India", "Folate deficiency"],
      ["SACDSC occurs in which deficiency only", "Vitamin B12 (NOT folate)"],
      ["Hypersegmented neutrophils are seen in", "Megaloblastic anemia"],
      ["Philadelphia chromosome translocation", "t(9;22) β€” BCR-ABL fusion gene"],
    ], C.orange, "FEF9E7"
  ),
  spacer(),

  subHeading("MASTER MNEMONICS QUICK REFERENCE", C.dark),
  makeTable(
    ["Topic", "Mnemonic", "Expansion"],
    [
      ["Heart failure drugs", "BANANA", "Beta blocker, ACE/ARB, Nitrates, Aldosterone antag, ARNI (sacubitril/val), SGLT2i"],
      ["Acute MI management", "MONA-B", "Morphine, Oxygen, Nitrates, Aspirin, Beta blocker"],
      ["SLE criteria (11)", "MD SOAP BRAIN", "Malar, Discoid, Serositis, Oral, Arthritis, Photo, Blood, Renal, ANA, Immunologic, Neurologic"],
      ["Scleroderma limited", "CREST", "Calcinosis, Raynaud's, Esophageal, Sclerodactyly, Telangiectasia"],
      ["B symptoms lymphoma", "FaN", "Fever >38Β°C, Night sweats, involuntary weight loss >10% in 6 months"],
      ["Raynaud's color sequence", "WBR", "White (ischemia) β†’ Blue (cyanosis) β†’ Red (reperfusion)"],
      ["Gout crystal memory", "Negative Needles / Positive Pseudogout", "Gout = negative birefringent needles; CPPD = positive rhomboids"],
      ["Prolonged QT causes", "HALT", "Hypocalcemia/K/Mg, Amiodarone/antipsychotics, LQTS congenital, Tricyclics"],
    ], C.dark
  ),
  spacer(),

  new Paragraph({
    spacing: { before: 200, after: 200 },
    alignment: AlignmentType.CENTER,
    children: [
      new TextRun({ text: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━", color: C.midGrey, size: 18 })
    ]
  }),
  new Paragraph({
    spacing: { before: 60, after: 60 },
    alignment: AlignmentType.CENTER,
    children: [
      new TextRun({ text: "Sources: Harrison's Principles 22E (2025) β€’ Goldman-Cecil Medicine β€’ Katzung Pharmacology 16E β€’ Washington Manual of Medical Therapeutics", italics: true, size: 16, color: "888888" })
    ]
  }),
  new Paragraph({
    spacing: { before: 60, after: 200 },
    alignment: AlignmentType.CENTER,
    children: [
      new TextRun({ text: "All the best for your 2nd Sessional!  Study smart.", bold: true, size: 22, color: C.green })
    ]
  }),
);

// ─── ASSEMBLE & WRITE ────────────────────────────────────────────────────────
const doc = new Document({
  creator: "Orris AI",
  title: "IInd Sessional MBBS Medicine Revision",
  description: "Comprehensive revision notes: Cardiovascular, Hematology, CTD Rheumatology",
  styles: {
    paragraphStyles: [
      {
        id: "Normal",
        name: "Normal",
        run: { font: "Calibri", size: 20 },
      },
    ],
  },
  sections: [{
    properties: {
      page: {
        margin: { top: 720, bottom: 720, left: 900, right: 900 },
      }
    },
    headers: {
      default: new Header({
        children: [
          new Paragraph({
            alignment: AlignmentType.RIGHT,
            children: [
              new TextRun({ text: "IInd Sessional β€” Final Year MBBS Medicine Revision Notes", size: 16, color: "888888", italics: true })
            ]
          })
        ]
      })
    },
    footers: {
      default: new Footer({
        children: [
          new Paragraph({
            alignment: AlignmentType.CENTER,
            children: [
              new TextRun({ text: "Page ", size: 16, color: "888888" }),
              new PageNumber({ alias: "page" })
            ]
          })
        ]
      })
    },
    children
  }]
});

Packer.toBuffer(doc).then(buffer => {
  fs.writeFileSync("/home/daytona/workspace/mbbs-revision/MBBS_2nd_Sessional_Medicine_Revision.docx", buffer);
  console.log("SUCCESS: Document created.");
});
Running Command

cd /home/daytona/workspace/mbbs-revision && node generate_doc.js 2>&1

Editing File

~/mbbs-revision/generate_doc.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/mbbs-revision/generate_doc.js'
Running Command

cd /home/daytona/workspace/mbbs-revision && node generate_doc.js 2>&1

Running Command

node -e "const d = require('docx'); console.log(Object.keys(d).filter(k => k.toLowerCase().includes('page')))"

Running Command

node -e "const { PageNumberElement } = require('docx'); console.log(typeof PageNumberElement, PageNumberElement)"

Editing File

~/mbbs-revision/generate_doc.js

Error: String not found in file: '        HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType,
        VerticalAlign, PageNumber, Header, Footer, PageBreak,
        TableOfContents, LevelFormat'
Reading File
Editing File

~/mbbs-revision/generate_doc.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/mbbs-revision/generate_doc.js'
Editing File

~/mbbs-revision/generate_doc.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/mbbs-revision/generate_doc.js'
Running Command

cd /home/daytona/workspace/mbbs-revision && node generate_doc.js 2>&1

Running Command

python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/mbbs-revision/MBBS_2nd_Sessional_Medicine_Revision.docx 2>&1

Running Command

ls -lh /home/daytona/workspace/mbbs-revision/MBBS_2nd_Sessional_Medicine_Revision.docx && python3 -c " import zipfile, sys try: with zipfile.ZipFile('/home/daytona/workspace/mbbs-revision/MBBS_2nd_Sessional_Medicine_Revision.docx') as z: names = z.namelist() print('Valid DOCX. Contains:', len(names), 'files') print([n for n in names if 'document' in n or 'content' in n]) except Exception as e: print('ERROR:', e) "

The document is valid and ready. Here it is:

MBBS 2nd Sessional Medicine Revision

Word Document Β· DOCX


Your print-ready Word document is done. Here's what's inside:
Structure (colour-coded by section):
  • πŸ”΄ Section 1 - Cardiovascular (red theme): Heart failure NYHA/ACC-AHA tables, STEMI vs NSTEMI, biomarker timeline, valvular heart disease comparison table, hypertension classification
  • πŸ”΅ Section 2 - Hematology (blue theme): Full anemia classification, iron studies comparison table, sickle cell, leukemia comparison (ALL/AML/CLL/CML), lymphoma + Ann Arbor staging, coagulation disorders table
  • 🟒 Section 3 - CTD Rheumatology (green theme): RA ACR criteria + deformities, SLE MD-SOAP-BRAIN mnemonic + antibody table + lupus nephritis classes, scleroderma limited vs diffuse + CREST, vasculitis by vessel size
  • ⭐ Exam Prep section: Long question list, 15 short notes, 20 one-liner rapid recall table, master mnemonics reference table
Print tips:
  • Print A4, both sides (landscape or portrait both work)
  • The colour-coded section banners make it easy to tab and navigate during revision

Create a printable PDF version of this revision notes

Reading File
Running Command

python /home/daytona/skills/docx/scripts/office/soffice.py --headless --convert-to pdf /home/daytona/workspace/mbbs-revision/MBBS_2nd_Sessional_Medicine_Revision.docx --outdir /home/daytona/workspace/mbbs-revision/ 2>&1

Running Command

cp /home/daytona/workspace/mbbs-revision/MBBS_2nd_Sessional_Medicine_Revision.docx /tmp/mbbs_rev.docx && python /home/daytona/skills/docx/scripts/office/soffice.py --headless --convert-to pdf /tmp/mbbs_rev.docx --outdir /tmp/ 2>&1 && ls -lh /tmp/mbbs_rev.pdf

Running Command

cp /tmp/mbbs_rev.pdf /home/daytona/workspace/mbbs-revision/MBBS_2nd_Sessional_Medicine_Revision.pdf && ls -lh /home/daytona/workspace/mbbs-revision/

Your PDF is ready β€” 364 KB, fully printable:

MBBS 2nd Sessional Medicine Revision

PDF Document Β· PDF

Print settings recommended:
  • Paper: A4
  • Orientation: Portrait
  • Print both sides (duplex) to save paper
  • Colour printing recommended (the section banners are colour-coded red/blue/green for easy navigation)
  • If printing in black & white, the tables and bold headings still make it very readable
Both versions are available if you need them:
  • MBBS 2nd Sessional Medicine Revision

    Word Document Β· DOCX

    β€” editable
  • MBBS 2nd Sessional Medicine Revision

    PDF Document Β· PDF

    β€” print-ready
This is a shared conversation. Sign in to Orris to start your own chat.