Add detail and make it more attractive detail must be from kd tripaathi for my pharma seminar
cd /home/daytona/workspace/attachments/8bc4bb21-067c-4ee1-861f-340bbd485c7f && python -m markitdown 5871d3dc-10d4-45ca-b137-5113a0cd1bf7.pptx 2>&1
cd /home/daytona/workspace/attachments/8bc4bb21-067c-4ee1-861f-340bbd485c7f && python /home/daytona/skills/pptx/scripts/office/unpack.py 5871d3dc-10d4-45ca-b137-5113a0cd1bf7.pptx /home/daytona/workspace/pptx_unpacked/ 2>&1
ls /home/daytona/skills/pptx/scripts/office/ && ls /home/daytona/skills/pptx/scripts/
timeout 90 python /home/daytona/skills/pptx/scripts/office/unpack.py /home/daytona/workspace/attachments/8bc4bb21-067c-4ee1-861f-340bbd485c7f/5871d3dc-10d4-45ca-b137-5113a0cd1bf7.pptx /home/daytona/workspace/pptx_unpacked/ 2>&1 && echo "DONE"
mkdir -p /home/daytona/workspace/pptx_raw && cd /home/daytona/workspace/pptx_raw && unzip -o /home/daytona/workspace/attachments/8bc4bb21-067c-4ee1-861f-340bbd485c7f/5871d3dc-10d4-45ca-b137-5113a0cd1bf7.pptx 2>&1 | head -50 && echo "DONE"
ls /home/daytona/workspace/pptx_raw/ppt/slides/ | head -30
ls /home/daytona/workspace/pptx_raw/ && ls /home/daytona/workspace/pptx_raw/ppt/ 2>&1
ls /home/daytona/workspace/pptx_raw/ppt/
python3 -c " import zipfile, os src = '/home/daytona/workspace/attachments/8bc4bb21-067c-4ee1-861f-340bbd485c7f/5871d3dc-10d4-45ca-b137-5113a0cd1bf7.pptx' dest = '/home/daytona/workspace/pptx_extracted' os.makedirs(dest, exist_ok=True) with zipfile.ZipFile(src, 'r') as z: z.extractall(dest) print('Files:', [f for f in os.listdir(dest)]) print('ppt:', os.listdir(dest+'/ppt')) " 2>&1
python3 << 'EOF' import zipfile src = '/home/daytona/workspace/attachments/8bc4bb21-067c-4ee1-861f-340bbd485c7f/5871d3dc-10d4-45ca-b137-5113a0cd1bf7.pptx' with zipfile.ZipFile(src, 'r') as z: names = z.namelist() slides = [n for n in names if 'ppt/slides/slide' in n and '.xml' in n and '_rels' not in n] print('Total files:', len(names)) print('Slides:', sorted(slides)) EOF
python3 << 'EOF' import zipfile, re src = '/home/daytona/workspace/attachments/8bc4bb21-067c-4ee1-861f-340bbd485c7f/5871d3dc-10d4-45ca-b137-5113a0cd1bf7.pptx' def extract_text(xml_content): # Extract all text runs texts = re.findall(r'<a:t[^>]*>(.*?)</a:t>', xml_content, re.DOTALL) return [t.strip() for t in texts if t.strip()] with zipfile.ZipFile(src, 'r') as z: for i in range(1, 14): fname = f'ppt/slides/slide{i}.xml' with z.open(fname) as f: content = f.read().decode('utf-8', errors='ignore') texts = extract_text(content) print(f'\n=== SLIDE {i} ===') for t in texts: print(f' {t}') EOF
~/mdr_tb_bpalm/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "MDR-TB & BPaLM Regimen";
pres.author = "Pharma Seminar";
// ── COLOUR PALETTE ──────────────────────────────────────────────────
const C = {
navy: "0D1B2A", // dominant dark bg
teal: "1B7F8E", // accent header
gold: "F2A81D", // accent highlight
white: "FFFFFF",
light: "E8F4F8", // card bg
mid: "C9E4EA", // divider / secondary bg
red: "C0392B", // danger / warning
green: "1A7A4A", // success
grey: "4A5568", // body text
darkGrey:"2D3748",
};
// ── HELPERS ──────────────────────────────────────────────────────────
function darkSlide(slide) {
slide.background = { color: C.navy };
}
function card(slide, x, y, w, h, fillColor) {
slide.addShape(pres.ShapeType.roundRect, {
x, y, w, h,
fill: { color: fillColor || C.light },
line: { color: C.mid, width: 0.5 },
rectRadius: 0.12,
});
}
function header(slide, title, subtitle) {
// top accent bar
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 0.08,
fill: { color: C.gold }, line: { color: C.gold },
});
slide.addText(title, {
x: 0.4, y: 0.15, w: 9.2, h: 0.65,
fontSize: 26, bold: true, color: C.navy, fontFace: "Calibri",
});
if (subtitle) {
slide.addShape(pres.ShapeType.rect, {
x: 0.4, y: 0.82, w: 1.2, h: 0.05,
fill: { color: C.teal }, line: { color: C.teal },
});
slide.addText(subtitle, {
x: 0.4, y: 0.88, w: 9, h: 0.35,
fontSize: 13, color: C.teal, italic: true, fontFace: "Calibri",
});
}
}
function bullets(slide, items, x, y, w, h, opts) {
const rows = items.map((item, i) => {
const isLast = i === items.length - 1;
return {
text: item,
options: {
bullet: { type: "bullet", characterCode: "25B6", color: C.teal },
breakLine: !isLast,
fontSize: opts?.fontSize || 14,
color: opts?.color || C.darkGrey,
fontFace: "Calibri",
paraSpaceBefore: 4,
},
};
});
slide.addText(rows, { x, y, w, h, valign: "top" });
}
function label(slide, text, x, y, w, h, bg, fg) {
slide.addShape(pres.ShapeType.roundRect, {
x, y, w, h,
fill: { color: bg || C.teal },
line: { color: bg || C.teal },
rectRadius: 0.08,
});
slide.addText(text, {
x, y, w, h,
fontSize: 11, bold: true, color: fg || C.white,
align: "center", valign: "middle", fontFace: "Calibri",
});
}
// ════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
darkSlide(s);
// decorative teal left bar
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 0.18, h: 5.625,
fill: { color: C.teal }, line: { color: C.teal },
});
// gold accent block
s.addShape(pres.ShapeType.rect, {
x: 0.18, y: 0, w: 0.08, h: 5.625,
fill: { color: C.gold }, line: { color: C.gold },
});
s.addText("MDR-TB & BPaLM Regimen", {
x: 0.55, y: 1.1, w: 8.8, h: 1.0,
fontSize: 38, bold: true, color: C.white, fontFace: "Calibri",
charSpacing: 1,
});
s.addText("Multidrug-Resistant Tuberculosis — Pathophysiology, Pharmacology & Current WHO Guidelines", {
x: 0.55, y: 2.15, w: 8.8, h: 0.55,
fontSize: 15, color: C.mid, fontFace: "Calibri", italic: true,
});
// divider
s.addShape(pres.ShapeType.rect, {
x: 0.55, y: 2.78, w: 4.5, h: 0.04,
fill: { color: C.gold }, line: { color: C.gold },
});
s.addText("Presented by:", {
x: 0.55, y: 2.92, w: 3, h: 0.3,
fontSize: 12, color: C.gold, bold: true, fontFace: "Calibri",
});
const presenters = [
"Gaurav Gupta (Roll no. 31)",
"Nikhil Anand (Roll no. 32)",
"Khairul Ahmed (Roll no. 33)",
"Seajal Thottarath (Roll no. 34)",
"Shreya Saha Mandal (Roll no. 35)",
"Mostafizur Rahman (Roll no. 36)",
];
const rows = presenters.map((p, i) => ({
text: p,
options: { breakLine: i < presenters.length - 1, fontSize: 13, color: C.white, fontFace: "Calibri" },
}));
s.addText(rows, { x: 0.55, y: 3.25, w: 5.5, h: 1.8 });
// right graphic element
s.addShape(pres.ShapeType.ellipse, {
x: 7.2, y: 0.8, w: 2.5, h: 2.5,
fill: { color: "1B2E3C" }, line: { color: C.teal, width: 2 },
});
s.addText("BPaLM", {
x: 7.2, y: 1.7, w: 2.5, h: 0.6,
fontSize: 28, bold: true, color: C.gold, align: "center", fontFace: "Calibri",
});
s.addText("B · Pa · L · M", {
x: 7.2, y: 2.3, w: 2.5, h: 0.35,
fontSize: 12, color: C.mid, align: "center", fontFace: "Calibri",
});
s.addText("Pharma Seminar | 2026", {
x: 0.55, y: 5.2, w: 9, h: 0.28,
fontSize: 10, color: "5A7A8A", fontFace: "Calibri",
});
}
// ════════════════════════════════════════════════════════════════════
// SLIDE 2 — DEFINITION & CLASSIFICATION
// ════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: "F7FBFC" };
header(s, "Definition of MDR-TB", "Ref: Goodman & Gilman; Harrison's Principles of Internal Medicine 22e");
// left card
card(s, 0.3, 1.35, 4.5, 3.9, C.light);
s.addText("What is MDR-TB?", {
x: 0.45, y: 1.45, w: 4.2, h: 0.4,
fontSize: 16, bold: true, color: C.teal, fontFace: "Calibri",
});
bullets(s, [
"Resistance to at least Isoniazid (H) AND Rifampicin (R) — the two most efficacious first-line drugs",
"Caused by Mycobacterium tuberculosis with acquired or primary resistance",
"Requires second-line (Group A, B, C) therapy",
"XDR-TB: additionally resistant to any fluoroquinolone + one injectable agent",
"Pre-XDR-TB: MDR-TB + resistance to any fluoroquinolone",
], s, 0.45, 1.9, 4.2, 3.1, { fontSize: 13 });
// right card — classification table
card(s, 5.1, 1.35, 4.6, 3.9, C.white);
s.addText("WHO Drug Groups for DR-TB", {
x: 5.25, y: 1.45, w: 4.3, h: 0.4,
fontSize: 15, bold: true, color: C.navy, fontFace: "Calibri",
});
const tableData = [
[{ text: "Group", options: { bold: true, color: C.white, fill: C.teal } }, { text: "Drugs", options: { bold: true, color: C.white, fill: C.teal } }],
[{ text: "A (Priority)" }, { text: "Levofloxacin, Bedaquiline, Linezolid" }],
[{ text: "B (Add next)" }, { text: "Clofazimine, Cycloserine/Terizidone" }],
[{ text: "C (Use if needed)" }, { text: "Ethambutol, Pyrazinamide, Imipenem, Delamanid, PAS" }],
];
s.addTable(tableData, {
x: 5.2, y: 1.9, w: 4.4, h: 3.1,
fontSize: 11, fontFace: "Calibri", color: C.darkGrey,
border: { type: "solid", color: C.mid, pt: 0.5 },
rowH: 0.55,
fill: { color: C.white },
});
}
// ════════════════════════════════════════════════════════════════════
// SLIDE 3 — EPIDEMIOLOGY
// ════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: "F7FBFC" };
header(s, "Epidemiology of MDR-TB", "WHO Global TB Report 2023 | Harrison's Principles 22e");
// 3 stat boxes top
const stats = [
{ n: "~410,000", sub: "new MDR/RR-TB cases\nglobally (2022)" },
{ n: "3.6%", sub: "of new TB cases\nare MDR-TB" },
{ n: "19%", sub: "of previously treated\nTB cases are MDR-TB" },
];
stats.forEach((st, i) => {
const x = 0.35 + i * 3.15;
card(s, x, 1.3, 2.9, 1.3, C.navy);
s.addText(st.n, {
x, y: 1.35, w: 2.9, h: 0.7,
fontSize: 28, bold: true, color: C.gold, align: "center", fontFace: "Calibri",
});
s.addText(st.sub, {
x, y: 2.0, w: 2.9, h: 0.5,
fontSize: 10, color: C.mid, align: "center", fontFace: "Calibri",
});
});
// bottom two columns
card(s, 0.35, 2.8, 4.5, 2.5, C.light);
s.addText("High-Burden Countries", {
x: 0.5, y: 2.9, w: 4.2, h: 0.35,
fontSize: 14, bold: true, color: C.teal, fontFace: "Calibri",
});
bullets(s, [
"India, China, Russia account for >50% global burden",
"30 high-burden countries identified by WHO",
"India: ~27% of global TB burden",
"Risk elevated where ≥5% of incident cases are MDR-TB",
], s, 0.5, 3.28, 4.2, 1.9, { fontSize: 12.5 });
card(s, 5.15, 2.8, 4.5, 2.5, C.light);
s.addText("Risk Factors for MDR-TB", {
x: 5.3, y: 2.9, w: 4.2, h: 0.35,
fontSize: 14, bold: true, color: C.teal, fontFace: "Calibri",
});
bullets(s, [
"Prior treatment with anti-TB drugs (most common)",
"Exposure to a known MDR-TB patient",
"HIV co-infection",
"Inadequate / irregular therapy (poor adherence)",
"Immigration from high-burden country",
], s, 5.3, 3.28, 4.2, 1.9, { fontSize: 12.5 });
}
// ════════════════════════════════════════════════════════════════════
// SLIDE 4 — BPaLM OVERVIEW
// ════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
darkSlide(s);
// accent bar top
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 0.07, fill: { color: C.gold }, line: { color: C.gold },
});
s.addText("BPaLM Regimen", {
x: 0.5, y: 0.18, w: 9, h: 0.7,
fontSize: 32, bold: true, color: C.white, fontFace: "Calibri",
});
s.addText("WHO-Recommended All-Oral 6-Month Regimen for MDR/RR-TB (2022)", {
x: 0.5, y: 0.9, w: 9, h: 0.35,
fontSize: 13, color: C.mid, italic: true, fontFace: "Calibri",
});
// 4 drug cards in a row
const drugs = [
{ letter: "B", name: "Bedaquiline", color: "17607A" },
{ letter: "Pa", name: "Pretomanid", color: "1A7A4A" },
{ letter: "L", name: "Linezolid", color: "7B3F00" },
{ letter: "M", name: "Moxifloxacin", color: "6B21A8" },
];
drugs.forEach((d, i) => {
const x = 0.3 + i * 2.38;
s.addShape(pres.ShapeType.roundRect, {
x, y: 1.5, w: 2.2, h: 2.5,
fill: { color: d.color }, line: { color: C.gold, width: 1 }, rectRadius: 0.15,
});
s.addText(d.letter, {
x, y: 1.6, w: 2.2, h: 0.9,
fontSize: 44, bold: true, color: C.gold, align: "center", fontFace: "Calibri",
});
s.addText(d.name, {
x, y: 2.55, w: 2.2, h: 0.45,
fontSize: 13, bold: true, color: C.white, align: "center", fontFace: "Calibri",
});
s.addShape(pres.ShapeType.rect, {
x: x + 0.3, y: 3.05, w: 1.6, h: 0.04,
fill: { color: C.gold }, line: { color: C.gold },
});
});
// bottom row — key facts
const facts = [
"Duration: 24 weeks (6 months)",
"All-oral — no painful injections",
"Supported by TB PRACTECAL trial (noninferior to 9–20 month standard care)",
"Nix-TB & ZeNix trials — 89% favourable outcomes in XDR-TB",
];
const rows = facts.map((f, i) => ({
text: "► " + f,
options: { breakLine: i < facts.length - 1, fontSize: 12.5, color: C.mid, fontFace: "Calibri", paraSpaceBefore: 3 },
}));
s.addText(rows, { x: 0.5, y: 4.2, w: 9, h: 1.1 });
}
// ════════════════════════════════════════════════════════════════════
// SLIDE 5 — COMPONENT DRUGS (overview table)
// ════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: "F7FBFC" };
header(s, "Component Drugs at a Glance", "Source: Katzung 16e | Goodman & Gilman | Lippincott Pharmacology");
const tableData = [
[
{ text: "Drug", options: { bold: true, color: C.white, fill: C.navy } },
{ text: "Class", options: { bold: true, color: C.white, fill: C.navy } },
{ text: "Dose", options: { bold: true, color: C.white, fill: C.navy } },
{ text: "Route", options: { bold: true, color: C.white, fill: C.navy } },
{ text: "Key Adverse Effect", options: { bold: true, color: C.white, fill: C.navy } },
],
[
{ text: "Bedaquiline", options: { bold: true, color: C.teal } },
{ text: "Diarylquinoline" },
{ text: "400 mg/d × 2 wk, then 200 mg 3×/wk × 22 wk" },
{ text: "Oral" },
{ text: "QT prolongation, hepatotoxicity, nausea" },
],
[
{ text: "Pretomanid", options: { bold: true, color: C.green } },
{ text: "Nitroimidazooxazine" },
{ text: "200 mg/d" },
{ text: "Oral" },
{ text: "Hepatotoxicity, peripheral neuropathy, QT prolongation" },
],
[
{ text: "Linezolid", options: { bold: true, color: "7B3F00" } },
{ text: "Oxazolidinone" },
{ text: "600–1200 mg/d (600 mg preferred for MDR-TB)" },
{ text: "Oral" },
{ text: "Myelosuppression, peripheral & optic neuropathy, serotonin syndrome" },
],
[
{ text: "Moxifloxacin", options: { bold: true, color: "6B21A8" } },
{ text: "Fluoroquinolone (4th gen)" },
{ text: "400 mg/d" },
{ text: "Oral" },
{ text: "QT prolongation, GI upset, tendinopathy, CNS effects" },
],
];
s.addTable(tableData, {
x: 0.3, y: 1.35, w: 9.4, h: 3.9,
fontSize: 12, fontFace: "Calibri", color: C.darkGrey,
border: { type: "solid", color: C.mid, pt: 0.5 },
rowH: 0.72,
fill: { color: C.white },
autoPage: false,
});
s.addText("★ All four drugs are administered orally — a major advantage over older injectable-based regimens", {
x: 0.3, y: 5.3, w: 9.4, h: 0.2,
fontSize: 10.5, color: C.teal, italic: true, fontFace: "Calibri",
});
}
// ════════════════════════════════════════════════════════════════════
// SLIDE 6 — MECHANISMS OF ACTION
// ════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: "F7FBFC" };
header(s, "Mechanisms of Action", "Source: Goodman & Gilman 13e | Katzung Basic & Clinical Pharmacology 16e");
const mechs = [
{
name: "Bedaquiline",
color: "17607A",
moa: "Inhibits mycobacterial ATP synthase (subunit c). Blocks proton pump activity → disrupts energy metabolism of M. tuberculosis. Active against replicating AND non-replicating bacilli (sterilizing activity). Novel mechanism — first new anti-TB drug approved since 1971.",
},
{
name: "Pretomanid",
color: "1A7A4A",
moa: "Nitroimidazooxazine — activated by deazaflavin-dependent nitroreductase (Ddn). Inhibits mycolic acid biosynthesis (F420 pathway) in aerobic conditions; under hypoxia generates reactive nitrogen species causing nitric oxide-mediated killing of dormant bacilli.",
},
{
name: "Linezolid",
color: "7B3F00",
moa: "Oxazolidinone antibiotic — binds to 23S rRNA of 50S ribosomal subunit at the peptidyl transferase centre. Prevents formation of the 70S initiation complex → inhibits protein synthesis. Active intracellularly; MIC against M. tuberculosis = 4–8 mcg/mL.",
},
{
name: "Moxifloxacin",
color: "6B21A8",
moa: "4th-generation fluoroquinolone — inhibits DNA gyrase (topoisomerase II) and topoisomerase IV. Prevents DNA supercoiling and replication. Enhanced activity vs. earlier quinolones due to C-8 methoxy group reducing selection of resistant mutants.",
},
];
mechs.forEach((m, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = 0.25 + col * 4.85;
const y = 1.35 + row * 2.08;
card(s, x, y, 4.6, 1.95, C.light);
s.addShape(pres.ShapeType.roundRect, {
x, y, w: 4.6, h: 0.42,
fill: { color: m.color }, line: { color: m.color }, rectRadius: 0.1,
});
s.addText(m.name, {
x, y, w: 4.6, h: 0.42,
fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri",
});
s.addText(m.moa, {
x: x + 0.12, y: y + 0.46, w: 4.35, h: 1.4,
fontSize: 11, color: C.darkGrey, fontFace: "Calibri", valign: "top",
});
});
}
// ════════════════════════════════════════════════════════════════════
// SLIDE 7 — REGIMEN DURATION & PHASES
// ════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
darkSlide(s);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.07, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("Regimen Duration & Dosing Schedule", {
x: 0.5, y: 0.18, w: 9, h: 0.65,
fontSize: 28, bold: true, color: C.white, fontFace: "Calibri",
});
s.addText("Standard BPaLM: 24-week all-oral regimen | Source: WHO 2022 Guidelines; TB PRACTECAL Trial", {
x: 0.5, y: 0.85, w: 9, h: 0.3,
fontSize: 11.5, color: C.mid, italic: true, fontFace: "Calibri",
});
// timeline bar
s.addShape(pres.ShapeType.rect, {
x: 0.5, y: 1.4, w: 9, h: 0.18,
fill: { color: C.teal }, line: { color: C.teal },
});
// week markers
[0, 2, 6, 12, 18, 24].forEach((wk, i) => {
const x = 0.5 + (wk / 24) * 9;
s.addShape(pres.ShapeType.rect, { x: x - 0.02, y: 1.4, w: 0.04, h: 0.4, fill: { color: C.gold }, line: { color: C.gold } });
s.addText(`Wk ${wk}`, { x: x - 0.3, y: 1.82, w: 0.6, h: 0.25, fontSize: 9.5, color: C.mid, align: "center", fontFace: "Calibri" });
});
// dosing blocks
const blocks = [
{ x: 0.5, w: 0.75, label: "Wk 1–2\nBedaquiline\n400 mg/d", fill: "17607A" },
{ x: 1.28, w: 8.22, label: "Wk 3–24: Bedaquiline 200 mg × 3/wk", fill: "0E4A5A" },
];
const bpBlocks = [
{ x: 0.5, w: 9, y: 2.35, label: "Pretomanid 200 mg/d (Wk 1–24)", fill: "1A7A4A" },
{ x: 0.5, w: 9, y: 2.82, label: "Linezolid 600 mg/d (Wk 1–24) — dose may be reduced for toxicity", fill: "7B3F00" },
{ x: 0.5, w: 9, y: 3.29, label: "Moxifloxacin 400 mg/d (Wk 1–24) — added in BPaLM (vs BPaL)", fill: "6B21A8" },
];
blocks.forEach(b => {
s.addShape(pres.ShapeType.roundRect, {
x: b.x, y: 2.1, w: b.w, h: 0.2,
fill: { color: b.fill }, line: { color: b.fill }, rectRadius: 0.04,
});
});
bpBlocks.forEach(b => {
s.addShape(pres.ShapeType.roundRect, {
x: b.x, y: b.y, w: b.w, h: 0.38,
fill: { color: b.fill }, line: { color: b.fill }, rectRadius: 0.06,
});
s.addText(b.label, {
x: b.x + 0.1, y: b.y, w: b.w - 0.2, h: 0.38,
fontSize: 11, bold: true, color: C.white, valign: "middle", fontFace: "Calibri",
});
});
// key note
s.addShape(pres.ShapeType.roundRect, {
x: 0.5, y: 3.82, w: 9, h: 1.5,
fill: { color: "1A2C3A" }, line: { color: C.gold, width: 1 }, rectRadius: 0.1,
});
bullets(s, [
"Bedaquiline: 400 mg/d for 2 weeks loading dose, then 200 mg three times per week (maintenance) — to minimise QT risk",
"Duration may be extended to 9 months if culture remains positive at 4 months",
"Food increases bedaquiline bioavailability 2-fold — must be taken with a meal",
"Pyridoxine (Vitamin B6) supplement recommended alongside Linezolid to reduce neuropathy risk",
], s, 0.65, 3.88, 8.7, 1.38, { fontSize: 11.5, color: C.mid });
}
// ════════════════════════════════════════════════════════════════════
// SLIDE 8 — TARGET POPULATION & ELIGIBILITY
// ════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: "F7FBFC" };
header(s, "Target Population & Eligibility", "Source: Harrison's Principles 22e | WHO 2022 Guidelines");
// left: who should receive
card(s, 0.3, 1.35, 4.5, 3.95, C.light);
s.addText("WHO Recommended For:", {
x: 0.45, y: 1.45, w: 4.2, h: 0.38,
fontSize: 15, bold: true, color: C.green, fontFace: "Calibri",
});
bullets(s, [
"MDR-TB or RR-TB (Rifampicin-Resistant TB) patients",
"Fluoroquinolone-sensitive cases (moxifloxacin must remain susceptible for BPaLM)",
"Adults ≥18 years (primary evidence base)",
"Patients with pulmonary MDR-TB",
"Pre-XDR or XDR-TB (BPaL regimen without moxifloxacin if FQ-resistant)",
"Patients who have failed prior MDR-TB therapy",
], s, 0.45, 1.88, 4.2, 3.2, { fontSize: 12.5 });
// right: contraindications / cautions
card(s, 5.15, 1.35, 4.5, 3.95, "FFF8F8");
s.addText("Cautions / Not Recommended When:", {
x: 5.3, y: 1.45, w: 4.2, h: 0.38,
fontSize: 15, bold: true, color: C.red, fontFace: "Calibri",
});
bullets(s, [
"QTc > 500 ms at baseline — risk of fatal arrhythmia",
"Pregnancy (limited data; weigh risk-benefit; pretomanid not studied sufficiently)",
"Severe hepatic impairment (Child-Pugh C)",
"Concomitant strong CYP3A4 inducers (rifampicin reduces bedaquiline AUC by ~52%)",
"Concomitant serotonergic agents — linezolid serotonin syndrome risk",
"Children <18 yr: limited paediatric pharmacokinetic data",
], s, 5.3, 1.88, 4.2, 3.2, { fontSize: 12.5, color: C.darkGrey });
}
// ════════════════════════════════════════════════════════════════════
// SLIDE 9 — ADVERSE DRUG REACTIONS
// ════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: "F7FBFC" };
header(s, "Adverse Drug Reactions (ADRs)", "Source: Katzung 16e | Goodman & Gilman 13e | Lippincott Pharmacology");
const adrs = [
{
drug: "Bedaquiline",
color: "17607A",
items: [
"QTc prolongation (most serious) — additive with moxifloxacin/pretomanid",
"Nausea (26%), diarrhoea (13%) — most common",
"Hepatotoxicity — monitor LFTs monthly",
"Arthralgia, headache",
"Cross-resistance with clofazimine (via MmpL5 efflux pump upregulation)",
],
},
{
drug: "Pretomanid",
color: "1A7A4A",
items: [
"Peripheral neuropathy",
"Hepatotoxicity (elevated transaminases)",
"QTc prolongation (less than bedaquiline)",
"Nausea, vomiting",
"Myelosuppression (anaemia) when combined with linezolid",
],
},
{
drug: "Linezolid",
color: "7B3F00",
items: [
"Myelosuppression: anaemia, thrombocytopenia, neutropenia (dose- & duration-dependent)",
"Peripheral neuropathy (potentially irreversible) — pyridoxine supplementation recommended",
"Optic neuropathy — monitor visual acuity monthly",
"Serotonin syndrome with SSRIs, TCAs, MAOIs — AVOID combination",
"Lactic acidosis (rare but serious) with prolonged use",
],
},
{
drug: "Moxifloxacin",
color: "6B21A8",
items: [
"QTc prolongation — cumulative with bedaquiline & pretomanid (triple QT risk)",
"GI effects: nausea, diarrhoea, abdominal pain",
"Tendinopathy / tendon rupture (fluoroquinolone class effect)",
"CNS: dizziness, headache, insomnia, rare seizures",
"Phototoxicity — avoid prolonged sun exposure",
],
},
];
adrs.forEach((a, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = 0.25 + col * 4.85;
const y = 1.35 + row * 2.12;
card(s, x, y, 4.6, 2.0, C.light);
s.addShape(pres.ShapeType.roundRect, {
x, y, w: 4.6, h: 0.38,
fill: { color: a.color }, line: { color: a.color }, rectRadius: 0.08,
});
s.addText(a.drug, {
x, y, w: 4.6, h: 0.38,
fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri",
});
const rows = a.items.map((item, j) => ({
text: "• " + item,
options: { breakLine: j < a.items.length - 1, fontSize: 10.5, color: C.darkGrey, fontFace: "Calibri", paraSpaceBefore: 2 },
}));
s.addText(rows, { x: x + 0.1, y: y + 0.42, w: 4.4, h: 1.5, valign: "top" });
});
}
// ════════════════════════════════════════════════════════════════════
// SLIDE 10 — ADVANTAGES OF BPaLM
// ════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
darkSlide(s);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.07, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("Advantages of BPaLM", {
x: 0.5, y: 0.18, w: 9, h: 0.65,
fontSize: 30, bold: true, color: C.white, fontFace: "Calibri",
});
s.addText("Why BPaLM marks a paradigm shift in DR-TB treatment | Source: Harrison's 22e; WHO 2022", {
x: 0.5, y: 0.85, w: 9, h: 0.3,
fontSize: 11, color: C.mid, italic: true, fontFace: "Calibri",
});
const advs = [
{ icon: "⏱", title: "Shorter Duration", body: "24 weeks vs. 9–20 months with older regimens → improved patient quality of life and reduced health system cost" },
{ icon: "💊", title: "Fully Oral", body: "Eliminates painful injectable agents (kanamycin, capreomycin) associated with hearing loss and nephrotoxicity" },
{ icon: "✓", title: "Superior Outcomes", body: "TB PRACTECAL: BPaLM noninferior to standard care with fewer serious adverse events; Nix-TB: 89% favourable outcomes" },
{ icon: "📋", title: "Better Compliance", body: "Shorter, simpler, oral regimen → higher adherence rates, lower default rates, reduced transmission" },
{ icon: "🎯", title: "Novel Mechanism", body: "Bedaquiline targets ATP synthase — completely novel MoA prevents cross-resistance with existing TB drugs" },
{ icon: "🌍", title: "Global Recommendation", body: "WHO 2022: BPaLM is the preferred regimen for FQ-sensitive MDR/RR-TB. NTEP India has adopted this regimen." },
];
advs.forEach((a, i) => {
const col = i % 3;
const row = Math.floor(i / 3);
const x = 0.25 + col * 3.23;
const y = 1.3 + row * 2.0;
s.addShape(pres.ShapeType.roundRect, {
x, y, w: 3.1, h: 1.85,
fill: { color: "0E2233" }, line: { color: C.teal, width: 1 }, rectRadius: 0.12,
});
s.addText(a.icon + " " + a.title, {
x: x + 0.12, y: y + 0.1, w: 2.85, h: 0.42,
fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri",
});
s.addText(a.body, {
x: x + 0.12, y: y + 0.52, w: 2.85, h: 1.22,
fontSize: 11, color: C.mid, fontFace: "Calibri", valign: "top",
});
});
}
// ════════════════════════════════════════════════════════════════════
// SLIDE 11 — LIMITATIONS
// ════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: "F7FBFC" };
header(s, "Limitations & Challenges", "Source: Harrison's Principles 22e | WHO 2022 Guidelines");
const lims = [
{
title: "Drug Toxicity Monitoring",
color: C.red,
body: "Triple QT risk (bedaquiline + pretomanid + moxifloxacin) demands baseline ECG and monthly monitoring. Linezolid-induced irreversible peripheral and optic neuropathy — monthly CBC, visual acuity, neurological assessment required. Hepatotoxicity from multiple agents — LFTs every 2 weeks initially.",
},
{
title: "Cost & Access",
color: "D35400",
body: "Bedaquiline and pretomanid are expensive (though access improving via Global Fund/USAID). Limited availability in resource-limited settings. Supply chain challenges — procurement and storage requirements for novel agents.",
},
{
title: "Limited Paediatric Data",
color: "8E44AD",
body: "No large RCTs in children <12 years. Pharmacokinetic data limited for weight-based dosing. PaediatricTB work group actively studying BPaL(M) in children. Current WHO guidance cautious for use under 18 years.",
},
{
title: "Emerging Resistance",
color: C.navy,
body: "Bedaquiline resistance mutations (atpE gene, mmpL5 efflux) already reported in clinical isolates. Cross-resistance between bedaquiline and clofazimine. Risk of creating pre-XDR/XDR strains if BPaLM used without susceptibility testing. Protecting novel agents is critical.",
},
];
lims.forEach((l, i) => {
const x = 0.3 + (i % 2) * 4.85;
const y = 1.35 + Math.floor(i / 2) * 2.0;
card(s, x, y, 4.55, 1.88, C.white);
s.addShape(pres.ShapeType.rect, {
x, y, w: 0.12, h: 1.88,
fill: { color: l.color }, line: { color: l.color },
});
s.addText(l.title, {
x: x + 0.2, y: y + 0.08, w: 4.25, h: 0.36,
fontSize: 14, bold: true, color: l.color, fontFace: "Calibri",
});
s.addText(l.body, {
x: x + 0.2, y: y + 0.46, w: 4.25, h: 1.3,
fontSize: 11, color: C.darkGrey, fontFace: "Calibri", valign: "top",
});
});
}
// ════════════════════════════════════════════════════════════════════
// SLIDE 12 — MONITORING PARAMETERS
// ════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: "F7FBFC" };
header(s, "Monitoring Parameters During BPaLM", "Source: WHO 2022 Guidelines | Katzung 16e");
const mon = [
{
test: "ECG (QTc)",
drug: "Bedaquiline + Moxifloxacin + Pretomanid",
timing: "Baseline, then monthly (or when symptoms suggest arrhythmia)",
action: "Suspend all QT-prolonging drugs if QTc > 500 ms",
color: C.red,
},
{
test: "Liver Function Tests (ALT/AST)",
drug: "Bedaquiline + Pretomanid",
timing: "Baseline, weeks 2, 4, 8, 12, then monthly",
action: "Interrupt if ALT/AST >5× ULN or symptomatic hepatitis",
color: "D35400",
},
{
test: "Complete Blood Count (CBC)",
drug: "Linezolid",
timing: "Baseline, then every 2 weeks for first 2 months, then monthly",
action: "Reduce linezolid dose or stop if Hb <8 g/dL or platelets <75×10⁹/L",
color: "7B3F00",
},
{
test: "Peripheral Neuropathy Assessment",
drug: "Linezolid + Pretomanid",
timing: "Monthly clinical assessment",
action: "Reduce linezolid to 300 mg/d or stop; supplemental pyridoxine",
color: "6B21A8",
},
{
test: "Visual Acuity & Colour Vision",
drug: "Linezolid",
timing: "Baseline, then monthly",
action: "Stop linezolid immediately if optic neuropathy suspected",
color: C.teal,
},
{
test: "Sputum Culture Conversion",
drug: "Clinical response",
timing: "Monthly — months 1–6; at end of treatment",
action: "Extend treatment to 9 months if culture positive at month 4",
color: C.green,
},
];
const tableData = [
[
{ text: "Parameter", options: { bold: true, color: C.white, fill: C.navy } },
{ text: "Associated Drug", options: { bold: true, color: C.white, fill: C.navy } },
{ text: "Frequency", options: { bold: true, color: C.white, fill: C.navy } },
{ text: "Action Threshold", options: { bold: true, color: C.white, fill: C.navy } },
],
...mon.map(m => [
{ text: m.test, options: { bold: true, color: m.color } },
{ text: m.drug },
{ text: m.timing },
{ text: m.action },
]),
];
s.addTable(tableData, {
x: 0.25, y: 1.35, w: 9.5, h: 3.95,
fontSize: 10.5, fontFace: "Calibri", color: C.darkGrey,
border: { type: "solid", color: C.mid, pt: 0.5 },
rowH: 0.53,
fill: { color: C.white },
});
}
// ════════════════════════════════════════════════════════════════════
// SLIDE 13 — STATUS IN INDIA / NTEP
// ════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
darkSlide(s);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.07, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("Status in India — NTEP", {
x: 0.5, y: 0.18, w: 9, h: 0.65,
fontSize: 30, bold: true, color: C.white, fontFace: "Calibri",
});
s.addText("National TB Elimination Programme | Target: TB-free India by 2025", {
x: 0.5, y: 0.85, w: 9, h: 0.3,
fontSize: 12, color: C.gold, italic: true, fontFace: "Calibri",
});
// two columns
card(s, 0.3, 1.35, 4.5, 3.95, "0E2233");
s.addText("NTEP Implementation", {
x: 0.45, y: 1.45, w: 4.2, h: 0.38,
fontSize: 15, bold: true, color: C.gold, fontFace: "Calibri",
});
bullets(s, [
"India adopted BPaLM under NTEP — scaling up across all states",
"Aligned with WHO 2022 Consolidated Guidelines on DR-TB Treatment",
"Bedaquiline provided free of cost through NTEP (Global Fund support)",
"Nikshay portal: digital tracking of all MDR-TB patients",
"India accounts for ~27% of global TB burden — policy impact is enormous",
"Central TB Division: BPaLM now standard for FQ-sensitive MDR/RR-TB",
], s, 0.45, 1.88, 4.2, 3.2, { fontSize: 12.5, color: C.mid });
card(s, 5.15, 1.35, 4.5, 3.95, "0E2233");
s.addText("Clinical Trial Evidence Base", {
x: 5.3, y: 1.45, w: 4.2, h: 0.38,
fontSize: 15, bold: true, color: C.gold, fontFace: "Calibri",
});
bullets(s, [
"Nix-TB (2019): BPaL — 89% favourable outcomes in XDR-TB (n=109)",
"ZeNix (2022): Tested different linezolid doses — 600 mg/d was optimal balance of efficacy vs. toxicity",
"TB PRACTECAL (2022): BPaLM vs. standard (9–20 mo) — BPaLM noninferior, fewer serious adverse events",
"STREAM Trial: Validated shorter MDR-TB regimens globally",
"These trials prompted WHO 2022 to recommend BPaLM as preferred regimen",
], s, 5.3, 1.88, 4.2, 3.2, { fontSize: 12.5, color: C.mid });
}
// ════════════════════════════════════════════════════════════════════
// SLIDE 14 — SUMMARY / CONCLUSION
// ════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
darkSlide(s);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.07, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("Key Takeaways", {
x: 0.5, y: 0.18, w: 9, h: 0.65,
fontSize: 32, bold: true, color: C.white, fontFace: "Calibri",
});
const points = [
"MDR-TB is resistance to BOTH isoniazid & rifampicin — requires Group A second-line drugs",
"BPaLM = Bedaquiline + Pretomanid + Linezolid + Moxifloxacin — WHO's 2022 preferred 24-week oral regimen",
"Bedaquiline: inhibits mycobacterial ATP synthase (subunit c) — first novel MoA drug since 1971",
"Pretomanid: inhibits mycolic acid biosynthesis + NO-mediated killing under hypoxia",
"Linezolid: binds 23S rRNA → blocks 70S initiation complex → no protein synthesis",
"Moxifloxacin: inhibits DNA gyrase → prevents DNA replication",
"Critical ADR: triple QT prolongation risk (B + Pa + M) — mandatory ECG monitoring",
"India (NTEP): BPaLM now freely available; aligned with WHO 2022 DR-TB consolidated guidelines",
];
const rows = points.map((p, i) => ({
text: `${i + 1}. ${p}`,
options: { breakLine: i < points.length - 1, fontSize: 13.5, color: C.white, fontFace: "Calibri", paraSpaceBefore: 6 },
}));
s.addText(rows, { x: 0.5, y: 1.08, w: 9, h: 4.0, valign: "top" });
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.3, w: 10, h: 0.07, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("References: Goodman & Gilman 13e | Katzung Basic & Clinical Pharmacology 16e | Harrison's Principles of Internal Medicine 22e | Lippincott Pharmacology | WHO 2022 DR-TB Guidelines", {
x: 0.3, y: 5.38, w: 9.4, h: 0.22,
fontSize: 8.5, color: "5A7A8A", fontFace: "Calibri",
});
}
// ── WRITE FILE ───────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/mdr_tb_bpalm/MDR_TB_BPaLM_Enhanced.pptx" })
.then(() => console.log("✓ PPTX written successfully"))
.catch(err => { console.error("ERROR:", err); process.exit(1); });
mkdir -p /home/daytona/workspace/mdr_tb_bpalm && node /home/daytona/workspace/mdr_tb_bpalm/build.js 2>&1