Pharmacist intervention short ALSO adrs and drug drug interaction short
python3 -c " import pdfplumber with pdfplumber.open('/home/daytona/workspace/attachments/deb42fd7-2980-437f-baa4-fe98e8bb9cd8/CASE PRESENTATION adibtahleel.pptx_20260602_233640_0000.pdf') as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): text = page.extract_text() if text: print(f'--- PAGE {i+1} ---') print(text) print() "
| Drug | Key ADRs |
|---|---|
| Atorvastatin (40 mg) | Myalgia, muscle weakness, rhabdomyolysis (rare), elevated LFTs/hepatotoxicity, headache, GI upset |
| Pantoprazole (40 mg IV) | Hypomagnesemia with prolonged use, C. difficile risk, B12 deficiency (long term), headache |
| Ondansetron (4 mg IV) | QT prolongation (most significant - requires ECG monitoring), headache, constipation, serotonin syndrome |
| Ceftriaxone (1 g IV) | Hypersensitivity reactions (rash, anaphylaxis), biliary sludge/pseudolithiasis, elevated LFTs, diarrhea |
| Prazosin (1 mg BD) | First-dose phenomenon (orthostatic hypotension, syncope, dizziness), palpitations, edema |
| Calcium Carbonate | Hypercalcemia (high doses), constipation, milk-alkali syndrome |
| Calcium Pantothenate | Generally well tolerated; mild GI upset at high doses |
| Multivitamin | Generally safe; GI upset if taken on empty stomach |
Atorvastatin ADRs: "Best recognized adverse effects include muscle pain, fatigue, weakness, and rhabdomyolysis... may be due to inhibition of heme A and ubiquinone synthesis, essential for oxidative phosphorylation." - Lippincott Biochemistry, 8th ed.
Ondansetron: "QT prolongation, QRS widening, constipation" - Harriet Lane Handbook, 23rd ed.
Prazosin: "'First-dose phenomenon' - faintness, dizziness, palpitation, and infrequently syncope, caused by acute postural hypotension." - Campbell Walsh Wein Urology
| Drug Pair | Interaction | Severity |
|---|---|---|
| Atorvastatin + Calcium Carbonate | Calcium can adsorb some statins; separate administration by 2 hours recommended | Minor |
| Atorvastatin + Ceftriaxone | Ceftriaxone (mild CYP enzyme effects) - not a major DDI, but watch LFTs | Minor |
| Ondansetron + Any QT-prolonging drug | Additive QT prolongation risk; watch especially with hypokalemia (patient's K+ = 3.1) | Moderate-Major |
| Prazosin + Pantoprazole | PPIs can slightly increase prazosin bioavailability - monitor BP | Minor |
| Calcium Carbonate + Multivitamin (iron/zinc) | Calcium competes with iron/zinc absorption - separate timing | Minor |
| Atorvastatin + CYP3A4 inhibitors (if co-prescribed) | Risk of statin toxicity/myopathy - not in current list but watch if antibiotics like erythromycin are added | Potential |
Goodman & Gilman's: Pantoprazole has fewer drug interactions via CYP2C19 compared to other PPIs (omeprazole), making it the preferred PPI when co-prescribing drugs like clopidogrel.
| Priority | Issue | Action |
|---|---|---|
| 🔴 High | Ecospirin labeled as "Atorvastatin 150 mg" | Clarify & correct - likely Aspirin 75 mg |
| 🔴 High | Hypokalemia + Ondansetron IV | Correct K+ first; ECG monitoring |
| 🟠 Medium | Prazosin not first-line for CAD-HTN | Suggest beta-blocker or ACE-I/ARB |
| 🟠 Medium | Telma on counselling but absent from prescription | Medication reconciliation needed |
| 🟡 Low | Mild LFT elevation on statin | Repeat LFTs at 6-8 weeks |
| 🟡 Low | Eosinophilia | Monitor for drug hypersensitivity |
?
Make a pharmacist intervention report (Word doc) summarizing the issues
mkdir -p /home/daytona/workspace/pharmacist-report && ls /home/daytona/workspace/pharmacist-report/
~/pharmacist-report/generate_report.js
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
HeadingLevel, AlignmentType, BorderStyle, WidthType, VerticalAlign,
ShadingType, Header, Footer, PageNumber, NumberFormat
} = require('docx');
const fs = require('fs');
// ─── Helpers ─────────────────────────────────────────────────────────────────
function heading1(text) {
return new Paragraph({
text,
heading: HeadingLevel.HEADING_1,
spacing: { before: 360, after: 120 },
});
}
function heading2(text) {
return new Paragraph({
text,
heading: HeadingLevel.HEADING_2,
spacing: { before: 240, after: 80 },
});
}
function body(text, bold = false) {
return new Paragraph({
children: [new TextRun({ text, bold, size: 22, font: 'Calibri' })],
spacing: { after: 80 },
});
}
function bullet(text) {
return new Paragraph({
children: [new TextRun({ text, size: 22, font: 'Calibri' })],
bullet: { level: 0 },
spacing: { after: 60 },
});
}
function spacer() {
return new Paragraph({ text: '', spacing: { after: 80 } });
}
function cell(text, shaded = false, bold = false) {
return new TableCell({
children: [new Paragraph({
children: [new TextRun({ text, size: 20, font: 'Calibri', bold })],
spacing: { after: 40, before: 40 },
})],
margins: { top: 80, bottom: 80, left: 100, right: 100 },
shading: shaded ? { type: ShadingType.SOLID, color: '1F4E79', fill: '1F4E79' } : undefined,
verticalAlign: VerticalAlign.CENTER,
});
}
function cellWhiteOnBlue(text) {
return new TableCell({
children: [new Paragraph({
children: [new TextRun({ text, size: 20, font: 'Calibri', bold: true, color: 'FFFFFF' })],
spacing: { after: 40, before: 40 },
})],
margins: { top: 80, bottom: 80, left: 100, right: 100 },
shading: { type: ShadingType.SOLID, color: '1F4E79', fill: '1F4E79' },
verticalAlign: VerticalAlign.CENTER,
});
}
function cellLight(text, color = 'D6E4F0', bold = false) {
return new TableCell({
children: [new Paragraph({
children: [new TextRun({ text, size: 20, font: 'Calibri', bold })],
spacing: { after: 40, before: 40 },
})],
margins: { top: 80, bottom: 80, left: 100, right: 100 },
shading: { type: ShadingType.SOLID, color, fill: color },
verticalAlign: VerticalAlign.CENTER,
});
}
// ─── Table builders ──────────────────────────────────────────────────────────
function makeTable(headers, rows, colWidths) {
return new Table({
width: { size: 9500, type: WidthType.DXA },
rows: [
new TableRow({
children: headers.map(h => cellWhiteOnBlue(h)),
tableHeader: true,
}),
...rows.map((row, ri) => new TableRow({
children: row.map((cell_text, ci) => {
const bg = ri % 2 === 0 ? 'EBF4FB' : 'FFFFFF';
return cellLight(cell_text, bg);
}),
})),
],
columnWidths: colWidths,
});
}
// ─── Document content ─────────────────────────────────────────────────────────
// Cover / Title section
const titleSection = [
spacer(),
new Paragraph({
children: [new TextRun({ text: 'PHARMACIST INTERVENTION REPORT', bold: true, size: 40, font: 'Calibri', color: '1F4E79' })],
alignment: AlignmentType.CENTER,
spacing: { after: 120 },
}),
new Paragraph({
children: [new TextRun({ text: 'Case: Coronary Artery Disease', size: 26, font: 'Calibri', color: '2E75B6' })],
alignment: AlignmentType.CENTER,
spacing: { after: 60 },
}),
new Paragraph({
children: [new TextRun({ text: 'Prepared by: Adib Tahleel | PharmD 3rd Year | Shadan College of Pharmacy', size: 22, font: 'Calibri', color: '595959' })],
alignment: AlignmentType.CENTER,
spacing: { after: 60 },
}),
new Paragraph({
children: [new TextRun({ text: 'Submitted to: Dr. Syed Awez Ali, Dept. of Pharmacotherapeutics', size: 22, font: 'Calibri', color: '595959' })],
alignment: AlignmentType.CENTER,
spacing: { after: 60 },
}),
new Paragraph({
children: [new TextRun({ text: `Date: ${new Date().toLocaleDateString('en-IN', { year: 'numeric', month: 'long', day: 'numeric' })}`, size: 22, font: 'Calibri', color: '595959' })],
alignment: AlignmentType.CENTER,
spacing: { after: 240 },
}),
new Paragraph({ border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: '1F4E79' } }, spacing: { after: 240 } }),
];
// Patient info
const patientInfo = [
heading1('1. Patient Information'),
makeTable(
['Parameter', 'Details'],
[
['Chief Complaint', 'Slurring of speech, deviation of mouth to left side (2 days)'],
['Associated Symptoms', 'Weakness of right side of body'],
['Diagnosis', 'Coronary Artery Disease (CAD)'],
['Investigations', 'ECG, CT Brain, CBC, RFT, LFT, Serum Electrolytes'],
['Relevant Vitals', 'BP rising: 110/79 → 120/80 → 130/90 mmHg over 3 days'],
],
[2500, 7000]
),
spacer(),
];
// Prescribed drugs
const prescribedDrugs = [
heading1('2. Prescribed Medications'),
makeTable(
['Brand Name', 'Generic Name', 'Dose', 'Route', 'Frequency'],
[
['Inj. Optineurin', 'Calcium Pantothenate', '100 mg', 'IV', 'OD'],
['Inj. PAN', 'Pantoprazole', '40 mg', 'IV', 'OD'],
['Inj. Zofer', 'Ondansetron', '4 mg', 'IV', 'OD'],
['Tab. Ecospirin*', 'Aspirin (Labeled as Atorvastatin 150 mg - ERROR)', '75 mg', 'PO', 'OD (Morning)'],
['Tab. Shelcal', 'Calcium Carbonate', '1 Tab', 'PO', 'OD'],
['Tab. MVT', 'Multivitamin', '1 Tab', 'PO', 'OD'],
['Tab. Atorvas', 'Atorvastatin', '40 mg', 'PO', 'OD (Night)'],
['Inj. Monocef', 'Ceftriaxone', '1 g', 'IV', 'OD'],
['Tab. Minipress', 'Prazosin Hydrochloride', '1 mg', 'PO', 'BD'],
],
[1600, 3400, 1000, 900, 1600]
),
spacer(),
new Paragraph({
children: [
new TextRun({ text: '* ', bold: true, size: 20, font: 'Calibri', color: 'C00000' }),
new TextRun({ text: 'Tab Ecospirin is branded Aspirin — NOT Atorvastatin. See Intervention #1.', size: 20, font: 'Calibri', color: 'C00000', italics: true }),
],
spacing: { after: 120 },
}),
];
// Pharmacist interventions
const interventions = [
heading1('3. Pharmacist Interventions'),
heading2('Intervention 1 — Prescription Error: Ecospirin Labeled as "Atorvastatin 150 mg"'),
body('Priority: HIGH', true),
bullet('Tab Ecospirin is Aspirin (acetylsalicylic acid), NOT Atorvastatin.'),
bullet('The dose listed (150 mg) is non-standard for either drug. Aspirin for CAD = 75 mg/day.'),
bullet('Atorvastatin 40 mg (Tab Atorvas) is already prescribed separately — dispensing 150 mg would be a 3.75x overdose.'),
body('Action: Immediately clarify with prescriber. Correct label to Aspirin 75 mg PO OD. Confirm Atorvas 40 mg as the only statin.'),
spacer(),
heading2('Intervention 2 — Hypokalemia + Ondansetron: Risk of QT Prolongation'),
body('Priority: HIGH', true),
bullet('Serum K+ = 3.1 mEq/L (Normal: 3.5–5.0 mEq/L) — patient is hypokalemic.'),
bullet('Ondansetron (Inj. Zofer) is a known cause of QT interval prolongation.'),
bullet('Hypokalemia potentiates QT prolongation risk, increasing risk of ventricular arrhythmias (Torsades de Pointes).'),
body('Action: Correct potassium before continuing IV ondansetron. Obtain ECG. Monitor serum K+ daily.'),
spacer(),
heading2('Intervention 3 — Inappropriate Antihypertensive Choice for CAD'),
body('Priority: MEDIUM', true),
bullet('Prazosin (alpha-1 blocker) is NOT a first-line antihypertensive for CAD patients.'),
bullet('Evidence-based guidelines recommend beta-blockers, ACE inhibitors/ARBs, or CCBs for CAD-related hypertension.'),
bullet('Prazosin carries significant risk of "first-dose phenomenon" (orthostatic hypotension, syncope, dizziness).'),
body('Action: Recommend substitution with a beta-blocker (e.g., metoprolol) or ACE inhibitor (e.g., ramipril) as per CAD guidelines.'),
spacer(),
heading2('Intervention 4 — Medication Reconciliation: Telma on Counselling Card but Absent from Prescription'),
body('Priority: MEDIUM', true),
bullet('Patient counselling sheet lists Tab Telma (Telmisartan 40/25 mg) to be taken at discharge.'),
bullet('This drug does NOT appear on the in-hospital prescription chart — discrepancy identified.'),
body('Action: Reconcile both medication lists. Confirm with prescriber whether Telma is intended for discharge and update prescription accordingly.'),
spacer(),
heading2('Intervention 5 — Elevated Liver Enzymes on Statin Therapy'),
body('Priority: LOW', true),
bullet('AST = 40.2 U/L, ALT = 38.9 U/L (Normal: 0–35 U/L) — mildly elevated.'),
bullet('Atorvastatin is associated with hepatotoxicity at elevated doses.'),
body('Action: Recheck LFTs at 6–8 weeks of statin therapy. Advise physician if values exceed 3x upper limit of normal.'),
spacer(),
heading2('Intervention 6 — Elevated Eosinophils: Possible Drug Hypersensitivity'),
body('Priority: LOW', true),
bullet('Eosinophils = 12% (Normal: 0–8%) — eosinophilia present.'),
bullet('Ceftriaxone (beta-lactam antibiotic) can cause drug-induced hypersensitivity with eosinophilia.'),
body('Action: Monitor for signs of allergic reaction (rash, urticaria, fever). Document as a potential ADR signal.'),
spacer(),
heading2('Intervention 7 — Diagnosis-Treatment Mismatch: Possible Stroke'),
body('Priority: HIGH — Clinical Alert', true),
bullet('Presenting symptoms: slurring of speech + deviation of mouth + right-sided weakness = classic ischemic stroke presentation.'),
bullet('Diagnosis documented as "Coronary Artery Disease" — this may be an incomplete or incorrect primary diagnosis.'),
bullet('CT Brain was ordered, suggesting clinical suspicion for stroke.'),
body('Action: Alert treating physician. If stroke confirmed, antiplatelet therapy (Aspirin + Clopidogrel) and appropriate stroke management should be initiated.'),
spacer(),
];
// ADRs
const adrs = [
heading1('4. Adverse Drug Reactions (ADRs)'),
makeTable(
['Drug', 'Key ADRs', 'Monitoring'],
[
['Atorvastatin', 'Myalgia, rhabdomyolysis (rare), elevated LFTs, GI upset', 'LFTs, CK levels, muscle symptoms'],
['Pantoprazole', 'Hypomagnesemia (prolonged use), C. difficile risk, B12 deficiency', 'Mg²⁺ if long-term; stool if diarrhea'],
['Ondansetron', 'QT prolongation, serotonin syndrome, constipation, headache', 'ECG, serum K⁺ and Mg²⁺'],
['Ceftriaxone', 'Hypersensitivity (rash/anaphylaxis), biliary sludge, elevated LFTs', 'Allergy history, LFTs, CBC'],
['Prazosin', 'First-dose orthostatic hypotension, syncope, palpitations, edema', 'BP (sitting/standing), HR'],
['Calcium Carbonate', 'Constipation, hypercalcemia (high dose), milk-alkali syndrome', 'Serum Ca²⁺'],
],
[2000, 4000, 3500]
),
spacer(),
];
// DDIs
const ddis = [
heading1('5. Drug-Drug Interactions (DDIs)'),
makeTable(
['Drug Pair', 'Interaction', 'Severity', 'Action'],
[
['Ondansetron + Hypokalemia', 'Low K⁺ potentiates QT prolongation by ondansetron → arrhythmia risk', 'MAJOR', 'Correct K⁺; ECG monitoring'],
['Atorvastatin + CYP3A4 inhibitors (if added)', 'Increased statin plasma levels → myopathy/rhabdomyolysis risk', 'MAJOR', 'Avoid macrolides, azole antifungals with atorvastatin'],
['Prazosin + Pantoprazole', 'PPI may increase prazosin bioavailability → excessive hypotension', 'MINOR', 'Monitor BP closely'],
['Calcium Carbonate + Multivitamin (Fe/Zn)', 'Ca²⁺ competes with iron/zinc absorption', 'MINOR', 'Separate dosing by ≥2 hours'],
['Atorvastatin + Calcium Carbonate', 'Theoretical adsorption reducing statin absorption', 'MINOR', 'Separate by 2 hours'],
],
[2500, 3500, 1200, 2300]
),
spacer(),
];
// Priority summary
const prioritySummary = [
heading1('6. Priority Action Summary'),
makeTable(
['Priority', 'Issue', 'Recommended Action'],
[
['🔴 HIGH', 'Ecospirin labeled as "Atorvastatin 150 mg"', 'Clarify & correct to Aspirin 75 mg immediately'],
['🔴 HIGH', 'Stroke presentation vs. CAD diagnosis mismatch', 'Alert physician; consider stroke workup & antiplatelet therapy'],
['🔴 HIGH', 'Hypokalemia (K⁺ 3.1) + IV Ondansetron', 'Correct K⁺ before continuing ondansetron; obtain ECG'],
['🟠 MEDIUM', 'Prazosin not first-line for CAD hypertension', 'Switch to beta-blocker or ACE-I/ARB'],
['🟠 MEDIUM', 'Telma on counselling but absent from prescription', 'Reconcile and update medication orders'],
['🟡 LOW', 'Mild LFT elevation on statin', 'Repeat LFTs at 6–8 weeks; monitor'],
['🟡 LOW', 'Eosinophilia — possible drug hypersensitivity', 'Monitor for allergic signs; document ADR signal'],
],
[1200, 3800, 4500]
),
spacer(),
];
// Counselling points
const counselling = [
heading1('7. Patient Counselling Points'),
bullet('Take Aspirin (Ecospirin 75 mg) every morning AFTER breakfast to reduce stomach irritation.'),
bullet('Take Pantoprazole (PAN 40 mg) on an EMPTY stomach, 30 minutes before breakfast.'),
bullet('Take Atorvastatin (Atorvas 40 mg) at NIGHT — statins work best when taken in the evening.'),
bullet('Take Prazosin (Minipress 1 mg) lying down for the first dose to prevent dizziness/fainting (first-dose phenomenon).'),
bullet('Do NOT stop any medication without consulting your doctor, even if you feel better.'),
bullet('Lifestyle: Avoid smoking and alcohol. Follow a low-fat, high-fiber diet. Exercise regularly. Monitor BP, blood sugar, and cholesterol.'),
bullet('Report immediately: chest pain, sudden dizziness, muscle weakness, difficulty breathing, or signs of allergic reaction.'),
spacer(),
];
// Footer
const footerPara = new Paragraph({
children: [
new TextRun({ text: 'Pharmacist Intervention Report | Shadan College of Pharmacy | Page ', size: 18, font: 'Calibri', color: '595959' }),
new TextRun({ children: [PageNumber.CURRENT], size: 18, font: 'Calibri', color: '595959' }),
],
alignment: AlignmentType.CENTER,
});
// ─── Assemble document ────────────────────────────────────────────────────────
const doc = new Document({
creator: 'Adib Tahleel',
title: 'Pharmacist Intervention Report - CAD',
description: 'Clinical pharmacist intervention report for CAD case presentation',
styles: {
default: {
document: { run: { font: 'Calibri', size: 22 } },
},
paragraphStyles: [
{
id: 'Heading1',
name: 'Heading 1',
run: { bold: true, size: 28, color: '1F4E79', font: 'Calibri' },
paragraph: { spacing: { before: 360, after: 120 } },
},
{
id: 'Heading2',
name: 'Heading 2',
run: { bold: true, size: 24, color: '2E75B6', font: 'Calibri' },
paragraph: { spacing: { before: 240, after: 80 } },
},
],
},
sections: [
{
properties: {
page: {
margin: { top: 900, right: 900, bottom: 900, left: 900 },
},
},
footers: {
default: new Footer({ children: [footerPara] }),
},
children: [
...titleSection,
...patientInfo,
...prescribedDrugs,
...interventions,
...adrs,
...ddis,
...prioritySummary,
...counselling,
],
},
],
});
Packer.toBuffer(doc).then(buffer => {
fs.writeFileSync('/home/daytona/workspace/pharmacist-report/Pharmacist_Intervention_Report_CAD.docx', buffer);
console.log('Document created successfully.');
}).catch(err => {
console.error('Error:', err);
process.exit(1);
});
cd /home/daytona/workspace/pharmacist-report && node generate_report.js
python3 /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/pharmacist-report/Pharmacist_Intervention_Report_CAD.docx
python3 -c " from zipfile import ZipFile, BadZipFile path = '/home/daytona/workspace/pharmacist-report/Pharmacist_Intervention_Report_CAD.docx' try: with ZipFile(path) as z: names = z.namelist() print('Valid ZIP. Contents:') for n in names: print(' ', n) except BadZipFile: print('NOT a valid ZIP/docx') "
Pharmacist Intervention Report CAD
Word Document · DOCX