EN PT
All workMulti-state behavioral health provider2026

Automated medical record generation

We built a pipeline that turns each insurance bill into a checked medical record, with no manual assembly.

Agents & AutomationIntegrationsData Pipelines
450+
active clients covered
98%
fewer manual record edits
316/316
sessions matched in validation
448
existing records replaced overnight with corrected copies
Challenge

Any billed claim can lead a payer to request the medical record. Staff built each record by hand across four systems: billing, the EHR, the CRM and a session-note platform. The work was slow, error-prone and ended in frequent manual PDF edits.

Approach
  1. Raised one event per client, payer and service month from each new charge in the practice-management system, read over its SOAP API.
  2. Matched each client across billing, EHR and CRM by ID, name and date of birth. Any ambiguity goes to a manual-review queue, never to a guess.
  3. Picked the treatment plan in force for the service month, repaired known header defects on a working copy, and drove the session-note platform to generate the record.
  4. Applied twelve deterministic corrections to the rendered record before printing it, with billing and EHR data as the source of truth.
  5. Ran it as a daemon with retries, a per-step audit trail, an operator dashboard behind single sign-on, and a feature flag on every write.
How it works
Billing systemnew charge Identity matchEHR + CRM Treatment planin force Session notesgenerate Correction layer12 rules Shared drive+ tracker Manual reviewqueue Billing systemnew charge Identity matchEHR + CRM Treatment planin force Session notesgenerate Correction layer12 rules Shared drive+ tracker Manual reviewqueue
Outcome

The pipeline covers 450+ active clients and files corrected records to the shared drive. In a validation run against records the team had made by hand, every session matched: 316 of 316. Manual edits to generated records fell by 98%.

Stack
PythonFastAPISQLite (WAL)React (Vite)REST and SOAP APIsWebhooksHeadless Chromium (Playwright)Docker on a self-hosted PaaSOAuth2 proxy with Google sign-inGoogle Drive API
Contact

Let’s talk.

Tell us about the work. We reply within two business days.

00Start
0%