Case study · August 20, 2026 · 3 min read
Migrating a Legacy EMR to Epic With Zero Data Loss
How a Toronto specialty hospital moved a decade of clinical history to Epic without losing a single record

The client was a specialty hospital in Toronto, managing a dozen inpatient beds and a busy outpatient practice for about 3,000 patients.
The challenge
The hospital was running on Bcare, an aging EMR that was reaching the end of the line. It was time to move to Epic. The stakes were high: over a decade of clinical history, including encounters, orders, lab results, scanned documents, and messy free-text notes, had to be migrated.
In healthcare data, there is zero tolerance for lost or misattributed patient records. If a note gets attached to the wrong patient, it’s a massive clinical risk.
The problem? Bcare exported data in a bizarre, proprietary format. Epic, on the other end, expects incoming data to perfectly match its own strict ingestion structure. Usually, a migration of this size and complexity requires a project manager and three or four data engineers.
The approach
We ran the entire migration end-to-end with a single engineer.
- Building a Rosetta Stone for clinical data: Bcare’s export fields didn’t map neatly to Epic’s. If we just tried translating directly from one proprietary format to another, we’d have no objective way to verify the mapping was correct. So, we built a custom intermediate schema inspired by HL7v2 message segments. We normalized patient identifiers, orders, results, and documents into a canonical structure before anything was sent to Epic. This gave us a single, unambiguous source of truth to validate against.
- Keeping PHI locked down: Every record we touched was protected health information (PHI). We kept it entirely inside a controlled, on-prem environment. We didn’t use generic cloud-based OCR tools or third-party parsing services, because handing PHI to a black-box system means giving up auditability.
- Writing custom parsers from scratch: Because off-the-shelf tools weren’t secure or accurate enough, we built custom parsers specifically for this migration to handle scanned documents, attachments, and free-text notes. We also wrote parsers for the target system’s custom HL7 format.
- Live source reconciliation: We randomly sampled patient charts and compared what a clinician actually saw on their screen in Bcare against what populated in Epic, using our intermediate outputs as the referee.
- Treating data migration like software engineering: We built a versioned, repeatable pipeline. When we found issues during reconciliation, we didn’t apply manual hotfixes under deadline pressure. We made a code change, pushed it through a proper CI/CD pipeline, and re-ran the job. When you are migrating to Epic, the code has to be strictly versioned against specific data snapshots.
The outcome
We successfully carried over every patient record, document, and clinical note, keeping the links to the correct patient and encounter entirely intact. Not a single material data element was lost.
No patient data ever left the hospital’s controlled environment. By engineering a smarter pipeline, the hospital avoided the massive overhead of a multi-engineer team while ensuring absolute continuity of care.
Read the underlying methodology in What Actually Breaks in an EMR Migration.