SOAP NOTE (Detailed) Case: NSAID-Induced Peptic Ulcer Disease (PUD) with Helicobacter pylori Infection ⸻ S – SUBJECTIVE DATA Patient Information * Age: 72 years * Gender: Female * Weight: 62.7 kg * Height: 160 cm * BMI: 24.5 kg/m² ⸻ Chief Complaint (CC) “I have had stomach pain, nausea, and bloating in the last 2 weeks.” ⸻ History of Present Illness (HPI) A 72-year-old woman presents to the emergency department with: * Epigastric pain for 2 weeks * Nausea * Abdominal bloating * Early satiety * Persistent heartburn * Symptoms not relieved with OTC famotidine * Started taking OTC naproxen regularly for osteoarthritis pain over the last 2 weeks * Denies hematemesis * Denies melena * No vomiting * No fever Symptoms developed after NSAID use, suggesting NSAID-induced gastric injury. ⸻ Past Medical History (PMH) * Gastroesophageal reflux disease (GERD) * Osteoarthritis * Hypertension * Type 2 Diabetes Mellitus * Appendectomy (30 years ago) ⸻ Family History Father * Myocardial infarction at age 65 Mother * Cervical cancer * Died in her eighties ⸻ Social History * Retired school teacher * Former smoker * 25 pack-years * Quit 9 years ago * Drinks alcohol occasionally * No illicit drug use ⸻ Medication History Prescription medications * Aspirin 325 mg PO once daily * Lisinopril 20 mg PO daily * Amlodipine 10 mg PO daily * Metformin 1000 mg PO twice daily * Rosuvastatin 20 mg PO daily OTC medications * Naproxen 220 mg * 1–2 tablets * 1–4 times/day PRN * Famotidine 10 mg * 1–2 tablets BID ⸻ Allergies * Codeine → Rash * Penicillin → Rash/Hives ⸻ Review of Systems (ROS) Positive * Epigastric pain * Heartburn * Early satiety * Nausea * Bloating Negative * Headache * Chest pain * Polyuria * Polydipsia * Polyphagia * Hematemesis * Melena * Weakness ⸻ O – OBJECTIVE DATA Vital Signs Parameter Value BP 126/70 mmHg Pulse 86/min RR 16/min Temperature 36.8°C Weight 62.7 kg Stable vital signs. ⸻ Physical Examination General * Mild distress due to abdominal pain HEENT * PERRLA * Mild bilateral cataracts * Fundoscopy normal Neck * Supple * No thyromegaly * No JVD Lungs * Clear to auscultation Cardiovascular * Regular rhythm * Normal heart sounds Abdomen * Normal bowel sounds * Moderate epigastric tenderness * No guarding * No rebound tenderness Rectal Examination * Fecal occult blood negative Musculoskeletal * OA deformities * Swollen DIP joints * MCP deformity Neurological * Alert and oriented * Peripheral neuropathy involving right foot ⸻ Laboratory Investigations Test Result Interpretation Hb 8.2 g/dL Severe anemia Hct 24% Low WBC 6,000/mm³ Normal Platelets 269,000/mm³ Normal Reticulocyte 1.8% Normal SCr 0.9 mg/dL Normal BUN 18 mg/dL Normal Na 138 Normal K 4.0 Normal HbA1c 6.7% Controlled diabetes TSH 3.06 Normal Lipid profile Controlled At goal ⸻ Diagnostic Tests H. pylori * Rapid urease test → Positive * Serology → Positive Confirms active H. pylori infection. ⸻ Upper GI Endoscopy (EGD) Shows: * Two gastric ulcers * Approximately 6 mm * Clean ulcer base * No active bleeding ⸻ A – ASSESSMENT Primary Diagnosis NSAID-induced Gastric Peptic Ulcer Disease associated with H. pylori infection Evidence Subjective * Epigastric pain * Early satiety * Nausea * Bloating * Recent naproxen use Objective * Positive H. pylori * Gastric ulcers on EGD * Epigastric tenderness * Hb 8.2 g/dL * NSAID exposure ⸻ Severity Assessment Moderate uncomplicated gastric ulcer because: * Small ulcers * No perforation * No active bleeding * Clean ulcer base * Hemodynamically stable However, Anemia (Hb 8.2 g/dL) increases clinical concern and requires evaluation and monitoring. ⸻ Drug Therapy Problems Problem 1 (Highest Priority) NSAID-induced gastric ulcers Cause Regular naproxen use Needs Immediate discontinuation ⸻ Problem 2 Active H. pylori infection Needs eradication therapy ⸻ Problem 3 High-dose aspirin (325 mg) High GI bleeding risk Needs reassessment. If aspirin is required for secondary cardiovascular prevention, reduce to 81 mg/day with gastroprotection after ulcer stabilization. If used only for primary prevention, discontinuation should be considered because bleeding risk outweighs benefit in many adults ≥70 years. ⸻ Problem 4 GERD Currently uncontrolled Needs PPI therapy ⸻ Problem 5 OA pain Naproxen inappropriate Needs safer analgesic ⸻ Problem 6 Anemia Likely chronic blood loss from ulcer Requires monitoring and investigation (iron studies, repeat CBC). ⸻ Problem 7 Long-term GI risk Age >70 Previous ulcer NSAID use Aspirin use Requires lifelong gastroprotection if antiplatelet therapy continues. ⸻ Therapeutic Goals 1. Relieve pain 2. Heal ulcers 3. Eradicate H. pylori 4. Prevent bleeding 5. Prevent recurrence 6. Avoid NSAIDs 7. Treat anemia 8. Continue cardiovascular protection if indicated 9. Improve quality of life ⸻ P – PLAN Non-Pharmacological Treatment * Stop naproxen immediately. * Avoid all nonselective NSAIDs. * Avoid alcohol and smoking. * Eat small frequent meals. * Avoid spicy foods, caffeine, and late-night meals if they worsen symptoms. * Avoid lying down for 2–3 hours after eating. * Weight maintenance. * Good hydration. Rationale: Removing ulcerogenic factors and reducing gastric irritation promotes healing and decreases recurrence. ⸻ Pharmacological Treatment 1. Proton Pump Inhibitor (PPI) Pantoprazole 40 mg PO twice daily for 14 days, then 40 mg PO once daily to complete 8 weeks. Rationale: PPIs suppress gastric acid more effectively than H2 blockers, promote ulcer healing, improve symptoms, and enhance H. pylori eradication rates. An 8-week course is recommended for gastric ulcers. ⸻ 2. H. pylori Eradication Because of the reported penicillin allergy, use Bismuth Quadruple Therapy for 14 days: * Pantoprazole 40 mg PO BID * Bismuth subcitrate 120–300 mg QID (or bismuth subsalicylate 524 mg QID) * Tetracycline 500 mg QID * Metronidazole 500 mg TID–QID Rationale: This regimen is recommended for patients with penicillin allergy and provides high eradication rates while avoiding amoxicillin. ⸻ 3. Stop Naproxen Discontinue immediately. Rationale: Continued NSAID exposure delays ulcer healing and markedly increases the risk of bleeding and recurrence. ⸻ 4. Osteoarthritis Pain Management * Acetaminophen 500–1000 mg every 6–8 hours as needed (maximum 3 g/day in older adults). * Topical NSAID (e.g., diclofenac gel) for localized hand/knee OA if appropriate. * Physical therapy, exercise, weight management, heat/cold therapy. If an oral anti-inflammatory is absolutely required in the future: * Consider a COX-2 selective agent (e.g., celecoxib) only if necessary, and always with a PPI, after weighing cardiovascular and GI risks. Rationale: Acetaminophen and topical therapies reduce systemic GI toxicity. COX-2 inhibitors plus PPIs lower GI ulcer risk compared with nonselective NSAIDs. ⸻ 5. Aspirin Review Assess indication: * Primary prevention: Consider discontinuing aspirin because the bleeding risk in adults ≥70 years often exceeds the cardiovascular benefit. * Secondary prevention (e.g., prior MI, stroke): Resume at 81 mg once daily after ulcer stabilization, together with long-term PPI therapy. Rationale: Lower-dose aspirin reduces GI bleeding risk while maintaining antiplatelet efficacy for secondary prevention. ⸻ 6. Continue Current Chronic Medications * Lisinopril * Amlodipine * Metformin * Rosuvastatin Rationale: Blood pressure, diabetes, and lipid levels are well controlled and there is no indication to change these therapies. ⸻ 7. Evaluate Anemia * Repeat CBC * Iron studies (serum ferritin, transferrin saturation) * Assess for occult GI blood loss if anemia persists * Consider iron supplementation if iron deficiency is confirmed Rationale: Low hemoglobin may reflect chronic blood loss from ulcer disease or another cause and should be investigated. ⸻ Monitoring Efficacy * Resolution of abdominal pain * Improvement in nausea and bloating * Healing of ulcer (repeat EGD in 6–8 weeks for gastric ulcers if clinically indicated) * Negative H. pylori test (urea breath test or stool antigen) at least 4 weeks after antibiotics and after withholding PPIs for about 2 weeks * Improved hemoglobin Safety * Adverse effects of PPI (e.g., diarrhea, headache; long-term risks if prolonged) * Metronidazole: avoid alcohol; monitor for GI upset * Tetracycline: photosensitivity; take separately from calcium/iron * Monitor renal and hepatic function if clinically indicated Adherence * Complete all 14 days of eradication therapy * Avoid NSAID self-medication * Correct timing of medications * Attend follow-up visits and testing ⸻ Patient Counselling * Take PPI 30–60 minutes before meals. * Complete the full antibiotic course even if symptoms improve. * Do not restart naproxen or other OTC NSAIDs unless advised. * Avoid alcohol during metronidazole therapy. * Use sunscreen and protective clothing while taking tetracycline. * Report black stools, vomiting blood, severe abdominal pain, dizziness, or fainting immediately. * Inform all healthcare providers about the penicillin allergy. * Use acetaminophen rather than NSAIDs for most pain unless otherwise directed. * Keep follow-up appointments for repeat blood tests and H. pylori confirmation testing. ⸻ Overall Assessment This patient has NSAID-induced gastric peptic ulcer disease with confirmed H. pylori infection. Management should focus on stopping naproxen, eradicating H. pylori with 14-day bismuth quadruple therapy, healing the ulcers with an 8-week PPI course, reassessing the need for aspirin, using safer alternatives for osteoarthritis pain, and monitoring anemia and ulcer healing. This approach aligns with contemporary recommendations from the American College of Gastroenterology and international H. pylori management guidelines. Provide ppt
ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or not found"
mkdir -p /home/daytona/workspace/pud-soap-ppt
~/pud-soap-ppt/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "NSAID-Induced PUD with H. pylori – SOAP Note";
pres.author = "Clinical Pharmacy";
// ─── PALETTE ────────────────────────────────────────────────────────────────
const DARK_BG = "0D2137"; // deep navy – title / section headers
const MID_BG = "113352"; // medium navy – accent panels
const ACCENT = "3ABFBF"; // teal – headings, labels
const ACCENT2 = "F4A340"; // amber – highlights
const LIGHT_BG = "F0F5FA"; // off-white – content slides
const BODY_TXT = "1C2D3F"; // dark navy text
const WHITE = "FFFFFF";
const LIGHT_LINE = "C5D8E8"; // subtle divider
// ─── HELPERS ────────────────────────────────────────────────────────────────
function darkSlide(slide) {
slide.background = { color: DARK_BG };
}
function lightSlide(slide) {
slide.background = { color: LIGHT_BG };
}
function sectionLabel(slide, text) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 0.55,
fill: { color: MID_BG }, line: { color: MID_BG }
});
slide.addText(text, {
x: 0.3, y: 0.05, w: 9.4, h: 0.45,
fontSize: 13, bold: true, color: ACCENT, charSpacing: 2, margin: 0
});
}
function sectionBar(slide, label, color = ACCENT) {
slide.addShape(pres.ShapeType.rect, {
x: 0.4, y: 0.55, w: 0.08, h: 0.38,
fill: { color: color }, line: { color: color }
});
slide.addText(label, {
x: 0.6, y: 0.52, w: 8.8, h: 0.45,
fontSize: 18, bold: true, color: BODY_TXT, margin: 0
});
}
function divider(slide, y = 1.0) {
slide.addShape(pres.ShapeType.line, {
x: 0.4, y: y, w: 9.2, h: 0,
line: { color: LIGHT_LINE, width: 1 }
});
}
function bullet(text, indent = 0, bold = false, size = 14, color = BODY_TXT) {
return {
text,
options: {
bullet: { type: "bullet", indent: indent * 20 },
breakLine: true,
fontSize: size,
bold,
color
}
};
}
function labeledRow(slide, label, value, x, y, w = 4.3) {
slide.addShape(pres.ShapeType.rect, {
x, y, w, h: 0.38,
fill: { color: MID_BG }, line: { color: MID_BG },
rounding: 0.05
});
slide.addText([
{ text: label + " ", options: { bold: true, color: ACCENT, fontSize: 12 } },
{ text: value, options: { color: WHITE, fontSize: 12 } }
], { x: x + 0.1, y: y + 0.03, w: w - 0.2, h: 0.32, margin: 0 });
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
darkSlide(s);
// decorative teal bar left
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 0.18, h: 5.625,
fill: { color: ACCENT }, line: { color: ACCENT }
});
// amber accent bar
s.addShape(pres.ShapeType.rect, {
x: 0.18, y: 0, w: 0.07, h: 5.625,
fill: { color: ACCENT2 }, line: { color: ACCENT2 }
});
s.addText("SOAP NOTE", {
x: 0.5, y: 1.0, w: 9.2, h: 0.5,
fontSize: 16, bold: true, color: ACCENT, charSpacing: 5, align: "center", margin: 0
});
s.addText("NSAID-Induced Peptic Ulcer Disease", {
x: 0.5, y: 1.6, w: 9.2, h: 0.75,
fontSize: 32, bold: true, color: WHITE, align: "center", margin: 0
});
s.addText("with Helicobacter pylori Infection", {
x: 0.5, y: 2.38, w: 9.2, h: 0.6,
fontSize: 26, bold: false, color: ACCENT, align: "center", margin: 0
});
// bottom divider strip
s.addShape(pres.ShapeType.rect, {
x: 0, y: 4.7, w: 10, h: 0.925,
fill: { color: MID_BG }, line: { color: MID_BG }
});
s.addText("Clinical Pharmacy | Case-Based Learning | 2026", {
x: 0.5, y: 4.82, w: 9, h: 0.5,
fontSize: 13, color: LIGHT_LINE, align: "center", margin: 0
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 2 – PATIENT SNAPSHOT
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
lightSlide(s);
sectionLabel(s, "S – SUBJECTIVE");
sectionBar(s, "Patient Snapshot");
divider(s, 1.02);
// Left column – demographics
const leftX = 0.4;
const rows = [
["Age", "72 years"],
["Gender", "Female"],
["Weight", "62.7 kg"],
["Height", "160 cm"],
["BMI", "24.5 kg/m²"],
];
rows.forEach((r, i) => labeledRow(s, r[0], r[1], leftX, 1.15 + i * 0.47));
// Right column – PMH
const rightX = 5.2;
s.addText("Past Medical History", {
x: rightX, y: 1.12, w: 4.5, h: 0.35,
fontSize: 13, bold: true, color: ACCENT2, margin: 0
});
const pmh = ["GERD", "Osteoarthritis", "Hypertension", "Type 2 Diabetes Mellitus", "Appendectomy (30 yrs ago)"];
s.addText(pmh.map((p, i) => bullet(p, 0, false, 13, BODY_TXT)), {
x: rightX, y: 1.48, w: 4.5, h: 2.6, margin: 4
});
// Social
s.addText("Social History", {
x: leftX, y: 3.55, w: 4.3, h: 0.3,
fontSize: 12, bold: true, color: ACCENT2, margin: 0
});
s.addText("Former smoker (25 pack-yrs, quit 9 yrs ago) | Occasional alcohol | No illicit drug use", {
x: leftX, y: 3.87, w: 9.2, h: 0.35,
fontSize: 11.5, color: BODY_TXT, italic: true, margin: 0
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 3 – CHIEF COMPLAINT & HPI
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
lightSlide(s);
sectionLabel(s, "S – SUBJECTIVE");
sectionBar(s, "Chief Complaint & History of Present Illness");
divider(s, 1.02);
// CC quote box
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 1.1, w: 9.2, h: 0.72,
fill: { color: MID_BG }, line: { color: ACCENT }
});
s.addText('"I have had stomach pain, nausea, and bloating in the last 2 weeks."', {
x: 0.55, y: 1.15, w: 9.0, h: 0.62,
fontSize: 15, italic: true, color: WHITE, valign: "middle", margin: 6
});
// HPI bullets – two columns
const hpiLeft = [
"Epigastric pain for 2 weeks",
"Nausea & abdominal bloating",
"Early satiety",
"Persistent heartburn",
];
const hpiRight = [
"Symptoms not relieved with OTC famotidine",
"OTC naproxen started 2 weeks ago for OA pain",
"Denies hematemesis, melena, vomiting, fever",
];
s.addText("Key Symptoms & Context", {
x: 0.4, y: 1.93, w: 9.2, h: 0.32,
fontSize: 12, bold: true, color: ACCENT, margin: 0
});
s.addText(hpiLeft.map(t => bullet(t, 0, false, 13)), {
x: 0.4, y: 2.28, w: 4.5, h: 2.5, margin: 4
});
s.addText(hpiRight.map(t => bullet(t, 0, false, 13)), {
x: 5.1, y: 2.28, w: 4.5, h: 2.5, margin: 4
});
// bottom note
s.addText("Symptoms developed after NSAID use → Suggests NSAID-induced gastric injury", {
x: 0.4, y: 4.95, w: 9.2, h: 0.35,
fontSize: 11.5, bold: true, color: ACCENT2, italic: true, margin: 0
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 4 – MEDICATIONS & ALLERGIES
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
lightSlide(s);
sectionLabel(s, "S – SUBJECTIVE");
sectionBar(s, "Medication History & Allergies");
divider(s, 1.02);
// Rx table header
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 1.1, w: 5.5, h: 0.38,
fill: { color: ACCENT }, line: { color: ACCENT }
});
s.addText("Prescription Medications", {
x: 0.45, y: 1.13, w: 5.4, h: 0.32,
fontSize: 12, bold: true, color: DARK_BG, margin: 0
});
const rx = [
["Aspirin", "325 mg PO daily"],
["Lisinopril", "20 mg PO daily"],
["Amlodipine", "10 mg PO daily"],
["Metformin", "1000 mg PO BID"],
["Rosuvastatin", "20 mg PO daily"],
];
rx.forEach(([drug, dose], i) => {
const bg = i % 2 === 0 ? "DDE8F2" : WHITE;
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 1.48 + i * 0.37, w: 5.5, h: 0.37,
fill: { color: bg }, line: { color: LIGHT_LINE }
});
s.addText(drug, { x: 0.5, y: 1.51 + i * 0.37, w: 2.3, h: 0.3, fontSize: 12, bold: true, color: BODY_TXT, margin: 0 });
s.addText(dose, { x: 2.85, y: 1.51 + i * 0.37, w: 2.9, h: 0.3, fontSize: 12, color: BODY_TXT, margin: 0 });
});
// OTC
s.addShape(pres.ShapeType.rect, {
x: 6.1, y: 1.1, w: 3.5, h: 0.38,
fill: { color: ACCENT2 }, line: { color: ACCENT2 }
});
s.addText("OTC Medications", {
x: 6.15, y: 1.13, w: 3.4, h: 0.32,
fontSize: 12, bold: true, color: DARK_BG, margin: 0
});
const otc = [
["Naproxen 220 mg", "1-2 tabs, 1-4x/day PRN"],
["Famotidine 10 mg", "1-2 tabs BID"],
];
otc.forEach(([drug, dose], i) => {
const bg = i % 2 === 0 ? "FFF3DC" : WHITE;
s.addShape(pres.ShapeType.rect, {
x: 6.1, y: 1.48 + i * 0.37, w: 3.5, h: 0.37,
fill: { color: bg }, line: { color: LIGHT_LINE }
});
s.addText(drug, { x: 6.18, y: 1.51 + i * 0.37, w: 1.8, h: 0.3, fontSize: 11.5, bold: true, color: BODY_TXT, margin: 0 });
s.addText(dose, { x: 7.95, y: 1.51 + i * 0.37, w: 1.55, h: 0.3, fontSize: 11, color: BODY_TXT, margin: 0 });
});
// Allergies
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 3.55, w: 9.2, h: 0.38,
fill: { color: "C0392B" }, line: { color: "C0392B" }
});
s.addText("⚠ ALLERGIES", {
x: 0.5, y: 3.58, w: 9.0, h: 0.3,
fontSize: 12, bold: true, color: WHITE, margin: 0
});
s.addText([
{ text: "Codeine", options: { bold: true, color: BODY_TXT, fontSize: 13 } },
{ text: " → Rash ", options: { color: BODY_TXT, fontSize: 13 } },
{ text: "Penicillin", options: { bold: true, color: BODY_TXT, fontSize: 13 } },
{ text: " → Rash / Hives", options: { color: BODY_TXT, fontSize: 13 } },
], { x: 0.5, y: 4.0, w: 9.0, h: 0.4, margin: 0 });
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 5 – OBJECTIVE: VITALS & LABS
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
lightSlide(s);
sectionLabel(s, "O – OBJECTIVE");
sectionBar(s, "Vital Signs & Laboratory Investigations");
divider(s, 1.02);
// Vitals
const vitals = [
["BP", "126/70 mmHg", "Normal"],
["Pulse", "86 /min", "Normal"],
["RR", "16 /min", "Normal"],
["Temp", "36.8 °C", "Normal"],
["Weight", "62.7 kg", "—"],
];
s.addText("Vital Signs", {
x: 0.4, y: 1.1, w: 4.3, h: 0.32,
fontSize: 12, bold: true, color: ACCENT, margin: 0
});
vitals.forEach(([param, val, interp], i) => {
const bg = i % 2 === 0 ? "DDE8F2" : WHITE;
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 1.45 + i * 0.37, w: 4.3, h: 0.37,
fill: { color: bg }, line: { color: LIGHT_LINE }
});
s.addText(param, { x: 0.5, y: 1.48 + i * 0.37, w: 1.1, h: 0.3, fontSize: 12, bold: true, color: BODY_TXT, margin: 0 });
s.addText(val, { x: 1.65, y: 1.48 + i * 0.37, w: 1.7, h: 0.3, fontSize: 12, color: BODY_TXT, margin: 0 });
s.addText(interp, { x: 3.4, y: 1.48 + i * 0.37, w: 1.2, h: 0.3, fontSize: 11, italic: true, color: "28A745", margin: 0 });
});
// Labs table
s.addText("Key Laboratory Values", {
x: 5.1, y: 1.1, w: 4.5, h: 0.32,
fontSize: 12, bold: true, color: ACCENT, margin: 0
});
const labs = [
["Hb", "8.2 g/dL", "LOW – Severe anemia", "C0392B"],
["Hct", "24%", "LOW", "C0392B"],
["WBC", "6,000/mm³", "Normal", "28A745"],
["Platelets", "269,000/mm³", "Normal", "28A745"],
["SCr", "0.9 mg/dL", "Normal", "28A745"],
["BUN", "18 mg/dL", "Normal", "28A745"],
["HbA1c", "6.7%", "Controlled DM", "28A745"],
["TSH", "3.06", "Normal", "28A745"],
];
labs.forEach(([param, val, interp, clr], i) => {
const bg = i % 2 === 0 ? "DDE8F2" : WHITE;
s.addShape(pres.ShapeType.rect, {
x: 5.1, y: 1.45 + i * 0.37, w: 4.5, h: 0.37,
fill: { color: bg }, line: { color: LIGHT_LINE }
});
s.addText(param, { x: 5.18, y: 1.48 + i * 0.37, w: 0.85, h: 0.3, fontSize: 11.5, bold: true, color: BODY_TXT, margin: 0 });
s.addText(val, { x: 6.08, y: 1.48 + i * 0.37, w: 1.4, h: 0.3, fontSize: 11.5, color: BODY_TXT, margin: 0 });
s.addText(interp, { x: 7.55, y: 1.48 + i * 0.37, w: 2.0, h: 0.3, fontSize: 11, italic: true, color: clr, margin: 0 });
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 6 – PHYSICAL EXAM & DIAGNOSTICS
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
lightSlide(s);
sectionLabel(s, "O – OBJECTIVE");
sectionBar(s, "Physical Examination & Diagnostic Tests");
divider(s, 1.02);
// Physical exam
s.addText("Physical Examination Highlights", {
x: 0.4, y: 1.1, w: 5.3, h: 0.32,
fontSize: 12, bold: true, color: ACCENT, margin: 0
});
const peFindings = [
["General", "Mild distress – abdominal pain"],
["Abdomen", "Moderate epigastric tenderness; Normal BS; No guarding/rebound"],
["Rectal", "Fecal occult blood NEGATIVE"],
["MSK", "OA deformities; swollen DIP joints; MCP deformity"],
["Neuro", "Alert & oriented; peripheral neuropathy – right foot"],
["CV/Resp", "Regular rhythm; clear lungs"],
];
peFindings.forEach(([system, finding], i) => {
const bg = i % 2 === 0 ? "DDE8F2" : WHITE;
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 1.45 + i * 0.44, w: 5.3, h: 0.44,
fill: { color: bg }, line: { color: LIGHT_LINE }
});
s.addText(system, { x: 0.5, y: 1.48 + i * 0.44, w: 1.2, h: 0.36, fontSize: 12, bold: true, color: BODY_TXT, margin: 0 });
s.addText(finding, { x: 1.75, y: 1.48 + i * 0.44, w: 3.9, h: 0.36, fontSize: 12, color: BODY_TXT, margin: 0 });
});
// Diagnostic tests
s.addText("Diagnostic Tests", {
x: 6.0, y: 1.1, w: 3.7, h: 0.32,
fontSize: 12, bold: true, color: ACCENT, margin: 0
});
// H.pylori box
s.addShape(pres.ShapeType.rect, {
x: 6.0, y: 1.45, w: 3.7, h: 1.1,
fill: { color: "FFF3DC" }, line: { color: ACCENT2, width: 1.5 }
});
s.addText("H. pylori Testing", { x: 6.1, y: 1.5, w: 3.5, h: 0.3, fontSize: 12, bold: true, color: ACCENT2, margin: 0 });
s.addText([
bullet("Rapid Urease Test → POSITIVE", 0, false, 12, BODY_TXT),
bullet("Serology → POSITIVE", 0, false, 12, BODY_TXT),
], { x: 6.1, y: 1.82, w: 3.5, h: 0.68, margin: 3 });
// EGD box
s.addShape(pres.ShapeType.rect, {
x: 6.0, y: 2.65, w: 3.7, h: 1.35,
fill: { color: "FDECEA" }, line: { color: "C0392B", width: 1.5 }
});
s.addText("Upper GI Endoscopy (EGD)", { x: 6.1, y: 2.7, w: 3.5, h: 0.3, fontSize: 12, bold: true, color: "C0392B", margin: 0 });
s.addText([
bullet("Two gastric ulcers (~6 mm)", 0, false, 12, BODY_TXT),
bullet("Clean ulcer base", 0, false, 12, BODY_TXT),
bullet("No active bleeding", 0, false, 12, BODY_TXT),
], { x: 6.1, y: 3.02, w: 3.5, h: 0.95, margin: 3 });
// H.pylori conclusion
s.addText("Active H. pylori infection confirmed – eradication therapy required", {
x: 0.4, y: 5.12, w: 9.2, h: 0.3,
fontSize: 11.5, bold: true, color: "C0392B", italic: true, margin: 0
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 7 – ASSESSMENT: DIAGNOSIS & SEVERITY
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
darkSlide(s);
sectionLabel(s, "A – ASSESSMENT");
// Diagnosis box
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 0.65, w: 9.2, h: 0.8,
fill: { color: MID_BG }, line: { color: ACCENT, width: 2 }
});
s.addText("PRIMARY DIAGNOSIS", {
x: 0.6, y: 0.68, w: 3.5, h: 0.25,
fontSize: 10, bold: true, color: ACCENT, charSpacing: 2, margin: 0
});
s.addText("NSAID-Induced Gastric Peptic Ulcer Disease with H. pylori Infection", {
x: 0.6, y: 0.92, w: 9.0, h: 0.46,
fontSize: 17, bold: true, color: WHITE, margin: 0
});
// Evidence columns
s.addText("Subjective Evidence", {
x: 0.4, y: 1.6, w: 4.4, h: 0.32,
fontSize: 12, bold: true, color: ACCENT2, margin: 0
});
const subjEvid = [
"Epigastric pain, early satiety, nausea, bloating",
"Persistent heartburn",
"Recent naproxen use (2 weeks)",
"OTC famotidine ineffective",
];
s.addText(subjEvid.map(t => bullet(t, 0, false, 13, WHITE)), {
x: 0.4, y: 1.95, w: 4.4, h: 2.2, margin: 4
});
s.addText("Objective Evidence", {
x: 5.2, y: 1.6, w: 4.4, h: 0.32,
fontSize: 12, bold: true, color: ACCENT2, margin: 0
});
const objEvid = [
"Gastric ulcers on EGD (2 × ~6 mm)",
"H. pylori positive (urease + serology)",
"Epigastric tenderness on exam",
"Hb 8.2 g/dL – likely chronic blood loss",
"NSAID exposure confirmed",
];
s.addText(objEvid.map(t => bullet(t, 0, false, 13, WHITE)), {
x: 5.2, y: 1.95, w: 4.4, h: 2.2, margin: 4
});
// Severity badge
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 4.3, w: 9.2, h: 0.9,
fill: { color: "1E4D6B" }, line: { color: ACCENT2, width: 1.5 }
});
s.addText("SEVERITY: Moderate Uncomplicated Gastric Ulcer", {
x: 0.6, y: 4.35, w: 8.8, h: 0.3,
fontSize: 13, bold: true, color: ACCENT2, margin: 0
});
s.addText("Small ulcers | No perforation | No active bleeding | Hemodynamically stable | Anemia (Hb 8.2) warrants monitoring", {
x: 0.6, y: 4.66, w: 8.8, h: 0.3,
fontSize: 11.5, color: LIGHT_LINE, margin: 0
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 8 – DRUG THERAPY PROBLEMS
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
lightSlide(s);
sectionLabel(s, "A – ASSESSMENT");
sectionBar(s, "Drug Therapy Problems");
divider(s, 1.02);
const problems = [
{ num: "1", priority: "HIGHEST", title: "NSAID-induced gastric ulcers", desc: "Regular naproxen use → Immediate discontinuation required", color: "C0392B" },
{ num: "2", priority: "", title: "Active H. pylori infection", desc: "Needs eradication therapy", color: "E67E22" },
{ num: "3", priority: "", title: "High-dose aspirin (325 mg)", desc: "High GI bleeding risk → Reassess; reduce to 81 mg if needed for 2° CV prevention", color: "E67E22" },
{ num: "4", priority: "", title: "Uncontrolled GERD", desc: "Requires PPI therapy (OTC famotidine insufficient)", color: "8E44AD" },
{ num: "5", priority: "", title: "OA pain management", desc: "Naproxen inappropriate → Switch to safer analgesic (acetaminophen / topical NSAID)", color: "2980B9" },
{ num: "6", priority: "", title: "Anemia (Hb 8.2 g/dL)", desc: "Likely chronic blood loss → Iron studies + repeat CBC", color: "16A085" },
{ num: "7", priority: "", title: "Long-term GI risk", desc: "Age >70, prior ulcer, NSAID + aspirin use → Lifelong gastroprotection", color: "7F8C8D" },
];
problems.forEach((p, i) => {
const row = i < 4 ? i : i;
const y = 1.1 + i * 0.61;
s.addShape(pres.ShapeType.rect, {
x: 0.4, y, w: 0.45, h: 0.52,
fill: { color: p.color }, line: { color: p.color }
});
s.addText(p.num, {
x: 0.4, y, w: 0.45, h: 0.52,
fontSize: 16, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0
});
if (p.priority) {
s.addShape(pres.ShapeType.rect, {
x: 0.9, y: y + 0.02, w: 1.2, h: 0.24,
fill: { color: p.color }, line: { color: p.color }
});
s.addText(p.priority, {
x: 0.9, y: y + 0.02, w: 1.2, h: 0.24,
fontSize: 8, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0
});
}
s.addText(p.title, {
x: 0.95, y: y + (p.priority ? 0.26 : 0.04), w: 8.7, h: 0.28,
fontSize: 13, bold: true, color: BODY_TXT, margin: 0
});
s.addText(p.desc, {
x: 0.97, y: y + (p.priority ? 0.26 : 0.04) + 0.26, w: 8.7, h: 0.24,
fontSize: 11.5, color: "4A6278", italic: true, margin: 0
});
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 9 – THERAPEUTIC GOALS
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
darkSlide(s);
sectionLabel(s, "A – ASSESSMENT");
sectionBar(s, "Therapeutic Goals");
// white text for dark bg
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0.5, w: 0.08, h: 0.4, fill: { color: ACCENT2 }, line: { color: ACCENT2 }
});
s.addText("Therapeutic Goals", {
x: 0.3, y: 0.52, w: 9.4, h: 0.38,
fontSize: 18, bold: true, color: WHITE, margin: 0
});
const goals = [
{ icon: "①", text: "Relieve epigastric pain and upper GI symptoms" },
{ icon: "②", text: "Heal gastric ulcers (8-week PPI course)" },
{ icon: "③", text: "Eradicate H. pylori infection" },
{ icon: "④", text: "Prevent GI bleeding and perforation" },
{ icon: "⑤", text: "Prevent ulcer recurrence" },
{ icon: "⑥", text: "Avoid NSAIDs; use safer analgesics" },
{ icon: "⑦", text: "Investigate and treat anemia" },
{ icon: "⑧", text: "Continue cardiovascular protection if indicated" },
{ icon: "⑨", text: "Improve quality of life" },
];
const cols = [goals.slice(0, 5), goals.slice(5)];
cols.forEach((col, ci) => {
col.forEach((g, ri) => {
const x = ci === 0 ? 0.4 : 5.2;
const y = 1.05 + ri * 0.82;
s.addShape(pres.ShapeType.rect, {
x, y, w: 4.5, h: 0.72,
fill: { color: MID_BG }, line: { color: ACCENT }
});
s.addText(g.icon, { x: x + 0.1, y: y + 0.12, w: 0.6, h: 0.5, fontSize: 22, color: ACCENT2, bold: true, margin: 0 });
s.addText(g.text, { x: x + 0.75, y: y + 0.17, w: 3.6, h: 0.42, fontSize: 13, color: WHITE, margin: 0 });
});
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 10 – PLAN: NON-PHARM
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
lightSlide(s);
sectionLabel(s, "P – PLAN");
sectionBar(s, "Non-Pharmacological Management");
divider(s, 1.02);
const steps = [
{ title: "Stop Naproxen", desc: "Discontinue immediately; avoid ALL nonselective NSAIDs." },
{ title: "Avoid Triggers", desc: "No alcohol, no smoking. Avoid spicy foods, caffeine, late-night meals." },
{ title: "Dietary Habits", desc: "Small, frequent meals. Avoid lying down 2–3 hours after eating." },
{ title: "Lifestyle", desc: "Weight maintenance; good hydration; regular gentle activity." },
{ title: "OA Physical Measures", desc: "Physical therapy, exercise, heat/cold therapy for joint pain." },
];
steps.forEach((st, i) => {
const x = 0.4 + (i % 2) * 4.85;
const y = i < 2 ? 1.15 + Math.floor(i) * 1.45 :
i < 4 ? 1.15 + 1.45 + Math.floor((i - 2)) * 1.45 :
1.15 + 2 * 1.45;
// adjust for clean layout
const yMap = [1.15, 1.15, 2.72, 2.72, 4.28];
const xMap = [0.4, 5.1, 0.4, 5.1, 0.4];
const wMap = [4.5, 4.5, 4.5, 4.5, 9.2];
s.addShape(pres.ShapeType.rect, {
x: xMap[i], y: yMap[i], w: wMap[i], h: 1.28,
fill: { color: "DDE8F2" }, line: { color: ACCENT, width: 1 }
});
s.addShape(pres.ShapeType.rect, {
x: xMap[i], y: yMap[i], w: wMap[i], h: 0.38,
fill: { color: ACCENT }, line: { color: ACCENT }
});
s.addText(st.title, {
x: xMap[i] + 0.15, y: yMap[i] + 0.05, w: wMap[i] - 0.3, h: 0.28,
fontSize: 13, bold: true, color: DARK_BG, margin: 0
});
s.addText(st.desc, {
x: xMap[i] + 0.15, y: yMap[i] + 0.45, w: wMap[i] - 0.3, h: 0.78,
fontSize: 13, color: BODY_TXT, margin: 4
});
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 11 – PLAN: PPI + H. PYLORI ERADICATION
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
lightSlide(s);
sectionLabel(s, "P – PLAN");
sectionBar(s, "Pharmacological Treatment: PPI & H. pylori Eradication");
divider(s, 1.02);
// PPI box
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 1.1, w: 4.5, h: 2.1,
fill: { color: "E8F6F3" }, line: { color: "1ABC9C", width: 2 }
});
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 1.1, w: 4.5, h: 0.42,
fill: { color: "1ABC9C" }, line: { color: "1ABC9C" }
});
s.addText("① Proton Pump Inhibitor", {
x: 0.55, y: 1.13, w: 4.2, h: 0.36,
fontSize: 13, bold: true, color: WHITE, margin: 0
});
s.addText([
bullet("Pantoprazole 40 mg PO BID × 14 days", 0, true, 12.5, BODY_TXT),
bullet("then 40 mg PO once daily to complete 8 weeks", 0, false, 12, BODY_TXT),
bullet("", 0, false, 6, BODY_TXT),
bullet("Rationale: Better acid suppression than H2 blockers; enhances H. pylori eradication; 8-week course for gastric ulcers", 0, false, 11.5, "4A6278"),
], { x: 0.55, y: 1.58, w: 4.2, h: 1.57, margin: 4 });
// Quadruple therapy box
s.addShape(pres.ShapeType.rect, {
x: 5.1, y: 1.1, w: 4.5, h: 3.4,
fill: { color: "FEF9E7" }, line: { color: ACCENT2, width: 2 }
});
s.addShape(pres.ShapeType.rect, {
x: 5.1, y: 1.1, w: 4.5, h: 0.42,
fill: { color: ACCENT2 }, line: { color: ACCENT2 }
});
s.addText("② H. pylori Eradication – Bismuth Quadruple Therapy", {
x: 5.25, y: 1.13, w: 4.3, h: 0.36,
fontSize: 12, bold: true, color: DARK_BG, margin: 0
});
s.addText("(Penicillin allergy → avoid amoxicillin)", {
x: 5.25, y: 1.57, w: 4.2, h: 0.28,
fontSize: 11, italic: true, color: "C0392B", margin: 0
});
const bqt = [
["Pantoprazole", "40 mg PO BID"],
["Bismuth subcitrate", "120–300 mg QID"],
["Tetracycline", "500 mg QID"],
["Metronidazole", "500 mg TID–QID"],
];
bqt.forEach(([drug, dose], i) => {
s.addShape(pres.ShapeType.rect, {
x: 5.1, y: 1.9 + i * 0.44, w: 4.5, h: 0.44,
fill: { color: i % 2 === 0 ? "FFF8DC" : WHITE }, line: { color: LIGHT_LINE }
});
s.addText(drug, { x: 5.2, y: 1.93 + i * 0.44, w: 2.3, h: 0.36, fontSize: 12, bold: true, color: BODY_TXT, margin: 0 });
s.addText(dose, { x: 7.55, y: 1.93 + i * 0.44, w: 2.0, h: 0.36, fontSize: 12, color: BODY_TXT, margin: 0 });
});
s.addText("Duration: 14 days", {
x: 5.2, y: 3.68, w: 4.2, h: 0.3,
fontSize: 12, bold: true, color: ACCENT2, margin: 0
});
s.addText("High eradication rates; no amoxicillin required", {
x: 5.2, y: 3.98, w: 4.2, h: 0.28,
fontSize: 11, italic: true, color: "4A6278", margin: 0
});
// Note box
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 4.3, w: 9.2, h: 0.9,
fill: { color: "FDECEA" }, line: { color: "C0392B", width: 1.5 }
});
s.addText("⚠ Continued NSAID exposure delays ulcer healing and markedly increases risk of bleeding and recurrence. Naproxen MUST be stopped.", {
x: 0.6, y: 4.4, w: 8.8, h: 0.7,
fontSize: 12, color: "C0392B", bold: true, margin: 4
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 12 – PLAN: OA PAIN, ASPIRIN, ANEMIA
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
lightSlide(s);
sectionLabel(s, "P – PLAN");
sectionBar(s, "Pharmacological Treatment: OA Pain, Aspirin & Anemia");
divider(s, 1.02);
// OA pain
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 1.1, w: 9.2, h: 0.38,
fill: { color: "2980B9" }, line: { color: "2980B9" }
});
s.addText("③ Osteoarthritis Pain – Safer Alternatives", {
x: 0.55, y: 1.13, w: 9.0, h: 0.3,
fontSize: 13, bold: true, color: WHITE, margin: 0
});
const oaItems = [
"Acetaminophen 500–1000 mg q6–8h PRN (max 3 g/day in elderly)",
"Topical diclofenac gel for localized hand/knee OA",
"Physical therapy, exercise, heat/cold therapy",
"COX-2 inhibitor (e.g., celecoxib) ONLY if absolutely required – always with PPI; weigh CV/GI risks",
];
s.addText(oaItems.map(t => bullet(t, 0, false, 12.5, BODY_TXT)), {
x: 0.55, y: 1.52, w: 9.0, h: 1.05, margin: 3
});
// Aspirin
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 2.67, w: 9.2, h: 0.38,
fill: { color: "8E44AD" }, line: { color: "8E44AD" }
});
s.addText("④ Aspirin Review (325 mg → reassess)", {
x: 0.55, y: 2.7, w: 9.0, h: 0.3,
fontSize: 13, bold: true, color: WHITE, margin: 0
});
s.addText([
bullet("PRIMARY PREVENTION: Consider discontinuing – bleeding risk in adults ≥70 yrs often outweighs CV benefit", 0, false, 12.5, BODY_TXT),
bullet("SECONDARY PREVENTION (prior MI/stroke): Resume 81 mg/day after ulcer stabilization + long-term PPI", 0, false, 12.5, BODY_TXT),
], { x: 0.55, y: 3.1, w: 9.0, h: 0.95, margin: 3 });
// Anemia
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 4.15, w: 9.2, h: 0.38,
fill: { color: "16A085" }, line: { color: "16A085" }
});
s.addText("⑤ Anemia Evaluation (Hb 8.2 g/dL)", {
x: 0.55, y: 4.18, w: 9.0, h: 0.3,
fontSize: 13, bold: true, color: WHITE, margin: 0
});
s.addText([
bullet("Repeat CBC | Iron studies (serum ferritin, transferrin saturation)", 0, false, 12.5, BODY_TXT),
bullet("Assess for occult GI blood loss if anemia persists", 0, false, 12.5, BODY_TXT),
bullet("Iron supplementation if iron deficiency confirmed", 0, false, 12.5, BODY_TXT),
], { x: 0.55, y: 4.57, w: 9.0, h: 0.85, margin: 3 });
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 13 – MONITORING
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
lightSlide(s);
sectionLabel(s, "P – PLAN");
sectionBar(s, "Monitoring Plan");
divider(s, 1.02);
// Efficacy
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 1.1, w: 4.5, h: 0.38,
fill: { color: "28A745" }, line: { color: "28A745" }
});
s.addText("EFFICACY", { x: 0.5, y: 1.13, w: 4.3, h: 0.3, fontSize: 12, bold: true, color: WHITE, charSpacing: 2, margin: 0 });
const efficacy = [
"Resolution of abdominal pain, nausea, bloating",
"Repeat EGD in 6–8 weeks (gastric ulcer confirmation)",
"H. pylori test-of-cure: UBT or stool antigen ≥4 weeks post-antibiotics (hold PPI ~2 wks before testing)",
"Improved Hb on repeat CBC",
];
s.addText(efficacy.map(t => bullet(t, 0, false, 12.5, BODY_TXT)), {
x: 0.4, y: 1.52, w: 4.5, h: 2.3, margin: 4
});
// Safety
s.addShape(pres.ShapeType.rect, {
x: 5.1, y: 1.1, w: 4.5, h: 0.38,
fill: { color: "C0392B" }, line: { color: "C0392B" }
});
s.addText("SAFETY", { x: 5.2, y: 1.13, w: 4.3, h: 0.3, fontSize: 12, bold: true, color: WHITE, charSpacing: 2, margin: 0 });
const safety = [
"PPI: diarrhea, headache; long-term risks if prolonged",
"Metronidazole: GI upset; strictly avoid alcohol",
"Tetracycline: photosensitivity; separate from calcium/iron",
"Monitor renal and hepatic function if indicated",
];
s.addText(safety.map(t => bullet(t, 0, false, 12.5, BODY_TXT)), {
x: 5.1, y: 1.52, w: 4.5, h: 2.3, margin: 4
});
// Adherence
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 3.95, w: 9.2, h: 0.38,
fill: { color: "2980B9" }, line: { color: "2980B9" }
});
s.addText("ADHERENCE", { x: 0.5, y: 3.98, w: 9.0, h: 0.3, fontSize: 12, bold: true, color: WHITE, charSpacing: 2, margin: 0 });
const adherence = [
"Complete full 14-day eradication therapy",
"Avoid NSAID self-medication",
"Correct timing (PPI 30–60 min before meals)",
"Attend all follow-up visits and confirmatory testing",
];
s.addText(adherence.map(t => bullet(t, 0, false, 12.5, BODY_TXT)), {
x: 0.4, y: 4.38, w: 9.2, h: 0.9, margin: 4
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 14 – PATIENT COUNSELLING
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
lightSlide(s);
sectionLabel(s, "P – PLAN");
sectionBar(s, "Patient Counselling");
divider(s, 1.02);
const counselPoints = [
{ icon: "💊", point: "Take PPI 30–60 minutes before meals for best effect." },
{ icon: "✅", point: "Complete the full 14-day antibiotic course even if symptoms improve." },
{ icon: "🚫", point: "Do not restart naproxen or other OTC NSAIDs unless directed by your doctor." },
{ icon: "🍷", point: "Avoid alcohol completely during metronidazole therapy." },
{ icon: "☀", point: "Use sunscreen and protective clothing while taking tetracycline (photosensitivity)." },
{ icon: "🆘", point: "Seek immediate care for: black stools, vomiting blood, severe pain, dizziness, or fainting." },
{ icon: "🏥", point: "Inform ALL healthcare providers about your penicillin allergy." },
{ icon: "💉", point: "Use acetaminophen for most pain unless otherwise directed." },
{ icon: "📅", point: "Keep all follow-up appointments for blood tests and H. pylori confirmation." },
];
const col1 = counselPoints.slice(0, 5);
const col2 = counselPoints.slice(5);
col1.forEach((cp, i) => {
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 1.1 + i * 0.84, w: 4.5, h: 0.76,
fill: { color: "DDE8F2" }, line: { color: LIGHT_LINE }
});
s.addText(cp.icon, { x: 0.48, y: 1.15 + i * 0.84, w: 0.55, h: 0.6, fontSize: 20, valign: "middle", margin: 0 });
s.addText(cp.point, { x: 1.06, y: 1.15 + i * 0.84, w: 3.75, h: 0.65, fontSize: 12, color: BODY_TXT, margin: 3 });
});
col2.forEach((cp, i) => {
s.addShape(pres.ShapeType.rect, {
x: 5.1, y: 1.1 + i * 0.84, w: 4.5, h: 0.76,
fill: { color: "DDE8F2" }, line: { color: LIGHT_LINE }
});
s.addText(cp.icon, { x: 5.18, y: 1.15 + i * 0.84, w: 0.55, h: 0.6, fontSize: 20, valign: "middle", margin: 0 });
s.addText(cp.point, { x: 5.76, y: 1.15 + i * 0.84, w: 3.75, h: 0.65, fontSize: 12, color: BODY_TXT, margin: 3 });
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 15 – SUMMARY / CLOSING
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
darkSlide(s);
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 0.18, h: 5.625,
fill: { color: ACCENT }, line: { color: ACCENT }
});
s.addShape(pres.ShapeType.rect, {
x: 0.18, y: 0, w: 0.07, h: 5.625,
fill: { color: ACCENT2 }, line: { color: ACCENT2 }
});
s.addText("OVERALL ASSESSMENT & SUMMARY", {
x: 0.5, y: 0.38, w: 9.2, h: 0.4,
fontSize: 14, bold: true, color: ACCENT, charSpacing: 3, align: "center", margin: 0
});
const summaryItems = [
"Stop naproxen immediately — remove the causative agent",
"14-day Bismuth Quadruple Therapy for H. pylori eradication (penicillin allergy → no amoxicillin)",
"8-week Pantoprazole course for ulcer healing",
"Reassess aspirin: reduce to 81 mg/day if secondary CV prevention; consider stopping for primary prevention",
"Switch to acetaminophen ± topical NSAID for OA pain",
"Investigate and treat anemia (iron studies, repeat CBC)",
"Confirm H. pylori eradication ≥4 weeks post-therapy",
"Lifelong PPI if antiplatelet therapy continues",
];
s.addText(summaryItems.map(t => bullet(t, 0, false, 13.5, WHITE)), {
x: 0.5, y: 0.88, w: 9.2, h: 3.8, margin: 8
});
s.addShape(pres.ShapeType.rect, {
x: 0, y: 4.75, w: 10, h: 0.875,
fill: { color: MID_BG }, line: { color: MID_BG }
});
s.addText("Aligned with ACG guidelines and international H. pylori management consensus | Clinical Pharmacy Case Study | 2026", {
x: 0.5, y: 4.87, w: 9.0, h: 0.4,
fontSize: 11, color: LIGHT_LINE, align: "center", italic: true, margin: 0
});
}
// ─── WRITE FILE ──────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/pud-soap-ppt/PUD_SOAP_Note.pptx" })
.then(() => console.log("Done: PUD_SOAP_Note.pptx"))
.catch(err => { console.error(err); process.exit(1); });
cd /home/daytona/workspace/pud-soap-ppt && node build.js 2>&1
ls -lh /home/daytona/workspace/pud-soap-ppt/PUD_SOAP_Note.pptx
PUD SOAP Note
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title slide – case name and subtitle |
| 2 | Patient snapshot – demographics, PMH, social history |
| 3 | Chief complaint (quoted) & HPI |
| 4 | Medication history (Rx + OTC) and allergy alert |
| 5 | Vital signs & key lab values (Hb flagged in red) |
| 6 | Physical exam highlights + H. pylori and EGD results |
| 7 | Assessment – primary diagnosis, subjective/objective evidence, severity badge |
| 8 | 7 drug therapy problems with color-coded priority |
| 9 | 9 therapeutic goals in icon-card layout |
| 10 | Non-pharmacological management (5 cards) |
| 11 | PPI regimen + Bismuth Quadruple Therapy table (with penicillin allergy note) |
| 12 | OA pain alternatives, aspirin review, anemia workup |
| 13 | Monitoring plan (efficacy / safety / adherence) |
| 14 | Patient counselling (9 icon-labeled points) |
| 15 | Overall summary + ACG guideline reference |