Article
Here's something most teams learn too late: generating a good clinical note is the easy half. Getting it into the chart is where AI scribe builds stall, because every EHR wants the note in a different shape.
Clinicians feel it too. Only 44% say their EHR integrates the way they expect with outside organizations [1]. This guide gives you the write path for each of the top 10 US EHRs, a four-step mapping pipeline with real code, and free schemas you can copy from GitHub.
Key Takeaway: EHR integration for an AI clinical note means turning one generated note into the exact shape a given EHR accepts: a whole document, section-by-section text, or discrete fields like problems, allergies and vitals. Of the 10 most-used US EHRs, only Epic, Oracle Health and ModMed document a way for an outside app to file a whole note. MEDITECH Expanse and athenahealth take it one section at a time, and the other five accept discrete data only or keep write access behind partner programs. The pattern that works is note, then an EHR-specific JSON schema, then a FHIR or vendor payload, then clinician review.
What EHR Integration Means for an AI Clinical Note
For an AI note, EHR integration is a write problem, not a read problem. Most certified FHIR APIs were built so apps could read patient data. Writing a note back is a much shorter list of endpoints, and it changes from vendor to vendor.
Market share tells you where to start. Epic runs 43.7% of US acute-care hospitals [2] and 19.5% of ambulatory installs [3]. If you support Epic well, you cover a large share of the market. The next nine EHRs each need their own mapping.
The standard container for a note in FHIR is the DocumentReference resource [4]. Not every EHR accepts it from outside apps, which is why the rest of this guide exists.
Why One Generated Note Becomes Many Payloads
An AI scribe returns a note as Markdown: headings, bullets, a plan. EHRs don't store Markdown. They store one of these:
What the EHR stores | Example | What you send |
|---|---|---|
A whole document | Epic progress note | Base64 text in a DocumentReference |
Narrative per section | athenahealth HPI, ROS, exam, assessment | One request per section |
Coded resources | Problems, allergies, vitals | Condition, AllergyIntolerance, Observation |
So one visit can turn into a DocumentReference plus several Condition and Observation resources. Your code has to know which ones each EHR will take.
Where Note Text Ends and Discrete Data Begins
Narrative is the story of the visit: history of present illness, review of systems, exam, assessment and plan. Discrete data is the structured part: problems, allergies, vitals, medications and orders.
Discrete writes rarely go straight into the chart. Epic sends new problems and allergies to a holding area until a clinician reconciles them [5]. That is expected behavior, not a bug.
Codes need care. A good extraction only returns an ICD-10 code if the note states one. athenahealth requires SNOMED codes for problems [6], so plan your own mapping step for that.
Which of the Top 10 EHRs Accept a Note From an Outside App
Most EHR integration guides treat integration as one problem you solve once. For an AI note it is 10 different problems. In Sully's review of public developer docs for the 10 most-used US EHRs (checked 10 November 2026), only three document a way for an outside app to file a whole note: Epic, Oracle Health and ModMed. Two more, MEDITECH Expanse and athenahealth, take the note one section at a time. The other five take discrete data only, keep write endpoints behind a partner program, or have no public write path yet.
The list below ranks hospital EHRs by KLAS share [2] and ambulatory EHRs by Definitive Healthcare installs [3].

EHR | Market position | Whole note | Section text | Discrete data | How |
|---|---|---|---|---|---|
Epic | #1 hospitals and ambulatory | Yes | No | Yes | FHIR DocumentReference |
Oracle Health | #2 hospitals | Yes | No | Yes | FHIR DocumentReference, final only |
MEDITECH Expanse | #3 hospitals | No | Yes | Limited | FHIR Observation per section |
TruBridge | #4 hospitals | No | No | No | Read-only FHIR |
eClinicalWorks | #2 ambulatory | No | No | Yes | FHIR creates |
athenahealth | #3 ambulatory | No | Yes | Yes | athenaOne chart API |
NextGen | #5 ambulatory | Partner | Partner | Partner | Enterprise API |
ModMed | #6 ambulatory | Yes | No | Yes | EMA Composition |
Veradigm | #7 ambulatory | Partner | Partner | Partner | Unity API |
Greenway | #10 ambulatory | Partner | Partner | Partner | GAPI |
EHRs That Take the Whole Note Through FHIR DocumentReference
Epic accepts a note through POST DocumentReference as base64 text/plain. Send docStatus: preliminary and the note files as unsigned for the clinician to review and sign [5].
Oracle Health (formerly Cerner) also takes a DocumentReference, but the content type must include a charset, like text/plain;charset=utf-8. There is no draft option, so provider-launched apps must file it as final [7].
ModMed takes the note as a Composition through its EMA Proprietary API, in a section coded LOINC 18776-5. It lands in the visit's Additional Visit Note if a visit is open [8].
EHRs That Take the Note One Section at a Time
MEDITECH Expanse writes narrative into one section of a document the clinician already has open, using POST Observation. You pick the section by LOINC code, and MEDITECH holds the text until the clinician approves it [9].
athenahealth writes into an open encounter one section at a time with PUT calls to /hpi, /reviewofsystems and /physicalexam, plus the assessment. These are athena's own chart APIs, not FHIR, and production use needs a Platform Services contract [6].
EHRs That Only Take Discrete Data
eClinicalWorks documents FHIR creates for problems, allergies, vitals, medications and orders. It lists no create call for clinical notes [10].
The practical route today is a PDF DocumentReference attached to the patient, plus discrete writes. Confirm with eCW whether a PDF can attach to the visit's progress note.
EHRs With No Public Note Write Path Yet
NextGen, Veradigm and Greenway all keep public FHIR read-only. Each has a proprietary API that can write, but the note endpoints are only shared after you join a partner program [11][12][13].
TruBridge says its FHIR API is read-only [14]. For now, give clinicians a clean, copy-ready note, or talk to TruBridge about a partnership.
How to Map an AI Clinical Note Into EHR Fields in Four Steps

Every example below comes from the open Clinical Scribe Kit on GitHub. Set your keys once:
1. Generate the Note From a Template
Send a transcript and a template to POST /v3/notes. The kit ships 19 templates, from outpatient SOAP to specialty notes.
You get back a Markdown note. Keep it as the source of truth for everything that follows.
2. Split the Note With an EHR Specific JSON Schema
This is the mapping step. Send the note and a JSON Schema to POST /v1/utils/text-to-json, and you get back JSON in the shape that EHR accepts.
The schema is where each EHR's rules live. Epic's schema asks for one fullNote string. MEDITECH's asks for four separate narratives:
Both schemas also pull the same discrete fields: problems, medications, allergies, vitals and orders. Two tips: allow null for anything that might be missing, and leave out a top-level $schema key.
3. Build the FHIR API Payload the EHR Will Accept
The kit's to_fhir.py turns the extracted JSON into a FHIR R4 bundle. It reads an ehr.json file for that EHR and only emits resources that EHR accepts from outside apps.
For Epic, the note part of that bundle looks like this (trimmed):
Medications and orders stay in the note text for Epic, since Epic treats those resources as read-only for outside apps [5].
4. Send It With Your App's Token and Hold It for Review
Sending the bundle needs your own app registration and OAuth token with each EHR. A sandbox is not production: each health system or practice has to switch your app on.
Keep a clinician in the loop. Epic and MEDITECH can hold your note for sign-off. Oracle Health files it as final [7], so put the review screen in your app before you send.
EHR by EHR Mapping Notes for the Top 10
Each EHR has its own folder in the kit's ehr-schemas directory with a README, a schema.json and an ehr.json. Here is the short version of each.
Epic Integration for Clinical Notes
Note types: Epic lists LOINC types like 11506-3 progress note, 34117-2 H&P and 11488-4 consult note [5].
Format: plain text only. RTF and HTML are rejected, and only the first attachment is saved.
Discrete data: problems and allergies go to a reconciliation queue. Vitals write one flowsheet value per call on open encounters.
Oracle Health and Cerner FHIR API Notes
Type codes: use LOINC or the health system's own code set 72, not both. Codes differ per customer, so plan a mapping table [7].
Required fields include
context.period.endand, for provider-launched apps,author.Medications: writes only for patient-reported records.
MEDITECH Expanse Section Writes
Section codes: 10164-2 HPI, 10187-3 ROS, 29545-1 physical findings, 51847-2 assessment and plan [9].
Target:
focusmust point at the in-progress document. MEDITECH replies202 Acceptedand waits for approval.Check per hospital: some MEDITECH pages still describe these APIs as view-only.
athenahealth API Section Writes
Read first: GET each section with
showstructured=true, then send the whole structure back. athena removes anything you leave out [6].Labeling: athena recommends marking text that came from an API.
Discrete data: problems and encounter diagnoses need SNOMED codes.
eClinicalWorks API Discrete Writes
Writes: problems, allergies, vitals, medication reconciliation, medication orders and service requests [10].
Specs: field-level docs are PDFs behind the developer portal, and each practice activates your app.
ModMed EMA Composition Notes
Headers: every call needs a bearer token and an
x-api-keyheader [8].Staff notes: a section coded 69730-0 goes to transcriptionist notes instead of the visit note.
Files:
POST DocumentReferenceattaches a PDF from a presigned URL.
NextGen, Veradigm and Greenway Partner APIs
NextGen: join the API Distributor Program to see Enterprise API routes. Fees can depend on whether you write [11].
Veradigm: writes go through the Unity API. TouchWorks now belongs to Altera Digital Health [12].
Greenway: FHIR write-back is on its roadmap. GAPI can write, with different calls for Intergy and Prime Suite [13].
TruBridge Read Only FHIR
Today: FHIR is read-only [14]. Ship a copy-ready note with clear section headings so the paste takes seconds.
Next: ask TruBridge about partnership or interface options if your customers run it.
Common EHR Integration Mistakes With AI Notes
Filing a Note as Final Before a Clinician Reviews It
Oracle Health has no draft state for provider-launched apps [7]. If your app sends straight from the scribe, an unreviewed note becomes a signed record. Put the review step before the send button.
Writing Discrete Data the EHR Treats as Read Only
Epic won't accept medication or order writes from outside apps, and MEDITECH won't accept problems or allergies [5][9]. Filter by each EHR's writable resources (the kit's ehr.json lists them) and leave the rest in the note text.
Assuming Every Customer Uses the Same Note Type Codes
Epic lets health systems map their own note types, and Oracle Health uses per-customer codes [7]. Store the note type per customer, not per EHR.
Trusting Model Section Mapping for Exact Characters
Sully's Text to JSON docs are direct about this: schema validation checks structure and types, not clinical correctness, and model-based section mapping does not guarantee exact characters. Compare each extracted section with the source note before you file it.
Build the Note and the Mapping on the Sully API
The pipeline above runs on two calls to Sully's clinical AI API: one to write the note, one to map it. Add batch or streaming transcription if you start from audio.
Free Schemas and Code on GitHub
The Clinical Scribe Kit is MIT licensed. It has the 10 EHR folders, 19 note templates, to_fhir.py, and 536 openly licensed test visits with no real patient data.
It also has a one-prompt build recipe. Paste BUILD_PROMPT.md into Claude Code or Cursor and you get a working scribe app with EHR JSON output. The ambient scribe kit on sully.ai/build walks through it with a video and a live demo.
Get Started
Create a key at dashboard.api.sully.ai, sign the BAA during setup, and run the kit against your sandbox EHR.
The API docs cover every endpoint used here.
FAQ
What does EHR integration mean?
EHR integration means connecting outside software to an electronic health record so data can move in and out of it. For an AI scribe, the hard part is the write direction: getting a generated note and its discrete facts into the chart in the shape that EHR accepts. Each of the top 10 EHRs handles that differently.
What are the top 3 EHR systems?
In US hospitals the top three are Epic, Oracle Health and MEDITECH, per KLAS [2]. In ambulatory care the top three by installs are Epic, eClinicalWorks and athenahealth, per Definitive Healthcare [3]. Epic leads both markets.
How do you integrate with an EHR?
Register an app with the EHR's developer program, get sandbox access, then build against its FHIR API or its own API. For AI notes, generate the note, split it with an EHR-specific schema (Sully's Text to JSON does this), build the payload, and have each customer enable your app in production.
Can an AI scribe write notes directly into Epic?
Yes. Epic accepts a plain-text note through FHIR DocumentReference and can file it as unsigned so the clinician reviews and signs it [5]. Problems and allergies can be written too, but they land in a reconciliation queue.
What is the difference between FHIR and HL7 v2 for clinical notes?
HL7 v2 is the older message format hospitals use for feeds like admissions, lab results and transcribed documents, usually through an interface engine. FHIR is a REST API with JSON resources, and it is the route most outside apps use today. For an AI note, a FHIR DocumentReference or the vendor's own API is usually the faster path.
Sources
[1] KLAS Research — EHR Interoperability 2024
[2] Fierce Healthcare (KLAS data) — Epic continues to grow EHR market share as it makes gains with small health systems
[3] Definitive Healthcare — Top ambulatory EHR systems
[4] HL7 International — FHIR R4 DocumentReference
[5] Epic on FHIR — DocumentReference (Clinical Notes) specification
[6] athenahealth — API onboarding overview
[7] Oracle Health — Millennium Platform APIs: REST endpoints
[8] ModMed — Create Composition, EMA API reference
[9] MEDITECH Greenfield — US Core STU7
[10] eClinicalWorks — FHIR developer documentation
[11] NextGen Healthcare — Developer Program
[12] Veradigm — FHIR process overview
[13] Greenway Health — Frequently asked questions for developers
[14] TruBridge — FHIR API
Article


