Explain

Reading File
Running Command

python -m markitdown "/home/daytona/workspace/attachments/e5dbbb63-cb14-4b98-a74…

Running Command

cd /home/daytona/workspace && python3 -c " from pptx import Presentation from pp…

Running Command

pip install --user python-pptx -q && python3 -c " from pptx import Presentation …

Here is a full explanation of the lecture slides (CLASS 3-2), which cover Retinal Venous Occlusive Disease and Retinal Arterial Occlusive Disease:

Retinal Vascular Occlusive Disease


PART 1: Retinal Venous Occlusive Disease (RVO)

Classification

RVO is divided into two main types:
  1. Central Retinal Vein Occlusion (CRVO)
    • Non-ischaemic CRVO (venous stasis retinopathy) - milder form
    • Ischaemic CRVO (haemorrhagic retinopathy) - more severe
  2. Branch Retinal Vein Occlusion (BRVO)

Risk Factors

  • Age - most important; over 50% of cases in patients older than 65
  • Hypertension - in two-thirds of RVO patients over 50; most prevalent in BRVO
  • Hyperlipidaemia - in one-third or more of patients
  • Diabetes mellitus - up to 15% of patients over 50
  • Glaucoma / ocular hypertension - higher risk of CRVO (and possibly BRVO)
  • Oral contraceptive pill - most common association in younger females
  • Smoking
  • Uncommon causes: dehydration, myeloproliferative disorders (myeloma, polycythaemia), thrombophilia (hyperhomocysteinaemia, antiphospholipid antibody syndrome, factor V Leiden), inflammatory diseases (Behcet syndrome, sarcoidosis, Wegener granulomatosis), orbital disease, chronic renal failure

Branch Retinal Vein Occlusion (BRVO)

  • More common than CRVO
  • Subtypes by location:
    • Hemispheric occlusion - occlusion in the main branch at the disc
    • Quadrantic occlusion - at the level of arteriovenous (AV) crossing
    • Small branch occlusion - macular branch or peripheral branch
Key clinical features:
  • Retinal oedema and haemorrhages limited to the area drained by the affected vein
  • Vision is affected only when the macular area is involved
  • Complications: chronic macular oedema and neovascularization (in ~1/3 of cases)
  • Fundus signs: flame-shaped and blot haemorrhages, cotton wool spots, venous tortuosity in the affected quadrant

Non-Ischaemic CRVO (Venous Stasis Retinopathy)

  • More common than the ischaemic form
  • Symptoms: sudden, painless, monocular fall in vision
  • VA: variably impaired; VA worse than 6/60 suggests substantial ischaemia
  • Prognosis: ~50% return to normal or near-normal vision if it does not become ischaemic
  • RAPD: absent or mild
  • Fundus findings:
    • Tortuosity and dilatation of all branches of the central retinal vein
    • Dot, blot, and flame haemorrhages (mild-moderate) in all quadrants
    • Cotton wool spots, optic disc oedema, macular oedema (generally mild)
    • Patchy perivenular ischaemic retinal whitening (PIRW) is an early sign in younger patients

Ischaemic CRVO (Haemorrhagic Retinopathy)

  • Characterized by substantially decreased retinal perfusion, capillary closure, and retinal hypoxia
  • Major causes of visual loss: macular ischaemia and neovascular glaucoma (NVG)
  • Symptoms: sudden, severe, monocular painless visual impairment; may present with pain and redness due to NVG
  • VA: usually counting fingers (CF) or worse; extremely poor prognosis
  • RAPD: present
  • Rubeosis iridis (NVI): develops in ~50% of eyes, typically at 2-4 months ("hundred-day glaucoma"); high risk of NVG - requires routine gonioscopy at each review
  • Fundus findings:
    • Severe tortuosity and engorgement of all central retinal vein branches
    • Extensive deep blot and flame-shaped haemorrhages (peripheral and posterior retina)
    • Prominent cotton wool spots
    • Optic disc swelling and hyperaemia
    • Most acute signs resolve over 9-12 months
    • Retinal neovascularization in ~5% (less common than in BRVO)

Management of RVO

Investigations:
  • Blood pressure (BP)
  • ESR or plasma viscosity (PV)
  • Full blood count (FBC)
  • Random blood glucose (and further diabetes assessment if needed)
  • Random total and HDL cholesterol (additional lipid testing may be considered)
  • Plasma protein electrophoresis (to detect dysproteinaemias such as multiple myeloma)
  • Other tests for systemic end-organ damage from cardiovascular risk factors
Treatment of Macular Oedema:
  • Indicated when VA is worse than 6/9 and/or central macular thickness >250 µm on OCT
  • Unlikely to benefit if VA is 6/120 or worse
  • Intravitreal anti-VEGF agents or dexamethasone implant are the current standard of care
    • GENEVA trial: dexamethasone intravitreal implant (Ozurdex) showed substantial visual and anatomical improvement vs. intravitreal triamcinolone
    • SCORE study: improvement in vision with ~2 injections of 1 mg triamcinolone on average
  • Laser photocoagulation: anatomically improves macular oedema but is NOT beneficial for visual outcome
Treatment of Neovascularization:
  • Panretinal photocoagulation (PRP) - performed without delay in eyes with NVI or angle neovascularization
  • Intravitreal anti-VEGF injections - given adjunctively every 6 weeks until stabilization; cause faster resolution of new vessels than PRP alone

PART 2: Retinal Arterial Occlusive Disease

Aetiology

  • The outer retina is supplied by the ciliary arteries via the choriocapillaris
  • The inner retina is supplied by the central retinal artery (CRA)
Common causes of retinal artery occlusion:
  1. Emboli (most common cause of CRAO) - three types:
    • Cholesterol emboli (Hollenhorst plaques): refractile, orange, at vessel bifurcations; arise from carotid artery atheromas
    • Calcium emboli: white, arise from cardiac valves
    • Platelet-fibrin emboli: dull white, arise from carotid atheromas; may cause retinal TIAs (transient ischaemic attacks)
  2. Atherosclerosis-related thrombosis at the level of the lamina cribrosa
  3. Retinal arteritis:
    • Obliterative arteritis - associated with giant cell arteritis (GCA)
    • Periarteritis - associated with polyarteritis nodosa, SLE, Wegener granulomatosis, scleroderma
  4. Angiospasm - rare; commonly associated with amaurosis fugax
  5. Raised intraocular pressure - e.g., due to tight encirclage in retinal detachment surgery
  6. Thrombophilic disorders - inherited anticoagulant defects; more common cause in young individuals

Amaurosis Fugax

  • Transient, monocular, painless loss of vision - classically described as "a curtain coming down over the eye"
  • Causes: embolic, haemodynamic, ocular, neurologic, idiopathic (clinically, usually refers to embolic)
  • Embolic visual loss usually lasts a few minutes; recovery is gradual
  • Attacks may vary in frequency (several per day to once every few months)
  • Investigation and management is the same as retinal arterial occlusion
  • Carries a high risk of stroke - must be managed urgently

Branch Retinal Artery Occlusion (BRAO)

  • Symptoms: sudden, profound, painless altitudinal or sectoral visual field loss (may go unnoticed if central vision is spared)
  • VA: variable; poor prognosis if central vision is severely compromised unless obstruction relieved within hours
  • RAPD: often present
  • Fundus signs:
    • Attenuation of arteries and veins with sludging and segmentation of blood column ("cattle trucking / boxcarring")
    • Cloudy white oedematous ("ground glass") retina corresponding to area of ischaemia
  • FA (Fluorescein Angiography): delayed arterial filling; hypofluorescence of involved segment due to retinal swelling
  • Visual field defect rarely recovers
  • Review at 3 months to assess fundus and visual fields

Central Retinal Artery Occlusion (CRAO)

  • Symptoms: sudden, profound, painless loss of vision (painful in GCA)
  • VA: severely reduced; preserved if a cilioretinal artery supplies the critical macular area
  • Absence of light perception suggests GCA or ophthalmic artery occlusion
  • RAPD: profound (sometimes total - amaurotic pupil)
  • Fundus findings:
    • Similar to BRAO but involving all retinal quadrants
    • Cherry-red spot: orange reflex from intact choroid at the thin foveola surrounded by pale ischaemic retina - classic sign
    • Peripapillary retina appears especially swollen and opaque
    • Emboli visible in 20%
    • If a cilioretinal artery is present, part of the macula remains normal in colour

Treatment of Acute Retinal Artery Occlusion

Retinal artery occlusion is an ocular emergency - irreversible vision loss occurs unless circulation is re-established before retinal infarction.
Treatment aggressiveness is tailored to the individual (more aggressive if shorter duration of occlusion, good health, monocularity):
  1. Supine posture - may improve ocular perfusion
  2. Ocular massage - using a three-mirror contact lens; mechanically collapses the arterial lumen to change flow and dislodge embolus/thrombus (10-15 sec pressure, then release; repeated for 3-5 min); patient can self-massage through closed eyelids
  3. Anterior chamber paracentesis - withdrawal of 0.1-0.2 ml of aqueous with a 27-gauge needle (controversial)
  4. IOP-lowering agents - topical apraclonidine 1%, timolol 0.5%, IV acetazolamide 500 mg
  5. Sublingual isosorbide dinitrate - to induce vasodilation
  6. Rebreathing into a paper bag - elevates blood CO2, causes respiratory acidosis, promotes vasodilation
  7. Carbogen (95% O2 + 5% CO2) - dual effect of retarding ischaemia and vasodilation
  8. Hyperosmotic agents - mannitol or glycerol (IOP-lowering + increased intravascular volume)
  9. Transluminal Nd:YAG laser embolysis/embolectomy - for visible occluding embolus in BRAO or CRAO
  10. Thrombolysis

Systemic Management After Retinal Arterial Occlusion

  • Risk of stroke is relatively high in the first few days after retinal artery occlusion or amaurosis fugax
  • Address general cardiovascular risk factors; stop smoking
  • Urgent referral for significant cardiac arrhythmia
  • Antiplatelet therapy
  • Oral anticoagulation (e.g., warfarin) in selected cases
  • Carotid endarterectomy - indicated in symptomatic stenosis greater than 70%

Summary Table

FeatureBRVONon-ischaemic CRVOIschaemic CRVOBRAOCRAO
Vision lossSectoral (if macula involved)ModerateSevere (CF or worse)Sectoral/altitudinalProfound
RAPDVariableAbsent/mildPresentOften presentProfound
HaemorrhagesQuadrant onlyAll quadrants (mild)All quadrants (severe)SectorAll quadrants
Cherry-red spotNoNoNoNoYes
NVI riskLowLow~50%NoRarely
PrognosisModerate~50% goodVery poorVariableVery poor

Create a quick reference PDF comparing CRVO vs BRVO vs retinal artery occlusions

Reading File
Running Command

mkdir -p /home/daytona/workspace/retinal-occlusion-pdf && python3 -c "from repor…

Writing File

~/retinal-occlusion-pdf/build_pdf.py

from reportlab.lib.pagesizes import A4, landscape
from reportlab.lib import colors
from reportlab.lib.units import cm, mm
from reportlab.platypus import (
    SimpleDocTemplate, Table, TableStyle, Paragraph, Spacer,
    HRFlowable, KeepTogether
)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT
from reportlab.platypus import PageBreak

OUTPUT = "/home/daytona/workspace/retinal-occlusion-pdf/Retinal_Occlusion_Quick_Reference.pdf"

# ─── Colour palette ───────────────────────────────────────────────────────────
NAVY      = colors.HexColor("#0D2B4E")
TEAL      = colors.HexColor("#0A7B8C")
CRIMSON   = colors.HexColor("#A81C2E")
ORANGE    = colors.HexColor("#D4640A")
GOLD      = colors.HexColor("#E8A820")
LTBLUE    = colors.HexColor("#D6EAF8")
LTRED     = colors.HexColor("#FADBD8")
LTORANGE  = colors.HexColor("#FDEBD0")
LTGREEN   = colors.HexColor("#D5F5E3")
LTGRAY    = colors.HexColor("#F2F3F4")
WHITE     = colors.white
DARKGRAY  = colors.HexColor("#2C3E50")

# ─── Document ─────────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=landscape(A4),
    leftMargin=1.2*cm, rightMargin=1.2*cm,
    topMargin=1.5*cm, bottomMargin=1.2*cm
)

styles = getSampleStyleSheet()

def S(name, **kw):
    return ParagraphStyle(name, **kw)

title_style = S("Title", fontSize=18, textColor=WHITE, fontName="Helvetica-Bold",
                alignment=TA_CENTER, spaceAfter=2)
subtitle_style = S("Sub", fontSize=10, textColor=LTBLUE, fontName="Helvetica",
                   alignment=TA_CENTER, spaceAfter=4)
section_style = S("Sec", fontSize=11, textColor=WHITE, fontName="Helvetica-Bold",
                  alignment=TA_CENTER)
cell_head = S("CH", fontSize=8.5, textColor=WHITE, fontName="Helvetica-Bold",
              alignment=TA_CENTER, leading=11)
cell_body = S("CB", fontSize=7.8, textColor=DARKGRAY, fontName="Helvetica",
              alignment=TA_LEFT, leading=10)
cell_body_c = S("CBC", fontSize=7.8, textColor=DARKGRAY, fontName="Helvetica",
                alignment=TA_CENTER, leading=10)
cell_bold = S("CBB", fontSize=7.8, textColor=DARKGRAY, fontName="Helvetica-Bold",
              alignment=TA_LEFT, leading=10)
bullet_style = S("BL", fontSize=7.5, textColor=DARKGRAY, fontName="Helvetica",
                 alignment=TA_LEFT, leading=10, leftIndent=8, firstLineIndent=-8)

def P(text, style=None):
    if style is None:
        style = cell_body_c
    return Paragraph(text, style)

def PL(text):
    return Paragraph(u"\u2022 " + text, bullet_style)

def bold(text):
    return f"<b>{text}</b>"

# ─── Build story ──────────────────────────────────────────────────────────────
story = []

# ══════════════════════════════════════════════════════════════════════════════
# PAGE 1 – COMPARISON TABLE
# ══════════════════════════════════════════════════════════════════════════════

# Title banner
title_table = Table(
    [[Paragraph("RETINAL VASCULAR OCCLUSION  |  Quick Reference", title_style)],
     [Paragraph("CRVO (Non-ischaemic &amp; Ischaemic)  •  BRVO  •  BRAO  •  CRAO", subtitle_style)]],
    colWidths=[27.6*cm]
)
title_table.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,-1), NAVY),
    ("TOPPADDING", (0,0), (-1,0), 10),
    ("BOTTOMPADDING", (0,-1), (-1,-1), 8),
    ("LEFTPADDING", (0,0), (-1,-1), 10),
    ("RIGHTPADDING", (0,0), (-1,-1), 10),
    ("ROUNDEDCORNERS", [6,6,6,6]),
]))
story.append(title_table)
story.append(Spacer(1, 0.3*cm))

# ── Main comparison table ─────────────────────────────────────────────────────
COL = [3.5*cm, 4.3*cm, 4.3*cm, 4.3*cm, 4.2*cm, 4.2*cm]  # total ~24.8
HDR_BG   = [TEAL, CRIMSON, CRIMSON, CRIMSON, NAVY, NAVY]
ROW_COLS = [LTBLUE, LTRED, LTRED, LTRED, LTORANGE, LTORANGE]
ALT_COLS = [colors.HexColor("#EBF5FB"), colors.HexColor("#FDEDEC"),
            colors.HexColor("#FDEDEC"), colors.HexColor("#FDEDEC"),
            colors.HexColor("#FEF9E7"), colors.HexColor("#FEF9E7")]

headers = [
    P("FEATURE", cell_head),
    P("Non-ischaemic\nCRVO", cell_head),
    P("Ischaemic\nCRVO", cell_head),
    P("BRVO", cell_head),
    P("BRAO", cell_head),
    P("CRAO", cell_head),
]

data = [headers]

rows = [
    ("Pathology",
     "Partial venous stasis;\ncapillaries intact",
     "Severe capillary\nclosure; retinal hypoxia",
     "Occlusion at AV\ncrossing or disc branch",
     "Embolic/thrombotic\nocclusion of branch\narterial supply",
     "Embolic/thrombotic\nocclusion of central\nretinal artery"),
    ("Onset",
     "Sudden, painless\nmonocular vision loss",
     "Sudden, severe,\npainless (pain if NVG)",
     "Sectoral vision loss\n(may be unnoticed)",
     "Sudden painless\naltitudinal/sectoral\nfield loss",
     "Sudden profound\npainless loss\n(painful in GCA)"),
    ("Visual Acuity",
     "Variable; 6/60 or\nbetter (mostly)",
     "CF or worse;\nextremely poor\nprognosis",
     "Affected only if\nmacula involved",
     "Variable; poor if\ncentral vision lost",
     "Severely reduced;\npreserved if patent\ncilioretinal artery"),
    ("RAPD",
     "Absent or mild",
     "Present",
     "Variable",
     "Often present",
     "Profound / total\n(amaurotic pupil)"),
    ("Haemorrhages",
     "Dot, blot, flame\nin ALL quadrants\n(mild-moderate)",
     "Extensive blot &\nflame in ALL\nquadrants (severe)",
     "Restricted to\nAFFECTED quadrant\nonly",
     "None typically\n(occasionally small)",
     "Occasional small\nhaemorrhage\n(20% show emboli)"),
    ("Other Fundus\nSigns",
     "Venous tortuosity,\nCWS, disc/macular\noedema; PIRW in\nyoung patients",
     "Severe venous\ntortuosity, disc\nswelling; CWS\nprominent",
     "Venous tortuosity,\nCWS, oedema in\naffected segment",
     "'Cattle trucking'\n/ boxcarring;\nground-glass retina\nin ischaemic sector",
     "Cherry-red spot\nat macula; pale\nswollen retina;\nperipapillary swelling"),
    ("NVI / NVG Risk",
     "Low",
     "~50% develop\nrubeosis iridis\n(2-4 months;\n'100-day glaucoma')",
     "Low (~1/3 get\nchronic macular\noedema or NV)",
     "None",
     "Rare"),
    ("Key\nComplications",
     "Macular oedema;\n~50% recover vision;\n~30% progress to\nischaemic CRVO",
     "Macular ischaemia;\nNVG; NVI in 50%;\nblindness",
     "Macular oedema;\nneovascularization\n(~1/3 cases)",
     "Permanent visual\nfield defect;\nrarely recovers",
     "Irreversible vision\nloss; very poor\nprognosis without\nurgent treatment"),
    ("Aetiology /\nRisk Factors",
     "HTN, glaucoma,\nhyperlipidaemia,\nDM, age >65",
     "Same as non-isch;\nmore severe vascular\ndisease",
     "HTN (most common),\nOCP (young women),\nsmoking, age",
     "Carotid emboli,\ncardiac emboli,\natherosclerosis",
     "Emboli (Hollenhorst\nplaque, calcific,\nplatelet-fibrin),\natherosclerosis,\nGCA"),
    ("Investigations",
     "BP, FBC, ESR/PV,\nglucose, lipids,\nprotein electrophoresis",
     "Same + gonioscopy\nat each review",
     "BP, FBC, ESR/PV,\nglucose, lipids",
     "Carotid Doppler,\nECHO, ECG, BP,\nlipids, glucose",
     "URGENT: carotid\nDoppler, ECHO,\nECG, ESR/CRP\n(exclude GCA)"),
    ("Treatment\n(Macular Oedema)",
     "Anti-VEGF or\nOzurdex implant;\ntarget VA <6/9;\nOCT guided",
     "Anti-VEGF;\nOzurdex implant;\nlaser NOT effective\nfor VA",
     "Anti-VEGF or\nOzurdex implant;\nlaser NOT effective\nfor VA",
     "No specific Rx;\nmonitor 3 months",
     "N/A (arterial,\nnot oedema)"),
    ("Treatment\n(Neovascularization\n/ Ischaemia)",
     "Monitor; PRP if\nprogresses to\nischaemic",
     "PRP without delay\nif NVI/angle NV;\nAnti-VEGF adjunct\nevery 6 weeks",
     "PRP if NV;\nAnti-VEGF adjunct",
     "N/A",
     "N/A"),
    ("EMERGENCY\nTreatment",
     "Not emergency",
     "Urgent if NVG",
     "Not emergency",
     "EMERGENCY:\nocular massage,\nAC paracentesis,\nIOP lowering,\ncarbogen, mannitol",
     "EMERGENCY:\nsame as BRAO +\nmore aggressive;\nthrombolysis;\nsupine posture"),
    ("Prognosis",
     "~50% return to\nnormal/near-normal\nvision",
     "Generally extremely\npoor; macular\nischaemia usual",
     "Variable; good if\nmacula spared",
     "Poor if central\nvision involved;\nfield defect persists",
     "Very poor;\npreserved only if\ncilioretinal artery\npatent"),
]

for i, (feat, c1, c2, c3, c4, c5) in enumerate(rows):
    row = [
        P(bold(feat), cell_bold),
        P(c1, cell_body_c),
        P(c2, cell_body_c),
        P(c3, cell_body_c),
        P(c4, cell_body_c),
        P(c5, cell_body_c),
    ]
    data.append(row)

tbl = Table(data, colWidths=COL, repeatRows=1)

ts = TableStyle([
    # Header row
    ("BACKGROUND", (0, 0), (0, 0), TEAL),
    ("BACKGROUND", (1, 0), (3, 0), CRIMSON),
    ("BACKGROUND", (4, 0), (5, 0), NAVY),
    ("TEXTCOLOR",  (0, 0), (-1, 0), WHITE),
    ("FONTNAME",   (0, 0), (-1, 0), "Helvetica-Bold"),
    ("FONTSIZE",   (0, 0), (-1, 0), 8.5),
    ("ALIGN",      (0, 0), (-1, 0), "CENTER"),
    ("VALIGN",     (0, 0), (-1, -1), "MIDDLE"),
    ("TOPPADDING", (0, 0), (-1, -1), 4),
    ("BOTTOMPADDING", (0, 0), (-1, -1), 4),
    ("LEFTPADDING",   (0, 0), (-1, -1), 4),
    ("RIGHTPADDING",  (0, 0), (-1, -1), 4),
    # Feature col background
    ("BACKGROUND", (0, 1), (0, -1), LTBLUE),
    ("FONTNAME",   (0, 1), (0, -1), "Helvetica-Bold"),
    # Grid
    ("GRID", (0, 0), (-1, -1), 0.4, colors.HexColor("#BDC3C7")),
    ("LINEBELOW", (0, 0), (-1, 0), 1.5, WHITE),
    # Alternating row bands
])

# Alternating rows
for i in range(1, len(data)):
    bg = LTGRAY if i % 2 == 0 else WHITE
    ts.add("BACKGROUND", (1, i), (3, i), colors.HexColor("#FDEDEC") if i % 2 == 0 else colors.HexColor("#FEF5F5"))
    ts.add("BACKGROUND", (4, i), (5, i), colors.HexColor("#FEF9E7") if i % 2 == 0 else colors.HexColor("#FFFDF0"))

tbl.setStyle(ts)
story.append(tbl)
story.append(Spacer(1, 0.2*cm))

# footnote
fn = P("<i>Abbreviations: CRVO = Central Retinal Vein Occlusion | BRVO = Branch Retinal Vein Occlusion | "
       "CRAO = Central Retinal Artery Occlusion | BRAO = Branch Retinal Artery Occlusion | "
       "CWS = Cotton Wool Spots | NVI = Neovascularisation of Iris | NVG = Neovascular Glaucoma | "
       "PRP = Panretinal Photocoagulation | GCA = Giant Cell Arteritis | PIRW = Perivenular Ischaemic Retinal Whitening | "
       "HTN = Hypertension | OCP = Oral Contraceptive Pill | CF = Counting Fingers | RAPD = Relative Afferent Pupillary Defect</i>",
       S("fn", fontSize=6.5, textColor=colors.HexColor("#7F8C8D"), fontName="Helvetica",
         alignment=TA_LEFT, leading=8))
story.append(fn)

# ══════════════════════════════════════════════════════════════════════════════
# PAGE 2 – Key Points & Management Flowcharts
# ══════════════════════════════════════════════════════════════════════════════
story.append(PageBreak())

# Title strip
title2 = Table([[P("KEY CLINICAL PEARLS  &amp;  MANAGEMENT ALGORITHMS", title_style)]],
               colWidths=[27.6*cm])
title2.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,-1), NAVY),
    ("TOPPADDING", (0,0), (-1,-1), 9),
    ("BOTTOMPADDING", (0,0), (-1,-1), 9),
]))
story.append(title2)
story.append(Spacer(1, 0.35*cm))

# ── Four panels ───────────────────────────────────────────────────────────────
panel_w = 6.7*cm

def panel(title_text, bg, items):
    rows = [[P(title_text, S("pt", fontSize=9.5, textColor=WHITE,
                              fontName="Helvetica-Bold", alignment=TA_CENTER))]]
    for item in items:
        rows.append([PL(item)])
    t = Table(rows, colWidths=[panel_w])
    st = TableStyle([
        ("BACKGROUND", (0, 0), (-1, 0), bg),
        ("BACKGROUND", (0, 1), (-1, -1), colors.HexColor("#FAFAFA")),
        ("TOPPADDING", (0, 0), (-1, -1), 4),
        ("BOTTOMPADDING", (0, 0), (-1, -1), 3),
        ("LEFTPADDING", (0, 0), (-1, -1), 5),
        ("RIGHTPADDING", (0, 0), (-1, -1), 5),
        ("BOX", (0, 0), (-1, -1), 0.8, bg),
        ("GRID", (0, 1), (-1, -1), 0.3, colors.HexColor("#DDDDDD")),
        ("VALIGN", (0, 0), (-1, -1), "TOP"),
    ])
    t.setStyle(st)
    return t

p1 = panel("CRVO – Diagnosis & Monitoring", TEAL, [
    "Haemorrhages in ALL 4 quadrants = key distinguisher from BRVO",
    "Non-ischaemic → ischaemic conversion in ~30%: monthly review for 6 months",
    "VA worse than 6/60 → suspect ischaemia; check for RAPD",
    "PIRW (perivenular whitening) = early sign in young non-ischaemic CRVO",
    "Ischaemic: gonioscopy at EVERY visit (NVI risk ~50% by 4 months)",
    "'Hundred-day glaucoma' = NVG developing 2-4 months after ischaemic CRVO",
    "OCT macular thickness >250 µm → treat oedema",
    "Anti-VEGF / Ozurdex for oedema; PRP urgently for NVI/NVG",
    "SCORE trial: triamcinolone 1 mg effective for macular oedema in CRVO",
    "GENEVA trial: Ozurdex superior to triamcinolone",
])

p2 = panel("BRVO – Diagnosis & Management", CRIMSON, [
    "Haemorrhages RESTRICTED to affected quadrant only",
    "Most common occlusion type; usually at AV crossing",
    "Vision affected ONLY if macula involved",
    "Inferotemporal vein most commonly affected",
    "Chronic macular oedema + neovascularization in ~1/3",
    "Anti-VEGF (bevacizumab/ranibizumab) or Ozurdex for macular oedema",
    "Laser photocoagulation: anatomical improvement but NOT visual benefit",
    "PRP for retinal neovascularization",
    "Most common risk factor = hypertension (control is paramount)",
    "OCP: most common cause in young women → advise discontinuation",
])

p3 = panel("BRAO – Diagnosis & Acute Rx", ORANGE, [
    "Sudden painless SECTORAL or ALTITUDINAL field loss",
    "May be asymptomatic if central vision spared",
    "'Cattle trucking' / boxcarring = sludging in vessels",
    "Ground-glass (white) retina in ischaemic sector",
    "FA: delayed filling + hypofluorescence in sector",
    "Embolus visible over disc in inferotemporal occlusion",
    "Visual field defect rarely recovers",
    "Investigate: carotid Doppler, ECHO, ECG, lipids, glucose",
    "Manage like TIA/stroke – high early stroke risk",
    "Review at 3 months; antiplatelet therapy",
])

p4 = panel("CRAO – EMERGENCY Management", NAVY, [
    "Cherry-red spot = pathognomonic; results from choroid contrast vs pale retina",
    "Profound/total RAPD (amaurotic pupil)",
    "If cilioretinal artery patent → partial macular sparing",
    "Absence of light perception → suspect GCA or ophthalmic artery occlusion",
    "URGENT ESR/CRP to exclude GCA (if GCA → IV methylprednisolone)",
    "Ocular massage: 10-15s pressure, release, x3-5 min (dislodge embolus)",
    "AC paracentesis: 0.1-0.2 mL aqueous via 27G needle (controversial)",
    "IOP lowering: apraclonidine 1%, timolol 0.5%, IV acetazolamide 500 mg",
    "Carbogen (95% O2 + 5% CO2) → vasodilation + retards ischaemia",
    "Supine posture, sublingual isosorbide dinitrate, mannitol",
    "Carotid endarterectomy if stenosis >70%",
])

panels_row = Table([[p1, p2, p3, p4]], colWidths=[panel_w+0.2*cm]*4)
panels_row.setStyle(TableStyle([
    ("VALIGN", (0,0), (-1,-1), "TOP"),
    ("LEFTPADDING", (0,0), (-1,-1), 3),
    ("RIGHTPADDING", (0,0), (-1,-1), 3),
]))
story.append(panels_row)
story.append(Spacer(1, 0.35*cm))

# ── Embolus types + systemic management side by side ─────────────────────────
embolus_data = [
    [P("EMBOLUS TYPES IN RETINAL ARTERIAL OCCLUSION", S("eht", fontSize=9, textColor=WHITE,
        fontName="Helvetica-Bold", alignment=TA_CENTER))],
    [Table([
        [P(bold("Type"), cell_head), P(bold("Appearance"), cell_head),
         P(bold("Origin"), cell_head), P(bold("Clinical Note"), cell_head)],
        [P("Cholesterol\n(Hollenhorst plaque)", cell_body_c),
         P("Refractile, orange/yellow", cell_body_c),
         P("Carotid artery atheroma", cell_body_c),
         P("At vessel bifurcations; often asymptomatic", cell_body_c)],
        [P("Calcific", cell_body_c), P("White, dense", cell_body_c),
         P("Cardiac valves", cell_body_c),
         P("Larger; more likely to cause CRAO", cell_body_c)],
        [P("Platelet-fibrin", cell_body_c), P("Dull white, elongated", cell_body_c),
         P("Carotid artery atheroma", cell_body_c),
         P("May cause retinal TIA (amaurosis fugax); transient", cell_body_c)],
    ], colWidths=[3.2*cm, 3.2*cm, 3.5*cm, 5.5*cm],
       style=TableStyle([
           ("BACKGROUND", (0,0), (-1,0), TEAL),
           ("BACKGROUND", (0,1), (-1,1), colors.HexColor("#EAF4F4")),
           ("BACKGROUND", (0,2), (-1,2), WHITE),
           ("BACKGROUND", (0,3), (-1,3), colors.HexColor("#EAF4F4")),
           ("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#BDC3C7")),
           ("TOPPADDING", (0,0), (-1,-1), 3),
           ("BOTTOMPADDING", (0,0), (-1,-1), 3),
           ("LEFTPADDING", (0,0), (-1,-1), 4),
           ("RIGHTPADDING", (0,0), (-1,-1), 4),
           ("VALIGN", (0,0), (-1,-1), "MIDDLE"),
       ]))
    ]
]
emb_tbl = Table(embolus_data, colWidths=[15.6*cm])
emb_tbl.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), TEAL),
    ("TOPPADDING", (0,0), (-1,0), 6),
    ("BOTTOMPADDING", (0,0), (-1,0), 6),
    ("BOX", (0,0), (-1,-1), 0.8, TEAL),
    ("LEFTPADDING", (0,0), (-1,-1), 0),
    ("RIGHTPADDING", (0,0), (-1,-1), 0),
]))

systemic_data = [
    [P("SYSTEMIC MANAGEMENT (ALL RVO/RAO)", S("sht", fontSize=9, textColor=WHITE,
        fontName="Helvetica-Bold", alignment=TA_CENTER))],
]
sys_items = [
    "BP control – treat hypertension aggressively",
    "Lipid management – statin therapy if hyperlipidaemia",
    "Diabetes – optimise glycaemic control (HbA1c target)",
    "Stop smoking – immediate cessation advised",
    "OCP – discontinue in females with RVO",
    "Antiplatelet therapy (aspirin) after arterial occlusion",
    "Oral anticoagulation (warfarin) in selected cases",
    "Carotid Doppler ultrasound – screen for stenosis",
    "ECG + ECHO – exclude cardiac source of emboli / arrhythmia",
    "Plasma protein electrophoresis – exclude myeloma",
    "Thrombophilia screen in young patients (<50 years)",
    "Carotid endarterectomy if symptomatic stenosis >70%",
    "Urgent physician referral for cardiac arrhythmia",
    "High stroke risk in first days after RAO – urgent neurology",
]
for item in sys_items:
    systemic_data.append([PL(item)])

sys_tbl = Table(systemic_data, colWidths=[11.6*cm])
sys_tbl.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), NAVY),
    ("BACKGROUND", (0,1), (-1,-1), colors.HexColor("#FAFAFA")),
    ("TOPPADDING", (0,0), (-1,-1), 3),
    ("BOTTOMPADDING", (0,0), (-1,-1), 3),
    ("LEFTPADDING", (0,0), (-1,-1), 5),
    ("RIGHTPADDING", (0,0), (-1,-1), 5),
    ("BOX", (0,0), (-1,-1), 0.8, NAVY),
    ("GRID", (0,1), (-1,-1), 0.3, colors.HexColor("#DDDDDD")),
    ("VALIGN", (0,0), (-1,-1), "TOP"),
]))

bottom_row = Table([[emb_tbl, Spacer(0.4*cm, 1), sys_tbl]],
                   colWidths=[15.6*cm, 0.4*cm, 11.6*cm])
bottom_row.setStyle(TableStyle([
    ("VALIGN", (0,0), (-1,-1), "TOP"),
    ("LEFTPADDING", (0,0), (-1,-1), 0),
    ("RIGHTPADDING", (0,0), (-1,-1), 0),
]))
story.append(bottom_row)

# ── Footer ────────────────────────────────────────────────────────────────────
story.append(Spacer(1, 0.2*cm))
footer = P("<i>Based on: Kanski's Clinical Ophthalmology &amp; Class 3-2 Lecture Notes  |  "
           "For educational use only  |  Always verify with current clinical guidelines</i>",
           S("ft", fontSize=6, textColor=colors.HexColor("#95A5A6"), fontName="Helvetica",
             alignment=TA_CENTER))
story.append(footer)

doc.build(story)
print("PDF created:", OUTPUT)
Running Command

python3 /home/daytona/workspace/retinal-occlusion-pdf/build_pdf.py

Your PDF is ready:

Retinal Occlusion Quick Reference

PDF Document · PDF


What's inside (2 landscape A4 pages):
Page 1 - Master Comparison Table covering all 5 conditions (Non-ischaemic CRVO, Ischaemic CRVO, BRVO, BRAO, CRAO) across 14 rows:
  • Pathology, Onset, Visual Acuity, RAPD, Haemorrhages, Fundus Signs, NVI/NVG Risk, Complications, Aetiology, Investigations, Treatment of macular oedema, Treatment of neovascularization, Emergency treatment, Prognosis
  • Color-coded: Venous (red tones) vs Arterial (navy/orange tones)
Page 2 - Clinical Pearls & Management
  • 4 individual panels with bullet-point key facts for each condition
  • Embolus types table (Hollenhorst / calcific / platelet-fibrin)
  • Systemic management checklist applicable to all RVO/RAO
  • Full abbreviations footnote

Crvo and Crao

Asking for Preferences
Here is a focused comparison table of CRVO vs CRAO:

CRVO vs CRAO - Comparison Table

FeatureNon-ischaemic CRVOIschaemic CRVOCRAO
TypeVenous occlusionVenous occlusionArterial occlusion
PathologyPartial venous stasis; capillaries intactSevere capillary closure; retinal hypoxiaEmbolic/thrombotic block of central retinal artery
Most Common CauseHypertension, glaucoma, ageSame, more severe vascular diseaseEmboli (Hollenhorst, calcific, platelet-fibrin); atherosclerosis; GCA
OnsetSudden, painless, monocular VA lossSudden, severe, painless (pain if NVG develops)Sudden, profound, painless (painful if GCA)
Visual AcuityVariable; often 6/60 or betterCounting fingers (CF) or worseSeverely reduced; may be preserved if cilioretinal artery is patent
RAPDAbsent or mildPresentProfound / total (amaurotic pupil)
HaemorrhagesDot, blot, flame in ALL 4 quadrants (mild-moderate)Extensive blot + flame in ALL 4 quadrants (severe)Occasional small haemorrhage; emboli visible in 20%
Venous ChangesTortuosity + dilatation of all CRV branchesSevere tortuosity + engorgement of all branchesNo venous changes (arterial disease)
Cotton Wool SpotsPresent, generally mildProminentNot typical
DiscMild disc oedemaSwollen, hyperaemic discPeripapillary retina swollen and opaque
MacularMacular oedema (mild-moderate)Macular ischaemia (major cause of blindness)Pale oedematous retina
Pathognomonic SignPIRW (perivenular ischaemic retinal whitening) in young patients-Cherry-red spot at macula
NVI / Rubeosis IridisAbsent~50% by 2-4 months ("100-day glaucoma")Rare
Neovascular GlaucomaLow riskHigh riskRare
GonioscopyNot routineRequired at EVERY follow-up visitNot routine
Resolution TimeSigns resolve over monthsAcute signs resolve over 9-12 monthsInfarction complete within hours
Prognosis~50% return to normal/near-normal visionExtremely poor; macular ischaemia usualVery poor unless treated within hours
Emergency?NoUrgent if NVG developsYES - ocular emergency
Treatment - MacularAnti-VEGF or Ozurdex implantAnti-VEGF or Ozurdex implant; laser NOT effectiveN/A (not an oedema condition)
Treatment - NVPRP if progresses to ischaemicPRP without delay for NVI/NVG + Anti-VEGF adjunctN/A
Emergency Treatment-Urgent PRP / anti-VEGF if NVGOcular massage, AC paracentesis, IOP lowering (timolol, apraclonidine, IV acetazolamide), carbogen, mannitol, supine posture, thrombolysis
Systemic RxBP, lipids, glucose, ESR, FBCSame + gonioscopy monitoringURGENT carotid Doppler, ECHO, ECG; ESR/CRP (exclude GCA); antiplatelet; carotid endarterectomy if stenosis >70%
Stroke RiskLowLowHIGH in first few days
Key InvestigationsBP, FBC, ESR/PV, glucose, lipids, protein electrophoresisSame + gonioscopy at each visitAdd: urgent carotid Doppler, ECHO, ECG, ESR/CRP

Quick Memory Hooks

CRVOCRAO
VesselVeinArtery
BloodToo much (haemorrhages everywhere)Too little (pale retina)
Classic signDilated tortuous veins in all quadrantsCherry-red spot
Worst fear100-day glaucoma (NVG from rubeosis)Irreversible infarction within hours
Time pressureDays-weeks for NV monitoringMinutes-hours for reperfusion
GCA linkNoYes - always exclude

Key differentiator at a glance:
  • CRVO = blood everywhere (haemorrhages all 4 quadrants, engorged veins) - "stormy fundus"
  • CRAO = blood nowhere (pale white retina, cherry-red spot) - "silent/white fundus"
This is a shared conversation. Sign in to Orris to start your own chat.