Browser-native DOM mapping writes Family Medicine notes into DrChrono without a server API
Family Medicine documentation inside DrChrono rarely fails because clinicians lack dedication. It fails because a single 20-minute visit can hold an acute upper respiratory infection, a diabetes follow-up, a PHQ-9 rescreen, and a flu vaccine, and each problem needs its own history, exam findings, and decision logic. Typing that into four separate note fields after clinic is where evening charting begins.
Merry AI runs as a Chrome Extension inside the clinician's authenticated DrChrono tab. It listens to the encounter, drafts a SOAP note, and writes each section directly into the matching DrChrono clinical note field through DOM property assignment. No DrChrono API key, marketplace listing, or server-to-server connection is involved, and no clinical text passes through the operating system clipboard.
The extension binds every draft to one patient and one encounter before writing a single character
Encounter binding happens before injection. The extension reads context identifiers already present on the DrChrono page, such as patient and appointment identifiers in the URL or page metadata. These are the same context values DrChrono passes to its registered iframe apps. The generated note is keyed to that identifier, so if a clinician has three charts open in three tabs, the draft writes only into the tab whose encounter matches.
Idempotent insertion prevents duplicate text. Before writing, the extension checks whether a target field already holds content. Existing clinician text is never silently overwritten. The overlay offers append or replace, and inserted segments carry structural markers so a rerun on the same encounter does not stack duplicate paragraphs.
DrChrono SOAP fields map to label-anchored overlay selectors, not brittle auto-generated IDs
DrChrono does not publish a stable DOM schema for clinical note fields, so Merry AI treats selector mapping as a runtime discovery problem. A resolver pass scans the open note for textarea and contenteditable elements, then scores each candidate against nearby visible labels, ARIA attributes, and name attributes. Auto-generated IDs are never the primary anchor because they can change between releases.
| SOAP Section | Primary Anchor | Fallback Selector Pattern | Family Medicine Content Written |
|---|---|---|---|
| Subjective / HPI | Visible label text matching Subjective or HPI | textarea[name*='subjective' i], [aria-label*='HPI' i] | Problem-specific HPI, PHQ-9 and GAD-7 scores, social drivers of health |
| Objective / Exam | Visible label text matching Objective or Physical Exam | [contenteditable='true'] nearest the Objective header | Vitals, BMI, pediatric growth percentiles, ROM in degrees |
| Assessment | Visible label text matching Assessment | textarea[name*='assessment' i] | Problem list with status, DSM-5-TR criteria met, NYHA class where relevant |
| Plan | Visible label text matching Plan | textarea[name*='plan' i] | Medication changes, orders, follow-up interval, care coordination |
When the resolver cannot reach a confident match for a section, it stops and asks the clinician to click the intended field once. That choice is held for the current session only. Guessing at a field is not an acceptable failure mode in a legal medical record.
Every HPI and MDM is generated from the current encounter, never copied from the prior visit
Cloned documentation is a recognized audit risk, and it also hides what actually changed. Merry AI generates HPI and medical decision making from the current encounter only. Prior visit language is never carried forward verbatim. If a patient's A1c moved from 8.4 to 7.6, the note states the new value, the interval, and what the clinician decided about therapy today, rather than repeating last quarter's paragraph.
Family Medicine templates surface structure for each clinical domain. Behavioral health entries carry PHQ-9 and GAD-7 numeric scores with trend. Diabetes entries carry A1c, eGFR, and albuminuria. Heart failure entries carry NYHA class and LVEF. Musculoskeletal complaints carry ROM in degrees and a traumatic versus degenerative classification. Well-child visits carry Bright Futures elements and growth percentiles. Psychotherapy process content is kept out of the general SOAP note and flagged for separate handling.
G2211 documentation must reflect longitudinal care, and Modifier 25 changes when it pays
HCPCS G2211 is an add-on code reported with office or outpatient E/M codes 99202-99205 and 99211-99215, and, per the CMS G2211 FAQ, with home or residence E/M codes 99341, 99342, 99344, 99345, and 99347-99350. It describes care that serves as the continuing focal point for all needed services, or ongoing care for a single serious or complex condition. Merry AI does not insert G2211 boilerplate into every note. It surfaces longitudinal evidence, such as titration history, specialist coordination, and comorbidity management, only when the encounter supports it.
Modifier 25 historically blocked G2211 payment on the same claim line. Since January 1, 2025, CMS pays G2211 with a Modifier 25 E/M when the same practitioner, on the same day, furnishes an annual wellness visit (G0438 or G0439), vaccine administration, or a designated Medicare Part B preventive service. Outside those scenarios, the claims edit still denies the combination. Merry AI drafts a distinct problem-oriented Assessment and Plan whenever a same-day preventive service or procedure occurs, so coders can see the separately identifiable work.
Modifier 59 requires specific detail. Generic phrasing such as 'separate and distinct procedure performed' is a known audit flag. Merry AI records the distinct anatomical site, lesion, or session instead. Code selection always remains with the clinician and the billing team.
The $15,600 figure is illustrative. It reflects roughly $16 in national Medicare payment per G2211 claim across about 1,000 eligible established-patient visits per clinician per year. Actual capture varies by locality, payer mix, and whether the documentation supports longitudinal complexity.
Three DrChrono integration paths carry very different costs, timelines, and PHI exposure
The comparison below summarizes how each path behaves inside a Family Medicine practice running DrChrono.
| Criterion | Traditional API Marketplace Integration | Manual Copy-Paste | Merry AI Chrome DOM Injection |
|---|---|---|---|
| Setup time | Weeks to months of vendor onboarding | Immediate | Minutes, extension install only |
| IT involvement | API credentials, security review, scoping | None | None, no firewall changes |
| Recurring integration fees | Marketplace or API access fees common | None | None |
| PHI in OS clipboard | No | Yes, every transfer | No, direct DOM write |
| Encounter binding | API patient and appointment IDs | Clinician memory | Page context IDs checked per tab |
| Field mapping | Fixed to API-exposed fields | Clinician pastes by hand | Label-anchored SOAP selectors |
| Audit trail | Vendor plus EHR logs | EHR logs | DrChrono native logs under clinician login |
| Primary failure mode | API scope limits and version drift | Wrong chart, truncated paste | UI change, handled by confirm-click fallback |
| Audio retention | Vendor dependent | Vendor dependent | Memory only, discarded after drafting |
Audio exists only in memory and is discarded after the note is generated
Audio is handled as ephemeral process data. Buffers are overwritten and released once the draft is produced. Nothing is written to localStorage, IndexedDB, or file downloads, and PHI is scrubbed from error telemetry. Any cloud processing runs over encrypted transport under an executed BAA, with no retention and no model training on patient data. Because operating systems limit absolute guarantees about memory, the core control is architectural: there is no stored copy to breach.
DrChrono remains the system of record. The only lasting clinical artifact is the note the clinician signs inside DrChrono, which keeps record custody, retention policy, and patient access requests in one place. This posture simplifies alignment with HIPAA and with state privacy regimes in California and Texas.
The clinician signs the note in DrChrono, and DrChrono keeps the audit trail
Merry AI automates typing, not signing. Every injected section is visible and editable in DrChrono before save. Signature, timestamp, and version history are created by DrChrono under the logged-in clinician's credentials, which keeps the record defensible for clinical documentation integrity review.
Practices evaluating this workflow can browse Family Medicine note structures at templates.scribing.io or book a 15-minute workflow audit at cal.com/merryai/demo to test field mapping against their own DrChrono note layout.




