Make a power point presentation for me as JR1 JC presentation
python3 -c " import pdfplumber pdf_path = '/home/daytona/workspace/attachments/522ee521-c822-4b85-8834-5f96e07304c0/feasibility_and_outcomes_of_laparoscopic.12.pdf' with pdfplumber.open(pdf_path) as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): text = page.extract_text() print(f'\\n===PAGE {i+1}===') print(text) "
mkdir -p /home/daytona/workspace/jc-presentation && ls /home/daytona/workspace/jc-presentation/
~/jc-presentation/create_pptx.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Laparoscopy in Perforation Peritonitis – JR1 Journal Club";
// ─── THEME ───────────────────────────────────────────────────────────────────
const C = {
navy: "0D2137",
teal: "1A7A6E",
tealLt: "25B59E",
gold: "E8A020",
white: "FFFFFF",
offWhite:"F4F7F9",
grey: "8C9BAB",
greyLt: "D6DFE8",
dark: "111B24",
red: "C0392B",
green: "1E8B60",
orange: "D4750F",
};
// helper: horizontal rule
function addRule(slide, y) {
slide.addShape(pres.ShapeType.rect, { x: 0.5, y, w: 9, h: 0.03, fill: { color: C.tealLt }, line: { color: C.tealLt } });
}
// helper: section badge
function addBadge(slide, label, x, y, w) {
slide.addShape(pres.ShapeType.rect, { x, y, w: w || 2.2, h: 0.32, fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.05 });
slide.addText(label, { x, y, w: w || 2.2, h: 0.32, fontSize: 9, bold: true, color: C.white, align: "center", valign: "middle" });
}
// helper: stat box
function statBox(slide, label, value, unit, x, y, w, h, accent) {
slide.addShape(pres.ShapeType.rect, { x, y, w, h, fill: { color: C.offWhite }, line: { color: accent || C.teal, pt: 2 }, rectRadius: 0.08 });
slide.addText(value, { x, y: y + 0.08, w, h: h * 0.55, fontSize: 26, bold: true, color: accent || C.teal, align: "center", valign: "middle" });
slide.addText(unit, { x, y: y + h * 0.52, w, h: h * 0.22, fontSize: 9, color: C.grey, align: "center", valign: "top" });
slide.addText(label, { x, y: y + h * 0.72, w, h: h * 0.28, fontSize: 9.5, bold: true, color: C.navy, align: "center", valign: "middle" });
}
// helper: dark section divider slide
function dividerSlide(label) {
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 2.4, w: 10, h: 0.06, fill: { color: C.tealLt }, line: { color: C.tealLt } });
s.addText(label, { x: 0.5, y: 1.7, w: 9, h: 1.2, fontSize: 36, bold: true, color: C.white, align: "center", valign: "middle", charSpacing: 2 });
return s;
}
// helper: slide with standard header
function contentSlide(title, badge) {
const s = pres.addSlide();
// left accent bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.06, h: 5.625, fill: { color: C.teal }, line: { color: C.teal } });
// header background
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.95, fill: { color: C.navy }, line: { color: C.navy } });
// slide title
s.addText(title, { x: 0.25, y: 0, w: 9.5, h: 0.95, fontSize: 20, bold: true, color: C.white, valign: "middle", margin: 8 });
// background
s.addShape(pres.ShapeType.rect, { x: 0.06, y: 0.95, w: 9.94, h: 4.675, fill: { color: C.offWhite }, line: { color: C.offWhite } });
if (badge) addBadge(s, badge, 7.5, 0.65, 2.3);
return s;
}
// =============================================================================
// SLIDE 1 – TITLE
// =============================================================================
{
const s = pres.addSlide();
// full dark background
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
// teal accent stripe
s.addShape(pres.ShapeType.rect, { x: 0, y: 3.6, w: 10, h: 0.08, fill: { color: C.tealLt }, line: { color: C.tealLt } });
// gold top stripe
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("JR1 Journal Club", { x: 0.6, y: 0.25, w: 8.8, h: 0.45, fontSize: 13, bold: true, color: C.gold, charSpacing: 3 });
s.addText("Feasibility and Outcomes of Laparoscopic Management in Perforation Peritonitis", {
x: 0.6, y: 0.75, w: 8.8, h: 1.8, fontSize: 28, bold: true, color: C.white, valign: "middle", align: "left"
});
s.addText("A Prospective Cohort Study with Propensity Score Matching", {
x: 0.6, y: 2.45, w: 8.8, h: 0.5, fontSize: 14, italic: true, color: C.tealLt
});
addRule(s, 3.1);
s.addText("Soni S, Parihar YK, Chaudhary R, et al. | Journal of Minimal Access Surgery 2026; 22(2):180–186", {
x: 0.6, y: 3.25, w: 8.8, h: 0.38, fontSize: 10.5, color: C.greyLt
});
s.addText("AIIMS Jodhpur | Prospective Cohort | Jan 2022 – May 2023", {
x: 0.6, y: 3.62, w: 8.8, h: 0.32, fontSize: 10.5, color: C.grey
});
s.addText("Presented by: JR1 | Date: " + new Date().toLocaleDateString("en-GB", { day:"2-digit", month:"short", year:"numeric" }), {
x: 0.6, y: 4.9, w: 8.8, h: 0.38, fontSize: 10.5, color: C.grey, italic: true
});
}
// =============================================================================
// SLIDE 2 – OUTLINE
// =============================================================================
{
const s = contentSlide("Presentation Outline", "Overview");
const items = [
["01", "Background & Introduction", "Why is perforation peritonitis a challenge?"],
["02", "Study Design & Methods", "Prospective cohort, PSM, inclusion/exclusion"],
["03", "Key Results", "Operative time, hospital stay, pain, morbidity"],
["04", "Discussion", "Conversion rate, learning curve, context"],
["05", "Conclusion & Appraisal", "Strengths, limitations, take-home message"],
];
items.forEach(([num, title, sub], i) => {
const y = 1.1 + i * 0.83;
s.addShape(pres.ShapeType.rect, { x: 0.35, y, w: 0.52, h: 0.52, fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.05 });
s.addText(num, { x: 0.35, y, w: 0.52, h: 0.52, fontSize: 13, bold: true, color: C.white, align: "center", valign: "middle" });
s.addText(title, { x: 1.05, y: y + 0.02, w: 8.5, h: 0.28, fontSize: 13.5, bold: true, color: C.navy });
s.addText(sub, { x: 1.05, y: y + 0.28, w: 8.5, h: 0.22, fontSize: 10.5, color: C.grey });
});
}
// =============================================================================
// SLIDE 3 – BACKGROUND
// =============================================================================
{
const s = contentSlide("Background", "Introduction");
s.addText("Perforation Peritonitis: The Problem", { x: 0.35, y: 1.05, w: 9.3, h: 0.38, fontSize: 15, bold: true, color: C.navy });
const pts = [
"Common emergency surgical admission — significant cause of worldwide morbidity and mortality",
"Caused by gastrointestinal perforation → severe intra-abdominal infection",
"Most patients present haemodynamically unstable, requiring urgent surgery",
"Most common cause: peptic ulcer disease (PUD), followed by ileal and appendicular perforation",
"Traditional standard of care: open laparotomy (e.g., Graham's patch repair for PUD)",
];
s.addText(pts.map(p => ({ text: p, options: { bullet: { code: "2022" }, breakLine: true, paraSpaceAfter: 6 } })),
{ x: 0.5, y: 1.52, w: 5.7, h: 2.6, fontSize: 11.5, color: C.dark, valign: "top" });
// right panel: challenges of open surgery
s.addShape(pres.ShapeType.rect, { x: 6.45, y: 1.05, w: 3.2, h: 3.1, fill: { color: C.navy }, line: { color: C.teal, pt: 2 }, rectRadius: 0.1 });
s.addText("Limitations of Open\nLaparotomy", { x: 6.55, y: 1.1, w: 3.0, h: 0.6, fontSize: 11.5, bold: true, color: C.gold, align: "center" });
const openlims = ["Large midline incision", "Higher post-op pain", "Longer hospital stay", "More wound complications", "Slower recovery"];
openlims.forEach((item, i) => {
s.addShape(pres.ShapeType.rect, { x: 6.6, y: 1.75 + i * 0.44, w: 3.0, h: 0.35, fill: { color: C.dark }, line: { color: C.dark }, rectRadius: 0.05 });
s.addText("✗ " + item, { x: 6.6, y: 1.75 + i * 0.44, w: 3.0, h: 0.35, fontSize: 10.5, color: C.white, valign: "middle" });
});
s.addText("Laparoscopy first described for PUD perforation in 1990 (Mouret et al.)", {
x: 0.35, y: 4.25, w: 9.3, h: 0.38, fontSize: 10.5, italic: true, color: C.teal
});
}
// =============================================================================
// SLIDE 4 – CLINICAL QUESTION
// =============================================================================
{
const s = contentSlide("Clinical Question & Rationale", "PICO");
s.addShape(pres.ShapeType.rect, { x: 0.35, y: 1.1, w: 9.3, h: 1.5, fill: { color: C.navy }, line: { color: C.tealLt, pt: 2 }, rectRadius: 0.1 });
s.addText("Research Question", { x: 0.5, y: 1.15, w: 9.0, h: 0.35, fontSize: 12, bold: true, color: C.gold });
s.addText("In adult patients presenting with perforation peritonitis, is laparoscopic management feasible and does it offer comparable or improved perioperative outcomes compared to open laparotomy?",
{ x: 0.5, y: 1.5, w: 9.0, h: 0.95, fontSize: 13, color: C.white, italic: true, valign: "middle" });
const pico = [
["P", "Population", "Adults ≥18 yrs with GI perforation peritonitis (haemodynamically stable)"],
["I", "Intervention", "Laparoscopic management (repair/appendectomy)"],
["C", "Comparator", "Open laparotomy"],
["O", "Outcomes", "Operative time, hospital stay, VAS pain, 30-day morbidity & mortality"],
];
pico.forEach(([letter, label, desc], i) => {
const y = 2.85 + i * 0.54;
s.addShape(pres.ShapeType.rect, { x: 0.35, y, w: 0.38, h: 0.38, fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.05 });
s.addText(letter, { x: 0.35, y, w: 0.38, h: 0.38, fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle" });
s.addText(label + ":", { x: 0.82, y: y + 0.04, w: 1.5, h: 0.3, fontSize: 11, bold: true, color: C.navy });
s.addText(desc, { x: 2.4, y: y + 0.04, w: 7.2, h: 0.3, fontSize: 11, color: C.dark });
});
}
// =============================================================================
// SLIDE 5 – STUDY DESIGN
// =============================================================================
{
const s = contentSlide("Study Design & Setting", "Methods");
// flow boxes
const boxes = [
{ x: 0.3, label: "Setting", val: "AIIMS Jodhpur\nTertiary referral centre" },
{ x: 2.85, label: "Design", val: "Prospective\nobservational cohort" },
{ x: 5.4, label: "Period", val: "Jan 2022 –\nMay 2023 (17 months)" },
{ x: 7.95, label: "Ethics", val: "IEC approved\n(AIIMS/IEC/2021/3611)" },
];
boxes.forEach(b => {
s.addShape(pres.ShapeType.rect, { x: b.x, y: 1.1, w: 2.3, h: 1.25, fill: { color: C.navy }, line: { color: C.teal, pt: 2 }, rectRadius: 0.1 });
s.addText(b.label, { x: b.x, y: 1.12, w: 2.3, h: 0.36, fontSize: 10, bold: true, color: C.gold, align: "center" });
s.addText(b.val, { x: b.x, y: 1.48, w: 2.3, h: 0.8, fontSize: 11.5, color: C.white, align: "center", valign: "middle" });
});
// arrows between boxes
for (let i = 0; i < 3; i++) {
s.addText("▶", { x: 2.55 + i * 2.55, y: 1.55, w: 0.35, h: 0.35, fontSize: 14, color: C.tealLt, align: "center" });
}
s.addText("Patient Flow", { x: 0.35, y: 2.6, w: 9.3, h: 0.35, fontSize: 13, bold: true, color: C.navy });
addRule(s, 2.95);
// Flow diagram
const flowY = 3.1;
const flowBoxes = [
{ x: 0.3, label: "140 patients enrolled\n(perforation peritonitis)" },
{ x: 3.5, label: "64 planned for\nlaparoscopic management" },
{ x: 6.8, label: "30 laparoscopy\ncompleted" },
];
flowBoxes.forEach((b, i) => {
const col = i === 0 ? C.teal : (i === 1 ? C.navy : C.green);
s.addShape(pres.ShapeType.rect, { x: b.x, y: flowY, w: 2.9, h: 0.9, fill: { color: col }, line: { color: col }, rectRadius: 0.08 });
s.addText(b.label, { x: b.x, y: flowY, w: 2.9, h: 0.9, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle" });
if (i < 2) s.addText("▶", { x: b.x + 2.95, y: flowY + 0.25, w: 0.4, h: 0.4, fontSize: 16, color: C.tealLt, align: "center" });
});
// branch arrow down
s.addText("▼", { x: 5.85, y: flowY + 0.88, w: 0.4, h: 0.35, fontSize: 16, color: C.red, align: "center" });
s.addShape(pres.ShapeType.rect, { x: 5.4, y: flowY + 1.2, w: 2.9, h: 0.75, fill: { color: C.red }, line: { color: C.red }, rectRadius: 0.08 });
s.addText("34 converted to\nlaparotomy (53.1%)", { x: 5.4, y: flowY + 1.2, w: 2.9, h: 0.75, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle" });
// PSM note
s.addShape(pres.ShapeType.rect, { x: 0.3, y: flowY + 1.2, w: 4.7, h: 0.75, fill: { color: C.greyLt }, line: { color: C.teal, pt: 1.5 }, rectRadius: 0.08 });
s.addText("After 1:1 Propensity Score Matching → 28 patients per group (n = 56 matched)", {
x: 0.4, y: flowY + 1.2, w: 4.5, h: 0.75, fontSize: 11, bold: true, color: C.navy, align: "center", valign: "middle"
});
}
// =============================================================================
// SLIDE 6 – INCLUSION / EXCLUSION
// =============================================================================
{
const s = contentSlide("Inclusion & Exclusion Criteria", "Methods");
// inclusion
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.1, w: 4.5, h: 3.6, fill: { color: C.offWhite }, line: { color: C.green, pt: 2 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.1, w: 4.5, h: 0.48, fill: { color: C.green }, line: { color: C.green }, rectRadius: 0.1 });
s.addText("✔ Inclusion Criteria", { x: 0.3, y: 1.1, w: 4.5, h: 0.48, fontSize: 12.5, bold: true, color: C.white, valign: "middle", margin: 8 });
const inc = [
"Age ≥ 18 years",
"Radiological or intraoperative confirmation of GI perforation",
"Haemodynamically stable at presentation\n(SBP ≥90 mmHg after resuscitation)",
"Written informed consent obtained",
];
s.addText(inc.map(t => ({ text: t, options: { bullet: { code: "2714" }, breakLine: true, paraSpaceAfter: 8 } })),
{ x: 0.45, y: 1.7, w: 4.25, h: 2.9, fontSize: 11.5, color: C.dark, valign: "top" });
// exclusion
s.addShape(pres.ShapeType.rect, { x: 5.25, y: 1.1, w: 4.5, h: 3.6, fill: { color: C.offWhite }, line: { color: C.red, pt: 2 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.rect, { x: 5.25, y: 1.1, w: 4.5, h: 0.48, fill: { color: C.red }, line: { color: C.red }, rectRadius: 0.1 });
s.addText("✗ Exclusion Criteria", { x: 5.25, y: 1.1, w: 4.5, h: 0.48, fontSize: 12.5, bold: true, color: C.white, valign: "middle", margin: 8 });
const exc = [
"Haemodynamic instability / septic shock requiring vasopressors",
"Previous major abdominal surgery (anticipated adhesions)",
"Perforation secondary to malignancy",
"Non-consenting patients",
];
s.addText(exc.map(t => ({ text: t, options: { bullet: { code: "2718" }, breakLine: true, paraSpaceAfter: 8 } })),
{ x: 5.4, y: 1.7, w: 4.25, h: 2.9, fontSize: 11.5, color: C.dark, valign: "top" });
}
// =============================================================================
// SLIDE 7 – BASELINE CHARACTERISTICS
// =============================================================================
{
const s = contentSlide("Baseline Characteristics (After PSM)", "Results");
s.addText("1:1 Propensity score matching balanced confounders — 28 patients per group", {
x: 0.35, y: 1.02, w: 9.3, h: 0.35, fontSize: 11, italic: true, color: C.teal
});
// Table header
const cols = [2.5, 1.8, 2.0, 1.2];
const headers = ["Variable", "Laparotomy (n=28)", "Laparoscopy (n=28)", "P-value"];
const hx = [0.32, 2.9, 4.78, 6.88];
headers.forEach((h, i) => {
s.addShape(pres.ShapeType.rect, { x: hx[i], y: 1.45, w: cols[i], h: 0.38, fill: { color: C.navy }, line: { color: C.navy } });
s.addText(h, { x: hx[i], y: 1.45, w: cols[i], h: 0.38, fontSize: 10.5, bold: true, color: C.white, align: "center", valign: "middle" });
});
const rows = [
["Age (mean ± SD, yrs)", "39.35 ± 17.13", "37.57 ± 15.56", "0.686"],
["Sex (M/F)", "19 / 9", "20 / 8", "0.085"],
["Duration of symptoms (days)", "3.14 ± 1.5", "3.07 ± 1.62", "0.867"],
["Comorbidities (n)", "3 / 28", "2 / 28", "0.639"],
["Peptic perforation", "13", "12", "—"],
["Appendicular perforation", "13", "14", "—"],
["Small bowel perforation", "2", "2", "—"],
];
rows.forEach((row, i) => {
const rowY = 1.86 + i * 0.42;
const bg = i % 2 === 0 ? C.white : C.offWhite;
row.forEach((cell, j) => {
s.addShape(pres.ShapeType.rect, { x: hx[j], y: rowY, w: cols[j], h: 0.38, fill: { color: bg }, line: { color: C.greyLt } });
const isp = cell === "0.686" || cell === "0.085" || cell === "0.867" || cell === "0.639";
s.addText(cell, { x: hx[j], y: rowY, w: cols[j], h: 0.38, fontSize: 10.5, color: isp ? C.green : C.dark, align: "center", valign: "middle", bold: isp });
});
});
s.addText("Groups were well-balanced after PSM — no statistically significant differences in baseline characteristics", {
x: 0.35, y: 4.75, w: 9.3, h: 0.35, fontSize: 10, italic: true, color: C.grey
});
}
// =============================================================================
// SLIDE 8 – PRIMARY OUTCOMES
// =============================================================================
{
const s = contentSlide("Primary Outcomes (Post-PSM, n=28 per group)", "Results");
// Big stat boxes
statBox(s, "Operative Time", "217 vs 182", "min (P = 0.049)", 0.32, 1.1, 2.8, 1.5, C.orange);
statBox(s, "Hospital Stay", "4.4 vs 8.7", "days (P < 0.001)", 3.6, 1.1, 2.8, 1.5, C.teal);
statBox(s, "30-day Mortality", "0% vs 3.6%", "laparoscopy vs laparotomy", 6.88, 1.1, 2.8, 1.5, C.green);
// callout bars
const barData = [
{ label: "Laparoscopy", val: 217, max: 260, color: C.orange },
{ label: "Laparotomy", val: 182, max: 260, color: C.greyLt },
];
const barData2 = [
{ label: "Laparoscopy", val: 4.4, max: 12, color: C.teal },
{ label: "Laparotomy", val: 8.7, max: 12, color: C.greyLt },
];
// operative time bars
s.addText("Operative Time (min)", { x: 0.32, y: 2.85, w: 2.8, h: 0.3, fontSize: 10.5, bold: true, color: C.navy, align: "center" });
barData.forEach((b, i) => {
const bw = (b.val / b.max) * 2.5;
s.addText(b.label, { x: 0.32, y: 3.2 + i * 0.52, w: 1.2, h: 0.38, fontSize: 9.5, color: C.dark, valign: "middle" });
s.addShape(pres.ShapeType.rect, { x: 1.55, y: 3.23 + i * 0.52, w: bw, h: 0.28, fill: { color: b.color }, line: { color: b.color } });
s.addText(b.val + "", { x: 1.6 + bw, y: 3.23 + i * 0.52, w: 0.45, h: 0.28, fontSize: 9.5, color: C.dark, valign: "middle" });
});
// hospital stay bars
s.addText("Hospital Stay (days)", { x: 3.6, y: 2.85, w: 2.8, h: 0.3, fontSize: 10.5, bold: true, color: C.navy, align: "center" });
barData2.forEach((b, i) => {
const bw = (b.val / b.max) * 2.5;
s.addText(b.label, { x: 3.6, y: 3.2 + i * 0.52, w: 1.2, h: 0.38, fontSize: 9.5, color: C.dark, valign: "middle" });
s.addShape(pres.ShapeType.rect, { x: 4.83, y: 3.23 + i * 0.52, w: bw, h: 0.28, fill: { color: b.color }, line: { color: b.color } });
s.addText(b.val + "", { x: 4.88 + bw, y: 3.23 + i * 0.52, w: 0.4, h: 0.28, fontSize: 9.5, color: C.dark, valign: "middle" });
});
// morbidity callout
s.addShape(pres.ShapeType.rect, { x: 6.88, y: 2.85, w: 2.8, h: 1.65, fill: { color: C.navy }, line: { color: C.navy }, rectRadius: 0.08 });
s.addText("30-day Morbidity", { x: 6.88, y: 2.9, w: 2.8, h: 0.32, fontSize: 10.5, bold: true, color: C.gold, align: "center" });
s.addText([
{ text: "Laparoscopy: ", options: { bold: true, color: C.tealLt } },
{ text: "10% (3/28)\n", options: { color: C.white } },
{ text: "Laparotomy: ", options: { bold: true, color: C.greyLt } },
{ text: "32% (9/28)", options: { color: C.white } },
], { x: 6.95, y: 3.28, w: 2.65, h: 0.75, fontSize: 11, valign: "middle" });
s.addText("SSI: 1 vs 6 | Reoperation: 0 vs 2", {
x: 6.88, y: 4.08, w: 2.8, h: 0.3, fontSize: 9.5, color: C.grey, align: "center"
});
s.addText("★ Significantly shorter hospital stay and lower morbidity with laparoscopy", {
x: 0.35, y: 4.88, w: 9.3, h: 0.35, fontSize: 10.5, bold: true, italic: true, color: C.teal
});
}
// =============================================================================
// SLIDE 9 – VAS PAIN SCORES
// =============================================================================
{
const s = contentSlide("Post-operative Pain (VAS Scores)", "Results");
s.addText("Visual Analogue Scale (0–10) recorded at POD 1, 3, 7 and 30", {
x: 0.35, y: 1.02, w: 9.3, h: 0.35, fontSize: 11, italic: true, color: C.grey
});
// Manual bar chart
const chartData = [
{ day: "POD 1", lap_open: 4.56, lap_lap: 3.63, p: "0.012" },
{ day: "POD 3", lap_open: 3.96, lap_lap: 2.39, p: "<0.001" },
{ day: "POD 7", lap_open: 2.54, lap_lap: 1.46, p: "<0.001" },
{ day: "POD 30",lap_open: 1.36, lap_lap: 1.07, p: "0.005" },
];
const maxVAS = 6;
const chartX = 0.5;
const chartBottom = 4.6;
const chartH = 2.8;
const barW = 0.55;
const groupW = 2.0;
// y-axis gridlines & labels
[0, 2, 4, 6].forEach(v => {
const yPos = chartBottom - (v / maxVAS) * chartH;
s.addShape(pres.ShapeType.rect, { x: chartX + 0.4, y: yPos, w: 8.5, h: 0.01, fill: { color: C.greyLt }, line: { color: C.greyLt } });
s.addText(v + "", { x: chartX, y: yPos - 0.15, w: 0.38, h: 0.3, fontSize: 9, color: C.grey, align: "right" });
});
s.addText("VAS Score", { x: 0.08, y: 2.8, w: 0.5, h: 1.0, fontSize: 9.5, color: C.grey, rotate: 270, align: "center" });
chartData.forEach((d, i) => {
const groupX = chartX + 0.6 + i * groupW;
const h1 = (d.lap_open / maxVAS) * chartH;
const h2 = (d.lap_lap / maxVAS) * chartH;
// laparotomy bar
s.addShape(pres.ShapeType.rect, { x: groupX, y: chartBottom - h1, w: barW, h: h1, fill: { color: C.greyLt }, line: { color: C.grey } });
s.addText(d.lap_open.toFixed(2), { x: groupX, y: chartBottom - h1 - 0.22, w: barW, h: 0.22, fontSize: 8.5, color: C.dark, align: "center" });
// laparoscopy bar
s.addShape(pres.ShapeType.rect, { x: groupX + barW + 0.12, y: chartBottom - h2, w: barW, h: h2, fill: { color: C.teal }, line: { color: C.teal } });
s.addText(d.lap_lap.toFixed(2), { x: groupX + barW + 0.12, y: chartBottom - h2 - 0.22, w: barW, h: 0.22, fontSize: 8.5, color: C.teal, align: "center", bold: true });
// P-value
s.addText("P=" + d.p, { x: groupX, y: chartBottom + 0.08, w: barW * 2 + 0.12, h: 0.28, fontSize: 9, color: C.red, align: "center", bold: true });
// day label
s.addText(d.day, { x: groupX, y: chartBottom + 0.36, w: barW * 2 + 0.12, h: 0.25, fontSize: 10.5, color: C.dark, align: "center", bold: true });
});
// Legend
s.addShape(pres.ShapeType.rect, { x: 6.5, y: 1.45, w: 0.28, h: 0.2, fill: { color: C.greyLt }, line: { color: C.grey } });
s.addText("Laparotomy", { x: 6.85, y: 1.45, w: 1.8, h: 0.2, fontSize: 10, color: C.dark });
s.addShape(pres.ShapeType.rect, { x: 6.5, y: 1.72, w: 0.28, h: 0.2, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("Laparoscopy", { x: 6.85, y: 1.72, w: 1.8, h: 0.2, fontSize: 10, color: C.teal, bold: true });
s.addText("Laparoscopy had significantly lower pain at ALL time points (all P < 0.05)", {
x: 0.35, y: 5.22, w: 9.3, h: 0.3, fontSize: 10.5, bold: true, italic: true, color: C.teal
});
}
// =============================================================================
// SLIDE 10 – CONVERSION & OPERATIVE DETAILS
// =============================================================================
{
const s = contentSlide("Conversion to Laparotomy & Surgical Technique", "Results");
// conversion stats
s.addShape(pres.ShapeType.rect, { x: 0.32, y: 1.1, w: 4.3, h: 2.4, fill: { color: C.navy }, line: { color: C.navy }, rectRadius: 0.1 });
s.addText("Conversion Rate", { x: 0.32, y: 1.12, w: 4.3, h: 0.4, fontSize: 12.5, bold: true, color: C.gold, align: "center" });
s.addText("34 / 64 = 53.1%", { x: 0.32, y: 1.55, w: 4.3, h: 0.55, fontSize: 22, bold: true, color: C.white, align: "center" });
s.addText("of patients planned for laparoscopy\nrequired conversion to open", {
x: 0.32, y: 2.1, w: 4.3, h: 0.5, fontSize: 10.5, color: C.grey, align: "center"
});
// reasons
const reasons = [
["Poor visibility (purulent contamination)", "15 (44%)"],
["Dense adhesions", "11 (32%)"],
["Inadequate peritoneal lavage", " 8 (24%)"],
];
reasons.forEach(([r, n], i) => {
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 2.68 + i * 0.5, w: 4.1, h: 0.4, fill: { color: C.dark }, line: { color: C.dark }, rectRadius: 0.05 });
s.addText(r, { x: 0.5, y: 2.68 + i * 0.5, w: 3.0, h: 0.4, fontSize: 10, color: C.white, valign: "middle" });
s.addText(n, { x: 3.55, y: 2.68 + i * 0.5, w: 0.9, h: 0.4, fontSize: 10, color: C.gold, valign: "middle", bold: true, align: "right" });
});
// technique bullets
s.addShape(pres.ShapeType.rect, { x: 4.85, y: 1.1, w: 4.8, h: 1.1, fill: { color: C.offWhite }, line: { color: C.teal, pt: 1.5 }, rectRadius: 0.1 });
s.addText("Laparoscopic Technique", { x: 4.95, y: 1.12, w: 4.6, h: 0.3, fontSize: 11, bold: true, color: C.teal });
const laptech = ["Modified lithotomy position | Open Hasson technique", "10mm supraumbilical camera port + two 5mm working ports", "Thorough lavage/suction → bowel walk → site identification", "Intracorporeal repair: 2-0 absorbable sutures ± Graham's patch", "Laparoscopic appendectomy for appendicular perforation"];
s.addText(laptech.map(t => ({ text: t, options: { bullet: { code: "25B8" }, breakLine: true, paraSpaceAfter: 3 } })),
{ x: 5.0, y: 1.45, w: 4.55, h: 0.68, fontSize: 9.5, color: C.dark });
s.addShape(pres.ShapeType.rect, { x: 4.85, y: 2.3, w: 4.8, h: 1.1, fill: { color: C.offWhite }, line: { color: C.grey, pt: 1.5 }, rectRadius: 0.1 });
s.addText("Open Technique", { x: 4.95, y: 2.32, w: 4.6, h: 0.3, fontSize: 11, bold: true, color: C.navy });
const opentech = ["Midline laparotomy under GA", "Suction of contaminated peritoneal fluid", "Site repair ± omental (Graham's) patch ± stoma", "Thorough peritoneal lavage + drain placement", "Abdominal closure in layers"];
s.addText(opentech.map(t => ({ text: t, options: { bullet: { code: "25B8" }, breakLine: true, paraSpaceAfter: 3 } })),
{ x: 5.0, y: 2.65, w: 4.55, h: 0.68, fontSize: 9.5, color: C.dark });
s.addShape(pres.ShapeType.rect, { x: 4.85, y: 3.55, w: 4.8, h: 0.82, fill: { color: C.greyLt }, line: { color: C.grey }, rectRadius: 0.08 });
s.addText("📌 Comparator: Agresta et al. 2006 reported only 23.2% conversion rate — our higher rate likely reflects delayed patient presentation and greater intra-abdominal contamination", {
x: 4.95, y: 3.6, w: 4.6, h: 0.72, fontSize: 9.5, color: C.navy, valign: "middle"
});
}
// =============================================================================
// SLIDE 11 – DISCUSSION
// =============================================================================
{
const s = contentSlide("Discussion", "Critical Appraisal");
const points = [
{
icon: "⏱", color: C.orange,
title: "Longer operative time in laparoscopy",
body: "217 vs 182 min (P=0.049) — attributable to learning curve for intracorporeal suturing in emergency setting. Surgeons with advanced skills may close this gap."
},
{
icon: "🏥", color: C.teal,
title: "Shorter hospital stay: major clinical advantage",
body: "4.4 vs 8.7 days — significant implication for resource-limited settings; improved bed turnover and cost savings."
},
{
icon: "🩹", color: C.green,
title: "Reduced wound complications",
body: "SSI 3.6% vs 21.4%. Smaller incisions with laparoscopy substantially reduce wound morbidity."
},
{
icon: "🔄", color: C.red,
title: "High conversion rate (53%) — key limitation",
body: "Delayed presentation → widespread contamination, adhesions. Careful patient selection is paramount."
},
{
icon: "📊", color: C.navy,
title: "PSM reduces confounding — but study is not randomised",
body: "PSM balanced age, sex, duration of symptoms, comorbidities. However residual unmeasured confounders cannot be excluded."
},
];
points.forEach((p, i) => {
const y = 1.1 + i * 0.83;
s.addShape(pres.ShapeType.rect, { x: 0.32, y: y + 0.04, w: 0.5, h: 0.5, fill: { color: p.color }, line: { color: p.color }, rectRadius: 0.05 });
s.addText(p.icon, { x: 0.32, y: y + 0.04, w: 0.5, h: 0.5, fontSize: 14, align: "center", valign: "middle" });
s.addText(p.title, { x: 0.95, y: y + 0.04, w: 8.7, h: 0.26, fontSize: 11.5, bold: true, color: p.color });
s.addText(p.body, { x: 0.95, y: y + 0.3, w: 8.7, h: 0.4, fontSize: 10.5, color: C.dark });
});
}
// =============================================================================
// SLIDE 12 – STRENGTHS & LIMITATIONS
// =============================================================================
{
const s = contentSlide("Strengths & Limitations", "Critical Appraisal");
// Strengths
s.addShape(pres.ShapeType.rect, { x: 0.32, y: 1.1, w: 4.35, h: 3.5, fill: { color: C.offWhite }, line: { color: C.green, pt: 2 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.rect, { x: 0.32, y: 1.1, w: 4.35, h: 0.42, fill: { color: C.green }, line: { color: C.green }, rectRadius: 0.1 });
s.addText("✔ Strengths", { x: 0.32, y: 1.1, w: 4.35, h: 0.42, fontSize: 12.5, bold: true, color: C.white, valign: "middle", margin: 8 });
const str = [
"Prospective study design — reduces recall bias",
"Propensity score matching — controls for major confounders",
"Objective outcome measures (VAS, LOS, operative time)",
"All procedures performed by consultant-level laparoscopic surgeons",
"Consecutive recruitment from a high-volume tertiary centre",
"Comprehensive follow-up to 30 days",
];
s.addText(str.map(t => ({ text: t, options: { bullet: { code: "2714" }, breakLine: true, paraSpaceAfter: 7 } })),
{ x: 0.45, y: 1.6, w: 4.1, h: 2.9, fontSize: 11, color: C.dark, valign: "top" });
// Limitations
s.addShape(pres.ShapeType.rect, { x: 5.18, y: 1.1, w: 4.5, h: 3.5, fill: { color: C.offWhite }, line: { color: C.red, pt: 2 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.rect, { x: 5.18, y: 1.1, w: 4.5, h: 0.42, fill: { color: C.red }, line: { color: C.red }, rectRadius: 0.1 });
s.addText("✗ Limitations", { x: 5.18, y: 1.1, w: 4.5, h: 0.42, fontSize: 12.5, bold: true, color: C.white, valign: "middle", margin: 8 });
const lim = [
"Non-randomised — selection bias likely in choosing laparoscopy over open approach",
"Small sample size (n=56 after PSM) — underpowered for mortality analysis",
"Single-centre study at a tertiary institution — limited generalisability",
"Pain management not standardised (analgesia ladder, not fixed protocol)",
"High conversion rate (53%) may reflect local expertise rather than global applicability",
"No long-term outcomes beyond 30 days",
];
s.addText(lim.map(t => ({ text: t, options: { bullet: { code: "2718" }, breakLine: true, paraSpaceAfter: 7 } })),
{ x: 5.3, y: 1.6, w: 4.25, h: 2.9, fontSize: 11, color: C.dark, valign: "top" });
}
// =============================================================================
// SLIDE 13 – TAKE-HOME MESSAGE / CONCLUSION
// =============================================================================
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.08, h: 5.625, fill: { color: C.tealLt }, line: { color: C.tealLt } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0.9, w: 10, h: 0.04, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("Conclusion & Take-Home Message", {
x: 0.25, y: 0.1, w: 9.5, h: 0.75, fontSize: 18, bold: true, color: C.gold, valign: "middle"
});
const msgs = [
{ icon: "✅", text: "Laparoscopy IS feasible in selected, haemodynamically stable patients with perforation peritonitis" },
{ icon: "📉", text: "Significant advantages: shorter hospital stay (4.4 vs 8.7 days), less pain, fewer SSIs, lower 30-day morbidity (10% vs 32%)" },
{ icon: "⏱", text: "Trade-off: longer operative time (217 vs 182 min) — acceptable with experienced teams" },
{ icon: "⚠️", text: "High conversion rate (53%) — patient selection is critical; delayed presentations should favour open approach" },
{ icon: "🎓", text: "Surgical training in emergency laparoscopy is essential; learning curve impacts outcomes" },
{ icon: "🔬", text: "Future work: larger multicentre RCTs, standardised analgesia protocols, longer-term follow-up" },
];
msgs.forEach((m, i) => {
const y = 1.08 + i * 0.72;
s.addShape(pres.ShapeType.rect, { x: 0.35, y: y, w: 9.3, h: 0.6, fill: { color: C.dark }, line: { color: C.dark }, rectRadius: 0.07 });
s.addText(m.icon, { x: 0.45, y: y, w: 0.45, h: 0.6, fontSize: 14, align: "center", valign: "middle" });
s.addText(m.text, { x: 0.98, y: y, w: 8.55, h: 0.6, fontSize: 11.5, color: C.white, valign: "middle" });
});
s.addText("Soni S et al. J Min Access Surg 2026;22(2):180–186 | DOI: 10.4103/jmas.jmas_135_25", {
x: 0.35, y: 5.25, w: 9.3, h: 0.28, fontSize: 9, color: C.grey, align: "center"
});
}
// =============================================================================
// SLIDE 14 – REFERENCES
// =============================================================================
{
const s = contentSlide("References", "Appendix");
const refs = [
"1. Soni S, Parihar YK, Chaudhary R, et al. Feasibility and outcomes of laparoscopic management in perforation peritonitis: a prospective cohort study with propensity score matching. J Min Access Surg 2026;22(2):180-186.",
"2. Mouret P, François Y, Vignal J, et al. Laparoscopic treatment of perforated peptic ulcer. Br J Surg 1990;77:1006.",
"3. Agresta F, Ciardo LF, Mazzarolo G, et al. Peritonitis: laparoscopic approach. World J Emerg Surg 2006;1:9.",
"4. Ge B, Wu M, Chen Q, et al. A prospective randomized controlled trial of laparoscopic repair versus open repair for perforated peptic ulcers. Surgery 2016;159:451–8.",
"5. Tan S, Wu G, Zhuang Q, et al. Laparoscopic versus open repair for perforated peptic ulcer: a meta-analysis of randomized controlled trials. Int J Surg 2016;33:124–32.",
"6. Vakayil V, Bauman B, Joppru K, et al. Surgical repair of perforated peptic ulcers: laparoscopic versus open approach. Surg Endosc 2019;33:281–92.",
"7. Sermonesi G, Tian BW, Vallicelli C, et al. Cesena guidelines: WSES consensus statement on laparoscopic-first approach to general surgery emergencies. World J Emerg Surg 2023;18:57.",
];
s.addText(refs.map(r => ({ text: r, options: { breakLine: true, paraSpaceAfter: 10 } })),
{ x: 0.35, y: 1.1, w: 9.3, h: 4.15, fontSize: 9.5, color: C.dark, valign: "top" });
}
// =============================================================================
// WRITE
// =============================================================================
const outPath = "/home/daytona/workspace/jc-presentation/JR1_JC_Laparoscopy_Perforation_Peritonitis.pptx";
pres.writeFile({ fileName: outPath }).then(() => {
console.log("✅ Saved: " + outPath);
}).catch(err => {
console.error("❌ Error:", err);
});
cd /home/daytona/workspace/jc-presentation && node create_pptx.js
JR1 JC Laparoscopy Perforation Peritonitis
Presentation · PPTX
| # | Slide |
|---|---|
| 1 | Title slide — paper citation, journal, presenter info |
| 2 | Outline — numbered overview of all sections |
| 3 | Background — why perforation peritonitis is a challenge, limitations of open surgery |
| 4 | Clinical Question / PICO — clear research question framed in PICO format |
| 5 | Study Design — setting, design, period, patient flow diagram (140 → 64 planned lap → 30 completed + 34 converted) |
| 6 | Inclusion & Exclusion Criteria — side-by-side green/red panels |
| 7 | Baseline Characteristics — formatted table showing PSM-matched groups |
| 8 | Primary Outcomes — stat boxes + bar charts for operative time, hospital stay, morbidity |
| 9 | VAS Pain Scores — grouped bar chart for POD 1, 3, 7, 30 with P-values |
| 10 | Conversion & Surgical Technique — reasons for conversion, both operative techniques |
| 11 | Discussion — 5 key discussion points with icons |
| 12 | Strengths & Limitations — side-by-side panels |
| 13 | Conclusion / Take-home Messages — dark closing slide with 6 key messages |
| 14 | References — full citation list |
Sermonesi G, Tian BW, Vallicelli C, Abu‑Zidan FM, Damaskos D, Kelly MD, et al. Cesena guidelines: WSES consensus statement on laparoscopic‑first approach to general surgery emergencies and abdominal trauma. World J Emerg Surg 2023;18:57. Add this study to the PPT
Cesena guidelines WSES laparoscopic general surgery emergencies
PMID: 38066631
~/jc-presentation/create_pptx.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/jc-presentation/create_pptx.js'
// SLIDE 12 – STRENGTHS & LIMITATIONS comment block, right before that section):~/jc-presentation/create_pptx.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/jc-presentation/create_pptx.js'
~/jc-presentation/create_pptx.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/jc-presentation/create_pptx.js'
cd /home/daytona/workspace/jc-presentation && node create_pptx.js
JR1 JC Laparoscopy Perforation Peritonitis
Presentation · PPTX
Make a power point presentation for jc as JR1 from the article
Prophylactic ureteral stent placement general surgeons
PMID: 40554228
Prophylactic ureteral stent placement general surgeons Tamashiro American Journal of Surgery 2025 methods results
https://www.em-consulte.com/article/1773410/prophylactic-ure…
mkdir -p /tmp/workspace/jc-ureteral-stent && ls -la /tmp/workspace/
~/jc-ureteral-stent/create_pptx.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Prophylactic Ureteral Stent Placement by General Surgeons - JR1 Journal Club";
// ─── THEME ───────────────────────────────────────────────────────────────────
const C = {
navy: "0B1F3A",
burg: "7A1F3D",
burgLt: "B5375F",
gold: "D9A441",
white: "FFFFFF",
offWhite:"F5F3F1",
grey: "8C93A0",
greyLt: "DADFE5",
dark: "16202B",
red: "C0392B",
green: "1E7A4C",
teal: "1B6E7A",
orange: "C7671B",
};
function addRule(slide, y) {
slide.addShape(pres.ShapeType.rect, { x: 0.5, y, w: 9, h: 0.03, fill: { color: C.burgLt }, line: { color: C.burgLt } });
}
function addBadge(slide, label, x, y, w) {
slide.addShape(pres.ShapeType.rect, { x, y, w: w || 2.2, h: 0.32, fill: { color: C.burg }, line: { color: C.burg }, rectRadius: 0.05 });
slide.addText(label, { x, y, w: w || 2.2, h: 0.32, fontSize: 9, bold: true, color: C.white, align: "center", valign: "middle" });
}
function statBox(slide, label, value, unit, x, y, w, h, accent) {
slide.addShape(pres.ShapeType.rect, { x, y, w, h, fill: { color: C.offWhite }, line: { color: accent || C.burg, pt: 2 }, rectRadius: 0.08 });
slide.addText(value, { x, y: y + 0.08, w, h: h * 0.5, fontSize: 24, bold: true, color: accent || C.burg, align: "center", valign: "middle" });
slide.addText(unit, { x, y: y + h * 0.5, w, h: h * 0.22, fontSize: 9, color: C.grey, align: "center", valign: "top" });
slide.addText(label, { x, y: y + h * 0.72, w, h: h * 0.28, fontSize: 9.5, bold: true, color: C.navy, align: "center", valign: "middle" });
}
function contentSlide(title, badge) {
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.06, h: 5.625, fill: { color: C.burg }, line: { color: C.burg } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.95, fill: { color: C.navy }, line: { color: C.navy } });
s.addText(title, { x: 0.25, y: 0, w: 9.5, h: 0.95, fontSize: 20, bold: true, color: C.white, valign: "middle", margin: 8 });
s.addShape(pres.ShapeType.rect, { x: 0.06, y: 0.95, w: 9.94, h: 4.675, fill: { color: C.offWhite }, line: { color: C.offWhite } });
if (badge) addBadge(s, badge, 7.5, 0.65, 2.3);
return s;
}
// =============================================================================
// SLIDE 1 – TITLE
// =============================================================================
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 3.6, w: 10, h: 0.08, fill: { color: C.burgLt }, line: { color: C.burgLt } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("JR1 Journal Club", { x: 0.6, y: 0.25, w: 8.8, h: 0.45, fontSize: 13, bold: true, color: C.gold, charSpacing: 3 });
s.addText("Prophylactic Ureteral Stent Placement by General Surgeons is Safe and Feasible", {
x: 0.6, y: 0.78, w: 8.8, h: 1.6, fontSize: 25, bold: true, color: C.white, valign: "middle", align: "left"
});
s.addText("Implementation of a Training and Credentialing Program for Non-Urologic Surgeons", {
x: 0.6, y: 2.4, w: 8.8, h: 0.5, fontSize: 13.5, italic: true, color: C.burgLt
});
addRule(s, 3.05);
s.addText("Tamashiro KK, Wilkins CJ, Maron A, et al. | The American Journal of Surgery 2025;250:116474", {
x: 0.6, y: 3.2, w: 8.8, h: 0.38, fontSize: 10.5, color: C.greyLt
});
s.addText("UCSF Fresno | Retrospective Review | July 2017 – July 2024 | SWSC 2025 Special Issue", {
x: 0.6, y: 3.57, w: 8.8, h: 0.32, fontSize: 10.5, color: C.grey
});
s.addText("Presented by: JR1 | Date: " + new Date().toLocaleDateString("en-GB", { day:"2-digit", month:"short", year:"numeric" }), {
x: 0.6, y: 4.9, w: 8.8, h: 0.38, fontSize: 10.5, color: C.grey, italic: true
});
}
// =============================================================================
// SLIDE 2 – OUTLINE
// =============================================================================
{
const s = contentSlide("Presentation Outline", "Overview");
const items = [
["01", "Background & Rationale", "Ureteral injury risk, prophylactic stenting, ICG use"],
["02", "Study Objective & Design", "Retrospective review, training/credentialing program"],
["03", "Methods & Cohort", "Inclusion, variables recorded, statistical analysis"],
["04", "Key Results", "Complication rate, cannulation success, subgroup analysis"],
["05", "Discussion & Appraisal", "Comparison to urologist outcomes, strengths, limitations"],
["06", "Conclusion & Take-Home", "Clinical implications for non-urologic surgeons"],
];
items.forEach(([num, title, sub], i) => {
const y = 1.08 + i * 0.72;
s.addShape(pres.ShapeType.rect, { x: 0.35, y, w: 0.5, h: 0.5, fill: { color: C.burg }, line: { color: C.burg }, rectRadius: 0.05 });
s.addText(num, { x: 0.35, y, w: 0.5, h: 0.5, fontSize: 12.5, bold: true, color: C.white, align: "center", valign: "middle" });
s.addText(title, { x: 1.02, y: y + 0.01, w: 8.5, h: 0.28, fontSize: 13, bold: true, color: C.navy });
s.addText(sub, { x: 1.02, y: y + 0.27, w: 8.5, h: 0.22, fontSize: 10, color: C.grey });
});
}
// =============================================================================
// SLIDE 3 – BACKGROUND
// =============================================================================
{
const s = contentSlide("Background", "Introduction");
s.addText("Why Ureteral Identification Matters", { x: 0.35, y: 1.02, w: 9.3, h: 0.35, fontSize: 15, bold: true, color: C.navy });
const pts = [
"Ureteral injury is a rare but feared complication of pelvic surgery (colorectal, gynecologic) — incidence 0.2–10%",
"Associated with significant short- and long-term morbidity",
"Strategies to mitigate injury: prophylactic ureteral stenting + intraureteral indocyanine green (ICG) injection",
"Aids intraoperative ureter identification and immediate injury recognition/repair",
"Traditionally performed via rigid cystoscopy by a urologist prior to abdominal incision",
];
s.addText(pts.map(p => ({ text: p, options: { bullet: { code: "2022" }, breakLine: true, paraSpaceAfter: 7 } })),
{ x: 0.5, y: 1.45, w: 5.7, h: 2.9, fontSize: 11.5, color: C.dark, valign: "top" });
s.addShape(pres.ShapeType.rect, { x: 6.45, y: 1.05, w: 3.2, h: 3.25, fill: { color: C.navy }, line: { color: C.burg, pt: 2 }, rectRadius: 0.1 });
s.addText("The Care Gap", { x: 6.55, y: 1.1, w: 3.0, h: 0.4, fontSize: 12.5, bold: true, color: C.gold, align: "center" });
const gaps = ["Urology coverage not\nalways available", "Requires coordination\nbetween 2 teams", "Can delay or reschedule\ncases", "OR scheduling\ninefficiency"];
gaps.forEach((item, i) => {
s.addShape(pres.ShapeType.rect, { x: 6.6, y: 1.62 + i * 0.65, w: 3.0, h: 0.58, fill: { color: C.dark }, line: { color: C.dark }, rectRadius: 0.05 });
s.addText("⚠ " + item, { x: 6.65, y: 1.62 + i * 0.65, w: 2.9, h: 0.58, fontSize: 9.5, color: C.white, valign: "middle" });
});
s.addText("Solution: Train non-urologic surgeons (general surgery, colorectal, OB/GYN) to independently perform cystoscopy and prophylactic stent/ICG placement", {
x: 0.35, y: 4.4, w: 9.3, h: 0.55, fontSize: 11, italic: true, bold: true, color: C.teal
});
}
// =============================================================================
// SLIDE 4 – OBJECTIVE / PICO
// =============================================================================
{
const s = contentSlide("Study Objective", "PICO");
s.addShape(pres.ShapeType.rect, { x: 0.35, y: 1.1, w: 9.3, h: 1.4, fill: { color: C.navy }, line: { color: C.burgLt, pt: 2 }, rectRadius: 0.1 });
s.addText("Research Question", { x: 0.5, y: 1.15, w: 9.0, h: 0.35, fontSize: 12, bold: true, color: C.gold });
s.addText("Can non-urologic surgeons safely and feasibly perform cystoscopy with prophylactic ureteral stent placement and/or ICG injection, after completing a structured training and credentialing program?",
{ x: 0.5, y: 1.48, w: 9.0, h: 0.9, fontSize: 13, color: C.white, italic: true, valign: "middle" });
const pico = [
["P", "Population", "Adults ≥18 yrs undergoing cystoscopy + prophylactic ureteral stent/ICG placement by the primary operating surgeon"],
["I", "Intervention", "Cystoscopy & stent/ICG placement performed by trained, credentialed non-urologic surgeons"],
["C", "Comparator", "Historical/literature benchmark of urologist-performed stenting (complication rate 2.37–12%)"],
["O", "Outcomes", "Successful ureteral cannulation rate, overall complication rate, specific complications by subgroup"],
];
pico.forEach(([letter, label, desc], i) => {
const y = 2.75 + i * 0.55;
s.addShape(pres.ShapeType.rect, { x: 0.35, y, w: 0.38, h: 0.38, fill: { color: C.burg }, line: { color: C.burg }, rectRadius: 0.05 });
s.addText(letter, { x: 0.35, y, w: 0.38, h: 0.38, fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle" });
s.addText(label + ":", { x: 0.82, y: y + 0.03, w: 1.5, h: 0.32, fontSize: 11, bold: true, color: C.navy });
s.addText(desc, { x: 2.4, y: y + 0.03, w: 7.2, h: 0.45, fontSize: 10.3, color: C.dark });
});
}
// =============================================================================
// SLIDE 5 – METHODS
// =============================================================================
{
const s = contentSlide("Methods", "Study Design");
const boxes = [
{ x: 0.3, label: "Design", val: "Retrospective\nchart review" },
{ x: 2.85, label: "Setting", val: "UCSF Fresno /\nCommunity Medical Centers" },
{ x: 5.4, label: "Period", val: "July 2017 –\nJuly 2024 (7 yrs)" },
{ x: 7.95, label: "Approval", val: "IRB approved\n(retrospective)" },
];
boxes.forEach(b => {
s.addShape(pres.ShapeType.rect, { x: b.x, y: 1.1, w: 2.3, h: 1.15, fill: { color: C.navy }, line: { color: C.burg, pt: 2 }, rectRadius: 0.1 });
s.addText(b.label, { x: b.x, y: 1.12, w: 2.3, h: 0.34, fontSize: 10, bold: true, color: C.gold, align: "center" });
s.addText(b.val, { x: b.x, y: 1.46, w: 2.3, h: 0.75, fontSize: 11, color: C.white, align: "center", valign: "middle" });
});
s.addText("Population & Inclusion", { x: 0.35, y: 2.42, w: 9.3, h: 0.32, fontSize: 13, bold: true, color: C.navy });
addRule(s, 2.72);
s.addText("Adults (≥18 years) who underwent cystoscopy with prophylactic ureteral stent placement and/or ureteral cannulation with ICG injection, performed by the primary operating surgeon (general surgery, colorectal surgery, or OB/GYN) after completing an institutional training and credentialing program.", {
x: 0.35, y: 2.82, w: 9.3, h: 0.75, fontSize: 11, color: C.dark
});
s.addText("Variables Recorded", { x: 0.35, y: 3.62, w: 9.3, h: 0.3, fontSize: 13, bold: true, color: C.navy });
const vars = ["Patient demographics & indication for surgery", "Surgical service performing procedure", "Surgical approach: open vs. robotic vs. laparoscopic", "Laterality: unilateral vs. bilateral stent placement", "Indwelling duration: kept for procedure vs. removed after ICG", "Intra-/post-operative complications"];
const half = 3;
for (let i = 0; i < vars.length; i++) {
const col = i < half ? 0 : 1;
const row = i % half;
s.addText("▸ " + vars[i], { x: 0.45 + col * 4.7, y: 3.95 + row * 0.32, w: 4.5, h: 0.3, fontSize: 10, color: C.dark });
}
s.addText("Statistics: regression analysis; significance at p<0.05; IBM SPSS v29", {
x: 0.35, y: 5.0, w: 9.3, h: 0.3, fontSize: 9.5, italic: true, color: C.grey
});
}
// =============================================================================
// SLIDE 6 – COHORT FLOW
// =============================================================================
{
const s = contentSlide("Study Cohort", "Methods");
const flowY = 1.4;
const flowBoxes = [
{ x: 0.5, label: "834 cases of prophylactic\nureteral cannulation with ICG\ninjection during study period", color: C.burg },
{ x: 3.75, label: "748 cases included\nafter exclusions", color: C.navy },
];
flowBoxes.forEach((b, i) => {
s.addShape(pres.ShapeType.rect, { x: b.x, y: flowY, w: 3.0, h: 1.05, fill: { color: b.color }, line: { color: b.color }, rectRadius: 0.08 });
s.addText(b.label, { x: b.x, y: flowY, w: 3.0, h: 1.05, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle" });
if (i < 1) s.addText("▶", { x: b.x + 3.05, y: flowY + 0.32, w: 0.45, h: 0.4, fontSize: 16, color: C.burgLt, align: "center" });
});
statBox(s, "Mean Age", "54.6 ± 15.7", "years", 7.05, flowY, 2.2, 1.05, C.teal);
s.addText("Baseline Cohort Characteristics", { x: 0.35, y: 2.7, w: 9.3, h: 0.32, fontSize: 13, bold: true, color: C.navy });
addRule(s, 3.0);
const stats = [
["748", "Cases Included", C.burg],
["97.7%", "Female patients (majority)*", C.teal],
["4", "Primary services performing procedure", C.navy],
["7 yrs", "Study duration (2017–2024)", C.gold],
];
stats.forEach((st, i) => {
const x = 0.35 + i * 2.35;
statBox(s, st[1], st[0], "", x, 3.15, 2.15, 1.35, st[2]);
});
s.addText("*Majority female reflecting predominance of gynecologic/pelvic indications (exact female count partially obscured in source scan)", {
x: 0.35, y: 4.62, w: 9.3, h: 0.55, fontSize: 8.8, italic: true, color: C.grey
});
}
// =============================================================================
// SLIDE 7 – PRIMARY RESULTS
// =============================================================================
{
const s = contentSlide("Primary Outcomes", "Results");
statBox(s, "Successful Ureteral\nCannulation Rate", "97.7%", "", 0.32, 1.1, 3.0, 1.5, C.green);
statBox(s, "Overall Complication\nRate", "9.4%", "", 3.5, 1.1, 3.0, 1.5, C.orange);
statBox(s, "Ureteral Injury\nRate", "0.5%", "", 6.68, 1.1, 3.0, 1.5, C.red);
s.addText("Complication Breakdown (n = 748)", { x: 0.35, y: 2.85, w: 9.3, h: 0.32, fontSize: 12.5, bold: true, color: C.navy });
const complications = [
{ label: "AKI", val: 4.4, color: C.orange },
{ label: "Urinary retention", val: 3.3, color: C.teal },
{ label: "UTI", val: 2.7, color: C.gold },
{ label: "Hematuria ≥3 days", val: 0.9, color: C.burg },
{ label: "Ureteral injury", val: 0.5, color: C.red },
{ label: "Urethral injury", val: 0.4, color: C.navy },
];
const maxVal = 5;
const barX = 2.0;
const barMaxW = 6.7;
complications.forEach((c, i) => {
const y = 3.28 + i * 0.3;
const bw = (c.val / maxVal) * barMaxW;
s.addText(c.label, { x: 0.35, y, w: 1.6, h: 0.28, fontSize: 9.5, color: C.dark, valign: "middle" });
s.addShape(pres.ShapeType.rect, { x: barX, y: y + 0.02, w: bw, h: 0.22, fill: { color: c.color }, line: { color: c.color } });
s.addText(c.val + "%", { x: barX + bw + 0.08, y, w: 0.6, h: 0.28, fontSize: 9.5, bold: true, color: c.color, valign: "middle" });
});
s.addText("Complication rates comparable to published urologist-performed benchmarks (2.37–12%)", {
x: 0.35, y: 5.15, w: 9.3, h: 0.3, fontSize: 10, bold: true, italic: true, color: C.teal
});
}
// =============================================================================
// SLIDE 8 – SUBGROUP ANALYSIS
// =============================================================================
{
const s = contentSlide("Subgroup Analysis: No Significant Differences", "Results");
s.addText("Complication rates were statistically similar regardless of who performed the procedure or how it was performed", {
x: 0.35, y: 1.0, w: 9.3, h: 0.35, fontSize: 11, italic: true, color: C.grey
});
const hx = [0.32, 5.2];
const cols = [4.85, 4.0];
const headers = ["Comparison Factor", "P-value"];
headers.forEach((h, i) => {
s.addShape(pres.ShapeType.rect, { x: hx[i], y: 1.45, w: cols[i], h: 0.4, fill: { color: C.navy }, line: { color: C.navy } });
s.addText(h, { x: hx[i], y: 1.45, w: cols[i], h: 0.4, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle" });
});
const rows = [
["Surgical service (Gen Surg / Colorectal / OB-GYN)", "0.193"],
["Surgical approach (open vs. robotic vs. laparoscopic)", "0.648"],
["Unilateral indwelling stent", "0.768"],
["Bilateral indwelling stents", "0.801"],
["ICG injection alone (no indwelling stent)", "0.596"],
];
rows.forEach((row, i) => {
const rowY = 1.9 + i * 0.55;
const bg = i % 2 === 0 ? C.white : C.offWhite;
row.forEach((cell, j) => {
s.addShape(pres.ShapeType.rect, { x: hx[j], y: rowY, w: cols[j], h: 0.5, fill: { color: bg }, line: { color: C.greyLt } });
s.addText(cell, { x: hx[j], y: rowY, w: cols[j], h: 0.5, fontSize: 11, color: j === 1 ? C.green : C.dark, align: j === 1 ? "center" : "left", valign: "middle", bold: j === 1, margin: j===0?8:0 });
});
});
s.addShape(pres.ShapeType.rect, { x: 0.32, y: 4.7, w: 9.3, h: 0.5, fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.06 });
s.addText("All P-values > 0.05 → complication risk was NOT significantly influenced by service, approach, or stenting strategy", {
x: 0.4, y: 4.7, w: 9.1, h: 0.5, fontSize: 10.5, bold: true, color: C.white, valign: "middle", align: "center"
});
}
// =============================================================================
// SLIDE 9 – DISCUSSION
// =============================================================================
{
const s = contentSlide("Discussion", "Critical Appraisal");
const points = [
{ icon: "🎯", color: C.green, title: "Comparable to urologist-performed benchmarks", body: "9.4% overall complication rate falls within/near the published urologist range of 2.37–12% — supports non-inferiority of trained non-urologic surgeons." },
{ icon: "✅", color: C.teal, title: "High procedural success", body: "97.7% successful ureteral cannulation rate demonstrates that the training/credentialing model translates into reliable technical competence." },
{ icon: "🗓️", color: C.gold, title: "Solves a real operational problem", body: "Removes dependency on urology coverage — improves OR scheduling efficiency and reduces case delays at community/resource-limited centres." },
{ icon: "🔬", color: C.navy, title: "Low ureteral/urethral injury rates", body: "Ureteral injury 0.5%, urethral injury 0.4% — reassuring safety signal despite non-urologic proceduralists." },
{ icon: "⚖️", color: C.red, title: "No difference across approach or laterality", body: "Findings held regardless of open/robotic/laparoscopic approach or unilateral/bilateral stenting — broadly generalisable within this cohort." },
];
points.forEach((p, i) => {
const y = 1.08 + i * 0.8;
s.addShape(pres.ShapeType.rect, { x: 0.32, y: y + 0.03, w: 0.48, h: 0.48, fill: { color: p.color }, line: { color: p.color }, rectRadius: 0.05 });
s.addText(p.icon, { x: 0.32, y: y + 0.03, w: 0.48, h: 0.48, fontSize: 13, align: "center", valign: "middle" });
s.addText(p.title, { x: 0.92, y: y + 0.02, w: 8.75, h: 0.26, fontSize: 11.5, bold: true, color: p.color });
s.addText(p.body, { x: 0.92, y: y + 0.28, w: 8.75, h: 0.42, fontSize: 10, color: C.dark });
});
}
// =============================================================================
// SLIDE 10 – STRENGTHS & LIMITATIONS
// =============================================================================
{
const s = contentSlide("Strengths & Limitations", "Critical Appraisal");
s.addShape(pres.ShapeType.rect, { x: 0.32, y: 1.1, w: 4.35, h: 3.5, fill: { color: C.offWhite }, line: { color: C.green, pt: 2 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.rect, { x: 0.32, y: 1.1, w: 4.35, h: 0.42, fill: { color: C.green }, line: { color: C.green }, rectRadius: 0.1 });
s.addText("✔ Strengths", { x: 0.32, y: 1.1, w: 4.35, h: 0.42, fontSize: 12.5, bold: true, color: C.white, valign: "middle", margin: 8 });
const str = [
"Large cohort (748 cases) over a 7-year period",
"Structured, credentialed training program — reproducible model",
"Multiple surgical services included (general surgery, colorectal, OB/GYN)",
"Assessed multiple relevant subgroups (approach, laterality, ICG-only)",
"Addresses a genuine real-world resource/access problem",
"Statistically rigorous regression analysis (SPSS v29)",
];
s.addText(str.map(t => ({ text: t, options: { bullet: { code: "2714" }, breakLine: true, paraSpaceAfter: 7 } })),
{ x: 0.45, y: 1.6, w: 4.1, h: 2.9, fontSize: 10.5, color: C.dark, valign: "top" });
s.addShape(pres.ShapeType.rect, { x: 5.18, y: 1.1, w: 4.5, h: 3.5, fill: { color: C.offWhite }, line: { color: C.red, pt: 2 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.rect, { x: 5.18, y: 1.1, w: 4.5, h: 0.42, fill: { color: C.red }, line: { color: C.red }, rectRadius: 0.1 });
s.addText("✗ Limitations", { x: 5.18, y: 1.1, w: 4.5, h: 0.42, fontSize: 12.5, bold: true, color: C.white, valign: "middle", margin: 8 });
const lim = [
"Retrospective design — no urologist-performed control arm within the same cohort",
"Single institution — limited external generalisability",
"Comparison to urologist benchmarks is indirect (literature-derived, not concurrent)",
"Potential selection bias — surgeons chose which cases to stent",
"No long-term renal/functional outcome data reported",
"Learning-curve/credentialing thresholds not detailed in abstract",
];
s.addText(lim.map(t => ({ text: t, options: { bullet: { code: "2718" }, breakLine: true, paraSpaceAfter: 7 } })),
{ x: 5.3, y: 1.6, w: 4.25, h: 2.9, fontSize: 10.5, color: C.dark, valign: "top" });
}
// =============================================================================
// SLIDE 11 – CONCLUSION / TAKE-HOME
// =============================================================================
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.08, h: 5.625, fill: { color: C.burgLt }, line: { color: C.burgLt } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0.9, w: 10, h: 0.04, fill: { color: C.burg }, line: { color: C.burg } });
s.addText("Conclusion & Take-Home Message", {
x: 0.25, y: 0.1, w: 9.5, h: 0.75, fontSize: 18, bold: true, color: C.gold, valign: "middle"
});
const msgs = [
{ icon: "✅", text: "Cystoscopy with prophylactic ureteral stent placement CAN be safely performed by trained non-urologic surgeons" },
{ icon: "📊", text: "97.7% successful cannulation, 9.4% overall complication rate — comparable to urologist-performed benchmarks (2.37–12%)" },
{ icon: "⚖️", text: "No significant difference in complications by service, surgical approach, or stenting strategy (all P > 0.05)" },
{ icon: "🏥", text: "A credentialing program can close urology coverage gaps and improve OR scheduling efficiency" },
{ icon: "⚠️", text: "Retrospective, single-centre data — needs prospective, multi-centre validation with a concurrent comparator arm" },
{ icon: "🎓", text: "Supports wider adoption of structured training pathways for non-urologic proceduralists" },
];
msgs.forEach((m, i) => {
const y = 1.08 + i * 0.72;
s.addShape(pres.ShapeType.rect, { x: 0.35, y: y, w: 9.3, h: 0.6, fill: { color: C.dark }, line: { color: C.dark }, rectRadius: 0.07 });
s.addText(m.icon, { x: 0.45, y: y, w: 0.45, h: 0.6, fontSize: 14, align: "center", valign: "middle" });
s.addText(m.text, { x: 0.98, y: y, w: 8.55, h: 0.6, fontSize: 11, color: C.white, valign: "middle" });
});
s.addText("Tamashiro KK et al. Am J Surg 2025;250:116474 | DOI: 10.1016/j.amjsurg.2025.116474 | PMID: 40554228", {
x: 0.35, y: 5.25, w: 9.3, h: 0.28, fontSize: 9, color: C.grey, align: "center"
});
}
// =============================================================================
// SLIDE 12 – REFERENCES
// =============================================================================
{
const s = contentSlide("References", "Appendix");
const refs = [
"1. Tamashiro KK, Wilkins CJ, Maron A, Kwok AM, Vue Y, Gallegos J, Tom C, Livingston-Rosanoff D, Emeny P, Disbrow D. Prophylactic ureteral stent placement by general surgeons is safe and Feasible: Implementation of a training and credentialing program for non-urologic surgeons. Am J Surg 2025;250:116474. PMID: 40554228.",
"2. da Silva G, Boutros M, Wexner SD. Role of prophylactic ureteric stents in colorectal surgery. Asian J Endosc Surg 2012.",
"3. Merola J, Arnold B, Luks V, et al. Prophylactic Ureteral Stent Placement vs No Ureteral Stent Placement During Open Colectomy. JAMA Surg 2018.",
"4. Rizvi SAA, Leung A, Pretorius CF, et al. Role of general surgeons in acute urinary obstruction. ANZ J Surg 2016.",
];
s.addText(refs.map(r => ({ text: r, options: { breakLine: true, paraSpaceAfter: 14 } })),
{ x: 0.35, y: 1.15, w: 9.3, h: 4.0, fontSize: 10.5, color: C.dark, valign: "top" });
s.addText("Note: This summary is based on the article's title page/abstract (from provided scan) plus supplementary abstract data retrieved via PubMed (PMID: 40554228) and the publisher listing, as the full-text methods/discussion/results sections were partially cropped in the source image.", {
x: 0.35, y: 4.85, w: 9.3, h: 0.6, fontSize: 8.5, italic: true, color: C.grey
});
}
// =============================================================================
// WRITE
// =============================================================================
const outPath = "/tmp/workspace/jc-ureteral-stent/JR1_JC_Ureteral_Stent_Placement.pptx";
pres.writeFile({ fileName: outPath }).then(() => {
console.log("Saved: " + outPath);
}).catch(err => {
console.error("Error:", err);
});
cd /tmp/workspace/jc-ureteral-stent && node create_pptx.js
npm ls -g pptxgenjs 2>/dev/null; echo "---"; find / -maxdepth 6 -iname "pptxgenjs" -type d 2>/dev/null; echo "---npmroot---"; npm root -g 2>/dev/null
cd /tmp/workspace/jc-ureteral-stent && npm install pptxgenjs 2>&1 | tail -20
cd /tmp/workspace/jc-ureteral-stent && node create_pptx.js
JR1 JC Ureteral Stent Placement
Presentation · PPTX
| # | Slide |
|---|---|
| 1 | Title — article citation, journal, institution, presenter info |
| 2 | Outline |
| 3 | Background — ureteral injury risk, prophylactic stenting/ICG rationale, the urology-coverage "care gap" |
| 4 | Objective (PICO) — framed research question |
| 5 | Methods — design, setting (UCSF Fresno/CMC), 2017–2024 period, variables recorded, stats |
| 6 | Study Cohort — 834 cases screened → 748 included, mean age 54.6±15.7 |
| 7 | Primary Outcomes — 97.7% cannulation success, 9.4% overall complication rate, bar chart of individual complications (AKI, UTI, retention, hematuria, ureteral/urethral injury) |
| 8 | Subgroup Analysis — table of all non-significant P-values (service, approach, laterality, ICG-only) |
| 9 | Discussion — 5 key appraisal points vs. urologist benchmarks |
| 10 | Strengths & Limitations — side-by-side panels |
| 11 | Conclusion / Take-home — dark closing slide, 6 key messages |
| 12 | References — includes a transparency note that some methods/discussion text was cropped in your photo, so those slides were supplemented with the PubMed abstract (PMID 40554228) and publisher listing |