CPOM Module 17, Section 5: Leveraging Artificial Intelligence and Automation Tools
MODULE 17: DATA ANALYTICS, INFORMATICS & DECISION SUPPORT

Section 5: Leveraging Artificial Intelligence and Automation Tools

The Augmented Pharmacist: Partnering with Technology to Enhance Safety, Efficiency, and Clinical Impact.

SECTION 17.5

Leveraging Artificial Intelligence and Automation Tools

A forward-looking exploration of emerging technologies, from Robotic Process Automation (RPA) for mundane tasks to machine learning models that can identify patients at high risk for adverse drug events.

17.5.1 The “Why”: The Future of Pharmacy is Augmented, Not Replaced

The conversation around Artificial Intelligence (AI) and automation is often dominated by a narrative of fear and replacement. This section is designed to offer a different, more optimistic, and far more realistic perspective. For the pharmacy profession, the future is not about pharmacists being replaced by robots; it is about pharmacists being augmented by intelligent tools. The true promise of these technologies is not to eliminate the pharmacist, but to finally liberate the pharmacist from the mundane, repetitive, and low-value tasks that currently consume so much of their time and cognitive energy.

For decades, we have asked our highly trained clinicians—possessing doctorates and years of specialized experience—to spend their days on tasks a machine could and should be doing: manually updating price lists, chasing down missing information for prior authorizations, and clicking through an endless series of low-utility alerts. This is a profound waste of human potential. AI and advanced automation represent our best opportunity to correct this misalignment. By delegating cognitive and digital grunt work to software “bots” and intelligent algorithms, we can unlock the full clinical capacity of our staff, allowing them to focus exclusively on the complex, high-judgment, and deeply human aspects of patient care that machines will never replicate.

This section is a look over the horizon. It explores the practical tools available today, like Robotic Process Automation (RPA), and the more advanced capabilities of Machine Learning (ML) that are beginning to reshape clinical practice. The goal is to provide you, as a leader, with the vision to see where the profession is going and the vocabulary to champion these transformative technologies within your own institution. The aim is not automation for automation’s sake, but the strategic application of technology to build a safer, more efficient, and more clinically impactful pharmacy enterprise.

Pharmacist Analogy: The Evolution from Counting Tray to Intelligent Dispenser

The journey of pharmacy automation provides the perfect analogy for the concepts in this section. It is a story of a gradual handoff of tasks from human to machine, with each step enabling the pharmacist to practice at a higher level.

  • Phase 1: The Manual Era (The Counting Tray). The pharmacist’s time is consumed by a purely technical, repetitive task. It is slow, prone to human error, and represents a low-value use of a clinician’s expertise.
  • Phase 2: The Automation Era (The Kirby Lester). The task of counting is automated. This is a “dumb” automation—it performs one physical function well, improving speed and accuracy. It frees up some of the pharmacist’s time but is still just a tool that executes a single step in a larger workflow.
  • Phase 3: The System Era (Robotic Dispenser – ScriptPro/Parata). This is a true leap. The robot isn’t just counting; it’s managing a complex workflow. It receives an electronic order, selects the correct NDC from hundreds of cells, counts, labels the vial, and transports it. This is analogous to the digital workflow automation we will discuss. It automates a multi-step process, not just a single task.
  • Phase 4: The Intelligent Era (The Augmented Future). Now, imagine this dispensing robot is connected to a powerful Machine Learning model—an AI “brain.”
    Before the robot even begins to count, the AI analyzes the new prescription for sertraline in the full context of the patient’s EHR. In milliseconds, it synthesizes information that a human might miss:
    • It cross-references the patient’s problem list and flags a history of QTc prolongation.
    • It checks the latest lab results and notes a decline in renal function.
    • It analyzes the patient’s genomic data and identifies them as a CYP2C19 poor metabolizer, suggesting a standard dose could lead to dangerously high serum levels.
    The system then presents a concise, synthesized alert to the pharmacist: “High Risk: This patient is a CYP2C19 poor metabolizer with a history of QTc prolongation. Recommend starting sertraline at 50% of the standard dose and scheduling a follow-up EKG.”

This is the augmented future. The robot handled the physical workflow. The AI handled the massive-scale data synthesis. The pharmacist is freed from both to make the final, critical clinical judgment. This is the ultimate partnership between human and machine, and it is the model for the technologies we will explore in this section.

17.5.2 Defining the Toolbox: AI, Machine Learning, and RPA Explained

The terms Artificial Intelligence, Machine Learning, and Robotic Process Automation are often used interchangeably, leading to significant confusion. As a leader, you must understand the distinct meaning and application of each. They are not the same; they are a set of related tools that can be used independently or in powerful combinations.

Artificial Intelligence (AI)

AI is the broadest concept. It is a branch of computer science dedicated to building “intelligent” machines capable of performing tasks that typically require human intelligence. This includes things like visual perception, speech recognition, decision-making, and language translation. Think of AI as the entire universe of “smart” computing.

Machine Learning (ML)

Machine Learning is a subset of AI. It is the engine that powers most modern AI applications. ML is the science of creating algorithms that allow a computer to learn from data without being explicitly programmed. Instead of writing code that says “if X and Y happen, then do Z,” you feed the ML model thousands of examples where X and Y happened, and what the outcome was. The model learns the patterns itself. All the predictive models we discussed in the previous section (forecasting, classification) are examples of ML.

Robotic Process Automation (RPA)

RPA is NOT a subset of AI. It is a separate and distinct technology. RPA is a software “bot” designed to automate mundane, repetitive, and rules-based digital tasks by mimicking human actions. An RPA bot can log into applications, copy and paste data, move files and folders, fill in forms, and extract data from documents. It is a “digital worker” that follows a pre-programmed script. It does not learn or adapt; it simply executes a workflow with perfect accuracy and speed. It is automation, not intelligence.

The Power Couple: Intelligent Automation (RPA + AI)

The true transformation begins when you combine these technologies. This is called Intelligent Automation or Intelligent Process Automation (IPA). In this model, RPA acts as the “hands” of the process, while AI acts as the “brain.”

Example: Automating Invoice Processing

  • An RPA bot monitors an email inbox for new invoices from wholesalers.
  • When a PDF invoice arrives, the bot passes it to an AI model with Optical Character Recognition (OCR) and Natural Language Processing (NLP) capabilities.
  • The AI “reads” the unstructured PDF, extracts the key information (Invoice Number, Date, Drug Name, Quantity, Price), and returns it to the bot as structured data.
  • The RPA bot then takes this structured data, logs into the hospital’s financial system, and enters the invoice information to schedule it for payment.

In this partnership, the RPA handled the repetitive digital tasks (monitoring email, data entry), while the AI handled the cognitive task (reading and understanding a document).

17.5.3 Robotic Process Automation (RPA): Your First Step into Intelligent Automation

For most pharmacy departments, the journey into advanced automation should begin with Robotic Process Automation. RPA is the “low-hanging fruit.” Its return on investment (ROI) is fast, tangible, and relatively easy to calculate. RPA projects are typically measured in weeks, not years, and they target the very tasks that are the biggest source of frustration, burnout, and human error among your staff. By automating these processes, you can achieve a triple win: improved efficiency, enhanced accuracy, and a significant boost in employee morale.

The key to successful RPA implementation is identifying the right processes to automate. Not all tasks are good candidates. The ideal process for RPA is:

  • Highly Manual and Repetitive: A human performs the same clicks and keystrokes over and over.
  • Rules-Based: The decisions made during the process are based on clear, objective rules, not subjective judgment.
  • Digital: The task involves interacting with digital systems (websites, spreadsheets, EHRs, etc.).
  • High Volume: The process is performed many times a day or week, so the time savings from automation are significant.
  • Stable: The underlying process and applications do not change frequently.
Masterclass Table: High-Impact RPA Use Cases in Pharmacy Operations

Below are several real-world examples of processes that are perfect candidates for RPA, illustrating the transformation from a manual, error-prone workflow to an automated, efficient one.

Use Case The Painful Manual Process (Before RPA) The Automated Workflow (After RPA) The Quantifiable ROI
Daily Wholesaler Price List Updates A pharmacy buyer or technician spends 1-2 hours every morning manually downloading a price change file (often a CSV or Excel sheet) from the primary wholesaler’s portal. They then painstakingly look up each NDC in the Pharmacy Information System (PIS) and manually type in the new acquisition cost and WAC. The process is tedious and highly prone to data entry errors. At 5:00 AM every day, an unattended RPA bot automatically logs into the wholesaler portal, navigates to the price file page, and downloads the latest file. The bot then opens the PIS, logs in with its own credentials, and iterates through the spreadsheet, updating the cost for every single matching NDC in minutes. It logs any NDCs that were not found in the PIS to an exception report for a human to review later. Time Savings: ~10 hours/week (~0.25 FTE).
Financial Impact: Eliminates costly data entry errors that lead to incorrect billing and budgeting. Ensures cost data is 100% accurate and up-to-date for financial reporting.
Drug Shortage Monitoring & Communication A pharmacy buyer manually checks multiple websites every morning (ASHP, FDA, wholesaler portals) for new or updated drug shortages. They must then cross-reference the shortage list against their formulary to see what is relevant, and then manually draft and send an email to a distribution list of stakeholders. An unattended RPA bot scrapes the ASHP and FDA websites every hour. It extracts the list of shortages and compares it against a master list of the hospital’s formulary drugs. If, and only if, a new shortage or an update to an existing shortage for a formulary drug is detected, the bot automatically drafts a standardized email alert and sends it to the pre-defined stakeholder list. Time Savings: ~5 hours/week.
Clinical Impact: Provides near-real-time awareness of critical shortages, allowing the pharmacy to get ahead of the problem and source alternatives before patient care is affected. Reduces the “noise” of irrelevant shortage alerts.
Prior Authorization (PA) Initiation A PA technician receives a rejected claim for a high-cost drug. They must manually log into the EHR, copy the patient’s name, DOB, and insurance info. Then they log into the specific PBM’s web portal, create a new PA, and paste in all the demographic information. They then have to manually type in all the drug, dose, and prescriber information. The PA technician receives the rejection and triggers an attended RPA bot from their desktop. The bot asks for the patient’s MRN. It then uses its credentials to open the EHR and the PBM portal simultaneously. It copies all the required demographic, insurance, and prescription data from the EHR and pastes it into the correct fields on the PBM portal’s web form, completing 90% of the PA initiation in under 30 seconds. The technician is then free to add the required clinical justification. Time Savings: Reduces the manual “clerical” time per PA from 10-15 minutes to under 1 minute.
Efficiency Impact: Drastically increases the number of PAs a single technician can process per day, reducing turnaround time for critical medications. Improves employee satisfaction by eliminating a hated task.
User Access Provisioning for New Hires When a new pharmacist is hired, the manager must submit separate IT tickets to request access to a dozen different systems: the EHR, the PIS, the ADC system, the IV workflow software, the controlled substance vault software, etc. It’s a slow, manual process that often leads to new hires not having the access they need on day one. The manager fills out a single “New Hire” form on the intranet. This triggers an RPA bot that logs into the IT ticketing system and creates all the necessary, properly formatted sub-tickets for each application, assigning them to the correct IT teams. The bot can even go a step further and, once access is granted, log into some systems and perform the basic user setup itself. Time Savings: Saves hours of manager and IT time per new hire.
Operational Impact: Ensures new employees are fully equipped and ready to work on their first day, improving the onboarding experience and speeding up their time to productivity.

17.5.4 Machine Learning in Action: Augmenting the Clinical Pharmacist

If RPA automates the hands, Machine Learning (ML) automates and augments the brain. ML models excel at finding complex patterns in vast datasets that are beyond the capacity of a human to detect. By learning from the data of thousands of past patients, an ML model can provide incredibly nuanced, patient-specific predictions and insights in real-time. This allows the clinical pharmacist to move from reacting to problems that have already occurred to proactively intervening on patients who are at the highest risk of future harm.

These tools are not here to replace clinical judgment; they are here to supercharge it. An ML model can instantly synthesize thousands of data points into a single risk score, presenting it to the pharmacist who then uses their experience, empathy, and patient-specific knowledge to make the final, definitive clinical decision.

Masterclass Table: Emerging ML Applications in Clinical Pharmacy
Application How It Works (The ML Model) The Augmented Pharmacist’s Workflow The Transformative Impact
Real-time Adverse Drug Event (ADE) Prediction A supervised learning model (often a “recurrent neural network” or “gradient boosting machine”) is trained on historical EHR data. It continuously scans the live data feed for current inpatients, analyzing hundreds of variables in real-time: vital signs, lab values, medication orders, nursing notes, etc. A pharmacist on the medical/surgical floor receives a targeted alert on their mobile device: “Patient in Room 204, John Doe, has a 92% predicted probability of developing Acute Kidney Injury (AKI) in the next 24 hours. Key contributing factors: vancomycin + piperacillin-tazobactam therapy, rising serum creatinine, age >65.” The pharmacist, armed with this early warning, immediately reviews the patient’s chart, calls the physician, and recommends switching to a less nephrotoxic antibiotic. Shifts the paradigm from detecting and treating ADEs after they have already caused harm, to proactively preventing them before they ever occur. This has massive implications for patient safety, length of stay, and cost of care.
Personalized Dosing & Pharmacogenomics (PGx) An ML model is trained on data that links patient genotypes, phenotypes, demographics, and clinical data to drug efficacy and toxicity. It goes beyond simple single-gene associations (e.g., CYP2C19 and clopidogrel) to understand complex, multi-gene interactions. A physician orders warfarin for a patient with newly diagnosed atrial fibrillation. The order is placed in a “pending” status. The ML model instantly analyzes the patient’s available genomic data, renal function, liver function, age, and interacting medications. It returns a recommended starting dose: “Recommend initial warfarin dose of 3.5 mg daily. This patient’s VKORC1 and CYP2C9 genotypes suggest high sensitivity. Predicted stable maintenance dose is 4 mg/day.” The pharmacist reviews and validates this AI-driven recommendation before approving the order. Moves beyond one-size-fits-all dosing to truly personalized medicine. Drastically reduces the time and risk associated with the trial-and-error titration period for high-risk drugs, reducing bleeding events, clotting events, and hospitalizations.
Antimicrobial Stewardship: Sepsis Phenotyping & Optimal Regimen Selection An unsupervised learning (clustering) model analyzes thousands of historical sepsis patient records. It finds hidden patterns in the data and groups patients into distinct “phenotypes” that are not clinically obvious (e.g., “hyperinflammatory,” “immunosuppressive,” “coagulopathic”). A separate, supervised model can then predict the optimal empiric antibiotic regimen for each phenotype based on historical outcomes and the hospital’s specific antibiogram data. A “Code Sepsis” is called in the ED. As the initial data comes in, the AI classifies the patient: “Patient matches Sepsis Phenotype Gamma (immunosuppressive). High probability of ESBL-producing organism. For this phenotype, the model predicts a 95% probability of bug-drug match with Meropenem, versus only 70% with standard Piperacillin-Tazobactam.” The stewardship pharmacist uses this insight to guide the ED physician to the optimal empiric therapy from the very first dose. Combats antimicrobial resistance by moving beyond overly broad empiric therapy. Ensures the most critically ill patients get the most effective antibiotic tailored to their specific type of sepsis and local resistance patterns from hour one, directly improving mortality.

17.5.5 The Implementation Roadmap and Ethical Frontier

Embracing these transformative technologies can feel overwhelming. It is not a journey to be undertaken lightly or all at once. It requires a thoughtful, strategic approach that starts with simple, high-value projects and gradually builds organizational capacity and trust. As a leader, your role is to be the champion and the guide, steering your department toward this future while navigating the very real technical, financial, and ethical challenges.

A Practical Roadmap to an Augmented Future
  1. Step 1: Start with RPA. This is the crucial first step. Identify the most painful, manual, and repetitive digital tasks in your department. Automating a process like price updates with RPA is the “low-hanging fruit.” It delivers a fast, easily calculated ROI, builds credibility with leadership, and gets your team comfortable with the concept of digital workers.
  2. Step 2: Create a Process Inventory. Work with your team to map out your key operational workflows. Where are the bottlenecks? What tasks do your most skilled people hate doing? Where do errors most frequently occur? This inventory becomes your roadmap for future automation and AI projects.
  3. Step 3: Forge a Partnership with IT and Analytics. You are the pharmacy subject-matter expert. You understand the “why” and the “what.” Your hospital’s IT and data analytics teams are the technical experts who understand the “how.” You cannot succeed without them. Frame your needs as a collaborative effort to solve a business problem, not just a request for a new piece of software.
  4. Step 4: Build a Data-Driven Business Case. Use the skills from the previous sections. To get funding for an ML project to predict readmissions, you need to present a clear financial case. Use your historical data to calculate the current cost of CHF readmissions. Project the reduction in readmissions based on pilot studies, and calculate the expected savings and ROI.
  5. Step 5: Pilot, Learn, and Scale. Don’t try to solve everything at once. Start with a small pilot project—perhaps an ADE prediction model for a single nursing unit. Measure its performance, learn from the challenges, demonstrate its value, and then use that success to justify a broader rollout.
The Ethical Frontier: Navigating the Challenges of AI

As we embrace these powerful tools, we must also confront the profound ethical challenges they present. As a leader, you must be a voice of caution and conscience, ensuring that these technologies are implemented responsibly.

  • Algorithmic Bias: An ML model is only as good as the data it is trained on. If your hospital’s historical data reflects unconscious biases in care (e.g., certain populations being undertreated for pain or having their symptoms dismissed), the AI will learn and perpetuate and amplify these biases, codifying them into the clinical workflow with a false veneer of objectivity. You must actively work to identify and mitigate bias in your data.
  • The “Black Box” Problem: Some of the most powerful ML models (like deep neural networks) are incredibly complex. It can be difficult or impossible to understand exactly *why* the model made a specific prediction. This lack of interpretability is a major challenge. As a clinician, you must be comfortable questioning and, when necessary, overriding an AI’s recommendation, and you must foster a culture where your staff feels empowered to do the same.
  • Accountability and Liability: If an AI system recommends a dose of a medication that subsequently harms a patient, who is at fault? The hospital that bought the system? The software vendor that created the algorithm? The data scientist who trained the model? Or the pharmacist who ultimately approved the AI-recommended dose? These are uncharted legal and ethical waters that our profession must navigate carefully.
  • Data Privacy: AI models require vast amounts of patient data to be trained. This creates new and significant risks to patient privacy. The governance and security frameworks we discussed in the previous section become even more critical in the age of AI.

Ultimately, our professional obligation remains unchanged. These tools—from the simplest RPA bot to the most complex neural network—are just that: tools. They do not possess wisdom, empathy, or ethical judgment. The ultimate responsibility for patient care will always rest with the human clinician. Our challenge and our opportunity are to learn to wield these powerful new tools with the same skill, care, and ethical rigor that our profession has always demanded.