Browser-native DOM mapping writes Internal Medicine notes into eClinicalWorks v12 without a server API
Clinical documentation inside eClinicalWorks v12 rarely fails because clinicians lack dedication. It fails because a panel of chronic patients with heart failure, diabetes, hypertension, and kidney disease generates more structured narrative per visit than a 15-minute slot allows. Internists absorb that gap after clinic, finishing HPI and Assessment and Plan text late at night.
Merry AI closes that gap from inside the browser. eClinicalWorks v12 runs as a Chrome-delivered application, so every Progress Note section is rendered as HTML in the page the clinician already has open. The Merry AI Chrome Extension reads that page, locates the HPI and Assessment and Plan textareas, and writes the drafted note directly into them. No vendor API, HL7 interface, FHIR endpoint, or marketplace listing is involved.
From the eCW v12 server's point of view, nothing unusual happens. The content arrives as text entered into existing fields during an authenticated user session. eCW's own save, versioning, lock, and access log behavior runs exactly as it does when the clinician types.
Merry AI maps selectors to the eCW v12 Progress Note HPI and Assessment and Plan textareas
eClinicalWorks does not publish its internal CSS selectors, so Merry AI does not depend on a single hardcoded identifier. The extension resolves each target field through a layered strategy, and it validates that strategy against each practice's deployment during onboarding.
| Target Field | Primary Resolution | Fallback Resolution | Write Method |
|---|---|---|---|
| HPI textarea | Visible HPI section label traversed to its adjacent editable container | Stable name, id, or aria-label attributes confirmed in the deployment | Focus, set value, dispatch input and change events |
| Assessment textarea | Visible Assessment label traversed to its adjacent editable container | Stable attributes confirmed in the deployment | Focus, set value, dispatch input and change events |
| Plan textarea | Visible Plan label traversed to its adjacent editable container | Stable attributes confirmed in the deployment | Focus, set value, dispatch input and change events |
Framed Progress Note workspaces are handled by injecting the content script into every frame, so the extension can reach note fields even when the Progress Note is hosted inside a parent shell.
Event dispatch matters more than the write itself. Setting a field value without firing input and change events can leave eCW unaware that text exists, which risks unsaved content. Merry AI fires the same events a keystroke would, so eCW's client-side handlers register the text and persist it on save.
Encounter targeting prevents wrong-chart writes. The eCW v12 Encounter Tab lets clinicians view a prior Progress Note while working in the current one. Merry AI writes only into the active, editable note, confirms that the patient identifiers in the chart header match the encounter the draft was built for, and refuses to write into locked or historical notes.
Selector failures are never silent. If a v12 interface update moves or renames a field and the extension cannot resolve it with confidence, Merry AI writes nothing, alerts the clinician, and holds the section on the clipboard for manual paste. A missing paragraph is visible. A paragraph in the wrong field is a documentation error.
A G2211 longitudinal relationship statement sits atop the Assessment and Plan for chronic patients
HCPCS add-on code G2211 recognizes the complexity of being the continuing focal point for a patient's care, or of ongoing care for a single serious or complex condition. It is reported only with a base office or outpatient E/M code (99202 to 99205, 99211 to 99215) or, under CMS policy, a home or residence E/M code (99341, 99342, 99344, 99345, 99347 to 99350).
For patients flagged as chronic, Merry AI places a longitudinal relationship statement as the first line of the Assessment and Plan textarea, so a coder or auditor sees the basis for G2211 before reading individual problems. A typical draft reads: I am the continuing focal point for this patient's ongoing care, including longitudinal management of type 2 diabetes with CKD stage 3a, and I will continue to coordinate medication management, monitoring, and follow-up.
The statement is never automatic. It appears only when the clinician confirms an ongoing longitudinal relationship or management of a serious or complex condition. Isolated, self-limited visits receive no G2211 language, because narrative that does not reflect the actual relationship creates audit exposure rather than revenue.
Modifier 25 interactions are flagged, not hidden. CMS generally denies G2211 when the base O/O E/M carries modifier 25, with exceptions when the separate service is an annual wellness visit, vaccine administration, or a Medicare Part B preventive service. Merry AI surfaces that conflict for clinician and coder review rather than resolving it silently.
Internal Medicine templates encode NYHA, ADA, ACC/AHA, GOLD, and KDIGO criteria
Generic narrative weakens chronic care documentation because it omits the classification elements that support medical decision making, risk adjustment, and quality measures. Merry AI's Internal Medicine templates write criteria-driven text into each field.
- Heart failure notes capture NYHA functional class, LVEF range, phenotype (HFrEF, HFmrEF, HFpEF), volume status, and a GDMT checklist covering ARNI or ACEi or ARB, beta-blocker, MRA, and SGLT2 inhibitor.
- Type 2 diabetes notes capture A1c trend, hypoglycemia episodes, eGFR, urine albumin-to-creatinine ratio, and complication status, with medication changes and screening referrals in the Plan.
- Hypertension notes capture ACC/AHA stage, home BP log review, target-organ damage, and titration or secondary workup decisions.
- COPD and asthma notes capture GOLD group or GINA control level, exacerbation history, spirometry, and the inhaler regimen.
- CKD notes capture KDIGO GFR and albuminuria categories, progression risk, and ACEi or ARB optimization.
Behavioral health managed in primary care, including depression, anxiety, and substance use, is documented with DSM-5-TR aligned symptom duration, functional impairment, and safety screening in the shared progress note. Psychotherapy process content is never written into shared chart fields.
Audio lives in RAM and is discarded once the draft is complete
Merry AI processes visit audio in memory and releases the buffers once the structured draft is generated. No audio file or transcript is written to disk, cloud storage, or long-lived browser storage, and Merry AI operates under an executed Business Associate Agreement. The only durable record is the clinician-attested text inside eCW v12.
Contractual review remains the practice's responsibility. Practices should confirm that their eClinicalWorks agreement permits browser extensions in the clinical workstation environment, and Merry AI supplies architecture documentation to support that review.
Chrome DOM injection removes API fees while preserving field-level precision
| Dimension | Traditional API Marketplace Integration | Manual Copy-Paste | Merry AI Chrome DOM Injection |
|---|---|---|---|
| Setup path | Vendor approval, interface build, IT project | None | Install extension, validate field mapping |
| Recurring integration fees | Marketplace and interface fees common | None | None |
| Field precision | Depends on exposed endpoints | Clinician places each block by hand | HPI and A/P written to separate textareas |
| Wrong-chart protection | Interface-level patient matching | Relies on clinician attention | Active-note and header identity check before write |
| Audio and transcript custody | Often stored in vendor cloud | Depends on source tool | RAM only, discarded after draft |
| eCW audit log behavior | Logged as interface activity | Logged as user entry | Logged as user entry in authenticated session |
| Clinician time per note | Low after go-live | High | Low |
Clinician attestation remains the legal act that commits the record
No Merry AI draft is final until the internist reads it, edits it, and locks the eCW v12 Progress Note. The extension drafts. The clinician documents. That division keeps signature integrity, coding accountability, and medico-legal ownership exactly where they belong.




