Inferensys

Integration

AI Integration for Epic MyChart

A technical blueprint for enhancing the Epic MyChart patient portal with AI to automate patient communications, streamline intake, generate educational content, and improve care coordination.
Hardware engineer integrating LLM with IoT sensors, circuit boards on desk, soldering iron nearby, maker lab aesthetic.
ARCHITECTURE FOR PATIENT-FACING AUTOMATION

Where AI Fits into Epic MyChart

Integrating AI into Epic MyChart transforms the patient portal from a static information repository into an intelligent, proactive engagement layer.

AI integration connects to MyChart's core functional surfaces: the Secure Messaging API for patient-provider communication, the Questionnaire engine for digital intake, the Appointment and Health Maintenance modules for proactive outreach, and the Health Record via FHIR for contextual data retrieval. The goal is to embed AI agents that operate within these existing workflows—triaging incoming messages to appropriate staff, drafting responses for clinician review, processing form submissions to update the chart, and generating personalized educational content based on a patient's conditions, medications, and upcoming procedures.

A production implementation typically involves a middleware layer that subscribes to MyChart webhooks (e.g., new message, form submission) and uses FHIR APIs to retrieve relevant patient context from the EHR. An AI orchestration service processes the event—such as classifying a message urgency or extracting data from a PDF intake form—and either returns a suggested action to the Hyperspace inbox for staff approval or, for low-risk workflows, executes an automated response (e.g., sending post-op instructions). All AI-generated content is logged with an audit trail, and patient-facing outputs are configured to require a human-in-the-loop for clinical advice, adhering to Epic's governance model and avoiding unauthorized practice of medicine.

Rollout is phased, starting with high-volume, low-risk workflows like appointment reminder confirmations, medication renewal intake, and post-visit follow-up questions. This builds trust and demonstrates operational relief for staff drowning in message volume. The integration is governed through the same change control and compliance reviews as any Epic build, with prompts, data flows, and agent permissions documented in the health system's AI governance framework. The result is a MyChart experience that reduces administrative burden, improves response times, and keeps patients engaged without overloading clinical teams.

WHERE TO CONNECT AI TOOLS FOR PATIENT ENGAGEMENT

Key MyChart Surfaces for AI Integration

The Patient-Provider Communication Hub

The MyChart Inbox is the primary asynchronous communication channel, handling messages for clinical advice, prescription renewals, and administrative requests. AI can integrate here to triage, draft responses, and manage high-volume workflows.

Key Integration Points:

  • Inbound Message Triage: Classify message intent (e.g., medication_refill, symptom_check, billing_question) using the message body and metadata. Route urgent clinical messages to the top of the queue and administrative ones to appropriate staff or automated workflows.
  • Response Drafting: For common, non-urgent requests (e.g., normal_lab_result_follow_up, form_request), generate a clinician-reviewed draft response using patient context from the chart, saving 1-2 minutes per message.
  • Automated Follow-ups: Trigger structured follow-up messages based on care protocols (e.g., post-discharge check-ins, chronic condition monitoring) by listening for specific encounter codes or discharge events.

Implementation Note: All AI-generated content must be clearly flagged for clinician review before sending, adhering to draft status in the message API. Integrations typically use a webhook from the Inbox to an orchestration layer that calls LLMs and returns drafts via the Reply API.

PATIENT PORTAL AUTOMATION

High-Value AI Use Cases for MyChart

Integrate AI directly into the Epic MyChart patient portal to automate routine communications, enhance patient self-service, and reduce administrative burden on clinical and support staff.

01

Automated Patient Intake & Form Processing

Use AI to read and structure data from patient-submitted PDFs, scanned forms, or free-text fields in MyChart. Automatically populate the relevant Epic flowsheets, questionnaires (e.g., PHQ-9, GAD-7), and visit navigators, flagging missing or inconsistent data for staff review.

Hours -> Minutes
Data entry time
02

Intelligent Inbox Triage & Drafting

Deploy an AI agent to monitor the MyChart Inbox (BPA.Inbox). Classify and prioritize messages (e.g., prescription refills, clinical questions, billing), draft templated responses for staff approval, and route urgent clinical messages directly to the appropriate care team member.

Same day
Response time for routine queries
03

Personalized Post-Visit Follow-Up

Trigger AI-generated, condition-specific follow-up instructions and educational content after an encounter. Content is pulled from approved libraries and personalized with details from the visit (e.g., new medication, activity restrictions). Deliver via MyChart message or attached PDF, prompting for patient confirmation of understanding.

Batch -> Real-time
Care plan delivery
04

Chronic Care Management (CCM) Outreach

Automate monthly touchpoints for enrolled CCM patients. An AI workflow reviews recent Epic data (vitals, labs, encounters) to generate a personalized check-in message, documents the interaction in the CCM flowsheet, and flags any clinical changes for nurse review—streamlining billing and compliance.

1 sprint
Typical implementation timeline
05

Automated Appointment Preparation & Reminders

Go beyond simple date/time reminders. Use AI to analyze the upcoming appointment type (e.g., annual physical, cardiology consult) and the patient's record to send tailored preparation instructions, required forms, and pre-visit questionnaires via MyChart, improving visit efficiency and reducing no-shows.

06

Patient-Facing Q&A & Navigation Agent

Embed a secure, HIPAA-compliant chatbot within the MyChart interface. It answers common questions about clinic hours, billing, medication refill processes, and how to use portal features by querying internal knowledge bases and Epic's FHIR APIs, deflecting calls from the contact center.

30%+ Deflection
Common inquiry volume
PRACTICAL IMPLEMENTATION PATTERNS

Example AI-Powered MyChart Workflows

These workflows demonstrate how AI can be embedded into the MyChart patient portal to automate high-volume tasks, improve patient experience, and reduce administrative burden on clinical and support staff. Each pattern integrates with MyChart's APIs and data model to trigger actions, retrieve context, and write back results.

Trigger: A patient submits a new or updated intake form (e.g., Medical History, Review of Systems, COVID-19 screening) via the MyChart portal.

Context/Data Pulled: The AI agent retrieves the raw, unstructured text responses from the submitted form via the MyChart API, along with relevant patient context (age, sex, active problems, medications) from the Epic FHIR server.

Model or Agent Action: A specialized LLM (e.g., GPT-4, Claude 3) parses the free-text responses. It performs three key tasks:

  1. Structured Data Extraction: Identifies and extracts discrete clinical findings (e.g., "denies chest pain" -> chest_pain: false).
  2. Clinical Relevance Scoring: Flags urgent or concerning responses (e.g., "new onset shortness of breath") for immediate staff review.
  3. Note Drafting: Generates a concise, clinically formatted summary paragraph suitable for prepopulating the clinician's note in Hyperspace.

System Update or Next Step: The extracted structured data is written back to the appropriate Epic flowsheets or smart data elements. The urgency flag triggers an in-basket message to a nurse or MA for triage. The generated summary is attached to the patient's chart as a draft note linked to the upcoming appointment.

Human Review Point: All extracted data and the generated summary are presented to the clinician within Hyperspace for verification and sign-off during the patient encounter. The system logs all AI actions for auditability.

BUILDING A SECURE, SCALABLE AI LAYER FOR MYCHART

Implementation Architecture: Data Flow and Guardrails

A production-ready AI integration for Epic MyChart requires a clear data flow, strict governance, and a phased rollout to ensure security and user adoption.

The core architecture involves deploying an AI middleware layer that sits between MyChart's APIs and your chosen LLM (e.g., OpenAI, Anthropic, or a private model). This layer handles several critical functions:

  • Secure Data Routing: It acts as a secure proxy, ingesting patient-initiated messages, form submissions, and appointment data via Epic's FHIR API or Interconnect webhooks. All outbound calls to external AI services are stripped of direct identifiers where possible, using patient context tokens managed internally.
  • Context Enrichment: Before sending a prompt to the LLM, the middleware retrieves relevant, authorized patient context from the EHR—such as upcoming appointments, recent lab results, or medication lists—using the patient's unique ID. This grounds the AI's responses in the patient's specific clinical situation.
  • Tool Calling & Workflow Execution: For actions like scheduling or form completion, the AI agent uses defined tools (e.g., check_appointment_availability, update_intake_form) that call back into Epic's APIs. All such actions are logged and typically require a final human-in-the-loop approval or patient confirmation within MyChart before committing changes.

Data governance is enforced at multiple points. A strict prompt guardrail system validates every LLM call against policies for PHI handling, clinical safety, and organizational tone. For example, responses related to symptoms are always appended with standard disclaimers to contact care teams. All AI-generated content, along with the source patient data and prompts used, is written to an immutable audit log within your secure environment, linking back to the Epic audit trail. Access is controlled via the same RBAC (Role-Based Access Control) principles as Epic itself, ensuring only authorized systems and, by extension, AI agents can interact with patient data based on defined scopes.

A successful rollout follows a phased, use-case-specific approach. Start with low-risk, high-volume workflows like automated responses to routine scheduling inquiries or post-visit satisfaction surveys. This allows for monitoring, clinician feedback, and tuning of guardrails without impacting critical care. Subsequent phases can introduce more complex workflows, such as AI-drafting responses to patient medication questions for nurse review or summarizing pre-visit intake forms for the provider. Each phase includes defined quality gates—measuring accuracy, patient satisfaction, and clinician burden—before proceeding. This iterative, governed approach ensures the AI integration enhances the patient and provider experience within MyChart while maintaining Epic's rigorous standards for security and compliance.

IMPLEMENTATION PATTERNS

Code and Payload Examples

Automating Inbox Workflows

AI can triage incoming MyChart messages by analyzing intent and routing them to the appropriate staff or generating draft responses. This reduces manual sorting for clinical teams.

Typical Workflow:

  1. A webhook from MyChart fires on a new patient message.
  2. An AI service processes the message text to classify intent (e.g., medication_refill, symptom_question, appointment_request).
  3. Based on classification, the system can:
    • Route to a specific pool (e.g., refills to pharmacy team).
    • Retrieve relevant patient data (allergies, recent visits) via FHIR.
    • Generate a draft, clinician-reviewed response.

Example Python Webhook Handler:

python
from fastapi import FastAPI, Request
import httpx

app = FastAPI()

@app.post("/webhook/mychart-message")
async def handle_message(request: Request):
    payload = await request.json()
    message_text = payload.get("message_text")
    patient_id = payload.get("patient_id")
    
    # Classify message intent using LLM
    intent = await classify_intent(message_text)
    
    # Route based on intent
    if intent == "medication_refill":
        route_to = "pharmacy_queue"
        # Optional: Fetch current meds via FHIR
        # medications = await fhir_client.get_medications(patient_id)
    elif intent == "symptom_question":
        route_to = "triage_nurse_queue"
    else:
        route_to = "general_inbox"
    
    # Post routing decision back to Epic workflow engine
    await post_routing_decision(payload["message_id"], route_to)
    return {"status": "routed", "queue": route_to}
AI-ENHANCED PATIENT ENGAGEMENT

Realistic Time Savings and Operational Impact

Quantitative and directional impact of integrating AI into Epic MyChart workflows, based on typical pilot implementations. These metrics assume a phased rollout with clinician oversight.

WorkflowBefore AIAfter AIImplementation Notes

Patient Message Triage & Drafting

Manual review and response by clinical staff

AI-assisted triage with draft responses

Staff review and sign-off required; reduces initial drafting time by 60-70%

Pre-Visit Intake Form Processing

Manual data entry from PDF/paper forms into Epic

AI extracts and populates structured data fields

Requires validation in Hyperspace; cuts data entry time from hours to minutes

Post-Visit Follow-Up Instructions

Manual creation of custom instructions from visit notes

AI generates draft instructions from visit summary

Clinician edits and approves; enables same-day instead of next-day delivery

Chronic Condition Education

Manual search for and attachment of generic PDFs

AI drafts personalized content based on patient history

Content is reviewed and sent via MyChart; improves relevance and adherence

Appointment Scheduling & Reminders

Standard templated messages and manual call-backs

AI-powered conversational rescheduling and no-show prediction

Integrated with Cadence; reduces front-desk call volume by ~30%

Medication Renewal Request Routing

Manual inbox routing based on limited triage rules

AI scores urgency and routes to appropriate staff or auto-approves simple refills

Maintains pharmacist/physician approval loop for controlled substances

Billing Inquiry First Response

Staff manually review account and craft explanation

AI analyzes statement and Epic balance, drafts plain-language explanation

Financial counselor reviews and sends; resolves common inquiries without staff time

IMPLEMENTING AI WITH HEALTHCARE CONTROLS

Governance, Security, and Phased Rollout

A production-ready AI integration for Epic MyChart requires a security-first architecture and a phased rollout plan to manage risk and build user trust.

All AI interactions with MyChart data must be governed by Epic's existing role-based access control (RBAC), ensuring the AI only accesses data permissible for the acting user or service account. We architect integrations to use Epic's FHIR APIs and SMART on FHIR scopes, never storing raw PHI. AI-generated content is written back to the EHR as a draft within the appropriate module (e.g., In Basket, Patient Instructions), enforcing the standard clinician review and co-sign workflow before it becomes part of the legal medical record. Every AI action is logged to the Epic audit trail, creating a transparent chain of custody for all automated messages, summaries, or form processing.

A phased rollout is critical for adoption and risk management. We recommend starting with a low-risk, high-volume use case in a single pilot department, such as automating follow-up instructions for common post-visit scenarios. This initial phase validates the integration's data flows, performance, and user acceptance. Subsequent phases can introduce more complex workflows, like intelligent patient intake form triage or personalized educational content generation, expanding to additional departments or service lines based on measured impact and refined governance protocols.

Continuous monitoring is built into the operational layer. We implement human-in-the-loop (HITL) review queues for a percentage of AI outputs to monitor quality and catch edge cases. Performance is tracked against key operational metrics, such as In Basket response time reduction or patient call deflection rates, not just AI accuracy scores. This controlled, iterative approach ensures the AI augments—rather than disrupts—clinical workflows, building a foundation for scalable, trusted automation across the MyChart patient portal. For a deeper technical look at connecting AI to Epic's data layer, see our guide on AI Integration for Epic Cogito and SlicerDicer.

IMPLEMENTATION AND WORKFLOW DETAILS

Frequently Asked Questions

Common technical and operational questions about integrating AI into the Epic MyChart patient portal to automate workflows, enhance patient engagement, and reduce administrative burden.

This workflow automates the triage and drafting of responses for non-urgent patient messages, reducing clinician inbox burden.

  1. Trigger: A new patient message arrives in the MyChart InBasket via Epic's Interconnect or FHIR API.
  2. Context Pull: The integration retrieves the message content and relevant patient context from the EHR, including recent visits, problem list, medications, and allergies.
  3. AI Action: A configured LLM (e.g., GPT-4, Claude) classifies the message intent (e.g., medication refill, symptom question, appointment request) and drafts a context-aware, empathetic response. It adheres to guardrails to avoid clinical advice.
  4. System Update & Review: The drafted response is posted to a secure queue in a system like Epic's Hyperspace or a middleware dashboard. A clinician or staff member reviews, edits if necessary, and approves the response with one click, which is then sent back to the patient via the standard MyChart channel.
  5. Audit Trail: All AI-drafted messages, edits, and final sends are logged with user attribution for compliance.
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.