File clinical notes and documents into the right patient’s chart in the EHR, with the patient verified before anything is written, every upload confirmed against the EHR’s own document tree, and a find-or-create step for patients who aren’t in the system yet. The write-back half that every AI scribe and intake pipeline is missing.
Overview
Plenty of tools produce clinical documents; almost none can put them where they belong, because ambulatory EHRs don’t offer a write API for it. This workflow closes that gap with a browser agent. It finds the patient by name and date of birth, verifying the account number when provided, uploads the attached documents into the chart’s target folder, and, when asked to, marks each one Reviewed, then verifies that the Reviewed state actually persisted in the EHR’s document tree rather than trusting the on-screen checkbox, which can silently fail. It refuses to claim success unless the verified count matches the uploaded count. It runs in production today in eClinicalWorks.
When the patient doesn’t exist yet, a companion find-or-create workflow makes the chart first: it matches by name, date of birth, and sex, updates only the fields you provided if the patient exists, and creates the chart behind its own human gate if not, returning the account number either way. Empty inputs never overwrite existing chart values, and nothing is ever invented to fill a field.
Step by step
Structured output
Every run ends as a record like this in your system, not a portal screenshot someone transcribes. This is the part your team stops doing by hand.
{ "folder": "Correspondence", "files": [ "visit_note_2026-07-15.pdf" ], "documents_uploaded": 1, "reviewed_count": 1, "summary": "1 document filed; Reviewed state verified in the tree."}{ "patient_created": true, "account_number": "•••8412", "pcg": "SAMPLE, JANE MD", "referring_provider": "SAMPLE, ROBERT MD", "summary": "No chart matched; new chart created from the demographics."}The dangerous failure in EHR document filing is the upload that looked fine, not the one that errored. This EHR’s Reviewed checkbox can render as ticked without persisting, so the agent re-reads the application’s document tree and counts, and if the verified count doesn’t match the uploaded count, the run reports failure with what it saw. An automation that grades its own work by looking at the button it just clicked isn’t verifying anything.
At scale
Voice agents and scribes produce the note, this workflow files it, and the find-or-create step makes it work for brand-new patients, the same chain that powers inbound referral capture and patient data extraction and sync. Category view: the EHR extraction and write-back library. The same chart-side machinery extends to pre-visit chart prep.
Human in the loop
Chart writes are PHI operations end to end: HIPAA-compliant infrastructure, SOC 2 Type II, a BAA, and an audit trail that records every document filed and every verification performed. Full posture on the security page.
Every chart write.
A human confirms after the patient is found and before anything is uploaded.
Creating a new chart.
Find-or-create has a second gate specifically on creation; new patient records don’t appear without sign-off.
A wrong or ambiguous patient.
Identity mismatches stop the run; the agent never touches a chart it isn’t certain about.
A verification miss.
If the reviewed count doesn’t match, the run reports the discrepancy instead of success.
Questions
Every document a medical assistant files by hand is a click path someone performs hundreds of times a week. The EHR workflow library covers both directions, out of the chart and back in.
Disclaimer
Third-party names, including government agencies and registries, are used only to identify systems commonly involved in healthcare operations workflows. Asteroid is not affiliated with, endorsed by, sponsored by, or certified by those third parties unless expressly stated. Workflow availability depends on customer authorization, account permissions, configuration, and applicable system terms.