Write me a shrot notes for the following topics from anil k tripathi book of general medicine for bds gujarat university for 3 year exams about 7-8 marks Male concise to the point precise ans to the topics are Hepatic encephalopathy Anemia Iron deficiency Anemia Megaloblastic Anemia Aplastic Anemia In pdf form
mkdir -p /tmp/workspace/bds-notes && ls /tmp/workspace/bds-notes/
~/bds-notes/generate_notes.py
from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm
from reportlab.lib import colors
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
output_path = "/tmp/workspace/bds-notes/BDS_General_Medicine_Short_Notes.pdf"
doc = SimpleDocTemplate(
output_path,
pagesize=A4,
rightMargin=2*cm,
leftMargin=2*cm,
topMargin=2.2*cm,
bottomMargin=2*cm,
title="BDS General Medicine Short Notes",
author="Gujarat University BDS 3rd Year"
)
styles = getSampleStyleSheet()
# Custom styles
title_style = ParagraphStyle(
'MainTitle',
parent=styles['Title'],
fontSize=18,
leading=22,
textColor=colors.HexColor('#1a237e'),
spaceAfter=4,
alignment=TA_CENTER,
fontName='Helvetica-Bold'
)
subtitle_style = ParagraphStyle(
'Subtitle',
parent=styles['Normal'],
fontSize=10,
textColor=colors.HexColor('#5c6bc0'),
alignment=TA_CENTER,
spaceAfter=14,
fontName='Helvetica'
)
topic_heading = ParagraphStyle(
'TopicHeading',
parent=styles['Heading1'],
fontSize=13,
leading=16,
textColor=colors.white,
backColor=colors.HexColor('#283593'),
spaceBefore=14,
spaceAfter=6,
fontName='Helvetica-Bold',
leftIndent=-4,
rightIndent=-4,
borderPad=5
)
sub_heading = ParagraphStyle(
'SubHeading',
parent=styles['Heading2'],
fontSize=10.5,
leading=13,
textColor=colors.HexColor('#1565c0'),
spaceBefore=7,
spaceAfter=2,
fontName='Helvetica-Bold',
leftIndent=0
)
body_style = ParagraphStyle(
'Body',
parent=styles['Normal'],
fontSize=9.5,
leading=14,
textColor=colors.HexColor('#212121'),
spaceAfter=4,
fontName='Helvetica',
alignment=TA_JUSTIFY
)
bullet_style = ParagraphStyle(
'Bullet',
parent=styles['Normal'],
fontSize=9.5,
leading=13,
textColor=colors.HexColor('#212121'),
spaceAfter=2,
fontName='Helvetica',
leftIndent=14,
bulletIndent=4,
bulletFontName='Helvetica',
alignment=TA_LEFT
)
note_box_style = ParagraphStyle(
'NoteBox',
parent=styles['Normal'],
fontSize=9,
leading=13,
textColor=colors.HexColor('#4a148c'),
backColor=colors.HexColor('#f3e5f5'),
spaceAfter=6,
spaceBefore=4,
fontName='Helvetica-Oblique',
leftIndent=6,
rightIndent=6,
borderPad=4
)
def b(text):
return f"<b>{text}</b>"
def heading_row(text):
return [Paragraph(f"<font color='white'><b> {text}</b></font>", ParagraphStyle(
'HR', parent=styles['Normal'], fontSize=13, fontName='Helvetica-Bold',
textColor=colors.white, leading=16, leftIndent=6
))]
story = []
# ──────────────────────── TITLE PAGE ────────────────────────
story.append(Spacer(1, 0.5*cm))
story.append(Paragraph("General Medicine Short Notes", title_style))
story.append(Paragraph("BDS 3rd Year | Gujarat University | Based on Anil K. Tripathi", subtitle_style))
story.append(HRFlowable(width="100%", thickness=2, color=colors.HexColor('#3949ab'), spaceAfter=10))
story.append(Paragraph(
"Topics Covered: Hepatic Encephalopathy • Anemia • Iron Deficiency Anemia • "
"Megaloblastic Anemia • Aplastic Anemia",
ParagraphStyle('Topics', parent=styles['Normal'], fontSize=9.5, textColor=colors.HexColor('#455a64'),
alignment=TA_CENTER, spaceAfter=16)
))
# ═══════════════════════════════════════════════════════════
# TOPIC 1 — HEPATIC ENCEPHALOPATHY
# ═══════════════════════════════════════════════════════════
def add_topic_header(story, text):
tbl = Table([[Paragraph(f"<font color='white'><b> {text}</b></font>",
ParagraphStyle('TH', parent=styles['Normal'], fontSize=12.5,
fontName='Helvetica-Bold', textColor=colors.white, leading=15))
]], colWidths=[17*cm])
tbl.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), colors.HexColor('#1a237e')),
('TOPPADDING', (0,0), (-1,-1), 6),
('BOTTOMPADDING', (0,0), (-1,-1), 6),
('LEFTPADDING', (0,0), (-1,-1), 8),
('ROUNDEDCORNERS', [4]),
]))
story.append(Spacer(1, 6))
story.append(tbl)
story.append(Spacer(1, 4))
# ─── TOPIC 1 ───
add_topic_header(story, "1. HEPATIC ENCEPHALOPATHY")
story.append(Paragraph(b("Definition"), sub_heading))
story.append(Paragraph(
"Hepatic encephalopathy (HE) is a reversible neuropsychiatric syndrome caused by liver failure leading "
"to accumulation of toxic substances (mainly ammonia) that impair brain function.",
body_style))
story.append(Paragraph(b("Pathogenesis"), sub_heading))
for pt in [
"<b>Ammonia toxicity:</b> Gut-derived ammonia is not detoxified by the failing liver. Astrocytes convert NH3 to glutamine, causing astrocyte swelling and cerebral edema.",
"<b>Altered neurotransmission:</b> Excess GABA and abnormal glutamine levels disrupt signalling.",
"<b>Inflammatory mediators:</b> IL-6 and other cytokines worsen BBB permeability.",
"<b>Oxidative stress:</b> Free radical damage to astrocytes.",
"<b>Benzodiazepine-like substances:</b> Upregulation of peripheral benzodiazepine receptors on astrocytes.",
"<b>Pathological finding:</b> Alzheimer type-II astrocytosis in chronic liver disease.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(b("Precipitating Factors (Mnemonic: FAILS)"), sub_heading))
tbl2_data = [
[Paragraph("<b>Factor</b>", body_style), Paragraph("<b>Example</b>", body_style)],
[Paragraph("GI Bleeding", body_style), Paragraph("Increases ammonia load from gut", body_style)],
[Paragraph("Infection / Sepsis", body_style), Paragraph("SBP, UTI, pneumonia", body_style)],
[Paragraph("High Protein Diet", body_style), Paragraph("Excess nitrogen substrate", body_style)],
[Paragraph("Constipation", body_style), Paragraph("Prolonged intestinal transit", body_style)],
[Paragraph("Drugs", body_style), Paragraph("Sedatives, diuretics (hypokalaemia)", body_style)],
[Paragraph("Renal failure / Dehydration", body_style), Paragraph("Electrolyte imbalance", body_style)],
]
tbl2 = Table(tbl2_data, colWidths=[5.5*cm, 11.5*cm])
tbl2.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#c5cae9')),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor('#f5f5f5')]),
('TOPPADDING', (0,0), (-1,-1), 3),
('BOTTOMPADDING', (0,0), (-1,-1), 3),
('FONTSIZE', (0,0), (-1,-1), 9),
]))
story.append(tbl2)
story.append(Spacer(1, 4))
story.append(Paragraph(b("Clinical Features / Grades (West Haven Criteria)"), sub_heading))
grade_data = [
[Paragraph("<b>Grade</b>", body_style), Paragraph("<b>Clinical Features</b>", body_style)],
[Paragraph("0 (Covert)", body_style), Paragraph("Subclinical; only detectable on psychometric testing", body_style)],
[Paragraph("I", body_style), Paragraph("Mild confusion, mood change, altered sleep, slurred speech", body_style)],
[Paragraph("II", body_style), Paragraph("Drowsiness, asterixis (flapping tremor), disorientation", body_style)],
[Paragraph("III", body_style), Paragraph("Stupor, gross confusion, hyperreflexia, rigidity", body_style)],
[Paragraph("IV", body_style), Paragraph("Coma; no response to stimuli", body_style)],
]
tbl3 = Table(grade_data, colWidths=[3*cm, 14*cm])
tbl3.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#c5cae9')),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor('#f5f5f5')]),
('TOPPADDING', (0,0), (-1,-1), 3),
('BOTTOMPADDING', (0,0), (-1,-1), 3),
('FONTSIZE', (0,0), (-1,-1), 9),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
]))
story.append(tbl3)
story.append(Spacer(1, 4))
story.append(Paragraph(b("Diagnosis"), sub_heading))
for pt in [
"Serum ammonia elevated (>80 µg/dL) — but level does not always correlate with severity.",
"EEG: High-amplitude slow waves (triphasic waves) in advanced stages.",
"LFTs, PT/INR elevated; low albumin.",
"Exclude structural brain lesion (CT/MRI).",
"Psychometric tests (Number Connection Test) for covert HE.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(b("Treatment"), sub_heading))
for pt in [
"<b>Lactulose</b> (drug of choice): Acidifies the colon, traps NH4+, promotes catharsis. Dose: 30-45 mL 2-3 times daily titrated to 2-3 soft stools/day.",
"<b>Rifaximin</b> 550 mg BD: Non-absorbable antibiotic; reduces ammonia-producing gut bacteria; used for recurrent HE prevention.",
"<b>Dietary protein:</b> 1.2-1.5 g/kg/day; prefer vegetable/BCAA sources; restriction is no longer recommended.",
"<b>Zinc supplementation:</b> Cofactor for urea cycle enzymes.",
"<b>Treat precipitating factors:</b> Stop sedatives, treat infection, control bleeding, correct electrolytes.",
"<b>Liver transplant:</b> Definitive treatment for end-stage liver disease.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(
"KEY: Asterixis (flapping tremor) is the hallmark of HE. Prognosis is poor — survival ~20-40% at 1 year.",
note_box_style))
# ─── TOPIC 2 ───
add_topic_header(story, "2. ANEMIA — OVERVIEW")
story.append(Paragraph(b("Definition"), sub_heading))
story.append(Paragraph(
"Anemia is a reduction in the oxygen-carrying capacity of blood, defined as Hb <13 g/dL in adult males, "
"<12 g/dL in adult females, and <11 g/dL in pregnant women (WHO criteria).",
body_style))
story.append(Paragraph(b("Classification"), sub_heading))
cls_data = [
[Paragraph("<b>Morphological</b>", body_style), Paragraph("<b>Pathophysiological</b>", body_style)],
[Paragraph("Microcytic hypochromic (MCV <80 fL)\n- Iron deficiency\n- Thalassaemia\n- Sideroblastic", body_style),
Paragraph("Blood loss (acute/chronic)", body_style)],
[Paragraph("Normocytic normochromic (MCV 80-100 fL)\n- Aplastic, haemolytic, renal disease", body_style),
Paragraph("Increased destruction (haemolysis)", body_style)],
[Paragraph("Macrocytic (MCV >100 fL)\n- Megaloblastic (B12/folate deficiency)\n- Non-megaloblastic (hypothyroid, liver disease)", body_style),
Paragraph("Decreased production\n(nutritional, bone marrow failure)", body_style)],
]
tbl_cls = Table(cls_data, colWidths=[8.5*cm, 8.5*cm])
tbl_cls.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#c5cae9')),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor('#f5f5f5')]),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('FONTSIZE', (0,0), (-1,-1), 9),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(tbl_cls)
story.append(Spacer(1, 4))
story.append(Paragraph(b("General Clinical Features"), sub_heading))
for pt in [
"<b>Symptoms:</b> Fatigue, weakness, breathlessness on exertion, palpitations, headache, dizziness.",
"<b>Signs:</b> Pallor (conjunctiva, nail beds, palmar creases), tachycardia, wide pulse pressure, haemic murmur.",
"<b>Severe anemia:</b> High-output cardiac failure, ankle oedema, confusion.",
"<b>Dental relevance:</b> Pallor of oral mucosa, angular cheilitis, atrophic glossitis (nutritional anemias); anaesthesia risk — tissue hypoxia.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(b("Investigations"), sub_heading))
for pt in [
"CBC: Hb, MCV, MCH, MCHC, RBC count, reticulocyte count.",
"Peripheral blood smear: Red cell morphology.",
"Serum iron, TIBC, ferritin, B12, folate.",
"Bone marrow biopsy if needed (aplastic, megaloblastic).",
"Reticulocyte count: Distinguishes hypoproliferative vs. haemolytic.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
# ─── TOPIC 3 ───
add_topic_header(story, "3. IRON DEFICIENCY ANEMIA (IDA)")
story.append(Paragraph(b("Definition & Epidemiology"), sub_heading))
story.append(Paragraph(
"Most common nutritional deficiency and most common cause of anemia worldwide. Affects ~10% in high-income "
"and 25-50% in low-income countries. Iron is the most common micronutrient deficiency.",
body_style))
story.append(Paragraph(b("Iron Metabolism (Key Facts)"), sub_heading))
for pt in [
"Total body iron: 2.5 g (women), 3.5 g (men). ~80% in Hb, myoglobin, enzymes.",
"Storage pool: Ferritin and haemosiderin in liver, spleen, bone marrow macrophages.",
"<b>Serum ferritin</b> = best surrogate for storage iron (low = depleted stores).",
"Iron transport: Bound to transferrin. Normal transferrin saturation ~33%.",
"Normal serum iron: 100-120 µg/dL; TIBC: 300-350 µg/dL.",
"Daily loss: 1-2 mg/day (shed epithelium). Absorbed from duodenum via DMT-1 and ferroportin.",
"<b>Hepcidin</b>: Key regulator — blocks ferroportin, reducing iron absorption when stores are replete.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(b("Causes"), sub_heading))
cause_data = [
[Paragraph("<b>Cause</b>", body_style), Paragraph("<b>Examples</b>", body_style)],
[Paragraph("Chronic blood loss (most common in developed world)", body_style),
Paragraph("GI: peptic ulcer, CRC, hookworm, haemorrhoids\nGynaecological: menorrhagia", body_style)],
[Paragraph("Inadequate intake", body_style),
Paragraph("Vegetarian diet, poverty, exclusive milk feeding in infants", body_style)],
[Paragraph("Increased demand", body_style), Paragraph("Pregnancy, infancy, adolescence", body_style)],
[Paragraph("Malabsorption", body_style), Paragraph("Coeliac disease, gastrectomy, gastritis", body_style)],
]
tbl_cause = Table(cause_data, colWidths=[6*cm, 11*cm])
tbl_cause.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#bbdefb')),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor('#f5f5f5')]),
('TOPPADDING', (0,0), (-1,-1), 3),
('BOTTOMPADDING', (0,0), (-1,-1), 3),
('FONTSIZE', (0,0), (-1,-1), 9),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(tbl_cause)
story.append(Spacer(1, 4))
story.append(Paragraph(b("Stages of Iron Deficiency"), sub_heading))
for i, pt in enumerate([
"<b>Stage 1 – Iron depletion:</b> Serum ferritin low; bone marrow iron absent. Hb normal.",
"<b>Stage 2 – Iron-deficient erythropoiesis:</b> Serum iron falls; TIBC rises; transferrin saturation <16%. Hb normal.",
"<b>Stage 3 – Iron deficiency anemia:</b> Hb falls; microcytic hypochromic RBCs appear.",
], 1):
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(b("Clinical Features"), sub_heading))
for pt in [
"<b>General anemia symptoms:</b> Fatigue, weakness, pallor, dyspnoea.",
"<b>Specific signs of IDA:</b>",
" - Koilonychia (spoon-shaped nails)",
" - Angular stomatitis / cheilosis",
" - Atrophic glossitis (smooth tongue)",
" - Pharyngeal webs — Plummer-Vinson (Paterson-Kelly) syndrome: dysphagia + IDA + glossitis",
" - Pica: compulsion to eat non-food items (clay, dirt, ice)",
"<b>Dental significance:</b> Angular cheilitis, burning tongue, mucosal pallor are common presenting features in dental practice.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(b("Lab Investigations"), sub_heading))
lab_data = [
[Paragraph("<b>Test</b>", body_style), Paragraph("<b>Finding in IDA</b>", body_style)],
[Paragraph("Hb", body_style), Paragraph("Decreased", body_style)],
[Paragraph("MCV", body_style), Paragraph("<80 fL (microcytic)", body_style)],
[Paragraph("MCH / MCHC", body_style), Paragraph("Decreased (hypochromic)", body_style)],
[Paragraph("Serum ferritin", body_style), Paragraph("Decreased (<12 ng/mL) — earliest marker", body_style)],
[Paragraph("Serum iron", body_style), Paragraph("Decreased (<60 µg/dL)", body_style)],
[Paragraph("TIBC", body_style), Paragraph("Increased (>400 µg/dL)", body_style)],
[Paragraph("Transferrin saturation", body_style), Paragraph("Decreased (<16%)", body_style)],
[Paragraph("Reticulocyte count", body_style), Paragraph("Low/normal (hypoproliferative)", body_style)],
[Paragraph("PBS (Peripheral smear)", body_style), Paragraph("Microcytic hypochromic RBCs, target cells, pencil cells", body_style)],
[Paragraph("Platelet count", body_style), Paragraph("Often elevated (reactive thrombocytosis)", body_style)],
]
tbl_lab = Table(lab_data, colWidths=[5*cm, 12*cm])
tbl_lab.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#bbdefb')),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor('#f5f5f5')]),
('TOPPADDING', (0,0), (-1,-1), 3),
('BOTTOMPADDING', (0,0), (-1,-1), 3),
('FONTSIZE', (0,0), (-1,-1), 9),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
]))
story.append(tbl_lab)
story.append(Spacer(1, 4))
story.append(Paragraph(b("Treatment"), sub_heading))
for pt in [
"<b>Oral iron:</b> Ferrous sulphate 200 mg (65 mg elemental iron) TDS for 3-6 months. Take on empty stomach; ascorbic acid enhances absorption.",
"<b>Response:</b> Reticulocytosis in 5-7 days; Hb rises ~1 g/dL/week; continue until stores replenished.",
"<b>IV iron</b> (ferric carboxymaltose / iron sucrose): For malabsorption, intolerance, or non-compliance.",
"<b>Blood transfusion:</b> Only for severe symptomatic anemia (Hb <7 g/dL) or cardiac compromise.",
"<b>Treat underlying cause</b> (e.g., stop bleeding, treat hookworm, manage coeliac disease).",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(
"KEY: Serum ferritin is the most sensitive early indicator of iron depletion. IDA is a symptom, not a diagnosis — always find the cause.",
note_box_style))
# ─── TOPIC 4 ───
add_topic_header(story, "4. MEGALOBLASTIC ANEMIA")
story.append(Paragraph(b("Definition"), sub_heading))
story.append(Paragraph(
"Megaloblastic anemia is a macrocytic anemia caused by impaired DNA synthesis (due to Vitamin B12 or Folate deficiency), "
"leading to nuclear-cytoplasmic asynchrony, ineffective hematopoiesis, and characteristic large immature red cell precursors (megaloblasts) in the bone marrow.",
body_style))
story.append(Paragraph(b("Causes"), sub_heading))
for pt in [
"<b>Vitamin B12 (Cobalamin) deficiency:</b>",
" - Pernicious anemia (autoimmune; anti-intrinsic factor Ab; most common cause in adults)",
" - Strict vegetarian/vegan diet (no animal products)",
" - Gastrectomy, ileal disease/resection (site of B12 absorption)",
" - Fish tapeworm (Diphyllobothrium latum), bacterial overgrowth",
"<b>Folate deficiency:</b>",
" - Poor diet (alcoholism, infancy, elderly)",
" - Malabsorption (coeliac disease)",
" - Increased requirement (pregnancy, haemolysis, malignancy)",
" - Drugs: Methotrexate, phenytoin, trimethoprim (folate antagonists)",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(b("Pathogenesis"), sub_heading))
for pt in [
"B12 and Folate are cofactors for thymidine synthesis (essential for DNA).",
"Deficiency → impaired DNA replication → delayed nuclear maturation, but cytoplasm matures normally → nuclear-cytoplasmic asynchrony.",
"Erythroid precursors become large (megaloblasts) and undergo apoptosis in marrow → ineffective erythropoiesis.",
"Result: Macrocytic anemia + pancytopenia + hypersegmented neutrophils.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(b("Clinical Features"), sub_heading))
feat_data = [
[Paragraph("<b>B12 Deficiency (additional features)</b>", body_style),
Paragraph("<b>Folate Deficiency</b>", body_style)],
[Paragraph(
"• General anemia symptoms\n"
"• Subacute combined degeneration of spinal cord (SACD): posterior + lateral column demyelination\n"
" → paraesthesia, ataxia, weakness, loss of vibration/proprioception\n"
"• Psychiatric: 'megaloblastic madness' — paranoia, depression, cognitive impairment\n"
"• Glossitis (smooth, red tongue — Hunter's glossitis)\n"
"• Jaundice (intramedullary haemolysis)",
body_style),
Paragraph(
"• General anemia symptoms\n"
"• NO neurological features (important distinction from B12)\n"
"• Glossitis and oral ulcers\n"
"• Common in pregnancy (neural tube defect risk if deficient)\n"
"• More rapid onset than B12 deficiency",
body_style)],
]
tbl_feat = Table(feat_data, colWidths=[8.5*cm, 8.5*cm])
tbl_feat.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#e8eaf6')),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('FONTSIZE', (0,0), (-1,-1), 9),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(tbl_feat)
story.append(Spacer(1, 4))
story.append(Paragraph(b("Lab Investigations"), sub_heading))
for pt in [
"Hb decreased; MCV >100 fL (macrocytic).",
"PBS: Macro-ovalocytes, anisocytosis, poikilocytosis; <b>hypersegmented neutrophils</b> (≥5 lobes) — pathognomonic.",
"Reticulocyte count low (ineffective erythropoiesis).",
"Serum B12 <200 pg/mL; Serum folate <3 ng/mL.",
"Elevated homocysteine (both B12 and folate deficiency); Elevated methylmalonic acid (MMA) — specific for B12 deficiency.",
"Bone marrow: Hypercellular with megaloblasts, giant metamyelocytes.",
"Indirect bilirubin elevated (intramedullary haemolysis), LDH elevated.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(b("Treatment"), sub_heading))
for pt in [
"<b>B12 deficiency:</b> IM hydroxocobalamin 1000 µg daily × 7 days, then weekly × 4 weeks, then 3-monthly for life (if pernicious anemia).",
"<b>Folate deficiency:</b> Folic acid 5 mg OD orally for 4 months.",
"<b>Pernicious anemia:</b> Life-long B12 replacement (can't absorb oral B12 — no IF).",
"<b>IMPORTANT:</b> Never give folate alone in B12 deficiency — corrects anemia but precipitates/worsens SACD.",
"Reticulocytosis in 3-5 days; Hb normalises in 4-8 weeks.",
"Prophylactic folic acid 5 mg daily in pregnancy to prevent neural tube defects.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(
"KEY: Hypersegmented neutrophils are the earliest and most specific blood film finding. "
"Distinguish B12 from folate by MMA level (high only in B12 deficiency). "
"Neurological features occur ONLY in B12 deficiency.",
note_box_style))
# ─── TOPIC 5 ───
add_topic_header(story, "5. APLASTIC ANEMIA")
story.append(Paragraph(b("Definition"), sub_heading))
story.append(Paragraph(
"Aplastic anemia is a disorder caused by suppression or destruction of multipotent myeloid stem cells "
"in the bone marrow, resulting in <b>pancytopenia</b> (anemia + leukopenia + thrombocytopenia) with "
"a hypocellular ('empty') bone marrow.",
body_style))
story.append(Paragraph(b("Etiology"), sub_heading))
eti_data = [
[Paragraph("<b>Category</b>", body_style), Paragraph("<b>Examples</b>", body_style)],
[Paragraph("Idiopathic (most common ~70%)", body_style), Paragraph("Unknown cause", body_style)],
[Paragraph("Drugs", body_style), Paragraph("Chloramphenicol (classic), NSAIDs, sulphonamides, anti-epileptics (carbamazepine), gold, benzene", body_style)],
[Paragraph("Infections", body_style), Paragraph("Hepatitis viruses (non-A, non-B, non-C), EBV, CMV, HIV, parvovirus B19", body_style)],
[Paragraph("Radiation", body_style), Paragraph("Ionising radiation damage to marrow", body_style)],
[Paragraph("Inherited", body_style), Paragraph("Fanconi anemia (autosomal recessive; DNA repair defect)", body_style)],
[Paragraph("Autoimmune", body_style), Paragraph("SLE, eosinophilic fasciitis", body_style)],
]
tbl_eti = Table(eti_data, colWidths=[5*cm, 12*cm])
tbl_eti.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#e8eaf6')),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor('#f5f5f5')]),
('TOPPADDING', (0,0), (-1,-1), 3),
('BOTTOMPADDING', (0,0), (-1,-1), 3),
('FONTSIZE', (0,0), (-1,-1), 9),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(tbl_eti)
story.append(Spacer(1, 4))
story.append(Paragraph(b("Pathogenesis"), sub_heading))
for pt in [
"<b>Immune-mediated (main mechanism):</b> Drugs/infections antigenically alter stem cells → activated Th1 cells produce IFN-γ and TNF-α → suppress hematopoietic progenitors. Immunosuppressive therapy restores hematopoiesis in 60-70% — confirms immune basis.",
"<b>Intrinsic stem cell defect:</b> Telomerase mutations → premature stem cell senescence (5-10% cases). ~50% have abnormally short telomeres.",
"Both mechanisms can coexist: mutant stem cells may express neoantigens that provoke T-cell attack.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(b("Clinical Features"), sub_heading))
for pt in [
"<b>Anemia symptoms:</b> Weakness, pallor, fatigue, dyspnoea (insidious onset).",
"<b>Thrombocytopenia:</b> Petechiae, ecchymoses, purpura, gum bleeding, epistaxis.",
"<b>Neutropenia/Leukopenia:</b> Recurrent serious infections (bacterial, fungal).",
"<b>No splenomegaly</b> — distinguishes it from leukaemia and myelofibrosis.",
"<b>Dental relevance:</b> Spontaneous gum bleeding, mucosal petechiae, high infection risk — avoid invasive procedures without haematology review.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(b("Severity Classification (Camitta Criteria)"), sub_heading))
sev_data = [
[Paragraph("<b>Category</b>", body_style), Paragraph("<b>Criteria (any 2 of 3 + hypocellular marrow)</b>", body_style)],
[Paragraph("Moderate AA", body_style), Paragraph("Doesn't meet severe criteria but symptomatic pancytopenia", body_style)],
[Paragraph("Severe AA (SAA)", body_style), Paragraph("ANC <500/µL; Platelets <20,000/µL; Reticulocytes <1%", body_style)],
[Paragraph("Very Severe AA (vSAA)", body_style), Paragraph("SAA criteria + ANC <200/µL", body_style)],
]
tbl_sev = Table(sev_data, colWidths=[4*cm, 13*cm])
tbl_sev.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#e8eaf6')),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor('#f5f5f5')]),
('TOPPADDING', (0,0), (-1,-1), 3),
('BOTTOMPADDING', (0,0), (-1,-1), 3),
('FONTSIZE', (0,0), (-1,-1), 9),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
]))
story.append(tbl_sev)
story.append(Spacer(1, 4))
story.append(Paragraph(b("Investigations"), sub_heading))
for pt in [
"CBC: Pancytopenia (all cell lines reduced).",
"<b>Bone marrow biopsy (trephine): Hypocellular marrow with fat cells</b> — diagnostic hallmark.",
"Reticulocyte count: Low (<1%).",
"PBS: Normocytic normochromic anemia, reduced WBC and platelets, no abnormal cells.",
"Cytogenetics and Ham's test (PNH screen), liver enzymes (post-hepatitis AA).",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(b("Treatment"), sub_heading))
for pt in [
"<b>Stop the offending agent</b> (if drug-induced).",
"<b>Haematopoietic Stem Cell Transplantation (HSCT):</b> Definitive/curative treatment; preferred for age <40 with matched sibling donor; conditioning with cyclophosphamide + anti-thymocyte globulin (ATG).",
"<b>Immunosuppressive therapy</b> (for non-transplant candidates): ATG + cyclosporine ± eltrombopag; response in 60-70%.",
"<b>Androgens</b> (oxymetholone): Stimulate erythropoiesis; used in mild/moderate cases.",
"<b>Supportive care:</b> Packed RBC transfusions, platelet transfusions; G-CSF for neutropenia; prophylactic antibiotics/antifungals.",
"<b>Minimize transfusions</b> in transplant candidates — sensitisation reduces engraftment success.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(
"KEY: Aplastic anemia = PANCYTOPENIA + HYPOCELLULAR marrow. "
"Drug of note: Chloramphenicol. No splenomegaly. "
"HSCT is curative in young patients. Confirm by bone marrow trephine biopsy.",
note_box_style))
# ──── Footer comparison table ────
story.append(Spacer(1, 12))
story.append(HRFlowable(width="100%", thickness=1.5, color=colors.HexColor('#3949ab'), spaceAfter=8))
story.append(Paragraph(
"<b>Quick Comparison: The Three Specific Anemias</b>",
ParagraphStyle('CompHead', parent=styles['Normal'], fontSize=10.5, textColor=colors.HexColor('#1a237e'),
fontName='Helvetica-Bold', spaceAfter=4)
))
comp_data = [
[Paragraph("<b>Feature</b>", body_style),
Paragraph("<b>Iron Deficiency</b>", body_style),
Paragraph("<b>Megaloblastic</b>", body_style),
Paragraph("<b>Aplastic</b>", body_style)],
[Paragraph("MCV", body_style), Paragraph("Low (<80)", body_style), Paragraph("High (>100)", body_style), Paragraph("Normal", body_style)],
[Paragraph("Blood smear", body_style), Paragraph("Microcytic hypochromic", body_style), Paragraph("Macro-ovalocytes, hyperseg neutrophils", body_style), Paragraph("Normocytic; all cells reduced", body_style)],
[Paragraph("Ferritin", body_style), Paragraph("Low", body_style), Paragraph("Normal", body_style), Paragraph("Normal", body_style)],
[Paragraph("B12/Folate", body_style), Paragraph("Normal", body_style), Paragraph("Low", body_style), Paragraph("Normal", body_style)],
[Paragraph("Bone marrow", body_style), Paragraph("Hypoplastic (iron depleted)", body_style), Paragraph("Hypercellular, megaloblasts", body_style), Paragraph("Hypocellular (fat cells)", body_style)],
[Paragraph("Reticulocytes", body_style), Paragraph("Low", body_style), Paragraph("Low", body_style), Paragraph("Very low", body_style)],
[Paragraph("Platelets", body_style), Paragraph("Often elevated", body_style), Paragraph("Low (pancytopenia)", body_style), Paragraph("Low (pancytopenia)", body_style)],
[Paragraph("Hallmark sign", body_style), Paragraph("Koilonychia, pica", body_style), Paragraph("Hyperseg. neutrophils, SACD (B12)", body_style), Paragraph("No splenomegaly", body_style)],
[Paragraph("Treatment", body_style), Paragraph("Oral ferrous sulphate", body_style), Paragraph("B12 IM / Folic acid oral", body_style), Paragraph("HSCT / ATG + CsA", body_style)],
]
tbl_comp = Table(comp_data, colWidths=[3.8*cm, 4.2*cm, 4.8*cm, 4.2*cm])
tbl_comp.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#283593')),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor('#e8eaf6')]),
('TOPPADDING', (0,0), (-1,-1), 3),
('BOTTOMPADDING', (0,0), (-1,-1), 3),
('FONTSIZE', (0,0), (-1,-1), 8.5),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(tbl_comp)
story.append(Spacer(1, 10))
story.append(Paragraph(
"Note: These notes are based on standard general medicine texts (Anil K. Tripathi / standard references) "
"for Gujarat University BDS 3rd Year. For exam answers, include definition, causes, pathogenesis, "
"clinical features, investigations, and treatment for full marks.",
ParagraphStyle('Footer', parent=styles['Normal'], fontSize=8, textColor=colors.HexColor('#607d8b'),
alignment=TA_CENTER, fontName='Helvetica-Oblique')
))
doc.build(story)
print(f"PDF generated: {output_path}")
cd /tmp/workspace/bds-notes && python generate_notes.py
BDS General Medicine Short Notes
PDF Document · PDF
Write me a shrot notes for the following topics from anil k tripathi book of general medicine for bds gujarat university for 3 year exams about 7-8 marks Make concise to the point precise ans to the topics are Leukemia Lymphadenopathy Acute rheumatic fever Infective endocarditis Hypertension In pdf form
~/bds-notes/generate_notes2.py
from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm
from reportlab.lib import colors
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
output_path = "/tmp/workspace/bds-notes/BDS_General_Medicine_Short_Notes_Part2.pdf"
doc = SimpleDocTemplate(
output_path,
pagesize=A4,
rightMargin=2*cm,
leftMargin=2*cm,
topMargin=2.2*cm,
bottomMargin=2*cm,
title="BDS General Medicine Short Notes Part 2",
author="Gujarat University BDS 3rd Year"
)
styles = getSampleStyleSheet()
# ─── Style definitions ───
title_style = ParagraphStyle('MainTitle', parent=styles['Title'], fontSize=18, leading=22,
textColor=colors.HexColor('#0d47a1'), spaceAfter=4, alignment=TA_CENTER, fontName='Helvetica-Bold')
subtitle_style = ParagraphStyle('Subtitle', parent=styles['Normal'], fontSize=10,
textColor=colors.HexColor('#1565c0'), alignment=TA_CENTER, spaceAfter=14, fontName='Helvetica')
sub_heading = ParagraphStyle('SubHeading', parent=styles['Heading2'], fontSize=10.5, leading=13,
textColor=colors.HexColor('#1565c0'), spaceBefore=7, spaceAfter=2, fontName='Helvetica-Bold')
body_style = ParagraphStyle('Body', parent=styles['Normal'], fontSize=9.5, leading=14,
textColor=colors.HexColor('#212121'), spaceAfter=4, fontName='Helvetica', alignment=TA_JUSTIFY)
bullet_style = ParagraphStyle('Bullet', parent=styles['Normal'], fontSize=9.5, leading=13,
textColor=colors.HexColor('#212121'), spaceAfter=2, fontName='Helvetica',
leftIndent=14, bulletIndent=4, alignment=TA_LEFT)
note_box_style = ParagraphStyle('NoteBox', parent=styles['Normal'], fontSize=9, leading=13,
textColor=colors.HexColor('#4a148c'), spaceAfter=6, spaceBefore=4,
fontName='Helvetica-Oblique', leftIndent=6, rightIndent=6, borderPad=4)
def add_topic_header(story, text):
tbl = Table([[Paragraph(f"<font color='white'><b> {text}</b></font>",
ParagraphStyle('TH', parent=styles['Normal'], fontSize=12.5,
fontName='Helvetica-Bold', textColor=colors.white, leading=15))
]], colWidths=[17*cm])
tbl.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), colors.HexColor('#0d47a1')),
('TOPPADDING', (0,0), (-1,-1), 7),
('BOTTOMPADDING', (0,0), (-1,-1), 7),
('LEFTPADDING', (0,0), (-1,-1), 8),
]))
story.append(Spacer(1, 8))
story.append(tbl)
story.append(Spacer(1, 5))
def make_table(data, col_widths, header_color='#bbdefb'):
tbl = Table(data, colWidths=col_widths)
tbl.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor(header_color)),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor('#f5f5f5')]),
('TOPPADDING', (0,0), (-1,-1), 3),
('BOTTOMPADDING', (0,0), (-1,-1), 3),
('FONTSIZE', (0,0), (-1,-1), 9),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
return tbl
story = []
# ──── Title Page ────
story.append(Spacer(1, 0.5*cm))
story.append(Paragraph("General Medicine Short Notes — Part 2", title_style))
story.append(Paragraph("BDS 3rd Year | Gujarat University | Based on Anil K. Tripathi", subtitle_style))
story.append(HRFlowable(width="100%", thickness=2, color=colors.HexColor('#1565c0'), spaceAfter=10))
story.append(Paragraph(
"Topics: Leukemia • Lymphadenopathy • Acute Rheumatic Fever • Infective Endocarditis • Hypertension",
ParagraphStyle('Topics', parent=styles['Normal'], fontSize=9.5, textColor=colors.HexColor('#455a64'),
alignment=TA_CENTER, spaceAfter=16)))
# ═══════════════════════════════════════════════════════════
# TOPIC 1 — LEUKEMIA
# ═══════════════════════════════════════════════════════════
add_topic_header(story, "1. LEUKEMIA")
story.append(Paragraph("<b>Definition</b>", sub_heading))
story.append(Paragraph(
"Leukemia is a malignant clonal disorder of hematopoietic stem cells characterised by uncontrolled "
"proliferation of immature (blast) or mature white blood cells in the bone marrow and peripheral blood, "
"with suppression of normal hematopoiesis.",
body_style))
story.append(Paragraph("<b>Classification</b>", sub_heading))
cls_data = [
[Paragraph("<b>Type</b>", body_style), Paragraph("<b>Cell of Origin</b>", body_style), Paragraph("<b>Key Features</b>", body_style)],
[Paragraph("Acute Lymphoblastic Leukemia (ALL)", body_style),
Paragraph("Lymphoid precursor (B or T cell)", body_style),
Paragraph("Most common childhood leukemia (peak 2-5 yrs); blasts >20% BM; Philadelphia chr positive in adults = poor prognosis", body_style)],
[Paragraph("Acute Myeloid Leukemia (AML)", body_style),
Paragraph("Myeloid precursor", body_style),
Paragraph("Most common acute leukemia in adults; Auer rods pathognomonic; M3 (APL) responds to ATRA", body_style)],
[Paragraph("Chronic Myeloid Leukemia (CML)", body_style),
Paragraph("Myeloid stem cell", body_style),
Paragraph("t(9;22) Philadelphia chromosome (BCR-ABL); treated with imatinib (Gleevec)", body_style)],
[Paragraph("Chronic Lymphocytic Leukemia (CLL)", body_style),
Paragraph("Mature B lymphocyte", body_style),
Paragraph("Most common leukemia in adults >50 yrs; indolent; 'smudge/smear cells' on PBS", body_style)],
]
story.append(make_table(cls_data, [4*cm, 3.5*cm, 9.5*cm], '#c5cae9'))
story.append(Spacer(1, 4))
story.append(Paragraph("<b>Etiology / Risk Factors</b>", sub_heading))
for pt in [
"Ionising radiation (atomic bomb survivors, radiotherapy).",
"Chemical exposure: Benzene, alkylating chemotherapy agents.",
"Genetic disorders: Down syndrome (21-trisomy) — 20× risk of ALL/AML; Fanconi anaemia.",
"Viruses: HTLV-1 (Adult T-cell leukemia); EBV.",
"Chromosomal abnormalities: Philadelphia chromosome in CML; t(15;17) in AML-M3.",
"Familial predisposition (monozygotic twin of leukemic patient has increased risk).",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph("<b>Clinical Features</b>", sub_heading))
feat_data = [
[Paragraph("<b>System</b>", body_style), Paragraph("<b>Features</b>", body_style)],
[Paragraph("Bone marrow failure\n(↓ RBC, WBC, platelets)", body_style),
Paragraph("Anaemia: pallor, fatigue, dyspnoea\nNeutropenia: recurrent serious infections\nThrombocytopenia: petechiae, purpura, bleeding gums, epistaxis", body_style)],
[Paragraph("Organ infiltration", body_style),
Paragraph("Hepatosplenomegaly (massive in CML)\nLymphadenopathy (ALL/CLL)\nBone pain and tenderness (ALL — common in children)\nTesticular infiltration (ALL)\nCNS: headache, cranial nerve palsies, meningism", body_style)],
[Paragraph("Hyperleukocytosis", body_style),
Paragraph("WBC >100,000 → leukostasis: stroke, dyspnoea, priapism", body_style)],
[Paragraph("Metabolic", body_style),
Paragraph("Hyperuricaemia → gout, renal stones (tumour lysis); hyperkalaemia, hyperphosphataemia", body_style)],
]
story.append(make_table(feat_data, [4.5*cm, 12.5*cm], '#c5cae9'))
story.append(Spacer(1, 4))
story.append(Paragraph("<b>Investigations</b>", sub_heading))
for pt in [
"<b>CBC:</b> Anaemia, thrombocytopenia; WBC variable (may be high, normal, or low — aleukemic leukemia).",
"<b>Peripheral blood smear:</b> Blast cells (>20% = acute); Auer rods (AML); smudge cells (CLL).",
"<b>Bone marrow biopsy (trephine):</b> Diagnostic gold standard — >20% blasts = acute leukemia.",
"<b>Immunophenotyping:</b> Flow cytometry identifies cell lineage (B-ALL: CD19, CD10; T-ALL: CD3, CD7; AML: CD33, CD13).",
"<b>Cytogenetics/FISH/PCR:</b> Philadelphia chromosome (CML, ALL); t(15;17) in APL.",
"LFTs, uric acid, LDH (elevated — cell turnover); coagulation (DIC in APL).",
"CSF analysis if CNS involvement suspected.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph("<b>Treatment</b>", sub_heading))
tx_data = [
[Paragraph("<b>Type</b>", body_style), Paragraph("<b>Treatment</b>", body_style)],
[Paragraph("ALL", body_style),
Paragraph("Induction (vincristine + prednisolone + asparaginase + daunorubicin) → Consolidation → Maintenance (2-3 yrs); CNS prophylaxis (intrathecal MTX); Allo-HSCT for high risk", body_style)],
[Paragraph("AML", body_style),
Paragraph("Induction: '7+3' (cytarabine × 7 days + daunorubicin × 3 days); AML-M3 (APL): ATRA + arsenic trioxide (ATO); Allo-HSCT in CR1", body_style)],
[Paragraph("CML", body_style),
Paragraph("Imatinib (TKI) first line — targets BCR-ABL; second gen: dasatinib, nilotinib; Allo-HSCT if TKI failure", body_style)],
[Paragraph("CLL", body_style),
Paragraph("Watch and wait (early stage); FCR (fludarabine + cyclophosphamide + rituximab); BTK inhibitors (ibrutinib)", body_style)],
]
story.append(make_table(tx_data, [3*cm, 14*cm], '#c5cae9'))
story.append(Spacer(1, 4))
story.append(Paragraph("<b>Dental Relevance</b>", sub_heading))
for pt in [
"Spontaneous gum bleeding, gingival hyperplasia (especially AML-M4/M5 — monocytic), mucosal petechiae.",
"High infection risk — avoid elective procedures during active disease/chemotherapy.",
"Antibiotic prophylaxis before invasive dental procedures when neutrophil count is low.",
"Orofacial infiltration by leukaemic cells can present as jaw pain or loosening of teeth.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(
"KEY: Auer rods = AML. Smudge cells = CLL. Philadelphia chromosome = CML (also adverse ALL). "
"Diagnosis confirmed by bone marrow biopsy with >20% blasts (acute leukemia).",
note_box_style))
# ═══════════════════════════════════════════════════════════
# TOPIC 2 — LYMPHADENOPATHY
# ═══════════════════════════════════════════════════════════
add_topic_header(story, "2. LYMPHADENOPATHY")
story.append(Paragraph("<b>Definition</b>", sub_heading))
story.append(Paragraph(
"Lymphadenopathy is enlargement of one or more lymph nodes (normally <1 cm diameter). "
"It results from cellular proliferation in response to antigens, or from infiltration by neoplastic "
"cells, or deposition of foreign substances.",
body_style))
story.append(Paragraph("<b>Classification</b>", sub_heading))
for pt in [
"<b>Localised:</b> Nodes in one region — usually due to local infection/malignancy draining to that region.",
"<b>Generalised:</b> Nodes in 2+ non-contiguous regions — systemic disease (infection, autoimmune, haematological malignancy).",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph("<b>Aetiology (Mnemonic: MIAMI)</b>", sub_heading))
cause_data = [
[Paragraph("<b>Category</b>", body_style), Paragraph("<b>Examples</b>", body_style)],
[Paragraph("Malignancy", body_style), Paragraph("Lymphoma (Hodgkin/NHL), leukemia (ALL/CLL), metastatic carcinoma (breast, lung, GIT, head & neck), melanoma", body_style)],
[Paragraph("Infection (most common)", body_style), Paragraph("Bacterial: TB (most common in India), streptococcal pharyngitis, cat scratch disease\nViral: EBV (infectious mononucleosis), CMV, HIV, rubella\nParasitic: Toxoplasmosis, filariasis", body_style)],
[Paragraph("Autoimmune / Inflammatory", body_style), Paragraph("SLE, RA, sarcoidosis, Kawasaki disease, serum sickness", body_style)],
[Paragraph("Metabolic / Storage", body_style), Paragraph("Gaucher disease, Niemann-Pick disease, hyperthyroidism", body_style)],
[Paragraph("Iatrogenic / Drug", body_style), Paragraph("Phenytoin (pseudolymphoma), serum sickness reactions, post-vaccination", body_style)],
]
story.append(make_table(cause_data, [4.5*cm, 12.5*cm]))
story.append(Spacer(1, 4))
story.append(Paragraph("<b>Clinical Approach / Assessment</b>", sub_heading))
for pt in [
"<b>Site:</b> Cervical (head & neck infection/malignancy); Supraclavicular (always pathological — left = Virchow's node — GI/pelvic malignancy); Axillary (breast, arm); Inguinal (genitalia, perineum, lower limbs); Mediastinal (lymphoma, sarcoidosis, TB).",
"<b>Size:</b> Nodes >1 cm need evaluation; >2 cm suspicious; supraclavicular nodes always abnormal.",
"<b>Consistency:</b> Firm/rubbery = lymphoma; Hard/fixed = metastatic carcinoma; Soft/tender = reactive/inflammatory; Fluctuant = abscess.",
"<b>Tenderness:</b> Tender = usually inflammatory/infectious; Non-tender = malignancy (sinister sign).",
"<b>Matted / fixed:</b> Fixed to skin or deep structures = likely malignant or TB.",
"<b>Associated features:</b> Fever, night sweats, weight loss (B-symptoms = lymphoma/TB); hepatosplenomegaly.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph("<b>Investigations</b>", sub_heading))
for pt in [
"CBC with differential and peripheral smear — identify leukaemia, atypical lymphocytes (EBV).",
"Monospot test / Paul-Bunnell test for infectious mononucleosis.",
"Mantoux test, sputum AFB, HRCT chest for TB.",
"HIV ELISA, ANA (SLE), VDRL.",
"Chest X-ray / CT scan: Mediastinal nodes (lymphoma, sarcoidosis).",
"PET-CT: Staging of lymphoma.",
"<b>Lymph node biopsy (excision biopsy preferred):</b> Definitive diagnosis when malignancy suspected. FNAC as initial step.",
"LDH, uric acid, ESR, CRP.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph("<b>Red Flag Features (Biopsy Mandatory)</b>", sub_heading))
for pt in [
"Node >2 cm, rapidly enlarging, present >4-6 weeks without explanation.",
"Supraclavicular, mediastinal, or hilar nodes.",
"B-symptoms: Fever, drenching night sweats, >10% weight loss.",
"Hard, non-tender, fixed nodes.",
"No response to empirical antibiotics in 2-4 weeks.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(
"KEY: Virchow's node (left supraclavicular) = GI/pelvic malignancy. "
"Rubbery non-tender = lymphoma. All supraclavicular nodes are pathological. "
"TB is most common cause of chronic lymphadenopathy in India.",
note_box_style))
# ═══════════════════════════════════════════════════════════
# TOPIC 3 — ACUTE RHEUMATIC FEVER
# ═══════════════════════════════════════════════════════════
add_topic_header(story, "3. ACUTE RHEUMATIC FEVER (ARF)")
story.append(Paragraph("<b>Definition</b>", sub_heading))
story.append(Paragraph(
"Acute rheumatic fever is an inflammatory autoimmune disease that follows Group A beta-haemolytic "
"Streptococcal (GABHS / GAS) pharyngitis, typically affecting the heart, joints, skin, and CNS. "
"It is the most important preventable cause of acquired heart disease in children.",
body_style))
story.append(Paragraph("<b>Epidemiology</b>", sub_heading))
for pt in [
"Most common age: 4-15 years; rare below 3 years and after age 25.",
"Onset: 2-3 weeks after GABHS throat infection (average latency 18.6 days); chorea may be delayed 4-8 weeks.",
"Recurrence rate is high — each episode of GABHS pharyngitis can trigger another attack in a sensitised patient.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph("<b>Pathogenesis</b>", sub_heading))
story.append(Paragraph(
"Molecular mimicry: Antibodies formed against GABHS M-protein cross-react with cardiac antigens "
"(particularly cardiac myosin and valve glycoproteins) → autoimmune inflammation. "
"Aschoff bodies (granulomas with Anitschkow cells) are the pathological hallmark in cardiac tissue.",
body_style))
story.append(Paragraph("<b>Jones Criteria for Diagnosis (2015 AHA Revised)</b>", sub_heading))
story.append(Paragraph(
"ARF = Evidence of preceding GABHS infection <b>+</b> 2 major, OR 1 major + 2 minor criteria.",
body_style))
jones_data = [
[Paragraph("<b>MAJOR Criteria</b>", body_style), Paragraph("<b>MINOR Criteria</b>", body_style)],
[Paragraph(
"1. Carditis (clinical or subclinical/echocardiographic)\n"
"2. Polyarthritis (migratory)\n"
"3. Chorea (Sydenham's chorea)\n"
"4. Erythema marginatum\n"
"5. Subcutaneous nodules",
body_style),
Paragraph(
"1. Fever (>38.5°C)\n"
"2. Elevated ESR or CRP\n"
"3. Prolonged PR interval on ECG\n"
"4. Arthralgia (only if arthritis not used as major)\n"
"5. Elevated WBC count",
body_style)],
]
tbl_jones = Table(jones_data, colWidths=[8.5*cm, 8.5*cm])
tbl_jones.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#e3f2fd')),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('FONTSIZE', (0,0), (-1,-1), 9),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(tbl_jones)
story.append(Spacer(1, 4))
story.append(Paragraph("<b>Evidence of Preceding GABHS Infection</b>", sub_heading))
for pt in [
"Positive throat swab culture for GABHS.",
"Raised/rising ASO titre (antistreptolysin O) — most commonly used; >200 IU/mL adults, >300 IU/mL children.",
"Raised anti-DNase B, anti-streptokinase, or positive rapid antigen test.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph("<b>Clinical Features in Detail</b>", sub_heading))
cf_data = [
[Paragraph("<b>Feature</b>", body_style), Paragraph("<b>Details</b>", body_style)],
[Paragraph("Carditis\n(50-75%)", body_style),
Paragraph("Pan-carditis: pericarditis + myocarditis + endocarditis\nMitral valve most affected (MR most common murmur)\nCarey-Coombs murmur (mid-diastolic flow murmur at apex)\nAortic regurgitation in ~20-30%\nLeads to rheumatic heart disease (mitral stenosis in chronic); HF is most life-threatening complication", body_style)],
[Paragraph("Arthritis\n(75%, most common)", body_style),
Paragraph("Migratory polyarthritis — large joints (knees, ankles, elbows, wrists)\nHot, swollen, tender joints; exquisite tenderness\nNever causes permanent joint damage\nResponds dramatically to NSAIDs (aspirin)", body_style)],
[Paragraph("Chorea\n(Sydenham's — 10-15%)", body_style),
Paragraph("Purposeless, involuntary movements; emotional lability\nDelayed onset (4-8 weeks); may appear in isolation\n'Milkmaid's grip' — irregular grip on testing", body_style)],
[Paragraph("Erythema marginatum\n(<5%)", body_style),
Paragraph("Evanescent, non-pruritic, pink rings with pale centres on trunk/proximal limbs; spares face", body_style)],
[Paragraph("Subcutaneous nodules\n(<5%)", body_style),
Paragraph("Firm, painless, pea-sized; over bony prominences (elbows, wrists, occiput)\nAssociated with severe carditis", body_style)],
]
story.append(make_table(cf_data, [3.5*cm, 13.5*cm]))
story.append(Spacer(1, 4))
story.append(Paragraph("<b>Investigations</b>", sub_heading))
for pt in [
"ASO titre, anti-DNase B (evidence of GABHS).",
"CBC: Leukocytosis; ESR and CRP elevated.",
"ECG: Prolonged PR interval (1st degree heart block); sometimes 2nd/3rd degree block.",
"Chest X-ray: Cardiomegaly if HF.",
"Echocardiography: Subclinical carditis detection; mitral/aortic valve lesions.",
"Throat swab: Culture for GABHS.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph("<b>Treatment</b>", sub_heading))
for pt in [
"<b>Bed rest:</b> Until acute inflammation resolves (ESR normal).",
"<b>Eradicate GABHS:</b> Benzathine penicillin G 1.2 MU IM single dose (or oral phenoxymethylpenicillin × 10 days); erythromycin if penicillin allergic.",
"<b>Arthritis:</b> Aspirin 75-100 mg/kg/day in 4-6 divided doses (drug of choice); NSAIDs.",
"<b>Carditis with HF:</b> Add corticosteroids (prednisolone 2 mg/kg/day) — more rapidly suppress inflammation.",
"<b>Chorea:</b> Carbamazepine or sodium valproate; haloperidol.",
"<b>Secondary prophylaxis (most important):</b> Benzathine penicillin G 1.2 MU IM every 3-4 weeks — duration: 5 years/until age 21 (no carditis); 10 years/until age 40 (carditis without residual); lifelong (carditis with residual valvular disease).",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(
"KEY MNEMONIC for Jones Criteria — Major: JONES (J=Joints/Arthritis, O=cardiac, N=Nodules, E=Erythema marginatum, S=Sydenham's chorea). "
"Arthritis is the most common, carditis is the most serious. ASO titre is the key investigation. "
"Arthritis never causes permanent damage; carditis does (mitral stenosis in RHD).",
note_box_style))
# ═══════════════════════════════════════════════════════════
# TOPIC 4 — INFECTIVE ENDOCARDITIS
# ═══════════════════════════════════════════════════════════
add_topic_header(story, "4. INFECTIVE ENDOCARDITIS (IE)")
story.append(Paragraph("<b>Definition</b>", sub_heading))
story.append(Paragraph(
"Infective endocarditis is microbial infection (bacterial or fungal) of the endocardial lining of the "
"heart — including native/prosthetic heart valves, mural endocardium, and implanted cardiac material — "
"characterised by vegetation formation on valve leaflets.",
body_style))
story.append(Paragraph("<b>Classification</b>", sub_heading))
for pt in [
"<b>Acute IE:</b> Virulent organism (S. aureus); rapid valve destruction; toxaemia; fatal if untreated within days-weeks.",
"<b>Subacute IE (SBE):</b> Low-virulence organisms (Streptococcus viridans); insidious onset; pre-existing valvular disease; weeks-months course.",
"<b>Culture-negative IE:</b> Organisms of HACEK group, Coxiella, Bartonella.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph("<b>Predisposing Factors</b>", sub_heading))
ie_risk_data = [
[Paragraph("<b>Cardiac (Structural)</b>", body_style), Paragraph("<b>Non-Cardiac (Bacteraemia Source)</b>", body_style)],
[Paragraph(
"• Rheumatic heart disease (mitral valve — most common in developing world)\n"
"• Bicuspid aortic valve\n"
"• Prosthetic heart valves (high risk)\n"
"• Congenital heart disease (VSD, PDA, ToF)\n"
"• Previous IE\n"
"• Mitral valve prolapse with regurgitation",
body_style),
Paragraph(
"• Dental procedures (tooth extraction, scaling — Strep. viridans)\n"
"• IV drug abuse (tricuspid valve — S. aureus)\n"
"• Intravascular catheters/pacemakers\n"
"• Haemodialysis\n"
"• Urological/GI procedures\n"
"• Diabetes, HIV, cancer",
body_style)],
]
tbl_risk = Table(ie_risk_data, colWidths=[8.5*cm, 8.5*cm])
tbl_risk.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#e8f5e9')),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('FONTSIZE', (0,0), (-1,-1), 9),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(tbl_risk)
story.append(Spacer(1, 4))
story.append(Paragraph("<b>Common Causative Organisms</b>", sub_heading))
org_data = [
[Paragraph("<b>Organism</b>", body_style), Paragraph("<b>Situation</b>", body_style)],
[Paragraph("Streptococcus viridans (S. sanguinis etc.)", body_style), Paragraph("Most common overall; dental procedures; native valve SBE", body_style)],
[Paragraph("Staphylococcus aureus", body_style), Paragraph("Most common acute IE; IV drug abusers; prosthetic valves; intravascular devices — most aggressive", body_style)],
[Paragraph("Enterococcus faecalis", body_style), Paragraph("GU/GI procedures; elderly males", body_style)],
[Paragraph("HACEK group", body_style), Paragraph("Culture-negative IE; slow growing; large vegetations", body_style)],
[Paragraph("Fungi (Candida, Aspergillus)", body_style), Paragraph("Immunocompromised, IV drug abusers, prosthetic valves", body_style)],
[Paragraph("Strep. bovis (S. gallolyticus)", body_style), Paragraph("Associated with colon cancer — must investigate colon", body_style)],
]
story.append(make_table(org_data, [5.5*cm, 11.5*cm], '#c8e6c9'))
story.append(Spacer(1, 4))
story.append(Paragraph("<b>Clinical Features</b>", sub_heading))
for pt in [
"<b>Constitutional:</b> Prolonged fever (most common), rigors, night sweats, weight loss, malaise, anaemia.",
"<b>Cardiac:</b> New or changing murmur (most important); heart failure; conduction defects.",
"<b>Peripheral Embolic Signs:</b>",
" - <b>Janeway lesions:</b> Painless, erythematous macules on palms/soles (septic emboli — PAINLESS).",
" - <b>Osler's nodes:</b> Painful, tender, pea-sized nodules on finger/toe pulps (immune complex).",
" - <b>Splinter haemorrhages:</b> Red-brown linear streaks under nails (15% cases).",
" - <b>Roth's spots:</b> Oval haemorrhages with pale centre in retina (immune complex).",
" - <b>Petechiae:</b> Conjunctival, buccal, palatal mucosal spots.",
"<b>Clubbing</b> (chronic IE): 'Watch-glass' nails.",
"<b>Embolic complications:</b> Stroke, renal infarct, splenic abscess, mycotic aneurysm, septic pulmonary emboli (right-sided IE).",
"<b>Renal:</b> Immune complex glomerulonephritis (haematuria, proteinuria).",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph("<b>Duke Criteria for Diagnosis (Modified, 2023)</b>", sub_heading))
story.append(Paragraph(
"Definite IE = 2 Major criteria, OR 1 Major + 3 Minor, OR 5 Minor criteria.",
body_style))
duke_data = [
[Paragraph("<b>MAJOR Criteria</b>", body_style), Paragraph("<b>MINOR Criteria</b>", body_style)],
[Paragraph(
"1. Positive blood cultures:\n"
" - Typical organism (S. viridans, S. aureus, HACEK, Enterococcus) in ≥2 separate cultures\n"
" - Persistently positive blood cultures\n"
"2. Echocardiographic evidence:\n"
" - Vegetation on valve/endocardium\n"
" - Perivalvular abscess\n"
" - New dehiscence of prosthetic valve\n"
" - New valvular regurgitation\n"
"3. Positive PET/CT (prosthetic valve IE)",
body_style),
Paragraph(
"1. Predisposition (cardiac risk / IV drug use)\n"
"2. Fever >38°C\n"
"3. Vascular phenomena: emboli, Janeway lesions, mycotic aneurysm, intracranial haemorrhage\n"
"4. Immunological phenomena: Osler's nodes, Roth's spots, glomerulonephritis, +ve RF\n"
"5. Microbiological evidence not meeting major criteria",
body_style)],
]
tbl_duke = Table(duke_data, colWidths=[8.5*cm, 8.5*cm])
tbl_duke.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#c8e6c9')),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('FONTSIZE', (0,0), (-1,-1), 9),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(tbl_duke)
story.append(Spacer(1, 4))
story.append(Paragraph("<b>Investigations</b>", sub_heading))
for pt in [
"<b>Blood cultures (3 sets from different sites before antibiotics):</b> Most important investigation.",
"CBC: Normocytic normochromic anaemia; leukocytosis.",
"ESR, CRP elevated; rheumatoid factor positive (50%).",
"Urinalysis: Haematuria, proteinuria.",
"<b>Echocardiography (TTE/TOE):</b> Shows vegetations, abscess, valve destruction — TOE more sensitive.",
"ECG: New conduction defects suggest perivalvular abscess.",
"CT/MRI brain: Embolic stroke assessment.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph("<b>Treatment</b>", sub_heading))
for pt in [
"<b>Bactericidal antibiotics IV for 4-6 weeks</b> (must be bactericidal — valve vegetations are avascular).",
"S. viridans: Benzyl penicillin + gentamicin (or ceftriaxone for 4 weeks).",
"S. aureus (MSSA): Flucloxacillin; MRSA: Vancomycin or daptomycin.",
"Culture-negative: Amoxicillin/ampicillin + gentamicin.",
"<b>Surgery (valve repair/replacement) indicated for:</b> Severe HF, uncontrolled infection, recurrent emboli, large vegetations, prosthetic valve IE.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph("<b>Prophylaxis (DENTAL RELEVANCE)</b>", sub_heading))
for pt in [
"Antibiotic prophylaxis recommended before invasive dental procedures in HIGH RISK patients only (AHA 2021).",
"High risk: Prosthetic valves, previous IE, unrepaired cyanotic CHD, cardiac transplant with valvulopathy.",
"Drug of choice: <b>Amoxicillin 2 g PO 30-60 min before procedure</b>; if penicillin allergy: azithromycin or doxycycline.",
"Clindamycin NO LONGER recommended (C. difficile risk).",
"Good oral hygiene is equally important to prevent bacteraemia.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(
"KEY: 'JORE' — Janeway (painless palms/soles), Osler (painful finger pulps), Roth spots (retina), Emboli. "
"Blood cultures × 3 before antibiotics. S. viridans from dental procedures. "
"S. aureus most aggressive. TOE > TTE for vegetations.",
note_box_style))
# ═══════════════════════════════════════════════════════════
# TOPIC 5 — HYPERTENSION
# ═══════════════════════════════════════════════════════════
add_topic_header(story, "5. HYPERTENSION (HTN)")
story.append(Paragraph("<b>Definition</b>", sub_heading))
story.append(Paragraph(
"Hypertension is defined as persistently elevated blood pressure ≥140/90 mmHg on two or more separate "
"occasions (JNC 7 / WHO). The 2017 ACC/AHA guidelines define Stage 1 HTN as ≥130/80 mmHg.",
body_style))
story.append(Paragraph("<b>Classification (JNC 7 / Standard)</b>", sub_heading))
cls_htn_data = [
[Paragraph("<b>Category</b>", body_style), Paragraph("<b>Systolic (mmHg)</b>", body_style), Paragraph("<b>Diastolic (mmHg)</b>", body_style)],
[Paragraph("Normal", body_style), Paragraph("<120", body_style), Paragraph("<80", body_style)],
[Paragraph("Pre-hypertension", body_style), Paragraph("120-139", body_style), Paragraph("80-89", body_style)],
[Paragraph("Stage 1 HTN", body_style), Paragraph("140-159", body_style), Paragraph("90-99", body_style)],
[Paragraph("Stage 2 HTN", body_style), Paragraph("≥160", body_style), Paragraph("≥100", body_style)],
[Paragraph("Hypertensive crisis", body_style), Paragraph(">180", body_style), Paragraph(">120", body_style)],
]
story.append(make_table(cls_htn_data, [5*cm, 6*cm, 6*cm], '#e3f2fd'))
story.append(Spacer(1, 4))
story.append(Paragraph("<b>Types</b>", sub_heading))
for pt in [
"<b>Primary (Essential) HTN — 90-95%:</b> No identifiable cause; multifactorial (genetic + environmental). Most common type.",
"<b>Secondary HTN — 5-10%:</b> Identifiable cause (see below); younger patients; resistant to treatment.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph("<b>Causes of Secondary Hypertension</b>", sub_heading))
sec_data = [
[Paragraph("<b>System</b>", body_style), Paragraph("<b>Cause</b>", body_style)],
[Paragraph("Renal (most common)", body_style), Paragraph("Chronic kidney disease, renal artery stenosis (renovascular HTN), polycystic kidney disease, glomerulonephritis", body_style)],
[Paragraph("Endocrine", body_style), Paragraph("Primary hyperaldosteronism (Conn's syndrome — hypokalaemia + HTN), Cushing's syndrome, phaeochromocytoma (episodic HTN + headache + sweating + palpitations), acromegaly, hypothyroidism/hyperthyroidism", body_style)],
[Paragraph("Vascular", body_style), Paragraph("Coarctation of aorta (HTN in upper limbs + radio-femoral delay)", body_style)],
[Paragraph("Drugs", body_style), Paragraph("OCP (combined pill), NSAIDs, corticosteroids, decongestants, ciclosporin", body_style)],
[Paragraph("Sleep", body_style), Paragraph("Obstructive sleep apnoea (OSA)", body_style)],
]
story.append(make_table(sec_data, [4*cm, 13*cm]))
story.append(Spacer(1, 4))
story.append(Paragraph("<b>Risk Factors for Essential HTN</b>", sub_heading))
for pt in [
"Non-modifiable: Age, male sex, family history, race (Black > White).",
"Modifiable: Obesity, high salt intake, physical inactivity, excess alcohol, smoking, stress, DM, dyslipidaemia.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph("<b>Pathophysiology (RAAS & Haemodynamic)</b>", sub_heading))
for pt in [
"HTN = CO × TPR. Elevated in essential HTN by increased sympathetic activity, salt retention, and RAAS activation.",
"RAAS: Renin (from JGA) → Angiotensin I → ACE converts to Angiotensin II → vasoconstriction + aldosterone release → Na+ and water retention → ↑BP.",
"Structural changes: Arteriolar hyaline sclerosis, LVH (target organ damage), endothelial dysfunction.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph("<b>Clinical Features</b>", sub_heading))
for pt in [
"<b>Usually asymptomatic</b> — 'silent killer'.",
"Symptoms (if any): Headache (occipital, early morning — classic), dizziness, visual blurring.",
"<b>Target organ damage signs:</b>",
" - Brain: Stroke, TIA, hypertensive encephalopathy (headache, confusion, seizures).",
" - Heart: LVH, CCF, angina, MI, aortic dissection.",
" - Kidneys: Proteinuria, CKD, haematuria.",
" - Eyes (fundoscopy — Keith-Wagener-Barker grading):",
" Grade I: Arterial nipping/thickening.",
" Grade II: AV nipping (silver wiring).",
" Grade III: Flame haemorrhages + cotton wool spots.",
" Grade IV: Grade III + papilloedema (Hypertensive emergency).",
" - Peripheral vascular disease: Reduced pulses, claudication.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph("<b>Investigations</b>", sub_heading))
for pt in [
"BP measurement: At least 2 readings, 5 min apart, on 2 separate visits; ABPM (ambulatory) gold standard.",
"Urine dipstick: Proteinuria, haematuria (renal involvement).",
"CBC, U&E, creatinine, fasting glucose, lipid profile.",
"ECG: LVH (Sokolov-Lyon criteria); strain pattern.",
"Echocardiography: LVH, diastolic dysfunction.",
"Chest X-ray: Cardiomegaly, pulmonary oedema.",
"Renal ultrasound, renal artery Doppler (secondary causes).",
"24-hour urine metanephrines (phaeochromocytoma); aldosterone:renin ratio (Conn's).",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph("<b>Treatment</b>", sub_heading))
story.append(Paragraph("<b>Non-Pharmacological (all patients):</b>", bullet_style))
for pt in [
"Weight reduction (BMI <25); DASH diet (↓ salt <5 g/day, ↑ fruits/vegetables).",
"Regular aerobic exercise ≥30 min, 5 days/week.",
"Stop smoking; limit alcohol (<14 units/week men, <7 units/week women).",
"Stress reduction.",
]:
story.append(Paragraph(f" \u25e6 {pt}", bullet_style))
story.append(Paragraph("<b>Pharmacological — First-Line Agents (A, B, C, D):</b>", bullet_style))
drug_data = [
[Paragraph("<b>Drug Class</b>", body_style), Paragraph("<b>Example</b>", body_style), Paragraph("<b>Preferred Indication</b>", body_style)],
[Paragraph("ACE Inhibitors (A)", body_style), Paragraph("Ramipril, enalapril", body_style), Paragraph("Diabetes, CKD, post-MI, heart failure", body_style)],
[Paragraph("ARBs (A)", body_style), Paragraph("Losartan, valsartan", body_style), Paragraph("As ACEi but better tolerated (no cough)", body_style)],
[Paragraph("Beta-blockers (B)", body_style), Paragraph("Atenolol, metoprolol", body_style), Paragraph("Angina, post-MI, tachyarrhythmia, young patients", body_style)],
[Paragraph("CCBs (C)", body_style), Paragraph("Amlodipine (DHP), diltiazem (NDHP)", body_style), Paragraph("Elderly, isolated systolic HTN, Black patients, angina", body_style)],
[Paragraph("Thiazide diuretics (D)", body_style), Paragraph("Indapamide, HCTZ", body_style), Paragraph("Elderly, Black patients, heart failure, isolated systolic HTN", body_style)],
[Paragraph("Alpha-blockers", body_style), Paragraph("Doxazosin", body_style), Paragraph("BPH + HTN (add-on)", body_style)],
[Paragraph("Spironolactone", body_style), Paragraph("Spironolactone", body_style), Paragraph("Resistant HTN, primary hyperaldosteronism", body_style)],
]
story.append(make_table(drug_data, [4.5*cm, 4*cm, 8.5*cm], '#e3f2fd'))
story.append(Spacer(1, 4))
story.append(Paragraph("<b>Hypertensive Emergencies</b>", sub_heading))
for pt in [
"<b>Hypertensive urgency:</b> BP >180/120 without end-organ damage — oral agents, gradual reduction over 24-48 h.",
"<b>Hypertensive emergency:</b> BP >180/120 WITH end-organ damage (encephalopathy, STEMI, aortic dissection, acute pulmonary oedema) — IV labetalol or sodium nitroprusside; reduce MAP by <25% in first hour.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph("<b>Dental Relevance</b>", sub_heading))
for pt in [
"Uncontrolled HTN (BP >180/110): Defer elective dental treatment.",
"Local anaesthetic: Limit adrenaline/epinephrine to 2 cartridges maximum; avoid felypressin in severe HTN.",
"Dental anxiety raises BP — use relaxation, good analgesia.",
"CCBs cause gingival overgrowth (especially amlodipine, nifedipine).",
"NSAIDs (used in dental pain) can raise BP and antagonise antihypertensive drugs — use with caution.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(
"KEY: HTN = 'Silent Killer' — usually asymptomatic. Target BP <140/90 (or <130/80 in DM/CKD). "
"Essential HTN = 90-95%. Phaeochromocytoma = episodic HTN + sweating + palpitations. "
"Grade IV fundus (papilloedema) = Hypertensive emergency.",
note_box_style))
# ──── Summary Comparison Table ────
story.append(Spacer(1, 12))
story.append(HRFlowable(width="100%", thickness=1.5, color=colors.HexColor('#1565c0'), spaceAfter=8))
story.append(Paragraph(
"<b>Quick Reference Summary — 5 Topics</b>",
ParagraphStyle('CompHead', parent=styles['Normal'], fontSize=10.5, textColor=colors.HexColor('#0d47a1'),
fontName='Helvetica-Bold', spaceAfter=4)))
summ_data = [
[Paragraph("<b>Topic</b>", body_style),
Paragraph("<b>Key Investigation</b>", body_style),
Paragraph("<b>Hallmark / Pathognomonic</b>", body_style),
Paragraph("<b>Drug of Choice</b>", body_style)],
[Paragraph("Leukemia", body_style), Paragraph("Bone marrow biopsy", body_style),
Paragraph("Auer rods (AML); Smudge cells (CLL); Philadelphia chr (CML)", body_style),
Paragraph("Imatinib (CML); ATRA (APL-AML M3)", body_style)],
[Paragraph("Lymphadenopathy", body_style), Paragraph("Excision biopsy", body_style),
Paragraph("Virchow's node = GI malignancy", body_style),
Paragraph("Treat underlying cause", body_style)],
[Paragraph("Acute Rheumatic Fever", body_style), Paragraph("ASO titre + ECG + Echo", body_style),
Paragraph("Aschoff bodies (cardiac); Carditis = most serious; Arthritis = most common", body_style),
Paragraph("Benzathine penicillin G (1°+2° prophylaxis)", body_style)],
[Paragraph("Infective Endocarditis", body_style), Paragraph("Blood cultures × 3 + Echo", body_style),
Paragraph("Osler's nodes (painful); Janeway lesions (painless); Roth's spots", body_style),
Paragraph("Benzyl penicillin + gentamicin (S. viridans)", body_style)],
[Paragraph("Hypertension", body_style), Paragraph("ABPM, ECG, fundoscopy, U&E", body_style),
Paragraph("Grade IV fundus (papilloedema) = emergency; CCB → gingival overgrowth", body_style),
Paragraph("ACEi/ARB + CCB/Thiazide", body_style)],
]
tbl_summ = Table(summ_data, colWidths=[3*cm, 3.8*cm, 5.5*cm, 4.7*cm])
tbl_summ.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#0d47a1')),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor('#e8eaf6')]),
('TOPPADDING', (0,0), (-1,-1), 3),
('BOTTOMPADDING', (0,0), (-1,-1), 3),
('FONTSIZE', (0,0), (-1,-1), 8.5),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(tbl_summ)
story.append(Spacer(1, 10))
story.append(Paragraph(
"Notes based on standard General Medicine references (Anil K. Tripathi / standard texts) for "
"Gujarat University BDS 3rd Year. For full marks: include Definition, Aetiology, Pathogenesis, "
"Clinical Features, Investigations, and Treatment.",
ParagraphStyle('Footer', parent=styles['Normal'], fontSize=8, textColor=colors.HexColor('#607d8b'),
alignment=TA_CENTER, fontName='Helvetica-Oblique')))
doc.build(story)
print(f"PDF generated: {output_path}")
cd /tmp/workspace/bds-notes && python generate_notes2.py
BDS General Medicine Short Notes Part2
PDF Document · PDF
Write me a shrot notes for the following topics from anil k tripathi book of general medicine for bds gujarat university for 3 year exams about 7-8 marks Male concise to the point precise ans to the topics are Ischemic heart disease Stable angina Unstable angina Acute myocardial infarction or STEMI Heart failure In pdf form
~/bds-notes/generate_notes3.py
from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm
from reportlab.lib import colors
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
output_path = "/tmp/workspace/bds-notes/BDS_General_Medicine_Cardiac_Notes.pdf"
doc = SimpleDocTemplate(
output_path, pagesize=A4,
rightMargin=2*cm, leftMargin=2*cm,
topMargin=2.2*cm, bottomMargin=2*cm,
title="BDS General Medicine – Cardiac Short Notes",
author="Gujarat University BDS 3rd Year"
)
styles = getSampleStyleSheet()
title_style = ParagraphStyle('T', parent=styles['Title'], fontSize=18, leading=22,
textColor=colors.HexColor('#b71c1c'), spaceAfter=4, alignment=TA_CENTER, fontName='Helvetica-Bold')
subtitle_style = ParagraphStyle('S', parent=styles['Normal'], fontSize=10,
textColor=colors.HexColor('#c62828'), alignment=TA_CENTER, spaceAfter=14, fontName='Helvetica')
sub_heading = ParagraphStyle('SH', parent=styles['Heading2'], fontSize=10.5, leading=13,
textColor=colors.HexColor('#b71c1c'), spaceBefore=7, spaceAfter=2, fontName='Helvetica-Bold')
body_style = ParagraphStyle('B', parent=styles['Normal'], fontSize=9.5, leading=14,
textColor=colors.HexColor('#212121'), spaceAfter=4, fontName='Helvetica', alignment=TA_JUSTIFY)
bullet_style = ParagraphStyle('BL', parent=styles['Normal'], fontSize=9.5, leading=13,
textColor=colors.HexColor('#212121'), spaceAfter=2, fontName='Helvetica',
leftIndent=14, alignment=TA_LEFT)
note_style = ParagraphStyle('N', parent=styles['Normal'], fontSize=9, leading=13,
textColor=colors.HexColor('#4a148c'), spaceAfter=6, spaceBefore=4,
fontName='Helvetica-Oblique', leftIndent=6, rightIndent=6)
def add_topic_header(story, text):
tbl = Table([[Paragraph(f"<font color='white'><b> {text}</b></font>",
ParagraphStyle('TH', parent=styles['Normal'], fontSize=12.5,
fontName='Helvetica-Bold', textColor=colors.white, leading=15))
]], colWidths=[17*cm])
tbl.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), colors.HexColor('#b71c1c')),
('TOPPADDING', (0,0), (-1,-1), 7), ('BOTTOMPADDING', (0,0), (-1,-1), 7),
('LEFTPADDING', (0,0), (-1,-1), 8),
]))
story.append(Spacer(1, 8))
story.append(tbl)
story.append(Spacer(1, 5))
def mk_table(data, col_widths, hdr='#ffcdd2'):
tbl = Table(data, colWidths=col_widths)
tbl.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor(hdr)),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor('#fafafa')]),
('TOPPADDING', (0,0), (-1,-1), 3), ('BOTTOMPADDING', (0,0), (-1,-1), 3),
('FONTSIZE', (0,0), (-1,-1), 9), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
return tbl
def bp(text): return f"<b>{text}</b>"
story = []
# ──── Title ────
story.append(Spacer(1, 0.4*cm))
story.append(Paragraph("General Medicine Short Notes — Part 3", title_style))
story.append(Paragraph("BDS 3rd Year | Gujarat University | Based on Anil K. Tripathi", subtitle_style))
story.append(HRFlowable(width="100%", thickness=2, color=colors.HexColor('#b71c1c'), spaceAfter=10))
story.append(Paragraph(
"Topics: Ischemic Heart Disease • Stable Angina • Unstable Angina • "
"Acute MI / STEMI • Heart Failure",
ParagraphStyle('T2', parent=styles['Normal'], fontSize=9.5,
textColor=colors.HexColor('#455a64'), alignment=TA_CENTER, spaceAfter=16)))
# ═══════════════════════════════════════════
# TOPIC 1 — ISCHEMIC HEART DISEASE
# ═══════════════════════════════════════════
add_topic_header(story, "1. ISCHEMIC HEART DISEASE (IHD) / CORONARY ARTERY DISEASE (CAD)")
story.append(Paragraph(bp("Definition"), sub_heading))
story.append(Paragraph(
"Ischemic heart disease (IHD) is a group of clinical syndromes resulting from an imbalance between "
"myocardial oxygen demand and supply, most commonly due to obstructive atherosclerotic coronary artery disease (CAD). "
"It is the leading cause of death worldwide.",
body_style))
story.append(Paragraph(bp("Spectrum of IHD"), sub_heading))
spec_data = [
[Paragraph("<b>Syndrome</b>", body_style), Paragraph("<b>Description</b>", body_style)],
[Paragraph("Stable Angina", body_style), Paragraph("Predictable chest pain on exertion; relieved by rest/GTN; fixed atherosclerotic plaque (>70% stenosis)", body_style)],
[Paragraph("Unstable Angina (UA)", body_style), Paragraph("Rest angina or new/worsening angina; plaque rupture + partial thrombus; NO troponin rise", body_style)],
[Paragraph("NSTEMI", body_style), Paragraph("As UA but WITH troponin elevation; partial/complete thrombus; no ST elevation", body_style)],
[Paragraph("STEMI", body_style), Paragraph("Complete coronary occlusion; ST elevation + troponin rise; transmural infarction", body_style)],
[Paragraph("Silent Ischemia", body_style), Paragraph("Asymptomatic ischemia; common in diabetics (neuropathy); detected on stress ECG", body_style)],
[Paragraph("Sudden Cardiac Death", body_style), Paragraph("Death within 1 hour of symptom onset; due to VF/VT from ischemia", body_style)],
]
story.append(mk_table(spec_data, [3.5*cm, 13.5*cm]))
story.append(Spacer(1, 4))
story.append(Paragraph(bp("Pathophysiology — Atherosclerosis"), sub_heading))
for pt in [
"Endothelial injury (from HTN, smoking, dyslipidaemia, DM) → lipid accumulation in intima → foam cell formation (macrophages engulf LDL) → fatty streak.",
"Fatty streak → fibrous plaque (smooth muscle proliferation + collagen + lipid core covered by fibromuscular cap).",
"Stable plaque: Hard, calcified, thick cap → reduces lumen → causes exertional angina (>70% stenosis needed).",
"Vulnerable plaque: Soft, thin cap, large lipid core → prone to rupture → platelet aggregation + thrombus → ACS.",
"Critical threshold: Resting symptoms occur when stenosis exceeds 90-95%; exertional symptoms at 50-70% stenosis.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(bp("Risk Factors"), sub_heading))
rf_data = [
[Paragraph("<b>Non-Modifiable</b>", body_style), Paragraph("<b>Modifiable</b>", body_style)],
[Paragraph("Age (men >45 yrs, women >55 yrs)\nMale sex (women protected by oestrogen pre-menopause)\nFamily history of premature CAD\nGenetics (familial hypercholesterolaemia)",
body_style),
Paragraph("Hypertension (strongest risk factor)\nDyslipidaemia (↑LDL, ↓HDL, ↑triglycerides)\nDiabetes mellitus (2-4× risk)\nSmoking (2-3× risk)\nObesity (BMI >30)\nPhysical inactivity\nChronic kidney disease\nStress, type A personality",
body_style)],
]
tbl_rf = Table(rf_data, colWidths=[8.5*cm, 8.5*cm])
tbl_rf.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#ffcdd2')),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4),
('FONTSIZE', (0,0), (-1,-1), 9), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(tbl_rf)
story.append(Spacer(1, 4))
story.append(Paragraph(bp("Investigations (General IHD Workup)"), sub_heading))
for pt in [
"ECG (resting): May show ST changes, Q waves, LVH, arrhythmias.",
"Stress ECG (Treadmill Test / TMT): Inducible ST depression ≥1 mm = positive; DOC for stable angina diagnosis.",
"Echocardiography: Wall motion abnormalities, LV function (EF), valve assessment.",
"Coronary Angiography (Gold Standard): Identifies site, severity of stenosis; guides intervention.",
"CT Coronary Angiography (CTCA): Non-invasive; calcium scoring.",
"Cardiac biomarkers: Troponin I/T (most sensitive/specific for MI); CK-MB; myoglobin.",
"Lipid profile, fasting glucose, HbA1c, CRP, BNP.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(bp("Primary Prevention"), sub_heading))
for pt in [
"Control risk factors: HTN <130/80, LDL <100 mg/dL (or <70 mg/dL if very high risk), HbA1c <7%.",
"Statins for primary prevention in high-risk patients.",
"Lifestyle: Low-fat diet, exercise, stop smoking, weight reduction.",
"Aspirin for secondary prevention (not primary unless very high risk — bleeding risk outweighs benefit).",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(
"KEY: IHD spectrum from stable angina → UA/NSTEMI → STEMI → sudden cardiac death. "
"Atherosclerosis is the underlying process. Vulnerable plaque rupture triggers ACS. "
"Coronary angiography is the gold standard investigation.",
note_style))
# ═══════════════════════════════════════════
# TOPIC 2 — STABLE ANGINA
# ═══════════════════════════════════════════
add_topic_header(story, "2. STABLE ANGINA PECTORIS")
story.append(Paragraph(bp("Definition"), sub_heading))
story.append(Paragraph(
"Stable angina is a predictable, reproducible, transient chest discomfort (pain/pressure/tightness) "
"caused by reversible myocardial ischemia, precipitated by exertion or emotional stress, "
"relieved within minutes by rest or sublingual glyceryl trinitrate (GTN). "
"It is NOT an acute coronary syndrome.",
body_style))
story.append(Paragraph(bp("Pathophysiology"), sub_heading))
story.append(Paragraph(
"A fixed atherosclerotic plaque reduces coronary lumen (>70% stenosis needed for exertional symptoms). "
"On exertion, myocardial O2 demand increases (↑HR, ↑contractility, ↑wall tension) but supply cannot increase "
"through the fixed stenosis → transient ischemia → pain. Ischemia resolves with rest as demand falls.",
body_style))
story.append(Paragraph(bp("Characteristics of Anginal Pain"), sub_heading))
pain_data = [
[Paragraph("<b>Feature</b>", body_style), Paragraph("<b>Description</b>", body_style)],
[Paragraph("Site", body_style), Paragraph("Retrosternal (central chest)", body_style)],
[Paragraph("Character", body_style), Paragraph("Tight, squeezing, heavy, constricting pressure ('elephant on chest'); NOT sharp or stabbing", body_style)],
[Paragraph("Radiation", body_style), Paragraph("Left arm (classic), jaw, neck, shoulder, back, epigastrium", body_style)],
[Paragraph("Duration", body_style), Paragraph("2-5 minutes (rarely >15 min in stable angina)", body_style)],
[Paragraph("Precipitants", body_style), Paragraph("Exertion, emotional stress, cold weather, heavy meals, anaemia, tachyarrhythmia", body_style)],
[Paragraph("Relief", body_style), Paragraph("Rest within 2-5 min; sublingual GTN within 1-2 min", body_style)],
[Paragraph("Associated", body_style), Paragraph("Dyspnoea, diaphoresis, nausea; NO fever", body_style)],
]
story.append(mk_table(pain_data, [3.5*cm, 13.5*cm]))
story.append(Spacer(1, 4))
story.append(Paragraph(bp("CCS Classification of Angina Severity"), sub_heading))
ccs_data = [
[Paragraph("<b>Class</b>", body_style), Paragraph("<b>Description</b>", body_style)],
[Paragraph("Class I", body_style), Paragraph("No angina with ordinary activity; occurs only with strenuous/rapid exertion", body_style)],
[Paragraph("Class II", body_style), Paragraph("Slight limitation; angina with moderate exertion (climbing >2 flights, walking >2 blocks)", body_style)],
[Paragraph("Class III", body_style), Paragraph("Marked limitation; angina with minimal exertion (1 block walking, 1 flight of stairs)", body_style)],
[Paragraph("Class IV", body_style), Paragraph("Inability to perform any activity without discomfort; angina at rest possible", body_style)],
]
story.append(mk_table(ccs_data, [2.5*cm, 14.5*cm]))
story.append(Spacer(1, 4))
story.append(Paragraph(bp("Investigations"), sub_heading))
for pt in [
"Resting ECG: Usually normal between attacks; during attack — ST depression (horizontal/downsloping), T-wave inversion.",
bp("Stress ECG (TMT) — investigation of choice:") + " ST depression ≥1 mm = positive; determines functional severity.",
"Echocardiography: Resting/stress echo; wall motion abnormalities during ischemia.",
"Coronary angiography: Gold standard; shows degree of stenosis; needed before revascularisation.",
"Perfusion imaging (MIBI/Thallium scan): Reversible perfusion defects = ischemia; fixed defect = infarct.",
"Bloods: Hb (anaemia as precipitant), lipids, glucose, HbA1c, TFTs (thyrotoxicosis).",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(bp("Treatment of Stable Angina"), sub_heading))
story.append(Paragraph(bp("A. Non-Pharmacological:"), bullet_style))
for pt in [
"Risk factor modification: Stop smoking, control BP/DM/cholesterol.",
"Graded aerobic exercise programme.",
"Dietary advice: Mediterranean/DASH diet.",
"Weight reduction; reduce stress.",
]:
story.append(Paragraph(f" \u25e6 {pt}", bullet_style))
story.append(Paragraph(bp("B. Pharmacological:"), bullet_style))
drug_data = [
[Paragraph("<b>Drug</b>", body_style), Paragraph("<b>Dose/Mechanism</b>", body_style), Paragraph("<b>Role</b>", body_style)],
[Paragraph("Sublingual GTN (glyceryl trinitrate)", body_style),
Paragraph("0.3-0.6 mg SL PRN; venodilator → ↓preload; also coronary vasodilator", body_style),
Paragraph("Acute relief of anginal attacks (within 1-2 min)", body_style)],
[Paragraph("Beta-blockers (1st line)", body_style),
Paragraph("Atenolol 25-100 mg OD; ↓HR, ↓contractility → ↓MVO2", body_style),
Paragraph("Prophylaxis; also post-MI cardioprotection", body_style)],
[Paragraph("CCBs (amlodipine, diltiazem)", body_style),
Paragraph("Amlodipine 5-10 mg OD; vasodilation + ↓HR (NDHP)", body_style),
Paragraph("If beta-blocker intolerant or vasospastic angina", body_style)],
[Paragraph("Long-acting nitrates (ISMN)", body_style),
Paragraph("Isosorbide mononitrate 20-60 mg OD; ensure nitrate-free interval", body_style),
Paragraph("Add-on prophylaxis; avoid tolerance", body_style)],
[Paragraph("Aspirin 75-150 mg OD", body_style),
Paragraph("Antiplatelet — prevents thrombosis on plaque", body_style),
Paragraph("ALL angina patients (if not contraindicated)", body_style)],
[Paragraph("Statin (atorvastatin 40-80 mg)", body_style),
Paragraph("LDL lowering + plaque stabilisation", body_style),
Paragraph("ALL IHD patients; target LDL <70 mg/dL", body_style)],
[Paragraph("ACE inhibitor (ramipril)", body_style),
Paragraph("Reduces CV events in IHD especially with DM/HF", body_style),
Paragraph("If DM, HF, or LV dysfunction co-exists", body_style)],
[Paragraph("Ranolazine / Ivabradine", body_style),
Paragraph("Reduces ischemia by ↓late Na current / ↓HR", body_style),
Paragraph("Refractory angina add-on", body_style)],
]
story.append(mk_table(drug_data, [4*cm, 6.5*cm, 6.5*cm]))
story.append(Spacer(1, 4))
story.append(Paragraph(bp("C. Revascularisation:"), bullet_style))
for pt in [
bp("PCI (Percutaneous Coronary Intervention) with stent:") + " Preferred for 1-2 vessel disease; drug-eluting stent (DES) preferred over bare metal.",
bp("CABG (Coronary Artery Bypass Grafting):") + " Preferred for left main disease, 3-vessel disease, diabetics with multivessel disease, reduced EF.",
]:
story.append(Paragraph(f" \u25e6 {pt}", bullet_style))
story.append(Paragraph(
"KEY: Stable angina = predictable, relieved by rest/GTN, due to fixed plaque. "
"TMT is the investigation of choice. GTN SL = fastest relief. "
"All patients need Aspirin + Statin + Beta-blocker + risk factor control. "
"Prinzmetal (variant) angina = vasospasm at rest; ECG shows ST elevation; treat with CCBs.",
note_style))
# ═══════════════════════════════════════════
# TOPIC 3 — UNSTABLE ANGINA
# ═══════════════════════════════════════════
add_topic_header(story, "3. UNSTABLE ANGINA (UA) / NSTE-ACS")
story.append(Paragraph(bp("Definition"), sub_heading))
story.append(Paragraph(
"Unstable angina is an acute coronary syndrome characterised by angina that is: "
"(1) new onset (CCS ≥II), "
"(2) occurring at rest (lasting >20 min), or "
"(3) increasing in frequency/severity/duration from a previously stable pattern. "
"It is distinguished from NSTEMI by the ABSENCE of troponin elevation.",
body_style))
story.append(Paragraph(bp("Pathophysiology"), sub_heading))
for pt in [
"Vulnerable atherosclerotic plaque ruptures → exposes subendothelial collagen → platelet activation → thrombus (platelet-rich, WHITE clot) formation.",
"Thrombus is partial/transient → reduces coronary flow without complete occlusion → transient ischemia.",
"Coronary vasospasm at the site of plaque rupture worsens ischemia.",
"NO myocyte necrosis (no troponin rise) — distinguishes UA from NSTEMI.",
"Same pathology as NSTEMI; the difference is the severity of ischemia (UA → no infarction yet).",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(bp("Clinical Features"), sub_heading))
for pt in [
"Chest pain at rest, lasting >20 minutes, not fully relieved by GTN.",
"New-onset angina of at least CCS Class II severity within past 2 months.",
"Previously stable angina that has worsened in frequency, duration, or intensity by ≥1 CCS class within 2 months.",
"Angina soon after MI (post-infarction angina).",
"Diaphoresis, dyspnoea, nausea, anxiety may accompany.",
"ECG: ST depression (≥0.5 mm) and/or T-wave inversion — but NO persistent ST elevation.",
"Troponin: Normal or minimally elevated (if elevated = NSTEMI).",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(bp("TIMI Risk Score for UA/NSTEMI"), sub_heading))
story.append(Paragraph(
"Score 0-7: 1 point each for — Age ≥65, ≥3 CAD risk factors, prior coronary stenosis ≥50%, "
"ST deviation on ECG, ≥2 anginal events in 24h, aspirin use in past 7 days, elevated serum cardiac biomarkers. "
"Score ≥3 = high risk → early invasive strategy.",
body_style))
story.append(Paragraph(bp("Investigations"), sub_heading))
for pt in [
"12-lead ECG: Immediately; ST depression, T-wave inversion, or normal.",
"Cardiac Troponin I/T (serial, at 0 and 3-6 hours): Defines UA (normal) vs NSTEMI (elevated).",
"CXR: Pulmonary oedema, cardiomegaly.",
"CBC, U&E, glucose, lipids, coagulation.",
"Coronary angiography: Definitive; planned within 24-72 hours in high-risk UA.",
"Echocardiography: LV function, wall motion.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(bp("Management of UA/NSTEMI (MONA + Antiplatelets + Anticoagulation)"), sub_heading))
ua_mgmt_data = [
[Paragraph("<b>Step</b>", body_style), Paragraph("<b>Intervention</b>", body_style)],
[Paragraph("Immediate (A-E)", body_style),
Paragraph("Admit to CCU; O2 if SpO2 <94%; IV access; continuous ECG monitoring", body_style)],
[Paragraph("Antiplatelet therapy", body_style),
Paragraph("Aspirin 300 mg loading then 75 mg OD (LIFELONG)\n"
"PLUS P2Y12 inhibitor: Clopidogrel 300-600 mg load then 75 mg OD, OR\n"
"Ticagrelor 180 mg load then 90 mg BD (preferred) — DUAL ANTIPLATELET (DAPT) for ≥12 months", body_style)],
[Paragraph("Anticoagulation", body_style),
Paragraph("LMWH (enoxaparin 1 mg/kg SC BD) — preferred; or Fondaparinux; or UFH infusion\n"
"Continue until revascularisation or discharge", body_style)],
[Paragraph("Anti-ischemic", body_style),
Paragraph("Beta-blocker (metoprolol, bisoprolol) — reduce HR/BP, limit ischemia\n"
"GTN sublingual then IV if pain persists\n"
"CCB (amlodipine) if beta-blocker contraindicated", body_style)],
[Paragraph("Lipid lowering", body_style),
Paragraph("High-intensity statin immediately: Atorvastatin 80 mg OD (plaque stabilisation)", body_style)],
[Paragraph("ACE inhibitor", body_style),
Paragraph("Ramipril — especially if LV dysfunction, DM, or hypertension", body_style)],
[Paragraph("Revascularisation", body_style),
Paragraph("Early invasive (coronary angiography ± PCI): within 24h for high-risk; within 72h for intermediate-risk\n"
"CABG if left main or 3-vessel disease", body_style)],
]
story.append(mk_table(ua_mgmt_data, [3.5*cm, 13.5*cm]))
story.append(Spacer(1, 4))
story.append(Paragraph(
"KEY DISTINCTION: UA = Troponin NEGATIVE; NSTEMI = Troponin POSITIVE. "
"Both managed identically (DAPT + anticoagulation + early angiography). "
"UA is a 'warning' — 10-15% progress to AMI without treatment. "
"No fibrinolysis in UA/NSTEMI (thrombus is platelet-rich, not fibrin-rich).",
note_style))
# ═══════════════════════════════════════════
# TOPIC 4 — ACUTE MI / STEMI
# ═══════════════════════════════════════════
add_topic_header(story, "4. ACUTE MYOCARDIAL INFARCTION (AMI) / STEMI")
story.append(Paragraph(bp("Definition"), sub_heading))
story.append(Paragraph(
"Acute MI is myocardial cell death (necrosis) due to prolonged ischemia from complete or near-complete "
"coronary artery occlusion. STEMI (ST-Elevation MI) occurs when complete occlusion causes transmural "
"infarction, identified by persistent ST elevation on ECG and elevated cardiac troponin.",
body_style))
story.append(Paragraph(bp("Pathophysiology"), sub_heading))
for pt in [
"Vulnerable plaque ruptures → platelet activation → fibrin-rich RED clot → complete coronary occlusion.",
"Sustained ischemia (>20 min) → irreversible myocyte necrosis (zone of infarction).",
"Necrosis begins in subendocardium and progresses to full thickness (transmural) — wavefront phenomenon (Reimer).",
"Zone of necrosis (centre), zone of injury (ST elevation), zone of ischemia (T inversion) — concentric zones.",
"Reperfusion must occur within 90 min (primary PCI) or 3 hours (fibrinolysis) for maximum myocardial salvage.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(bp("ECG Changes — Temporal Evolution"), sub_heading))
ecg_data = [
[Paragraph("<b>Time</b>", body_style), Paragraph("<b>ECG Change</b>", body_style)],
[Paragraph("Minutes (hyperacute)", body_style), Paragraph("Tall, peaked (hyperacute) T waves — earliest change", body_style)],
[Paragraph("Hours (acute)", body_style), Paragraph("ST elevation (≥1 mm in ≥2 contiguous limb leads; ≥2 mm in chest leads) — hallmark of STEMI", body_style)],
[Paragraph("Hours-days", body_style), Paragraph("T-wave inversion; Q-wave development (pathological Q = >25% of R height, >40ms width)", body_style)],
[Paragraph("Days-weeks", body_style), Paragraph("ST normalises; T-wave inversion deepens", body_style)],
[Paragraph("Weeks-months", body_style), Paragraph("Persistent Q waves (permanent scar marker) + T normalises", body_style)],
]
story.append(mk_table(ecg_data, [4*cm, 13*cm]))
story.append(Spacer(1, 4))
story.append(Paragraph(bp("ECG Localisation of MI"), sub_heading))
loc_data = [
[Paragraph("<b>Territory</b>", body_style), Paragraph("<b>ECG Leads</b>", body_style), Paragraph("<b>Artery</b>", body_style)],
[Paragraph("Anterior", body_style), Paragraph("V1-V4", body_style), Paragraph("LAD (Left Anterior Descending)", body_style)],
[Paragraph("Lateral", body_style), Paragraph("I, aVL, V5-V6", body_style), Paragraph("LCx (Left Circumflex)", body_style)],
[Paragraph("Inferior", body_style), Paragraph("II, III, aVF", body_style), Paragraph("RCA (Right Coronary Artery)", body_style)],
[Paragraph("Posterior", body_style), Paragraph("ST depression V1-V3 (reciprocal)", body_style), Paragraph("RCA / LCx", body_style)],
[Paragraph("Right ventricle", body_style), Paragraph("V3R-V4R (right-sided leads)", body_style), Paragraph("RCA proximal", body_style)],
]
story.append(mk_table(loc_data, [3.5*cm, 5.5*cm, 8*cm]))
story.append(Spacer(1, 4))
story.append(Paragraph(bp("Cardiac Biomarkers"), sub_heading))
bio_data = [
[Paragraph("<b>Biomarker</b>", body_style), Paragraph("<b>Rise</b>", body_style), Paragraph("<b>Peak</b>", body_style), Paragraph("<b>Normalises</b>", body_style), Paragraph("<b>Note</b>", body_style)],
[Paragraph("Troponin I/T (most specific)", body_style), Paragraph("3-6 hrs", body_style), Paragraph("12-24 hrs", body_style), Paragraph("7-14 days", body_style), Paragraph("Gold standard; detects even small MI", body_style)],
[Paragraph("CK-MB", body_style), Paragraph("4-6 hrs", body_style), Paragraph("12-24 hrs", body_style), Paragraph("48-72 hrs", body_style), Paragraph("Useful for reinfarction detection", body_style)],
[Paragraph("Myoglobin", body_style), Paragraph("1-2 hrs", body_style), Paragraph("4-8 hrs", body_style), Paragraph("24 hrs", body_style), Paragraph("First to rise (not cardiac specific)", body_style)],
[Paragraph("LDH", body_style), Paragraph("24-48 hrs", body_style), Paragraph("3-6 days", body_style), Paragraph("8-14 days", body_style), Paragraph("Useful for late presentation", body_style)],
]
story.append(mk_table(bio_data, [4*cm, 2.5*cm, 2.5*cm, 3*cm, 5*cm]))
story.append(Spacer(1, 4))
story.append(Paragraph(bp("Clinical Features"), sub_heading))
for pt in [
bp("Chest pain:") + " Severe, crushing, retrosternal pain radiating to left arm/jaw/neck; >20-30 min duration; NOT relieved by GTN; occurs at rest.",
bp("Autonomic:") + " Profuse sweating (diaphoresis), nausea, vomiting, pallor.",
bp("Dyspnoea:") + " Due to LV failure; pulmonary oedema.",
bp("Signs:") + " Tachycardia, hypotension (cardiogenic shock if severe); S4 gallop (stiff LV); pericardial rub (2-3 days post-MI); features of HF.",
bp("Atypical (silent MI):") + " Diabetics/elderly: no pain — only dyspnoea, syncope, sudden HF, or asymptomatic.",
"Killip Class (severity): I=no HF; II=crackles/S3; III=pulmonary oedema; IV=cardiogenic shock.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(bp("Management of STEMI — Time is Muscle!"), sub_heading))
story.append(Paragraph(bp("Immediate (MONA + monitoring):"), bullet_style))
for pt in [
"Morphine 2-5 mg IV (pain relief, anxiolytic; decreases sympathetic activation).",
"Oxygen only if SpO2 <94% (avoid hyperoxia — worsens outcome).",
"Nitrates: GTN SL/IV for ongoing chest pain (avoid if RV infarct — hypotension risk).",
"Aspirin 300 mg stat loading dose + Ticagrelor 180 mg (or clopidogrel 600 mg) — DUAL ANTIPLATELET.",
"12-lead ECG immediately; continuous monitoring; IV access; bloods.",
]:
story.append(Paragraph(f" \u25e6 {pt}", bullet_style))
story.append(Paragraph(bp("Reperfusion Therapy (MOST CRITICAL STEP):"), bullet_style))
rep_data = [
[Paragraph("<b>Method</b>", body_style), Paragraph("<b>Details</b>", body_style)],
[Paragraph("Primary PCI\n(First choice)", body_style),
Paragraph("Balloon angioplasty + stent to open blocked artery\n"
"Door-to-balloon time: <90 min\n"
"Preferred if available within 120 min of first medical contact\n"
"Drug-eluting stent (DES) preferred\n"
"Anticoagulation: UFH or bivalirudin IV during procedure", body_style)],
[Paragraph("Fibrinolysis\n(If PCI not available in time)", body_style),
Paragraph("Streptokinase (1.5 MU IV over 30-60 min) or Alteplase/Tenecteplase\n"
"Door-to-needle time: <30 min\n"
"Give if PCI cannot be done within 120 min of FMC\n"
"Contraindications: Active bleeding, recent surgery, stroke, uncontrolled HTN\n"
"Successful if: >50% ST resolution in 90 min, chest pain resolution, reperfusion arrhythmia", body_style)],
]
story.append(mk_table(rep_data, [3.5*cm, 13.5*cm]))
story.append(Spacer(1, 4))
story.append(Paragraph(bp("Post-Reperfusion / Long-Term (ABCDE):"), bullet_style))
abcde_data = [
[Paragraph("<b>Letter</b>", body_style), Paragraph("<b>Drug/Action</b>", body_style), Paragraph("<b>Indication/Duration</b>", body_style)],
[Paragraph("A — Antiplatelet", body_style), Paragraph("Aspirin 75 mg OD + P2Y12 inhibitor (ticagrelor/clopidogrel)", body_style), Paragraph("Aspirin lifelong; P2Y12 for ≥12 months (up to 3 years if DES)", body_style)],
[Paragraph("B — Beta-blocker", body_style), Paragraph("Metoprolol, bisoprolol, carvedilol", body_style), Paragraph("Within 24h if no HF/hypotension; long-term (reduces mortality, prevents reinfarction, arrhythmias)", body_style)],
[Paragraph("C — ACE inhibitor/ARB", body_style), Paragraph("Ramipril 2.5-10 mg OD; enalapril", body_style), Paragraph("Start within 24h; all STEMI patients (especially if EF <40%, DM, HTN, HF)", body_style)],
[Paragraph("D — Statin", body_style), Paragraph("Atorvastatin 80 mg OD", body_style), Paragraph("Start immediately; lifelong; target LDL <55 mg/dL in high-risk", body_style)],
[Paragraph("E — Eplerenone/Aldosterone antagonist", body_style), Paragraph("Eplerenone or spironolactone", body_style), Paragraph("If EF <40% + DM or HF symptoms; reduces mortality", body_style)],
]
story.append(mk_table(abcde_data, [3.5*cm, 6*cm, 7.5*cm]))
story.append(Spacer(1, 4))
story.append(Paragraph(bp("Complications of MI"), sub_heading))
comp_data = [
[Paragraph("<b>Timing</b>", body_style), Paragraph("<b>Complication</b>", body_style)],
[Paragraph("Immediate\n(0-24 hrs)", body_style),
Paragraph("Arrhythmias: VF (most common cause of death in 1st hour — treat with DC cardioversion); AF; heart block (inferior MI — 2nd/3rd degree, needs pacing); sinus tachycardia", body_style)],
[Paragraph("Early\n(1-7 days)", body_style),
Paragraph("Acute LV failure / Pulmonary oedema\nCardiogenic shock (Killip IV): BP <90, cold peripheries, oliguria — mortality >70%; treat with primary PCI + inotropes (dobutamine) ± IABP\nPericarditis (Dressler-type day 2-4 — early pericarditis)\nRVF with inferior MI (right ventricular infarction)", body_style)],
[Paragraph("Late\n(weeks-months)", body_style),
Paragraph("Dressler's syndrome (post-MI autoimmune pericarditis at 2-10 weeks): fever + pleuritic pain + pericardial rub; treat with aspirin/NSAIDs\nVentricular aneurysm: persistent ST elevation + paradoxical pulsation\nMural thrombus → embolism\nMitral regurgitation (papillary muscle rupture — day 3-5; acute MR → pulmonary oedema)\nVSD (interventricular septal rupture — day 3-5: new harsh pansystolic murmur)", body_style)],
]
story.append(mk_table(comp_data, [3*cm, 14*cm]))
story.append(Spacer(1, 4))
story.append(Paragraph(
"KEY MNEMONIC — STEMI Treatment: MONA (Morphine, O2, Nitrates, Aspirin) + Primary PCI within 90 min + DAPT + Anticoagulation. "
"POST-MI: ABCDE (Antiplatelet, Beta-blocker, ACEi, statin/Drug, Eplerenone). "
"Earliest ECG change = tall T-waves. Pathological Q = permanent scar. "
"Troponin = gold standard biomarker. VF = most common cause of early death.",
note_style))
# ═══════════════════════════════════════════
# TOPIC 5 — HEART FAILURE
# ═══════════════════════════════════════════
add_topic_header(story, "5. HEART FAILURE (HF)")
story.append(Paragraph(bp("Definition"), sub_heading))
story.append(Paragraph(
"Heart failure is a clinical syndrome in which the heart is unable to pump sufficient blood "
"to meet the metabolic demands of the body at normal filling pressures. "
"It results in symptoms of dyspnoea, fatigue, and fluid retention.",
body_style))
story.append(Paragraph(bp("Classification"), sub_heading))
hf_cls_data = [
[Paragraph("<b>Type</b>", body_style), Paragraph("<b>EF</b>", body_style), Paragraph("<b>Mechanism</b>", body_style), Paragraph("<b>Common Cause</b>", body_style)],
[Paragraph("HFrEF\n(Systolic HF)", body_style), Paragraph("EF <40%", body_style),
Paragraph("Impaired LV contraction; dilated, thin-walled ventricle", body_style),
Paragraph("CAD/MI, DCM, myocarditis", body_style)],
[Paragraph("HFpEF\n(Diastolic HF)", body_style), Paragraph("EF ≥50%", body_style),
Paragraph("Impaired LV relaxation/filling; stiff ventricle; normal contraction", body_style),
Paragraph("HTN, DM, obesity, elderly women, HCM", body_style)],
[Paragraph("HFmrEF\n(Mid-range)", body_style), Paragraph("EF 41-49%", body_style),
Paragraph("Overlap of both mechanisms", body_style),
Paragraph("Mixed; post-MI", body_style)],
]
story.append(mk_table(hf_cls_data, [2.5*cm, 2.5*cm, 6*cm, 6*cm]))
story.append(Spacer(1, 4))
story.append(Paragraph(bp("Aetiology"), sub_heading))
for pt in [
bp("Myocardial dysfunction:") + " Ischemic heart disease/MI (most common), dilated cardiomyopathy, myocarditis, alcohol, Chagas disease.",
bp("Pressure overload:") + " Hypertension (most common diastolic HF), aortic stenosis, coarctation.",
bp("Volume overload:") + " Mitral/aortic regurgitation, VSD, high-output states (anaemia, thyrotoxicosis, AV fistula, pregnancy).",
bp("Pericardial:") + " Constrictive pericarditis, cardiac tamponade.",
bp("Arrhythmias:") + " Persistent fast AF, complete heart block.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(bp("Pathophysiology"), sub_heading))
for pt in [
"Myocardial injury → ↓cardiac output → compensatory activation of RAAS (renin → Ang II → aldosterone → Na+/H2O retention) and SNS (↑HR, ↑catecholamines).",
"Initially compensatory (Frank-Starling mechanism: ↑preload → ↑SV), but chronic neurohormonal activation is harmful.",
"Ang II + aldosterone → LV remodelling (hypertrophy → dilation → eccentric remodelling → further ↓EF).",
"Catecholamines: Direct myocardial toxicity, β-receptor downregulation, arrhythmias.",
"Chronic congestion: ↑capillary hydrostatic pressure → fluid into lungs (pulmonary oedema) and periphery (oedema).",
"Cytokines (TNF-α, IL-6): Worsen endothelial dysfunction and myocardial damage.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(bp("Clinical Features"), sub_heading))
cf_hf_data = [
[Paragraph("<b>Left HF (congestion upstream — lungs)</b>", body_style),
Paragraph("<b>Right HF (congestion upstream — systemic veins)</b>", body_style)],
[Paragraph(
"• Dyspnoea on exertion (earliest symptom)\n"
"• Orthopnoea (dyspnoea lying flat) — no. of pillows used\n"
"• Paroxysmal nocturnal dyspnoea (PND) — wakes at night\n"
"• Cardiac asthma (bronchospasm from pulmonary oedema)\n"
"• Haemoptysis (pink frothy sputum — acute pulmonary oedema)\n"
"• Fatigue, exercise intolerance\n"
"• Signs: Bibasal crackles, S3 gallop, tachycardia, pulsus alternans", body_style),
Paragraph(
"• Ankle oedema (pitting, dependent)\n"
"• Abdominal distension (ascites)\n"
"• Right upper quadrant pain (hepatic congestion)\n"
"• Anorexia, nausea (gut oedema)\n"
"• Signs: Raised JVP (most specific), hepatomegaly, ankle oedema, pulsatile liver\n"
"• Hepatojugular reflux positive", body_style)],
]
tbl_cf = Table(cf_hf_data, colWidths=[8.5*cm, 8.5*cm])
tbl_cf.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#ffcdd2')),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4),
('FONTSIZE', (0,0), (-1,-1), 9), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(tbl_cf)
story.append(Spacer(1, 4))
story.append(Paragraph(bp("NYHA Functional Classification"), sub_heading))
nyha_data = [
[Paragraph("<b>Class</b>", body_style), Paragraph("<b>Description</b>", body_style)],
[Paragraph("Class I", body_style), Paragraph("No limitation; ordinary activities do not cause HF symptoms", body_style)],
[Paragraph("Class II", body_style), Paragraph("Slight limitation; comfortable at rest; ordinary activity causes fatigue/dyspnoea", body_style)],
[Paragraph("Class III", body_style), Paragraph("Marked limitation; comfortable at rest; less than ordinary activity causes symptoms", body_style)],
[Paragraph("Class IV", body_style), Paragraph("Unable to carry out any activity; symptoms at rest; bedridden", body_style)],
]
story.append(mk_table(nyha_data, [2.5*cm, 14.5*cm]))
story.append(Spacer(1, 4))
story.append(Paragraph(bp("Investigations"), sub_heading))
for pt in [
bp("BNP / NT-proBNP") + " (most important biomarker): ↑ in HF (secreted by stressed ventricles); levels >400 pg/mL = HF; used for diagnosis, monitoring, and prognosis.",
"ECG: LVH, Q waves, arrhythmias (AF most common in HF), LBBB.",
bp("Echocardiography (key investigation):") + " Measures EF (distinguishes HFrEF vs HFpEF); wall motion, valve assessment, filling pressures.",
"CXR: Cardiomegaly (CTR >50%); upper lobe diversion, Kerley B lines, perihilar (bat-wing) shadowing, pleural effusions.",
"Bloods: U&E (renal function), LFTs, TFTs, FBC, glucose, HbA1c.",
"Coronary angiography if ischemic aetiology suspected.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(bp("Treatment of HF with Reduced EF (HFrEF) — Evidence-Based"), sub_heading))
hf_tx_data = [
[Paragraph("<b>Drug Class</b>", body_style), Paragraph("<b>Drug (Example)</b>", body_style), Paragraph("<b>Benefit</b>", body_style)],
[Paragraph("ACE inhibitor (FIRST LINE)\nor ARB", body_style),
Paragraph("Ramipril, enalapril\nLosartan (if ACEi intolerant)", body_style),
Paragraph("↓Mortality, ↓hospitalisation; blocks RAAS remodelling; start low, titrate up", body_style)],
[Paragraph("Beta-blocker (FIRST LINE)", body_style),
Paragraph("Bisoprolol, carvedilol, metoprolol succinate (only these 3 proven)", body_style),
Paragraph("↓Mortality (34% reduction); ↓HR; anti-arrhythmic; start low, titrate slowly", body_style)],
[Paragraph("Aldosterone antagonist (MRA)", body_style),
Paragraph("Spironolactone 25-50 mg OD\nEplerenone (if post-MI + EF <40%)", body_style),
Paragraph("↓Mortality when added to ACEi + BB; monitor K+ and renal function", body_style)],
[Paragraph("SGLT2 inhibitor (NEW — first line)", body_style),
Paragraph("Dapagliflozin 10 mg OD\nEmpagliflozin 10 mg OD", body_style),
Paragraph("↓Hospitalisation for HF, ↓CV death; irrespective of DM; now included in quadruple therapy", body_style)],
[Paragraph("Sacubitril/Valsartan (ARNI)", body_style),
Paragraph("Entresto (sacubitril + valsartan)\nReplace ACEi after stabilisation", body_style),
Paragraph("↓Mortality 20% vs enalapril (PARADIGM-HF); neprilysin inhibitor + ARB", body_style)],
[Paragraph("Diuretics (symptom relief)", body_style),
Paragraph("Furosemide 40-80 mg IV/OD; bumetanide\nAdd thiazide for resistant oedema", body_style),
Paragraph("Symptom control — reduces congestion/oedema; NO mortality benefit", body_style)],
[Paragraph("Ivabradine", body_style),
Paragraph("7.5 mg BD", body_style),
Paragraph("If HR ≥70 bpm despite BB + sinus rhythm; ↓hospitalisation", body_style)],
[Paragraph("Digoxin", body_style),
Paragraph("0.125-0.25 mg OD", body_style),
Paragraph("AF with HF; no mortality benefit but reduces hospitalisations; narrow TI — check levels", body_style)],
]
story.append(mk_table(hf_tx_data, [4*cm, 5*cm, 8*cm]))
story.append(Spacer(1, 4))
story.append(Paragraph(bp("Device Therapy"), sub_heading))
for pt in [
bp("ICD (Implantable Cardioverter Defibrillator):") + " If EF <35% despite 3 months optimal medical therapy + NYHA II-III → prevents sudden cardiac death from VF.",
bp("CRT (Cardiac Resynchronisation Therapy):") + " If EF <35% + LBBB + QRS >150 ms + NYHA III-IV → biventricular pacing, improves symptoms and reduces mortality.",
bp("LVAD (Left Ventricular Assist Device):") + " Bridge to transplant or destination therapy in end-stage HF.",
bp("Heart Transplant:") + " Definitive treatment for end-stage HF refractory to all therapy; limited by donor availability.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(bp("Acute Pulmonary Oedema — Emergency Management"), sub_heading))
for pt in [
"Sit patient upright; high-flow O2 (or CPAP/BiPAP — first-line non-invasive ventilation).",
"IV furosemide 40-80 mg IV (immediate venodilation then diuresis).",
"GTN IV/SL (reduces preload and afterload) — avoid if systolic BP <90 mmHg.",
"Morphine 2-5 mg IV (reduces anxiety/sympathetic drive — now used cautiously).",
"If cardiogenic shock: IV dobutamine (inotrope); dopamine; consider IABP.",
"Identify and treat precipitant: AF (rate control), MI (reperfusion), hypertensive crisis, infection.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(bp("Dental Relevance"), sub_heading))
for pt in [
"Patients with HF — at risk of infective endocarditis if valve disease co-exists; antibiotic prophylaxis if indicated.",
"Dental procedures in NYHA III/IV: Defer elective treatment; consult cardiologist.",
"Diuretics cause xerostomia (dry mouth), increased caries risk.",
"ACE inhibitors cause dry cough; may cause angioedema of lips/tongue — contraindication for dental extractions if angioedema present.",
"Limit use of NSAIDs — worsen HF, cause Na retention.",
"Limit adrenaline (epinephrine) in LA to 2 cartridges (cardiac effect); avoid felypressin in severe HF.",
]:
story.append(Paragraph(f"\u2022 {pt}", bullet_style))
story.append(Paragraph(
"KEY: HFrEF (EF<40%) — QUADRUPLE therapy: ACEi/ARNI + Beta-blocker + MRA + SGLT2i (all proven mortality benefit). "
"Diuretics for symptom relief only. BNP is the key biomarker. Echo is key investigation. "
"NYHA Class IV + EF <35% → ICD + CRT consideration. "
"PND and orthopnoea = left HF; Raised JVP + oedema = right HF.",
note_style))
# ──── Final Summary Table ────
story.append(Spacer(1, 10))
story.append(HRFlowable(width="100%", thickness=1.5, color=colors.HexColor('#b71c1c'), spaceAfter=8))
story.append(Paragraph("<b>Quick Comparison — Angina vs NSTEMI vs STEMI</b>",
ParagraphStyle('CompH', parent=styles['Normal'], fontSize=10.5,
textColor=colors.HexColor('#b71c1c'), fontName='Helvetica-Bold', spaceAfter=4)))
comp_data = [
[Paragraph("<b>Feature</b>", body_style),
Paragraph("<b>Stable Angina</b>", body_style),
Paragraph("<b>Unstable Angina</b>", body_style),
Paragraph("<b>NSTEMI</b>", body_style),
Paragraph("<b>STEMI</b>", body_style)],
[Paragraph("Onset", body_style), Paragraph("Exertion", body_style), Paragraph("Rest/minimal exertion", body_style), Paragraph("Rest", body_style), Paragraph("Rest/any time", body_style)],
[Paragraph("Pain duration", body_style), Paragraph("<15 min", body_style), Paragraph(">20 min", body_style), Paragraph(">20 min", body_style), Paragraph(">30 min", body_style)],
[Paragraph("ECG", body_style), Paragraph("Normal/ST↓ on stress", body_style), Paragraph("ST↓ or T-inversion", body_style), Paragraph("ST↓ or T-inversion", body_style), Paragraph("ST elevation (≥1mm)", body_style)],
[Paragraph("Troponin", body_style), Paragraph("Normal", body_style), Paragraph("Normal", body_style), Paragraph("ELEVATED", body_style), Paragraph("ELEVATED", body_style)],
[Paragraph("Plaque", body_style), Paragraph("Stable (>70%)", body_style), Paragraph("Ruptured (partial)", body_style), Paragraph("Ruptured (partial)", body_style), Paragraph("Ruptured (complete)", body_style)],
[Paragraph("Reperfusion", body_style), Paragraph("Not indicated", body_style), Paragraph("Early angio (<72h)", body_style), Paragraph("Early angio (<72h)", body_style), Paragraph("Primary PCI <90 min", body_style)],
[Paragraph("Key drug", body_style), Paragraph("GTN + BB + Aspirin + Statin", body_style), Paragraph("DAPT + LMWH", body_style), Paragraph("DAPT + LMWH", body_style), Paragraph("DAPT + thrombolysis or PCI", body_style)],
]
tbl_comp = Table(comp_data, colWidths=[3*cm, 3.2*cm, 3.5*cm, 3.2*cm, 4.1*cm])
tbl_comp.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#b71c1c')),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor('#fce4e4')]),
('TOPPADDING', (0,0), (-1,-1), 3), ('BOTTOMPADDING', (0,0), (-1,-1), 3),
('FONTSIZE', (0,0), (-1,-1), 8.5), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(tbl_comp)
story.append(Spacer(1, 10))
story.append(Paragraph(
"Notes based on standard General Medicine references (Anil K. Tripathi / standard texts) for "
"Gujarat University BDS 3rd Year. For full marks: include Definition, Aetiology, Pathogenesis, "
"Clinical Features, Investigations, and Treatment.",
ParagraphStyle('Footer', parent=styles['Normal'], fontSize=8, textColor=colors.HexColor('#607d8b'),
alignment=TA_CENTER, fontName='Helvetica-Oblique')))
doc.build(story)
print(f"PDF generated: {output_path}")
cd /tmp/workspace/bds-notes && python generate_notes3.py
BDS General Medicine Cardiac Notes
PDF Document · PDF