No FHIR integration survives contact with a hospital’s data

One of the first FHIR projects I worked on used an open-source library from a big-name FHIR server provider to convert HL7 v2 and CCDA direct to FHIR.

It used liquid templates that claimed to be customizable but in practice were fixed. It worked for the first hospital integration, failed for the second, and was tossed in the trash and replaced with a custom solution for the third.

To steal a military maxim: No FHIR integration survives contact with a hospital’s data.

If you’re mapping from legacy data direct to FHIR, you’re buying yourself trouble down the road. The solution is an interim or “canonical” data layer.

A canonical model is a common design pattern for communicating between different data models. It predates FHIR, is not specific to healthcare, and is a recognized and robust approach for converting between data formats. The canonical model is fixed, the final output can vary.

Here’s what it looks like when converting between HL7 v2 and FHIR:

The canonical layer does two things that direct-to-FHIR mapping cannot. It forces you to understand the incoming data without thinking about FHIR, creating a stable target for translation regardless of which FHIR version or profiles you need to support. And it forces you to address data quality problems before they reach FHIR, where they are harder to fix.

Without one, every new integration requires code changes across core modules. Supporting different incoming formats involves duplicating code or rewriting the initial conversion engine. Handling different versions of FHIR or different profiles gradually increases the complexity of the translators, with technical debt piling up with each new integration.

Without a canonical model your conversion process will degrade over time. It will work for the first hospital, but start causing problems as soon as more hospitals are integrated. Eventually, it will fail under its own load, exactly like the project I mentioned earlier.

I’ve never looked under the covers at the conversion engines built by InterSystems, Rhapsody, Redox or similar commercial integration companies, but I would be very surprised if they did not have a golden canonical data model for all of their data. Without one, they could not work effectively at scale.

---

Download my “FHIR Architecture Decisions” book

Discover more from Darren Devitt

Subscribe now to keep reading and get access to the full archive.

Continue reading