make a ppt on zinc function, requirement, deficiency and management of zinc deficiency

Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File
Running Command

ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or not found"

Running Command

mkdir -p /home/daytona/workspace/zinc-ppt

Writing File

~/zinc-ppt/create_zinc_ppt.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Zinc: Functions, Requirements, Deficiency and Management";
pres.author = "Medical Education";

// ─── COLOR PALETTE ────────────────────────────────────────────────────────────
const DARK_BG    = "0D2137";   // deep navy – dominant
const MID_BLUE   = "1B4F72";   // supporting
const ACCENT     = "3AAFA9";   // teal accent
const LIGHT_CARD = "EAF6F6";   // very light teal for cards
const WHITE      = "FFFFFF";
const GOLD       = "F0A500";   // highlight / key numbers
const GRAY_TEXT  = "C8D6DF";   // subtle body text
const DARK_TEXT  = "0D2137";   // text on light bg

// ─── HELPERS ──────────────────────────────────────────────────────────────────
function sectionBadge(slide, label) {
  slide.addShape(pres.ShapeType.rect, {
    x: 0.35, y: 0.18, w: 2.4, h: 0.35,
    fill: { color: ACCENT }, line: { color: ACCENT }
  });
  slide.addText(label.toUpperCase(), {
    x: 0.35, y: 0.18, w: 2.4, h: 0.35,
    fontSize: 9, bold: true, color: DARK_BG,
    align: "center", valign: "middle", margin: 0
  });
}

function slideTitle(slide, title) {
  slide.addText(title, {
    x: 0.35, y: 0.6, w: 9.3, h: 0.62,
    fontSize: 28, bold: true, color: WHITE, margin: 0
  });
  // accent underline
  slide.addShape(pres.ShapeType.rect, {
    x: 0.35, y: 1.24, w: 1.5, h: 0.06,
    fill: { color: ACCENT }, line: { color: ACCENT }
  });
}

function addCard(slide, x, y, w, h, title, bullets, titleColor) {
  slide.addShape(pres.ShapeType.rect, {
    x, y, w, h,
    fill: { color: MID_BLUE }, line: { color: ACCENT, pt: 1.5 },
    shadow: { type: "outer", blur: 6, offset: 3, angle: 45, color: "000000", opacity: 0.3 }
  });
  slide.addText(title, {
    x: x + 0.15, y: y + 0.1, w: w - 0.3, h: 0.38,
    fontSize: 13, bold: true, color: titleColor || GOLD, margin: 0
  });
  const bulletItems = bullets.map((b, i) => ({
    text: b,
    options: { bullet: { type: "bullet" }, breakLine: i < bullets.length - 1, fontSize: 10.5, color: WHITE }
  }));
  slide.addText(bulletItems, {
    x: x + 0.15, y: y + 0.52, w: w - 0.3, h: h - 0.65,
    fontSize: 10.5, color: WHITE, margin: 0, valign: "top"
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 1 – TITLE SLIDE
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: DARK_BG };

  // big teal left bar
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: ACCENT }, line: { color: ACCENT } });

  // Atomic symbol block
  s.addShape(pres.ShapeType.rect, { x: 7.5, y: 0.8, w: 2.1, h: 2.6, fill: { color: MID_BLUE }, line: { color: ACCENT, pt: 2 } });
  s.addText("Zn", { x: 7.5, y: 0.85, w: 2.1, h: 1.3, fontSize: 72, bold: true, color: ACCENT, align: "center", valign: "middle", margin: 0 });
  s.addText("30", { x: 7.5, y: 0.82, w: 2.1, h: 0.55, fontSize: 14, color: WHITE, align: "center", margin: 0 });
  s.addText("65.38", { x: 7.5, y: 2.85, w: 2.1, h: 0.45, fontSize: 13, color: GRAY_TEXT, align: "center", margin: 0 });
  s.addText("ZINC", { x: 7.5, y: 3.1, w: 2.1, h: 0.38, fontSize: 12, bold: true, color: WHITE, align: "center", margin: 0 });

  s.addText("ZINC", { x: 0.4, y: 1.0, w: 6.8, h: 1.3, fontSize: 80, bold: true, color: WHITE, charSpacing: 12, margin: 0 });
  s.addShape(pres.ShapeType.rect, { x: 0.4, y: 2.35, w: 4.5, h: 0.06, fill: { color: ACCENT }, line: { color: ACCENT } });
  s.addText("Functions  •  Requirements  •  Deficiency  •  Management", {
    x: 0.4, y: 2.5, w: 6.8, h: 0.55, fontSize: 16, color: ACCENT, margin: 0
  });
  s.addText("Essential Trace Element in Human Health", {
    x: 0.4, y: 3.15, w: 6.5, h: 0.45, fontSize: 14, color: GRAY_TEXT, italic: true, margin: 0
  });

  // bottom bar
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.2, w: 10, h: 0.425, fill: { color: MID_BLUE }, line: { color: MID_BLUE } });
  s.addText("Sources: Harrison's Principles of Internal Medicine 22E  •  Yamada's Textbook of Gastroenterology 7E  •  Tietz Textbook of Laboratory Medicine 7E", {
    x: 0.2, y: 5.22, w: 9.6, h: 0.36, fontSize: 8, color: GRAY_TEXT, align: "center", margin: 0
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 2 – OVERVIEW / INTRODUCTION
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: DARK_BG };
  sectionBadge(s, "Introduction");
  slideTitle(s, "What is Zinc?");

  // large stat boxes
  const stats = [
    { val: "2nd", sub: "Most abundant\ntrace element\nin the body" },
    { val: "~2 g", sub: "Total adult\nbody content" },
    { val: ">300", sub: "Zinc-dependent\nmetalloenzymes" },
    { val: "55%", sub: "Found in\nskeletal muscle" }
  ];
  stats.forEach((st, i) => {
    const x = 0.35 + i * 2.35;
    s.addShape(pres.ShapeType.rect, { x, y: 1.5, w: 2.1, h: 1.9, fill: { color: MID_BLUE }, line: { color: ACCENT, pt: 1.5 } });
    s.addText(st.val, { x, y: 1.6, w: 2.1, h: 0.8, fontSize: 36, bold: true, color: GOLD, align: "center", margin: 0 });
    s.addText(st.sub, { x, y: 2.4, w: 2.1, h: 0.85, fontSize: 11, color: WHITE, align: "center", margin: 0 });
  });

  s.addText("Key facts", { x: 0.35, y: 3.6, w: 9.3, h: 0.36, fontSize: 13, bold: true, color: ACCENT, margin: 0 });
  const facts = [
    "Zinc (Zn, atomic no. 30) is a type-2 nutrient with catalytic, structural, and regulatory roles.",
    "It is present in every metabolically active tissue; ~30% is found in bone, ~55% in muscle.",
    "High concentrations are found in the prostate, semen, and retina.",
    "Serum zinc lies within a narrow range: 80–120 µg/dL (12–18 µmol/L).",
    "Body stores are small (~2 g), making humans vulnerable to deficiency within weeks of inadequate intake."
  ];
  const factItems = facts.map((f, i) => ({
    text: f, options: { bullet: { type: "bullet" }, breakLine: i < facts.length - 1, fontSize: 11, color: WHITE }
  }));
  s.addText(factItems, { x: 0.35, y: 4.0, w: 9.3, h: 1.35, fontSize: 11, color: WHITE, margin: 0, valign: "top" });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 3 – FUNCTIONS
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: DARK_BG };
  sectionBadge(s, "Functions");
  slideTitle(s, "Functions of Zinc");

  const cards = [
    {
      title: "Catalytic Functions",
      bullets: [
        "Cofactor for >300 metalloenzymes",
        "Alkaline phosphatase",
        "Carbonic anhydrase",
        "Alcohol dehydrogenase",
        "RNA polymerases I, II, III",
        "DNA polymerase"
      ]
    },
    {
      title: "Structural Functions",
      bullets: [
        "Integral to zinc finger proteins",
        "Stabilizes protein & DNA tertiary structure",
        "Component of ribosomes & membranes",
        "Metallothionein binding (stores up to 7 Zn atoms)",
        "Maintains structural integrity of cell membranes"
      ]
    },
    {
      title: "Regulatory Functions",
      bullets: [
        "Binds steroid hormone receptors",
        "Regulates transcription factor binding to DNA",
        "Controls metallothionein gene expression",
        "Acts as a 'master hormone' for cell division",
        "Regulates ZNT/ZIP transporter expression"
      ]
    },
    {
      title: "Physiological Roles",
      bullets: [
        "Immune function (T-cell development)",
        "Wound healing & tissue repair",
        "Normal spermatogenesis & fetal growth",
        "Lipid peroxidation & cellular apoptosis",
        "Taste & smell (gustin is a Zn metalloenzyme)",
        "Vitamin A transport & metabolism"
      ]
    }
  ];

  cards.forEach((c, i) => {
    const x = 0.35 + (i % 2) * 4.8;
    const y = 1.45 + Math.floor(i / 2) * 2.05;
    addCard(s, x, y, 4.55, 1.9, c.title, c.bullets);
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 4 – DIETARY SOURCES & REQUIREMENTS
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: DARK_BG };
  sectionBadge(s, "Dietary Sources & Requirements");
  slideTitle(s, "Dietary Sources & Daily Requirements");

  // left: sources
  s.addShape(pres.ShapeType.rect, { x: 0.35, y: 1.45, w: 4.55, h: 3.9, fill: { color: MID_BLUE }, line: { color: ACCENT, pt: 1.5 } });
  s.addText("Dietary Sources", { x: 0.5, y: 1.55, w: 4.25, h: 0.4, fontSize: 14, bold: true, color: GOLD, margin: 0 });

  const sources = [
    { food: "Red meat & shellfish", note: "Best bioavailability" },
    { food: "Oysters", note: "Highest concentration" },
    { food: "Fish & poultry", note: "Good source" },
    { food: "Nuts & legumes", note: "Moderate, protein-bound" },
    { food: "Wheat germ & whole bran", note: "Reduced by milling" },
    { food: "Human breast milk", note: "For infants" },
    { food: "Green leafy vegetables", note: "Lower availability" }
  ];
  sources.forEach((src, i) => {
    const yy = 2.05 + i * 0.46;
    s.addShape(pres.ShapeType.rect, { x: 0.5, y: yy, w: 0.08, h: 0.28, fill: { color: ACCENT }, line: { color: ACCENT } });
    s.addText(src.food, { x: 0.7, y: yy, w: 2.4, h: 0.3, fontSize: 10.5, bold: true, color: WHITE, margin: 0 });
    s.addText(src.note, { x: 3.1, y: yy, w: 1.6, h: 0.3, fontSize: 9.5, color: GRAY_TEXT, italic: true, margin: 0 });
  });

  // Inhibitors note
  s.addText("Absorption Inhibitors:", { x: 0.5, y: 5.08, w: 4.25, h: 0.25, fontSize: 10, bold: true, color: GOLD, margin: 0 });
  s.addText("Phytates, oxalates, dietary fiber, high-dose iron (>65 mg/d), penicillamine, ethambutol, sodium valproate", {
    x: 0.5, y: 5.3, w: 4.25, h: 0.35, fontSize: 9.5, color: GRAY_TEXT, margin: 0
  });

  // right: requirements table
  s.addShape(pres.ShapeType.rect, { x: 5.1, y: 1.45, w: 4.55, h: 3.9, fill: { color: MID_BLUE }, line: { color: ACCENT, pt: 1.5 } });
  s.addText("Daily Zinc Requirements (RDA)", { x: 5.25, y: 1.55, w: 4.25, h: 0.4, fontSize: 14, bold: true, color: GOLD, margin: 0 });

  const reqs = [
    ["Population Group", "RDA (mg/day)"],
    ["Adult men", "11 mg/day"],
    ["Adult women", "8 mg/day"],
    ["Pregnancy", "11-12 mg/day"],
    ["Lactation", "12-13 mg/day"],
    ["Children (1-8 yr)", "3-5 mg/day"],
    ["Adolescents (9-18 yr)", "8-11 mg/day"],
    ["Tolerable Upper Limit", "40 mg/day"],
  ];
  reqs.forEach((row, i) => {
    const yy = 2.05 + i * 0.42;
    const isHeader = i === 0;
    const bg = isHeader ? ACCENT : (i % 2 === 0 ? "1E5F74" : MID_BLUE);
    s.addShape(pres.ShapeType.rect, { x: 5.25, y: yy, w: 4.1, h: 0.38, fill: { color: bg }, line: { color: bg } });
    s.addText(row[0], { x: 5.35, y: yy + 0.04, w: 2.4, h: 0.3, fontSize: isHeader ? 10 : 10.5, bold: isHeader, color: isHeader ? DARK_BG : WHITE, margin: 0 });
    s.addText(row[1], { x: 7.75, y: yy + 0.04, w: 1.5, h: 0.3, fontSize: isHeader ? 10 : 10.5, bold: isHeader ? true : (i === reqs.length - 1), color: isHeader ? DARK_BG : GOLD, align: "center", margin: 0 });
  });

  s.addText("Absorption efficiency: 20–50% of dietary intake (increases to ~100% at very low intakes)", {
    x: 5.25, y: 5.2, w: 4.25, h: 0.4, fontSize: 9.5, color: GRAY_TEXT, italic: true, margin: 0
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 5 – CAUSES OF DEFICIENCY
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: DARK_BG };
  sectionBadge(s, "Deficiency");
  slideTitle(s, "Causes of Zinc Deficiency");

  const causeCards = [
    {
      title: "Inadequate Intake",
      bullets: [
        "High phytate diet (unprocessed cereals)",
        "Vegetarian / vegan diet",
        "Poor soil zinc levels in developing countries",
        "Alcoholism (poor diet + increased urinary loss)",
        "Elderly with reduced meat & legume intake"
      ]
    },
    {
      title: "Malabsorption",
      bullets: [
        "Inflammatory bowel disease (Crohn's, UC)",
        "Acrodermatitis enteropathica (autosomal recessive)",
        "Pancreatic insufficiency",
        "Short bowel syndrome / ileal resection",
        "Intestinal bypass surgery"
      ]
    },
    {
      title: "Increased Losses",
      bullets: [
        "Chronic diarrhea",
        "Burns and extensive wound drainage",
        "GI fistulas & draining decubitus ulcers",
        "Excessive sweating",
        "Dialysis (hemodialysis)"
      ]
    },
    {
      title: "Increased Requirements / Other",
      bullets: [
        "Pregnancy and lactation",
        "Rapid growth phases (infancy, adolescence)",
        "Parenteral nutrition without zinc supplementation",
        "Chronic corticosteroid use",
        "HIV/AIDS, cirrhosis, sickle cell disease"
      ]
    }
  ];

  causeCards.forEach((c, i) => {
    const x = 0.35 + (i % 2) * 4.8;
    const y = 1.45 + Math.floor(i / 2) * 2.05;
    addCard(s, x, y, 4.55, 1.9, c.title, c.bullets);
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 6 – CLINICAL FEATURES OF DEFICIENCY
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: DARK_BG };
  sectionBadge(s, "Clinical Features");
  slideTitle(s, "Clinical Features of Zinc Deficiency");

  // Mild vs Severe strip
  const categories = [
    {
      label: "MILD",
      color: "2E8B57",
      items: ["Stunted growth in children", "Decreased taste (hypogeusia)", "Decreased smell (anosmia)", "Impaired immune function", "Poor wound healing", "Night vision dysfunction"]
    },
    {
      label: "MODERATE",
      color: "D4A017",
      items: ["Skin lesions (perioral, perianal)", "Alopecia (hair loss)", "Diarrhea", "Anorexia", "Irritability & depression", "Glucose intolerance"]
    },
    {
      label: "SEVERE",
      color: "C0392B",
      items: ["Hypogonadism & dwarfism", "Muscle wasting", "Severe dermatitis (vesicular/pustular)", "Immune collapse", "Congenital malformations (fetal)", "Acrodermatitis enteropathica"]
    }
  ];

  categories.forEach((cat, i) => {
    const x = 0.35 + i * 3.12;
    s.addShape(pres.ShapeType.rect, { x, y: 1.45, w: 2.98, h: 0.45, fill: { color: cat.color }, line: { color: cat.color } });
    s.addText(cat.label, { x, y: 1.45, w: 2.98, h: 0.45, fontSize: 14, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });

    s.addShape(pres.ShapeType.rect, { x, y: 1.9, w: 2.98, h: 2.95, fill: { color: MID_BLUE }, line: { color: cat.color, pt: 1.5 } });
    const items = cat.items.map((item, idx) => ({
      text: item,
      options: { bullet: { type: "bullet" }, breakLine: idx < cat.items.length - 1, fontSize: 10.5, color: WHITE }
    }));
    s.addText(items, { x: x + 0.12, y: 1.98, w: 2.74, h: 2.78, fontSize: 10.5, color: WHITE, margin: 0, valign: "top" });
  });

  // Bottom note – Acrodermatitis enteropathica
  s.addShape(pres.ShapeType.rect, { x: 0.35, y: 5.0, w: 9.3, h: 0.45, fill: { color: "2C3E50" }, line: { color: ACCENT, pt: 1 } });
  s.addText("Acrodermatitis Enteropathica: Autosomal recessive; presents in infancy; triad of diarrhea + alopecia + rash (extremities, face, perineum); treated with lifelong zinc supplementation", {
    x: 0.5, y: 5.02, w: 9.1, h: 0.4, fontSize: 9.5, color: ACCENT, italic: true, margin: 0
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 7 – DIAGNOSIS
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: DARK_BG };
  sectionBadge(s, "Diagnosis");
  slideTitle(s, "Diagnosis of Zinc Deficiency");

  // big serum zinc box
  s.addShape(pres.ShapeType.rect, { x: 0.35, y: 1.45, w: 4.4, h: 1.5, fill: { color: MID_BLUE }, line: { color: GOLD, pt: 2 } });
  s.addText("Serum Zinc Level", { x: 0.5, y: 1.52, w: 4.1, h: 0.45, fontSize: 15, bold: true, color: GOLD, margin: 0 });
  s.addText("Normal range:", { x: 0.5, y: 2.0, w: 1.8, h: 0.3, fontSize: 11, color: GRAY_TEXT, margin: 0 });
  s.addText("80–120 µg/dL (12–18 µmol/L)", { x: 2.3, y: 2.0, w: 2.3, h: 0.3, fontSize: 11, bold: true, color: WHITE, margin: 0 });
  s.addText("Deficiency threshold:", { x: 0.5, y: 2.35, w: 1.8, h: 0.3, fontSize: 11, color: GRAY_TEXT, margin: 0 });
  s.addText("< 70 µg/dL (< 12 µmol/L)", { x: 2.3, y: 2.35, w: 2.3, h: 0.3, fontSize: 11, bold: true, color: "FF6B6B", margin: 0 });

  s.addShape(pres.ShapeType.rect, { x: 5.0, y: 1.45, w: 4.65, h: 1.5, fill: { color: MID_BLUE }, line: { color: ACCENT, pt: 1.5 } });
  s.addText("Additional Markers", { x: 5.15, y: 1.52, w: 4.3, h: 0.38, fontSize: 14, bold: true, color: GOLD, margin: 0 });
  const markers = ["Plasma zinc (most commonly used)", "Leukocyte or erythrocyte zinc (more sensitive)", "Urinary zinc excretion (reduced in deficiency)", "Metallothionein levels (responsive to zinc status)", "Hair zinc (research use)", "Alkaline phosphatase activity (decreased)"];
  const mItems = markers.map((m, i) => ({ text: m, options: { bullet: { type: "bullet" }, breakLine: i < markers.length - 1, fontSize: 10, color: WHITE } }));
  s.addText(mItems, { x: 5.15, y: 1.95, w: 4.35, h: 1.0, fontSize: 10, color: WHITE, margin: 0, valign: "top" });

  s.addShape(pres.ShapeType.rect, { x: 0.35, y: 3.1, w: 9.3, h: 2.25, fill: { color: MID_BLUE }, line: { color: ACCENT, pt: 1.5 } });
  s.addText("Important Diagnostic Caveats", { x: 0.5, y: 3.18, w: 9.0, h: 0.38, fontSize: 14, bold: true, color: GOLD, margin: 0 });
  const caveats = [
    "Serum zinc falls by ~50% during systemic inflammatory response syndrome (SIRS) even without true deficiency.",
    "Hypoalbuminemia (any cause) lowers serum zinc because ~80% is albumin-bound — correct for albumin.",
    "Pregnancy and oral contraceptives may cause slight depression in serum zinc levels.",
    "In acute stress (illness, post-exercise), zinc redistributes from serum to tissues — interpret cautiously.",
    "No single validated biomarker exists; clinical correlation is essential.",
    "Functional tests (taste test, wound healing response) can supplement laboratory data."
  ];
  const caveatItems = caveats.map((c, i) => ({ text: c, options: { bullet: { type: "bullet" }, breakLine: i < caveats.length - 1, fontSize: 10.5, color: WHITE } }));
  s.addText(caveatItems, { x: 0.5, y: 3.6, w: 9.0, h: 1.65, fontSize: 10.5, color: WHITE, margin: 0, valign: "top" });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 8 – MANAGEMENT
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: DARK_BG };
  sectionBadge(s, "Management");
  slideTitle(s, "Management of Zinc Deficiency");

  // Step-like flow: Dietary -> Supplementation -> Special situations
  const steps = [
    { num: "01", title: "Dietary Modification", color: ACCENT, items: ["Increase red meat, shellfish (especially oysters)", "Include nuts, legumes, whole grains", "Leavening of bread reduces phytate content", "Avoid excessive iron supplementation with meals", "Protein-rich diet enhances zinc absorption"] },
    { num: "02", title: "Oral Supplementation", color: GOLD, items: ["Mild-moderate: 25–50 mg elemental zinc/day", "Therapeutic dose: 60 mg elemental zinc twice daily", "Zinc gluconate, zinc sulfate, or zinc acetate forms", "Zinc gluconate lozenges (13 mg/2h) for common cold", "Continue until stores replenished (weeks–months)"] },
    { num: "03", title: "Special Situations", color: "FF6B6B", items: ["Acrodermatitis enteropathica: lifelong zinc supplementation", "Parenteral nutrition: add zinc 3–5 mg/day IV", "Diarrhea in children ≥6 mo: zinc 20 mg/day until recovery", "Burns/major wounds: higher doses with monitoring", "Pregnancy/lactation: ensure adequate intake 11–13 mg/day"] }
  ];

  steps.forEach((step, i) => {
    const x = 0.35 + i * 3.12;
    s.addShape(pres.ShapeType.rect, { x, y: 1.45, w: 2.98, h: 3.9, fill: { color: MID_BLUE }, line: { color: step.color, pt: 2 } });
    // number badge
    s.addShape(pres.ShapeType.ellipse, { x: x + 1.19, y: 1.52, w: 0.6, h: 0.6, fill: { color: step.color }, line: { color: step.color } });
    s.addText(step.num, { x: x + 1.19, y: 1.52, w: 0.6, h: 0.6, fontSize: 14, bold: true, color: DARK_BG, align: "center", valign: "middle", margin: 0 });
    s.addText(step.title, { x: x + 0.12, y: 2.22, w: 2.74, h: 0.45, fontSize: 12, bold: true, color: step.color, align: "center", margin: 0 });
    const items = step.items.map((item, idx) => ({
      text: item,
      options: { bullet: { type: "bullet" }, breakLine: idx < step.items.length - 1, fontSize: 10, color: WHITE }
    }));
    s.addText(items, { x: x + 0.15, y: 2.72, w: 2.68, h: 2.5, fontSize: 10, color: WHITE, margin: 0, valign: "top" });
  });

  // monitoring note
  s.addShape(pres.ShapeType.rect, { x: 0.35, y: 5.4, w: 9.3, h: 0.1, fill: { color: ACCENT }, line: { color: ACCENT } });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 9 – TOXICITY & MONITORING
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: DARK_BG };
  sectionBadge(s, "Toxicity & Monitoring");
  slideTitle(s, "Zinc Toxicity & Treatment Monitoring");

  // left – toxicity
  s.addShape(pres.ShapeType.rect, { x: 0.35, y: 1.45, w: 4.55, h: 3.85, fill: { color: MID_BLUE }, line: { color: "FF6B6B", pt: 1.5 } });
  s.addText("Zinc Toxicity", { x: 0.5, y: 1.55, w: 4.25, h: 0.38, fontSize: 14, bold: true, color: "FF6B6B", margin: 0 });

  s.addText("Tolerable Upper Limit: 40 mg/day", { x: 0.5, y: 2.0, w: 4.1, h: 0.3, fontSize: 11, bold: true, color: GOLD, margin: 0 });

  s.addText("Acute toxicity:", { x: 0.5, y: 2.4, w: 4.1, h: 0.28, fontSize: 11, bold: true, color: WHITE, margin: 0 });
  const acute = ["Nausea, vomiting, fever", "GI distress (gastritis)", "Metallic taste", "Zinc fume fever (welding): respiratory distress, sweating, headache"];
  const aItems = acute.map((a, i) => ({ text: a, options: { bullet: { type: "bullet" }, breakLine: i < acute.length - 1, fontSize: 10.5, color: GRAY_TEXT } }));
  s.addText(aItems, { x: 0.5, y: 2.72, w: 4.1, h: 0.95, fontSize: 10.5, color: GRAY_TEXT, margin: 0, valign: "top" });

  s.addText("Chronic toxicity (>150–450 mg/day):", { x: 0.5, y: 3.72, w: 4.1, h: 0.28, fontSize: 11, bold: true, color: WHITE, margin: 0 });
  const chronic = ["Secondary copper deficiency (competes for absorption)", "Hypochromic anemia", "Immune suppression", "AVOID intranasal zinc: irreversible anosmia"];
  const cItems = chronic.map((c, i) => ({ text: c, options: { bullet: { type: "bullet" }, breakLine: i < chronic.length - 1, fontSize: 10.5, color: GRAY_TEXT } }));
  s.addText(cItems, { x: 0.5, y: 4.05, w: 4.1, h: 1.1, fontSize: 10.5, color: GRAY_TEXT, margin: 0, valign: "top" });

  // right – monitoring
  s.addShape(pres.ShapeType.rect, { x: 5.1, y: 1.45, w: 4.55, h: 3.85, fill: { color: MID_BLUE }, line: { color: ACCENT, pt: 1.5 } });
  s.addText("Treatment Monitoring", { x: 5.25, y: 1.55, w: 4.25, h: 0.38, fontSize: 14, bold: true, color: ACCENT, margin: 0 });

  const monitoring = [
    { param: "Serum zinc", target: "Normalize to >70 µg/dL" },
    { param: "Clinical response", target: "Skin healing, hair regrowth, taste" },
    { param: "Serum copper", target: "Monitor if taking >40 mg/day" },
    { param: "CBC", target: "Rule out copper-deficiency anemia" },
    { param: "Serum albumin", target: "Correct zinc interpretation" },
    { param: "Duration", target: "Continue weeks–months until replete" }
  ];
  monitoring.forEach((m, i) => {
    const yy = 2.08 + i * 0.52;
    const bg = i % 2 === 0 ? "1E5F74" : MID_BLUE;
    s.addShape(pres.ShapeType.rect, { x: 5.25, y: yy, w: 4.2, h: 0.46, fill: { color: bg }, line: { color: bg } });
    s.addText(m.param, { x: 5.35, y: yy + 0.06, w: 1.8, h: 0.33, fontSize: 10.5, bold: true, color: ACCENT, margin: 0 });
    s.addText(m.target, { x: 7.2, y: yy + 0.06, w: 2.1, h: 0.33, fontSize: 10, color: WHITE, margin: 0 });
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 10 – SUMMARY
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: DARK_BG };
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: ACCENT }, line: { color: ACCENT } });

  s.addText("KEY TAKEAWAYS", { x: 0.35, y: 0.25, w: 9.3, h: 0.45, fontSize: 11, bold: true, color: ACCENT, charSpacing: 4, margin: 0 });
  s.addText("Zinc: A Clinical Summary", { x: 0.35, y: 0.72, w: 9.3, h: 0.65, fontSize: 32, bold: true, color: WHITE, margin: 0 });
  s.addShape(pres.ShapeType.rect, { x: 0.35, y: 1.42, w: 2.0, h: 0.06, fill: { color: GOLD }, line: { color: GOLD } });

  const takeaways = [
    { icon: "▸", head: "Functions:", body: "Catalytic (>300 enzymes), structural (zinc finger proteins), regulatory (transcription factors), physiological (immunity, growth, wound healing, spermatogenesis)." },
    { icon: "▸", head: "Requirements:", body: "8–11 mg/day for adults; higher in pregnancy (11–12 mg/day) and lactation (12–13 mg/day). Tolerable upper limit: 40 mg/day." },
    { icon: "▸", head: "Deficiency causes:", body: "Inadequate intake (phytate-rich diet, alcoholism), malabsorption (IBD, acrodermatitis enteropathica), increased losses (burns, diarrhea), raised requirements (pregnancy, growth)." },
    { icon: "▸", head: "Clinical features:", body: "Growth retardation, alopecia, dermatitis, diarrhea, immune dysfunction, hypogeusia, anosmia, hypogonadism; classic: acrodermatitis enteropathica." },
    { icon: "▸", head: "Diagnosis:", body: "Serum zinc <70 µg/dL; interpret with albumin and inflammatory status. No single perfect biomarker." },
    { icon: "▸", head: "Management:", body: "Dietary optimization + oral zinc (60 mg elemental zinc BD for therapy). Children with diarrhea: 20 mg/day. Monitor copper with high-dose or prolonged therapy." }
  ];

  takeaways.forEach((t, i) => {
    const yy = 1.6 + i * 0.64;
    s.addText([
      { text: t.head + " ", options: { bold: true, color: GOLD, fontSize: 11 } },
      { text: t.body, options: { bold: false, color: WHITE, fontSize: 11 } }
    ], { x: 0.6, y: yy, w: 9.0, h: 0.58, fontSize: 11, color: WHITE, margin: 0, valign: "middle" });
  });

  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.2, w: 10, h: 0.425, fill: { color: MID_BLUE }, line: { color: MID_BLUE } });
  s.addText("Harrison's Principles of Internal Medicine 22E  •  Yamada's Textbook of Gastroenterology 7E  •  Tietz Laboratory Medicine 7E  •  Dermatology 2-Volume Set 5E", {
    x: 0.2, y: 5.22, w: 9.6, h: 0.36, fontSize: 8, color: GRAY_TEXT, align: "center", margin: 0
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SAVE
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
pres.writeFile({ fileName: "/home/daytona/workspace/zinc-ppt/Zinc_Functions_Deficiency_Management.pptx" })
  .then(() => console.log("SUCCESS: PPT saved."))
  .catch(err => { console.error("ERROR:", err); process.exit(1); });
Running Command

cd /home/daytona/workspace/zinc-ppt && node create_zinc_ppt.js

Your presentation is ready! Here is the download link:

Zinc Functions Deficiency Management

Presentation · PPTX


The PPT has 10 slides with a deep navy + teal professional medical design. Here is what each slide covers:
SlideContent
1Title slide - with periodic table element block for Zn
2Introduction - key stats (2nd most abundant trace element, >300 enzymes, ~2g body stores)
3Functions - 4 cards covering Catalytic, Structural, Regulatory, and Physiological roles
4Dietary Sources & Requirements - food sources, absorption inhibitors, RDA table by population group
5Causes of Deficiency - Inadequate Intake, Malabsorption, Increased Losses, Increased Requirements
6Clinical Features - colour-coded Mild / Moderate / Severe with Acrodermatitis enteropathica note
7Diagnosis - serum zinc threshold (<70 µg/dL), additional markers, and 6 diagnostic caveats (albumin, SIRS, pregnancy effects)
8Management - 3-step flow: Dietary Modification → Oral Supplementation → Special Situations (AE, TPN, paediatric diarrhoea)
9Toxicity & Monitoring - UL (40 mg/day), acute/chronic toxicity, monitoring parameters
10Key Takeaways - concise 6-point clinical summary
All content is sourced from Harrison's Principles of Internal Medicine 22E, Yamada's Textbook of Gastroenterology 7E, Tietz Textbook of Laboratory Medicine 7E, and Dermatology 2-Volume Set 5E.
This is a shared conversation. Sign in to Orris to start your own chat.