prepare a chart with all details in one page on the topic of lacrimal sac syringing with diagram and made it attrective
lacrimal sac syringing procedure technique steps anatomy
https://www.eyedocs.co.uk/ophthalmology-articles/oculoplasti…
mkdir -p /home/daytona/workspace/lacrimal-chart && ls /home/daytona/workspace/lacrimal-chart/
~/lacrimal-chart/lacrimal_chart.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE"; // 13.3" x 7.5"
pres.title = "Lacrimal Sac Syringing";
const slide = pres.addSlide();
// ─── BACKGROUND ────────────────────────────────────────────────────────────
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 13.3, h: 7.5,
fill: { color: "0A1628" }
});
// Subtle decorative gradient band top
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 13.3, h: 0.85,
fill: { type: "solid", color: "1565C0" }
});
// Bottom band
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 7.1, w: 13.3, h: 0.4,
fill: { color: "1565C0" }
});
// ─── TITLE ─────────────────────────────────────────────────────────────────
slide.addText("LACRIMAL SAC SYRINGING", {
x: 0, y: 0.07, w: 13.3, h: 0.7,
align: "center", valign: "middle",
fontSize: 28, bold: true, color: "FFFFFF",
charSpacing: 4, fontFace: "Calibri"
});
// Eye icon decoration (unicode)
slide.addText("👁", {
x: 0.2, y: 0.08, w: 0.6, h: 0.6,
fontSize: 22, align: "center", valign: "middle"
});
slide.addText("👁", {
x: 12.5, y: 0.08, w: 0.6, h: 0.6,
fontSize: 22, align: "center", valign: "middle"
});
// ─── SUBTITLE BAR ──────────────────────────────────────────────────────────
slide.addText("A complete clinical reference for lacrimal system patency assessment & irrigation", {
x: 0, y: 0.78, w: 13.3, h: 0.28,
align: "center", fontSize: 9.5, color: "90CAF9",
fontFace: "Calibri", italic: true
});
// ─── LAYOUT HELPER ─────────────────────────────────────────────────────────
// The slide is divided into 5 columns-style sections across 3 rows
// ══════════════════════════════════════════════════════════════════
// ROW 1: Anatomy | Indications | Equipment
// ══════════════════════════════════════════════════════════════════
// ── CARD FUNCTION helper ────────────────────────────────────────
function addCard(slide, pres, x, y, w, h, headerColor, title, icon) {
// Card background
slide.addShape(pres.ShapeType.roundRect, {
x, y, w, h,
fill: { color: "0D2137" },
line: { color: headerColor, width: 1.5 },
rectRadius: 0.1
});
// Header bar
slide.addShape(pres.ShapeType.rect, {
x, y, w, h: 0.32,
fill: { color: headerColor }
});
// Title text
slide.addText(`${icon} ${title}`, {
x, y, w, h: 0.32,
align: "center", valign: "middle",
fontSize: 10.5, bold: true, color: "FFFFFF",
fontFace: "Calibri", margin: 0
});
}
// ── SECTION 1: ANATOMY (left col, row1) ────────────────────────
addCard(slide, pres, 0.15, 1.12, 4.0, 2.6, "1565C0", "ANATOMY OF THE LACRIMAL SYSTEM", "🔬");
const anatomyLines = [
{ text: "Puncta:", options: { bold: true, color: "64B5F6", breakLine: true } },
{ text: " Small openings on medial margins of upper & lower eyelids; 6mm from inner canthus", options: { color: "E3F2FD", breakLine: true } },
{ text: "Canaliculi:", options: { bold: true, color: "64B5F6", breakLine: true } },
{ text: " 2mm vertical + 8mm horizontal; upper & lower join as common canaliculus", options: { color: "E3F2FD", breakLine: true } },
{ text: "Lacrimal Sac:", options: { bold: true, color: "64B5F6", breakLine: true } },
{ text: " Lies in lacrimal fossa; fundus (3-5mm above MCT) + body (10mm below)", options: { color: "E3F2FD", breakLine: true } },
{ text: "Nasolacrimal Duct:", options: { bold: true, color: "64B5F6", breakLine: true } },
{ text: " 12-18mm long; drains into inferior meatus under valve of Hasner", options: { color: "E3F2FD", breakLine: false } },
];
slide.addText(anatomyLines, {
x: 0.25, y: 1.5, w: 3.8, h: 2.1,
fontSize: 8.0, fontFace: "Calibri", valign: "top", margin: 4
});
// ── SECTION 2: INDICATIONS (center col, row1) ─────────────────
addCard(slide, pres, 4.35, 1.12, 2.55, 2.6, "00838F", "INDICATIONS", "✅");
const indications = [
{ text: "• Epiphora (watery eye) investigation", options: { color: "E0F7FA", breakLine: true } },
{ text: "• Assess lacrimal patency", options: { color: "E0F7FA", breakLine: true } },
{ text: "• Determine level of obstruction", options: { color: "E0F7FA", breakLine: true } },
{ text: "• Flush debris from system", options: { color: "E0F7FA", breakLine: true } },
{ text: "• Pre-op DCR assessment", options: { color: "E0F7FA", breakLine: true } },
{ text: "• Administer antibiotics (dacryocystitis)", options: { color: "E0F7FA", breakLine: true } },
{ text: "• Dye tests (dacryocystogram)", options: { color: "E0F7FA", breakLine: false } },
];
slide.addText(indications, {
x: 4.45, y: 1.5, w: 2.35, h: 2.15,
fontSize: 8.5, fontFace: "Calibri", valign: "top", margin: 4
});
// ── SECTION 3: EQUIPMENT (right, row1) ────────────────────────
addCard(slide, pres, 7.1, 1.12, 2.55, 2.6, "6A1B9A", "EQUIPMENT REQUIRED", "🛠");
const equipment = [
{ text: "• Nettleship dilator (sterile)", options: { color: "F3E5F5", breakLine: true } },
{ text: "• Lacrimal cannula (sterile)", options: { color: "F3E5F5", breakLine: true } },
{ text: "• 2 mL sterile syringe", options: { color: "F3E5F5", breakLine: true } },
{ text: "• Normal saline solution", options: { color: "F3E5F5", breakLine: true } },
{ text: "• Local anaesthetic eye drops", options: { color: "F3E5F5", breakLine: true } },
{ text: "• Torch / overhead lamp", options: { color: "F3E5F5", breakLine: true } },
{ text: "• Magnification loupes (helpful)", options: { color: "F3E5F5", breakLine: true } },
{ text: "• Gauze / cotton wool, towel", options: { color: "F3E5F5", breakLine: true } },
{ text: "• Gloves (clean/sterile)", options: { color: "F3E5F5", breakLine: false } },
];
slide.addText(equipment, {
x: 7.2, y: 1.5, w: 2.35, h: 2.15,
fontSize: 8.5, fontFace: "Calibri", valign: "top", margin: 4
});
// ── SECTION 4: COMPLICATIONS (far right, row1) ────────────────
addCard(slide, pres, 9.85, 1.12, 3.3, 2.6, "B71C1C", "COMPLICATIONS", "⚠");
const complications = [
{ text: "• False passage (forceful cannulation)", options: { color: "FFEBEE", breakLine: true } },
{ text: "• Canalicular trauma / perforation", options: { color: "FFEBEE", breakLine: true } },
{ text: "• Punctal tearing", options: { color: "FFEBEE", breakLine: true } },
{ text: "• Infection spread (acute dacryocystitis)", options: { color: "FFEBEE", breakLine: true } },
{ text: "• Haemorrhage into lacrimal sac", options: { color: "FFEBEE", breakLine: true } },
{ text: "• Orbital cellulitis (rare)", options: { color: "FFEBEE", breakLine: true } },
{ text: "• Patient discomfort / vasovagal", options: { color: "FFEBEE", breakLine: false } },
];
slide.addText(complications, {
x: 9.95, y: 1.5, w: 3.1, h: 2.15,
fontSize: 8.5, fontFace: "Calibri", valign: "top", margin: 4
});
// ══════════════════════════════════════════════════════════════════
// ROW 2 LEFT: PROCEDURE STEPS (tall card, left side)
// ══════════════════════════════════════════════════════════════════
addCard(slide, pres, 0.15, 3.85, 4.0, 3.5, "F57F17", "STEP-BY-STEP PROCEDURE", "📋");
const steps = [
{ text: "1. Consent & Position", options: { bold: true, color: "FFF9C4", breakLine: true } },
{ text: " Explain procedure; position supine/reclined, head supported; towel across neck", options: { color: "FFFDE7", breakLine: true } },
{ text: "2. Anaesthesia", options: { bold: true, color: "FFF9C4", breakLine: true } },
{ text: " Instil topical LA drops over punctum; wait 30 seconds", options: { color: "FFFDE7", breakLine: true } },
{ text: "3. Dilate the Punctum", options: { bold: true, color: "FFF9C4", breakLine: true } },
{ text: " Evert lower lid; apply lateral traction; insert Nettleship dilator vertically 2mm, then rotate 90° horizontally", options: { color: "FFFDE7", breakLine: true } },
{ text: "4. Insert Lacrimal Cannula", options: { bold: true, color: "FFF9C4", breakLine: true } },
{ text: " Insert cannula tip into lower punctum; advance vertically 2mm then rotate 90° medially along canaliculus", options: { color: "FFFDE7", breakLine: true } },
{ text: "5. Advance to Stop", options: { bold: true, color: "FFF9C4", breakLine: true } },
{ text: " Advance cannula gently until a 'stop' is felt; characterise as HARD or SOFT", options: { color: "FFFDE7", breakLine: true } },
{ text: "6. Withdraw & Irrigate", options: { bold: true, color: "FFF9C4", breakLine: true } },
{ text: " Withdraw 2mm from stop; slowly inject 2mL saline; ask patient to report salty taste", options: { color: "FFFDE7", breakLine: false } },
];
slide.addText(steps, {
x: 0.25, y: 4.22, w: 3.8, h: 2.9,
fontSize: 7.8, fontFace: "Calibri", valign: "top", margin: 4
});
// ══════════════════════════════════════════════════════════════════
// ROW 2 CENTER: DIAGRAM (lacrimal anatomy schematic using shapes)
// ══════════════════════════════════════════════════════════════════
addCard(slide, pres, 4.35, 3.85, 5.3, 3.5, "2E7D32", "ANATOMY DIAGRAM & INTERPRETATION", "🗺");
// === DIAGRAM AREA ===
const dX = 4.55; // diagram x offset
const dY = 4.22;
// EYE outline (ellipse)
slide.addShape(pres.ShapeType.ellipse, {
x: dX + 0.15, y: dY + 0.05, w: 2.0, h: 0.8,
fill: { color: "1A3A2A" },
line: { color: "81C784", width: 1.5 }
});
slide.addText("EYE", {
x: dX + 0.15, y: dY + 0.05, w: 2.0, h: 0.8,
fontSize: 8, color: "A5D6A7", align: "center", valign: "middle", bold: true
});
// UPPER PUNCTUM (small dot)
slide.addShape(pres.ShapeType.ellipse, {
x: dX + 0.05, y: dY + 0.18, w: 0.12, h: 0.12,
fill: { color: "FFD54F" },
line: { color: "FF8F00", width: 1 }
});
slide.addText("Upper\nPunctum", {
x: dX - 0.8, y: dY + 0.1, w: 0.85, h: 0.35,
fontSize: 6.5, color: "FFD54F", align: "right", valign: "middle"
});
// arrow to upper punctum
slide.addShape(pres.ShapeType.line, {
x: dX - 0.0, y: dY + 0.24, w: 0.08, h: 0,
line: { color: "FFD54F", width: 0.8 }
});
// LOWER PUNCTUM
slide.addShape(pres.ShapeType.ellipse, {
x: dX + 0.05, y: dY + 0.52, w: 0.12, h: 0.12,
fill: { color: "FFD54F" },
line: { color: "FF8F00", width: 1 }
});
slide.addText("Lower\nPunctum", {
x: dX - 0.8, y: dY + 0.46, w: 0.85, h: 0.35,
fontSize: 6.5, color: "FFD54F", align: "right", valign: "middle"
});
// UPPER CANALICULUS
slide.addShape(pres.ShapeType.line, {
x: dX + 0.11, y: dY + 0.24, w: 0.0, h: 0.15,
line: { color: "4FC3F7", width: 2 }
});
slide.addShape(pres.ShapeType.line, {
x: dX + 0.11, y: dY + 0.39, w: 0.4, h: 0,
line: { color: "4FC3F7", width: 2 }
});
// LOWER CANALICULUS
slide.addShape(pres.ShapeType.line, {
x: dX + 0.11, y: dY + 0.52, w: 0.0, h: -0.13,
line: { color: "4FC3F7", width: 2 }
});
slide.addShape(pres.ShapeType.line, {
x: dX + 0.11, y: dY + 0.39, w: 0.4, h: 0,
line: { color: "4FC3F7", width: 2 }
});
// COMMON CANALICULUS label
slide.addText("Common Canaliculus", {
x: dX + 0.52, y: dY + 0.28, w: 1.2, h: 0.3,
fontSize: 6.5, color: "4FC3F7", align: "left", valign: "middle"
});
// LACRIMAL SAC (rectangle)
slide.addShape(pres.ShapeType.roundRect, {
x: dX + 0.5, y: dY + 0.58, w: 0.5, h: 0.75,
fill: { color: "1B3A4B" },
line: { color: "29B6F6", width: 2 },
rectRadius: 0.05
});
slide.addText("Sac", {
x: dX + 0.5, y: dY + 0.58, w: 0.5, h: 0.75,
fontSize: 7, color: "29B6F6", align: "center", valign: "middle", bold: true
});
slide.addShape(pres.ShapeType.line, {
x: dX + 0.51, y: dY + 0.39, w: 0, h: 0.19,
line: { color: "29B6F6", width: 1.5 }
});
slide.addText("Lacrimal\nSac", {
x: dX + 1.1, y: dY + 0.62, w: 0.9, h: 0.35,
fontSize: 6.5, color: "29B6F6", align: "left", valign: "middle"
});
// NASOLACRIMAL DUCT
slide.addShape(pres.ShapeType.rect, {
x: dX + 0.55, y: dY + 1.33, w: 0.4, h: 1.0,
fill: { color: "1B3A4B" },
line: { color: "80DEEA", width: 1.5 }
});
slide.addText("NLD", {
x: dX + 0.55, y: dY + 1.33, w: 0.4, h: 1.0,
fontSize: 6.5, color: "80DEEA", align: "center", valign: "middle", bold: true
});
slide.addText("Naso-\nlacrimal\nDuct", {
x: dX + 1.1, y: dY + 1.55, w: 0.9, h: 0.45,
fontSize: 6.5, color: "80DEEA", align: "left", valign: "middle"
});
// INFERIOR MEATUS arrow + label
slide.addShape(pres.ShapeType.line, {
x: dX + 0.75, y: dY + 2.33, w: 0, h: 0.25,
line: { color: "A5D6A7", width: 1.5, endArrowType: "arrow" }
});
slide.addText("Inferior Meatus\n(Valve of Hasner)", {
x: dX + 0.8, y: dY + 2.32, w: 1.5, h: 0.35,
fontSize: 6, color: "A5D6A7", align: "left", valign: "top"
});
// CANNULA drawn (orange line)
slide.addShape(pres.ShapeType.line, {
x: dX + 0.0, y: dY + 0.65, w: 0.55, h: -0.1,
line: { color: "FF7043", width: 2.5 }
});
slide.addText("Cannula →", {
x: dX - 0.75, y: dY + 0.52, w: 0.85, h: 0.28,
fontSize: 6.5, color: "FF7043", align: "right", valign: "middle", bold: true
});
// ── INTERPRETATION TABLE ────────────────────────────────────────
// Title
slide.addText("INTERPRETATION OF FINDINGS", {
x: dX + 2.35, y: dY, w: 2.55, h: 0.3,
fontSize: 9, bold: true, color: "A5D6A7", align: "center", fontFace: "Calibri"
});
// Finding rows
const rows = [
["Finding", "Interpretation", "Site of Block"],
["Salty taste ✓", "Patent system", "None"],
["HARD stop\n+ no taste", "Patent canaliculi\nNLD obstruction", "NLD"],
["SOFT stop\n+ regurg from\nupper punctum", "Common\ncanaliculus\nblock", "Common\nCanaliculus"],
["SOFT stop\n+ NO regurg", "Lower\ncanaliculus\nblock", "Lower\nCanaliculus"],
["Regurg\nof mucopus", "Dacryocystitis\n/ sac distension", "NLD / Sac"],
];
const tW = 2.5;
const tH = 0.41;
const tX = dX + 2.4;
const tY = dY + 0.32;
const colW = [1.05, 0.85, 0.65];
const rowColors = ["2E7D32", "0A1628", "0A1628", "0A1628", "0A1628", "0A1628"];
const headerTextColor = "FFFFFF";
const rowTextColor = "E8F5E9";
for (let r = 0; r < rows.length; r++) {
let cy = tY + r * tH;
let rowBg = r === 0 ? "2E7D32" : (r % 2 === 0 ? "0D2137" : "132740");
let cx = tX;
for (let c = 0; c < rows[r].length; c++) {
slide.addShape(pres.ShapeType.rect, {
x: cx, y: cy, w: colW[c], h: tH,
fill: { color: rowBg },
line: { color: "1B5E20", width: 0.7 }
});
slide.addText(rows[r][c], {
x: cx, y: cy, w: colW[c], h: tH,
fontSize: r === 0 ? 7.5 : 7,
bold: r === 0,
color: r === 0 ? headerTextColor : (c === 0 ? "FFD54F" : rowTextColor),
align: "center", valign: "middle",
fontFace: "Calibri", margin: 2
});
cx += colW[c];
}
}
// ══════════════════════════════════════════════════════════════════
// ROW 2 RIGHT: CONTRAINDICATIONS + OTHER TESTS
// ══════════════════════════════════════════════════════════════════
addCard(slide, pres, 9.85, 3.85, 3.3, 1.6, "4E342E", "CONTRAINDICATIONS", "🚫");
const contra = [
{ text: "• Acute dacryocystitis (relative - risk spreading infection)", options: { color: "FFCCBC", breakLine: true } },
{ text: "• Known canalicular laceration / recent surgery", options: { color: "FFCCBC", breakLine: true } },
{ text: "• Uncooperative patient", options: { color: "FFCCBC", breakLine: true } },
{ text: "• Severe punctal stenosis (dilate first)", options: { color: "FFCCBC", breakLine: false } },
];
slide.addText(contra, {
x: 9.95, y: 4.22, w: 3.1, h: 1.1,
fontSize: 8, fontFace: "Calibri", valign: "top", margin: 4
});
addCard(slide, pres, 9.85, 5.6, 3.3, 1.75, "1A237E", "OTHER LACRIMAL TESTS", "🔍");
const otherTests = [
{ text: "Fluorescein Dye Disappearance Test:", options: { bold: true, color: "C5CAE9", breakLine: true } },
{ text: " Instil fluorescein; assess clearance at 5 min; residual staining = obstruction", options: { color: "E8EAF6", breakLine: true } },
{ text: "Jones Test I (Primary):", options: { bold: true, color: "C5CAE9", breakLine: true } },
{ text: " Fluorescein in eye; check inferior meatus for dye with cotton tip", options: { color: "E8EAF6", breakLine: true } },
{ text: "Jones Test II (Secondary):", options: { bold: true, color: "C5CAE9", breakLine: true } },
{ text: " Irrigate saline after Jones I; dye in nasopharynx = partial block", options: { color: "E8EAF6", breakLine: true } },
{ text: "Dacryocystogram (DCG):", options: { bold: true, color: "C5CAE9", breakLine: true } },
{ text: " Contrast X-ray to map obstruction site precisely", options: { color: "E8EAF6", breakLine: false } },
];
slide.addText(otherTests, {
x: 9.95, y: 5.96, w: 3.1, h: 1.3,
fontSize: 7.8, fontFace: "Calibri", valign: "top", margin: 4
});
// ══════════════════════════════════════════════════════════════════
// BOTTOM FOOTER
// ══════════════════════════════════════════════════════════════════
slide.addText("DCR = Dacryocystorhinostomy | NLD = Nasolacrimal Duct | MCT = Medial Canthal Tendon | LA = Local Anaesthetic | Hard stop = cannula on lacrimal bone | Soft stop = cannula within canaliculus", {
x: 0, y: 7.1, w: 13.3, h: 0.4,
align: "center", valign: "middle",
fontSize: 7.2, color: "B3E5FC", fontFace: "Calibri", italic: true
});
// ─── WRITE FILE ─────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/lacrimal-chart/Lacrimal_Sac_Syringing_Chart.pptx" })
.then(() => console.log("DONE: Lacrimal_Sac_Syringing_Chart.pptx created"))
.catch(err => { console.error("ERROR:", err); process.exit(1); });
cd /home/daytona/workspace/lacrimal-chart && node lacrimal_chart.js 2>&1
ls -lh /home/daytona/workspace/lacrimal-chart/Lacrimal_Sac_Syringing_Chart.pptx
Lacrimal Sac Syringing Chart
Presentation · PPTX
| Section | Colour | Content |
|---|---|---|
| Anatomy of the Lacrimal System | Blue | Puncta, canaliculi, lacrimal sac, nasolacrimal duct with key dimensions |
| Indications | Teal | Epiphora, patency check, DCR pre-op, dacryocystogram, antibiotic flush |
| Equipment Required | Purple | Nettleship dilator, lacrimal cannula, saline, LA drops, loupes |
| Complications | Red | False passage, canalicular trauma, infection spread, orbital cellulitis |
| Step-by-Step Procedure | Amber | 6 numbered steps from consent to irrigation with full technique detail |
| Anatomy Diagram | Green | Schematic of puncta > canaliculi > lacrimal sac > NLD > inferior meatus with cannula position marked |
| Interpretation Table | Green | Hard stop, soft stop, regurgitation from upper punctum, mucopus - each mapped to obstruction site |
| Contraindications | Brown | Acute dacryocystitis, canalicular laceration, uncooperative patient |
| Other Lacrimal Tests | Indigo | FDT, Jones Test I & II, dacryocystogram explained |
| Abbreviation footer | Blue | DCR, NLD, MCT, LA - all spelled out |