Hi
Pharmacology on discuss first pass metabolism as pptx
mkdir -p /home/daytona/workspace/first-pass-metabolism
~/first-pass-metabolism/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "First Pass Metabolism";
pres.author = "Pharmacology – Medical Education";
// ─── Colour palette ───────────────────────────────────────────────────────────
const C = {
darkNavy: "0D1B3E", // dominant dark bg
midBlue: "1A3A6B", // panel bg
accent: "27AE60", // green accent
accentAlt: "2980B9", // blue accent
white: "FFFFFF",
offWhite: "EAF4FB",
lightGray: "D5E8F5",
yellow: "F1C40F",
red: "E74C3C",
orange: "E67E22",
text: "FFFFFF",
subtext: "BDE0F7",
};
// ─── Helpers ──────────────────────────────────────────────────────────────────
function addBg(slide, color) {
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 10, h: 5.625,
fill: { color: color },
line: { color: color },
});
}
function addHeader(slide, title, subtitle) {
// top accent bar
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 10, h: 0.08,
fill: { color: C.accent },
line: { color: C.accent },
});
slide.addText(title, {
x: 0.4, y: 0.15, w: 9.2, h: 0.55,
fontSize: 26, bold: true, color: C.white, margin: 0,
});
if (subtitle) {
slide.addText(subtitle, {
x: 0.4, y: 0.72, w: 9.2, h: 0.3,
fontSize: 13, color: C.subtext, italic: true, margin: 0,
});
}
// divider line
slide.addShape(pres.shapes.RECTANGLE, {
x: 0.4, y: 1.06, w: 9.2, h: 0.03,
fill: { color: C.midBlue },
line: { color: C.midBlue },
});
}
function bulletList(slide, items, opts) {
const entries = items.map((item, i) => {
const last = (i === items.length - 1);
return { text: item, options: { bullet: { code: "25B6", color: C.accent }, breakLine: !last } };
});
slide.addText(entries, { ...opts, color: C.white, fontSize: 14 });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 – Title
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.darkNavy);
// large accent panel
s.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 1.6, w: 10, h: 2.5,
fill: { color: C.midBlue },
line: { color: C.midBlue },
});
s.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 1.6, w: 0.25, h: 2.5,
fill: { color: C.accent },
line: { color: C.accent },
});
s.addText("First-Pass Metabolism", {
x: 0.5, y: 1.8, w: 9, h: 0.9,
fontSize: 38, bold: true, color: C.white,
align: "center", margin: 0,
});
s.addText("Pharmacokinetics | Drug Bioavailability | Clinical Relevance", {
x: 0.5, y: 2.78, w: 9, h: 0.35,
fontSize: 15, italic: true, color: C.subtext, align: "center", margin: 0,
});
s.addText("Based on: Lippincott Pharmacology · Katzung · Goodman & Gilman · Goldman-Cecil Medicine", {
x: 0.5, y: 5.1, w: 9, h: 0.3,
fontSize: 9, color: C.subtext, align: "center", margin: 0,
});
// decorative circles
s.addShape(pres.shapes.OVAL, { x: 8.2, y: 0.2, w: 1.8, h: 1.8, fill: { color: C.accent, transparency: 80 }, line: { color: C.accent, transparency: 80 } });
s.addShape(pres.shapes.OVAL, { x: -0.4, y: 3.8, w: 1.4, h: 1.4, fill: { color: C.accentAlt, transparency: 80 }, line: { color: C.accentAlt, transparency: 80 } });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 – Definition
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.darkNavy);
addHeader(s, "What is First-Pass Metabolism?", "Also known as the presystemic effect");
// Definition box
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 0.4, y: 1.2, w: 9.2, h: 1.35,
fill: { color: C.midBlue },
line: { color: C.accent, size: 2 },
rectRadius: 0.1,
});
s.addText([
{ text: "Definition: ", options: { bold: true, color: C.yellow } },
{ text: "When an orally administered drug is absorbed from the GI tract and enters the portal circulation, it passes through the liver before reaching the systemic circulation. If the drug is rapidly metabolised during this initial passage through the liver (or gut wall), the amount of unchanged (active) drug reaching systemic circulation is significantly reduced.", options: { color: C.white } },
], { x: 0.55, y: 1.28, w: 8.9, h: 1.2, fontSize: 13, margin: 0 });
// Key concept bullets
bulletList(s, [
"Occurs primarily in the liver, but also in the gut wall (intestinal enzymes)",
"Results in lower bioavailability compared to IV or other systemic routes",
"Affects the amount of active drug reaching the target tissue",
"Can be bypassed using sublingual, transdermal, IV, or inhalation routes",
], { x: 0.4, y: 2.65, w: 9.2, h: 2.1 });
s.addText("Lippincott Pharmacology · Goldman-Cecil Medicine", {
x: 0.4, y: 5.3, w: 9.2, h: 0.2,
fontSize: 8, color: C.subtext, align: "right", margin: 0,
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 – Mechanism / Pathway diagram (text-based)
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.darkNavy);
addHeader(s, "Mechanism & Pathway", "How oral drugs undergo first-pass metabolism");
const boxW = 1.8, boxH = 0.62, rowY = 1.25, arrowY = 1.49;
const steps = [
{ label: "Oral Drug\nAdministration", x: 0.2, color: C.accentAlt },
{ label: "GI Tract\nAbsorption", x: 2.15, color: C.accentAlt },
{ label: "Portal\nVein", x: 4.1, color: C.orange },
{ label: "Liver\n(Hepatic Metabolism)", x: 6.05, color: C.red },
{ label: "Systemic\nCirculation", x: 8.0, color: C.accent },
];
steps.forEach((st, i) => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: st.x, y: rowY, w: boxW, h: boxH,
fill: { color: st.color },
line: { color: C.white, size: 1 },
rectRadius: 0.08,
});
s.addText(st.label, {
x: st.x, y: rowY, w: boxW, h: boxH,
fontSize: 10.5, bold: true, color: C.white, align: "center", valign: "middle", margin: 0,
});
if (i < steps.length - 1) {
s.addShape(pres.shapes.RIGHT_ARROW, {
x: st.x + boxW, y: arrowY, w: 0.35, h: 0.22,
fill: { color: C.yellow },
line: { color: C.yellow },
});
}
});
// Annotations below
s.addText("↓ Drug concentration after liver passage = reduced bioavailability", {
x: 0.4, y: 2.1, w: 9.2, h: 0.3,
fontSize: 13, color: C.yellow, bold: true, align: "center", margin: 0,
});
// Key enzyme info
s.addShape(pres.shapes.RECTANGLE, {
x: 0.4, y: 2.5, w: 4.3, h: 2.6,
fill: { color: C.midBlue },
line: { color: C.accentAlt, size: 1 },
});
s.addText("Key Enzymes Involved", {
x: 0.55, y: 2.57, w: 4, h: 0.3,
fontSize: 13, bold: true, color: C.accentAlt, margin: 0,
});
bulletList(s, [
"CYP450 enzymes (CYP3A4 most common)",
"CYP2D6, CYP2C9, CYP2C19",
"Monoamine oxidases (MAO)",
"Glucuronosyl transferases (UGTs)",
"Sulfotransferases (SULTs)",
], { x: 0.55, y: 2.95, w: 4.0, h: 2.0, fontSize: 12 });
s.addShape(pres.shapes.RECTANGLE, {
x: 5.0, y: 2.5, w: 4.6, h: 2.6,
fill: { color: C.midBlue },
line: { color: C.orange, size: 1 },
});
s.addText("Sites of First-Pass Metabolism", {
x: 5.15, y: 2.57, w: 4.3, h: 0.3,
fontSize: 13, bold: true, color: C.orange, margin: 0,
});
bulletList(s, [
"Liver – primary & most significant site",
"Intestinal wall (enterocytes) – CYP3A4",
"Lung – minor site for some inhaled drugs",
"Plasma esterases – (minor role)",
], { x: 5.15, y: 2.95, w: 4.3, h: 2.0, fontSize: 12 });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 – Bioavailability & Extraction Ratio
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.darkNavy);
addHeader(s, "Bioavailability & Extraction Ratio", "Quantifying first-pass metabolism");
// Bioavailability box
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 0.4, y: 1.2, w: 9.2, h: 0.75,
fill: { color: C.midBlue },
line: { color: C.accent, size: 1 },
rectRadius: 0.08,
});
s.addText([
{ text: "Bioavailability (F): ", options: { bold: true, color: C.yellow } },
{ text: "Fraction of administered dose that reaches systemic circulation unchanged • 0 < F ≤ 1", options: { color: C.white } },
], { x: 0.55, y: 1.26, w: 8.8, h: 0.6, fontSize: 13, valign: "middle", margin: 0 });
// Formula
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 2.5, y: 2.05, w: 5, h: 0.65,
fill: { color: "1B2E50" },
line: { color: C.yellow, size: 1.5 },
rectRadius: 0.08,
});
s.addText("F = AUC(oral) / AUC(IV) × 100%", {
x: 2.5, y: 2.05, w: 5, h: 0.65,
fontSize: 15, bold: true, color: C.yellow, align: "center", valign: "middle", margin: 0,
});
// Extraction ratio explanation
s.addText("Hepatic Extraction Ratio (ER)", {
x: 0.4, y: 2.85, w: 9.2, h: 0.32,
fontSize: 14, bold: true, color: C.accentAlt, margin: 0,
});
s.addText([
{ text: "ER = (C", options: { color: C.white } },
{ text: "in", options: { color: C.white, subscript: true } },
{ text: " – C", options: { color: C.white } },
{ text: "out", options: { color: C.white, subscript: true } },
{ text: ") / C", options: { color: C.white } },
{ text: "in", options: { color: C.white, subscript: true } },
{ text: " → F ≈ 1 – ER (for orally administered drugs)", options: { color: C.subtext } },
], { x: 0.4, y: 3.18, w: 9.2, h: 0.4, fontSize: 13, margin: 0 });
// High vs Low ER table
const tData = [
[
{ text: "Category", options: { bold: true, color: C.white, fill: "1A3A6B" } },
{ text: "Extraction Ratio", options: { bold: true, color: C.white, fill: "1A3A6B" } },
{ text: "Bioavailability", options: { bold: true, color: C.white, fill: "1A3A6B" } },
{ text: "Example Drugs", options: { bold: true, color: C.white, fill: "1A3A6B" } },
],
[
{ text: "High ER", options: { bold: true, color: C.red } },
{ text: "> 0.7 (70%)", options: { color: C.white } },
{ text: "Low (< 30%)", options: { color: C.red } },
{ text: "Morphine, Lidocaine, Propranolol, Nitroglycerin, Isoniazid", options: { color: C.white } },
],
[
{ text: "Intermediate", options: { bold: true, color: C.orange } },
{ text: "0.3 – 0.7", options: { color: C.white } },
{ text: "Moderate", options: { color: C.orange } },
{ text: "Aspirin, Codeine, Nifedipine", options: { color: C.white } },
],
[
{ text: "Low ER", options: { bold: true, color: C.accent } },
{ text: "< 0.3 (30%)", options: { color: C.white } },
{ text: "High (> 70%)", options: { color: C.accent } },
{ text: "Warfarin, Diazepam, Phenytoin, Theophylline", options: { color: C.white } },
],
];
s.addTable(tData, {
x: 0.4, y: 3.68, w: 9.2, h: 1.7,
border: { pt: 0.5, color: "2C4A7A" },
rowH: 0.38,
fill: "0D1B3E",
fontSize: 11,
valign: "middle",
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 – Clinical Examples
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.darkNavy);
addHeader(s, "Classic Clinical Examples", "Drugs significantly affected by first-pass metabolism");
const drugs = [
{ name: "Nitroglycerin", color: C.red, detail: "> 90% cleared on first pass\nGiven sublingually, transdermally, or IV" },
{ name: "Morphine", color: C.orange, detail: "Oral bioavailability ~25%\nDosing must be increased for oral route" },
{ name: "Lidocaine", color: C.accentAlt, detail: "Extensive hepatic metabolism\nNOT given orally – metabolites cause CNS toxicity" },
{ name: "Propranolol", color: C.accent, detail: "High extraction ratio\nLarge inter-individual variation due to hepatic blood flow" },
{ name: "Verapamil", color: C.yellow, detail: "Oral bioavailability < 40%\nUsed for arrhythmias; metabolites active" },
{ name: "Naloxone", color: "9B59B6", detail: "Extensive first-pass\nMust be given IV/IM, not orally for overdose reversal" },
];
const cols = 3, rows = 2;
const boxW = 2.9, boxH = 1.55, gapX = 0.2, gapY = 0.2;
const startX = 0.35, startY = 1.2;
drugs.forEach((drug, i) => {
const col = i % cols;
const row = Math.floor(i / cols);
const x = startX + col * (boxW + gapX);
const y = startY + row * (boxH + gapY);
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x, y, w: boxW, h: boxH,
fill: { color: C.midBlue },
line: { color: drug.color, size: 2 },
rectRadius: 0.1,
});
// accent top bar
s.addShape(pres.shapes.RECTANGLE, {
x, y, w: boxW, h: 0.26,
fill: { color: drug.color },
line: { color: drug.color },
});
s.addText(drug.name, {
x, y, w: boxW, h: 0.26,
fontSize: 13, bold: true, color: C.white, align: "center", valign: "middle", margin: 0,
});
s.addText(drug.detail, {
x: x + 0.1, y: y + 0.3, w: boxW - 0.2, h: boxH - 0.38,
fontSize: 11, color: C.white, valign: "top", margin: 0,
});
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 – Routes that Bypass First-Pass
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.darkNavy);
addHeader(s, "Routes that Bypass First-Pass Metabolism", "Strategies to improve bioavailability");
const routes = [
{
route: "Sublingual / Buccal",
color: C.accent,
mech: "Drug absorbed into systemic veins (not portal), bypasses liver entirely",
eg: "Nitroglycerin, buprenorphine, fentanyl",
bypass: "Complete",
},
{
route: "Transdermal",
color: C.accentAlt,
mech: "Drug diffuses through skin into systemic veins, avoids portal circulation",
eg: "Nitroglycerin patches, fentanyl patches, nicotine patches",
bypass: "Complete",
},
{
route: "Intravenous (IV)",
color: C.yellow,
mech: "Drug directly enters systemic circulation; bioavailability = 100%",
eg: "Lidocaine, morphine IV, naloxone",
bypass: "Complete (F=1)",
},
{
route: "Inhalation",
color: C.orange,
mech: "Bypasses hepatic first-pass; lung may metabolise some drugs (minor)",
eg: "Salbutamol, fluticasone, some opioids (nasal insufflation)",
bypass: "Near complete",
},
{
route: "Rectal",
color: "9B59B6",
mech: "Lower rectum drains to inferior vena cava; upper rectum drains to portal vein",
eg: "Diazepam, paracetamol suppositories",
bypass: "~50% (variable)",
},
{
route: "Intramuscular / Subcutaneous",
color: C.red,
mech: "Absorbed into systemic not portal circulation; avoids hepatic first-pass",
eg: "Morphine IM, insulin SC, benzathine penicillin IM",
bypass: "Complete",
},
];
const cols = 2, boxW = 4.5, boxH = 1.42, gapX = 0.3, gapY = 0.12;
const startX = 0.35, startY = 1.18;
routes.forEach((r, i) => {
const col = i % cols;
const row = Math.floor(i / cols);
const x = startX + col * (boxW + gapX);
const y = startY + row * (boxH + gapY);
s.addShape(pres.shapes.RECTANGLE, {
x, y, w: boxW, h: boxH,
fill: { color: C.midBlue },
line: { color: r.color, size: 1 },
});
// left accent strip
s.addShape(pres.shapes.RECTANGLE, {
x, y, w: 0.18, h: boxH,
fill: { color: r.color },
line: { color: r.color },
});
s.addText(r.route, {
x: x + 0.25, y: y + 0.05, w: boxW - 0.3, h: 0.28,
fontSize: 13, bold: true, color: r.color, margin: 0,
});
s.addText(r.mech, {
x: x + 0.25, y: y + 0.35, w: boxW - 0.3, h: 0.45,
fontSize: 10.5, color: C.white, margin: 0,
});
s.addText([
{ text: "e.g. ", options: { italic: true, color: C.subtext } },
{ text: r.eg, options: { color: C.subtext } },
{ text: " | Bypass: ", options: { color: C.subtext } },
{ text: r.bypass, options: { bold: true, color: C.yellow } },
], { x: x + 0.25, y: y + 0.84, w: boxW - 0.3, h: 0.5, fontSize: 10, margin: 0 });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 – Factors Affecting First-Pass Metabolism
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.darkNavy);
addHeader(s, "Factors Affecting First-Pass Metabolism", "What increases or decreases the effect?");
const left = [
{ head: "Liver Disease (Cirrhosis)", text: "Reduced hepatic function + portosystemic shunting → increased bioavailability for high-ER drugs (e.g. morphine, midazolam, nifedipine almost doubled)", color: C.red },
{ head: "Hepatic Blood Flow", text: "High-ER drugs are flow-limited. Decreased flow (heart failure, shock) → less drug presented to liver → higher plasma levels", color: C.orange },
{ head: "Enzyme Induction", text: "Rifampicin, phenytoin, carbamazepine induce CYP enzymes → greater first-pass → lower bioavailability", color: C.accentAlt },
];
const right = [
{ head: "Enzyme Inhibition", text: "Grapefruit juice inhibits intestinal CYP3A4 → reduced first-pass → increased drug levels (e.g. statins, felodipine)", color: C.yellow },
{ head: "Genetic Polymorphism", text: "CYP2D6 poor metabolisers show higher bioavailability for drugs like codeine; CYP2C19 variants affect omeprazole levels", color: C.accent },
{ head: "Age & Renal Disease", text: "Elderly: reduced hepatic mass & blood flow. CKD: reduced first-pass for β-blockers, dextropropoxyphene, dihydrocodeine", color: "9B59B6" },
];
[left, right].forEach((group, gi) => {
const startX = gi === 0 ? 0.3 : 5.2;
group.forEach((item, i) => {
const y = 1.18 + i * 1.43;
s.addShape(pres.shapes.RECTANGLE, {
x: startX, y, w: 4.5, h: 1.28,
fill: { color: C.midBlue },
line: { color: item.color, size: 1 },
});
s.addShape(pres.shapes.RECTANGLE, {
x: startX, y, w: 0.18, h: 1.28,
fill: { color: item.color },
line: { color: item.color },
});
s.addText(item.head, {
x: startX + 0.25, y: y + 0.05, w: 4.1, h: 0.28,
fontSize: 12, bold: true, color: item.color, margin: 0,
});
s.addText(item.text, {
x: startX + 0.25, y: y + 0.36, w: 4.1, h: 0.87,
fontSize: 10.5, color: C.white, margin: 0,
});
});
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 – Clinical Implications & Pro-Drugs
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.darkNavy);
addHeader(s, "Clinical Implications", "Pro-drugs, dosing adjustments & therapeutic considerations");
// Left: prodrugs
s.addShape(pres.shapes.RECTANGLE, {
x: 0.3, y: 1.18, w: 4.5, h: 4.1,
fill: { color: C.midBlue },
line: { color: C.accent, size: 1.5 },
});
s.addText("Pro-drugs Activated by First-Pass", {
x: 0.45, y: 1.25, w: 4.2, h: 0.35,
fontSize: 13, bold: true, color: C.accent, margin: 0,
});
s.addText("Some drugs are deliberately designed as inactive pro-drugs that are activated during first-pass hepatic metabolism:", {
x: 0.45, y: 1.63, w: 4.2, h: 0.55,
fontSize: 11, color: C.white, margin: 0,
});
const prodrugs = [
"Enalapril → enalaprilat (ACE inhibitor)",
"Codeine → morphine (CYP2D6)",
"Clopidogrel → active thienopyridine",
"Levodopa → dopamine (CNS)",
"Tamoxifen → endoxifen (anti-oestrogen)",
];
bulletList(s, prodrugs, { x: 0.45, y: 2.22, w: 4.2, h: 2.0, fontSize: 12 });
s.addText("Note: CYP2D6 poor metabolisers get reduced effect from codeine!", {
x: 0.45, y: 4.28, w: 4.2, h: 0.68,
fontSize: 10.5, italic: true, color: C.yellow, margin: 0,
});
// Right: dosing adjustments
s.addShape(pres.shapes.RECTANGLE, {
x: 5.1, y: 1.18, w: 4.55, h: 4.1,
fill: { color: C.midBlue },
line: { color: C.accentAlt, size: 1.5 },
});
s.addText("Dosing & Therapeutic Considerations", {
x: 5.25, y: 1.25, w: 4.3, h: 0.35,
fontSize: 13, bold: true, color: C.accentAlt, margin: 0,
});
const tips = [
"Increase oral dose to compensate for first-pass loss (e.g. morphine oral:IV ratio = 3:1)",
"In liver disease, reduce doses of high-ER drugs to avoid toxicity",
"Monitor for drug interactions affecting CYP enzymes (inducers / inhibitors)",
"Consider alternative routes for drugs with >70% first-pass loss",
"Therapeutic drug monitoring (TDM) essential for narrow therapeutic index drugs",
"Grapefruit juice avoidance – inhibits CYP3A4 in gut wall",
"Generic substitution: different formulations alter first-pass extent",
];
bulletList(s, tips, { x: 5.25, y: 1.63, w: 4.3, h: 3.6, fontSize: 11.5 });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 – Summary Table
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.darkNavy);
addHeader(s, "Summary: First-Pass Metabolism at a Glance", "Key concepts for exams & clinical practice");
const rows = [
[
{ text: "Concept", options: { bold: true, fill: "1A3A6B", color: C.yellow } },
{ text: "Key Point", options: { bold: true, fill: "1A3A6B", color: C.yellow } },
],
[
{ text: "Definition" },
{ text: "Hepatic/intestinal metabolism of orally absorbed drug before reaching systemic circulation" },
],
[
{ text: "Route affected" },
{ text: "Oral (enteral) – most significant. Also affects some rectal & lung routes" },
],
[
{ text: "Main site" },
{ text: "Liver (CYP3A4, CYP2D6, MAO, UGT) + intestinal wall enterocytes" },
],
[
{ text: "Effect on F" },
{ text: "Reduces bioavailability (F); high-ER drugs have low oral F (<30%)" },
],
[
{ text: "Classic example" },
{ text: "Nitroglycerin: >90% cleared; must use sublingual or transdermal routes" },
],
[
{ text: "Bypass routes" },
{ text: "IV > Sublingual > Transdermal > Inhalation > Rectal (partial)" },
],
[
{ text: "Disease impact" },
{ text: "Liver cirrhosis increases bioavailability of high-ER drugs (potential toxicity)" },
],
[
{ text: "Pro-drugs" },
{ text: "Some drugs use first-pass activation: codeine→morphine, enalapril→enalaprilat" },
],
];
const rowStyles = rows.map((r, i) => ({
fill: i === 0 ? "1A3A6B" : (i % 2 === 0 ? "0D1B3E" : "122247"),
color: C.white,
}));
const tableRows = rows.map((row, i) =>
row.map(cell => ({
text: cell.text,
options: {
bold: cell.options?.bold || false,
color: cell.options?.color || C.white,
fill: cell.options?.fill || (i === 0 ? "1A3A6B" : (i % 2 === 0 ? "0D1B3E" : "122247")),
align: "left",
valign: "middle",
},
}))
);
s.addTable(tableRows, {
x: 0.4, y: 1.18, w: 9.2, h: 4.2,
colW: [2.2, 7.0],
border: { pt: 0.5, color: "2C4A7A" },
fontSize: 11.5,
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 – Key Takeaways
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.darkNavy);
// top accent bar
s.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 10, h: 0.08,
fill: { color: C.accent },
line: { color: C.accent },
});
s.addText("Key Takeaways", {
x: 0.5, y: 0.18, w: 9, h: 0.55,
fontSize: 28, bold: true, color: C.white, align: "center", margin: 0,
});
const takeaways = [
{ num: "1", text: "First-pass metabolism reduces the amount of active drug reaching systemic circulation after oral administration.", color: C.accent },
{ num: "2", text: "High extraction ratio (ER > 0.7) drugs have low bioavailability and significant inter-individual variability.", color: C.accentAlt },
{ num: "3", text: "Routes that bypass the liver (sublingual, transdermal, IV) achieve higher drug concentrations.", color: C.yellow },
{ num: "4", text: "Liver disease and enzyme inhibitors (e.g. grapefruit) increase bioavailability and risk of toxicity.", color: C.orange },
{ num: "5", text: "Pro-drugs (codeine, enalapril) rely on first-pass activation – genetic polymorphisms in CYP enzymes alter their efficacy.", color: C.red },
];
takeaways.forEach((t, i) => {
const y = 0.9 + i * 0.9;
s.addShape(pres.shapes.OVAL, {
x: 0.35, y: y + 0.05, w: 0.52, h: 0.52,
fill: { color: t.color },
line: { color: t.color },
});
s.addText(t.num, {
x: 0.35, y: y + 0.05, w: 0.52, h: 0.52,
fontSize: 17, bold: true, color: C.white, align: "center", valign: "middle", margin: 0,
});
s.addShape(pres.shapes.RECTANGLE, {
x: 0.95, y: y, w: 8.7, h: 0.62,
fill: { color: C.midBlue },
line: { color: t.color, size: 1 },
});
s.addText(t.text, {
x: 1.1, y: y, w: 8.5, h: 0.62,
fontSize: 13, color: C.white, valign: "middle", margin: 0,
});
});
s.addText("References: Lippincott Pharmacology · Katzung Basic & Clinical Pharmacology 16E · Goodman & Gilman 14E · Goldman-Cecil Medicine", {
x: 0.4, y: 5.35, w: 9.2, h: 0.22,
fontSize: 8, color: C.subtext, align: "center", margin: 0,
});
}
// ─── Write file ───────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/first-pass-metabolism/First_Pass_Metabolism.pptx" })
.then(() => console.log("DONE: First_Pass_Metabolism.pptx created"))
.catch(e => { console.error("ERROR:", e); process.exit(1); });
cd /home/daytona/workspace/first-pass-metabolism && node build.js
ls -lh /home/daytona/workspace/first-pass-metabolism/
First Pass Metabolism
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title slide |
| 2 | Definition - what first-pass metabolism is (Lippincott + Goldman-Cecil) |
| 3 | Mechanism & Pathway - step-by-step diagram (GI tract → portal vein → liver → systemic circulation), key enzymes (CYP450, MAO, UGT), sites |
| 4 | Bioavailability & Extraction Ratio - formula F = AUC(oral)/AUC(IV), high/intermediate/low ER drug table |
| 5 | Classic Clinical Examples - Nitroglycerin, Morphine, Lidocaine, Propranolol, Verapamil, Naloxone |
| 6 | Routes that Bypass First-Pass - IV, sublingual, transdermal, inhalation, rectal, IM/SC with bypass extent |
| 7 | Factors Affecting It - liver disease, hepatic blood flow, enzyme induction/inhibition, genetic polymorphisms, age, CKD |
| 8 | Clinical Implications - pro-drugs (codeine→morphine, enalapril→enalaprilat) + dosing adjustments |
| 9 | Summary table - all key concepts at a glance |
| 10 | Key Takeaways - 5 exam-ready bullet points |