Hello
What is osteoporosis
osteoporosis diagnosis treatment
| Category | Factors |
|---|---|
| Non-modifiable | Advanced age, female sex, White/Asian ethnicity, family history of osteoporosis/hip fracture, early menopause (<45 years) |
| Modifiable | Low calcium intake, vitamin D deficiency, smoking, excessive alcohol, physical inactivity, low body weight |
| Secondary causes | Glucocorticoid use (>5 mg prednisone/day for >3 months), rheumatoid arthritis, malabsorption (celiac disease), chronic kidney disease, hyperthyroidism, hypogonadism |
| Drug Class | Examples | Mechanism |
|---|---|---|
| Bisphosphonates (first-line) | Alendronate, risedronate, zoledronic acid | Inhibit osteoclast-mediated resorption |
| Denosumab | Prolia | Monoclonal antibody against RANKL; inhibits osteoclast formation |
| Teriparatide / Abaloparatide | Forteo, Tymlos | PTH analogs; anabolic - stimulate bone formation |
| Romosozumab | Evenity | Anti-sclerostin antibody; dual action (stimulates formation, reduces resorption) |
| SERMs | Raloxifene | Estrogen receptor modulator; reduces vertebral fracture risk |
| HRT | Estrogen | Reduces bone resorption; used primarily for menopausal symptoms |
Make ppt of this topic very attractive ppt
ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty"
mkdir -p /home/daytona/workspace/osteoporosis-ppt
~/osteoporosis-ppt/create_ppt.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Osteoporosis";
pres.author = "Medical Presentation";
// ─── COLOR PALETTE ───────────────────────────────────────────────────────────
// Deep teal / navy dominant palette with coral/amber accents — clinical and modern
const C = {
navy: "0D2B45", // dominant dark bg
teal: "1A6B8A", // supporting mid
tealLight: "2A9BBF", // accent
coral: "E8724A", // sharp accent
amber: "F5A623", // warm highlight
white: "FFFFFF",
offWhite: "F0F4F8",
lightGray: "D8E4EC",
darkText: "1A2B3C",
midGray: "7A9AB0",
};
// ─── HELPER: dark section header bar ─────────────────────────────────────────
function addSlideHeader(slide, title, subtitle) {
// Full-width dark bar at top
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 10, h: 1.15,
fill: { color: C.navy }, line: { color: C.navy }
});
// Coral accent strip
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 1.15, w: 10, h: 0.07,
fill: { color: C.coral }, line: { color: C.coral }
});
slide.addText(title, {
x: 0.4, y: 0.1, w: 9.2, h: 0.7,
fontSize: 26, bold: true, color: C.white,
fontFace: "Calibri", valign: "middle", margin: 0
});
if (subtitle) {
slide.addText(subtitle, {
x: 0.4, y: 0.75, w: 9.2, h: 0.4,
fontSize: 13, color: C.tealLight,
fontFace: "Calibri", valign: "middle", margin: 0
});
}
}
// ─── HELPER: card ─────────────────────────────────────────────────────────────
function addCard(slide, x, y, w, h, title, body, accentColor) {
const ac = accentColor || C.teal;
// card bg
slide.addShape(pres.shapes.RECTANGLE, {
x, y, w, h,
fill: { color: C.offWhite },
line: { color: C.lightGray, pt: 1 },
shadow: { type: "outer", color: "000000", blur: 8, offset: 3, angle: 135, opacity: 0.12 }
});
// left accent bar
slide.addShape(pres.shapes.RECTANGLE, {
x, y, w: 0.06, h,
fill: { color: ac }, line: { color: ac }
});
// card title
slide.addText(title, {
x: x + 0.14, y: y + 0.06, w: w - 0.2, h: 0.35,
fontSize: 13, bold: true, color: ac,
fontFace: "Calibri", valign: "top", margin: 0
});
// card body
slide.addText(body, {
x: x + 0.14, y: y + 0.42, w: w - 0.2, h: h - 0.5,
fontSize: 11, color: C.darkText,
fontFace: "Calibri", valign: "top", margin: 0
});
}
// ─── HELPER: icon circle ──────────────────────────────────────────────────────
function addIconCircle(slide, x, y, r, icon, bgColor) {
slide.addShape(pres.shapes.OVAL, {
x: x - r, y: y - r, w: r * 2, h: r * 2,
fill: { color: bgColor || C.teal },
line: { color: bgColor || C.teal }
});
slide.addText(icon, {
x: x - r, y: y - r, w: r * 2, h: r * 2,
fontSize: r * 18, color: C.white,
fontFace: "Segoe UI Emoji", align: "center", valign: "middle", margin: 0
});
}
// ─── SLIDE 1: TITLE ──────────────────────────────────────────────────────────
{
const s = pres.addSlide();
// Full dark bg
s.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 10, h: 5.625,
fill: { color: C.navy }, line: { color: C.navy }
});
// Right decorative teal panel
s.addShape(pres.shapes.RECTANGLE, {
x: 6.8, y: 0, w: 3.2, h: 5.625,
fill: { color: C.teal }, line: { color: C.teal }
});
// Coral diagonal accent stripe
s.addShape(pres.shapes.RECTANGLE, {
x: 6.5, y: 0, w: 0.12, h: 5.625,
fill: { color: C.coral }, line: { color: C.coral }
});
// Decorative circles (bone-like)
s.addShape(pres.shapes.OVAL, {
x: 7.2, y: 0.3, w: 1.8, h: 1.8,
fill: { color: "FFFFFF", transparency: 88 }, line: { color: "FFFFFF", transparency: 80, pt: 1 }
});
s.addShape(pres.shapes.OVAL, {
x: 8.1, y: 2.5, w: 1.2, h: 1.2,
fill: { color: "FFFFFF", transparency: 85 }, line: { color: "FFFFFF", transparency: 80, pt: 1 }
});
s.addShape(pres.shapes.OVAL, {
x: 6.9, y: 3.6, w: 0.8, h: 0.8,
fill: { color: C.amber, transparency: 40 }, line: { color: C.amber, transparency: 40, pt: 1 }
});
// OSTEOPOROSIS title
s.addText("OSTEOPOROSIS", {
x: 0.5, y: 1.2, w: 6.0, h: 1.3,
fontSize: 48, bold: true, color: C.white,
fontFace: "Calibri", charSpacing: 4, valign: "middle"
});
// Coral underline
s.addShape(pres.shapes.RECTANGLE, {
x: 0.5, y: 2.55, w: 4.5, h: 0.07,
fill: { color: C.coral }, line: { color: C.coral }
});
// Subtitle
s.addText("Understanding Bone Health, Fragility & Treatment", {
x: 0.5, y: 2.7, w: 6.0, h: 0.55,
fontSize: 16, color: C.tealLight,
fontFace: "Calibri", italic: true
});
// Tag line pills
const tags = ["10.8M affected in US", "Silent Disease", "Preventable & Treatable"];
tags.forEach((tag, i) => {
const tx = 0.5 + i * 2.0;
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: tx, y: 3.5, w: 1.85, h: 0.38,
fill: { color: C.coral }, line: { color: C.coral }, rectRadius: 0.05
});
s.addText(tag, {
x: tx, y: 3.5, w: 1.85, h: 0.38,
fontSize: 10, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle", margin: 0
});
});
// Source
s.addText("Source: Harrison's Principles of Internal Medicine 22E (2025)", {
x: 0.5, y: 5.1, w: 6.0, h: 0.3,
fontSize: 9, color: C.midGray, fontFace: "Calibri", italic: true
});
}
// ─── SLIDE 2: DEFINITION ─────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite }, line: { color: C.offWhite } });
addSlideHeader(s, "Definition & Classification", "What is Osteoporosis?");
// Big definition block
s.addShape(pres.shapes.RECTANGLE, {
x: 0.35, y: 1.4, w: 9.3, h: 1.05,
fill: { color: C.navy }, line: { color: C.navy },
shadow: { type: "outer", color: "000000", blur: 10, offset: 3, angle: 135, opacity: 0.18 }
});
s.addText('"A skeletal disorder characterized by reduced bone quantity and quality, resulting in increased fragility and fracture risk."', {
x: 0.5, y: 1.42, w: 9.0, h: 1.0,
fontSize: 14, italic: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle", margin: 0
});
// T-score classification cards
const classes = [
{ label: "Normal", tscore: "T-score > -1.0", color: "27AE60", icon: "✔" },
{ label: "Osteopenia", tscore: "T-score -1.0 to -2.5", color: C.amber, icon: "⚠" },
{ label: "Osteoporosis", tscore: "T-score ≤ -2.5", color: C.coral, icon: "⬇" },
{ label: "Severe", tscore: "T-score ≤ -2.5 + Fracture", color: "8E1B1B", icon: "☠" },
];
classes.forEach((c, i) => {
const cx = 0.35 + i * 2.38;
s.addShape(pres.shapes.RECTANGLE, {
x: cx, y: 2.65, w: 2.2, h: 1.55,
fill: { color: c.color },
line: { color: c.color },
shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.15 }
});
s.addText(c.icon, {
x: cx, y: 2.65, w: 2.2, h: 0.55,
fontSize: 22, color: C.white, align: "center", valign: "middle",
fontFace: "Segoe UI Emoji", margin: 0
});
s.addText(c.label, {
x: cx, y: 3.2, w: 2.2, h: 0.45,
fontSize: 13, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle", margin: 0
});
s.addText(c.tscore, {
x: cx, y: 3.65, w: 2.2, h: 0.55,
fontSize: 10, color: C.white,
fontFace: "Calibri", align: "center", valign: "top", margin: 0
});
});
// WHO caption
s.addText("WHO Diagnostic Classification via DXA (Dual-energy X-ray Absorptiometry)", {
x: 0.35, y: 5.05, w: 9.3, h: 0.3,
fontSize: 10, color: C.midGray, fontFace: "Calibri", italic: true, align: "center"
});
}
// ─── SLIDE 3: EPIDEMIOLOGY ────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite }, line: { color: C.offWhite } });
addSlideHeader(s, "Epidemiology", "The Scale of the Problem");
// Big stat blocks
const stats = [
{ num: "10.8M", lbl: "Women with\nOsteoporosis (US)", col: C.teal },
{ num: "2.5M", lbl: "Men with\nOsteoporosis (US)", col: C.tealLight },
{ num: "40M", lbl: "Americans with\nOsteopenia", col: C.amber },
{ num: "$19B", lbl: "Annual Cost of\nFractures (US)", col: C.coral },
{ num: "2M", lbl: "Fractures per\nyear (US)", col: "8E44AD" },
];
stats.forEach((st, i) => {
const col = i < 3 ? 0.3 + i * 3.2 : 1.7 + (i - 3) * 3.2;
const row = i < 3 ? 1.35 : 3.2;
s.addShape(pres.shapes.RECTANGLE, {
x: col, y: row, w: 2.85, h: 1.55,
fill: { color: st.col },
line: { color: st.col },
shadow: { type: "outer", color: "000000", blur: 8, offset: 3, angle: 135, opacity: 0.18 }
});
s.addText(st.num, {
x: col, y: row + 0.08, w: 2.85, h: 0.8,
fontSize: 32, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle", margin: 0
});
s.addText(st.lbl, {
x: col, y: row + 0.88, w: 2.85, h: 0.6,
fontSize: 11, color: C.white,
fontFace: "Calibri", align: "center", valign: "top", margin: 0
});
});
s.addText("30% of fragility fractures occur in men | >50% of fractures in postmenopausal women have osteopenia, not osteoporosis", {
x: 0.3, y: 5.1, w: 9.4, h: 0.3,
fontSize: 9.5, color: C.midGray, fontFace: "Calibri", italic: true, align: "center"
});
}
// ─── SLIDE 4: PATHOPHYSIOLOGY ─────────────────────────────────────────────────
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
// Header (dark slide — custom header)
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: "091D30" }, line: { color: "091D30" } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 1.0, w: 10, h: 0.07, fill: { color: C.coral }, line: { color: C.coral } });
s.addText("Pathophysiology", {
x: 0.4, y: 0.1, w: 9.2, h: 0.55, fontSize: 26, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0
});
s.addText("Bone Remodeling Imbalance — RANK/RANKL & Wnt Pathways", {
x: 0.4, y: 0.62, w: 9.2, h: 0.38, fontSize: 13, color: C.tealLight, fontFace: "Calibri", valign: "middle", margin: 0, italic: true
});
// Flow diagram: 3 boxes with arrows
const boxes = [
{ x: 0.3, title: "Osteoclast Activation", body: "RANKL binds RANK receptor\non osteoclasts → bone\nresorption accelerates", icon: "⬆", col: C.coral },
{ x: 3.55, title: "Imbalanced Remodeling", body: "After age 30-45, resorption\nexceeds formation. Estrogen\ndeficiency worsens in women.", icon: "⚖", col: C.amber },
{ x: 6.8, title: "Microarchitecture Loss", body: "Trabecular perforation,\ncortical porosity, reduced\nskeletal strength", icon: "🦴", col: C.tealLight },
];
boxes.forEach((b) => {
s.addShape(pres.shapes.RECTANGLE, {
x: b.x, y: 1.25, w: 3.0, h: 3.9,
fill: { color: "112233" }, line: { color: b.col, pt: 2 },
shadow: { type: "outer", color: "000000", blur: 12, offset: 4, angle: 135, opacity: 0.3 }
});
// Top accent strip
s.addShape(pres.shapes.RECTANGLE, {
x: b.x, y: 1.25, w: 3.0, h: 0.07,
fill: { color: b.col }, line: { color: b.col }
});
// Icon circle
s.addShape(pres.shapes.OVAL, {
x: b.x + 1.1, y: 1.38, w: 0.8, h: 0.8,
fill: { color: b.col }, line: { color: b.col }
});
s.addText(b.icon, {
x: b.x + 1.1, y: 1.38, w: 0.8, h: 0.8,
fontSize: 18, color: C.white, fontFace: "Segoe UI Emoji",
align: "center", valign: "middle", margin: 0
});
s.addText(b.title, {
x: b.x + 0.1, y: 2.28, w: 2.8, h: 0.5,
fontSize: 13, bold: true, color: b.col,
fontFace: "Calibri", align: "center", valign: "middle", margin: 0
});
s.addText(b.body, {
x: b.x + 0.15, y: 2.85, w: 2.7, h: 1.5,
fontSize: 11.5, color: C.white,
fontFace: "Calibri", align: "center", valign: "top", margin: 0
});
});
// Arrows between boxes
[1, 2].forEach((i) => {
s.addShape(pres.shapes.RECTANGLE, {
x: 3.3 + (i - 1) * 3.25, y: 3.1, w: 0.25, h: 0.06,
fill: { color: C.midGray }, line: { color: C.midGray }
});
s.addText("▶", {
x: 3.3 + (i - 1) * 3.25, y: 2.98, w: 0.25, h: 0.3,
fontSize: 12, color: C.midGray, align: "right", valign: "middle", margin: 0
});
});
// Bottom note
s.addText("Osteoprotegerin (OPG) acts as decoy receptor, blocking RANKL. Wnt signaling promotes osteoblast formation; sclerostin inhibits Wnt.", {
x: 0.3, y: 5.2, w: 9.4, h: 0.3,
fontSize: 9.5, color: C.midGray, fontFace: "Calibri", italic: true, align: "center"
});
}
// ─── SLIDE 5: RISK FACTORS ────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite }, line: { color: C.offWhite } });
addSlideHeader(s, "Risk Factors", "Who is at Risk?");
const categories = [
{
title: "Non-Modifiable",
color: C.teal,
icon: "🔒",
items: ["Advanced age", "Female sex", "White / Asian ethnicity", "Family history of hip fracture", "Early menopause (<45 yrs)"]
},
{
title: "Modifiable",
color: C.amber,
icon: "✏",
items: ["Low calcium intake", "Vitamin D deficiency", "Smoking", "Excessive alcohol", "Physical inactivity", "Low body weight"]
},
{
title: "Secondary Causes",
color: C.coral,
icon: "💊",
items: ["Glucocorticoids (>5 mg/day >3 mo)", "Rheumatoid arthritis", "Malabsorption / Celiac disease", "Chronic kidney disease", "Hyperthyroidism / Hypogonadism"]
}
];
categories.forEach((cat, i) => {
const cx = 0.3 + i * 3.25;
// header bar
s.addShape(pres.shapes.RECTANGLE, {
x: cx, y: 1.3, w: 3.05, h: 0.55,
fill: { color: cat.color }, line: { color: cat.color }
});
s.addText(`${cat.icon} ${cat.title}`, {
x: cx + 0.08, y: 1.3, w: 2.9, h: 0.55,
fontSize: 13.5, bold: true, color: C.white,
fontFace: "Calibri", valign: "middle", margin: 0
});
// items box
s.addShape(pres.shapes.RECTANGLE, {
x: cx, y: 1.85, w: 3.05, h: 3.4,
fill: { color: C.white }, line: { color: C.lightGray, pt: 1 },
shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.1 }
});
const richItems = cat.items.map((item, j) => ({
text: ` ${item}`,
options: { bullet: { code: "25CF" }, breakLine: j < cat.items.length - 1, fontSize: 11.5, color: C.darkText, fontFace: "Calibri" }
}));
s.addText(richItems, {
x: cx + 0.12, y: 1.95, w: 2.82, h: 3.2,
valign: "top", margin: 0
});
});
}
// ─── SLIDE 6: CLINICAL FEATURES ──────────────────────────────────────────────
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite }, line: { color: C.offWhite } });
addSlideHeader(s, "Clinical Manifestations", "The Silent Disease");
// Silent disease banner
s.addShape(pres.shapes.RECTANGLE, {
x: 0.35, y: 1.3, w: 9.3, h: 0.58,
fill: { color: C.teal }, line: { color: C.teal }
});
s.addText('⚠ "Silent Disease" — Bone loss occurs WITHOUT symptoms until fracture occurs ⚠', {
x: 0.35, y: 1.3, w: 9.3, h: 0.58,
fontSize: 13, bold: true, color: C.white, fontFace: "Calibri",
align: "center", valign: "middle", margin: 0
});
// Fracture type cards
const fractures = [
{ title: "Vertebral Fractures", sub: "Most Common", body: "70% asymptomatic\nHeight loss & kyphosis\n'Dowager's hump'\nBackache", color: C.coral, icon: "🦴" },
{ title: "Hip Fractures", sub: "Most Serious", body: "High mortality in elderly\nMajor disability\nRequires surgery\nLong recovery", color: C.amber, icon: "🏥" },
{ title: "Wrist Fractures", sub: "Often First Sign", body: "Colles' fracture\nFall on outstretched hand\nAlerts to further risk\nCommon age 50-60s", color: C.tealLight, icon: "✋" },
{ title: "Other Sites", sub: "Widespread Risk", body: "Humerus, pelvis, ribs\n1 in 6 fractures in\nnormal bone density\nMultiple fracture risk", color: C.teal, icon: "📍" },
];
fractures.forEach((f, i) => {
const cx = 0.3 + i * 2.4;
s.addShape(pres.shapes.RECTANGLE, {
x: cx, y: 2.05, w: 2.25, h: 3.2,
fill: { color: C.white }, line: { color: f.color, pt: 1.5 },
shadow: { type: "outer", color: "000000", blur: 7, offset: 2, angle: 135, opacity: 0.12 }
});
// Top accent
s.addShape(pres.shapes.RECTANGLE, {
x: cx, y: 2.05, w: 2.25, h: 0.58,
fill: { color: f.color }, line: { color: f.color }
});
s.addText(f.icon, {
x: cx, y: 2.05, w: 0.65, h: 0.58,
fontSize: 18, fontFace: "Segoe UI Emoji",
align: "center", valign: "middle", margin: 0
});
s.addText(f.title, {
x: cx + 0.62, y: 2.05, w: 1.6, h: 0.34,
fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", valign: "top", margin: 0
});
s.addText(f.sub, {
x: cx + 0.62, y: 2.37, w: 1.6, h: 0.26,
fontSize: 9, color: C.white, fontFace: "Calibri", italic: true, valign: "top", margin: 0
});
s.addText(f.body, {
x: cx + 0.12, y: 2.72, w: 2.0, h: 2.4,
fontSize: 11, color: C.darkText, fontFace: "Calibri", valign: "top", margin: 0
});
});
}
// ─── SLIDE 7: DIAGNOSIS ───────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite }, line: { color: C.offWhite } });
addSlideHeader(s, "Diagnosis", "DXA, FRAX & Vertebral Imaging");
// Left column: DXA
s.addShape(pres.shapes.RECTANGLE, {
x: 0.3, y: 1.35, w: 4.5, h: 4.0,
fill: { color: C.navy }, line: { color: C.navy },
shadow: { type: "outer", color: "000000", blur: 10, offset: 3, angle: 135, opacity: 0.2 }
});
s.addShape(pres.shapes.RECTANGLE, {
x: 0.3, y: 1.35, w: 4.5, h: 0.07,
fill: { color: C.tealLight }, line: { color: C.tealLight }
});
s.addText("🔬 DXA Scan — Gold Standard", {
x: 0.45, y: 1.42, w: 4.2, h: 0.5,
fontSize: 14, bold: true, color: C.tealLight, fontFace: "Calibri", valign: "middle", margin: 0
});
const dxaPoints = [
"Measures BMD at hip & lumbar spine",
"Results as T-score (vs young adults) or Z-score (vs age-matched)",
"Screening: all women ≥65 yrs; men ≥70 yrs",
"Also used for Vertebral Fracture Assessment (VFA)",
"Trabecular Bone Score (TBS) — additional microarchitecture estimate",
];
const dxaRich = dxaPoints.map((p, j) => ({
text: ` ${p}`,
options: { bullet: { code: "25B6" }, breakLine: j < dxaPoints.length - 1, fontSize: 11.5, color: C.white, fontFace: "Calibri" }
}));
s.addText(dxaRich, { x: 0.45, y: 2.0, w: 4.1, h: 3.2, valign: "top", margin: 0 });
// Right column: FRAX
s.addShape(pres.shapes.RECTANGLE, {
x: 5.2, y: 1.35, w: 4.5, h: 4.0,
fill: { color: C.white }, line: { color: C.lightGray, pt: 1 },
shadow: { type: "outer", color: "000000", blur: 10, offset: 3, angle: 135, opacity: 0.12 }
});
s.addShape(pres.shapes.RECTANGLE, {
x: 5.2, y: 1.35, w: 4.5, h: 0.07,
fill: { color: C.coral }, line: { color: C.coral }
});
s.addText("📊 FRAX Score", {
x: 5.35, y: 1.42, w: 4.2, h: 0.5,
fontSize: 14, bold: true, color: C.coral, fontFace: "Calibri", valign: "middle", margin: 0
});
s.addText("10-year fracture probability tool combining:", {
x: 5.35, y: 1.95, w: 4.1, h: 0.4,
fontSize: 11.5, color: C.darkText, fontFace: "Calibri", valign: "top", margin: 0
});
const fraxFactors = ["Age, sex, BMI", "Prior fracture history", "Family history of hip fracture", "Smoking & alcohol use", "Glucocorticoid use", "Rheumatoid arthritis", "BMD (optional)"];
const fraxRich = fraxFactors.map((p, j) => ({
text: ` ${p}`,
options: { bullet: { code: "25CF" }, breakLine: j < fraxFactors.length - 1, fontSize: 11, color: C.darkText, fontFace: "Calibri" }
}));
s.addText(fraxRich, { x: 5.35, y: 2.4, w: 4.0, h: 1.8, valign: "top", margin: 0 });
// Treatment thresholds box
s.addShape(pres.shapes.RECTANGLE, {
x: 5.2, y: 4.2, w: 4.5, h: 0.88,
fill: { color: C.coral }, line: { color: C.coral }
});
s.addText("US Treatment Thresholds (FRAX):\n≥20% major osteoporotic fracture | ≥3% hip fracture", {
x: 5.3, y: 4.22, w: 4.3, h: 0.84,
fontSize: 11.5, bold: true, color: C.white, fontFace: "Calibri",
align: "center", valign: "middle", margin: 0
});
}
// ─── SLIDE 8: TREATMENT ───────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 1.15, fill: { color: "091D30" }, line: { color: "091D30" } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 1.15, w: 10, h: 0.07, fill: { color: C.amber }, line: { color: C.amber } });
s.addText("Treatment & Management", {
x: 0.4, y: 0.1, w: 9.2, h: 0.7, fontSize: 26, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0
});
s.addText("Non-Pharmacological & Pharmacological Interventions", {
x: 0.4, y: 0.75, w: 9.2, h: 0.38, fontSize: 13, color: C.amber, fontFace: "Calibri", italic: true, valign: "middle", margin: 0
});
// Non-pharma column
s.addShape(pres.shapes.RECTANGLE, {
x: 0.3, y: 1.35, w: 3.5, h: 4.0,
fill: { color: "112233" }, line: { color: C.tealLight, pt: 1.5 }
});
s.addShape(pres.shapes.RECTANGLE, {
x: 0.3, y: 1.35, w: 3.5, h: 0.5,
fill: { color: C.tealLight }, line: { color: C.tealLight }
});
s.addText("Lifestyle Measures", {
x: 0.45, y: 1.35, w: 3.2, h: 0.5,
fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0
});
const lifestyle = [
"🥛 Calcium: 1,000-1,200 mg/day",
"☀ Vitamin D: 800-1,000 IU/day",
"🏃 Weight-bearing exercise",
"🚭 Smoking cessation",
"🍷 Limit alcohol intake",
"🏠 Fall prevention at home",
"⚖ Maintain healthy body weight",
];
const lsRich = lifestyle.map((p, j) => ({
text: p,
options: { breakLine: j < lifestyle.length - 1, fontSize: 11.5, color: C.white, fontFace: "Calibri" }
}));
s.addText(lsRich, { x: 0.45, y: 1.95, w: 3.25, h: 3.2, valign: "top", margin: 0 });
// Pharma drugs table
const drugs = [
{ cls: "Bisphosphonates (1st line)", ex: "Alendronate, Risedronate, Zoledronic acid", mech: "Inhibit osteoclast resorption", col: C.teal },
{ cls: "Denosumab", ex: "Prolia", mech: "Anti-RANKL monoclonal antibody", col: C.tealLight },
{ cls: "Anabolics", ex: "Teriparatide, Abaloparatide", mech: "PTH analogs — stimulate formation", col: C.amber },
{ cls: "Romosozumab", ex: "Evenity", mech: "Anti-sclerostin — dual action", col: C.coral },
{ cls: "SERMs / HRT", ex: "Raloxifene / Estrogen", mech: "Reduce bone resorption", col: "8E44AD" },
];
// Table header
s.addShape(pres.shapes.RECTANGLE, {
x: 4.1, y: 1.35, w: 5.6, h: 0.42,
fill: { color: C.amber }, line: { color: C.amber }
});
["Drug Class", "Example", "Mechanism"].forEach((h, i) => {
const wx = [0, 1.65, 3.3];
s.addText(h, {
x: 4.15 + wx[i], y: 1.35, w: i === 0 ? 1.6 : i === 1 ? 1.6 : 1.95, h: 0.42,
fontSize: 11, bold: true, color: C.navy, fontFace: "Calibri", valign: "middle", margin: 2
});
});
drugs.forEach((d, i) => {
const ry = 1.77 + i * 0.62;
const bg = i % 2 === 0 ? "0F2035" : "152840";
s.addShape(pres.shapes.RECTANGLE, {
x: 4.1, y: ry, w: 5.6, h: 0.62,
fill: { color: bg }, line: { color: bg }
});
// Left accent
s.addShape(pres.shapes.RECTANGLE, {
x: 4.1, y: ry, w: 0.055, h: 0.62,
fill: { color: d.col }, line: { color: d.col }
});
s.addText(d.cls, {
x: 4.18, y: ry, w: 1.58, h: 0.62,
fontSize: 10, bold: true, color: d.col, fontFace: "Calibri", valign: "middle", margin: 2
});
s.addText(d.ex, {
x: 5.78, y: ry, w: 1.58, h: 0.62,
fontSize: 10, color: C.white, fontFace: "Calibri", valign: "middle", margin: 2
});
s.addText(d.mech, {
x: 7.4, y: ry, w: 2.2, h: 0.62,
fontSize: 10, color: C.lightGray, fontFace: "Calibri", valign: "middle", margin: 2
});
});
}
// ─── SLIDE 9: KEY SUMMARY ──────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
// Title
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: "091D30" }, line: { color: "091D30" } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 1.0, w: 10, h: 0.07, fill: { color: C.tealLight }, line: { color: C.tealLight } });
s.addText("Key Takeaways", {
x: 0.4, y: 0.12, w: 9.2, h: 0.75,
fontSize: 28, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0
});
const points = [
{ num: "01", text: "Osteoporosis = reduced bone mass + microarchitectural deterioration → fragility fractures", col: C.coral },
{ num: "02", text: "Defined by WHO as T-score ≤ -2.5 on DXA; T-score -1.0 to -2.5 = Osteopenia", col: C.amber },
{ num: "03", text: "Driven by RANKL/RANK imbalance & Wnt pathway disruption favoring resorption over formation", col: C.tealLight },
{ num: "04", text: "Vertebral fractures most common (70% asymptomatic); hip fractures most dangerous", col: "27AE60" },
{ num: "05", text: "FRAX tool estimates 10-year fracture risk; treatment if hip ≥3% or major fracture ≥20%", col: C.amber },
{ num: "06", text: "Treatment: calcium + vitamin D + exercise + bisphosphonates (first-line pharmacotherapy)", col: C.tealLight },
];
points.forEach((p, i) => {
const col = i % 2 === 0 ? 0.3 : 5.15;
const ry = 1.2 + Math.floor(i / 2) * 1.35;
s.addShape(pres.shapes.OVAL, {
x: col, y: ry, w: 0.65, h: 0.65,
fill: { color: p.col }, line: { color: p.col }
});
s.addText(p.num, {
x: col, y: ry, w: 0.65, h: 0.65,
fontSize: 13, bold: true, color: C.white, fontFace: "Calibri",
align: "center", valign: "middle", margin: 0
});
s.addText(p.text, {
x: col + 0.75, y: ry, w: 3.9, h: 0.65,
fontSize: 11.5, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0
});
});
// Footer
s.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 5.22, w: 10, h: 0.38,
fill: { color: C.coral }, line: { color: C.coral }
});
s.addText("Source: Harrison's Principles of Internal Medicine 22E (2025) | Rheumatology 2-Volume Set (2022, Elsevier)", {
x: 0, y: 5.22, w: 10, h: 0.38,
fontSize: 9.5, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0
});
}
// ─── WRITE ────────────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/osteoporosis-ppt/Osteoporosis.pptx" })
.then(() => console.log("Done: Osteoporosis.pptx"))
.catch(err => { console.error(err); process.exit(1); });
cd /home/daytona/workspace/osteoporosis-ppt && node create_ppt.js 2>&1
ls -lh /home/daytona/workspace/osteoporosis-ppt/Osteoporosis.pptx
Osteoporosis
Presentation · PPTX
| Slide | Topic | Design |
|---|---|---|
| 1 | Title | Dark hero layout with decorative circles, pill tags |
| 2 | Definition & Classification | WHO T-score 4-color classification cards |
| 3 | Epidemiology | Big stat blocks (10.8M, $19B, 2M fractures...) |
| 4 | Pathophysiology | 3-column dark flow diagram (RANKL → Imbalance → Microarchitecture loss) |
| 5 | Risk Factors | 3 category columns (Non-modifiable / Modifiable / Secondary) |
| 6 | Clinical Manifestations | 4 fracture-type cards with icons + "Silent Disease" banner |
| 7 | Diagnosis | DXA gold standard + FRAX score with treatment thresholds |
| 8 | Treatment | Lifestyle column + colour-coded pharmacotherapy table |
| 9 | Key Takeaways | 6 numbered summary points with accent circles |