Inferensys

Integration

AI Assistant for Therapists (EHR Copilot)

Build an embedded AI copilot that helps therapists with documentation, data lookup, and workflow navigation directly within their EHR interface, reducing administrative burden while maintaining clinical oversight.
Developer reviewing multi-agent chat interface on laptop, agent conversation logs visible, casual coding session at WeWork desk.
EHR COPILOT ARCHITECTURE

Embedded AI Assistance for Behavioral Health Clinicians

A practical blueprint for embedding an AI copilot directly into EHR interfaces like TherapyNotes and SimplePractice to assist clinicians without disrupting their workflow.

An effective EHR copilot integrates at three key surfaces: the clinical workspace, the client record, and the document composer. In platforms like TherapyNotes or TheraNest, this means connecting via secure APIs to read and write to objects like Client, Appointment, ProgressNote, and TreatmentPlan. The assistant should be invoked contextually—for example, from within a SOAP note editor to generate a "Subjective" section based on the last session's note, or from a client dashboard to summarize recent PHQ-9 trends.

Implementation typically involves a middleware layer that sits between the EHR and LLM APIs (like OpenAI or Anthropic). This layer handles PHI de-identification for external calls, maintains a vector index of practice-specific documents (consent forms, treatment protocols), and enforces a clinician-in-the-loop pattern where all AI-generated content is presented as a draft for review and edit. Key workflows include:

  • Data Retrieval: "Find all clients with a GAD-7 score increase >5 points in the last month."
  • Documentation Drafting: "Draft a progress note for today's CBT session focusing on cognitive restructuring."
  • Workflow Navigation: "Show me the steps to submit a prior authorization for this client's service."

Rollout requires a phased, role-based approach. Start with a pilot group of clinicians, enabling the copilot for low-risk tasks like data queries and note templating. Govern usage with audit logs that track all prompts and generated content, linked to the clinician's EHR user ID. Crucially, the system must never act autonomously; all writes back to the EHR (saving a note, updating a treatment plan) require explicit clinician approval. This architecture reduces documentation time from hours to minutes while keeping the clinician firmly in control of the clinical record.

ARCHITECTURAL BLUEPRINT

Where the AI Copilot Integrates: Key EHR Surfaces

Core Note-Taking Surfaces

The AI copilot integrates directly into the clinician's primary documentation workflows. This includes the Progress Note and Treatment Plan editors within the EHR, where the assistant can be invoked via a sidebar or inline command.

Key Integration Points:

  • SOAP Note Generation: Pulls forward data from previous sessions and structured assessments (e.g., PHQ-9 scores) to draft subjective, objective, assessment, and plan sections.
  • Treatment Plan Updates: Analyzes progress note narratives to suggest updates to goals, objectives, and interventions in the treatment plan module.
  • Chart Summarization: On demand, generates concise summaries of a client's recent history for handoffs or case consultations.

Implementation typically uses the EHR's front-end extension APIs (like SimplePractice's SDK or TherapyNotes' embedded app framework) to inject the UI and call backend services that securely process note text.

AI ASSISTANT FOR THERAPISTS

Highest-Value Use Cases for an EHR Copilot

An embedded AI copilot transforms the clinician's interface from a data-entry terminal into an intelligent partner. These are the most impactful workflows to automate and assist within platforms like TherapyNotes, TheraNest, SimplePractice, and Valant.

01

SOAP & Progress Note Generation

The copilot listens to session audio (with patient consent) or reads clinician dictation to draft a structured SOAP or Progress Note. It pulls relevant data from the client's history, past treatment plans, and previous notes to create a first draft, which the therapist reviews and signs off on in seconds.

15 min -> 2 min
Note completion
02

Intake Form Processing & Client Setup

Automates the manual data entry from uploaded intake PDFs or digital forms. The AI extracts key details (demographics, presenting problem, consent forms), populates the new client record, flags potential risks for review, and can even trigger a personalized welcome message or initial assessment assignment.

Batch -> Real-time
Onboarding speed
03

In-Session Data Retrieval & Synthesis

During a session, the therapist can query the copilot in natural language without navigating menus. Ask: "What was the client's PHQ-9 score 3 months ago?" or "Summarize the themes from our last 4 family sessions." The AI grounds its response in the client's full chart, pulling from notes, scores, and treatment plans.

Context-Aware
Chart synthesis
04

Treatment Plan Drafting & Updates

Assists in creating and updating individualized treatment plans. Based on intake notes, assessment scores, and progress note history, the AI suggests evidence-based goals, objectives, and interventions. It can also flag when a plan is due for review based on regulatory or payer requirements.

1 sprint
Development timeline
05

Secure Patient Communication Triage

Integrates with the EHR's client portal to triage routine messages. The AI can draft responses to common inquiries about appointments, billing, or resources for clinician approval, or escalate urgent clinical concerns. This keeps communication flowing without adding to the therapist's after-hours burden.

Same day
Response time
06

Billing & Coding Assistance

Reviews completed notes to suggest appropriate CPT and ICD-10 codes based on session duration, modalities used, and documented interventions. It can pre-scrub claims for common errors and help generate prior authorization narratives by pulling relevant clinical data from the record.

Reduce Denials
Primary impact
AI ASSISTANT FOR THERAPISTS

Example Copilot Workflows in Action

These concrete workflows illustrate how an embedded AI copilot integrates into a therapist's daily EHR use, automating administrative tasks and surfacing clinical insights without disrupting the therapeutic process.

Trigger: Therapist marks a session as 'Complete' in the EHR scheduler.

Context Pulled: The copilot automatically retrieves:

  • The client's demographic and historical diagnosis from the Client Record.
  • The session's scheduled duration and modality (e.g., Individual, Telehealth).
  • The therapist's pre-session note or planned interventions.
  • Structured data from the session (e.g., PHQ-9 score entered post-session).

Agent Action: Using a HIPAA-compliant LLM, the copilot generates a draft SOAP note:

  1. Subjective: Synthesizes a narrative from the therapist's brief typed or voice-recorded session summary key points.
  2. Objective: Populates observed affect, presentation, and scores from structured fields.
  3. Assessment: Analyzes progress against treatment plan goals, noting shifts or stagnation.
  4. Plan: Suggests next interventions, homework, or follow-up scheduling based on protocol.

System Update: The drafted note is inserted into the Progress Note composer as a draft, clearly watermarked. The note is not saved to the chart automatically.

Human Review Point: The therapist reviews, edits, and finalizes the draft. All edits are logged. The final note is saved with an audit trail indicating AI-assisted generation.

A GROUNDED, CLINICIAN-IN-THE-LOOP APPROACH

Implementation Architecture: Data Flow & System Design

A secure, event-driven architecture that embeds AI assistance directly into the therapist's workflow without disrupting clinical judgment or data integrity.

The copilot is triggered by clinician actions within the EHR interface—such as opening a client record, starting a progress note, or reviewing a treatment plan. A secure middleware layer, acting as a HIPAA-compliant orchestrator, captures these events via the EHR's API (e.g., TherapyNotes' REST API) or a secure webhook. This layer packages only the necessary, de-identified context—like client ID, note type, and previous session summaries—into a request to a Business Associate Agreement (BAA)-covered LLM provider such as Azure OpenAI or Anthropic. PHI is never sent directly to a third-party model; all calls are logged with full audit trails for compliance under 42 CFR Part 2.

The AI's response—a draft SOAP note, a suggested intervention, or retrieved data points—is returned to the middleware and presented to the therapist within a dedicated UI panel or inline suggestion in the EHR. The clinician retains full control: they can accept, edit, or reject the AI's output. Any accepted content is written back to the appropriate EHR object (e.g., a ProgressNote or TreatmentPlan record) via the same secure API, maintaining the system of record. For complex retrievals, we implement a RAG (Retrieval-Augmented Generation) system using a vector database like Pinecone, indexing practice-specific documents (consent forms, clinic policies) and anonymized, aggregated client history to ground suggestions in relevant context.

Rollout follows a phased governance model: starting with read-only data retrieval (e.g., "summarize last three sessions") to build trust, then progressing to draft generation with mandatory review (e.g., note drafting), and finally to automated workflow triggers (e.g., flagging a missed PHQ-9). Each step includes clinician training, clear opt-in/opt-out controls, and continuous monitoring of AI usage logs and feedback. The architecture is designed to fail gracefully; if the AI service is unavailable, the EHR workflow continues uninterrupted, preserving the clinician's primary tool.

EHR COPILOT INTEGRATION PATTERNS

Code & Payload Examples

API-Driven Note Drafting

This pattern uses a secure webhook to send session data to an LLM, returning a structured draft for clinician review and finalization within the EHR.

Typical Payload (Outbound to LLM Service):

json
{
  "session_id": "TN-2024-98765",
  "client_id": "C-12345",
  "clinician_id": "PROV-889",
  "session_date": "2024-05-15",
  "duration_minutes": 53,
  "modality": "Individual",
  "subjective": "Client reported increased anxiety around work deadlines, difficulty sleeping. Noted practicing grounding techniques twice this week with moderate success.",
  "objective": "Appeared fatigued, speech was rapid. PHQ-9: 12, GAD-7: 15 (previous: 14).",
  "assessment": "Generalized Anxiety Disorder, persistent. Symptoms exacerbated by occupational stress.",
  "plan": "Continue CBT for anxiety, introduce sleep hygiene protocol, schedule follow-up in 2 weeks.",
  "template": "SOAP"
}

Integration Point: Triggered upon session completion or via a "Draft Note" button in the EHR's progress note module. The returned draft is inserted into a draft state, requiring clinician sign-off, ensuring a human-in-the-loop for clinical accuracy and liability.

EHR COPILOT IMPACT

Realistic Time Savings & Operational Impact

This table illustrates the tangible workflow improvements and time savings an embedded AI assistant can deliver for therapists, based on typical documentation and operational tasks within platforms like TherapyNotes, TheraNest, and SimplePractice.

Workflow TaskBefore AIAfter AIImplementation Notes

Progress Note Drafting

15-20 minutes per note

5-7 minutes with AI draft

AI generates initial draft from session keywords; therapist reviews and finalizes.

Treatment Plan Updates

30-45 minutes per review

10-15 minutes with AI suggestions

AI analyzes progress notes to suggest goal updates and interventions.

Client Data Lookup

2-3 minutes of manual navigation/search

Seconds via natural language query

Therapist asks "Show me client X's last PHQ-9 scores" without leaving note screen.

Intake Form Processing

Manual data entry from PDF/forms

AI extracts and pre-populates EHR fields

Structured data (demographics, history) auto-filled; clinician verifies accuracy.

Billing Code Suggestion

Manual CPT/ICD-10 cross-reference

AI suggests codes based on note content & time

Reduces coding errors; final code selection requires clinician sign-off.

Patient Message Triage

Read & categorize all incoming messages

AI summarizes & prioritizes routine inquiries

Therapist addresses high-priority messages first; AI drafts responses for review.

Discharge Summary Compilation

60+ minutes compiling notes and data

20-30 minutes with AI-assisted synthesis

AI pulls key data points from entire case record into a structured template.

HIPAA, 42 CFR PART 2, AND CLINICIAN-IN-THE-LOOP

Governance, Compliance, and Phased Rollout

Deploying an AI copilot in a behavioral health EHR requires a security-first architecture and a controlled, trust-building rollout.

Every interaction must be designed for PHI protection. This starts with a Business Associate Agreement (BAA) with your LLM provider (e.g., Azure OpenAI, Google Vertex AI) and extends to your integration architecture: data is encrypted in transit and at rest, prompts and responses are never used for model training, and all AI activity is logged to a dedicated audit trail within your EHR or a separate SIEM. For platforms like Valant or SimplePractice, this means API calls must be tokenized and scoped to the minimum necessary data, and any AI-generated content written back to the EHR must be tagged with its AI origin for full traceability.

The rollout should be phased, starting with low-risk, high-reward assistive functions. Phase 1 often focuses on documentation support: the AI suggests a SOAP note objective section based on the session transcript, which the therapist reviews, edits, and finalizes. Phase 2 introduces data retrieval: a therapist can ask, "What was the client's PHQ-9 score trend over the last three sessions?" and the RAG system fetches and summarizes only that client's data. Phase 3 expands to proactive support, like flagging a missed assessment or suggesting a treatment plan update based on progress note themes—always requiring clinician review and sign-off.

Governance is continuous. Establish a clear protocol for handling AI errors or hallucinations, including a quick feedback mechanism within the EHR interface. Regularly review audit logs for unusual access patterns and re-evaluate prompt designs to minimize clinical risk. The goal is not to replace clinical judgment but to create a clinician-in-the-loop system where the AI acts as a tireless, knowledgeable assistant, and the therapist remains the ultimate decision-maker. This approach builds trust, ensures compliance with HIPAA and 42 CFR Part 2, and allows the practice to scale AI's benefits safely across documentation, care coordination, and patient communication workflows.

IMPLEMENTATION AND WORKFLOW DETAILS

Frequently Asked Questions

Common technical and operational questions about building and deploying an AI assistant directly within a therapist's EHR workflow.

Access is governed by the EHR's existing authentication and role-based permissions (RBAC). The integration uses the therapist's authenticated session via secure API calls (OAuth 2.0 is typical).

Data Flow:

  1. A therapist initiates a query (e.g., "Summarize last three sessions for Client X") from within the EHR interface.
  2. The request, containing only the necessary session IDs or client ID, is sent to a secure backend service controlled by your practice.
  3. This service calls the EHR's APIs (e.g., TherapyNotes' GET /client/{id}/progressnotes) to retrieve the specific, permitted data.
  4. The retrieved data is sent to a HIPAA-compliant LLM provider (like Azure OpenAI with a BAA) for processing, with all PHI stripped from prompts or logged via the provider's compliance tools.
  5. The generated response (e.g., a summary) is returned to the EHR interface for the therapist to review and optionally save to the chart.

Key Governance Points:

  • The AI never has direct, persistent access to the EHR database.
  • All data retrieval is scoped, auditable, and follows the principle of least privilege.
  • PHI is never used to train public models.
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.