Skip to content

EHR Integration Architecture

eClinicalWorks v12 Integration for Internal Medicine

Chrome DOM injection writes clinician-attested G2211 notes into eCW v12 progress notes. Book your audit at https://cal.com/merryai/demo.

Key Takeaways
  • Notes write directly into the eClinicalWorks v12 progress note iFrame via client-side DOM injection, with no server API
  • G2211 attestations name the clinician as continuing focal point and state the prior visit count, and they are drafted only when the encounter supports longitudinal care
  • Every draft is labeled AI-assisted and requires clinician review and attestation before chart commit
Verified Metric
100%

Clinician Attestation

Every injected draft is reviewed and signed before commit.

Verified Metric
<500ms

DOM Field Write-Back

Direct client-side write into the active progress note iFrame.

Verified Metric
$15,600+

Annual G2211 Opportunity

Estimate for about 900 qualifying visits per year. Zero audio or transcript stored under executed BAA.

Merry AI writes Internal Medicine notes directly into the eClinicalWorks v12 progress note iFrame

Clinical documentation inside eClinicalWorks v12 rarely fails because clinicians lack dedication. It fails because a primary care visit covering diabetes, hypertension, CKD, and three medication changes generates far more narrative than a 15-minute slot allows. eClinicalWorks v12 runs as a Chrome-optimized HTML application. Its progress note is the central record for each encounter, which means the note editor already exists as live, editable elements in the browser.

Merry AI's Chrome Extension operates at that browser layer. After the visit, the clinician reviews a structured draft in the extension panel. The extension then writes each section into the matching editable field of the active progress note using standard client-side DOM methods. No HL7 interface, FHIR endpoint, or vendor marketplace connector is involved, and the practice's eCW server never receives a third-party API call.

Browser-native DOM mapping bypasses EHR marketplace paywalls entirely

Traditional EHR integrations route through vendor partner programs, interface engines, and per-provider connector fees. That process can take months of IT scoping before a single note moves. Because Merry AI writes into fields the clinician can already type into, it inherits the clinician's existing session, permissions, and audit trail. It does not require new credentials or server access.

The extension is pinned to the eCW v12 progress note iFrame selector

Directive P7 governs targeting. eClinicalWorks v12 can render the note editor inside an embedded iFrame. It can also show prior notes in the Encounter Tab while the current note is open. A loosely targeted extension could write into the wrong frame. Merry AI pins injection to the progress note editor iFrame through a practice-validated selector profile, which is confirmed against your eCW build during onboarding.

Each write follows four checks. First, the extension confirms it is on a progress note route and that landmark elements such as the Progress Notes header are present. Second, it resolves the pinned iFrame and accesses its document context. Third, it verifies the target field is editable and belongs to the currently open encounter, not a read-only historical view. Fourth, it inserts text at the mapped section, such as HPI, Assessment, or Plan, and highlights the inserted block for review.

If any landmark is missing, for example after an eCW layout update, the extension halts and copies the draft to the clipboard rather than guessing. A failed write is visible and recoverable. A misplaced write into another patient's frame is not acceptable, so the system is designed to fail closed.

G2211 attestations name the continuing focal point and state the prior visit count

HCPCS add-on code G2211 recognizes the complexity inherent to an E/M visit when the practitioner serves as the continuing focal point for all needed health care services, or provides ongoing care for a single serious or complex condition. It is reported with office or outpatient E/M codes 99202-99205 and 99211-99215. It is also reported with home or residence codes 99341, 99342, 99344, 99345, and 99347-99350. Severity of illness alone does not qualify a visit. The relationship and the longitudinal management role do.

Directive P1 defines the attestation format. When the encounter supports longitudinal care, Merry AI appends a G2211 attestation to the Assessment and Plan. The attestation names the treating clinician and states the number of prior visits with that clinician. The count is read from the visit history visible in the clinician's eCW session and shown to the clinician for confirmation before injection. A representative draft reads as follows.

[@portabletext/react] Unknown block type "calloutBlock", specify a component for it in the `components.types` prop

A zero prior visit count does not automatically block the code. CMS allows G2211 at a new patient visit when that visit begins an ongoing longitudinal relationship. In that case, the draft states the intent to serve as the continuing focal point rather than citing history, and the clinician confirms that intent.

The attestation is never boilerplate. Generic text such as 'I coordinated complex care today' reads as cloned documentation and invites payer scrutiny. Merry AI fills each bracket from content actually discussed in the encounter. If the transcript shows an episodic visit, such as an isolated URI in a patient who sees another PCP, no G2211 draft is generated.

Modifier 25 interacts with G2211. CMS does not pay G2211 when the E/M visit is reported with modifier 25. The exception, effective CY 2025, is when the modifier 25 E/M occurs on the same day as an Annual Wellness Visit, vaccine administration, or a Medicare Part B preventive service. Merry AI flags same-day procedure encounters so the clinician and coder resolve eligibility before claim submission.

Direct DOM injection outperforms copy-paste and marketplace APIs on eCW v12

CriterionTraditional API Marketplace IntegrationManual Copy-PasteMerry AI Chrome DOM Injection
Time to go liveWeeks to months of vendor and IT scopingImmediateSame day, extension install only
IT and firewall changesInterface engine, credentials, network reviewNoneNone
Recurring connector feesPer-provider or per-transaction fees commonNoneNone
Field targetingStructured, limited to fields the API exposesClinician pastes, often into one free-text boxSection-mapped writes into the pinned progress note iFrame
G2211 attestationRarely generated; typically left to clinicianManual typing or reused phrasesDrafted with clinician name and prior visit count, eligibility-gated
Wrong-chart riskLow, patient context passed by APIModerate, depends on clipboard disciplineLow, active-encounter verification before every write
Behavior after EHR UI updatesStable until API version changesUnaffectedFails closed and falls back to clipboard until selector profile is revalidated
AI provenance labelingVaries by vendorNoneAI-assisted label on every injected block until signature
Audio retentionVaries by vendorNot applicableZero-day retention under executed BAA

The trade-off is explicit. API integrations offer stable structured exchange but cost time and money. Copy-paste costs nothing but scatters text into the wrong sections and adds clicks. DOM injection removes the IT burden while keeping section-level placement, provided it is pinned and fails safely.

Internal Medicine notes must carry the longitudinal evidence that supports the code

A G2211 attestation is only as strong as the note beneath it. CMS and MAC guidance expects the record to show a medically necessary E/M visit, an assessment and plan for ongoing management, and evidence that the practitioner is the continuing focal point. In Internal Medicine, that evidence comes from specific clinical content.

Merry AI's Internal Medicine prompts capture the elements auditors look for. These include control metrics such as A1c trajectory and home blood pressure trends, staging such as CKD stage, NYHA class, and LVEF for heart failure, and polypharmacy reconciliation with the reason for each change. They also capture coordination with cardiology, nephrology, home health, or behavioral health, plus preventive planning for screening intervals and immunizations. When these elements are present in the note, the attestation summarizes them. When they are absent, the attestation is not drafted.

Zero-day audio retention shifts audit defense to the signed text

Merry AI processes session audio in transient memory and discards it after the draft is generated. No audio file or transcript persists under the executed BAA. This minimizes PHI exposure. It also means no recording exists to corroborate the visit if a claim is challenged, so the signed note and eCW's own edit metadata become the evidentiary record.

That is why attestation design matters. Specific, encounter-derived language, a confirmed visit count, and the clinician's signature create a defensible record. Generic text with no audio behind it does not. Practices should also run periodic internal audits that compare G2211 frequency, documentation quality, and denial patterns against CMS guidance.

Modifier 25 and 59 justifications are never auto-inserted

Billing modifiers require clinician judgment. Modifier 25 requires a significant, separately identifiable E/M service beyond the work of a same-day procedure. Modifier 59 requires a distinct procedural service under NCCI rules. Merry AI does not inject justification phrases for either modifier. It surfaces the relevant documentation for the clinician to confirm and leaves modifier selection to the clinician and coding team.

AI provenance labeling supports California and Texas disclosure expectations

California AB 3030 requires disclosure when generative AI produces patient clinical communications, unless a licensed provider reads and reviews the content first. Merry AI's mandatory review step satisfies that pathway for any patient-facing text, and every injected block carries an AI-assisted label in the review state. Texas has advanced its own AI transparency measures for health care. Practices in both states should align after-visit summaries and portal templates with local counsel guidance. The design principle is that no AI-generated text reaches the record or the patient without a named human reviewer.

A 15-minute workflow audit confirms selector fit and G2211 eligibility logic

The onboarding audit covers three items. First, we validate the progress note iFrame selector profile against your eCW v12 build. Second, we map your Internal Medicine template sections to injection targets. Third, we review the G2211 eligibility rules against your visit mix. Book your session at https://cal.com/merryai/demo, and browse specialty templates at https://templates.scribing.io.

Bespoke eClinicalWorks v12 Prompt Logic

Bespoke eClinicalWorks v12 Prompt Logic

Internal Medicine prompts structure chronic disease, polypharmacy, and care coordination into eCW v12 Assessment and Plan sections. Access 1,000+ EHR Clinical Templates to find or generate notes in 5 seconds.

Browser Native

Zero-IT Extension Architecture

Our Chrome Extension runs inside the clinician's active eClinicalWorks v12 browser window. It is pinned to the progress note iFrame and has no API fees, no server connector, and no firewall changes.

Reimbursement

CPT G2211 Complexity Defense

Drafts a G2211 attestation that names the treating clinician as continuing focal point and states the prior visit count. It is generated only when the encounter supports longitudinal care. Schedule a 15-Minute Workflow Audit today.

Clinician-Attested Final Record

Clinician-Attested Final Record

Every injected note is labeled AI-assisted and stays editable. Nothing enters the legal record until the clinician reviews it and signs, which preserves signature integrity and authorship provenance.

Explore More Knowledge

Related EHR & Clinical Integrations Guides

View all ehr & clinical integrations
Cerbo EMR AI Scribe for Functional Medicine
EHR Integration Architecture

Cerbo EMR AI Scribe for Functional Medicine

Merry writes supplement protocols and lab reviews into Cerbo Chart Parts. Book your audit at https://cal.com/merryai/demo.

Kaif R.•6 min read
Read guide
Elation Health AI Scribe: Chrome DOM Integration
EHR Integration Architecture

Elation Health AI Scribe: Chrome DOM Integration

Write primary care notes into Elation Health Visit Note blocks from a Chrome sidebar. Book your audit at https://cal.com/merryai/demo.

Kaif R.•6 min read
Read guide
TherapyNotes Integration for Behavioral Health Notes
EHR Integration Architecture

TherapyNotes Integration for Behavioral Health Notes

Merry writes mental status, interventions, and session times into TherapyNotes progress notes. Book your audit at https://cal.com/merryai/demo.

Kaif R.•6 min read
Read guide