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'
~/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