What you can do
Prepare a PPT on Macular function test and Macular dystrophy
macular function tests ophthalmology Amsler grid photostress ERG comprehensive
macular dystrophy types Stargardt Best vitelliform Sorsby pattern dystrophy classification management 2024
macular function tests potential acuity meter laser interferometry two-point discrimination entoptic phenomenon ophthalmology
https://www.ncbi.nlm.nih.gov/books/NBK587444/
Amsler grid macular function test metamorphopsia
Stargardt disease fundus fluorescein angiography silent choroid
Best vitelliform macular dystrophy egg yolk stages
mkdir -p /home/daytona/workspace/macular-ppt && ls /home/daytona/workspace/macul…
~/macular-ppt/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Macular Function Tests & Macular Dystrophy";
pres.author = "Ophthalmology Residency Education";
// ─── COLOR PALETTE ───────────────────────────────────────────────
const C = {
navy: "0A2342", // dominant dark background
teal: "1B7F79", // section accent
gold: "F4A623", // highlight / accent
white: "FFFFFF",
offWhite:"E8F0F7",
slate: "3A506B",
light: "BDD5EA",
red: "D94F3D",
green: "2E8B57",
gray: "8899AA",
};
// ─── HELPERS ─────────────────────────────────────────────────────
function titleSlide(slide, title, subtitle) {
// Full-bleed navy background
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.navy} });
// Gold accent bar
slide.addShape(pres.ShapeType.rect, { x:0, y:3.8, w:"100%", h:0.06, fill:{color:C.gold} });
// Decorative side element
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.25, h:"100%", fill:{color:C.teal} });
slide.addText(title, {
x:0.5, y:1.5, w:9, h:1.8,
fontSize:40, bold:true, color:C.white, fontFace:"Calibri",
align:"center", valign:"middle"
});
if (subtitle) {
slide.addText(subtitle, {
x:0.5, y:3.5, w:9, h:0.8,
fontSize:18, color:C.light, fontFace:"Calibri",
align:"center", italic:true
});
}
slide.addText("Ophthalmology Residency Education | 2026", {
x:0.5, y:5.1, w:9, h:0.4,
fontSize:12, color:C.gray, fontFace:"Calibri", align:"center"
});
}
function sectionHeader(slide, sectionNum, sectionTitle, sectionSub) {
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.teal} });
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:0.12, fill:{color:C.gold} });
slide.addShape(pres.ShapeType.rect, { x:0, y:5.5, w:"100%", h:0.125, fill:{color:C.gold} });
slide.addText(`SECTION ${sectionNum}`, {
x:0.5, y:1.2, w:9, h:0.5,
fontSize:16, color:C.gold, bold:true, charSpacing:5,
fontFace:"Calibri", align:"center"
});
slide.addText(sectionTitle, {
x:0.5, y:1.9, w:9, h:1.5,
fontSize:38, bold:true, color:C.white, fontFace:"Calibri",
align:"center", valign:"middle"
});
if (sectionSub) {
slide.addText(sectionSub, {
x:0.5, y:3.6, w:9, h:0.8,
fontSize:18, color:C.light, fontFace:"Calibri",
align:"center"
});
}
}
function contentSlide(slide, heading, bullets, opts={}) {
// Background
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.offWhite} });
// Left accent bar
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.18, h:"100%", fill:{color:C.navy} });
// Header strip
slide.addShape(pres.ShapeType.rect, { x:0.18, y:0, w:9.82, h:1.0, fill:{color:C.navy} });
slide.addText(heading, {
x:0.35, y:0, w:9.5, h:1.0,
fontSize:22, bold:true, color:C.white, fontFace:"Calibri",
valign:"middle", margin:0
});
// Gold accent underline
slide.addShape(pres.ShapeType.rect, { x:0.18, y:1.0, w:9.82, h:0.05, fill:{color:C.gold} });
const items = bullets.map((b, i) => {
if (typeof b === "string") {
return { text: b, options: { bullet:{type:"bullet"}, color:C.navy, fontSize:opts.fontSize||17, fontFace:"Calibri", paraSpaceAfter:6, breakLine: i < bullets.length-1 } };
} else {
// {text, sub:true, bold:true, color}
return { text: b.text, options: { bullet: b.sub ? {indent:30} : {type:"bullet"}, color: b.color||C.slate, fontSize: b.sub ? (opts.fontSize||17)-2 : (opts.fontSize||17), bold: b.bold||false, italic: b.italic||false, fontFace:"Calibri", paraSpaceAfter: b.sub?3:6, breakLine: i < bullets.length-1 } };
}
});
slide.addText(items, {
x:0.4, y:1.1, w:9.4, h:4.4,
valign:"top", margin:[8,4,4,10]
});
}
function twoColSlide(slide, heading, leftHead, leftBullets, rightHead, rightBullets) {
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.offWhite} });
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.18, h:"100%", fill:{color:C.navy} });
slide.addShape(pres.ShapeType.rect, { x:0.18, y:0, w:9.82, h:0.9, fill:{color:C.navy} });
slide.addText(heading, {
x:0.35, y:0, w:9.5, h:0.9,
fontSize:22, bold:true, color:C.white, fontFace:"Calibri", valign:"middle", margin:0
});
slide.addShape(pres.ShapeType.rect, { x:0.18, y:0.9, w:9.82, h:0.05, fill:{color:C.gold} });
// Left col header
slide.addShape(pres.ShapeType.rect, { x:0.3, y:1.05, w:4.5, h:0.45, fill:{color:C.teal}, line:{color:C.teal} });
slide.addText(leftHead, { x:0.3, y:1.05, w:4.5, h:0.45, fontSize:14, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
// Right col header
slide.addShape(pres.ShapeType.rect, { x:5.1, y:1.05, w:4.6, h:0.45, fill:{color:C.teal} });
slide.addText(rightHead, { x:5.1, y:1.05, w:4.6, h:0.45, fontSize:14, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
// Divider
slide.addShape(pres.ShapeType.line, { x:4.97, y:1.1, w:0, h:4.3, line:{color:C.gold, width:1.5, dashType:"dash"} });
const makeItems = (arr) => arr.map((b, i) => {
if (typeof b === "string") return { text:b, options:{bullet:{type:"bullet"}, color:C.navy, fontSize:15, fontFace:"Calibri", paraSpaceAfter:5, breakLine: i < arr.length-1}};
return { text:b.text, options:{bullet: b.sub?{indent:20}:{type:"bullet"}, color:b.color||C.slate, fontSize:b.sub?13:15, bold:b.bold||false, fontFace:"Calibri", paraSpaceAfter:b.sub?2:5, breakLine: i < arr.length-1}};
});
slide.addText(makeItems(leftBullets), { x:0.3, y:1.6, w:4.5, h:3.9, valign:"top", margin:[4,2,2,8] });
slide.addText(makeItems(rightBullets), { x:5.1, y:1.6, w:4.6, h:3.9, valign:"top", margin:[4,2,2,8] });
}
function tableSlide(slide, heading, headers, rows, colW) {
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.navy} });
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.18, h:"100%", fill:{color:C.gold} });
slide.addText(heading, {
x:0.35, y:0.1, w:9.5, h:0.7,
fontSize:24, bold:true, color:C.white, fontFace:"Calibri", valign:"middle", margin:0
});
slide.addShape(pres.ShapeType.rect, { x:0.18, y:0.8, w:9.62, h:0.04, fill:{color:C.gold} });
const tableData = [
headers.map(h => ({ text: h, options: { bold:true, color:C.navy, fill:C.gold, fontSize:13, fontFace:"Calibri", align:"center" }})),
...rows.map((row, ri) => row.map(cell => ({ text: cell, options: { color:C.white, fill: ri%2===0 ? "0D2D4E" : "143355", fontSize:12, fontFace:"Calibri", align:"center" }})))
];
slide.addTable(tableData, {
x:0.25, y:0.9, w:9.5,
colW: colW,
border:{ pt:0.5, color:"1B7F79" },
rowH:0.52
});
}
function imageSlide(slide, heading, imgUrl, caption, bullets) {
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.offWhite} });
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.18, h:"100%", fill:{color:C.navy} });
slide.addShape(pres.ShapeType.rect, { x:0.18, y:0, w:9.82, h:0.9, fill:{color:C.navy} });
slide.addText(heading, {
x:0.35, y:0, w:9.5, h:0.9,
fontSize:22, bold:true, color:C.white, fontFace:"Calibri", valign:"middle", margin:0
});
slide.addShape(pres.ShapeType.rect, { x:0.18, y:0.9, w:9.82, h:0.05, fill:{color:C.gold} });
if (imgUrl) {
try {
slide.addImage({ path: imgUrl, x:0.3, y:1.05, w:4.4, h:3.6 });
} catch(e) {}
}
if (caption) {
slide.addText(caption, { x:0.3, y:4.7, w:4.4, h:0.6, fontSize:11, italic:true, color:C.gray, fontFace:"Calibri", align:"center" });
}
if (bullets) {
const items = bullets.map((b, i) => typeof b === "string"
? { text:b, options:{bullet:{type:"bullet"}, color:C.navy, fontSize:15, fontFace:"Calibri", paraSpaceAfter:6, breakLine: i < bullets.length-1}}
: { text:b.text, options:{bullet:b.sub?{indent:20}:{type:"bullet"}, color:b.color||C.slate, fontSize:b.sub?13:15, bold:b.bold||false, fontFace:"Calibri", paraSpaceAfter:b.sub?3:6, breakLine: i < bullets.length-1}});
slide.addText(items, { x:4.9, y:1.05, w:4.9, h:4.2, valign:"top", margin:[4,4,4,10] });
}
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ══════════════════════════════════════════════════════════════════
let s = pres.addSlide();
titleSlide(s,
"Macular Function Tests\n& Macular Dystrophy",
"A Comprehensive Review for Ophthalmology Residents"
);
// ══════════════════════════════════════════════════════════════════
// SLIDE 2 — OVERVIEW / TABLE OF CONTENTS
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
slide2 = s;
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.navy} });
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.18, h:"100%", fill:{color:C.gold} });
s.addText("Lecture Overview", {
x:0.4, y:0.15, w:9.4, h:0.7,
fontSize:26, bold:true, color:C.white, fontFace:"Calibri"
});
s.addShape(pres.ShapeType.rect, { x:0.18, y:0.85, w:9.62, h:0.04, fill:{color:C.gold} });
const sections = [
["01", "Anatomy of the Macula — a quick review"],
["02", "Macular Function Tests — classification & overview"],
["03", "Psychophysical Tests — Amsler, Photostress, Two-Point, Maddox Rod"],
["04", "Electrophysiological Tests — ERG, EOG, VEP"],
["05", "Tests for Potential Vision — PAM, Laser Interferometry, Entoptic"],
["06", "Microperimetry & OCT-based Functional Assessment"],
["07", "Introduction to Macular Dystrophies"],
["08", "Stargardt Disease"],
["09", "Best Vitelliform Macular Dystrophy"],
["10", "Other Dystrophies: Pattern, Sorsby, North Carolina, Cone"],
["11", "Investigations & Management"],
];
sections.forEach(([num, title], i) => {
const col = i < 6 ? 0 : 1;
const row = i < 6 ? i : i - 6;
const x = col === 0 ? 0.4 : 5.3;
const y = 1.0 + row * 0.68;
s.addShape(pres.ShapeType.rect, { x:x, y:y, w:0.5, h:0.45, fill:{color:C.teal} });
s.addText(num, { x:x, y:y, w:0.5, h:0.45, fontSize:13, bold:true, color:C.gold, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
s.addText(title, { x:x+0.6, y:y+0.04, w:4.2, h:0.38, fontSize:13, color:C.light, fontFace:"Calibri", valign:"middle" });
});
// ══════════════════════════════════════════════════════════════════
// SLIDE 3 — MACULA ANATOMY
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
contentSlide(s, "Anatomy of the Macula — Quick Review", [
{text:"Definition", bold:true, color:C.teal},
{text:"Specialised area of central retina, ~5.5 mm diameter, centred at the fovea (~4 mm temporal to optic disc)", sub:true},
{text:"Histological definition: retinal area with > 2 layers of ganglion cells", sub:true},
{text:"Zones (centre outward)", bold:true, color:C.teal},
{text:"Foveola (0.35 mm) — cone-only, thinnest retina, highest acuity", sub:true},
{text:"Fovea centralis (1.5 mm) — includes foveola + surrounding slope", sub:true},
{text:"Parafovea (2.5 mm) — densest ganglion cells", sub:true},
{text:"Perifovea (5.5 mm) — outer boundary of macula", sub:true},
{text:"Key structural features", bold:true, color:C.teal},
{text:"Xanthophyll pigment (lutein + zeaxanthin) — protects against phototoxicity", sub:true},
{text:"Retinal pigment epithelium (RPE) — essential for photoreceptor support & visual cycle", sub:true},
{text:"Bruch's membrane separates RPE from choriocapillaris", sub:true},
{text:"Müller cells form foveal pit structure", sub:true},
{text:"Clinical importance", bold:true, color:C.teal},
{text:"Responsible for central vision, colour vision, fine detail discrimination", sub:true},
{text:"Damage → central scotoma, metamorphopsia, reduced Snellen acuity", sub:true},
]);
// ══════════════════════════════════════════════════════════════════
// SLIDE 4 — SECTION HEADER: MACULAR FUNCTION TESTS
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
sectionHeader(s, "01", "Macular Function Tests", "Classification & Clinical Rationale");
// ══════════════════════════════════════════════════════════════════
// SLIDE 5 — CLASSIFICATION OF MFTs
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
tableSlide(s,
"Classification of Macular Function Tests",
["Category", "Test", "Media Opacity?", "Primary Use"],
[
["Psychophysical", "Amsler Grid", "Clear / mild", "Detect metamorphopsia, scotoma"],
["Psychophysical", "Photostress Test", "Clear / mild", "Macular vs optic nerve disease"],
["Psychophysical", "Two-Point Discrimination", "Clear", "Gross macular screen"],
["Psychophysical", "Maddox Rod Test", "Clear", "Metamorphopsia assessment"],
["Electrophysiological", "Full-Field ERG", "Any", "Retinal function, dystrophies"],
["Electrophysiological", "Multifocal ERG (mfERG)", "Clear", "Localised macular function"],
["Electrophysiological", "Electrooculogram (EOG)", "Any", "RPE function (Best disease)"],
["Electrophysiological", "Visual Evoked Potential (VEP)", "Any", "Cortical visual pathway"],
["Potential Vision", "Potential Acuity Meter (PAM)", "Dense cataract", "Pre-op acuity prediction"],
["Potential Vision", "Laser Interferometry", "Dense cataract", "Pre-op acuity prediction"],
["Potential Vision", "Entoptic Phenomena", "Any", "Gross retinal function"],
["Special", "Microperimetry (MP-1, MAIA)", "Clear", "Retinal sensitivity mapping"],
],
[2.1, 2.2, 1.5, 3.7]
);
// ══════════════════════════════════════════════════════════════════
// SLIDE 6 — AMSLER GRID
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
twoColSlide(s,
"Amsler Grid",
"Technique",
[
"7 variants (white, red, dotted, etc.); Chart I (standard) most used",
"Held at 33 cm from eye (covers central 20° of visual field)",
"Patient wears near correction; one eye at a time",
"Room lighting adequate; avoid pre-test bright illumination (photostress effect)",
"Patient fixates central dot and reports any distortion or missing areas",
"Mark defects on chart for serial monitoring",
{text:"Results:", bold:true},
{text:"Normal: all lines straight, all squares equal, central dot visible", sub:true},
{text:"Metamorphopsia: lines appear wavy/distorted", sub:true},
{text:"Scotoma: area appears missing/blurred", sub:true},
{text:"Micropsia/macropsia: squares appear smaller/larger", sub:true},
],
"Clinical Points",
[
{text:"Indications", bold:true},
{text:"Diagnosis & monitoring of macular disease (AMD, CRVO, CSR, dystrophies)", sub:true},
{text:"Pre-op macular screen before cataract surgery", sub:true},
{text:"Home monitoring in AMD — daily use recommended (AAO)", sub:true},
{text:"Limitations", bold:true},
{text:"Low sensitivity for small central scotomata", sub:true},
{text:"Better eye may suppress defect in binocular testing", sub:true},
{text:"False negatives in patients with poor fixation", sub:true},
{text:"Cannot quantify size or depth of scotoma reliably", sub:true},
{text:"Alternatives", bold:true},
{text:"M-charts (quantify metamorphopsia)", sub:true},
{text:"PreView PHP — computerised version", sub:true},
{text:"Microperimetry for precise mapping", sub:true},
]
);
// ══════════════════════════════════════════════════════════════════
// SLIDE 7 — PHOTOSTRESS TEST
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
contentSlide(s, "Photostress Recovery Test (PSRT)", [
{text:"Principle", bold:true, color:C.teal},
{text:"Bright light bleaches macular photopigments → transient scotoma", sub:true},
{text:"PSRT = time for visual acuity to return to baseline after photostress", sub:true},
{text:"Dependent on: RPE–photoreceptor regeneration of visual pigment (11-cis-retinal cycle)", sub:true},
{text:"Technique", bold:true, color:C.teal},
{text:"Record baseline BCVA in each eye separately", sub:true},
{text:"Direct bright penlight at eye for 10 seconds at 5 cm from cornea", sub:true},
{text:"Time taken for VA to recover to within 1 line of baseline = PSRT", sub:true},
{text:"Normal PSRT: ≤ 50 seconds; Abnormal: > 60–90 seconds", sub:true},
{text:"Interpretation", bold:true, color:C.teal},
{text:"Prolonged PSRT (>50 s) → macular disease (AMD, CSCR, macular dystrophy, macular oedema)", sub:true, color:C.red},
{text:"Normal PSRT (≤50 s) with poor VA → optic nerve disease or media opacity", sub:true, color:C.green},
{text:"Independent of media opacity; test only retinal function", sub:true},
{text:"Clinical value: differentiates macular vs. optic nerve aetiology of vision loss", sub:true},
{text:"Limitations", bold:true, color:C.teal},
{text:"Subjective; requires patient cooperation", sub:true},
{text:"Not reliable in dense media opacities", sub:true},
{text:"Cannot localise the lesion; over-predicts recovery in optic neuropathies", sub:true},
]);
// ══════════════════════════════════════════════════════════════════
// SLIDE 8 — TWO-POINT DISCRIMINATION + MADDOX ROD + ENTOPTIC
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
contentSlide(s, "Other Psychophysical & Gross Macular Tests", [
{text:"Two-Point Discrimination Test", bold:true, color:C.teal},
{text:"Two 2-mm lights held 5 cm apart at 60 cm — patient identifies if 2 separate lights seen", sub:true},
{text:"Normal: two separate lights perceived → adequate macular function", sub:true},
{text:"Good for children/uncooperative patients; requires clear media", sub:true},
{text:"Maddox Rod Test (for metamorphopsia)", bold:true, color:C.teal},
{text:"Maddox rod held before eye — converts point source of light into a streak", sub:true},
{text:"Normal: streak appears straight; Metamorphopsia: streak appears wavy/bent", sub:true},
{text:"Can be combined with Hess chart for quantification", sub:true},
{text:"Entoptic Phenomena", bold:true, color:C.teal},
{text:"Haidinger brush: rotating bowtie pattern seen with polarised blue light → intact foveal cone function", sub:true},
{text:"Blue field entoptic (Scheerer's phenomenon): small bright corpuscles darting across field → intact macular blood flow & retinal function; >15 corpuscles = normal", sub:true},
{text:"Retinal vascular arborisation shadow: shadow of retinal vessels seen in bright diffuse illumination; absent or poor = poor macular function", sub:true},
{text:"Useful when media is too opaque for direct visualisation", sub:true},
{text:"Colour Vision Testing", bold:true, color:C.teal},
{text:"Ishihara, Farnsworth-Munsell 100-Hue, City University — detect colour axis of defect", sub:true},
{text:"Important screening tool in cone dystrophies, Stargardt, chloroquine toxicity", sub:true},
]);
// ══════════════════════════════════════════════════════════════════
// SLIDE 9 — ELECTROPHYSIOLOGY (ERG/EOG/VEP)
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
tableSlide(s,
"Electrophysiological Tests — ERG, EOG, VEP",
["Test", "What It Measures", "Key Finding in Macular Disease", "Clinical Application"],
[
["Full-Field ERG\n(ffERG)", "Mass retinal response (photoreceptors + bipolar cells)", "Often normal in isolated macular dystrophies\n(affects <5% retinal area)", "Cone vs rod dysfunction;\nEstablish disease extent"],
["Pattern ERG\n(PERG)", "Macular / ganglion cell function\n(P50 & N95 waves)", "P50 reduced/absent in macular dystrophy;\nN95 affected in optic nerve disease", "Differentiates macular\nfrom optic nerve origin"],
["Multifocal ERG\n(mfERG)", "Local retinal sensitivity\nacross central 50°", "Localised amplitude reduction\nover dystrophic area", "Best functional map\nof macular lesions"],
["Electrooculogram\n(EOG)", "RPE function\n(Arden ratio = light peak/dark trough)", "Arden ratio <1.5 = subnormal;\nHallmark of Best disease", "MANDATORY in suspected\nBest vitelliform dystrophy"],
["Visual Evoked\nPotential (VEP)", "Cortical response from\nentire visual pathway", "Reduced amplitude / delayed\nP100 in macular dysfunction", "Rule out cortical or\noptic pathway disease"],
],
[1.9, 2.3, 2.3, 2.5]
);
// ══════════════════════════════════════════════════════════════════
// SLIDE 10 — PAM + LASER INTERFEROMETRY
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
twoColSlide(s,
"Tests for Potential Vision (Opaque Media)",
"Potential Acuity Meter (PAM)",
[
"Projects miniature Snellen chart through a tiny clear area of cataract using +12D lens + bright light",
"Main components: bright source, miniature transilluminated chart",
"Pupil should be widely dilated; patient reads chart",
"Smallest line readable by ≥3 chars = potential acuity",
"Most accurate for VA ≥ 6/60",
{text:"Advantage: easy, familiar Snellen format", sub:true},
{text:"Limitation: over-estimates acuity in dense/posterior subcapsular cataract; unreliable in macular disease", sub:true, color:C.red},
{text:"Pre-cataract surgical counselling", bold:true},
{text:"Warn patients if macular pathology likely to limit outcome", sub:true},
],
"Laser Interferometry (Retinometer)",
[
"Two coherent laser beams (He-Ne, 632 nm) create interference fringes on retina bypassing optical media",
"Patient adjusts fringe spacing until just resolvable — correlates with grating acuity",
"Not dependent on refractive error or optical quality of cornea/lens",
{text:"Advantage: penetrates dense cataracts; quantitative", sub:true},
{text:"Limitation: over-predicts potential in amblyopia; fails in total cataract (no light transmission)", sub:true, color:C.red},
{text:"Comparison of PAM vs Interferometry", bold:true},
{text:"PAM: better for moderate-severe cataract with retained VA ≥ 6/60", sub:true},
{text:"Interferometry: better for dense posterior subcapsular cataract", sub:true},
{text:"Both: false optimism if dense macular disease co-exists", sub:true, color:C.red},
]
);
// ══════════════════════════════════════════════════════════════════
// SLIDE 11 — MICROPERIMETRY
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
contentSlide(s, "Microperimetry — Fundus-Related Visual Field Testing", [
{text:"Principle", bold:true, color:C.teal},
{text:"Combines fundus imaging (SLO) with automated perimetry — each stimulus precisely located on fundus image", sub:true},
{text:"Measures retinal sensitivity (dB) at defined retinal loci with simultaneous fixation tracking", sub:true},
{text:"Instruments: MP-1 (Nidek), MAIA (Centervue), Spectralis (Heidelberg) — all differ in SLO vs colour image, testing protocols", sub:true},
{text:"Parameters Measured", bold:true, color:C.teal},
{text:"Macular sensitivity: normal foveal threshold ≥ 25–27 dB", sub:true},
{text:"Fixation stability: PRL (Preferred Retinal Locus), BCEA (Bivariate Contour Ellipse Area)", sub:true},
{text:"Fixation location: foveal vs para-foveal — important in macular atrophy", sub:true},
{text:"Clinical Applications in Macular Dystrophy", bold:true, color:C.teal},
{text:"Characterise functional loss pattern in Stargardt, Best, cone dystrophy", sub:true},
{text:"Monitor disease progression and treatment response", sub:true},
{text:"Correlate structural OCT changes with functional deficit", sub:true},
{text:"Identify viable retina for potential gene therapy targeting", sub:true},
{text:"Rehabilitation: guide eccentric viewing training using preferred retinal locus data", sub:true},
{text:"Advantages over Standard Perimetry", bold:true, color:C.teal},
{text:"Direct structure–function correlation; patient fixation does not affect accuracy", sub:true},
{text:"Suitable for patients with unstable/eccentric fixation — a common problem in macular dystrophies", sub:true},
]);
// ══════════════════════════════════════════════════════════════════
// SLIDE 12 — SECTION HEADER: MACULAR DYSTROPHY
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
sectionHeader(s, "02", "Macular Dystrophies", "Classification, Clinical Features & Management");
// ══════════════════════════════════════════════════════════════════
// SLIDE 13 — INTRODUCTION TO MACULAR DYSTROPHIES
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
contentSlide(s, "Macular Dystrophies — Introduction & Classification", [
{text:"Definition", bold:true, color:C.teal},
{text:"Inherited genetic disorders causing progressive, bilateral, symmetric macular degeneration", sub:true},
{text:"Distinct from AMD: earlier onset, genetic basis, no systemic vascular risk factors", sub:true},
{text:"Key presenting features", bold:true, color:C.teal},
{text:"Central vision loss (scotoma) with preserved peripheral vision", sub:true},
{text:"Colour vision defects (especially in cone dystrophies)", sub:true},
{text:"Metamorphopsia (distortion) with macular deposits/accumulation", sub:true},
{text:"Often bilateral but asymmetric in early stages", sub:true},
{text:"Classification by primary layer involved", bold:true, color:C.teal},
{text:"Photoreceptor layer: Stargardt (ABCA4), Cone Dystrophy, Cone-Rod Dystrophy", sub:true},
{text:"RPE layer: Best Vitelliform (BEST1), Pattern Dystrophies (PRPH2)", sub:true},
{text:"Bruch's membrane / RPE-choriocapillaris: Sorsby fundus dystrophy (TIMP3), Familial Drusen (EFEMP1)", sub:true},
{text:"Complex / unknown: North Carolina Macular Dystrophy (PRDM13)", sub:true},
{text:"Important investigations for all macular dystrophies", bold:true, color:C.teal},
{text:"BCVA, colour vision, Amsler grid, fundus photography, FAF, OCT, FA, ERG, EOG, genetic testing", sub:true},
]);
// ══════════════════════════════════════════════════════════════════
// SLIDE 14 — STARGARDT DISEASE
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
contentSlide(s, "Stargardt Disease (STGD1) — Most Common Juvenile Macular Dystrophy", [
{text:"Epidemiology & Genetics", bold:true, color:C.teal},
{text:"Most common inherited macular dystrophy; prevalence 1:8,000–10,000", sub:true},
{text:"STGD1 (AR): ABCA4 gene mutation (chr 1p) → defective clearance of retinoid by-products → lipofuscin accumulation in RPE", sub:true},
{text:"STGD3 (AD): ELOVL4 gene; STGD4 (AD): PROM1 gene (rare)", sub:true},
{text:"Clinical Features", bold:true, color:C.teal},
{text:"Onset: childhood–young adulthood (typically < 25 yrs); vision loss disproportionate to fundus findings early on", sub:true},
{text:"Bilateral, symmetric central vision loss; central scotoma", sub:true},
{text:"Colour vision frequently impaired", sub:true},
{text:"Fundoscopy findings", bold:true, color:C.teal},
{text:"Early: normal-appearing fundus or subtle foveal granularity", sub:true},
{text:"Pisciform (fish-tail) yellow-white flecks at level of RPE — pathognomonic", sub:true},
{text:"'Beaten-bronze' or 'beaten-metal' macular appearance", sub:true},
{text:"Bull's-eye maculopathy; geographic atrophy in advanced disease", sub:true},
{text:"Prognosis", bold:true, color:C.teal},
{text:"VA often deteriorates to 6/60 or worse; once < 6/12 tends to worsen rapidly", sub:true},
{text:"ERG: normal early, may become abnormal late; cone-rod pattern in some", sub:true},
]);
// ══════════════════════════════════════════════════════════════════
// SLIDE 15 — STARGARDT INVESTIGATIONS
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
twoColSlide(s,
"Stargardt Disease — Investigations",
"Imaging Findings",
[
{text:"Fluorescein Angiography (FA)", bold:true},
{text:"'Silent choroid' (dark choroid) — PATHOGNOMONIC in ~80%", sub:true, color:C.gold},
{text:"Choroidal fluorescence blocked by lipofuscin in RPE", sub:true},
{text:"Macular hyperfluorescence (window defect) in atrophic areas", sub:true},
{text:"Fundus Autofluorescence (FAF)", bold:true},
{text:"Hyperautofluorescent flecks = lipofuscin accumulation", sub:true},
{text:"Hypoautofluorescent areas = RPE/photoreceptor atrophy", sub:true},
{text:"OCT", bold:true},
{text:"Outer retinal atrophy, ellipsoid zone disruption, RPE loss", sub:true},
{text:"Hyperreflective deposits in outer retina", sub:true},
{text:"Adaptive Optics + Wide-Field Imaging", bold:true},
{text:"Demonstrate peripheral fleck extension in some patients", sub:true},
],
"Electrophysiology & Genetics",
[
{text:"ERG Groups (Fishman classification)", bold:true},
{text:"Group 1 (normal ffERG): isolated macular disease, best prognosis", sub:true, color:C.green},
{text:"Group 2 (abnormal cone ERG): cone-rod pattern, intermediate", sub:true},
{text:"Group 3 (abnormal rod + cone ERG): panretinal disease, worst prognosis", sub:true, color:C.red},
{text:"Pattern ERG: reduced P50 amplitude", sub:true},
{text:"EOG: can be subnormal", sub:true},
{text:"Genetic Testing", bold:true},
{text:"ABCA4 panel sequencing — confirms diagnosis, aids counselling", sub:true},
{text:"Allows classification A–D by mutation severity", sub:true},
{text:"Differential Diagnosis", bold:true},
{text:"AMD (older patients, no flecks)", sub:true},
{text:"Chloroquine/hydroxychloroquine toxicity", sub:true},
{text:"Cone dystrophy, bull's-eye maculopathy", sub:true},
{text:"Fundus albipunctatus (stationary, peripheral dots)", sub:true},
]
);
// ══════════════════════════════════════════════════════════════════
// SLIDE 16 — BEST VITELLIFORM MACULAR DYSTROPHY
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
contentSlide(s, "Best Vitelliform Macular Dystrophy (BVMD)", [
{text:"Genetics & Pathogenesis", bold:true, color:C.teal},
{text:"BEST1 gene (chr 11q13) — encodes bestrophin: Ca²⁺-activated Cl⁻ channel in RPE", sub:true},
{text:"Autosomal dominant with variable penetrance & expressivity", sub:true},
{text:"2nd most common macular dystrophy after Stargardt disease", sub:true},
{text:"Defective bestrophin → impaired fluid transport → lipofuscin-like material accumulates subretinally", sub:true},
{text:"Stages (Gass Classification)", bold:true, color:C.teal},
{text:"Stage 1 — Pre-vitelliform: subnormal EOG, normal fundus; asymptomatic", sub:true},
{text:"Stage 2 — Vitelliform: classic 'sunny-side-up egg yolk' yellow macular lesion (0.5–2 DD)", sub:true, color:C.gold},
{text:"Stage 3 — Pseudohypopyon: material gravitates inferiorly → horizontal level", sub:true},
{text:"Stage 4 — Vitelliruptive: lesion breaks up, 'scrambled egg'; vision begins to deteriorate", sub:true},
{text:"Stage 5 — Atrophic: RPE + photoreceptor atrophy; significant VA loss", sub:true, color:C.red},
{text:"Stage 6 — Fibrovascular scar (if MNV develops)", sub:true, color:C.red},
{text:"Electrophysiology — KEY DIAGNOSTIC FINDING", bold:true, color:C.teal},
{text:"EOG: grossly subnormal Arden ratio < 1.5 at ALL stages — even in carriers with normal fundus", sub:true, color:C.gold},
{text:"ERG: usually normal (differentiates from extensive retinal disease)", sub:true},
]);
// ══════════════════════════════════════════════════════════════════
// SLIDE 17 — BEST DISEASE INVESTIGATIONS
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
contentSlide(s, "Best Disease — Investigations & Management", [
{text:"Investigations", bold:true, color:C.teal},
{text:"EOG: Arden ratio < 1.5 — pathognomonic; abnormal even in pre-vitelliform carriers", sub:true, color:C.gold},
{text:"FAF: vitelliform material = intensely hyperautofluorescent; atrophic stage = hypoautofluorescent", sub:true},
{text:"FA: hypofluorescence of vitelliform lesion (masking); hyperfluorescence in window defects", sub:true},
{text:"OCT: subretinal dome-shaped hyperreflective material above RPE; fluid-filled space in pseudohypopyon", sub:true},
{text:"Genetic testing: BEST1 sequencing — essential for family counselling; also tests for PRPH2, IMPG2 (AOVMD)", sub:true},
{text:"Prognosis", bold:true, color:C.teal},
{text:"Usually good until middle age; one or both eyes may deteriorate due to atrophy or MNV", sub:true},
{text:"Visual acuity often preserved until vitelliruptive/atrophic stage", sub:true},
{text:"~20% develop choroidal neovascularisation (MNV) → anti-VEGF indicated", sub:true},
{text:"Management", bold:true, color:C.teal},
{text:"No proven treatment for the underlying disease currently", sub:true},
{text:"Anti-VEGF (ranibizumab, aflibercept, bevacizumab) for complicating MNV", sub:true},
{text:"Low vision aids, genetic counselling, annual monitoring", sub:true},
{text:"Gene therapy trials ongoing (BEST1-targeted AAV vectors)", sub:true},
{text:"Adult-Onset Vitelliform (AOVMD)", bold:true, color:C.teal},
{text:"Similar yellow foveal deposits in patients > 40 yrs; normal EOG; mutations in PRPH2, IMPG2 or BEST1", sub:true},
]);
// ══════════════════════════════════════════════════════════════════
// SLIDE 18 — PATTERN DYSTROPHIES + SORSBY
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
twoColSlide(s,
"Pattern Dystrophies & Sorsby Fundus Dystrophy",
"Pattern Dystrophies of the RPE",
[
"Heterogeneous group of AD macular diseases",
"PRPH2 (peripherin/RDS) gene mutations — chr 6p21",
"Onset: 4th–6th decade; generally mild vision loss",
{text:"Types:", bold:true},
{text:"Butterfly-shaped dystrophy (triradiate pigment at fovea)", sub:true},
{text:"Reticular (fishnet) dystrophy", sub:true},
{text:"Adult-onset foveomacular vitelliform (AOVMD)", sub:true},
{text:"Fundus pulverulentus", sub:true},
{text:"Multifocal pattern dystrophy simulating Stargardt", sub:true},
"EOG: normal (unlike Best) — important differential",
"ERG: normal",
"OCT: subretinal deposits, outer retinal disruption",
"Treatment: supportive; anti-VEGF for complicating MNV",
],
"Sorsby Fundus Dystrophy",
[
"TIMP3 gene mutation (chr 22q) — AD",
"Defective TIMP3 → abnormal Bruch's membrane metabolism",
"Onset: 4th–5th decade",
{text:"Features:", bold:true},
{text:"Bilateral symmetric subretinal drusenoid deposits", sub:true},
{text:"Central vision loss + nyctalopia (night blindness)", sub:true},
{text:"Extensive choroidal neovascularisation common", sub:true},
{text:"Fundus: yellow-white peripheral deposits + macular scar", sub:true},
"ERG: subnormal rod and cone responses",
"EOG: subnormal",
"MRI of Bruch's: thickened, abnormal",
{text:"Treatment:", bold:true},
{text:"Vitamin A supplementation (high-dose) may slow RPE degeneration", sub:true},
{text:"Anti-VEGF for MNV", sub:true},
{text:"Differentiate from AMD: younger age, AD inheritance, peripheral deposits", sub:true, color:C.gold},
]
);
// ══════════════════════════════════════════════════════════════════
// SLIDE 19 — OTHER DYSTROPHIES
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
contentSlide(s, "Other Macular Dystrophies", [
{text:"North Carolina Macular Dystrophy (NCMD)", bold:true, color:C.teal},
{text:"PRDM13 gene, chr 6q; autosomal dominant; rare", sub:true},
{text:"Non-progressive; drusen-like macular & peripheral deposits from 1st decade", sub:true},
{text:"Grade 1: scattered yellow-white deposits; Grade 2: confluent macular deposits; Grade 3: atrophic macular coloboma", sub:true},
{text:"FAF: peripheral hyperautofluorescent streaks — characteristic; ERG: normal", sub:true},
{text:"Cone Dystrophy", bold:true, color:C.teal},
{text:"Pure cone photoreceptor dysfunction; AR, AD or X-linked", sub:true},
{text:"Onset: 1st–3rd decade; profound colour vision loss, severe photophobia, nystagmus", sub:true},
{text:"Bull's-eye maculopathy on fundus; dark adaptation normal", sub:true},
{text:"ERG: absent/severely reduced photopic (cone) response; scotopic (rod) response preserved", sub:true, color:C.gold},
{text:"Achromatopsia (congenital stationary cone dystrophy): CNGB3, CNGA3 mutations", sub:true},
{text:"Familial Dominant Drusen (Doyne Honeycomb / Malattia Leventinese)", bold:true, color:C.teal},
{text:"EFEMP1 gene (chr 2p16); AD; radially oriented macular drusen from 2nd decade", sub:true},
{text:"Honeycomb pattern with age; MNV in older patients; ERG normal, EOG subnormal late", sub:true},
{text:"Macular Corneal Dystrophy (note: CORNEAL, not retinal)", bold:true, color:C.teal},
{text:"CHST6 gene; AR stromal corneal dystrophy; cloudy stroma with ill-defined edges", sub:true},
{text:"Reduced vision due to corneal haze, not macular disease — important distinction!", sub:true, color:C.red},
]);
// ══════════════════════════════════════════════════════════════════
// SLIDE 20 — INVESTIGATION SUMMARY TABLE
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
tableSlide(s,
"Electrophysiology Summary — Macular Dystrophies",
["Disease", "ffERG", "Pattern ERG", "EOG (Arden)", "FAF", "Key Genetic Test"],
[
["Stargardt STGD1", "Normal early\n(Group 1)\nAbnormal late\n(Groups 2–3)", "Reduced P50", "Subnormal\n(may be normal)", "Hyper flecks\n+ hypo atrophy", "ABCA4"],
["Best Vitelliform", "Normal", "Normal", "SEVERELY subnormal\n< 1.5 (hallmark)", "Hyper vitelliform\nHypo atrophic", "BEST1"],
["Pattern Dystrophy", "Normal", "Normal or\nmildly reduced", "Normal\n(key differential)", "Variable pattern\ndeposits", "PRPH2"],
["Sorsby FD", "Subnormal\n(rod + cone)", "Reduced", "Subnormal", "Drusenoid\ndeposits", "TIMP3"],
["Cone Dystrophy", "Severely reduced\nphotopic only", "Reduced P50", "Normal", "Bull's-eye\nmaculopathy", "CNGB3, CNGA3\nGUCY2D etc"],
["North Carolina MD", "Normal", "Normal", "Normal", "Peripheral\nhyper streaks", "PRDM13"],
["Familial Drusen", "Normal", "Normal", "Subnormal\n(late)", "Drusen\nhyperauto", "EFEMP1"],
],
[2.2, 1.5, 1.5, 1.8, 1.5, 1.5]
);
// ══════════════════════════════════════════════════════════════════
// SLIDE 21 — MANAGEMENT OF MACULAR DYSTROPHIES
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
contentSlide(s, "Management of Macular Dystrophies — General Principles", [
{text:"No curative treatment currently available for most inherited macular dystrophies", bold:true, color:C.red},
{text:"Patient education", bold:true, color:C.teal},
{text:"Explain natural history and prognosis — crucial for informed decision-making", sub:true},
{text:"Avoid smoking — exacerbates oxidative RPE damage", sub:true},
{text:"UV-protective sunglasses — reduce phototoxic stress", sub:true},
{text:"Avoid vitamin A supplementation in ABCA4 diseases (increases A2E toxin in RPE)", sub:true, color:C.red},
{text:"Genetic counselling", bold:true, color:C.teal},
{text:"Confirm molecular diagnosis with comprehensive retinal gene panel", sub:true},
{text:"Determine inheritance pattern; counsel family members; consider reproductive options (PGT)", sub:true},
{text:"Symptomatic / supportive treatment", bold:true, color:C.teal},
{text:"Low vision aids: magnifiers, telescopic lenses, electronic devices (OrCam, tablet apps)", sub:true},
{text:"Anti-VEGF (ranibizumab, aflibercept) for complicating choroidal neovascularisation (MNV)", sub:true},
{text:"Emerging & investigational therapies", bold:true, color:C.teal},
{text:"Gene therapy (AAV vectors): RPGR, BEST1, CNGA3 — Phase I/II trials ongoing", sub:true},
{text:"Cell therapy: hESC-derived RPE (ASP7317) — Phase Ib trials in Stargardt (Astellas, 2024–25)", sub:true},
{text:"Pharmacology: Emixustat (visual cycle modulator, A2E reduction), deuterated vitamin A (ALK-001)", sub:true},
{text:"Optogenetics: ChR2 / ChrimsonR channelrhodopsin for late-stage photoreceptor loss", sub:true},
{text:"CRISPR/Cas9 gene editing: preclinical studies in ABCA4 and BEST1 models", sub:true},
]);
// ══════════════════════════════════════════════════════════════════
// SLIDE 22 — CLINICAL APPROACH ALGORITHM
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.navy} });
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.18, h:"100%", fill:{color:C.teal} });
s.addText("Clinical Approach to Suspected Macular Dystrophy", {
x:0.35, y:0.05, w:9.5, h:0.75,
fontSize:22, bold:true, color:C.white, fontFace:"Calibri", valign:"middle", margin:0
});
s.addShape(pres.ShapeType.rect, { x:0.18, y:0.8, w:9.62, h:0.04, fill:{color:C.gold} });
// Flowchart boxes
const boxes = [
{ x:3.5, y:0.95, w:3.5, h:0.5, text:"Central vision loss\n(young adult)", fill:C.teal },
{ x:3.5, y:1.65, w:3.5, h:0.5, text:"Complete history:\nfamily, onset, drugs, systemic", fill:"143355" },
{ x:3.5, y:2.35, w:3.5, h:0.5, text:"BCVA · Colour vision\nAmsler grid · Fundus exam", fill:"143355" },
{ x:3.5, y:3.05, w:3.5, h:0.5, text:"OCT · FAF · FA", fill:"143355" },
{ x:0.4, y:3.75, w:2.8, h:0.5, text:"ERG + EOG + VEP", fill:C.gold },
{ x:3.5, y:3.75, w:3.5, h:0.5, text:"Genetic panel\n(targeted or WES)", fill:"143355" },
{ x:6.7, y:3.75, w:2.8, h:0.5, text:"Microperimetry\n(functional mapping)", fill:C.gold },
{ x:3.5, y:4.55, w:3.5, h:0.5, text:"Diagnosis → Counselling\n→ Management plan", fill:C.teal },
];
boxes.forEach(b => {
s.addShape(pres.ShapeType.rect, { x:b.x, y:b.y, w:b.w, h:b.h, fill:{color:b.fill}, line:{color:C.gold, pt:1}, rectRadius:0.05 });
s.addText(b.text, { x:b.x, y:b.y, w:b.w, h:b.h, fontSize:12, bold:true, color:b.fill===C.gold?C.navy:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
});
// Arrows (as thin rectangles)
[[5.25,1.45,0.1,0.2],[5.25,2.15,0.1,0.2],[5.25,2.85,0.1,0.2],[5.25,3.55,0.1,0.2]].forEach(([x,y,w,h])=>{
s.addShape(pres.ShapeType.rect,{x,y,w,h,fill:{color:C.gold}});
});
// ══════════════════════════════════════════════════════════════════
// SLIDE 23 — KEY POINTS & EXAM PEARLS
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.navy} });
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.18, h:"100%", fill:{color:C.gold} });
s.addText("Key Points & Examination Pearls", {
x:0.35, y:0.05, w:9.5, h:0.75,
fontSize:24, bold:true, color:C.white, fontFace:"Calibri", valign:"middle"
});
s.addShape(pres.ShapeType.rect, { x:0.18, y:0.8, w:9.62, h:0.04, fill:{color:C.teal} });
const pearls = [
["Photostress test:", "Prolonged PSRT (>50 s) = macular disease; Normal PSRT with poor VA = optic nerve lesion"],
["EOG Arden < 1.5:", "Pathognomonic of Best vitelliform dystrophy — abnormal even before fundus changes appear"],
["Silent choroid on FA:", "~80% pathognomonic for Stargardt (ABCA4); lipofuscin blocks choroidal fluorescence"],
["ffERG normal:", "In macular dystrophies (isolated) — macular area is <5% of total retina"],
["Pattern ERG P50 ↓:", "Indicates macular ganglion cell / photoreceptor dysfunction — useful objective measure"],
["EOG normal in Pattern Dystrophies:", "Key differential from Best disease (same age group, similar deposits)"],
["Vitamin A avoidance:", "In ABCA4 Stargardt — vitamin A ↑ A2E formation → accelerated RPE toxicity"],
["NCMD:", "Non-progressive despite dramatic fundus appearance — do not over-treat"],
["Gene therapy outlook:", "ABCA4, BEST1, CNGB3 — active trials; genetic testing now standard of care"],
];
pearls.forEach(([key, val], i) => {
const y = 0.9 + i * 0.52;
s.addShape(pres.ShapeType.rect, { x:0.3, y:y, w:9.4, h:0.46, fill:{color: i%2===0 ? "0D2D4E" : "143355"}, line:{color:C.teal, pt:0.5} });
s.addText([
{ text: key + " ", options: { bold:true, color:C.gold, fontSize:13, fontFace:"Calibri" } },
{ text: val, options: { color:C.white, fontSize:13, fontFace:"Calibri" } }
], { x:0.4, y:y, w:9.2, h:0.46, valign:"middle", margin:[0,4,0,6] });
});
// ══════════════════════════════════════════════════════════════════
// SLIDE 24 — THANK YOU
// ══════════════════════════════════════════════════════════════════
s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.navy} });
s.addShape(pres.ShapeType.rect, { x:0, y:2.55, w:"100%", h:0.06, fill:{color:C.gold} });
s.addShape(pres.ShapeType.rect, { x:0, y:2.62, w:"100%", h:0.06, fill:{color:C.teal} });
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.25, h:"100%", fill:{color:C.teal} });
s.addText("Thank You", {
x:0.5, y:0.6, w:9, h:1.6,
fontSize:52, bold:true, color:C.white, fontFace:"Calibri", align:"center"
});
s.addText("Questions & Discussion", {
x:0.5, y:2.8, w:9, h:0.8,
fontSize:22, color:C.light, fontFace:"Calibri", align:"center", italic:true
});
s.addText([
{ text: "References: ", options:{bold:true, color:C.gold, fontSize:13} },
{ text: "Kanski's Clinical Ophthalmology 10e | Wills Eye Manual 8e | StatPearls NBK587444 | Review of Ophthalmology 2024", options:{color:C.gray, fontSize:13} }
], { x:0.5, y:4.2, w:9, h:0.8, align:"center", valign:"middle" });
// ══════════════════════════════════════════════════════════════════
// WRITE FILE
// ══════════════════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/macular-ppt/Macular_Function_Tests_and_Dystrophy.pptx" })
.then(() => console.log("✅ PPT created successfully"))
.catch(e => { console.error("❌ Error:", e); process.exit(1); });