Microbiology give me the answer based on Apurba shastry book of microbiology for my upcoming microbiology ia in which essay worth 20 marks and short answer worth 6 marks each without skipping important answers with details arranged in a systematic manner along with diagram if any , morphology,lab diagnosis antigenic structure disease caused what ever their is in apurba shastry culture medium transport medium etiology manifestation clinical feature treatment whatsoever to be asked arrange it in a n answer sheet like manner in photo format

Asking for Preferences

Giardia lamblia

Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Loading Image
Loading Image
Loading Image
Reading File
Reading File
Running Command

mkdir -p /home/daytona/workspace/giardia-answersheet && ls /home/daytona/workspa…

Writing File

~/giardia-answersheet/create_answersheet.js

const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");

// Fetch images
const imgUrls = [
  "https://cdn.orris.care/cdss_images/48077f2c40ac32cc5088a4cd97cd3e6419578c74651161c54ff74c5c5bb6f8a2.png",
  "https://cdn.orris.care/cdss_images/c4507cbfcbe41284b03a7d4c5a04e6eaa677bc3bdf025c3d497bcddc21605afd.png",
  "https://cdn.orris.care/cdss_images/0f12bd2b1ed4d3f7b0ab2ffb4c8e16350716c6d42580ab173bfbf35dafefe556.png"
];

let imgData = [];
try {
  const result = execSync(
    `node /home/daytona/skills/shared/scripts/fetch_images.js ${imgUrls.map(u => `"${u}"`).join(" ")}`
  ).toString();
  imgData = JSON.parse(result);
  console.log("Images fetched:", imgData.map(i => i.error ? "ERROR:" + i.error : "OK"));
} catch(e) {
  console.log("Image fetch failed:", e.message);
}

let pres = new pptxgen();
pres.layout = 'LAYOUT_WIDE'; // 13.3 x 7.5 inches - wider for answer sheet format
pres.title = 'Giardia lamblia - Microbiology Answer Sheet';

// COLORS
const BG = "FFFDF5";        // warm white like paper
const DARK_BLUE = "0D3B66"; // header dark blue
const ACCENT = "1A6B3A";    // section green
const GOLD = "C9952A";      // highlight gold
const LINE_COLOR = "1A6B3A";
const TEXT_DARK = "1C1C1C";
const TEXT_BODY = "2D2D2D";
const LIGHT_BOX = "E8F4F0";
const HEADING_BG = "0D3B66";
const SUBHEAD_BG = "1A6B3A";
const WHITE = "FFFFFF";
const NOTE_BG = "FFF3CD";

// Helper: add slide with background
function newSlide(bgColor) {
  let slide = pres.addSlide();
  slide.background = { color: bgColor || BG };
  return slide;
}

// Helper: section heading bar
function addSectionBar(slide, text, y, color) {
  slide.addShape(pres.ShapeType.rect, {
    x: 0.2, y: y, w: 12.9, h: 0.38,
    fill: { color: color || HEADING_BG }
  });
  slide.addText(text, {
    x: 0.3, y: y + 0.02, w: 12.7, h: 0.34,
    fontSize: 13, bold: true, color: WHITE,
    fontFace: "Arial", valign: "middle", margin: 4
  });
}

// Helper: sub-section bar
function addSubBar(slide, text, y) {
  slide.addShape(pres.ShapeType.rect, {
    x: 0.2, y: y, w: 12.9, h: 0.30,
    fill: { color: SUBHEAD_BG }
  });
  slide.addText(text, {
    x: 0.3, y: y + 0.01, w: 12.7, h: 0.28,
    fontSize: 11, bold: true, color: WHITE,
    fontFace: "Arial", valign: "middle", margin: 3
  });
}

// Helper: body text box
function addBody(slide, textArr, x, y, w, h, fontSize) {
  slide.addText(textArr, {
    x, y, w, h,
    fontSize: fontSize || 9.5,
    color: TEXT_BODY,
    fontFace: "Arial",
    valign: "top",
    margin: 4,
    wrap: true
  });
}

// ============================================================
// SLIDE 1: COVER / TITLE
// ============================================================
{
  let slide = pres.addSlide();
  slide.background = { color: DARK_BLUE };

  // decorative top bar
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.25, fill: { color: GOLD } });

  // Title
  slide.addText("GIARDIA LAMBLIA", {
    x: 0.5, y: 0.8, w: 12.3, h: 1.2,
    fontSize: 44, bold: true, color: GOLD,
    fontFace: "Arial", align: "center", charSpacing: 4
  });

  slide.addText("(Giardia intestinalis | Giardia duodenalis)", {
    x: 0.5, y: 2.0, w: 12.3, h: 0.5,
    fontSize: 18, color: "C8E6FA", fontFace: "Arial", align: "center", italic: true
  });

  // horizontal line
  slide.addShape(pres.ShapeType.line, {
    x: 1.5, y: 2.65, w: 10.3, h: 0,
    line: { color: GOLD, width: 2 }
  });

  slide.addText("MICROBIOLOGY IA — ANSWER SHEET", {
    x: 0.5, y: 2.8, w: 12.3, h: 0.45,
    fontSize: 14, color: WHITE, fontFace: "Arial", align: "center", bold: true
  });

  slide.addText([
    { text: "Kingdom: ", options: { bold: true, color: GOLD } },
    { text: "Protista  ", options: { color: WHITE } },
    { text: "  |  Phylum: ", options: { bold: true, color: GOLD } },
    { text: "Metamonada  ", options: { color: WHITE } },
    { text: "  |  Class: ", options: { bold: true, color: GOLD } },
    { text: "Trepomonadea  ", options: { color: WHITE } },
    { text: "  |  Type: ", options: { bold: true, color: GOLD } },
    { text: "Flagellated Protozoan", options: { color: WHITE } },
  ], {
    x: 0.5, y: 3.4, w: 12.3, h: 0.4,
    fontSize: 10, fontFace: "Arial", align: "center"
  });

  // Index
  slide.addShape(pres.ShapeType.rect, {
    x: 0.5, y: 4.0, w: 12.3, h: 2.8,
    fill: { color: "0A2E52" }, line: { color: GOLD, width: 1 }
  });

  slide.addText("CONTENTS:", {
    x: 0.7, y: 4.1, w: 11.9, h: 0.35,
    fontSize: 12, bold: true, color: GOLD, fontFace: "Arial"
  });

  const contents = [
    "1. Classification & Nomenclature",
    "2. Morphology — Trophozoite & Cyst",
    "3. Life Cycle",
    "4. Antigenic Structure & Pathogenesis",
    "5. Disease Caused — Giardiasis: Clinical Features",
    "6. Laboratory Diagnosis (Stool Microscopy, Culture, Antigen, NAAT)",
    "7. Treatment & Prevention",
    "8. Key Points for 20-Mark Essay & 6-Mark SAQ"
  ];

  contents.forEach((c, i) => {
    const col = i < 4 ? 0 : 1;
    const row = i < 4 ? i : i - 4;
    slide.addText(c, {
      x: 0.8 + col * 6.2,
      y: 4.55 + row * 0.45,
      w: 6.0, h: 0.4,
      fontSize: 10, color: "C8E6FA", fontFace: "Arial"
    });
  });

  slide.addShape(pres.ShapeType.rect, { x: 0, y: 7.25, w: 13.3, h: 0.25, fill: { color: GOLD } });
}

// ============================================================
// SLIDE 2: CLASSIFICATION + MORPHOLOGY (TROPHOZOITE)
// ============================================================
{
  let slide = newSlide(BG);

  // Top band
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.45, fill: { color: DARK_BLUE } });
  slide.addText("GIARDIA LAMBLIA — CLASSIFICATION & MORPHOLOGY", {
    x: 0.2, y: 0.03, w: 12.9, h: 0.4,
    fontSize: 14, bold: true, color: WHITE, fontFace: "Arial", valign: "middle"
  });
  slide.addText("Slide 2 of 7", {
    x: 10.5, y: 0.03, w: 2.6, h: 0.4,
    fontSize: 9, color: GOLD, fontFace: "Arial", align: "right", valign: "middle"
  });

  // LEFT COLUMN
  addSectionBar(slide, "CLASSIFICATION", 0.55);
  const classData = [
    [{ text: "Kingdom: ", options: { bold: true }}, { text: "Protista" }],
    [{ text: "Sub-kingdom: ", options: { bold: true }}, { text: "Protozoa" }],
    [{ text: "Phylum: ", options: { bold: true }}, { text: "Metamonada" }],
    [{ text: "Order: ", options: { bold: true }}, { text: "Diplomonadida" }],
    [{ text: "Genus: ", options: { bold: true }}, { text: "Giardia" }],
    [{ text: "Species: ", options: { bold: true }}, { text: "lamblia (= intestinalis = duodenalis)" }],
    [{ text: "Type: ", options: { bold: true }}, { text: "Flagellated protozoan (Intestinal)" }],
    [{ text: "First described: ", options: { bold: true }}, { text: "Van Leeuwenhoek (1681), Stiles named it (1915)" }],
    [{ text: "Infective dose: ", options: { bold: true }}, { text: "As few as 10–25 cysts" }],
    [{ text: "Assemblages: ", options: { bold: true }}, { text: "A–H; A & B infect humans" }],
  ];
  classData.forEach((row, i) => {
    slide.addText(row, {
      x: 0.25, y: 0.98 + i * 0.32,
      w: 5.9, h: 0.30,
      fontSize: 9.5, color: TEXT_BODY, fontFace: "Arial", margin: 2
    });
  });

  // TROPHOZOITE
  addSectionBar(slide, "MORPHOLOGY — TROPHOZOITE (Vegetative form / Active form)", 4.3, SUBHEAD_BG);

  slide.addShape(pres.ShapeType.rect, {
    x: 0.25, y: 4.7, w: 5.9, h: 2.55,
    fill: { color: LIGHT_BOX }, line: { color: LINE_COLOR, width: 0.5 }
  });

  const trophoData = [
    "• Shape: Pear-shaped (pyriform) with tapered posterior end",
    "• Size: 10–20 μm long × 7–10 μm wide",
    "• Nuclei: 2 nuclei (bilateral symmetry)",
    "• Flagella: 8 total — 4 lateral, 2 ventral, 2 caudal",
    "• Sucking disc: Ventral concave disc — used to adhere to duodenal enterocytes",
    "• Median bodies: 2 curved structures — give 'smiling face' / 'monkey face' / 'old man face' appearance",
    "• Axonemes (longitudinal fibrils): Present",
    "• Movement: Tumbling / falling leaf motility",
    "• Replication: Binary fission",
    "• Habitat: Duodenum and upper jejunum",
    "• DOES NOT invade mucosa — remains luminal",
  ];
  trophoData.forEach((t, i) => {
    slide.addText(t, {
      x: 0.35, y: 4.75 + i * 0.225,
      w: 5.7, h: 0.22,
      fontSize: 9, color: TEXT_BODY, fontFace: "Arial"
    });
  });

  // RIGHT COLUMN — CYST
  addSectionBar(slide, "MORPHOLOGY — CYST (Infective form / Diagnostic stage)", 0.55, ACCENT);

  slide.addShape(pres.ShapeType.rect, {
    x: 6.6, y: 0.98, w: 6.45, h: 3.1,
    fill: { color: LIGHT_BOX }, line: { color: ACCENT, width: 0.5 }
  });

  const cystData = [
    "• Shape: Oval / ellipsoidal",
    "• Size: 8–12 μm long × 7–10 μm wide",
    "• Nuclei: 2 nuclei (immature cyst) → 4 nuclei (mature cyst)",
    "• Wall: Rigid, thick outer wall — resistant to dehydration, temperature extremes, and chlorination",
    "• Survival: Survives in cold water for several weeks",
    "• Median bodies: Dark-staining curved bodies cross axonemes — appear as 'smiling mouth'",
    "• Cytoplasm: May be retracted from cyst wall",
    "• Role: INFECTIVE stage — ingested by new host",
    "• Staining: Well visualized on iodine stain, trichrome stain",
    "• Excystation: Each cyst → 2 trophozoites (triggered by gastric acid + intestinal proteases)",
  ];
  cystData.forEach((t, i) => {
    slide.addText(t, {
      x: 6.7, y: 1.02 + i * 0.3,
      w: 6.25, h: 0.28,
      fontSize: 9, color: TEXT_BODY, fontFace: "Arial"
    });
  });

  // COMPARISON TABLE
  addSubBar(slide, "TROPHOZOITE vs CYST — COMPARISON AT A GLANCE", 4.18);

  const tableRows = [
    ["Feature", "Trophozoite", "Cyst"],
    ["Shape", "Pear-shaped", "Oval"],
    ["Size", "10–20 × 7–10 μm", "8–12 × 7–10 μm"],
    ["Nuclei", "2", "2 (immature) / 4 (mature)"],
    ["Flagella", "8 (active)", "Absent"],
    ["Role", "Pathogenic form", "Infective form (diagnostic)"],
    ["Found in stool", "Diarrheic stool", "Formed stool"],
    ["Motility", "Tumbling (falling leaf)", "None"],
  ];

  slide.addTable(tableRows, {
    x: 6.6, y: 4.55, w: 6.45, h: 2.7,
    fontSize: 8.5,
    fontFace: "Arial",
    border: { pt: 0.5, color: "CCCCCC" },
    rowH: 0.32,
    align: "center",
    color: TEXT_BODY,
    fill: WHITE,
    colW: [1.5, 2.5, 2.45],
    thead: {
      fill: { color: DARK_BLUE },
      color: WHITE,
      bold: true,
      fontSize: 9
    }
  });

  slide.addShape(pres.ShapeType.rect, { x: 0, y: 7.3, w: 13.3, h: 0.2, fill: { color: DARK_BLUE } });
}

// ============================================================
// SLIDE 3: LIFE CYCLE + EPIDEMIOLOGY
// ============================================================
{
  let slide = newSlide(BG);

  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.45, fill: { color: DARK_BLUE } });
  slide.addText("GIARDIA LAMBLIA — LIFE CYCLE & EPIDEMIOLOGY", {
    x: 0.2, y: 0.03, w: 12.9, h: 0.4,
    fontSize: 14, bold: true, color: WHITE, fontFace: "Arial", valign: "middle"
  });
  slide.addText("Slide 3 of 7", {
    x: 10.5, y: 0.03, w: 2.6, h: 0.4,
    fontSize: 9, color: GOLD, fontFace: "Arial", align: "right", valign: "middle"
  });

  // LIFE CYCLE image
  addSectionBar(slide, "LIFE CYCLE DIAGRAM (CDC)", 0.55);
  if (imgData[0] && !imgData[0].error) {
    slide.addImage({
      data: imgData[0].base64,
      x: 0.2, y: 0.98, w: 4.8, h: 5.9
    });
  } else {
    slide.addShape(pres.ShapeType.rect, {
      x: 0.2, y: 0.98, w: 4.8, h: 5.9,
      fill: { color: "DDDDDD" }
    });
    slide.addText("Life Cycle Diagram\n(See CDC / Apurba Shastry Fig.)", {
      x: 0.2, y: 3.0, w: 4.8, h: 1,
      fontSize: 11, color: "555555", align: "center"
    });
  }

  // LIFE CYCLE STEPS - TEXT
  addSectionBar(slide, "LIFE CYCLE — STEP BY STEP", 0.55, ACCENT);
  // reposition - right of image
  slide.addShape(pres.ShapeType.rect, {
    x: 0.2, y: 0.55, w: 4.8, h: 0.4,
    fill: { color: ACCENT }
  }); // overlaps, intentional

  const lcSteps = [
    { step: "STEP 1", text: "INGESTION — Human ingests as few as 10–25 infective CYSTS via contaminated water, food, or fecal-oral route" },
    { step: "STEP 2", text: "EXCYSTATION — Cysts reach stomach; gastric acid + intestinal proteases trigger excystation. Each cyst → 2 trophozoites" },
    { step: "STEP 3", text: "COLONIZATION — Trophozoites multiply by binary fission in the duodenum & upper jejunum; attach to enterocytes via ventral sucking disc" },
    { step: "STEP 4", text: "ENCYSTATION — As trophozoites move to lower intestine, exposure to alkaline pH or bile salts triggers encystation → Cysts formed" },
    { step: "STEP 5", text: "EXCRETION — Cysts (and sometimes trophozoites in diarrheic stools) are passed in feces → contaminate environment → infect next host" },
  ];

  addSectionBar(slide, "LIFE CYCLE — STEPS", 0.55, ACCENT);
  lcSteps.forEach((item, i) => {
    slide.addShape(pres.ShapeType.rect, {
      x: 5.2, y: 1.02 + i * 1.05, w: 1.1, h: 0.9,
      fill: { color: i % 2 === 0 ? ACCENT : DARK_BLUE }
    });
    slide.addText(item.step, {
      x: 5.2, y: 1.02 + i * 1.05, w: 1.1, h: 0.9,
      fontSize: 9, bold: true, color: WHITE, align: "center", valign: "middle", fontFace: "Arial"
    });
    slide.addShape(pres.ShapeType.rect, {
      x: 6.35, y: 1.02 + i * 1.05, w: 6.75, h: 0.9,
      fill: { color: i % 2 === 0 ? LIGHT_BOX : "FFFFFF" },
      line: { color: LINE_COLOR, width: 0.3 }
    });
    slide.addText(item.text, {
      x: 6.45, y: 1.08 + i * 1.05, w: 6.5, h: 0.78,
      fontSize: 9.5, color: TEXT_BODY, fontFace: "Arial", valign: "middle", wrap: true
    });
  });

  // EPIDEMIOLOGY
  addSectionBar(slide, "EPIDEMIOLOGY", 6.3, DARK_BLUE);
  const epiPoints = [
    "• Giardia is the MOST COMMON intestinal protozoan parasite worldwide & in the USA",
    "• 5–6 cases/100,000 in USA; ~1.2 million cases/year estimated",
    "• Worldwide: Children more commonly infected — essentially all children in highly endemic areas infected by age 2–3 years",
    "• High-risk groups: Travellers, campers, children in daycare, homosexual men, immunocompromised (esp. IgA deficiency)",
    "• Reservoir: Humans, cats, dogs (assemblage A & B), beavers ('beaver fever')",
    "• Mode of transmission: Waterborne (main route), foodborne, fecal-oral (person-to-person)",
  ];
  epiPoints.forEach((t, i) => {
    slide.addText(t, {
      x: 0.3, y: 6.68 + i * 0.1,
      w: 12.9, h: 0.12,
      fontSize: 8.5, color: TEXT_BODY, fontFace: "Arial"
    });
  });

  slide.addShape(pres.ShapeType.rect, { x: 0, y: 7.3, w: 13.3, h: 0.2, fill: { color: DARK_BLUE } });
}

// ============================================================
// SLIDE 4: PATHOGENESIS + ANTIGENIC STRUCTURE + DISEASE / CLINICAL FEATURES
// ============================================================
{
  let slide = newSlide(BG);

  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.45, fill: { color: DARK_BLUE } });
  slide.addText("GIARDIA LAMBLIA — PATHOGENESIS, ANTIGENIC STRUCTURE & DISEASE", {
    x: 0.2, y: 0.03, w: 12.9, h: 0.4,
    fontSize: 14, bold: true, color: WHITE, fontFace: "Arial", valign: "middle"
  });
  slide.addText("Slide 4 of 7", {
    x: 10.5, y: 0.03, w: 2.6, h: 0.4,
    fontSize: 9, color: GOLD, fontFace: "Arial", align: "right", valign: "middle"
  });

  // PATHOGENESIS — LEFT
  addSectionBar(slide, "PATHOGENESIS", 0.55);
  const pathoPoints = [
    "• Trophozoites adhere to duodenal/jejunal epithelium via ventral sucking disc — NO TISSUE INVASION",
    "• Damages brush border → disaccharidase deficiency (especially lactase) → malabsorption",
    "• Villus atrophy (in severe cases) — resembles celiac sprue histologically",
    "• Biopsy: Ranges from near-normal mucosa (96% of cases) to severe villus atrophy with mononuclear infiltrate",
    "• Steatorrhea occurs due to fat malabsorption (bile salt interference)",
    "• Motility disruption by adhering trophozoites → altered gut transit",
    "• Immune evasion: Antigenic variation (VSP switching) every ~2 weeks",
    "• Severity correlates with degree of histopathological change",
  ];
  pathoPoints.forEach((t, i) => {
    slide.addText(t, {
      x: 0.25, y: 0.98 + i * 0.32,
      w: 6.2, h: 0.30,
      fontSize: 9, color: TEXT_BODY, fontFace: "Arial"
    });
  });

  // ANTIGENIC STRUCTURE
  addSectionBar(slide, "ANTIGENIC STRUCTURE", 3.62, SUBHEAD_BG);
  slide.addShape(pres.ShapeType.rect, {
    x: 0.25, y: 4.02, w: 6.2, h: 2.15,
    fill: { color: LIGHT_BOX }, line: { color: ACCENT, width: 0.5 }
  });
  const antigPoints = [
    "• Variant Surface Proteins (VSPs): ~200 cysteine-rich surface proteins expressed by trophozoites",
    "• Antigenic variation: Giardia switches its predominant VSP approximately every 2 weeks — coinciding with peak antibody response — allowing IMMUNE EVASION",
    "• Immune response: Host mounts anti-Giardia IgM, IgG, IgA (serum); secretory IgA in saliva and breast milk of infected mothers",
    "• Breast milk IgA: Protective — may partly explain why breastfed infants have less severe giardiasis",
    "• IL-6 and mast cells: Important in early immune response (animal models)",
    "• Humoral immunity: Essential for clearance — B-cell-deficient mice cannot clear Giardia infection",
    "• Immunodeficiency risk: Patients with common variable immunodeficiency (CVID) / IgA deficiency develop severe, protracted disease",
  ];
  antigPoints.forEach((t, i) => {
    slide.addText(t, {
      x: 0.35, y: 4.07 + i * 0.29,
      w: 6.0, h: 0.27,
      fontSize: 8.5, color: TEXT_BODY, fontFace: "Arial"
    });
  });

  // DISEASE / CLINICAL FEATURES — RIGHT
  addSectionBar(slide, "DISEASE CAUSED — GIARDIASIS: CLINICAL FEATURES", 0.55, ACCENT);

  // Incubation
  slide.addShape(pres.ShapeType.rect, {
    x: 6.7, y: 0.98, w: 6.35, h: 0.28,
    fill: { color: NOTE_BG }, line: { color: GOLD, width: 0.5 }
  });
  slide.addText("Incubation period: 1–3 weeks (average 7–10 days)  |  Infective dose: 10–25 cysts", {
    x: 6.7, y: 0.98, w: 6.35, h: 0.28,
    fontSize: 9, bold: true, color: "7A5000", fontFace: "Arial", valign: "middle", align: "center"
  });

  const clinFeatures = [
    { head: "1. ASYMPTOMATIC", body: "~50–75% of infections are asymptomatic cyst passers. Important reservoir for transmission." },
    { head: "2. ACUTE GIARDIASIS", body: "Sudden onset diarrhea (watery/greasy, foul-smelling, frothy), abdominal cramps, bloating, flatulence, nausea, low-grade fever. Duration: up to 2 weeks." },
    { head: "3. CHRONIC GIARDIASIS", body: "Persistent/intermittent diarrhea (>10 days), malabsorption, steatorrhea, weight loss, anorexia, fatigue. Resembles celiac sprue. Associated with impaired growth in children." },
    { head: "4. MALABSORPTION SYNDROME", body: "Fat, fat-soluble vitamins (A, D, E, K), B12 malabsorption. Disaccharidase (lactase) deficiency → lactose intolerance. Similar to Celiac / Tropical sprue." },
    { head: "5. EXTRA-INTESTINAL", body: "Urticaria (acute & chronic), angioedema, arthritis, cholangitis (rare). Eye manifestations (uveitis) — rare." },
    { head: "6. IMMUNOCOMPROMISED", body: "Severe protracted diarrhea with sprue-like pathology in CVID / IgA deficiency patients." },
  ];

  clinFeatures.forEach((item, i) => {
    const bg = i % 2 === 0 ? LIGHT_BOX : WHITE;
    slide.addShape(pres.ShapeType.rect, {
      x: 6.7, y: 1.3 + i * 1.02, w: 6.35, h: 0.97,
      fill: { color: bg }, line: { color: LINE_COLOR, width: 0.3 }
    });
    slide.addShape(pres.ShapeType.rect, {
      x: 6.7, y: 1.3 + i * 1.02, w: 2.0, h: 0.97,
      fill: { color: DARK_BLUE }
    });
    slide.addText(item.head, {
      x: 6.72, y: 1.3 + i * 1.02, w: 1.96, h: 0.97,
      fontSize: 8.5, bold: true, color: WHITE, fontFace: "Arial", align: "center", valign: "middle", wrap: true
    });
    slide.addText(item.body, {
      x: 8.75, y: 1.35 + i * 1.02, w: 4.2, h: 0.87,
      fontSize: 8.5, color: TEXT_BODY, fontFace: "Arial", valign: "middle", wrap: true
    });
  });

  slide.addShape(pres.ShapeType.rect, { x: 0, y: 7.3, w: 13.3, h: 0.2, fill: { color: DARK_BLUE } });
}

// ============================================================
// SLIDE 5: LABORATORY DIAGNOSIS
// ============================================================
{
  let slide = newSlide(BG);

  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.45, fill: { color: DARK_BLUE } });
  slide.addText("GIARDIA LAMBLIA — LABORATORY DIAGNOSIS", {
    x: 0.2, y: 0.03, w: 12.9, h: 0.4,
    fontSize: 14, bold: true, color: WHITE, fontFace: "Arial", valign: "middle"
  });
  slide.addText("Slide 5 of 7", {
    x: 10.5, y: 0.03, w: 2.6, h: 0.4,
    fontSize: 9, color: GOLD, fontFace: "Arial", align: "right", valign: "middle"
  });

  // Specimen
  addSectionBar(slide, "SPECIMENS", 0.55, ACCENT);
  slide.addText([
    { text: "• Stool (main): ", options: { bold: true } },
    { text: "Fresh stool — MUST be examined within 30 min (trophozoites) OR preserved in PVA/formalin fixative for later.  " },
    { text: "• Duodenal contents: ", options: { bold: true } },
    { text: "Duodenal aspirate (Enterotest / string test / Beal's string test) — if stool negative.  " },
    { text: "• Duodenal biopsy: ", options: { bold: true } },
    { text: "Gold standard when stool repeatedly negative — shows trophozoites attached to mucosa." }
  ], {
    x: 0.25, y: 0.98, w: 12.9, h: 0.55,
    fontSize: 9.5, color: TEXT_BODY, fontFace: "Arial", wrap: true
  });

  // TABLE of lab methods
  addSectionBar(slide, "DIAGNOSTIC METHODS — DETAILED", 1.6);

  const labMethods = [
    ["Method", "Specimen", "Findings / Notes", "Sensitivity"],
    ["Direct Wet Mount\n(Saline + Iodine)", "Fresh stool", "Saline: Trophozoite motility ('tumbling/falling leaf')\nIodine: Cysts stain golden-brown; 4 nuclei visible", "Low (single specimen)"],
    ["Formal-ether\nConcentration", "Stool", "Concentrates cysts; enhances detection.\nMost common routine method", "Moderate"],
    ["Permanent Stain\n(Trichrome / Iron-hematoxylin)", "Stool", "Best morphological detail of trophozoites & cysts.\nTrophozoite: 2 nuclei + median bodies ('smiling face')\nCysts: 4 nuclei, curved median bodies", "Moderate–High"],
    ["String Test\n(Enterotest)", "Duodenal contents", "Patient swallows gelatin capsule with nylon string.\nString retrieved after 4h — bile-stained section examined.\nTrophozoites found when stool negative", "High (2nd choice)"],
    ["Duodenal Biopsy\n(Endoscopy)", "Duodenal tissue", "Histology shows trophozoites adherent to villi on Giemsa stain.\nGold standard for diagnosis", "Highest"],
    ["Antigen Detection\n(DFA / EIA / ICT)", "Stool", "Detects Giardia-specific antigens (GSA65 antigen).\nHigher sensitivity than O&P.\nCommercially available kits; often combined with Cryptosporidium test", "High"],
    ["NAAT / PCR\n(Multiplex)", "Stool", "FDA-approved multiplex panels (FilmArray GI, Luminex xTAG)\nHighest sensitivity & specificity; detects multiple GI pathogens", "Highest"],
    ["ELISA\n(Serology)", "Serum", "Anti-Giardia IgM, IgG, IgA detectable.\nNot used routinely for clinical diagnosis; more for research/epidemiology", "Variable"],
  ];

  slide.addTable(labMethods, {
    x: 0.2, y: 2.05, w: 13.0, h: 4.8,
    fontSize: 8.5,
    fontFace: "Arial",
    border: { pt: 0.5, color: "CCCCCC" },
    rowH: 0.58,
    align: "left",
    color: TEXT_BODY,
    fill: WHITE,
    colW: [2.2, 2.0, 5.8, 3.0],
    thead: {
      fill: { color: DARK_BLUE },
      color: WHITE,
      bold: true,
      fontSize: 9.5,
      align: "center"
    }
  });

  // Note box
  slide.addShape(pres.ShapeType.rect, {
    x: 0.2, y: 7.0, w: 13.0, h: 0.28,
    fill: { color: NOTE_BG }, line: { color: GOLD, width: 0.5 }
  });
  slide.addText("★ EXAM TIP: 'Stool examination for ova & parasites (O&P) ×3 specimens on alternate days' is the classic recommendation. Sensitivity of a single specimen ~50–70%; 3 specimens increases sensitivity to ~90%.", {
    x: 0.3, y: 7.02, w: 12.8, h: 0.24,
    fontSize: 8.5, color: "7A5000", fontFace: "Arial", valign: "middle", bold: false
  });

  slide.addShape(pres.ShapeType.rect, { x: 0, y: 7.3, w: 13.3, h: 0.2, fill: { color: DARK_BLUE } });
}

// ============================================================
// SLIDE 6: MICROSCOPY IMAGES + CULTURE / TRANSPORT MEDIA
// ============================================================
{
  let slide = newSlide(BG);

  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.45, fill: { color: DARK_BLUE } });
  slide.addText("GIARDIA LAMBLIA — MICROSCOPY, CULTURE MEDIA & TRANSPORT", {
    x: 0.2, y: 0.03, w: 12.9, h: 0.4,
    fontSize: 14, bold: true, color: WHITE, fontFace: "Arial", valign: "middle"
  });
  slide.addText("Slide 6 of 7", {
    x: 10.5, y: 0.03, w: 2.6, h: 0.4,
    fontSize: 9, color: GOLD, fontFace: "Arial", align: "right", valign: "middle"
  });

  // IMAGES
  addSectionBar(slide, "MICROSCOPY IMAGES", 0.55, ACCENT);

  // Biopsy + cyst image
  if (imgData[1] && !imgData[1].error) {
    slide.addImage({ data: imgData[1].base64, x: 0.2, y: 0.98, w: 4.1, h: 3.2 });
  }
  slide.addText("Fig A: Duodenal biopsy (H&E) — Trophozoites between villi\nFig B: Giardia cyst in stool (Giemsa stain, 400×)", {
    x: 0.2, y: 4.22, w: 4.1, h: 0.5,
    fontSize: 8, color: "555555", fontFace: "Arial", italic: true, align: "center"
  });

  // Trophozoite/cyst stained
  if (imgData[2] && !imgData[2].error) {
    slide.addImage({ data: imgData[2].base64, x: 4.5, y: 0.98, w: 4.1, h: 3.2 });
  }
  slide.addText("Fig A: Trophozoites (trichrome, 1000×)  Fig B: Cysts (trichrome)\nFig C: Duodenal biopsy — trophozoites ventral view (arrow)", {
    x: 4.5, y: 4.22, w: 4.1, h: 0.5,
    fontSize: 8, color: "555555", fontFace: "Arial", italic: true, align: "center"
  });

  // CULTURE MEDIA
  addSectionBar(slide, "CULTURE MEDIA (In Vitro Cultivation)", 4.8);
  slide.addShape(pres.ShapeType.rect, {
    x: 0.2, y: 5.22, w: 8.5, h: 2.0,
    fill: { color: LIGHT_BOX }, line: { color: LINE_COLOR, width: 0.5 }
  });

  const cultureData = [
    [{ text: "TYI-S-33 Medium", options: { bold: true }}, { text: " (Trypticase-Yeast Extract-Iron-Serum) — Most widely used axenic culture medium for Giardia trophozoites" }],
    [{ text: "Keister's modified TYI-S-33", options: { bold: true }}, { text: " — Modified version with increased sensitivity" }],
    [{ text: "Diamond's TYM medium", options: { bold: true }}, { text: " — Used for Entamoeba; less common for Giardia" }],
    [{ text: "Importance:", options: { bold: true, color: ACCENT }}, { text: " Culture mainly used for research and drug sensitivity testing; NOT routinely done for diagnosis" }],
    [{ text: "Growth conditions:", options: { bold: true }}, { text: " 37°C, microaerophilic conditions, pH 7.0–7.2" }],
    [{ text: "Encystation medium:", options: { bold: true }}, { text: " Alkaline media (pH 7.8) + bile — induces cyst formation in vitro for research" }],
  ];

  cultureData.forEach((row, i) => {
    slide.addText(row, {
      x: 0.35, y: 5.28 + i * 0.31,
      w: 8.2, h: 0.28,
      fontSize: 9, color: TEXT_BODY, fontFace: "Arial"
    });
  });

  // TRANSPORT MEDIA
  addSectionBar(slide, "TRANSPORT MEDIA & PRESERVATION", 4.8, ACCENT);
  // reposition right
  slide.addShape(pres.ShapeType.rect, {
    x: 8.85, y: 0.98, w: 4.25, h: 6.25,
    fill: { color: LIGHT_BOX }, line: { color: ACCENT, width: 0.5 }
  });

  slide.addText("TRANSPORT MEDIA", {
    x: 8.95, y: 1.02, w: 4.05, h: 0.3,
    fontSize: 10, bold: true, color: DARK_BLUE, fontFace: "Arial"
  });

  const transportMedia = [
    { name: "PVA Fixative\n(Polyvinyl Alcohol)", use: "Preserves trophozoites & cysts for morphology; allows permanent staining. GOLD STANDARD transport medium" },
    { name: "10% Formalin\n(Formal Saline)", use: "Preserves cysts only. Good for concentration methods (formal-ether). Cannot be used for permanent stains" },
    { name: "SAF\n(Sodium Acetate-Acetic Acid-Formalin)", use: "Preserves both trophozoites & cysts; allows permanent staining + concentration. Better alternative to PVA" },
    { name: "MIF\n(Merthiolate-Iodine-Formalin)", use: "Trophozoites + cysts preserved; directly readable with iodine staining. Quick method" },
    { name: "Schaudinn's Fixative", use: "Used for immediate fixation of fresh stool smears for permanent staining" },
    { name: "Cary-Blair Medium", use: "For bacteria; NOT recommended for protozoa" },
    { name: "Fresh Examination", use: "Ideal: examine within 30 min (trophozoite motility). If >30 min, must use fixative" },
  ];

  transportMedia.forEach((item, i) => {
    slide.addShape(pres.ShapeType.rect, {
      x: 8.87, y: 1.36 + i * 0.73, w: 4.18, h: 0.68,
      fill: { color: i % 2 === 0 ? WHITE : LIGHT_BOX },
      line: { color: "CCCCCC", width: 0.3 }
    });
    slide.addText(item.name, {
      x: 8.9, y: 1.38 + i * 0.73, w: 1.5, h: 0.62,
      fontSize: 8, bold: true, color: DARK_BLUE, fontFace: "Arial", valign: "middle", align: "center", wrap: true
    });
    slide.addShape(pres.ShapeType.line, {
      x: 10.42, y: 1.38 + i * 0.73, w: 0, h: 0.62,
      line: { color: "AAAAAA", width: 0.5 }
    });
    slide.addText(item.use, {
      x: 10.47, y: 1.38 + i * 0.73, w: 2.52, h: 0.62,
      fontSize: 7.5, color: TEXT_BODY, fontFace: "Arial", valign: "middle", wrap: true
    });
  });

  slide.addShape(pres.ShapeType.rect, { x: 0, y: 7.3, w: 13.3, h: 0.2, fill: { color: DARK_BLUE } });
}

// ============================================================
// SLIDE 7: TREATMENT + KEY EXAM POINTS
// ============================================================
{
  let slide = newSlide(BG);

  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.45, fill: { color: DARK_BLUE } });
  slide.addText("GIARDIA LAMBLIA — TREATMENT, PREVENTION & EXAM KEY POINTS", {
    x: 0.2, y: 0.03, w: 12.9, h: 0.4,
    fontSize: 14, bold: true, color: WHITE, fontFace: "Arial", valign: "middle"
  });
  slide.addText("Slide 7 of 7", {
    x: 10.5, y: 0.03, w: 2.6, h: 0.4,
    fontSize: 9, color: GOLD, fontFace: "Arial", align: "right", valign: "middle"
  });

  // TREATMENT TABLE
  addSectionBar(slide, "TREATMENT OF GIARDIASIS", 0.55);
  const treatTable = [
    ["Drug", "Dose (Adult)", "Duration", "Notes"],
    ["Tinidazole\n(DRUG OF CHOICE)", "2g single dose", "Single dose", "Most effective; best cure rate (~90%). Single dose advantage. Category C in pregnancy"],
    ["Metronidazole\n(Flagyl)", "250mg TDS or 400mg TDS", "5–7 days", "Widely used; most available. Avoid alcohol. Category B in pregnancy after 1st trimester"],
    ["Nitazoxanide", "500mg BD", "3 days", "FDA-approved; good for children (liquid form available). Effective & safe in HIV patients"],
    ["Albendazole", "400mg OD", "5 days", "Alternative; also treats helminths. Less efficacious than metronidazole"],
    ["Paromomycin", "25–30 mg/kg/day in 3 doses", "5–10 days", "Drug of choice in PREGNANCY (not absorbed systemically). Aminoglycoside"],
    ["Quinacrine", "100mg TDS", "5 days", "Older drug; no longer easily available. High efficacy"],
    ["Furazolidone", "100mg QID", "7–10 days", "Liquid form available for children. Limited availability"],
    ["Mebendazole", "200mg TDS", "5 days", "Alternative; less commonly used"],
  ];

  slide.addTable(treatTable, {
    x: 0.2, y: 0.98, w: 12.9, h: 3.2,
    fontSize: 8.5,
    fontFace: "Arial",
    border: { pt: 0.5, color: "CCCCCC" },
    rowH: 0.36,
    align: "left",
    color: TEXT_BODY,
    fill: WHITE,
    colW: [2.5, 2.3, 1.8, 6.3],
    thead: {
      fill: { color: DARK_BLUE },
      color: WHITE,
      bold: true,
      fontSize: 9.5
    }
  });

  // Special situations
  addSectionBar(slide, "TREATMENT IN SPECIAL SITUATIONS", 4.25, ACCENT);
  slide.addShape(pres.ShapeType.rect, {
    x: 0.2, y: 4.65, w: 6.3, h: 1.25,
    fill: { color: LIGHT_BOX }, line: { color: ACCENT, width: 0.5 }
  });
  const specPoints = [
    "• PREGNANCY: Paromomycin (non-absorbed); if unavailable, delay treatment to 2nd trimester then use metronidazole",
    "• CHILDREN: Nitazoxanide (liquid), Tinidazole, Metronidazole (syrup)",
    "• IMMUNOCOMPROMISED: Prolonged/combination therapy often needed. Nitazoxanide useful in HIV",
    "• TREATMENT FAILURE: Combination therapy (e.g., metronidazole + albendazole)",
    "• ASYMPTOMATIC CYST PASSERS: Generally treated to prevent transmission (paromomycin in pregnancy)",
  ];
  specPoints.forEach((t, i) => {
    slide.addText(t, {
      x: 0.35, y: 4.7 + i * 0.235,
      w: 6.1, h: 0.22,
      fontSize: 8.5, color: TEXT_BODY, fontFace: "Arial"
    });
  });

  // PREVENTION
  addSectionBar(slide, "PREVENTION & CONTROL", 4.25, DARK_BLUE);
  slide.addShape(pres.ShapeType.rect, {
    x: 6.7, y: 4.65, w: 6.35, h: 1.25,
    fill: { color: NOTE_BG }, line: { color: GOLD, width: 0.5 }
  });
  const prevPoints = [
    "• Water purification: Boiling (most reliable), filtration with 1μm absolute filter (chlorination ALONE does NOT kill cysts)",
    "• Hand hygiene: Thorough washing with soap before meals and after toilet",
    "• Safe food handling: Avoid raw vegetables washed with contaminated water",
    "• Avoid swimming in untreated freshwater (lakes, streams)",
    "• Treat infected individuals (including asymptomatic carriers in high-risk settings)",
    "• Screen children in daycare settings; exclude symptomatic children",
    "• No vaccine currently available",
  ];
  prevPoints.forEach((t, i) => {
    slide.addText(t, {
      x: 6.85, y: 4.7 + i * 0.175,
      w: 6.1, h: 0.17,
      fontSize: 8.5, color: "7A5000", fontFace: "Arial"
    });
  });

  // KEY EXAM POINTS
  addSectionBar(slide, "⭐ KEY EXAM POINTS — 20-MARK ESSAY & 6-MARK SAQ", 6.0, GOLD);
  slide.addShape(pres.ShapeType.rect, {
    x: 0.2, y: 6.42, w: 12.9, h: 0.82,
    fill: { color: "FFF8E1" }, line: { color: GOLD, width: 1 }
  });

  const keyPoints = [
    "1. Giardia = most common intestinal protozoan worldwide  |  2. CYST = infective form (10–25 cysts sufficient)  |  3. TROPHOZOITE = pathogenic/vegetative form",
    "4. Trophozoite: pear-shaped, 2 nuclei, 8 flagella, sucking disc, 'falling leaf motility', 'smiling face' appearance  |  5. Cyst: oval, 4 nuclei (mature)",
    "6. Diagnosis: Stool O&P × 3 specimens | String test | Biopsy | Antigen EIA | Multiplex NAAT  |  7. Drug of choice: Tinidazole (single dose) / Metronidazole  |  Pregnancy: Paromomycin",
    "8. Mechanism of diarrhea: Brush border damage → disaccharidase deficiency → malabsorption (NOT invasive)  |  9. Culture medium: TYI-S-33  |  10. Transport: PVA fixative",
  ];

  keyPoints.forEach((t, i) => {
    slide.addText(t, {
      x: 0.35, y: 6.46 + i * 0.19,
      w: 12.6, h: 0.18,
      fontSize: 8, color: "5D4000", fontFace: "Arial", bold: i === 0
    });
  });

  slide.addShape(pres.ShapeType.rect, { x: 0, y: 7.3, w: 13.3, h: 0.2, fill: { color: DARK_BLUE } });
}

// WRITE FILE
pres.writeFile({ fileName: "/home/daytona/workspace/giardia-answersheet/Giardia_lamblia_Answer_Sheet.pptx" })
  .then(() => {
    console.log("SUCCESS: Giardia_lamblia_Answer_Sheet.pptx created!");
  })
  .catch(err => {
    console.error("ERROR:", err);
    process.exit(1);
  });
Running Command

cd /home/daytona/workspace/giardia-answersheet && node create_answersheet.js 2>&…

Running Command

cd /home/daytona/workspace/giardia-answersheet && curl -s -o lifecycle.png "http…

Editing File

~/giardia-answersheet/create_answersheet.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/giardia-answersheet/create_answersheet.js'
Editing File

~/giardia-answersheet/create_answersheet.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/giardia-answersheet/create_answersheet.js'
Running Command

cd /home/daytona/workspace/giardia-answersheet && node create_answersheet.js 2>&…

Running Command

ls -lh /home/daytona/workspace/giardia-answersheet/Giardia_lamblia_Answer_Sheet.…

Your Giardia lamblia Microbiology IA Answer Sheet is ready! Download it here:

Giardia lamblia Answer Sheet

Presentation · PPTX


What's inside (7 slides, answer-sheet format):

SlideContent
1 - CoverTitle, full classification, contents index
2 - MorphologyTrophozoite vs Cyst comparison table + all features (size, nuclei, flagella, sucking disc, median bodies)
3 - Life Cycle + EpidemiologyStep-by-step life cycle with CDC diagram image embedded + epidemiology risk groups
4 - Pathogenesis + Antigenic Structure + Clinical FeaturesVSP antigenic variation, immune evasion, 6 clinical presentations (asymptomatic → malabsorption)
5 - Lab DiagnosisFull table: wet mount, formal-ether, trichrome stain, string test, biopsy, antigen EIA, NAAT/PCR with sensitivity comparison
6 - Microscopy Images + Culture/Transport MediaReal histology & stained microscopy images + TYI-S-33 culture medium + PVA/formalin/SAF/MIF transport media
7 - Treatment + Exam Key PointsFull treatment table (tinidazole, metronidazole, paromomycin in pregnancy, nitazoxanide) + prevention + 10 starred exam key points

Quick recap of the most exam-critical facts:

  • Infective form = CYST (10-25 cysts sufficient); Pathogenic form = TROPHOZOITE
  • Trophozoite: pear-shaped, 2 nuclei, 8 flagella, ventral sucking disc, "falling leaf motility," "smiling face" appearance
  • Cyst: oval, 4 nuclei (mature), rigid wall, survives weeks in cold water; NOT killed by chlorine alone
  • Drug of choice: Tinidazole (single 2g dose); Pregnancy: Paromomycin
  • Culture medium: TYI-S-33; Transport: PVA fixative
  • Diagnosis: Stool O&P x3 specimens | String test | Antigen EIA | Multiplex NAAT
  • Mechanism: brush border damage → disaccharidase deficiency → malabsorption (NO tissue invasion)
  • Antigenic variation via Variant Surface Proteins (VSPs) - switches every ~2 weeks
This is a shared conversation. Sign in to Orris to start your own chat.