Automate patient note entry in OpenEMR
The flagship healthcare reference: an 18-step add-patient-note workflow on OpenEMR — log in, find the patient, open the chart, navigate to Patient Messages, enter a parameterized note, save — with the write confirmed against the record itself, never the screen.
This workflow runs today against the named application, and has additionally been measured in a field run — with the field-test caveats stated below.
Runs on
OpenEMR, the open-source EMR — demonstrated against the third-party OpenEMR public demo (fake patients only; never point this at a real install without qualification) and reproduced in CI against a fixture system of record.
The demonstrated steps
- 1Log in as the demo admin
- 2Search for the demo patient
- 3Open the patient’s chart
- 4Scroll the dense Medical Record Dashboard to the Messages card
- 5Open Patient Messages
- 6Enter the note — a distinct parameterized value per run, so a pass proves parameter substitution against real state, not replay of a baked-in literal
- 7Save and confirm
Parameters: note — the message text written to the patient record — recorded values are the defaults; every replay can override them.
How the outcome is verified
The Save step carries system-of-record effect contracts (record_written and a field_equals check on the note). The CI-reproducible harness proves the whole loop composes: a clean replay is CONFIRMED against the record; under an injected fault the screen still paints “Saved” while the record drops the note — effect verification REFUTES the run and it halts. Screen-only checking would have passed. An unexpected consent modal likewise halts the run, the operator’s correction is taught back as a governed, gated branch, and the taught program re-runs the same drift to success.
- record_written effect contract
- field_equals on the saved note (record, not screen)
- halt on refuted effect
- governed teach-and-promote loop
Evidence and scope
Field run on the real third-party OpenEMR public demo: compiled replay went 20/20 versus 10/10 for a computer-use agent, faster and with zero model calls. Field test, not CI-reproducible — the public demo is shared, resets daily, and the agent sample is small; the verifier and task-prompt units run in CI.
Try it from the command line
The compiler and runtime are open source and MIT licensed. Healthy runs are local and make no model calls.
pip install openadapt-flowInstall the open-source compiler and runtime.
openadapt-flow record --url https://your.app --out recOpen a headed browser on your app and demonstrate the workflow once; Ctrl-C to finish.
openadapt-flow compile rec --out bundle --name my-taskCompile the recording into a deterministic bundle with auto-classified risk per step.
openadapt-flow lint bundle && openadapt-flow certify bundle --policy permissiveSurface coverage gaps, then gate the bundle against a policy before it ever deploys.
openadapt-flow replay bundle --url https://your.app --param name=valueReplay against your app; recorded values are defaults and --param overrides them.
Put this workflow into production
Bring your version of this workflow and the record that proves its outcome. We'll map the deployment, verification, shadow run, and supervised rollout.