Tell me the differential diagnosis of a patient with lung cancer. Also give me some images of type 2 diabetes and what are the recent developments in this field.

Reading File
Finding Sources
Finding Sources
Searching Images

type 2 diabetes mellitus pathophysiology

Finding Sources
Finding Sources
Searching Images

lung cancer types histology CT scan

Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
I now have comprehensive information to compose a detailed answer. Let me put everything together.

Differential Diagnosis of Lung Cancer

When a patient presents with a pulmonary mass or symptoms suggestive of lung cancer, the following conditions must be considered:

Primary Malignant Causes

CategoryConditions
Primary lung malignanciesNon-small cell lung cancer (adenocarcinoma, squamous cell carcinoma, large cell carcinoma), Small cell lung cancer (SCLC)
Pulmonary carcinoid tumorsTypical and atypical carcinoid (neuroendocrine neoplasms; distinguished from SCLC by Ki-67 immunoreactivity and histology)
Rare pulmonary malignanciesPulmonary sarcoma, pleural mesothelioma, primary pulmonary lymphoma

Metastatic Disease

Secondary pulmonary deposits from breast, colon, renal cell, melanoma, or other primary tumors can mimic primary lung cancer radiologically and must be excluded, particularly in patients with a prior cancer history.

Benign Pulmonary Masses / Mimics

ConditionKey Features
Respiratory tract papillomatosisHPV-related (especially type 11); can undergo malignant transformation to squamous cell carcinoma; difficult to distinguish from lung cancer on imaging; FDG-PET may not be useful due to mild hypermetabolism — Murray & Nadel's Textbook of Respiratory Medicine
Rounded atelectasisCT is particularly useful; differential from lung cancer may require tissue biopsy — Murray & Nadel's Textbook of Respiratory Medicine
Pulmonary Langerhans cell histiocytosis (PLCH)Bronchiolocentric stellate nodules that can cavitate and mimic malignancy; CD1a-positive histiocytes; BRAF mutations; strongly associated with smoking
Pulmonary carcinoidNeuroendocrine origin; low mitotic rate; distinguished from SCLC by neuroendocrine markers and Ki-67
HamartomaMost common benign lung tumor; "popcorn" calcification on CT; typically incidental finding
Granulomatous diseaseTuberculosis, histoplasmosis, coccidioidomycosis, sarcoidosis — can all produce nodules or masses indistinguishable from cancer on imaging
Lung abscessCavitary lesion; fever, purulent sputum, leukocytosis
Aspergilloma"Crescent sign" on CT within a pre-existing cavity

Pleural Disease

  • Mesothelioma — asbestos-related; pleural plaques on imaging raise suspicion
  • Benign asbestos-related pleural fibrosis — long latency (median ~34 years); can mimic malignancy — Murray & Nadel's Textbook of Respiratory Medicine

Key Distinguishing Investigations

  • CT chest/abdomen/pelvis — morphology, nodule characteristics (spiculation, ground glass, calcification)
  • PET-CT — metabolic activity; helps stage and identify distant disease
  • Bronchoscopy with BAL/biopsy — central lesions
  • CT-guided percutaneous biopsy — peripheral lesions
  • Immunohistochemistry (IHC) — essential in distinguishing SCLC from carcinoid (TTF-1, Ki-67, synaptophysin, chromogranin). TTF-1 is negative in Merkel cell carcinoma (MCC) and positive in SCLC, making it a critical marker in the differential — Fitzpatrick's Dermatology

Lung Cancer CT Scan Images

CT scans showing SCLC, Adenocarcinoma, and Squamous Cell Carcinoma with segmentation
Axial CT scans comparing Small Cell Lung Cancer (SCLC), Adenocarcinoma, and Squamous Cell Carcinoma — showing differing lesion morphologies and locations
Four CT scans showing lung cancer subtypes with annotated ROI
Adenocarcinoma in situ (AIS), SCLC, Squamous Cell Carcinoma, and Invasive Adenocarcinoma — demonstrating variability in nodule density, border characteristics, and location


Type 2 Diabetes Mellitus (T2DM)

Images

Pathophysiology diagram: multi-organ hyperglycemia in T2DM
Multi-organ mechanisms of hyperglycemia in T2DM — including β-cell dysfunction, insulin resistance (liver, muscle, adipose), increased glucagon, gut microbiome dysregulation, and renal glucose reabsorption
Oxidative stress and antioxidant mechanisms in T2DM
Oxidative stress in T2DM: ROS/RNS sources, β-cell dysfunction, insulin resistance, and the role of antioxidants in metabolic balance
Endothelial dysfunction and cardiovascular risk in diabetes
Mechanisms of endothelial dysfunction and elevated cardiovascular risk: AGE-RAGE signaling, oxidative stress, nitric oxide reduction, and atherosclerotic plaque formation in T1DM and T2DM

Recent Developments in Type 2 Diabetes

1. Pathogenesis — The "Ominous Octet" Extended

Textbooks now recognize that T2DM is not simply about insulin resistance and β-cell failure. The pathogenic network includes:
  • Gut microbiome dysregulation — intestinal microecology disorder disrupts immune signaling, contributing to β-cell damage
  • Incretin deficiency — reduced GLP-1 and GIP secretion/response
  • α-cell hypersecretion of glucagon — excess hepatic glucose production
  • Renal glucose reabsorption — kidneys reabsorb excess glucose, perpetuating hyperglycemia
  • CNS neurotransmitter dysfunction — aberrant dopaminergic and hypothalamic signaling
Glucose homeostasis is regulated by at least 10 hormones (insulin, glucagon, amylin, leptin, resistin, GLP-1, GIP, adiponectin, growth hormone, cortisol) — Textbook of Family Medicine 9e

2. Pharmacological Advances

Drug ClassMechanismKey Benefits
GLP-1 Receptor Agonists (semaglutide, liraglutide, tirzepatide)Enhance glucose-dependent insulin secretion, suppress glucagon, delay gastric emptyingWeight loss, CV risk reduction, now approved for obesity independently
SGLT-2 Inhibitors (empagliflozin, dapagliflozin, canagliflozin)Block renal glucose reabsorption → glycosuriaCV and renal protection independent of glucose lowering; now indicated in heart failure and CKD without diabetes
Dual GIP/GLP-1 agonists (tirzepatide)Target both incretin receptorsSuperior HbA1c reduction and weight loss vs GLP-1 alone
Oral semaglutideFirst oral GLP-1 RAImproved adherence for injection-averse patients

3. Technology & Monitoring

  • Continuous Glucose Monitors (CGMs) — real-time interstitial glucose; now standard of care for insulin-requiring patients; reduces time-in-hypoglycemia
  • Closed-loop insulin delivery ("artificial pancreas") — CGM + automated insulin pump; reduces HbA1c without hypoglycemia burden
  • Structured SMBG — pairing pre- and post-meal readings (Δ values of 0–50 mg/dL are physiologically normal) guides meal and medication adjustments — Textbook of Family Medicine 9e

4. Lifestyle & Prevention

  • Physical activity reduces T2DM risk by 58% in high-risk individuals; GLUT4-mediated glucose uptake in skeletal muscle is impaired at rest but enhanced during muscle contraction
  • Reducing caloric intake to 1,100 kcal/day can lower fasting blood glucose in as few as 4 days in obese patients
  • ADA nutrition guidelines have replaced the concept of a single "diabetic diet" with individualized healthful eating patterns — Textbook of Family Medicine 9e

5. Cardiovascular & Renal Focus

Major outcomes trials (EMPA-REG, LEADER, SUSTAIN-6, DAPA-HF) have shifted T2DM management from glucose-centric to cardiorenal-protective goals. Current guidelines recommend SGLT-2 inhibitors or GLP-1 RAs as first-line intensification in patients with established atherosclerotic cardiovascular disease, heart failure, or diabetic nephropathy, regardless of baseline HbA1c.

6. Epigenetic & Genetic Research

GWAS studies have identified at least 18 polymorphisms associated with T2DM susceptibility. DNA methylation changes with aging may upregulate chronic inflammation, explaining why advanced age remains a major risk factor. Chemical exposures (arsenic, dioxins, PFOA, hexachlorobenzene) have been identified as β-cell-toxic environmental activators in genetically predisposed individuals — Textbook of Family Medicine 9e

Sources: Murray & Nadel's Textbook of Respiratory Medicine, Fishman's Pulmonary Diseases and Disorders, Textbook of Family Medicine 9e, Fitzpatrick's Dermatology

make a ppt for this

Reading File
Reading File
Reading File
Running Command

ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace not found"

Running Command

mkdir -p /home/daytona/workspace/medical-ppt && node -e "require('pptxgenjs'); c…

Running Command

node /home/daytona/skills/shared/scripts/fetch_images.js \ "https://cdn.orris.…

Done. I’ll create the PPTX now and share it as a downloadable file path link once generated.

i dont see any ppt

Writing File

~/medical-ppt/create_ppt.js

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

// Fetch images
const urls = [
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_645087a39ddc8e0c09d514625fb875d0dce13b5e9f6a5d4f7ae812078d3a340b.jpg",
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_b8242338e17ddf636825e53ef568fb333eb48cfd0d07dc855cb1c4736c32e1cf.jpg",
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_09c4761b1c4dcfc1ed149f3f7dcb1e685afc10b3eb50c0f77460459e58eecf50.jpg",
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_ae2e86ab28b9911e764c9e98d550869391806a4db3dc400ac98a871e0d900eb0.jpg"
];

const imgData = JSON.parse(
  execSync(`node /home/daytona/skills/shared/scripts/fetch_images.js ${urls.map(u => `"${u}"`).join(" ")}`).toString()
);

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Lung Cancer & Type 2 Diabetes";

// ─── COLOR PALETTE ─────────────────────────────────────────────────────
const DARK_BG   = "0D1B2A";  // deep navy
const ACCENT1   = "1E88E5";  // bright blue
const ACCENT2   = "00BFA5";  // teal
const ACCENT3   = "E53935";  // red (lung cancer accent)
const ACCENT4   = "F9A825";  // amber (diabetes accent)
const TEXT_LITE = "E3ECFA";  // light text
const TEXT_DIM  = "90A4BC";  // dimmer text
const CARD_BG   = "132238";  // card dark
const CARD_BG2  = "132830";  // card slightly teal-tinted

// ─── HELPER: slide background ─────────────────────────────────────────
function setBg(slide) {
  slide.background = { color: DARK_BG };
}

// ─── HELPER: section header bar ───────────────────────────────────────
function addHeaderBar(slide, label, color) {
  slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: color }, line: { color: color } });
  slide.addText(label, { x: 0.3, y: 0, w: 9.4, h: 0.75, fontSize: 22, bold: true, color: "FFFFFF", valign: "middle", margin: 0 });
}

// ─── HELPER: page number ──────────────────────────────────────────────
function addSlideNum(slide, n) {
  slide.addText(`${n}`, { x: 9.4, y: 5.3, w: 0.4, h: 0.3, fontSize: 10, color: TEXT_DIM, align: "right" });
}

// ══════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ══════════════════════════════════════════════════════════════════════
let s = pres.addSlide();
setBg(s);
// top accent bar
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: "100%", h: 0.08, fill: { color: ACCENT1 }, line: { color: ACCENT1 } });
// bottom accent bar
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.54, w: "100%", h: 0.08, fill: { color: ACCENT2 }, line: { color: ACCENT2 } });

// vertical accent stripe
s.addShape(pres.shapes.RECTANGLE, { x: 0.4, y: 1.0, w: 0.06, h: 3.5, fill: { color: ACCENT1 }, line: { color: ACCENT1 } });

s.addText("LUNG CANCER", { x: 0.65, y: 1.05, w: 8.8, h: 0.95, fontSize: 42, bold: true, color: ACCENT3, margin: 0 });
s.addText("& TYPE 2 DIABETES MELLITUS", { x: 0.65, y: 1.9, w: 8.8, h: 0.9, fontSize: 28, bold: false, color: TEXT_LITE, margin: 0 });
s.addShape(pres.shapes.RECTANGLE, { x: 0.65, y: 2.9, w: 4.5, h: 0.04, fill: { color: ACCENT2 }, line: { color: ACCENT2 } });
s.addText("Differential Diagnosis  •  Imaging  •  Pathophysiology  •  Recent Advances", {
  x: 0.65, y: 3.1, w: 8.8, h: 0.5, fontSize: 14, color: TEXT_DIM, italic: true, margin: 0
});
s.addText("Sources: Murray & Nadel's Respiratory Medicine | Textbook of Family Medicine 9e | Fishman's Pulmonary Diseases", {
  x: 0.65, y: 4.8, w: 8.8, h: 0.4, fontSize: 9, color: TEXT_DIM, margin: 0
});

// ══════════════════════════════════════════════════════════════════════
// SLIDE 2 — LUNG CANCER: OVERVIEW
// ══════════════════════════════════════════════════════════════════════
s = pres.addSlide();
setBg(s);
addHeaderBar(s, "Lung Cancer — Overview", ACCENT3);
addSlideNum(s, 2);

const overviewPoints = [
  "Most common cause of a pulmonary mass requiring differential diagnosis workup",
  "Major types: Non-small cell (NSCLC) — Adenocarcinoma, Squamous Cell, Large Cell",
  "Small cell lung cancer (SCLC) — aggressive, central, paraneoplastic syndromes",
  "Key risk factors: smoking, asbestos, radon, HPV (papillomatosis transformation)",
  "Workup: CT chest, PET-CT, bronchoscopy/biopsy, IHC (TTF-1, Ki-67, synaptophysin)",
];

overviewPoints.forEach((pt, i) => {
  s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 0.95 + i * 0.87, w: 9.3, h: 0.72, fill: { color: CARD_BG }, line: { color: "1E3A5F", pt: 1 } });
  s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 0.95 + i * 0.87, w: 0.06, h: 0.72, fill: { color: ACCENT3 }, line: { color: ACCENT3 } });
  s.addText(pt, { x: 0.55, y: 0.97 + i * 0.87, w: 9.0, h: 0.68, fontSize: 12, color: TEXT_LITE, valign: "middle", margin: 0 });
});

// ══════════════════════════════════════════════════════════════════════
// SLIDE 3 — DIFFERENTIAL DIAGNOSIS: MALIGNANT
// ══════════════════════════════════════════════════════════════════════
s = pres.addSlide();
setBg(s);
addHeaderBar(s, "Differential Diagnosis — Malignant Causes", ACCENT3);
addSlideNum(s, 3);

const malCols = [
  { title: "Primary Lung Malignancies", items: ["Adenocarcinoma (peripheral, GGO)", "Squamous Cell Carcinoma (central, cavitating)", "Large Cell Carcinoma", "Small Cell Lung Cancer (SCLC)"] },
  { title: "Metastatic Disease", items: ["Breast, Colorectal, Renal Cell", "Melanoma, Thyroid", "Multiple nodules → metastatic pattern", "Prior cancer history is key clue"] },
  { title: "Rare Primary Tumors", items: ["Pulmonary Carcinoid (neuroendocrine)", "Typical vs Atypical Carcinoid", "Primary Pulmonary Lymphoma", "Pleural Mesothelioma (asbestos)"] },
];

malCols.forEach((col, ci) => {
  const cx = 0.25 + ci * 3.3;
  s.addShape(pres.shapes.RECTANGLE, { x: cx, y: 0.9, w: 3.1, h: 4.5, fill: { color: CARD_BG }, line: { color: "1E3A5F", pt: 1 } });
  s.addShape(pres.shapes.RECTANGLE, { x: cx, y: 0.9, w: 3.1, h: 0.45, fill: { color: ACCENT3 }, line: { color: ACCENT3 } });
  s.addText(col.title, { x: cx + 0.08, y: 0.9, w: 2.9, h: 0.45, fontSize: 11, bold: true, color: "FFFFFF", valign: "middle", margin: 0 });
  col.items.forEach((item, ii) => {
    s.addText("•  " + item, { x: cx + 0.12, y: 1.45 + ii * 0.72, w: 2.85, h: 0.65, fontSize: 10.5, color: TEXT_LITE, valign: "top", margin: 0 });
  });
});

// ══════════════════════════════════════════════════════════════════════
// SLIDE 4 — DIFFERENTIAL DIAGNOSIS: BENIGN / MIMICS
// ══════════════════════════════════════════════════════════════════════
s = pres.addSlide();
setBg(s);
addHeaderBar(s, "Differential Diagnosis — Benign Mimics", ACCENT1);
addSlideNum(s, 4);

const benignRows = [
  ["Rounded Atelectasis", "CT shows pleural lesion relationship; may need biopsy to exclude cancer"],
  ["Respiratory Papillomatosis", "HPV type 11; malignant transformation to SCC; FDG-PET mildly positive"],
  ["Pulmonary Langerhans Cell Histiocytosis", "Smoking-related; stellate nodules → cavitation; CD1a+, BRAF mutations"],
  ["Hamartoma", "Most common benign tumor; 'popcorn' calcification on CT; incidental"],
  ["Granulomatous Disease", "TB, Histoplasmosis, Sarcoidosis — indistinguishable on imaging alone"],
  ["Lung Abscess", "Cavitary lesion; fever, leukocytosis, purulent sputum"],
  ["Asbestos-related Fibrosis", "Long latency ~34 yrs; pleural plaques; may require biopsy"],
];

benignRows.forEach((row, i) => {
  const y = 0.85 + i * 0.67;
  s.addShape(pres.shapes.RECTANGLE, { x: 0.25, y, w: 9.4, h: 0.6, fill: { color: i % 2 === 0 ? CARD_BG : "0F2030" }, line: { color: "1E3A5F", pt: 0.5 } });
  s.addText(row[0], { x: 0.35, y: y + 0.05, w: 2.9, h: 0.5, fontSize: 10.5, bold: true, color: ACCENT2, valign: "middle", margin: 0 });
  s.addText(row[1], { x: 3.3, y: y + 0.05, w: 6.2, h: 0.5, fontSize: 10, color: TEXT_LITE, valign: "middle", margin: 0 });
});

// ══════════════════════════════════════════════════════════════════════
// SLIDE 5 — LUNG CANCER CT IMAGING (with real images)
// ══════════════════════════════════════════════════════════════════════
s = pres.addSlide();
setBg(s);
addHeaderBar(s, "Lung Cancer — CT Imaging Examples", ACCENT1);
addSlideNum(s, 5);

// Image 1 — 3-type comparison
if (imgData[0] && !imgData[0].error) {
  s.addImage({ data: imgData[0].base64, x: 0.25, y: 0.9, w: 4.5, h: 3.0 });
}
s.addShape(pres.shapes.RECTANGLE, { x: 0.25, y: 3.92, w: 4.5, h: 1.3, fill: { color: CARD_BG }, line: { color: "1E3A5F" } });
s.addText("CT Comparison: SCLC vs Adenocarcinoma vs Squamous Cell Carcinoma", {
  x: 0.35, y: 3.97, w: 4.3, h: 0.45, fontSize: 10, bold: true, color: ACCENT1, margin: 0
});
s.addText("SCLC: large consolidated central mass\nAdenocarcinoma: peripheral rounded nodule\nSquamous: central soft-tissue density near mediastinum", {
  x: 0.35, y: 4.42, w: 4.3, h: 0.75, fontSize: 8.5, color: TEXT_DIM, margin: 0
});

// Image 2 — 4-subtypes
if (imgData[1] && !imgData[1].error) {
  s.addImage({ data: imgData[1].base64, x: 5.1, y: 0.9, w: 4.7, h: 3.0 });
}
s.addShape(pres.shapes.RECTANGLE, { x: 5.1, y: 3.92, w: 4.7, h: 1.3, fill: { color: CARD_BG }, line: { color: "1E3A5F" } });
s.addText("Four Lung Cancer Subtypes on CT (Annotated ROI)", {
  x: 5.2, y: 3.97, w: 4.5, h: 0.45, fontSize: 10, bold: true, color: ACCENT1, margin: 0
});
s.addText("AIS: small well-defined nodule\nSCLC: large homogeneous mass\nSCC: irregular borders\nInvasive Adenocarcinoma: hyperdense irregular nodule", {
  x: 5.2, y: 4.42, w: 4.5, h: 0.75, fontSize: 8.5, color: TEXT_DIM, margin: 0
});

// ══════════════════════════════════════════════════════════════════════
// SLIDE 6 — KEY INVESTIGATIONS
// ══════════════════════════════════════════════════════════════════════
s = pres.addSlide();
setBg(s);
addHeaderBar(s, "Lung Cancer — Key Investigations", ACCENT1);
addSlideNum(s, 6);

const invData = [
  { icon: "CT", label: "CT Chest/Abdomen/Pelvis", desc: "Nodule morphology: spiculation, calcification, ground glass. Guides staging." },
  { icon: "PET", label: "PET-CT Scan", desc: "Metabolic activity (FDG uptake). Identifies distant metastases, guides biopsy." },
  { icon: "BROX", label: "Bronchoscopy + BAL/Biopsy", desc: "Central lesions. Endobronchial ultrasound (EBUS) for mediastinal nodes." },
  { icon: "CTBx", label: "CT-guided Percutaneous Biopsy", desc: "Peripheral lesions. Tissue for histology and molecular markers." },
  { icon: "IHC", label: "Immunohistochemistry (IHC)", desc: "TTF-1 (SCLC+, MCC−), Ki-67, synaptophysin, chromogranin, CK. Distinguishes subtypes." },
  { icon: "MOL", label: "Molecular Testing", desc: "EGFR, ALK, ROS1, KRAS, PD-L1 — guides targeted therapy & immunotherapy." },
];

invData.forEach((inv, i) => {
  const col = i % 2;
  const row = Math.floor(i / 2);
  const x = 0.25 + col * 4.85;
  const y = 0.9 + row * 1.5;
  s.addShape(pres.shapes.RECTANGLE, { x, y, w: 4.6, h: 1.35, fill: { color: CARD_BG }, line: { color: "1E3A5F", pt: 1 } });
  s.addShape(pres.shapes.RECTANGLE, { x, y, w: 0.06, h: 1.35, fill: { color: ACCENT1 }, line: { color: ACCENT1 } });
  s.addText(inv.label, { x: x + 0.18, y: y + 0.1, w: 4.3, h: 0.4, fontSize: 11, bold: true, color: ACCENT2, margin: 0 });
  s.addText(inv.desc, { x: x + 0.18, y: y + 0.52, w: 4.3, h: 0.72, fontSize: 9.5, color: TEXT_LITE, margin: 0 });
});

// ══════════════════════════════════════════════════════════════════════
// SLIDE 7 — T2DM: OVERVIEW & PATHOGENESIS
// ══════════════════════════════════════════════════════════════════════
s = pres.addSlide();
setBg(s);
addHeaderBar(s, "Type 2 Diabetes Mellitus — Overview & Pathogenesis", ACCENT4);
addSlideNum(s, 7);

// Left column — pathogenesis
s.addShape(pres.shapes.RECTANGLE, { x: 0.25, y: 0.9, w: 4.55, h: 4.5, fill: { color: CARD_BG }, line: { color: "2A3A10", pt: 1 } });
s.addShape(pres.shapes.RECTANGLE, { x: 0.25, y: 0.9, w: 4.55, h: 0.45, fill: { color: ACCENT4 }, line: { color: ACCENT4 } });
s.addText("Pathogenesis — The Multi-Organ Failure", { x: 0.35, y: 0.9, w: 4.35, h: 0.45, fontSize: 11, bold: true, color: "000000", valign: "middle", margin: 0 });

const pathItems = [
  "β-cell dysfunction → progressive apoptosis",
  "Insulin resistance (liver, muscle, adipose)",
  "α-cell hypersecretion of glucagon",
  "Gut microbiome dysregulation",
  "Renal glucose reabsorption excess",
  "CNS neurotransmitter dysfunction",
  "18 GWAS polymorphisms identified",
  "GLUT4 impaired at rest, improved with exercise",
];
pathItems.forEach((pt, i) => {
  s.addText("• " + pt, { x: 0.4, y: 1.45 + i * 0.47, w: 4.3, h: 0.42, fontSize: 10, color: TEXT_LITE, margin: 0 });
});

// Right column — diagnostic criteria
s.addShape(pres.shapes.RECTANGLE, { x: 5.05, y: 0.9, w: 4.7, h: 4.5, fill: { color: CARD_BG2 }, line: { color: "1E3A30", pt: 1 } });
s.addShape(pres.shapes.RECTANGLE, { x: 5.05, y: 0.9, w: 4.7, h: 0.45, fill: { color: ACCENT2 }, line: { color: ACCENT2 } });
s.addText("Diagnostic Criteria & Key Facts", { x: 5.15, y: 0.9, w: 4.5, h: 0.45, fontSize: 11, bold: true, color: "000000", valign: "middle", margin: 0 });

const diagItems = [
  ["FPG", "≥ 126 mg/dL (7.0 mmol/L)"],
  ["2-hr OGTT", "≥ 200 mg/dL"],
  ["HbA1c", "≥ 6.5%"],
  ["Prediabetes", "80% β-cell function lost at 2-hr glucose 140–180"],
  ["Retinopathy", "18% of prediabetes patients already affected"],
  ["Normal Δ", "0–50 mg/dL post-prandial rise"],
  ["Lifestyle Rx", "58% risk reduction with diet + exercise"],
  ["Caloric Rx", "1,100 kcal/day → glucose drop in 4 days"],
];
diagItems.forEach((row, i) => {
  const y2 = 1.45 + i * 0.47;
  s.addText(row[0], { x: 5.15, y: y2, w: 1.1, h: 0.42, fontSize: 10, bold: true, color: ACCENT4, margin: 0 });
  s.addText(row[1], { x: 6.3, y: y2, w: 3.35, h: 0.42, fontSize: 10, color: TEXT_LITE, margin: 0 });
});

// ══════════════════════════════════════════════════════════════════════
// SLIDE 8 — T2DM PATHOPHYSIOLOGY DIAGRAMS
// ══════════════════════════════════════════════════════════════════════
s = pres.addSlide();
setBg(s);
addHeaderBar(s, "Type 2 Diabetes — Pathophysiology Diagrams", ACCENT4);
addSlideNum(s, 8);

// Image 3 — multi-organ hyperglycemia
if (imgData[2] && !imgData[2].error) {
  s.addImage({ data: imgData[2].base64, x: 0.25, y: 0.9, w: 4.6, h: 3.2 });
}
s.addShape(pres.shapes.RECTANGLE, { x: 0.25, y: 4.12, w: 4.6, h: 1.1, fill: { color: CARD_BG }, line: { color: "2A3A10" } });
s.addText("Multi-Organ Hyperglycemia", { x: 0.35, y: 4.17, w: 4.4, h: 0.38, fontSize: 10, bold: true, color: ACCENT4, margin: 0 });
s.addText("β-cell dysfunction, insulin resistance (liver/muscle/adipose), elevated glucagon, gut microbiome disorder, renal reabsorption", {
  x: 0.35, y: 4.55, w: 4.4, h: 0.6, fontSize: 8.5, color: TEXT_DIM, margin: 0
});

// Image 4 — endothelial dysfunction + CV risk
if (imgData[3] && !imgData[3].error) {
  s.addImage({ data: imgData[3].base64, x: 5.1, y: 0.9, w: 4.65, h: 3.2 });
}
s.addShape(pres.shapes.RECTANGLE, { x: 5.1, y: 4.12, w: 4.65, h: 1.1, fill: { color: CARD_BG }, line: { color: "2A3A10" } });
s.addText("Endothelial Dysfunction & CV Risk", { x: 5.2, y: 4.17, w: 4.45, h: 0.38, fontSize: 10, bold: true, color: ACCENT4, margin: 0 });
s.addText("AGE-RAGE signalling, oxidative stress, ↓NO & prostacyclin, ↑ET-1 & CAMs → atherosclerosis, coagulation, hypertension", {
  x: 5.2, y: 4.55, w: 4.45, h: 0.6, fontSize: 8.5, color: TEXT_DIM, margin: 0
});

// ══════════════════════════════════════════════════════════════════════
// SLIDE 9 — T2DM: PHARMACOLOGICAL ADVANCES
// ══════════════════════════════════════════════════════════════════════
s = pres.addSlide();
setBg(s);
addHeaderBar(s, "Type 2 Diabetes — Pharmacological Advances", ACCENT4);
addSlideNum(s, 9);

const drugRows = [
  ["GLP-1 Receptor Agonists", "Semaglutide, Liraglutide", "Glucose-dependent insulin secretion, suppress glucagon, delay gastric emptying", "Weight loss, CV risk ↓, approved for obesity"],
  ["SGLT-2 Inhibitors", "Empagliflozin, Dapagliflozin", "Block renal glucose reabsorption → glycosuria", "CV & renal protection, HF & CKD indication"],
  ["Dual GIP/GLP-1 Agonists", "Tirzepatide", "Targets both incretin receptors simultaneously", "Superior HbA1c ↓ & weight loss vs GLP-1 alone"],
  ["Oral GLP-1 RA", "Oral Semaglutide", "First oral GLP-1 receptor agonist", "Improved adherence for injection-averse patients"],
];

// Header row
const hCols = [1.2, 2.15, 3.5, 2.45];
const hLabels = ["Drug Class", "Agent", "Mechanism", "Key Benefit"];
let hx = 0.25;
hLabels.forEach((hl, hi) => {
  s.addShape(pres.shapes.RECTANGLE, { x: hx, y: 0.85, w: hCols[hi], h: 0.42, fill: { color: ACCENT4 }, line: { color: ACCENT4 } });
  s.addText(hl, { x: hx + 0.05, y: 0.85, w: hCols[hi] - 0.1, h: 0.42, fontSize: 10, bold: true, color: "000000", valign: "middle", margin: 0 });
  hx += hCols[hi] + 0.05;
});

drugRows.forEach((row, ri) => {
  let rx = 0.25;
  const ry = 1.32 + ri * 1.0;
  const rowColor = ri % 2 === 0 ? CARD_BG : "0F2030";
  row.forEach((cell, ci) => {
    s.addShape(pres.shapes.RECTANGLE, { x: rx, y: ry, w: hCols[ci], h: 0.92, fill: { color: rowColor }, line: { color: "1E3A5F", pt: 0.5 } });
    s.addText(cell, { x: rx + 0.07, y: ry + 0.05, w: hCols[ci] - 0.12, h: 0.82, fontSize: 9.5, color: ci === 0 ? ACCENT2 : TEXT_LITE, valign: "middle", margin: 0 });
    rx += hCols[ci] + 0.05;
  });
});

// ══════════════════════════════════════════════════════════════════════
// SLIDE 10 — T2DM: TECHNOLOGY & CARDIORENAL FOCUS
// ══════════════════════════════════════════════════════════════════════
s = pres.addSlide();
setBg(s);
addHeaderBar(s, "Type 2 Diabetes — Technology & Cardiorenal Focus", ACCENT2);
addSlideNum(s, 10);

// Left — Technology
s.addShape(pres.shapes.RECTANGLE, { x: 0.25, y: 0.9, w: 4.55, h: 4.5, fill: { color: CARD_BG2 }, line: { color: "1E3A30", pt: 1 } });
s.addShape(pres.shapes.RECTANGLE, { x: 0.25, y: 0.9, w: 4.55, h: 0.45, fill: { color: ACCENT2 }, line: { color: ACCENT2 } });
s.addText("Technology & Monitoring", { x: 0.35, y: 0.9, w: 4.35, h: 0.45, fontSize: 11, bold: true, color: "000000", valign: "middle", margin: 0 });

const techItems = [
  ["CGM", "Continuous Glucose Monitors — real-time interstitial glucose, reduces hypoglycemia"],
  ["Closed-loop", "'Artificial Pancreas' — CGM + automated insulin pump, reduces HbA1c without hypoglycemia"],
  ["Structured SMBG", "Pre/post-meal paired testing; Δ = 0–50 mg/dL is physiologically normal"],
  ["AI/ML", "AI-assisted dosing algorithms, pattern recognition, personalised management"],
];
techItems.forEach((item, i) => {
  s.addText(item[0], { x: 0.4, y: 1.48 + i * 0.9, w: 1.0, h: 0.38, fontSize: 10, bold: true, color: ACCENT4, margin: 0 });
  s.addText(item[1], { x: 0.4, y: 1.86 + i * 0.9, w: 4.25, h: 0.45, fontSize: 9.5, color: TEXT_LITE, margin: 0 });
});

// Right — Cardiorenal
s.addShape(pres.shapes.RECTANGLE, { x: 5.05, y: 0.9, w: 4.7, h: 4.5, fill: { color: CARD_BG }, line: { color: "1E3A5F", pt: 1 } });
s.addShape(pres.shapes.RECTANGLE, { x: 5.05, y: 0.9, w: 4.7, h: 0.45, fill: { color: ACCENT1 }, line: { color: ACCENT1 } });
s.addText("Cardiorenal Outcomes Trials", { x: 5.15, y: 0.9, w: 4.5, h: 0.45, fontSize: 11, bold: true, color: "FFFFFF", valign: "middle", margin: 0 });

const trialItems = [
  ["EMPA-REG OUTCOME", "Empagliflozin → CV death ↓ 38%, HF hospitalisation ↓ 35%"],
  ["LEADER", "Liraglutide → MACE ↓ 13%, CV death ↓ 22%"],
  ["SUSTAIN-6", "Semaglutide → MACE ↓ 26%"],
  ["DAPA-HF", "Dapagliflozin → HF benefit regardless of T2DM status"],
  ["Guideline Shift", "SGLT-2i or GLP-1 RA first-line in ASCVD, HF, CKD — independent of HbA1c"],
];
trialItems.forEach((item, i) => {
  s.addText(item[0], { x: 5.2, y: 1.48 + i * 0.73, w: 1.9, h: 0.35, fontSize: 9.5, bold: true, color: ACCENT2, margin: 0 });
  s.addText(item[1], { x: 5.2, y: 1.82 + i * 0.73, w: 4.4, h: 0.35, fontSize: 9, color: TEXT_LITE, margin: 0 });
});

// ══════════════════════════════════════════════════════════════════════
// SLIDE 11 — T2DM: GENETIC & EPIGENETIC ADVANCES
// ══════════════════════════════════════════════════════════════════════
s = pres.addSlide();
setBg(s);
addHeaderBar(s, "Type 2 Diabetes — Genetic & Epigenetic Research", ACCENT4);
addSlideNum(s, 11);

const genCards = [
  { title: "GWAS Discoveries", color: ACCENT4, pts: ["18 polymorphisms identified that increase T2DM susceptibility", "Activation of alleles → β-cell apoptosis", "Satiety reduction, increased appetite, reduced energy expenditure"] },
  { title: "Epigenetic Mechanisms", color: ACCENT1, pts: ["DNA methylation changes with aging", "Upregulates chronic inflammation in older individuals", "Circadian misalignment disrupts glucose-insulin metabolism"] },
  { title: "Environmental Triggers", color: ACCENT2, pts: ["Arsenic, dioxins, hexachlorobenzene → β-cell toxic", "PFOA (Teflon) found in 98% of US population's blood", "Second-hand smoke → 18% higher T2DM risk in women"] },
  { title: "Emerging Targets", color: ACCENT3, pts: ["Gut microbiome modulation (prebiotics, FMT)", "Brown adipose tissue activation", "Hepatic gluconeogenesis suppression via novel targets"] },
];

genCards.forEach((card, ci) => {
  const col = ci % 2;
  const row = Math.floor(ci / 2);
  const cx = 0.25 + col * 4.85;
  const cy = 0.9 + row * 2.25;
  s.addShape(pres.shapes.RECTANGLE, { x: cx, y: cy, w: 4.6, h: 2.1, fill: { color: CARD_BG }, line: { color: "1E3A5F", pt: 1 } });
  s.addShape(pres.shapes.RECTANGLE, { x: cx, y: cy, w: 4.6, h: 0.4, fill: { color: card.color }, line: { color: card.color } });
  s.addText(card.title, { x: cx + 0.1, y: cy, w: 4.4, h: 0.4, fontSize: 11, bold: true, color: "000000", valign: "middle", margin: 0 });
  card.pts.forEach((pt, pi) => {
    s.addText("• " + pt, { x: cx + 0.15, y: cy + 0.48 + pi * 0.52, w: 4.3, h: 0.46, fontSize: 9.5, color: TEXT_LITE, margin: 0 });
  });
});

// ══════════════════════════════════════════════════════════════════════
// SLIDE 12 — SUMMARY
// ══════════════════════════════════════════════════════════════════════
s = pres.addSlide();
setBg(s);
// Split header — two colors
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: "50%", h: 0.75, fill: { color: ACCENT3 }, line: { color: ACCENT3 } });
s.addShape(pres.shapes.RECTANGLE, { x: "50%", y: 0, w: "50%", h: 0.75, fill: { color: ACCENT4 }, line: { color: ACCENT4 } });
s.addText("Summary", { x: 0.3, y: 0, w: 9.4, h: 0.75, fontSize: 22, bold: true, color: "FFFFFF", valign: "middle", margin: 0 });
addSlideNum(s, 12);

// Left — Lung Cancer summary
s.addShape(pres.shapes.RECTANGLE, { x: 0.25, y: 0.9, w: 4.55, h: 4.5, fill: { color: CARD_BG }, line: { color: "1E3A5F", pt: 1 } });
s.addShape(pres.shapes.RECTANGLE, { x: 0.25, y: 0.9, w: 4.55, h: 0.42, fill: { color: ACCENT3 }, line: { color: ACCENT3 } });
s.addText("🫁  Lung Cancer Differential", { x: 0.35, y: 0.9, w: 4.35, h: 0.42, fontSize: 12, bold: true, color: "FFFFFF", valign: "middle", margin: 0 });
const lcSum = [
  "NSCLC types: Adenocarcinoma, SCC, Large Cell",
  "SCLC: central, aggressive, paraneoplastic",
  "Metastatic disease: always exclude",
  "Benign mimics: TB, hamartoma, papillomatosis, LCH",
  "IHC: TTF-1, Ki-67, synaptophysin key markers",
  "PET-CT for staging + molecular testing for targeted Rx",
];
lcSum.forEach((pt, i) => {
  s.addText("• " + pt, { x: 0.4, y: 1.42 + i * 0.64, w: 4.3, h: 0.58, fontSize: 9.5, color: TEXT_LITE, margin: 0 });
});

// Right — T2DM summary
s.addShape(pres.shapes.RECTANGLE, { x: 5.05, y: 0.9, w: 4.7, h: 4.5, fill: { color: CARD_BG }, line: { color: "1E3A5F", pt: 1 } });
s.addShape(pres.shapes.RECTANGLE, { x: 5.05, y: 0.9, w: 4.7, h: 0.42, fill: { color: ACCENT4 }, line: { color: ACCENT4 } });
s.addText("🩸  Type 2 Diabetes Mellitus", { x: 5.15, y: 0.9, w: 4.5, h: 0.42, fontSize: 12, bold: true, color: "000000", valign: "middle", margin: 0 });
const t2Sum = [
  "Multi-organ pathogenesis: beyond β-cell + insulin resistance",
  "18 GWAS polymorphisms, epigenetic & environmental triggers",
  "GLP-1 RA & SGLT-2i: cardiorenal-protective paradigm shift",
  "Tirzepatide (dual GIP/GLP-1): superior outcomes",
  "CGM + closed-loop: new standard of monitoring",
  "Guideline: SGLT-2i/GLP-1 RA first-line in ASCVD/HF/CKD",
];
t2Sum.forEach((pt, i) => {
  s.addText("• " + pt, { x: 5.2, y: 1.42 + i * 0.64, w: 4.5, h: 0.58, fontSize: 9.5, color: TEXT_LITE, margin: 0 });
});

// Write file
pres.writeFile({ fileName: "/home/daytona/workspace/medical-ppt/Lung_Cancer_T2DM.pptx" })
  .then(() => console.log("SUCCESS: /home/daytona/workspace/medical-ppt/Lung_Cancer_T2DM.pptx"))
  .catch(e => console.error("ERROR:", e));
Running Command

cd /home/daytona/workspace/medical-ppt && node create_ppt.js

Running Command

ls -lh /home/daytona/workspace/medical-ppt/Lung_Cancer_T2DM.pptx

Your presentation is ready! Download it here:

Lung Cancer T2DM

Presentation · PPTX


What's inside (12 slides, dark navy theme):
SlideContent
1Title slide
2Lung Cancer — Overview
3Differential Diagnosis: Malignant causes (3-column cards)
4Differential Diagnosis: Benign mimics (table format)
5CT imaging — 2 real annotated scans (SCLC, Adenocarcinoma, SCC, AIS)
6Key Investigations (CT, PET, Biopsy, IHC, Molecular testing)
7T2DM Overview & Pathogenesis
8T2DM Pathophysiology diagrams — multi-organ hyperglycemia + CV risk
9Pharmacological Advances (GLP-1, SGLT-2, Tirzepatide, Oral semaglutide)
10Technology (CGM, closed-loop) & Cardiorenal outcomes trials
11Genetic & Epigenetic Research
12Summary slide
This is a shared conversation. Sign in to Orris to start your own chat.