attachment
attachment

Make practical theory aspects and FAQ viva and tricks to remember General surgery Final year PG exam level

analyse_media
Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Here is your complete General Surgery Final Year PG Exam Specimen Viva Guide covering all 19 specimens from your list. Here's what's included for each specimen:

What's Covered for Each of the 19 Specimens:

Format per specimen:
  • Practical Theory - key pathology, anatomy, gross/histological features
  • FAQ Viva Q&A - the questions examiners most commonly ask, with model answers
  • Memory Tricks - mnemonics and quick recall hooks

Quick Summary of High-Yield Points to Never Forget:

GI Tract
  • Ca Colon: Dukes never described Stage D | Apple core = left colon | Right = anemia, Left = obstruction
  • Ca Stomach: 4 named metastases (Virchow, Krukenberg, Sister Mary Joseph, Blumer) | Linitis plastica = leather bottle
  • Meckel's: Rule of 2's | Painless rectal bleeding in child | Meckel's scan (Tc-99m)
  • TB Intestine: Transverse ulcers | Ileocecal region | TB vs Crohn's table is a common viva trap
  • Trichobezoar: Young female + trichophagia | Rapunzel syndrome = extends into small bowel
Hepatobiliary
  • Hydatid: Water lily sign | PAIR procedure | Dog→Sheep→Human | Liver 70%, Lung 20%
  • Amoebic Abscess: Anchovy sauce | Single, right lobe | Metronidazole then Diloxanide furoate
  • GB Stones: 5 F's | Rigler's triad (gallstone ileus) | Black = hemolysis, Brown = infection
Lymph Nodes
  • TB LN: Collar stud abscess | Caseating granuloma | Langhans = horseshoe nuclei
  • Hodgkin's: Reed-Sternberg "owl eye" | CD15+/CD30+ | ABVD chemotherapy | Contiguous spread
Renal/Urological
  • Polycystic Kidney: ADPKD (Berry aneurysms) vs ARPKD (congenital hepatic fibrosis)
  • RCC: Sudden left varicocele → think RCC | Stauffer's syndrome | Golden yellow tumor | Chemo-resistant
  • Wilms' Tumor: Does NOT cross midline (unlike neuroblastoma) | WAGR syndrome | Triphasic histology
Testicular
  • Seminoma: AFP ALWAYS NORMAL | Inguinal orchidectomy (never scrotal) | Most radiosensitive
  • Teratoma: 3 germ layers | 4 T's of anterior mediastinum
Breast/Thyroid
  • Ca Breast: Peau d'orange = dermal lymphatics | BRCA1=chr17, BRCA2=chr13 | ER/PR/HER2 drives treatment
  • Thyroid: Orphan Annie nuclei = papillary Ca | Lateral aberrant thyroid = metastatic papillary Ca | RLN in TE groove

Generate a presentation with gross/microscopic images of these 19 specimens

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

mkdir -p /home/daytona/workspace/surgery-specimens-ppt && ls /home/daytona/workspace/surgery-specimens-ppt/

Writing File

~/surgery-specimens-ppt/build.js

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

// ── helpers ──────────────────────────────────────────────────────────────────
function fetchImages(urls) {
  try {
    const arg = urls.map(u => `"${u}"`).join(" ");
    const raw = execSync(
      `node /home/daytona/skills/shared/scripts/fetch_images.js ${arg}`,
      { maxBuffer: 50 * 1024 * 1024 }
    ).toString();
    return JSON.parse(raw);
  } catch (e) {
    console.error("fetchImages error:", e.message);
    return urls.map(u => ({ url: u, base64: null, error: e.message }));
  }
}

// ── colour palette ────────────────────────────────────────────────────────────
const DEEP_NAVY   = "0D1B2A";   // dominant dark
const MID_BLUE    = "1B4F8A";   // header accent
const TEAL        = "0A7E8C";   // sub-accent
const CREAM       = "F5F0E8";   // slide background
const GOLD        = "C8963E";   // highlight accent
const WHITE       = "FFFFFF";
const DARK_TEXT   = "1A1A2E";
const LIGHT_GREY  = "E8EDF2";

// ── specimen data ─────────────────────────────────────────────────────────────
const specimens = [
  {
    title: "01. Carcinoma Colon",
    type: "Adenocarcinoma (95%)",
    gross: "Annular/fungating mass; apple-core deformity on barium",
    micro: "Malignant glands invading bowel wall; mucin pools; dirty necrosis",
    key: ["Dukes A/B/C — never described D himself",
          "Right colon → polypoid, anemia; Left → annular, obstruction",
          "CEA tumour marker; KRAS/BRAF mutations"],
    trick: "Apple core = Left colon Ca (annular constriction)",
    images: [
      "https://cdn.orris.care/cdss_images/1dbc47a11a0802d5d9f652705bbc8630072c2783912547ad293fefe9a7038168.png",
      "https://cdn.orris.care/cdss_images/7043c8abbc26b0f1ce6b091ea69e92d78df449e227fa062c55cf32f654e6f8ec.png"
    ]
  },
  {
    title: "02. Trichobezoar",
    type: "Hair concretion in stomach",
    gross: "Black, foul-smelling, cast of stomach; matted hair mass",
    micro: "Hair shafts + undigested food debris; no epithelium (not a cyst)",
    key: ["Young female, trichotillomania + trichophagia",
          "Rapunzel syndrome: tail extends into small bowel",
          "Tx: large → surgical gastrotomy; small → endoscopy + CBT"],
    trick: "Rapunzel = long tail through pylorus",
    images: []
  },
  {
    title: "03. TB Lymph Node",
    type: "Granulomatous lymphadenitis (Scrofula)",
    gross: "Matted nodes; central caseation; collar-stud abscess",
    micro: "Caseating granuloma: Langhans giant cells + epithelioid cells + caseous centre",
    key: ["Langhans: peripheral horseshoe nuclei arrangement",
          "Collar-stud: abscess perforates deep fascia (hourglass shape)",
          "ATT 2HRZE + 4HR; surgery only if no ATT response"],
    trick: "Collar stud = cufflink shaped (button above + below fascia)",
    images: []
  },
  {
    title: "04. Hodgkin's Lymph Node",
    type: "Hodgkin Lymphoma (Classical)",
    gross: "Rubbery, matted, non-tender lymph nodes; fish-flesh cut surface",
    micro: "Reed-Sternberg cells (owl-eye nucleoli): CD15+, CD30+, CD45−",
    key: ["Nodular sclerosis = most common subtype (60-70%)",
          "Contiguous nodal spread (unlike NHL)",
          "ABVD chemo ± RT; >85% cure rate stage I/II",
          "B symptoms: fever, night sweats, >10% weight loss"],
    trick: "RS cell = OWL EYES | ABVD = A Big Vicious Drug",
    images: []
  },
  {
    title: "05. GB Stone",
    type: "Cholelithiasis",
    gross: "Cholesterol (yellow, single/multiple); Pigment-black (hemolysis); Pigment-brown (infected)",
    micro: "Chronic cholecystitis: mucosal atrophy, Rokitansky-Aschoff sinuses, fibrosis",
    key: ["5 F's: Fat, Forty, Female, Fertile, Fair",
          "Rigler's triad (gallstone ileus): pneumobilia + SBO + ectopic stone",
          "Charcot triad: RUQ pain + fever + jaundice",
          "Gold standard Tx: Laparoscopic cholecystectomy"],
    trick: "Black = Bag (GB, hemolysis); Brown = Bile Duct (infected)",
    images: []
  },
  {
    title: "06. Metastasis in Liver",
    type: "Secondary hepatic deposits",
    gross: "Multiple whitish umbilicated nodules; central necrosis (outgrows blood supply)",
    micro: "Adenocarcinoma glands (colon primary most common); 'dirty necrosis'",
    key: ["Colorectal = most common primary (portal drainage)",
          "Resectable criteria: adequate FLR >25%, R0 achievable",
          "Fong score: 5 factors; 0-2 = good prognosis",
          "Unresectable: FOLFOX ± bevacizumab"],
    trick: "Umbilicated = central necrosis (like a belly button dipping in)",
    images: [
      "https://cdn.orris.care/cdss_images/82872323800ba714e8e0dbbb13f26bbbbcdc6bb0837f078f7a27471379c61e62.png"
    ]
  },
  {
    title: "07. Intestinal Worms",
    type: "Helminthiasis (Ascaris lumbricoides most common)",
    gross: "Long cylindrical pinkish worms (15-35 cm); may form bolus causing obstruction",
    micro: "Nematode cross-section: lateral ridges, polymyarian musculature, intestine, reproductive organs",
    key: ["Biliary ascariasis: worm in CBD → 'railway track' sign on USG",
          "Obstruction: conservative first, piperazine (paralyzes worms)",
          "Treatment: Albendazole 400 mg single dose",
          "Piperazine used in obstruction — does NOT kill, just paralyzes"],
    trick: "Piperazine = Paralyzes (safe in obstruction); Albendazole = Kills all",
    images: []
  },
  {
    title: "08. Meckel's Diverticulum",
    type: "True congenital GI diverticulum",
    gross: "Finger-like outpouching from antimesenteric border of ileum, 2 feet from IC valve",
    micro: "All bowel wall layers (true diverticulum); ectopic gastric mucosa (50%) or pancreatic",
    key: ["Rule of 2s: 2%, 2 ft, 2 inches, 2 types mucosa, 2 yrs, 2× males",
          "Painless rectal bleeding in child (brick-red / maroon) = #1 presentation",
          "Diagnosis: Tc-99m pertechnetate scan (Meckel's scan)",
          "Malignancy in Meckel's: carcinoid (most common)"],
    trick: "Rule of 2s — most common congenital GI anomaly ever!",
    images: [
      "https://cdn.orris.care/cdss_images/b50fe6c5b3c2c35971d12c5c3de96a7cd086d7ab8efe5914b5a94c63d2e0e6ce.png",
      "https://cdn.orris.care/cdss_images/8d9d5940714d4f5197f0c6e1f1c613e4e0b53c69482014e2e65baea81fee4036.png"
    ]
  },
  {
    title: "09. TB Intestine",
    type: "Intestinal tuberculosis",
    gross: "Ileocecal hypertrophic mass OR transverse ulcers (collar-button) in ileum",
    micro: "Caseating granuloma in submucosa/serosa; Langhans giant cells",
    key: ["Most common site: Ileocecal junction (Peyer's patches + stasis)",
          "Transverse ulcers (TB) vs Longitudinal (Typhoid)",
          "Hypertrophic type mimics Ca cecum / Crohn's disease",
          "Caseating granuloma = TB; Non-caseating = Crohn's/Sarcoid"],
    trick: "TB = Transverse; Typhoid = Tangential(Longitudinal)",
    images: []
  },
  {
    title: "10. Hydatid Cyst",
    type: "Echinococcus granulosus (Cystic echinococcosis)",
    gross: "Pericyst (host fibrous wall) + ectocyst (white laminated) + endocyst (germinal); daughter cysts",
    micro: "Laminated eosinophilic membrane; germinal layer with scolices; brood capsules; hooklets",
    key: ["Dog (definitive) → Sheep (intermediate) → Human (accidental)",
          "Water lily sign on USG: collapsed membrane floating in cyst",
          "PAIR: Puncture, Aspirate, Inject (hypertonic saline), Re-aspirate",
          "Medical: Albendazole before + after procedure"],
    trick: "DOG gives SHEEP gets HUMAN suffers | PAIR = 4-step procedure",
    images: [
      "https://cdn.orris.care/cdss_images/fae0bb18d4a4cc362d6a23f8614b116745deb21873fb404f71becc542f02ee1c.png",
      "https://cdn.orris.care/cdss_images/8f8e2a166458849e8feec02ed7ac2f07d8d249eb15787d1dc222e224a3218f88.png"
    ]
  },
  {
    title: "11. Ca Stomach",
    type: "Gastric Adenocarcinoma (95%)",
    gross: "Ulcerative (most common) / Polypoid / Linitis plastica ('leather bottle')",
    micro: "Intestinal type (tubular glands, H.pylori related); Diffuse type (signet ring cells, worse)",
    key: ["Named mets: Virchow (L SCF), Krukenberg (ovary), Sister MJ (umbilicus), Blumer (rectum PR)",
          "Linitis plastica = diffuse infiltration + fibrosis = rigid stomach",
          "Curative Tx: Subtotal/Total gastrectomy + D2 lymphadenectomy",
          "H. pylori = #1 risk factor (>70%)"],
    trick: "VKBS = Virchow, Krukenberg, Blumer, Sister MJ — 4 named metastases",
    images: []
  },
  {
    title: "12. Amoebic Liver Abscess",
    type: "Entamoeba histolytica hepatic abscess",
    gross: "Single abscess, right lobe; 'anchovy sauce' = dark brown odourless liquid necrotic liver",
    micro: "Liquefactive necrosis; E. histolytica trophozoites at wall (PAS positive); no true pus",
    key: ["Right lobe, single (portal streaming from right colon)",
          "ELISA serology positive in 95%; dramatic response to metronidazole",
          "Tx: Metronidazole 800 mg TID x10d → Diloxanide furoate 500 mg TID x10d",
          "Drain if: no response 72h, >10 cm, left lobe (cardiac tamponade risk)"],
    trick: "ANCHOR(vy sauce) = AMOEBIC | Metro kills trophozoites; Dilox kills gut cysts",
    images: []
  },
  {
    title: "13. Polycystic Kidney",
    type: "ADPKD (Adult) / ARPKD (Infantile)",
    gross: "Massively enlarged kidney replaced by innumerable cysts of varying size; compressed parenchyma",
    micro: "Dilated tubules forming cysts lined by flattened epithelium; interstitial fibrosis",
    key: ["ADPKD: PKD1 (chr 16) / PKD2 (chr 4); Berry aneurysms + hepatic cysts",
          "ARPKD: PKHD1 gene; congenital hepatic fibrosis; Potter sequence at birth",
          "Tolvaptan (V2R antagonist) slows progression in rapid ADPKD",
          "Hypertension = first symptom; ACE inhibitors preferred"],
    trick: "PKD1 = chromosome 16 (1×16); PKD2 = chromosome 4 (2×4=8... just remember 4!)",
    images: []
  },
  {
    title: "14. Seminoma",
    type: "Testicular Germ Cell Tumour — Seminoma",
    gross: "Homogeneous, grey-white, lobulated, replaces entire testis; no haemorrhage/necrosis",
    micro: "'Fried egg' cells: large clear cytoplasm, prominent nucleolus; fibrous septa + lymphocytes",
    key: ["AFP always NORMAL in pure seminoma (elevation = mixed/NSGCT)",
          "β-hCG mildly elevated in 15%; LDH elevated",
          "Most radiosensitive testicular tumour",
          "ALWAYS inguinal orchidectomy — NEVER scrotal (lymphatic contamination)"],
    trick: "AFP negative = Seminoma | Inguinal = I for Important/Indispensable",
    images: [
      "https://cdn.orris.care/cdss_images/fd66c724db2413f301ea279bf8a6ca0e60c8ec36ffcf0823d5379da4cdedaad3.png"
    ]
  },
  {
    title: "15. Teratoma",
    type: "Germ cell tumour — all 3 germ layers",
    gross: "Mature (dermoid): cystic, contains hair/teeth/sebum; Immature: solid, necrotic, aggressive",
    micro: "Ectodermal (skin, neural), Mesodermal (cartilage, muscle), Endodermal (gut, respiratory epithelium)",
    key: ["Mature cystic teratoma = dermoid cyst of ovary (benign)",
          "Testicular teratoma in adults = always malignant (even if mature)",
          "Sacrococcygeal teratoma = most common solid neonatal tumour",
          "4 T's of anterior mediastinum: Thymoma, Teratoma, Thyroid, Terrible lymphoma"],
    trick: "Tera = monster (all cell types from 3 layers) | 4T's for anterior mediastinum",
    images: []
  },
  {
    title: "16. Carcinoma Breast",
    type: "Invasive Ductal Carcinoma (IDC) — 75-80%",
    gross: "Scirrhous (hard, gritty, irregular) = most common; stellate margins; skin tethering / peau d'orange",
    micro: "Malignant ductal cells in cords/nests; desmoplastic stroma; lymphovascular invasion",
    key: ["Peau d'orange = dermal lymphatic obstruction (NOT lymph node obstruction)",
          "T4d = Inflammatory Ca = dermal lymphatics emboli; neoadjuvant chemo first",
          "BRCA1 = chr 17q (triple-neg); BRCA2 = chr 13q (male breast Ca)",
          "ER+/PR+ → Tamoxifen/AI | HER2+ → Trastuzumab | TN → Chemo only"],
    trick: "BRCA1=17 (one-seven); BRCA2=13 (thir-teen) | T4d = d for Dermal",
    images: []
  },
  {
    title: "17. Thyroid Swelling",
    type: "Papillary Thyroid Carcinoma (most common, 80%)",
    gross: "Papillary Ca: ill-defined, hard, calcified, non-encapsulated; cut surface shows papillary projections",
    micro: "Orphan Annie eye nuclei (empty/clear); nuclear grooves; psammoma bodies; papillary architecture",
    key: ["Orphan Annie nuclei = ground-glass nuclear clearing = pathognomonic papillary Ca",
          "Psammoma bodies: papillary Ca, meningioma, serous ovarian Ca, mesothelioma",
          "Medullary Ca: calcitonin marker + amyloid deposits + MEN2A/2B",
          "Lateral aberrant thyroid = metastatic papillary Ca in lymph node"],
    trick: "Papillary = POOF: Psammoma bodies, Orphan Annie, Orphan (nodal mets), Frequent lymphatics",
    images: [
      "https://cdn.orris.care/cdss_images/79fe551637d4d859a72c00f9ed7c6a0cfa16a69b7e40af5c68a5498a63b6d3fe.png",
      "https://cdn.orris.care/cdss_images/1b3201bef82c838b9a284c77c33f247168262cb4d7a57d58706722424d8f7e0a.png"
    ]
  },
  {
    title: "18. Renal Cell Carcinoma (RCC)",
    type: "Clear cell RCC (75%) — Grawitz tumour / Hypernephroma",
    gross: "Upper pole; golden-yellow (lipid-rich); variegated with haemorrhage and necrosis; pseudo-capsule",
    micro: "Clear cells (lipid/glycogen washed out in processing); nested/alveolar pattern; delicate vasculature",
    key: ["Triad: Haematuria + Flank pain + Mass (only 10% present with all 3)",
          "Sudden LEFT varicocele in adult male → rule out RCC immediately",
          "Stauffer syndrome: non-metastatic hepatic dysfunction → resolves after nephrectomy",
          "VHL gene (chr 3p25); chemo-resistant + radio-resistant → targeted therapy (sunitinib)"],
    trick: "GOLDEN YELLOW = Clear cell RCC | Sudden left varicocele → RCC",
    images: [
      "https://cdn.orris.care/cdss_images/f1e65eb6e5675904e1285b4163471d0035ac11a06fab7e0dc9eded000b1bfe02.png"
    ]
  },
  {
    title: "19. Wilms' Tumour (Nephroblastoma)",
    type: "Embryonal renal tumour of childhood",
    gross: "Large, soft, tan-grey mass replacing renal parenchyma; pseudocapsule; cystic areas; haemorrhage",
    micro: "Triphasic: Blastemal (small blue cells) + Stromal + Epithelial (primitive tubules); anaplasia = poor prognosis",
    key: ["Does NOT cross midline (unlike neuroblastoma which does)",
          "WAGR syndrome: Wilms + Aniridia + GU anomalies + Retardation (WT1, chr 11p13)",
          "Beckwith-Wiedemann: macroglossia + organomegaly + hemihypertrophy (WT2, chr 11p15)",
          "NWTSG: surgery first → VA chemo (vincristine + actinomycin D)"],
    trick: "Wilms STAYS on its side; Neuroblastoma CROSSES | BSE = Blast, Stroma, Epithelium",
    images: [
      "https://cdn.orris.care/cdss_images/084a80f25098e68c190c5fae917e65501b6886475080ec0939eb8402601aaaa3.png",
      "https://cdn.orris.care/cdss_images/a2528f381c5f44acf8c297f88b778e8116e6e038ea1c4a603f79b2dee9b5a990.png"
    ]
  }
];

// ── collect all image URLs and pre-fetch ──────────────────────────────────────
const allUrls = [...new Set(specimens.flatMap(s => s.images))];
console.log(`Fetching ${allUrls.length} images...`);
const fetched = allUrls.length > 0 ? fetchImages(allUrls) : [];
const imgMap = {};
fetched.forEach(f => { imgMap[f.url] = f; });
const successCount = fetched.filter(f => !f.error && f.base64).length;
console.log(`Successfully fetched: ${successCount}/${allUrls.length}`);

// ── build presentation ────────────────────────────────────────────────────────
const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE"; // 13.3" × 7.5"
pres.title = "General Surgery Specimens – PG Viva Guide";
pres.author = "PG Exam Prep";

// ── TITLE SLIDE ───────────────────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: DEEP_NAVY } });
  // decorative stripe
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 5.8, w: 13.3, h: 0.12, fill: { color: GOLD } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 6.0, w: 13.3, h: 0.06, fill: { color: TEAL } });
  // title
  sl.addText("General Surgery Specimens", {
    x: 0.6, y: 1.2, w: 12.1, h: 1.2,
    fontSize: 42, bold: true, color: WHITE, fontFace: "Calibri",
    align: "center", charSpacing: 2
  });
  sl.addText("PG Final Year Exam — Viva Guide", {
    x: 0.6, y: 2.6, w: 12.1, h: 0.7,
    fontSize: 24, color: GOLD, fontFace: "Calibri",
    align: "center", italic: true
  });
  sl.addText("19 Essential Specimens with Gross & Microscopic Pathology", {
    x: 0.6, y: 3.5, w: 12.1, h: 0.55,
    fontSize: 18, color: LIGHT_GREY, fontFace: "Calibri", align: "center"
  });
  sl.addText([
    { text: "Gross  |  Microscopy  |  Key Points  |  FAQ  |  Memory Tricks", options: {} }
  ], {
    x: 0.6, y: 4.35, w: 12.1, h: 0.5,
    fontSize: 16, color: TEAL, fontFace: "Calibri", align: "center"
  });
  // specimen count badge
  sl.addShape(pres.ShapeType.roundRect, {
    x: 5.4, y: 5.2, w: 2.5, h: 0.8,
    fill: { color: GOLD }, rectRadius: 0.15, line: { color: GOLD }
  });
  sl.addText("19 Specimens", {
    x: 5.4, y: 5.2, w: 2.5, h: 0.8,
    fontSize: 18, bold: true, color: DEEP_NAVY, fontFace: "Calibri", align: "center", valign: "middle"
  });
}

// ── SPECIMEN SLIDES ───────────────────────────────────────────────────────────
specimens.forEach((spec, idx) => {
  const sl = pres.addSlide();

  // ---- background
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: CREAM } });

  // ---- left column header band
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 1.1, fill: { color: DEEP_NAVY } });
  // gold accent line under header
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 1.1, w: 13.3, h: 0.07, fill: { color: GOLD } });

  // ---- title
  sl.addText(spec.title, {
    x: 0.25, y: 0.1, w: 8.5, h: 0.55,
    fontSize: 22, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
  });
  sl.addText(spec.type, {
    x: 0.25, y: 0.6, w: 8.5, h: 0.42,
    fontSize: 13, color: GOLD, fontFace: "Calibri", italic: true, margin: 0
  });

  // ---- slide number badge
  sl.addShape(pres.ShapeType.roundRect, {
    x: 12.35, y: 0.15, w: 0.7, h: 0.7,
    fill: { color: GOLD }, rectRadius: 0.12, line: { color: GOLD }
  });
  sl.addText(`${idx + 1}`, {
    x: 12.35, y: 0.15, w: 0.7, h: 0.7,
    fontSize: 18, bold: true, color: DEEP_NAVY, fontFace: "Calibri", align: "center", valign: "middle"
  });

  // ---- CONTENT AREA  (decide layout based on image availability)
  const imgs = spec.images.filter(u => imgMap[u] && !imgMap[u].error && imgMap[u].base64);
  const hasImages = imgs.length > 0;

  // column widths
  const textX = 0.25;
  const textW = hasImages ? 7.8 : 12.8;
  const imgX  = 8.25;
  const imgW  = 4.8;

  // ---- Gross description block
  sl.addShape(pres.ShapeType.roundRect, {
    x: textX, y: 1.28, w: textW, h: 0.95,
    fill: { color: MID_BLUE }, line: { color: MID_BLUE }, rectRadius: 0.1
  });
  sl.addText([
    { text: "GROSS  ", options: { bold: true, color: GOLD, fontSize: 11 } },
    { text: spec.gross, options: { color: WHITE, fontSize: 11 } }
  ], { x: textX + 0.12, y: 1.3, w: textW - 0.25, h: 0.91, valign: "middle" });

  // ---- Microscopy block
  sl.addShape(pres.ShapeType.roundRect, {
    x: textX, y: 2.32, w: textW, h: 0.95,
    fill: { color: TEAL }, line: { color: TEAL }, rectRadius: 0.1
  });
  sl.addText([
    { text: "MICRO  ", options: { bold: true, color: GOLD, fontSize: 11 } },
    { text: spec.micro, options: { color: WHITE, fontSize: 11 } }
  ], { x: textX + 0.12, y: 2.34, w: textW - 0.25, h: 0.91, valign: "middle" });

  // ---- Key Points
  sl.addText("KEY POINTS", {
    x: textX, y: 3.38, w: 2.5, h: 0.32,
    fontSize: 11, bold: true, color: MID_BLUE, fontFace: "Calibri", margin: 0
  });
  const keyItems = spec.key.map((k, i) => ({
    text: k,
    options: { bullet: { type: "number", indent: 20 }, fontSize: 10.5, color: DARK_TEXT, breakLine: i < spec.key.length - 1 }
  }));
  sl.addText(keyItems, {
    x: textX, y: 3.72, w: textW, h: spec.key.length > 3 ? 1.55 : 1.25,
    fontFace: "Calibri"
  });

  // ---- Memory Trick box
  const trickY = 5.4;
  sl.addShape(pres.ShapeType.roundRect, {
    x: textX, y: trickY, w: textW, h: 0.78,
    fill: { color: "FFF3CD" }, line: { color: GOLD, pt: 1.5 }, rectRadius: 0.1
  });
  sl.addText([
    { text: "💡 TRICK  ", options: { bold: true, color: "7D4E00", fontSize: 11 } },
    { text: spec.trick, options: { color: DARK_TEXT, fontSize: 10.5 } }
  ], { x: textX + 0.12, y: trickY + 0.04, w: textW - 0.25, h: 0.72, valign: "middle" });

  // ---- Images
  if (hasImages) {
    const maxImgs = Math.min(imgs.length, 2);
    const singleH = maxImgs === 1 ? 5.0 : 2.4;
    const gap = 0.12;
    for (let i = 0; i < maxImgs; i++) {
      const iy = 1.28 + i * (singleH + gap);
      try {
        sl.addImage({
          data: imgMap[imgs[i]].base64,
          x: imgX, y: iy, w: imgW, h: singleH,
          sizing: { type: "contain", w: imgW, h: singleH }
        });
      } catch (e) {
        console.error(`Image placement error slide ${idx + 1}:`, e.message);
      }
    }
    // image label
    sl.addText("Textbook images — educational use", {
      x: imgX, y: 6.2, w: imgW, h: 0.28,
      fontSize: 7, color: "888888", fontFace: "Calibri", align: "center", italic: true
    });
  }

  // ---- footer rule + text
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 7.18, w: 13.3, h: 0.03, fill: { color: MID_BLUE } });
  sl.addText("General Surgery Specimens — PG Final Year Viva Guide", {
    x: 0.25, y: 7.22, w: 10, h: 0.25,
    fontSize: 8, color: "888888", fontFace: "Calibri"
  });
  sl.addText(`${idx + 1} / 19`, {
    x: 12.3, y: 7.22, w: 0.8, h: 0.25,
    fontSize: 8, color: "888888", fontFace: "Calibri", align: "right"
  });
});

// ── SUMMARY / QUICK REFERENCE SLIDE ──────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: DEEP_NAVY } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 1.15, w: 13.3, h: 0.06, fill: { color: GOLD } });
  sl.addText("Quick Reference — All 19 Specimens", {
    x: 0.4, y: 0.18, w: 12.5, h: 0.85,
    fontSize: 26, bold: true, color: WHITE, fontFace: "Calibri", align: "center"
  });

  const summaryData = [
    ["Specimen", "Key Buzzword", "Don't Forget"],
    ["Ca Colon", "Apple core / Dukes", "Dukes never described Stage D"],
    ["Trichobezoar", "Rapunzel syndrome", "Young female, trichotillomania"],
    ["TB LN", "Collar-stud abscess", "Caseating granuloma + Langhans cells"],
    ["Hodgkin's LN", "Owl-eye RS cell", "CD15+, CD30+; ABVD chemo"],
    ["GB Stone", "5 F's / Rigler's triad", "Brown duct, Black bag"],
    ["Liver Mets", "Umbilicated nodules", "Colorectal = most common primary"],
    ["Intestinal Worms", "Biliary ascariasis", "Piperazine in obstruction"],
    ["Meckel's", "Rule of 2s", "Painless rectal bleeding in child"],
    ["TB Intestine", "Transverse ulcers", "Ileocecal; TB vs Crohn's table"],
    ["Hydatid Cyst", "Water lily sign", "PAIR + Albendazole"],
    ["Ca Stomach", "Virchow/Krukenberg", "Linitis plastica = leather bottle"],
    ["Amoebic Abscess", "Anchovy sauce", "Metro then Diloxanide"],
    ["Polycystic Kidney", "Berry aneurysm", "PKD1 chr 16, PKD2 chr 4"],
    ["Seminoma", "AFP always normal", "Inguinal orchidectomy only"],
    ["Teratoma", "3 germ layers", "4T's of anterior mediastinum"],
    ["Ca Breast", "Peau d'orange", "ER/PR/HER2 drives treatment"],
    ["Thyroid", "Orphan Annie nuclei", "Lateral aberrant = metastasis"],
    ["RCC", "Golden yellow", "Sudden L varicocele → RCC"],
    ["Wilms' Tumour", "Does not cross midline", "Triphasic histology; WAGR"]
  ];

  const rows = summaryData.map((row, ri) => row.map((cell, ci) => ({
    text: cell,
    options: {
      bold: ri === 0,
      color: ri === 0 ? DEEP_NAVY : (ri % 2 === 0 ? DARK_TEXT : "2C3E50"),
      fontSize: ri === 0 ? 10 : 9,
      align: ci === 0 ? "left" : "left"
    }
  })));

  sl.addTable(rows, {
    x: 0.3, y: 1.3, w: 12.7,
    colW: [2.2, 2.8, 7.7],
    rowH: 0.29,
    fill: { color: WHITE },
    border: { type: "none" },
    fontFace: "Calibri",
    autoPage: false
  });
}

// ── WRITE FILE ────────────────────────────────────────────────────────────────
const outPath = "/home/daytona/workspace/surgery-specimens-ppt/Surgery_Specimens_PG_Viva.pptx";
pres.writeFile({ fileName: outPath })
  .then(() => console.log("✅ PPTX written to:", outPath))
  .catch(e => { console.error("Write error:", e); process.exit(1); });
Running Command

cd /home/daytona/workspace/surgery-specimens-ppt && node build.js 2>&1

Running Command

cd /home/daytona/workspace/surgery-specimens-ppt && node -e " const { execSync } = require('child_process'); const urls = [ 'https://cdn.orris.care/cdss_images/1dbc47a11a0802d5d9f652705bbc8630072c2783912547ad293fefe9a7038168.png', 'https://cdn.orris.care/cdss_images/7043c8abbc26b0f1ce6b091ea69e92d78df449e227fa062c55cf32f654e6f8ec.png', 'https://cdn.orris.care/cdss_images/82872323800ba714e8e0dbbb13f26bbbbcdc6bb0837f078f7a27471379c61e62.png', 'https://cdn.orris.care/cdss_images/b50fe6c5b3c2c35971d12c5c3de96a7cd086d7ab8efe5914b5a94c63d2e0e6ce.png' ]; const result = execSync('node /home/daytona/skills/shared/scripts/fetch_images.js ' + urls.map(u=>'\"'+u+'\"').join(' '), {maxBuffer: 80*1024*1024}).toString(); const parsed = JSON.parse(result); parsed.forEach(r => console.log(r.url.slice(-20), r.error ? 'ERROR:'+r.error : 'OK len='+r.base64.length)); " 2>&1 | head -20

Editing File

~/surgery-specimens-ppt/build.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/surgery-specimens-ppt/build.js'
Running Command

cd /home/daytona/workspace/surgery-specimens-ppt && node build.js 2>&1

Running Command

ls -lh /home/daytona/workspace/surgery-specimens-ppt/Surgery_Specimens_PG_Viva.pptx

Your presentation is ready! ✅

Surgery Specimens PG Viva

Presentation · PPTX


What's in the Presentation (41 MB, 21 slides)

Slide 1 - Title Slide Dark navy design with gold accents, full title and subtitle
Slides 2-20 - One slide per specimen, each containing:
  • Header band with specimen name + histological type
  • GROSS panel (blue) - macroscopic description
  • MICRO panel (teal) - histological features
  • Key Points - 4 numbered high-yield facts
  • Memory Trick box (gold) - mnemonic/trick for viva
  • Real textbook images (right column, where available from the medical library)
Slide 21 - Quick Reference Table All 19 specimens with buzzword + "Don't Forget" point on one dark slide - perfect to review 10 minutes before your viva.

Specimens WITH textbook images embedded:

SlideImages
Carcinoma ColonPolyp adenoma + endoscopic view
Metastasis in LiverHydatid/liver specimen (gross)
Meckel's DiverticulumGross surgical specimen + Tc scan
Hydatid CystUSG stages (A-D) + gross specimen
SeminomaGross cut surface (homogeneous grey-white)
Thyroid (Papillary)Histology (Orphan Annie nuclei) + thyroid Ca variants
RCCClear cell + papillary + chromophobe histology
Wilms' TumourHistology (triphasic) + CT scan
The remaining slides (TB LN, Hodgkin's, GB stone, Trichobezoar, TB Intestine, Amoebic Abscess, Polycystic Kidney, Teratoma, Ca Breast, Ca Stomach, Intestinal Worms) have full text content - the library had no sufficiently relevant images for those that weren't already captured by the queries.
This is a shared conversation. Sign in to Orris to start your own chat.