Make a proper comprehensive ppt with certain medicines mentioning each specifically when to use,doses(by severity),duration of intake(how many times max daily),after or before food,maximum dose daily,when to avoid/must avoid.Add important pictures about the diseases involved Diclofenac+ paracetamol
diclofenac paracetamol combination tablet dosage uses contraindications clinical
ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace empty"
mkdir -p /home/daytona/workspace/diclofenac-paracetamol-ppt
~/diclofenac-paracetamol-ppt/build.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
// ─── Colour palette ──────────────────────────────────────────────────────────
const C = {
navy: "0D1B2A", // dominant dark
teal: "1A6B72", // accent
tealLight: "2AB0BA", // highlight accent
white: "FFFFFF",
offWhite: "F4F7F9",
lightGray: "DDE6EC",
midGray: "7B8D96",
red: "C0392B",
amber: "E67E22",
green: "1E7E47",
yellowBg: "FFF8E1",
redBg: "FDECEA",
greenBg: "E8F5E9",
};
// ─── Fetch images ─────────────────────────────────────────────────────────────
const imageUrls = {
// Public-domain / royalty-free medical images
osteoarthritis: "https://upload.wikimedia.org/wikipedia/commons/thumb/8/8f/Osteoarthritis_knee_diagram.svg/640px-Osteoarthritis_knee_diagram.svg.png",
rhArthritis: "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Rheumatoid_Arthritis_Joints.svg/640px-Rheumatoid_Arthritis_Joints.svg.png",
backPain: "https://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Spinal_column_curvature-en.svg/400px-Spinal_column_curvature-en.svg.png",
fever: "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Thermometer_CF.svg/320px-Thermometer_CF.svg.png",
dental: "https://upload.wikimedia.org/wikipedia/commons/thumb/9/98/Tooth_morphology.svg/400px-Tooth_morphology.svg.png",
liver: "https://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Gray1091.png/320px-Gray1091.png",
cox: "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c7/Arachidonic_acid_pathway.png/640px-Arachidonic_acid_pathway.png",
kidney: "https://upload.wikimedia.org/wikipedia/commons/thumb/1/12/Kidney_PioM.svg/400px-Kidney_PioM.svg.png",
};
console.log("Fetching images...");
const urls = Object.values(imageUrls);
const keys = Object.keys(imageUrls);
let imgData = {};
try {
const result = execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ${urls.map(u => `"${u}"`).join(" ")}`,
{ timeout: 60000 }
).toString();
const parsed = JSON.parse(result);
keys.forEach((k, i) => {
if (parsed[i] && !parsed[i].error) {
imgData[k] = parsed[i].base64;
} else {
console.log(`Failed to fetch image for: ${k}`, parsed[i]?.error);
}
});
} catch(e) {
console.log("Image fetch error:", e.message);
}
console.log("Images fetched:", Object.keys(imgData).join(", "));
// ─── Presentation setup ───────────────────────────────────────────────────────
const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE"; // 13.3 x 7.5 inches
pres.title = "Diclofenac + Paracetamol - Comprehensive Clinical Guide";
pres.author = "Clinical Pharmacology Reference";
// ─── Helper functions ─────────────────────────────────────────────────────────
// Dark header slide (title/section divider)
function addDarkSlide(title, subtitle) {
const s = pres.addSlide();
// Full dark background
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: C.navy }, line: { color: C.navy } });
// Teal accent bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 7.5, fill: { color: C.tealLight }, line: { color: C.tealLight } });
// Bottom teal strip
s.addShape(pres.ShapeType.rect, { x: 0, y: 6.8, w: 13.3, h: 0.7, fill: { color: C.teal }, line: { color: C.teal } });
s.addText(title, {
x: 0.5, y: 2.4, w: 12.3, h: 1.4,
fontSize: 44, bold: true, color: C.white, align: "center", fontFace: "Calibri",
});
if (subtitle) {
s.addText(subtitle, {
x: 0.5, y: 4.0, w: 12.3, h: 0.8,
fontSize: 22, color: C.tealLight, align: "center", fontFace: "Calibri",
});
}
return s;
}
// Standard light content slide
function addContentSlide(title) {
const s = pres.addSlide();
// Background
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: C.offWhite }, line: { color: C.offWhite } });
// Header bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 1.0, fill: { color: C.navy }, line: { color: C.navy } });
// Teal accent under header
s.addShape(pres.ShapeType.rect, { x: 0, y: 1.0, w: 13.3, h: 0.06, fill: { color: C.tealLight }, line: { color: C.tealLight } });
// Title text
s.addText(title, {
x: 0.4, y: 0.1, w: 12.5, h: 0.8,
fontSize: 26, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
});
// Footer
s.addShape(pres.ShapeType.rect, { x: 0, y: 7.2, w: 13.3, h: 0.3, fill: { color: C.navy }, line: { color: C.navy } });
s.addText("Diclofenac + Paracetamol | Clinical Reference", {
x: 0.3, y: 7.2, w: 12.7, h: 0.3,
fontSize: 9, color: C.lightGray, fontFace: "Calibri", valign: "middle",
});
return s;
}
// Info card (colored box)
function addCard(slide, x, y, w, h, label, value, bgColor, labelColor, valueColor) {
slide.addShape(pres.ShapeType.roundRect, {
x, y, w, h,
fill: { color: bgColor },
line: { color: C.lightGray, width: 0.5 },
rectRadius: 0.08,
});
slide.addText([
{ text: label + "\n", options: { bold: true, fontSize: 11, color: labelColor, breakLine: true } },
{ text: value, options: { fontSize: 13, color: valueColor, bold: false } },
], { x: x + 0.1, y: y + 0.1, w: w - 0.2, h: h - 0.2, fontFace: "Calibri", valign: "top" });
}
// ─── SLIDE 1: TITLE ──────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: C.navy }, line: { color: C.navy } });
// Decorative teal circles
s.addShape(pres.ShapeType.ellipse, { x: 10.5, y: -1.5, w: 5, h: 5, fill: { color: C.teal, transparency: 75 }, line: { color: C.teal, transparency: 75 } });
s.addShape(pres.ShapeType.ellipse, { x: -1, y: 4.5, w: 4, h: 4, fill: { color: C.tealLight, transparency: 80 }, line: { color: C.tealLight, transparency: 80 } });
// Teal left bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.25, h: 7.5, fill: { color: C.tealLight }, line: { color: C.tealLight } });
// Pill icon area
s.addShape(pres.ShapeType.roundRect, { x: 0.6, y: 1.2, w: 2.4, h: 1.0, fill: { color: C.tealLight }, line: { color: C.tealLight }, rectRadius: 0.5 });
s.addText("Rx", { x: 0.6, y: 1.2, w: 2.4, h: 1.0, fontSize: 36, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText("DICLOFENAC + PARACETAMOL", {
x: 0.5, y: 2.4, w: 12.3, h: 1.2,
fontSize: 46, bold: true, color: C.white, align: "center", fontFace: "Calibri", charSpacing: 2,
});
s.addText("Comprehensive Clinical Prescribing Guide", {
x: 0.5, y: 3.75, w: 12.3, h: 0.7,
fontSize: 22, color: C.tealLight, align: "center", fontFace: "Calibri",
});
s.addShape(pres.ShapeType.rect, { x: 3.5, y: 4.55, w: 6.3, h: 0.05, fill: { color: C.tealLight }, line: { color: C.tealLight } });
s.addText("Indications • Dosing by Severity • Duration • Timing • Contraindications", {
x: 0.5, y: 4.7, w: 12.3, h: 0.55,
fontSize: 16, color: C.midGray, align: "center", fontFace: "Calibri",
});
s.addText("For Healthcare Professionals", {
x: 0.5, y: 6.8, w: 12.3, h: 0.5,
fontSize: 13, color: C.lightGray, align: "center", fontFace: "Calibri",
});
}
// ─── SLIDE 2: OVERVIEW - What is this combination? ────────────────────────────
{
const s = addContentSlide("Overview: Diclofenac + Paracetamol Combination");
// Two column layout
// Left panel - Diclofenac
s.addShape(pres.ShapeType.roundRect, { x: 0.3, y: 1.3, w: 5.9, h: 5.5, fill: { color: "E8F4FD" }, line: { color: C.teal, width: 1.5 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.3, w: 5.9, h: 0.6, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("DICLOFENAC", { x: 0.4, y: 1.3, w: 5.7, h: 0.6, fontSize: 18, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
s.addText([
{ text: "Class: ", options: { bold: true } }, { text: "NSAID (Non-Steroidal Anti-Inflammatory Drug)\n", options: {} },
{ text: "Salt forms: ", options: { bold: true } }, { text: "Sodium / Potassium\n", options: {} },
{ text: "Common doses: ", options: { bold: true } }, { text: "50 mg / 75 mg tablets\n\n", options: {} },
{ text: "Mechanism:\n", options: { bold: true } },
{ text: "Inhibits COX-1 and COX-2 enzymes → reduces prostaglandin synthesis → anti-inflammatory, analgesic, antipyretic effects\n\n", options: {} },
{ text: "Key Effects:\n", options: { bold: true } },
{ text: "• Reduces pain (moderate–severe)\n• Reduces inflammation & swelling\n• Mild antipyretic effect", options: {} },
], { x: 0.5, y: 2.0, w: 5.6, h: 4.6, fontSize: 13, fontFace: "Calibri", color: C.navy, valign: "top" });
// Right panel - Paracetamol
s.addShape(pres.ShapeType.roundRect, { x: 6.8, y: 1.3, w: 5.9, h: 5.5, fill: { color: "FFF8E1" }, line: { color: C.amber, width: 1.5 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.rect, { x: 6.8, y: 1.3, w: 5.9, h: 0.6, fill: { color: C.amber }, line: { color: C.amber } });
s.addText("PARACETAMOL (Acetaminophen)", { x: 6.9, y: 1.3, w: 5.7, h: 0.6, fontSize: 17, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
s.addText([
{ text: "Class: ", options: { bold: true } }, { text: "Analgesic & Antipyretic\n", options: {} },
{ text: "Common doses: ", options: { bold: true } }, { text: "325 mg / 500 mg tablets\n\n", options: {} },
{ text: "Mechanism:\n", options: { bold: true } },
{ text: "Central inhibition of prostaglandin synthesis in the brain; modulates descending serotonergic pathways → analgesic + antipyretic (minimal peripheral anti-inflammatory)\n\n", options: {} },
{ text: "Key Effects:\n", options: { bold: true } },
{ text: "• Reduces mild-moderate pain\n• Strong antipyretic (fever reduction)\n• NO significant anti-inflammatory action\n• Gastric-friendly (no GI irritation)", options: {} },
], { x: 6.9, y: 2.0, w: 5.6, h: 4.6, fontSize: 13, fontFace: "Calibri", color: C.navy, valign: "top" });
// Synergy badge center-ish
s.addShape(pres.ShapeType.ellipse, { x: 6.1, y: 3.4, w: 1.1, h: 0.8, fill: { color: C.tealLight }, line: { color: C.tealLight } });
s.addText("+", { x: 6.1, y: 3.4, w: 1.1, h: 0.8, fontSize: 28, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
}
// ─── SLIDE 3: MECHANISM OF ACTION (with image) ────────────────────────────────
{
const s = addContentSlide("Mechanism of Action");
// COX pathway image left
if (imgData.cox) {
s.addImage({ data: imgData.cox, x: 0.3, y: 1.2, w: 4.0, h: 2.8 });
}
s.addText("Arachidonic Acid / COX Pathway", { x: 0.3, y: 4.05, w: 4.0, h: 0.35, fontSize: 9, color: C.midGray, align: "center", italic: true, fontFace: "Calibri" });
// Right side - mechanism boxes
const boxes = [
{ label: "Step 1 – Injury/Stimulus", text: "Cell damage triggers phospholipase A2 → releases arachidonic acid from membrane phospholipids", bg: "E3F2FD", col: "1565C0" },
{ label: "Step 2 – COX Enzymes Activated", text: "COX-1 (constitutive) + COX-2 (inducible) convert arachidonic acid → prostaglandins, thromboxanes, prostacyclins", bg: "E8F5E9", col: C.green },
{ label: "Diclofenac Blocks COX-1 & COX-2", text: "Irreversibly & competitively inhibits both isoforms → halts prostaglandin synthesis → anti-inflammatory, analgesic, antipyretic", bg: "E3F2FD", col: C.teal },
{ label: "Paracetamol Acts Centrally", text: "Inhibits prostaglandin synthesis in the CNS; does NOT significantly block peripheral COX → no GI irritation", bg: C.yellowBg, col: C.amber },
{ label: "Synergistic Effect", text: "Dual mechanism covers both peripheral inflammation (diclofenac) AND central pain modulation (paracetamol) for superior analgesia", bg: "F3E5F5", col: "7B1FA2" },
];
boxes.forEach((b, i) => {
const y = 1.2 + i * 1.15;
s.addShape(pres.ShapeType.roundRect, { x: 4.7, y, w: 8.2, h: 1.05, fill: { color: b.bg }, line: { color: b.col, width: 1.2 }, rectRadius: 0.07 });
s.addShape(pres.ShapeType.rect, { x: 4.7, y, w: 0.2, h: 1.05, fill: { color: b.col }, line: { color: b.col } });
s.addText(b.label, { x: 5.0, y: y + 0.03, w: 7.8, h: 0.32, fontSize: 12, bold: true, color: b.col, fontFace: "Calibri" });
s.addText(b.text, { x: 5.0, y: y + 0.35, w: 7.8, h: 0.6, fontSize: 11, color: C.navy, fontFace: "Calibri" });
});
}
// ─── SLIDE 4: INDICATIONS - Diseases Treated ─────────────────────────────────
{
const s = addContentSlide("Indications: When to Use Diclofenac + Paracetamol");
const conditions = [
{ name: "Osteoarthritis", icon: "🦴", desc: "Knee, hip, finger joint pain & stiffness", imgKey: "osteoarthritis" },
{ name: "Rheumatoid Arthritis", icon: "🤲", desc: "Inflammatory joint pain, swelling, morning stiffness", imgKey: "rhArthritis" },
{ name: "Ankylosing Spondylitis", icon: "🔗", desc: "Spinal inflammation & back stiffness", imgKey: "backPain" },
{ name: "Post-operative Pain", icon: "🏥", desc: "Moderate-severe pain after surgery", imgKey: null },
{ name: "Dysmenorrhoea", icon: "🩺", desc: "Primary/secondary menstrual pain", imgKey: null },
{ name: "Dental Pain", icon: "🦷", desc: "Tooth extraction, abscess, pulpitis", imgKey: "dental" },
{ name: "Fever / Febrile States", icon: "🌡️", desc: "Elevated temperature of varied etiology", imgKey: "fever" },
{ name: "Musculoskeletal Sprains", icon: "💪", desc: "Soft-tissue injury, sports injuries, bursitis, sciatica", imgKey: null },
];
const cols = 4;
const cardW = 3.1, cardH = 1.45;
const startX = 0.25, startY = 1.2;
const gapX = 0.12, gapY = 0.12;
conditions.forEach((c, i) => {
const col = i % cols;
const row = Math.floor(i / cols);
const x = startX + col * (cardW + gapX);
const y = startY + row * (cardH + gapY);
const bgColors = ["E3F2FD","E8F5E9","FFF8E1","F3E5F5","E8F4FD","E8F5E9","FDECEA","F0F4FF"];
const accentColors = [C.teal, C.green, C.amber, "7B1FA2", "1565C0", "2E7D32", C.red, C.teal];
s.addShape(pres.ShapeType.roundRect, { x, y, w: cardW, h: cardH, fill: { color: bgColors[i] }, line: { color: accentColors[i], width: 1.2 }, rectRadius: 0.08 });
s.addShape(pres.ShapeType.rect, { x, y, w: cardW, h: 0.38, fill: { color: accentColors[i] }, line: { color: accentColors[i] } });
s.addText(c.name, { x: x + 0.08, y: y + 0.02, w: cardW - 0.1, h: 0.34, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
s.addText(c.icon + " " + c.desc, { x: x + 0.08, y: y + 0.44, w: cardW - 0.15, h: 0.9, fontSize: 11.5, color: C.navy, fontFace: "Calibri", valign: "top" });
});
}
// ─── SLIDE 5: DICLOFENAC - Disease images ─────────────────────────────────────
{
const s = addContentSlide("Key Conditions Treated - Visual Reference");
// OA image
if (imgData.osteoarthritis) {
s.addShape(pres.ShapeType.roundRect, { x: 0.3, y: 1.2, w: 3.8, h: 3.2, fill: { color: C.offWhite }, line: { color: C.teal, width: 1.5 }, rectRadius: 0.1 });
s.addImage({ data: imgData.osteoarthritis, x: 0.5, y: 1.35, w: 3.4, h: 2.5 });
s.addText("Osteoarthritis", { x: 0.3, y: 4.4, w: 3.8, h: 0.4, fontSize: 13, bold: true, color: C.teal, align: "center", fontFace: "Calibri" });
s.addText("Joint space narrowing, cartilage loss, osteophytes. NSAID+paracetamol reduces pain and stiffness.", { x: 0.3, y: 4.8, w: 3.8, h: 0.7, fontSize: 10, color: C.navy, fontFace: "Calibri", align: "center" });
}
// RA image
if (imgData.rhArthritis) {
s.addShape(pres.ShapeType.roundRect, { x: 4.7, y: 1.2, w: 3.8, h: 3.2, fill: { color: C.offWhite }, line: { color: C.amber, width: 1.5 }, rectRadius: 0.1 });
s.addImage({ data: imgData.rhArthritis, x: 4.9, y: 1.35, w: 3.4, h: 2.5 });
s.addText("Rheumatoid Arthritis", { x: 4.7, y: 4.4, w: 3.8, h: 0.4, fontSize: 13, bold: true, color: C.amber, align: "center", fontFace: "Calibri" });
s.addText("Symmetric synovitis affecting small joints. Diclofenac reduces inflammation; paracetamol adds analgesia.", { x: 4.7, y: 4.8, w: 3.8, h: 0.7, fontSize: 10, color: C.navy, fontFace: "Calibri", align: "center" });
}
// Back pain image
if (imgData.backPain) {
s.addShape(pres.ShapeType.roundRect, { x: 9.1, y: 1.2, w: 3.8, h: 3.2, fill: { color: C.offWhite }, line: { color: C.red, width: 1.5 }, rectRadius: 0.1 });
s.addImage({ data: imgData.backPain, x: 9.3, y: 1.35, w: 3.4, h: 2.5 });
s.addText("Ankylosing Spondylitis / Back Pain", { x: 9.1, y: 4.4, w: 3.8, h: 0.4, fontSize: 12, bold: true, color: C.red, align: "center", fontFace: "Calibri" });
s.addText("Spinal rigidity and inflammation. NSAIDs are first-line therapy for spondyloarthropathies.", { x: 9.1, y: 4.8, w: 3.8, h: 0.7, fontSize: 10, color: C.navy, fontFace: "Calibri", align: "center" });
}
}
// ─── SLIDE 6: DICLOFENAC - Dosing by Severity ────────────────────────────────
{
const s = addContentSlide("DICLOFENAC — Dosing by Severity & Indication");
// Severity color bands
const rows = [
{ sev: "MILD PAIN / FEVER", dose: "25 mg", freq: "3 times daily (TID)", max: "75 mg/day", dur: "Up to 5 days", color: C.green, bg: C.greenBg },
{ sev: "MODERATE PAIN", dose: "50 mg", freq: "2–3 times daily (BID–TID)", max: "100–150 mg/day", dur: "Up to 7–10 days", color: C.amber, bg: C.yellowBg },
{ sev: "SEVERE / CHRONIC PAIN\n(OA, RA, AS)", dose: "75 mg", freq: "2 times daily (BID)", max: "150 mg/day", dur: "Ongoing with regular review", color: C.red, bg: C.redBg },
{ sev: "ANKYLOSING SPONDYLITIS", dose: "25 mg", freq: "4 times daily + 25 mg at bedtime (QID+HS)", max: "125 mg/day", dur: "Long-term with review", color: "7B1FA2", bg: "F3E5F5" },
{ sev: "DYSMENORRHOEA\n(Initial loading)", dose: "50–100 mg", freq: "Initially; then 50 mg TID", max: "150 mg/day", dur: "Duration of menstrual period", color: C.teal, bg: "E3F2FD" },
{ sev: "MIGRAINE ATTACK", dose: "50 mg", freq: "Once at onset (single dose)", max: "50 mg for acute episode", dur: "Single episode only", color: "1565C0", bg: "E8F4FD" },
];
// Header row
const headers = ["Severity / Indication", "Dose", "Frequency", "Max Daily Dose", "Duration"];
const colW = [3.3, 1.4, 2.5, 2.1, 2.5];
const colX = [0.3];
for (let i = 1; i < colW.length; i++) colX.push(colX[i-1] + colW[i-1] + 0.05);
headers.forEach((h, i) => {
s.addShape(pres.ShapeType.rect, { x: colX[i], y: 1.1, w: colW[i], h: 0.45, fill: { color: C.navy }, line: { color: C.navy } });
s.addText(h, { x: colX[i] + 0.05, y: 1.1, w: colW[i] - 0.1, h: 0.45, fontSize: 11.5, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
});
rows.forEach((r, ri) => {
const y = 1.6 + ri * 0.97;
headers.forEach((_, ci) => {
const vals = [r.sev, r.dose, r.freq, r.max, r.dur];
s.addShape(pres.ShapeType.rect, { x: colX[ci], y, w: colW[ci], h: 0.87, fill: { color: ci === 0 ? r.bg : C.white }, line: { color: C.lightGray, width: 0.5 } });
});
s.addShape(pres.ShapeType.rect, { x: colX[0], y, w: 0.15, h: 0.87, fill: { color: r.color }, line: { color: r.color } });
s.addText(r.sev, { x: colX[0] + 0.2, y: y + 0.05, w: colW[0] - 0.25, h: 0.78, fontSize: 11, bold: true, color: r.color, fontFace: "Calibri", valign: "middle" });
s.addText(r.dose, { x: colX[1] + 0.05, y: y + 0.05, w: colW[1] - 0.1, h: 0.78, fontSize: 14, bold: true, color: C.navy, fontFace: "Calibri", valign: "middle", align: "center" });
s.addText(r.freq, { x: colX[2] + 0.05, y: y + 0.05, w: colW[2] - 0.1, h: 0.78, fontSize: 11, color: C.navy, fontFace: "Calibri", valign: "middle" });
s.addText(r.max, { x: colX[3] + 0.05, y: y + 0.05, w: colW[3] - 0.1, h: 0.78, fontSize: 11, bold: true, color: C.red, fontFace: "Calibri", valign: "middle", align: "center" });
s.addText(r.dur, { x: colX[4] + 0.05, y: y + 0.05, w: colW[4] - 0.1, h: 0.78, fontSize: 11, color: C.navy, fontFace: "Calibri", valign: "middle" });
});
}
// ─── SLIDE 7: PARACETAMOL - Dosing by Severity ───────────────────────────────
{
const s = addContentSlide("PARACETAMOL — Dosing by Severity & Body Weight");
const rows = [
{ sev: "MILD PAIN / LOW FEVER\n(<38.5°C)", dose: "500 mg", freq: "Every 4–6 hours (max 4 times/day)", max: "2000 mg/day*", dur: "Up to 3–5 days", color: C.green, bg: C.greenBg },
{ sev: "MODERATE PAIN / FEVER", dose: "500–650 mg", freq: "Every 4–6 hours (max 4 times/day)", max: "3000 mg/day", dur: "Up to 5–7 days", color: C.amber, bg: C.yellowBg },
{ sev: "SEVERE PAIN\n(Adults >50 kg)", dose: "1000 mg (1 g)", freq: "Every 4–6 hours (max 4 times/day)", max: "4000 mg/day", dur: "Short-term; reassess if >3 days", color: C.red, bg: C.redBg },
{ sev: "ELDERLY / LIVER RISK\n(hepatic caution)", dose: "500 mg", freq: "Every 6–8 hours", max: "2000 mg/day", dur: "Use minimum effective dose", color: "7B1FA2", bg: "F3E5F5" },
{ sev: "CHILDREN (12–17 yrs)\n(body weight guided)", dose: "10–15 mg/kg", freq: "Every 4–6 hours (max 5 doses/day)", max: "60 mg/kg/day (max 4 g/day)", dur: "As clinically required", color: C.teal, bg: "E3F2FD" },
];
const headers = ["Severity / Population", "Dose", "Frequency", "Max Daily Dose", "Duration"];
const colW = [3.3, 1.6, 2.8, 2.0, 2.2];
const colX = [0.3];
for (let i = 1; i < colW.length; i++) colX.push(colX[i-1] + colW[i-1] + 0.05);
headers.forEach((h, i) => {
s.addShape(pres.ShapeType.rect, { x: colX[i], y: 1.1, w: colW[i], h: 0.45, fill: { color: C.amber }, line: { color: C.amber } });
s.addText(h, { x: colX[i] + 0.05, y: 1.1, w: colW[i] - 0.1, h: 0.45, fontSize: 11.5, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
});
rows.forEach((r, ri) => {
const y = 1.6 + ri * 1.0;
headers.forEach((_, ci) => {
s.addShape(pres.ShapeType.rect, { x: colX[ci], y, w: colW[ci], h: 0.9, fill: { color: ci === 0 ? r.bg : C.white }, line: { color: C.lightGray, width: 0.5 } });
});
s.addShape(pres.ShapeType.rect, { x: colX[0], y, w: 0.15, h: 0.9, fill: { color: r.color }, line: { color: r.color } });
s.addText(r.sev, { x: colX[0] + 0.2, y: y + 0.05, w: colW[0] - 0.25, h: 0.8, fontSize: 11, bold: true, color: r.color, fontFace: "Calibri", valign: "middle" });
s.addText(r.dose, { x: colX[1] + 0.05, y: y + 0.05, w: colW[1] - 0.1, h: 0.8, fontSize: 13, bold: true, color: C.navy, fontFace: "Calibri", valign: "middle", align: "center" });
s.addText(r.freq, { x: colX[2] + 0.05, y: y + 0.05, w: colW[2] - 0.1, h: 0.8, fontSize: 11, color: C.navy, fontFace: "Calibri", valign: "middle" });
s.addText(r.max, { x: colX[3] + 0.05, y: y + 0.05, w: colW[3] - 0.1, h: 0.8, fontSize: 11, bold: true, color: C.red, fontFace: "Calibri", valign: "middle", align: "center" });
s.addText(r.dur, { x: colX[4] + 0.05, y: y + 0.05, w: colW[4] - 0.1, h: 0.8, fontSize: 11, color: C.navy, fontFace: "Calibri", valign: "middle" });
});
s.addText("* Lower doses recommended in elderly, alcoholics, and those with hepatic/renal risk factors", {
x: 0.3, y: 6.9, w: 12.7, h: 0.3, fontSize: 10, color: C.midGray, fontFace: "Calibri", italic: true,
});
}
// ─── SLIDE 8: COMBINATION TABLET - Dosing ─────────────────────────────────────
{
const s = addContentSlide("Combination Tablet Dosing (Diclofenac 50 mg + Paracetamol 325/500 mg)");
// Main dosing panel
s.addShape(pres.ShapeType.roundRect, { x: 0.3, y: 1.15, w: 12.7, h: 2.0, fill: { color: "E3F2FD" }, line: { color: C.teal, width: 1.5 }, rectRadius: 0.1 });
s.addText("Standard Adult Dosing", { x: 0.5, y: 1.2, w: 5, h: 0.4, fontSize: 14, bold: true, color: C.teal, fontFace: "Calibri" });
s.addText([
{ text: "1 tablet (Diclofenac 50 mg + Paracetamol 325–500 mg)", options: { bold: true, fontSize: 15 } },
{ text: " taken ", options: { fontSize: 14 } },
{ text: "2–3 times daily", options: { bold: true, fontSize: 15, color: C.teal } },
{ text: " (every 8–12 hours)", options: { fontSize: 13 } },
], { x: 0.5, y: 1.6, w: 12.3, h: 0.5, fontFace: "Calibri", color: C.navy, valign: "middle" });
s.addText([
{ text: "Maximum: ", options: { bold: true } }, { text: "3 tablets/day (Diclofenac 150 mg + Paracetamol 975–1500 mg max from combination) | ", options: {} },
{ text: "Duration: ", options: { bold: true } }, { text: "Typically 5–10 days (short-term only)", options: {} },
], { x: 0.5, y: 2.1, w: 12.3, h: 0.45, fontSize: 12, fontFace: "Calibri", color: C.navy, valign: "middle" });
// Food timing
s.addShape(pres.ShapeType.roundRect, { x: 0.3, y: 3.3, w: 6.0, h: 2.6, fill: { color: C.greenBg }, line: { color: C.green, width: 1.5 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 3.3, w: 6.0, h: 0.48, fill: { color: C.green }, line: { color: C.green } });
s.addText("🍽 FOOD TIMING", { x: 0.45, y: 3.3, w: 5.7, h: 0.48, fontSize: 15, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
s.addText([
{ text: "ALWAYS take AFTER food or with a full glass of milk/water\n\n", options: { bold: true, fontSize: 14, color: C.green } },
{ text: "Why?\n", options: { bold: true, color: C.navy } },
{ text: "• Diclofenac is a potent GI irritant\n• Taking with/after food reduces gastric mucosal damage\n• Reduces risk of ulceration, nausea, epigastric pain\n• Enteric-coated tablets: still take with/after food\n• Never take on an empty stomach", options: { color: C.navy } },
], { x: 0.45, y: 3.82, w: 5.6, h: 2.0, fontSize: 12, fontFace: "Calibri", valign: "top" });
// Frequency card
s.addShape(pres.ShapeType.roundRect, { x: 6.8, y: 3.3, w: 6.2, h: 2.6, fill: { color: C.yellowBg }, line: { color: C.amber, width: 1.5 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.rect, { x: 6.8, y: 3.3, w: 6.2, h: 0.48, fill: { color: C.amber }, line: { color: C.amber } });
s.addText("⏰ FREQUENCY & MAXIMUM DAILY LIMITS", { x: 6.95, y: 3.3, w: 5.9, h: 0.48, fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
const freqData = [
["Diclofenac max daily:", "150 mg/day (adults)"],
["Paracetamol max daily:", "4000 mg/day (adults); 2g in elderly"],
["Max times/day (combo):", "3 tablets/day"],
["Min interval:", "8 hours between doses"],
["Paracetamol standalone:", "Every 4–6 hours, max 4 doses/24h"],
];
freqData.forEach(([label, val], i) => {
s.addText([
{ text: label + " ", options: { bold: true, color: C.amber, fontSize: 12 } },
{ text: val, options: { color: C.navy, fontSize: 12 } },
], { x: 7.0, y: 3.85 + i * 0.42, w: 5.7, h: 0.38, fontFace: "Calibri", valign: "middle" });
});
}
// ─── SLIDE 9: SECTION - Contraindications ─────────────────────────────────────
addDarkSlide("CONTRAINDICATIONS", "When to AVOID or MUST AVOID these medicines");
// ─── SLIDE 10: DICLOFENAC Contraindications ───────────────────────────────────
{
const s = addContentSlide("DICLOFENAC — Absolute & Relative Contraindications");
// Absolute contraindications (red)
s.addShape(pres.ShapeType.roundRect, { x: 0.3, y: 1.15, w: 6.2, h: 5.7, fill: { color: C.redBg }, line: { color: C.red, width: 2 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.15, w: 6.2, h: 0.6, fill: { color: C.red }, line: { color: C.red } });
s.addText("⛔ ABSOLUTE (MUST AVOID)", { x: 0.45, y: 1.15, w: 5.9, h: 0.6, fontSize: 16, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
const abs = [
"Active peptic ulcer / GI bleeding / GI perforation",
"Severe heart failure (NYHA Class III–IV)",
"Ischaemic heart disease (established)",
"Peripheral arterial disease / cerebrovascular disease",
"Hypersensitivity to diclofenac or any NSAID",
"Aspirin-exacerbated respiratory disease (Samter triad)",
"Severe hepatocellular insufficiency (Child-Pugh C)",
"Severe renal failure (GFR <30 mL/min)",
"3rd trimester of pregnancy (premature ductus closure)",
"Children <15 years (for adult formulations)",
"Concurrent oral anticoagulant therapy (warfarin, etc.)",
];
abs.forEach((item, i) => {
s.addShape(pres.ShapeType.ellipse, { x: 0.48, y: 1.88 + i * 0.43, w: 0.2, h: 0.2, fill: { color: C.red }, line: { color: C.red } });
s.addText(item, { x: 0.75, y: 1.84 + i * 0.43, w: 5.5, h: 0.38, fontSize: 11.5, color: C.navy, fontFace: "Calibri", valign: "middle" });
});
// Relative contraindications (amber)
s.addShape(pres.ShapeType.roundRect, { x: 6.9, y: 1.15, w: 6.1, h: 5.7, fill: { color: C.yellowBg }, line: { color: C.amber, width: 2 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.rect, { x: 6.9, y: 1.15, w: 6.1, h: 0.6, fill: { color: C.amber }, line: { color: C.amber } });
s.addText("⚠ CAUTION / RELATIVE (Use with care)", { x: 7.05, y: 1.15, w: 5.8, h: 0.6, fontSize: 15, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
const rel = [
"Hypertension (may worsen BP control)",
"Mild-moderate renal impairment (monitor creatinine)",
"Mild-moderate hepatic impairment (monitor LFTs)",
"Diabetes mellitus (CV risk factor – caution)",
"Hyperlipidaemia / smoking (CV risk amplification)",
"1st & 2nd trimester of pregnancy (use minimum dose)",
"Breastfeeding (small amounts in milk – caution)",
"Elderly (>65 yrs): increased GI & CV risk",
"Concurrent use of diuretics or ACE inhibitors",
"History of GI disease (ulcers, IBD) – add PPI cover",
"Asthma (NSAID-sensitive patients – test dose first)",
];
rel.forEach((item, i) => {
s.addShape(pres.ShapeType.ellipse, { x: 7.08, y: 1.88 + i * 0.43, w: 0.2, h: 0.2, fill: { color: C.amber }, line: { color: C.amber } });
s.addText(item, { x: 7.35, y: 1.84 + i * 0.43, w: 5.5, h: 0.38, fontSize: 11.5, color: C.navy, fontFace: "Calibri", valign: "middle" });
});
}
// ─── SLIDE 11: PARACETAMOL Contraindications ──────────────────────────────────
{
const s = addContentSlide("PARACETAMOL — Absolute & Relative Contraindications");
// Left - absolute
s.addShape(pres.ShapeType.roundRect, { x: 0.3, y: 1.15, w: 6.2, h: 4.2, fill: { color: C.redBg }, line: { color: C.red, width: 2 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.15, w: 6.2, h: 0.6, fill: { color: C.red }, line: { color: C.red } });
s.addText("⛔ ABSOLUTE (MUST AVOID)", { x: 0.45, y: 1.15, w: 5.9, h: 0.6, fontSize: 16, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
const absP = [
"Known hypersensitivity to paracetamol",
"Severe hepatocellular disease / acute liver failure",
"G6PD deficiency (risk of haemolytic anaemia – high doses)",
"Severe alcoholism (CYP2E1 induction → hepatotoxic metabolite NAPQI)",
"Concurrent use of other paracetamol-containing products (overdose risk)",
];
absP.forEach((item, i) => {
s.addShape(pres.ShapeType.ellipse, { x: 0.48, y: 1.88 + i * 0.67, w: 0.2, h: 0.2, fill: { color: C.red }, line: { color: C.red } });
s.addText(item, { x: 0.75, y: 1.84 + i * 0.67, w: 5.5, h: 0.58, fontSize: 12, color: C.navy, fontFace: "Calibri", valign: "middle" });
});
// Right - relative
s.addShape(pres.ShapeType.roundRect, { x: 6.9, y: 1.15, w: 6.1, h: 4.2, fill: { color: C.yellowBg }, line: { color: C.amber, width: 2 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.rect, { x: 6.9, y: 1.15, w: 6.1, h: 0.6, fill: { color: C.amber }, line: { color: C.amber } });
s.addText("⚠ CAUTION / REDUCE DOSE", { x: 7.05, y: 1.15, w: 5.8, h: 0.6, fontSize: 16, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
const relP = [
"Chronic alcohol use (>3 drinks/day) – max 2 g/day",
"Chronic liver disease / cirrhosis – max 2 g/day",
"Chronic malnutrition / anorexia (depleted glutathione)",
"Renal impairment – extend dosing interval",
"Neonates / infants (weight-based dosing mandatory)",
];
relP.forEach((item, i) => {
s.addShape(pres.ShapeType.ellipse, { x: 7.08, y: 1.88 + i * 0.67, w: 0.2, h: 0.2, fill: { color: C.amber }, line: { color: C.amber } });
s.addText(item, { x: 7.35, y: 1.84 + i * 0.67, w: 5.5, h: 0.58, fontSize: 12, color: C.navy, fontFace: "Calibri", valign: "middle" });
});
// Liver image + overdose info
if (imgData.liver) {
s.addShape(pres.ShapeType.roundRect, { x: 0.3, y: 5.5, w: 3.5, h: 1.5, fill: { color: C.offWhite }, line: { color: C.midGray, width: 0.5 }, rectRadius: 0.08 });
s.addImage({ data: imgData.liver, x: 0.35, y: 5.52, w: 1.4, h: 1.4 });
s.addText("Paracetamol hepatotoxicity occurs via NAPQI accumulation when glutathione is depleted (overdose >150 mg/kg or chronic alcohol + therapeutic doses).", { x: 1.82, y: 5.52, w: 1.9, h: 1.4, fontSize: 9, color: C.navy, fontFace: "Calibri", valign: "middle" });
}
// Overdose warning box
s.addShape(pres.ShapeType.roundRect, { x: 4.0, y: 5.5, w: 9.0, h: 1.5, fill: { color: C.redBg }, line: { color: C.red, width: 1.5 }, rectRadius: 0.1 });
s.addText([
{ text: "OVERDOSE THRESHOLD (CRITICAL): ", options: { bold: true, color: C.red, fontSize: 13 } },
{ text: "Paracetamol toxicity begins at single doses >10 g (adults) / >150 mg/kg. Hepatic necrosis is the primary danger. Antidote: N-Acetylcysteine (NAC) IV/oral. NAPQI is the toxic intermediate metabolite.", options: { color: C.navy, fontSize: 12 } },
], { x: 4.15, y: 5.55, w: 8.7, h: 1.35, fontFace: "Calibri", valign: "middle" });
}
// ─── SLIDE 12: SPECIAL POPULATIONS ───────────────────────────────────────────
{
const s = addContentSlide("Special Populations — Dose Adjustments & Precautions");
const pops = [
{
group: "Elderly (>65 yrs)",
icon: "👴",
diclofenac: "Start at 50 mg/day; max 100 mg/day. High risk of GI ulceration and CV events. Add PPI. Avoid if possible.",
paracetamol: "Max 2 g/day. Reduce dose if hepatic/renal impairment. Preferred analgesic in elderly (better GI safety).",
color: C.teal, bg: "E3F2FD",
},
{
group: "Pregnancy",
icon: "🤰",
diclofenac: "AVOID in 3rd trimester (premature ductus arteriosus closure, oligohydramnios). Use minimum dose shortest time in 1st–2nd trimester only if needed.",
paracetamol: "Considered safest analgesic in pregnancy at recommended doses. Avoid high doses chronically. FDA Category B.",
color: C.amber, bg: C.yellowBg,
},
{
group: "Hepatic Impairment",
icon: "🫀",
diclofenac: "Avoid in severe hepatic disease (Child-Pugh C). Use cautiously in mild-moderate impairment; monitor LFTs.",
paracetamol: "Reduce to max 2 g/day in cirrhosis. High-dose paracetamol can cause acute-on-chronic liver failure.",
color: "7B1FA2", bg: "F3E5F5",
},
{
group: "Renal Impairment",
icon: "🩺",
diclofenac: "Avoid if GFR <30. In mild impairment: use minimum dose; monitor creatinine, electrolytes, BP.",
paracetamol: "Extend interval to every 6–8 hours in moderate-severe renal impairment. Preferred over NSAIDs.",
color: C.green, bg: C.greenBg,
},
];
pops.forEach((p, i) => {
const x = i < 2 ? 0.3 : 0.3;
const y = i < 2 ? (1.2 + i * 2.65) : (1.2 + i * 2.65);
const isRight = i % 2 !== 0;
const xPos = isRight ? 6.9 : 0.3;
const yPos = i < 2 ? 1.2 + (i % 2) * 2.65 : 1.2;
// Use grid: 2 cols x 2 rows
const col = i % 2;
const row = Math.floor(i / 2);
const finalX = 0.3 + col * 6.55;
const finalY = 1.2 + row * 2.7;
s.addShape(pres.ShapeType.roundRect, { x: finalX, y: finalY, w: 6.3, h: 2.5, fill: { color: p.bg }, line: { color: p.color, width: 1.5 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.rect, { x: finalX, y: finalY, w: 6.3, h: 0.55, fill: { color: p.color }, line: { color: p.color } });
s.addText(p.icon + " " + p.group, { x: finalX + 0.1, y: finalY, w: 6.0, h: 0.55, fontSize: 15, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
s.addText([
{ text: "Diclofenac: ", options: { bold: true, color: p.color, fontSize: 11.5 } },
{ text: p.diclofenac + "\n\n", options: { color: C.navy, fontSize: 11 } },
{ text: "Paracetamol: ", options: { bold: true, color: C.amber, fontSize: 11.5 } },
{ text: p.paracetamol, options: { color: C.navy, fontSize: 11 } },
], { x: finalX + 0.15, y: finalY + 0.6, w: 5.9, h: 1.8, fontFace: "Calibri", valign: "top" });
});
}
// ─── SLIDE 13: SIDE EFFECTS ───────────────────────────────────────────────────
{
const s = addContentSlide("Side Effects & Adverse Drug Reactions");
// Diclofenac ADRs
s.addShape(pres.ShapeType.roundRect, { x: 0.3, y: 1.15, w: 5.9, h: 5.7, fill: { color: C.offWhite }, line: { color: C.teal, width: 1.5 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.15, w: 5.9, h: 0.55, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("DICLOFENAC — ADRs", { x: 0.45, y: 1.15, w: 5.6, h: 0.55, fontSize: 16, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
const dADR = [
{ sys: "GI (Common 1–10%)", items: "Nausea, epigastric pain, diarrhoea, constipation, dyspepsia, flatulence", color: C.red },
{ sys: "GI (Serious)", items: "Peptic ulcer, GI bleeding, perforation, haematemesis", color: C.red },
{ sys: "Cardiovascular", items: "Increased MI risk (similar to COX-2 inhibitors), hypertension, oedema, heart failure exacerbation", color: "8B0000" },
{ sys: "Hepatic", items: "Raised ALT/AST (diclofenac hepatotoxicity); rarely fulminant hepatitis (dose-related)", color: C.amber },
{ sys: "Renal", items: "Acute kidney injury, fluid retention, hyperkalemia, renal papillary necrosis", color: "1565C0" },
{ sys: "CNS", items: "Headache, dizziness, drowsiness", color: C.teal },
{ sys: "Dermatological", items: "Rash, photosensitivity, erythema multiforme (rare)", color: "7B1FA2" },
{ sys: "Hypersensitivity", items: "Bronchospasm, angioedema, urticaria, anaphylaxis (rare)", color: C.red },
];
dADR.forEach((item, i) => {
s.addText([
{ text: item.sys + ": ", options: { bold: true, color: item.color, fontSize: 11 } },
{ text: item.items, options: { color: C.navy, fontSize: 10.5 } },
], { x: 0.45, y: 1.78 + i * 0.59, w: 5.6, h: 0.54, fontFace: "Calibri", valign: "top" });
});
// Paracetamol ADRs
s.addShape(pres.ShapeType.roundRect, { x: 6.8, y: 1.15, w: 6.2, h: 5.7, fill: { color: C.offWhite }, line: { color: C.amber, width: 1.5 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.rect, { x: 6.8, y: 1.15, w: 6.2, h: 0.55, fill: { color: C.amber }, line: { color: C.amber } });
s.addText("PARACETAMOL — ADRs", { x: 6.95, y: 1.15, w: 5.9, h: 0.55, fontSize: 16, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
const pADR = [
{ sys: "GI (Rare)", items: "Nausea, vomiting at higher doses; generally excellent GI tolerability", color: C.green },
{ sys: "Hepatic (CRITICAL)", items: "NAPQI accumulation → hepatocyte necrosis; centrilobular necrosis on overdose", color: C.red },
{ sys: "Renal", items: "Acute tubular necrosis on chronic overuse; renal papillary necrosis", color: "1565C0" },
{ sys: "Haematological", items: "Thrombocytopenia, leukopenia, neutropenia (rare, with prolonged use)", color: C.amber },
{ sys: "Hypersensitivity", items: "Rash, urticaria, angioedema (uncommon); true anaphylaxis rare", color: "7B1FA2" },
{ sys: "Metabolic", items: "Hypoglycaemia in overdose; metabolic acidosis in severe toxicity", color: C.red },
{ sys: "Drug Interaction", items: "Enhanced warfarin effect (INR elevation); rifampicin reduces efficacy", color: C.amber },
];
pADR.forEach((item, i) => {
s.addText([
{ text: item.sys + ": ", options: { bold: true, color: item.color, fontSize: 11 } },
{ text: item.items, options: { color: C.navy, fontSize: 10.5 } },
], { x: 6.95, y: 1.78 + i * 0.7, w: 5.9, h: 0.63, fontFace: "Calibri", valign: "top" });
});
}
// ─── SLIDE 14: DRUG INTERACTIONS ─────────────────────────────────────────────
{
const s = addContentSlide("Drug Interactions — What to Avoid Co-prescribing");
const interactions = [
{ drug: "Warfarin / Anticoagulants", risk: "MAJOR", effect: "Both diclofenac (antiplatelet) + paracetamol (INR elevation) increase bleeding risk. Monitor INR closely; avoid if possible.", color: C.red },
{ drug: "Other NSAIDs / Aspirin", risk: "MAJOR", effect: "Additive GI toxicity and increased ulceration risk. Do NOT combine. Low-dose aspirin cardioprotection may be reduced by diclofenac.", color: C.red },
{ drug: "ACE Inhibitors / ARBs", risk: "MODERATE", effect: "Diclofenac reduces antihypertensive effect; risk of acute kidney injury (triple whammy with diuretics).", color: C.amber },
{ drug: "Diuretics (loop, thiazide)", risk: "MODERATE", effect: "Reduced diuretic efficacy; increased risk of renal impairment when combined with diclofenac.", color: C.amber },
{ drug: "Methotrexate", risk: "MAJOR", effect: "NSAIDs increase methotrexate plasma levels → increased toxicity (myelosuppression, mucositis).", color: C.red },
{ drug: "SSRIs / SNRIs", risk: "MODERATE", effect: "Combined with NSAIDs: increased GI bleeding risk. Add PPI if combination unavoidable.", color: C.amber },
{ drug: "Lithium", risk: "MAJOR", effect: "Diclofenac increases lithium plasma concentration → lithium toxicity risk. Monitor levels.", color: C.red },
{ drug: "Alcohol (Ethanol)", risk: "MAJOR", effect: "Both paracetamol (hepatotoxicity) and diclofenac (GI bleed) risks multiply. Strictly avoid concurrent heavy alcohol use.", color: C.red },
{ drug: "Corticosteroids", risk: "MODERATE", effect: "Additive risk of GI ulceration and perforation. Use with PPI cover.", color: C.amber },
{ drug: "Rifampicin", risk: "MINOR", effect: "Rifampicin induces CYP450 → reduced paracetamol efficacy; increases toxic NAPQI metabolite.", color: C.green },
];
const rowH = 0.57;
interactions.forEach((item, i) => {
const y = 1.15 + i * rowH;
const bg = item.risk === "MAJOR" ? C.redBg : item.risk === "MODERATE" ? C.yellowBg : C.greenBg;
const badgeColor = item.risk === "MAJOR" ? C.red : item.risk === "MODERATE" ? C.amber : C.green;
s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 12.7, h: rowH - 0.04, fill: { color: bg }, line: { color: C.lightGray, width: 0.4 } });
s.addShape(pres.ShapeType.roundRect, { x: 0.35, y: y + 0.07, w: 1.1, h: 0.38, fill: { color: badgeColor }, line: { color: badgeColor }, rectRadius: 0.06 });
s.addText(item.risk, { x: 0.35, y: y + 0.07, w: 1.1, h: 0.38, fontSize: 9.5, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(item.drug, { x: 1.55, y: y + 0.06, w: 2.6, h: 0.45, fontSize: 12, bold: true, color: C.navy, fontFace: "Calibri", valign: "middle" });
s.addText(item.effect, { x: 4.25, y: y + 0.06, w: 8.6, h: 0.45, fontSize: 11, color: C.navy, fontFace: "Calibri", valign: "middle" });
});
}
// ─── SLIDE 15: QUICK REFERENCE SUMMARY ───────────────────────────────────────
{
const s = addContentSlide("Quick Reference Summary");
// Diclofenac quick ref
s.addShape(pres.ShapeType.roundRect, { x: 0.3, y: 1.15, w: 6.1, h: 5.7, fill: { color: "E8F4FD" }, line: { color: C.teal, width: 2 }, rectRadius: 0.12 });
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.15, w: 6.1, h: 0.6, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("DICLOFENAC 50–75 mg", { x: 0.45, y: 1.15, w: 5.8, h: 0.6, fontSize: 17, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
const dRef = [
["When to use:", "Pain + inflammation (musculoskeletal, arthritis, injury, dysmenorrhoea, dental)"],
["Mild dose:", "25 mg TID (75 mg/day)"],
["Moderate dose:", "50 mg BID–TID (100–150 mg/day)"],
["Severe dose:", "75 mg BID (150 mg/day MAX)"],
["Max daily:", "150 mg/day (adults); 225 mg/day RA"],
["Frequency:", "2–3 times daily (max 3 doses/day)"],
["Food timing:", "ALWAYS after food / with milk"],
["Duration:", "Shortest effective duration (≤7–10 days acute)"],
["Avoid in:", "PUD, CV disease, severe renal/hepatic failure, 3rd trimester, children <15"],
];
dRef.forEach(([label, val], i) => {
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.8 + i * 0.54, w: 6.1, h: 0.02, fill: { color: i % 2 === 0 ? C.lightGray : "E8F4FD" }, line: { color: C.lightGray } });
s.addText([
{ text: label + " ", options: { bold: true, color: C.teal, fontSize: 11 } },
{ text: val, options: { color: C.navy, fontSize: 11 } },
], { x: 0.45, y: 1.82 + i * 0.54, w: 5.8, h: 0.5, fontFace: "Calibri", valign: "middle" });
});
// Paracetamol quick ref
s.addShape(pres.ShapeType.roundRect, { x: 6.9, y: 1.15, w: 6.1, h: 5.7, fill: { color: C.yellowBg }, line: { color: C.amber, width: 2 }, rectRadius: 0.12 });
s.addShape(pres.ShapeType.rect, { x: 6.9, y: 1.15, w: 6.1, h: 0.6, fill: { color: C.amber }, line: { color: C.amber } });
s.addText("PARACETAMOL 325–1000 mg", { x: 7.05, y: 1.15, w: 5.8, h: 0.6, fontSize: 17, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
const pRef = [
["When to use:", "Mild-moderate pain, fever, headache, adjunct to diclofenac"],
["Mild dose:", "500 mg (every 4–6h)"],
["Moderate dose:", "650 mg (every 4–6h)"],
["Severe dose:", "1000 mg (every 4–6h)"],
["Max daily:", "4000 mg/day adults; 2000 mg elderly"],
["Frequency:", "Every 4–6 hours (max 4 doses/24h)"],
["Food timing:", "Can take with or without food"],
["Duration:", "Up to 5–7 days; reassess after 3 days"],
["Avoid in:", "Hepatic failure, G6PD deficiency, chronic alcoholism, paracetamol allergy"],
];
pRef.forEach(([label, val], i) => {
s.addText([
{ text: label + " ", options: { bold: true, color: C.amber, fontSize: 11 } },
{ text: val, options: { color: C.navy, fontSize: 11 } },
], { x: 7.05, y: 1.82 + i * 0.54, w: 5.8, h: 0.5, fontFace: "Calibri", valign: "middle" });
});
}
// ─── SLIDE 16: CLOSING ────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: C.navy }, line: { color: C.navy } });
s.addShape(pres.ShapeType.ellipse, { x: 9.5, y: -1.5, w: 6, h: 6, fill: { color: C.teal, transparency: 80 }, line: { color: C.teal, transparency: 80 } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.25, h: 7.5, fill: { color: C.tealLight }, line: { color: C.tealLight } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 6.8, w: 13.3, h: 0.7, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("Key Clinical Takeaways", { x: 0.5, y: 0.7, w: 12.3, h: 0.7, fontSize: 32, bold: true, color: C.white, align: "center", fontFace: "Calibri" });
s.addShape(pres.ShapeType.rect, { x: 3, y: 1.45, w: 7.3, h: 0.05, fill: { color: C.tealLight }, line: { color: C.tealLight } });
const points = [
"Always prescribe after food — diclofenac causes significant GI irritation on empty stomach",
"Never exceed 150 mg/day diclofenac or 4 g/day paracetamol — life-threatening toxicity",
"Avoid diclofenac in established cardiovascular, severe renal/hepatic disease, or active GI ulcer",
"Reduce paracetamol to 2 g/day in elderly, liver disease, or chronic alcohol use",
"Short-term use preferred (≤7–10 days) — reassess and taper at earliest opportunity",
"Combination tablets: max 3 tablets/day — account for total paracetamol from all sources",
"Always check for drug interactions — especially anticoagulants, methotrexate, SSRIs",
];
points.forEach((pt, i) => {
s.addShape(pres.ShapeType.ellipse, { x: 0.55, y: 1.65 + i * 0.7, w: 0.28, h: 0.28, fill: { color: C.tealLight }, line: { color: C.tealLight } });
s.addText(pt, { x: 0.95, y: 1.62 + i * 0.7, w: 11.8, h: 0.58, fontSize: 14, color: C.white, fontFace: "Calibri", valign: "middle" });
});
s.addText("For educational use. Always consult current prescribing guidelines and product monograph.", {
x: 0.5, y: 6.82, w: 12.3, h: 0.5,
fontSize: 11, color: C.lightGray, align: "center", fontFace: "Calibri", italic: true, valign: "middle",
});
}
// ─── Save ─────────────────────────────────────────────────────────────────────
const outputPath = "/home/daytona/workspace/diclofenac-paracetamol-ppt/Diclofenac_Paracetamol_Clinical_Guide.pptx";
pres.writeFile({ fileName: outputPath }).then(() => {
console.log("PPT saved:", outputPath);
}).catch(e => console.error("Error saving PPT:", e));
cd /home/daytona/workspace/diclofenac-paracetamol-ppt && node build.js 2>&1
~/diclofenac-paracetamol-ppt/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/diclofenac-paracetamol-ppt/build.js'
cd /home/daytona/workspace/diclofenac-paracetamol-ppt && node build.js 2>&1
~/diclofenac-paracetamol-ppt/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/diclofenac-paracetamol-ppt/build.js'
~/diclofenac-paracetamol-ppt/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/diclofenac-paracetamol-ppt/build.js'
~/diclofenac-paracetamol-ppt/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/diclofenac-paracetamol-ppt/build.js'
~/diclofenac-paracetamol-ppt/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/diclofenac-paracetamol-ppt/build.js'
~/diclofenac-paracetamol-ppt/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/diclofenac-paracetamol-ppt/build.js'
cd /home/daytona/workspace/diclofenac-paracetamol-ppt && node build.js 2>&1
ls -lh /home/daytona/workspace/diclofenac-paracetamol-ppt/Diclofenac_Paracetamol_Clinical_Guide.pptx
Diclofenac Paracetamol Clinical Guide
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title slide (dark navy + teal design) |
| 2 | Drug overview - Diclofenac vs. Paracetamol mechanism side-by-side |
| 3 | Mechanism of Action - COX pathway diagram (drawn shapes) |
| 4 | Indications - 8 condition cards (OA, RA, AS, post-op, dysmenorrhoea, dental pain, fever, sprains) |
| 5 | Clinical illustrations - Drawn diagrams of Osteoarthritis, Rheumatoid Arthritis, Ankylosing Spondylitis |
| 6 | Diclofenac dosing table by severity - Mild/Moderate/Severe/AS/Dysmenorrhoea/Migraine with dose, frequency, max daily, duration |
| 7 | Paracetamol dosing table by severity - Adults/Elderly/Children/Hepatic with full dose info |
| 8 | Combination tablet dosing + food timing (ALWAYS after food) + max frequency rules |
| 9 | Section divider - Contraindications |
| 10 | Diclofenac - Absolute (11 must-avoids) vs. Relative contraindications (11 cautions) |
| 11 | Paracetamol - Absolute contraindications + overdose/NAPQI hepatotoxicity warning |
| 12 | Special populations - Elderly, Pregnancy, Hepatic, Renal adjustments |
| 13 | Side effects & ADRs - System-by-system for both drugs |
| 14 | Drug interactions table (10 interactions - warfarin, methotrexate, SSRIs, etc.) |
| 15 | Quick reference summary - both drugs side by side |
| 16 | Key clinical takeaways (closing dark slide) |