Prepare a PPT on Macular function test and Macular dystrophy for Opthamology resident
macular function tests Amsler grid photostress test
Stargardt disease macular dystrophy fundus OCT
Best disease vitelliform macular dystrophy stages fundus
photostress recovery test macular disease
cone dystrophy bull's eye maculopathy fundus electroretinogram
ls -la /home/daytona/workspace/
mkdir -p /home/daytona/workspace/macular-ppt
~/macular-ppt/create_ppt.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
// Fetch images
const imageUrls = [
"https://cdn.orris.care/cdss_images/702d11afe37bacfe1e019aca9202b2a92503aa7a3914664b68e7717a24479f71.png", // Amsler grid
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_bda7d3cc7c4ab405353440511bf5b01c2083fbebe68951840ce57169033683a0.jpg", // Amsler + OCT ARMD
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_096a640920b3125ec8f8698f545f463180095bc92b208782135d6af256297d58.jpg", // Stargardt multimodal
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_abc68e92f3c4f878f0dca30ff81c0ef81eb7b22e704950490df07ac6ad638816.jpg", // Best disease stages
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_fbc0eb5c3b9d34f08ad430f41539b6c35bb71801ec474ebfe76097304e1079c2.jpg", // Best fundus bilateral
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_7684b793bddc7a8c60d01b69c94d046763d35acd80c6456a3f8359884fa62051.jpg", // Cone dystrophy vs macular dystrophy
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_0885c279310746a9bb102a5215323682f4ba530a050d9ae82f104178359340dd.jpg", // Bull's eye maculopathy
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_e1ea0adeacb316488e50ec5c5a24cb87a874b908c1376a9dadf98649f9ec30ae.jpg", // Microperimetry
];
console.log("Fetching images...");
let imgs;
try {
imgs = JSON.parse(execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ${imageUrls.map(u => `"${u}"`).join(" ")}`,
{ maxBuffer: 50 * 1024 * 1024, timeout: 60000 }
).toString());
} catch (e) {
console.error("Image fetch error:", e.message);
imgs = imageUrls.map(u => ({ url: u, base64: null, error: e.message }));
}
console.log("Images fetched:", imgs.map(i => i.error ? "FAILED" : "OK"));
// ─────── THEME ───────
const DARK_BG = "0D1F2D"; // deep navy
const MID_BG = "1A3245"; // medium navy
const ACCENT = "00B4D8"; // teal accent
const ACCENT2 = "90E0EF"; // light teal
const GOLD = "F4A261"; // warm gold
const WHITE = "FFFFFF";
const LIGHT_GRAY = "E0F2FE";
const TEXT_DARK = "1A1A2E";
let pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.author = "Ophthalmology Resident Education";
pres.title = "Macular Function Tests & Macular Dystrophy";
// ─────── HELPER: section header slide ───────
function sectionSlide(pres, title, subtitle) {
let s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 2.3, w: 10, h: 0.06, fill: { color: ACCENT } });
s.addText(title, {
x: 0.5, y: 1.5, w: 9, h: 1.2,
fontSize: 36, bold: true, color: WHITE, fontFace: "Calibri", align: "center"
});
if (subtitle) {
s.addText(subtitle, {
x: 0.5, y: 2.8, w: 9, h: 0.8,
fontSize: 18, color: ACCENT2, fontFace: "Calibri", align: "center", italic: true
});
}
return s;
}
// ─────── HELPER: content slide ───────
function contentSlide(pres, title, bullets, imgData, imgRight) {
let s = pres.addSlide();
// Background
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: MID_BG } });
// Title bar
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: DARK_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.68, w: 10, h: 0.05, fill: { color: ACCENT } });
s.addText(title, {
x: 0.3, y: 0.05, w: 9.4, h: 0.6,
fontSize: 22, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle"
});
const contentW = imgData ? 5.5 : 9.2;
const textItems = bullets.map((b, i) => ({
text: b.text,
options: {
bullet: b.sub ? { indent: 30 } : { indent: 15 },
breakLine: i < bullets.length - 1,
fontSize: b.sub ? 14 : 16,
color: b.sub ? ACCENT2 : WHITE,
bold: b.head || false,
fontFace: "Calibri",
}
}));
s.addText(textItems, {
x: 0.4, y: 0.85, w: contentW, h: 4.6,
valign: "top"
});
if (imgData && imgData.base64) {
s.addImage({
data: imgData.base64,
x: imgRight || 6.2, y: 0.85, w: 3.5, h: 4.4
});
}
return s;
}
// ─────── SLIDE 1: TITLE ───────
{
let s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 3.9, w: 10, h: 1.725, fill: { color: MID_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 3.88, w: 10, h: 0.06, fill: { color: ACCENT } });
s.addText("Macular Function Tests", {
x: 0.5, y: 0.6, w: 9, h: 1.1,
fontSize: 40, bold: true, color: WHITE, fontFace: "Calibri", align: "center"
});
s.addText("&", {
x: 0.5, y: 1.6, w: 9, h: 0.7,
fontSize: 32, bold: true, color: ACCENT, fontFace: "Calibri", align: "center"
});
s.addText("Macular Dystrophies", {
x: 0.5, y: 2.15, w: 9, h: 1.1,
fontSize: 40, bold: true, color: WHITE, fontFace: "Calibri", align: "center"
});
s.addShape(pres.shapes.RECTANGLE, { x: 3.5, y: 3.3, w: 3, h: 0.05, fill: { color: GOLD } });
s.addText("For Ophthalmology Residents", {
x: 0.5, y: 3.95, w: 9, h: 0.5,
fontSize: 18, color: ACCENT2, fontFace: "Calibri", align: "center", italic: true
});
s.addText("Kanski's Clinical Ophthalmology (10th Ed) | Wills Eye Manual", {
x: 0.5, y: 4.6, w: 9, h: 0.4,
fontSize: 12, color: ACCENT2, fontFace: "Calibri", align: "center"
});
}
// ─────── SLIDE 2: OVERVIEW ───────
{
let s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: MID_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.68, w: 10, h: 0.05, fill: { color: ACCENT } });
s.addText("Contents at a Glance", {
x: 0.3, y: 0.05, w: 9.4, h: 0.6,
fontSize: 22, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle"
});
const boxes = [
{ title: "PART A", sub: "Macular Function Tests", color: "003566", accent: ACCENT, x: 0.3, y: 1.0 },
{ title: "PART B", sub: "Macular Dystrophies", color: "3D0000", accent: GOLD, x: 5.2, y: 1.0 },
];
boxes.forEach(b => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: b.x, y: b.y, w: 4.5, h: 4.3,
fill: { color: b.color }, rectRadius: 0.15,
shadow: { type: "outer", color: "000000", blur: 8, offset: 3, angle: 135, opacity: 0.3 }
});
s.addShape(pres.shapes.RECTANGLE, { x: b.x, y: b.y, w: 4.5, h: 0.55, fill: { color: b.accent } });
s.addText(b.title, {
x: b.x + 0.1, y: b.y + 0.05, w: 4.3, h: 0.45,
fontSize: 16, bold: true, color: TEXT_DARK, fontFace: "Calibri", align: "center"
});
s.addText(b.sub, {
x: b.x + 0.1, y: b.y + 0.7, w: 4.3, h: 0.55,
fontSize: 15, bold: true, color: WHITE, fontFace: "Calibri", align: "center"
});
const items = b.title === "PART A" ?
["1. Amsler Grid", "2. Photostress Recovery Test", "3. Maddox Rod Test", "4. Entoptic Phenomena", "5. Macular Perimetry / Microperimetry", "6. EOG & ERG", "7. Colour Vision Tests", "8. Contrast Sensitivity"] :
["1. Stargardt Disease", "2. Best Vitelliform Dystrophy", "3. Pattern Dystrophy (RPE)", "4. North Carolina Macular Dystrophy", "5. Adult-onset Vitelliform Dystrophy", "6. Cone / Cone-Rod Dystrophy", "7. Sorsby Fundus Dystrophy"];
items.forEach((item, i) => {
s.addText(item, {
x: b.x + 0.3, y: b.y + 1.35 + i * 0.4,
w: 4.0, h: 0.38,
fontSize: 13, color: LIGHT_GRAY, fontFace: "Calibri"
});
});
});
}
// ─────── SECTION A HEADER ───────
sectionSlide(pres, "PART A: Macular Function Tests", "Clinical Assessment of Central Retinal Function");
// ─────── SLIDE: AMSLER GRID ───────
{
let s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: MID_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: DARK_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.68, w: 10, h: 0.05, fill: { color: ACCENT } });
s.addText("Amsler Grid", {
x: 0.3, y: 0.05, w: 9.4, h: 0.6,
fontSize: 22, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle"
});
const bullets = [
{ text: "Purpose", head: true },
{ text: "Detects central/paracentral scotoma & metamorphopsia", sub: true },
{ text: "Screens macular function (10° central visual field)", sub: true },
{ text: "Technique", head: true },
{ text: "Held 30 cm from eye; each eye tested separately", sub: true },
{ text: "Patient fixates central dot; reports missing or wavy lines", sub: true },
{ text: "Patient marks distorted/missing areas with pencil", sub: true },
{ text: "Red grid detects more subtle defects", sub: true },
{ text: "Interpretation", head: true },
{ text: "Central scotoma → failure to see central dot", sub: true },
{ text: "Metamorphopsia → wavy/distorted lines (macular edema, CNV)", sub: true },
{ text: "Positive scotoma → missing boxes in grid", sub: true },
{ text: "Limitation: Poor sensitivity; patient may fill in gaps mentally", sub: true },
];
const textItems = bullets.map((b, i) => ({
text: b.text,
options: {
bullet: b.sub ? { indent: 30 } : false,
breakLine: i < bullets.length - 1,
fontSize: b.sub ? 14 : 16,
color: b.sub ? LIGHT_GRAY : GOLD,
bold: b.head || false,
fontFace: "Calibri",
}
}));
s.addText(textItems, { x: 0.4, y: 0.85, w: 5.5, h: 4.6, valign: "top" });
if (imgs[0] && imgs[0].base64) {
s.addImage({ data: imgs[0].base64, x: 6.1, y: 0.85, w: 3.5, h: 3.5 });
s.addText("Fig. A.4.1 Amsler Grid\n(Wills Eye Manual)", {
x: 6.1, y: 4.35, w: 3.5, h: 0.6,
fontSize: 11, color: ACCENT2, fontFace: "Calibri", italic: true, align: "center"
});
}
}
// ─────── SLIDE: AMSLER GRID CLINICAL USE ───────
{
let s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: MID_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: DARK_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.68, w: 10, h: 0.05, fill: { color: ACCENT } });
s.addText("Amsler Grid – Clinical Correlation", {
x: 0.3, y: 0.05, w: 9.4, h: 0.6,
fontSize: 22, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle"
});
if (imgs[1] && imgs[1].base64) {
s.addImage({ data: imgs[1].base64, x: 0.3, y: 0.85, w: 5.5, h: 4.5 });
}
const notes = [
{ text: "Panel (a):", head: true },
{ text: "Amsler grid with patient-drawn wavy lines (metamorphopsia) in superior-nasal quadrant — typical CNV/ARMD", sub: true },
{ text: "Panel (b):", head: true },
{ text: "FAF showing pinpoint hypoautofluorescence corresponding to the area of distortion", sub: true },
{ text: "Panels (c–d):", head: true },
{ text: "SLO & SD-OCT revealing focal choroidal elevation (FCE) with ellipsoid zone disruption correlating with metamorphopsia", sub: true },
{ text: "Clinical Pearl:", head: true },
{ text: "Amsler grid changes should always prompt OCT ± FFA to rule out CNV", sub: true },
];
const textItems = notes.map((b, i) => ({
text: b.text,
options: {
bullet: b.sub ? { indent: 25 } : false,
breakLine: i < notes.length - 1,
fontSize: b.sub ? 13 : 15,
color: b.sub ? LIGHT_GRAY : GOLD,
bold: b.head || false,
fontFace: "Calibri",
}
}));
s.addText(textItems, { x: 6.0, y: 0.85, w: 3.8, h: 4.6, valign: "top" });
s.addText("Source: PMC Clinical VQA (Wills Eye / Kanski)", {
x: 0.3, y: 5.2, w: 6, h: 0.3,
fontSize: 10, color: ACCENT2, fontFace: "Calibri", italic: true
});
}
// ─────── SLIDE: PHOTOSTRESS TEST ───────
contentSlide(pres, "Photostress Recovery Test (PSRT)", [
{ text: "Principle", head: true },
{ text: "Bleaches macular photopigment with bright light; measures recovery time", sub: true },
{ text: "Depends on RPE integrity → best test for macular vs optic nerve disease", sub: true },
{ text: "Technique", head: true },
{ text: "Best-corrected VA recorded; contralateral eye occluded", sub: true },
{ text: "Bright penlight 3 cm from eye for 10 seconds", sub: true },
{ text: "Time measured until patient can read letters 1 line above best VA", sub: true },
{ text: "Normal: ≤ 50 seconds", sub: true },
{ text: "Interpretation", head: true },
{ text: "Prolonged (> 60 sec): Macular disease (e.g. AMD, CSR, maculopathy)", sub: true },
{ text: "Normal recovery: Optic nerve disease (e.g. optic neuritis)", sub: true },
{ text: "KEY use: Differentiates macular from optic nerve pathology", head: true },
], null);
// ─────── SLIDE: OTHER MACULAR FUNCTION TESTS ───────
contentSlide(pres, "Other Clinical Macular Function Tests", [
{ text: "Maddox Rod Test", head: true },
{ text: "Detects metamorphopsia — patient sees distorted streak rather than straight line", sub: true },
{ text: "Useful for subtle macular distortion not detected by Amsler", sub: true },
{ text: "Entoptic Phenomena", head: true },
{ text: "Blue field entoptoscopy: sees own WBCs in macular capillaries", sub: true },
{ text: "Haidinger brushes: detects Henle fibre layer integrity", sub: true },
{ text: "Watzke–Allen Test", head: true },
{ text: "Narrow slit beam over macular hole centre — patient reports thinning/break = FTMH", sub: true },
{ text: "Normal macular tissue: distorted beam of uniform thickness", sub: true },
{ text: "Colour Vision Tests", head: true },
{ text: "Ishihara (red-green defect), Farnsworth D-15, HRR plates", sub: true },
{ text: "Acquired red-green: macular disease; Blue-yellow (tritan): optic nerve / glaucoma", sub: true },
{ text: "Contrast Sensitivity Testing", head: true },
{ text: "Pelli-Robson chart — sensitive early loss in maculopathies even when VA is good", sub: true },
], null);
// ─────── SLIDE: MICROPERIMETRY ───────
{
let s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: MID_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: DARK_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.68, w: 10, h: 0.05, fill: { color: ACCENT } });
s.addText("Macular Perimetry / Microperimetry (MP)", {
x: 0.3, y: 0.05, w: 9.4, h: 0.6,
fontSize: 22, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle"
});
if (imgs[7] && imgs[7].base64) {
s.addImage({ data: imgs[7].base64, x: 0.2, y: 0.85, w: 5.8, h: 4.5 });
}
const notes = [
{ text: "Definition", head: true },
{ text: "Fundus-controlled perimetry that maps retinal sensitivity point-by-point on the macula", sub: true },
{ text: "Advantages", head: true },
{ text: "Correlates function with anatomy (OCT overlay)", sub: true },
{ text: "Tracks fixation stability — critical for low vision rehab", sub: true },
{ text: "Quantifies progression of scotoma (dB loss)", sub: true },
{ text: "Uses", head: true },
{ text: "AMD monitoring, Stargardt progression, macular hole follow-up", sub: true },
{ text: "Devices: MAIA, MP-3 (Nidek), MP-1", sub: true },
];
const textItems = notes.map((b, i) => ({
text: b.text,
options: {
bullet: b.sub ? { indent: 25 } : false,
breakLine: i < notes.length - 1,
fontSize: b.sub ? 13 : 15,
color: b.sub ? LIGHT_GRAY : GOLD,
bold: b.head || false,
fontFace: "Calibri",
}
}));
s.addText(textItems, { x: 6.1, y: 0.85, w: 3.7, h: 4.6, valign: "top" });
}
// ─────── SLIDE: ERG & EOG ───────
contentSlide(pres, "Electrophysiology: ERG & EOG in Macular Function", [
{ text: "Full-Field ERG (ffERG)", head: true },
{ text: "Measures global retinal function; usually NORMAL in isolated macular disease", sub: true },
{ text: "Helps differentiate macular vs. diffuse retinal dystrophy (e.g., cone dystrophy)", sub: true },
{ text: "Pattern ERG (PERG)", head: true },
{ text: "Specifically tests macular (P50 wave) and RGC (N95 wave) function", sub: true },
{ text: "Best electrophysiological test for macular function", sub: true },
{ text: "Reduced P50: macular dysfunction; Reduced N95 with normal P50: optic nerve", sub: true },
{ text: "Electro-Oculogram (EOG)", head: true },
{ text: "Measures RPE function (Arden ratio = light peak / dark trough)", sub: true },
{ text: "Normal Arden ratio: > 1.85", sub: true },
{ text: "Severely subnormal (< 1.5) in ALL stages of Best disease — even carriers", sub: true },
{ text: "Multifocal ERG (mfERG)", head: true },
{ text: "Maps cone function across central 20°; useful for macular dystrophies", sub: true },
], null);
// ─────── SECTION B HEADER ───────
sectionSlide(pres, "PART B: Macular Dystrophies", "Inherited Disorders of the Macula");
// ─────── SLIDE: CLASSIFICATION ───────
contentSlide(pres, "Classification of Macular Dystrophies", [
{ text: "Photoreceptor-Primary", head: true },
{ text: "Stargardt disease / Fundus Flavimaculatus (ABCA4)", sub: true },
{ text: "Cone dystrophy / Cone-Rod Dystrophy", sub: true },
{ text: "Sorsby Fundus Dystrophy (TIMP3)", sub: true },
{ text: "RPE-Primary", head: true },
{ text: "Best Vitelliform Macular Dystrophy (BEST1)", sub: true },
{ text: "Pattern Dystrophy of RPE (PRPH2/RDS)", sub: true },
{ text: "Adult-onset Vitelliform (Foveomacular Vitelliform) Dystrophy", sub: true },
{ text: "Bietti Crystalline Corneoretinal Dystrophy (CYP4V2)", sub: true },
{ text: "Photoreceptor + RPE", head: true },
{ text: "North Carolina Macular Dystrophy (MCDR1)", sub: true },
{ text: "Central Areolar Choroidal Dystrophy (PRPH2)", sub: true },
{ text: "Inheritance", head: true },
{ text: "AD: Best, Pattern, NCMD, Sorsby | AR: Stargardt (ABCA4) | X-linked rare", sub: true },
], null);
// ─────── SLIDE: STARGARDT ───────
{
let s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: MID_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: DARK_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.68, w: 10, h: 0.05, fill: { color: ACCENT } });
s.addText("Stargardt Disease (STGD1 / Fundus Flavimaculatus)", {
x: 0.3, y: 0.05, w: 9.4, h: 0.6,
fontSize: 20, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle"
});
const left = [
{ text: "Genetics", head: true },
{ text: "ABCA4 gene mutation (AR) — most common inherited macular dystrophy", sub: true },
{ text: "Chromosome 1p22; leads to lipofuscin accumulation in RPE", sub: true },
{ text: "Symptoms", head: true },
{ text: "Gradual central vision loss in children/young adults (6–20 yrs)", sub: true },
{ text: "Colour desaturation, central scotoma", sub: true },
{ text: "Fundus Signs", head: true },
{ text: "Snail-slime / beaten-bronze macular appearance → geographic atrophy", sub: true },
{ text: "Yellow-white pisciform (fish-shaped) flecks at RPE level", sub: true },
{ text: "Investigations", head: true },
{ text: "FAF: Hyperautofluorescent flecks + macular hypoautofluorescence", sub: true },
{ text: "FA: 'Dark choroid' (lipofuscin masks choroidal fluorescence)", sub: true },
{ text: "OCT: Outer retinal atrophy, loss of EZ", sub: true },
{ text: "ERG: Photopic normal to subnormal; EOG subnormal in advanced cases", sub: true },
];
const textItems = left.map((b, i) => ({
text: b.text,
options: {
bullet: b.sub ? { indent: 20 } : false,
breakLine: i < left.length - 1,
fontSize: b.sub ? 12 : 14,
color: b.sub ? LIGHT_GRAY : GOLD,
bold: b.head || false,
fontFace: "Calibri",
}
}));
s.addText(textItems, { x: 0.4, y: 0.85, w: 5.5, h: 4.6, valign: "top" });
if (imgs[2] && imgs[2].base64) {
s.addImage({ data: imgs[2].base64, x: 6.0, y: 0.85, w: 3.7, h: 3.8 });
s.addText("Multimodal imaging: FAF + OCT\n(ABCA4 Stargardt disease)", {
x: 6.0, y: 4.7, w: 3.7, h: 0.55,
fontSize: 10, color: ACCENT2, fontFace: "Calibri", italic: true, align: "center"
});
}
}
// ─────── SLIDE: STARGARDT MANAGEMENT ───────
contentSlide(pres, "Stargardt Disease – Management & Prognosis", [
{ text: "No curative treatment currently available", head: true },
{ text: "Genetic counselling: AR inheritance; both parents carriers typically asymptomatic", sub: true },
{ text: "Sun protection", head: true },
{ text: "UV-blocking spectacles — high-energy light may accelerate lipofuscin accumulation", sub: true },
{ text: "AVOID Vitamin A supplementation — accelerates lipofuscin accumulation!", sub: true },
{ text: "Low Vision Aids & Rehabilitation", head: true },
{ text: "Magnification, eccentric viewing training, orientation & mobility", sub: true },
{ text: "Emerging Therapies (Clinical Trials)", head: true },
{ text: "Gene therapy: lentiviral vector for ABCA4 gene", sub: true },
{ text: "Stem cell therapy: RPE cell replacement", sub: true },
{ text: "Pharmacotherapy: Reduce lipofuscin accumulation (e.g. emixustat)", sub: true },
{ text: "Metformin (oral) — under investigation", sub: true },
{ text: "Prognosis", head: true },
{ text: "Variable; most patients reach legal blindness by 4th–5th decade", sub: true },
{ text: "Peripheral and night vision generally preserved", sub: true },
], null);
// ─────── SLIDE: BEST DISEASE ───────
{
let s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: MID_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: DARK_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.68, w: 10, h: 0.05, fill: { color: GOLD } });
s.addText("Best Vitelliform Macular Dystrophy (BVMD)", {
x: 0.3, y: 0.05, w: 9.4, h: 0.6,
fontSize: 20, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle"
});
const left = [
{ text: "Genetics", head: true },
{ text: "BEST1 (bestrophin) gene mutation, AD, variable penetrance", sub: true },
{ text: "Chromosome 11q13; bestrophin = RPE transmembrane ion channel", sub: true },
{ text: "2nd most common macular dystrophy after Stargardt", sub: true },
{ text: "Stages (Gass Classification)", head: true },
{ text: "1. Previtelliform — Normal fundus; subnormal EOG", sub: true },
{ text: "2. Vitelliform — 'Egg yolk' round lesion; VA often intact", sub: true },
{ text: "3. Pseudohypopyon — Lesion settles inferiorly", sub: true },
{ text: "4. Vitelliruptive — 'Scrambled egg'; VA drops", sub: true },
{ text: "5. Atrophic — RPE atrophy; ± macular neovascularisation", sub: true },
{ text: "Key Investigation: EOG", head: true },
{ text: "Severely subnormal in ALL stages (Arden ratio < 1.5)", sub: true },
{ text: "Abnormal even in carriers with normal-looking fundi!", sub: true },
];
const textItems = left.map((b, i) => ({
text: b.text,
options: {
bullet: b.sub ? { indent: 20 } : false,
breakLine: i < left.length - 1,
fontSize: b.sub ? 12 : 14,
color: b.sub ? LIGHT_GRAY : GOLD,
bold: b.head || false,
fontFace: "Calibri",
}
}));
s.addText(textItems, { x: 0.4, y: 0.85, w: 5.2, h: 4.6, valign: "top" });
if (imgs[3] && imgs[3].base64) {
s.addImage({ data: imgs[3].base64, x: 5.8, y: 0.85, w: 3.9, h: 4.5 });
s.addText("BVMD stages (fundus + SD-OCT)", {
x: 5.8, y: 5.35, w: 3.9, h: 0.25,
fontSize: 10, color: ACCENT2, fontFace: "Calibri", italic: true, align: "center"
});
}
}
// ─────── SLIDE: BEST DISEASE INVESTIGATION ───────
{
let s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: MID_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: DARK_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.68, w: 10, h: 0.05, fill: { color: GOLD } });
s.addText("Best Disease – Investigations & Management", {
x: 0.3, y: 0.05, w: 9.4, h: 0.6,
fontSize: 20, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle"
});
const left = [
{ text: "Investigations", head: true },
{ text: "FAF: Intensely hyperautofluorescent vitelliform material → hypoAF in atrophic stage", sub: true },
{ text: "FA: Hypofluorescence (masking by vitelliform material)", sub: true },
{ text: "OCT: Material beneath / above / within RPE; subretinal fluid", sub: true },
{ text: "EOG: Severely subnormal (Arden ratio < 1.5) — hallmark investigation", sub: true },
{ text: "ERG: Usually normal (distinguishes from cone dystrophy)", sub: true },
{ text: "Genetics: BEST1 mutation testing", sub: true },
{ text: "Management", head: true },
{ text: "No proven treatment for the dystrophy itself", sub: true },
{ text: "Anti-VEGF injections for MNV (macular neovascularisation) complication", sub: true },
{ text: "Regular monitoring; genetic counselling for family members", sub: true },
{ text: "Prognosis: Usually good until middle age; vision declines with atrophy/MNV", sub: true },
];
const textItems = left.map((b, i) => ({
text: b.text,
options: {
bullet: b.sub ? { indent: 20 } : false,
breakLine: i < left.length - 1,
fontSize: b.sub ? 13 : 15,
color: b.sub ? LIGHT_GRAY : GOLD,
bold: b.head || false,
fontFace: "Calibri",
}
}));
s.addText(textItems, { x: 0.4, y: 0.85, w: 5.5, h: 4.6, valign: "top" });
if (imgs[4] && imgs[4].base64) {
s.addImage({ data: imgs[4].base64, x: 6.1, y: 0.85, w: 3.6, h: 4.5 });
s.addText("Bilateral BVMD — fundus\n(vitelliruptive → atrophic OS)", {
x: 6.1, y: 5.35, w: 3.6, h: 0.25,
fontSize: 10, color: ACCENT2, fontFace: "Calibri", italic: true, align: "center"
});
}
}
// ─────── SLIDE: PATTERN DYSTROPHY ───────
contentSlide(pres, "Pattern Dystrophy of the RPE", [
{ text: "Genetics", head: true },
{ text: "Autosomal dominant; PRPH2 gene (peripherin-2) on chromosome 6p21", sub: true },
{ text: "Lipofuscin accumulation in RPE; variable phenotypic expression", sub: true },
{ text: "Clinical Patterns", head: true },
{ text: "Butterfly-shaped: Yellowish spokes radiating from foveola", sub: true },
{ text: "Reticular / macroreticular: Net-like pigmented pattern", sub: true },
{ text: "Adult-onset foveomacular vitelliform: Small central yellow deposit", sub: true },
{ text: "Fundus pulverulentus: Dust-like RPE changes", sub: true },
{ text: "Symptoms & Onset", head: true },
{ text: "Mild visual impairment / metamorphopsia in early adulthood", sub: true },
{ text: "Many patients asymptomatic until middle age", sub: true },
{ text: "Investigations", head: true },
{ text: "FAF: Hyperautofluorescence of yellowish material", sub: true },
{ text: "EOG: Usually NORMAL (key distinction from Best disease)", sub: true },
{ text: "ERG: Normal", sub: true },
{ text: "Associations: PXE, myotonic dystrophy, Kjellin syndrome", sub: true },
], null);
// ─────── SLIDE: CONE / CONE-ROD DYSTROPHY ───────
{
let s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: MID_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: DARK_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.68, w: 10, h: 0.05, fill: { color: ACCENT } });
s.addText("Cone Dystrophy & Cone-Rod Dystrophy (CRD)", {
x: 0.3, y: 0.05, w: 9.4, h: 0.6,
fontSize: 20, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle"
});
const left = [
{ text: "Genetics", head: true },
{ text: "AD (GUCY2D, GUCA1A), AR, or X-linked (RPGR) — multiple genes", sub: true },
{ text: "Symptoms", head: true },
{ text: "Photophobia (bright light hypersensitivity)", sub: true },
{ text: "Reduced visual acuity + colour vision loss (acquired dyschromatopsia)", sub: true },
{ text: "Nystagmus in severe early-onset cases", sub: true },
{ text: "Fundus Signs", head: true },
{ text: "Bull's eye maculopathy: Central preserved island + ring of RPE atrophy", sub: true },
{ text: "Optic disc temporal pallor in advanced cases", sub: true },
{ text: "Bone-spicule pigmentation in periphery = cone-rod dystrophy", sub: true },
{ text: "Investigations", head: true },
{ text: "ffERG: Photopic severely attenuated / flat — KEY diagnostic finding", sub: true },
{ text: "Scotopic ERG: Normal (cone) or reduced (cone-rod)", sub: true },
{ text: "PERG: Reduced P50; FAF: Hypo-AF ring / bull's-eye pattern", sub: true },
{ text: "Colour vision: Severe acquired red-green AND blue-yellow loss", sub: true },
];
const textItems = left.map((b, i) => ({
text: b.text,
options: {
bullet: b.sub ? { indent: 20 } : false,
breakLine: i < left.length - 1,
fontSize: b.sub ? 12 : 14,
color: b.sub ? LIGHT_GRAY : GOLD,
bold: b.head || false,
fontFace: "Calibri",
}
}));
s.addText(textItems, { x: 0.4, y: 0.85, w: 5.3, h: 4.6, valign: "top" });
if (imgs[5] && imgs[5].base64) {
s.addImage({ data: imgs[5].base64, x: 5.9, y: 0.85, w: 3.8, h: 4.5 });
s.addText("ffERG: Cone dystophy vs Macular dystrophy\n(photopic selectively reduced in cone dystrophy)", {
x: 5.9, y: 5.35, w: 3.8, h: 0.25,
fontSize: 9, color: ACCENT2, fontFace: "Calibri", italic: true, align: "center"
});
}
}
// ─────── SLIDE: BULL'S EYE MACULOPATHY ───────
{
let s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: MID_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: DARK_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.68, w: 10, h: 0.05, fill: { color: ACCENT } });
s.addText("Bull's Eye Maculopathy — Differential Diagnosis", {
x: 0.3, y: 0.05, w: 9.4, h: 0.6,
fontSize: 20, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle"
});
if (imgs[6] && imgs[6].base64) {
s.addImage({ data: imgs[6].base64, x: 0.2, y: 0.85, w: 3.8, h: 3.8 });
s.addText("Bull's eye maculopathy (fundus):\ncentral dark spot + ring of RPE depigmentation", {
x: 0.2, y: 4.65, w: 3.8, h: 0.55,
fontSize: 10, color: ACCENT2, fontFace: "Calibri", italic: true, align: "center"
});
}
const diffItems = [
{ text: "Inherited / Dystrophic", head: true },
{ text: "Stargardt disease (ABCA4)", sub: true },
{ text: "Cone / Cone-rod dystrophy", sub: true },
{ text: "Benign concentric annular macular dystrophy", sub: true },
{ text: "Drug-Induced", head: true },
{ text: "Chloroquine / Hydroxychloroquine toxicity", sub: true },
{ text: "Deferoxamine toxicity", sub: true },
{ text: "Metabolic / Systemic", head: true },
{ text: "Spielmeyer-Vogt syndrome (Batten disease)", sub: true },
{ text: "Central areolar choroidal dystrophy", sub: true },
{ text: "Adult-onset foveomacular vitelliform dystrophy", sub: true },
];
const textItems = diffItems.map((b, i) => ({
text: b.text,
options: {
bullet: b.sub ? { indent: 20 } : false,
breakLine: i < diffItems.length - 1,
fontSize: b.sub ? 14 : 16,
color: b.sub ? LIGHT_GRAY : GOLD,
bold: b.head || false,
fontFace: "Calibri",
}
}));
s.addText(textItems, { x: 4.3, y: 0.85, w: 5.5, h: 4.6, valign: "top" });
}
// ─────── SLIDE: NORTH CAROLINA + SORSBY ───────
contentSlide(pres, "North Carolina Macular Dystrophy & Sorsby Fundus Dystrophy", [
{ text: "North Carolina Macular Dystrophy (NCMD)", head: true },
{ text: "Gene: MCDR1 locus (chromosome 6q16) — autosomal dominant, fully penetrant", sub: true },
{ text: "Non-progressive (stationary) despite severe early appearance", sub: true },
{ text: "Grade 1: Small, discrete drusen-like deposits", sub: true },
{ text: "Grade 2: Confluent macular drusen / pigment clumping", sub: true },
{ text: "Grade 3: Macular coloboma / geographic atrophy — visual loss variable", sub: true },
{ text: "Key Pearl: Non-progressive — reassurance after diagnosis important", sub: true },
{ text: "Sorsby Fundus Dystrophy (SFD)", head: true },
{ text: "Gene: TIMP3 (tissue inhibitor metalloproteinase-3) — AD", sub: true },
{ text: "Presents 4th–5th decade with drusen in macular + midperiphery", sub: true },
{ text: "Choroidal neovascularisation: major cause of vision loss", sub: true },
{ text: "ERG: Subnormal rod response (dark adaptation impairment)", sub: true },
{ text: "Vitamin A supplementation may improve dark adaptation in early stages", sub: true },
{ text: "Anti-VEGF therapy for CNV", sub: true },
], null);
// ─────── SLIDE: COMPARISON TABLE ───────
{
let s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: MID_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.68, w: 10, h: 0.05, fill: { color: ACCENT } });
s.addText("Macular Dystrophies — Comparison Summary", {
x: 0.3, y: 0.05, w: 9.4, h: 0.6,
fontSize: 20, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle"
});
const headers = ["Disease", "Gene", "Inherit.", "Key Fundus", "ERG", "EOG", "Key Pearl"];
const rows = [
["Stargardt", "ABCA4", "AR", "Pisciform flecks, dark choroid", "Photopic ↓", "Subnormal (adv)", "Avoid Vit A"],
["Best Vitelliform", "BEST1", "AD", "Egg-yolk lesion → scrambled", "Normal", "Severely ↓ (all stages)", "EOG hallmark"],
["Pattern Dystrophy", "PRPH2", "AD", "Butterfly / RPE deposits", "Normal", "Normal", "EOG normal ≠ Best"],
["Cone Dystrophy", "GUCY2D etc.", "AD/AR/XL", "Bull's-eye maculopathy", "Photopic ↓↓↓", "Variable", "Photophobia"],
["NCMD", "MCDR1", "AD", "Drusen → macular coloboma", "Normal", "Normal", "Non-progressive!"],
["Sorsby", "TIMP3", "AD", "Drusen + CNV", "Scotopic ↓", "Nl/↓", "Anti-VEGF for CNV"],
];
const COL_X = [0.08, 1.5, 2.65, 3.55, 5.5, 6.6, 7.7];
const COL_W = [1.4, 1.1, 0.9, 1.9, 1.1, 1.1, 2.1];
const ROW_H = 0.58;
const HDR_Y = 0.78;
// Header row
s.addShape(pres.shapes.RECTANGLE, { x: 0.05, y: HDR_Y, w: 9.9, h: ROW_H, fill: { color: "005F73" } });
headers.forEach((h, ci) => {
s.addText(h, {
x: COL_X[ci], y: HDR_Y + 0.04, w: COL_W[ci], h: ROW_H - 0.08,
fontSize: 11, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle"
});
});
rows.forEach((row, ri) => {
const ry = HDR_Y + ROW_H + ri * ROW_H;
const fillColor = ri % 2 === 0 ? "0A2E3D" : "0D3B50";
s.addShape(pres.shapes.RECTANGLE, { x: 0.05, y: ry, w: 9.9, h: ROW_H - 0.02, fill: { color: fillColor } });
row.forEach((cell, ci) => {
s.addText(cell, {
x: COL_X[ci], y: ry + 0.04, w: COL_W[ci], h: ROW_H - 0.1,
fontSize: ci === 0 ? 11 : 10,
bold: ci === 0,
color: ci === 6 ? GOLD : LIGHT_GRAY,
fontFace: "Calibri", align: "center", valign: "middle"
});
});
});
}
// ─────── SLIDE: KEY TAKE-HOME POINTS ───────
{
let s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: MID_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.68, w: 10, h: 0.05, fill: { color: GOLD } });
s.addText("Key Take-Home Points", {
x: 0.3, y: 0.05, w: 9.4, h: 0.6,
fontSize: 22, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle"
});
const points = [
{ num: "①", text: "Amsler Grid detects metamorphopsia / scotoma but has poor sensitivity — always correlate with OCT.", color: ACCENT2 },
{ num: "②", text: "PSRT distinguishes macular disease (prolonged) from optic nerve disease (normal).", color: ACCENT2 },
{ num: "③", text: "Pattern ERG (P50) is the best electrophysiological test for isolated macular function.", color: ACCENT2 },
{ num: "④", text: "EOG is the hallmark test for Best disease — severely subnormal in ALL stages including presymptomatic carriers.", color: GOLD },
{ num: "⑤", text: "Stargardt: Avoid Vitamin A. The 'dark choroid' on FA is pathognomonic.", color: GOLD },
{ num: "⑥", text: "Bull's eye maculopathy: Think Stargardt, Cone dystrophy, Hydroxychloroquine toxicity.", color: ACCENT2 },
{ num: "⑦", text: "ffERG photopic response selectively reduced/flat = Cone dystrophy (not isolated macular dystrophy).", color: GOLD },
{ num: "⑧", text: "NCMD is non-progressive despite dramatic fundus appearance — reassure patients.", color: ACCENT2 },
];
points.forEach((p, i) => {
const x = i < 4 ? 0.3 : 5.2;
const y = 0.85 + (i % 4) * 1.18;
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: x, y: y, w: 4.6, h: 1.1,
fill: { color: i < 4 ? "0D2E45" : "1A1A0A" },
rectRadius: 0.1
});
s.addText(p.num, {
x: x + 0.1, y: y + 0.05, w: 0.55, h: 1.0,
fontSize: 22, bold: true, color: p.color, fontFace: "Calibri", align: "center", valign: "middle"
});
s.addText(p.text, {
x: x + 0.7, y: y + 0.08, w: 3.75, h: 0.95,
fontSize: 12, color: WHITE, fontFace: "Calibri", valign: "middle"
});
});
}
// ─────── SLIDE: REFERENCES ───────
{
let s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: MID_BG } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.68, w: 10, h: 0.05, fill: { color: ACCENT } });
s.addText("References & Further Reading", {
x: 0.3, y: 0.05, w: 9.4, h: 0.6,
fontSize: 22, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle"
});
const refs = [
"1. Kanski JJ, Bowling B. Kanski's Clinical Ophthalmology: A Systematic Approach. 10th ed. Elsevier; 2020.",
"2. Ehlers JP, Shah CP (eds). The Wills Eye Manual: Office and Emergency Room Diagnosis and Treatment. 8th ed. Wolters Kluwer; 2022.",
"3. Michaelides M, Hunt DM, Moore AT. The genetics of inherited macular dystrophies. J Med Genet. 2003;40(9):641-650.",
"4. Khan KN et al. Clinical and genetic features of autosomal recessive Best vitelliform macular dystrophy. Ophthalmology. 2018.",
"5. Tanna P et al. Stargardt disease: clinical features, molecular genetics, animal models and therapeutic options. Br J Ophthalmol. 2017.",
"6. Robson AG, et al. ISCEV Standard for full-field clinical electroretinography (2022 update). Doc Ophthalmol. 2022.",
"7. Bach M et al. ISCEV standard for clinical pattern electroretinography (PERG): 2012 update. Doc Ophthalmol. 2013.",
"8. Boon CJ et al. The spectrum of ocular phenotypes caused by mutations in the BEST1 gene. Prog Retin Eye Res. 2009.",
];
refs.forEach((r, i) => {
s.addText(r, {
x: 0.4, y: 0.85 + i * 0.58, w: 9.2, h: 0.55,
fontSize: 12, color: i % 2 === 0 ? LIGHT_GRAY : ACCENT2, fontFace: "Calibri"
});
});
}
// ─────── WRITE FILE ───────
pres.writeFile({ fileName: "/home/daytona/workspace/macular-ppt/Macular_Function_Tests_and_Dystrophy.pptx" })
.then(() => console.log("PPT saved successfully!"))
.catch(e => console.error("Error saving:", e));
What do you mean
Create a PDF summary of macular dystrophy classification