Common Core Ontologies
Home/Blog/Mapping Legacy EHR Schemas to a Shared Ontology During Hospital System Consolidation
PRACTICE

Mapping Legacy EHR Schemas to a Shared Ontology During Hospital System Consolidation

November 30, 2026 · Marcus Webb
Mapping Legacy EHR Schemas to a Shared Ontology During Hospital System Consolidation

Hospital system mergers routinely combine EHR platforms built on incompatible schemas. Mapping every field to FHIR resources gets data moving, but it doesn't stop two teams from quietly disagreeing about what a field means six months later. An ontology layer, not just a canonical schema, is what actually prevents that drift.

Why Hospital Consolidation Breaks EHR Data Models

Two hospital systems merging almost never run the same EHR platform, and even when they do, years of local configuration mean their Patient tables, Encounter records, and lab-result structures have drifted into genuinely different shapes. One system might store a patient's primary care provider as a foreign key into a physician table; the other embeds it as a free-text field a scheduler types in. Both represent the same real-world fact, but nothing about the schemas says so.

The standard response is to map everything to FHIR resources: Patient, Encounter, Observation, MedicationRequest, Condition. That solves the transport problem, both systems can now speak a common interchange format, and it's the right first move. What it doesn't solve is meaning. A FHIR resource is a container with fields; it says nothing about what counts as a valid combination of those fields, or whether two systems populating the same field actually mean the same thing by it.

That gap is exactly where consolidation projects quietly stall, which is why teams running ehr integration services across merging systems hit this problem before the ontology question ever comes up: the data moves, the dashboards populate, and six months later two departments are making decisions off a field whose meaning was never actually reconciled.

What a Canonical FHIR Resource Set Does, and Where It Stops Short

Most consolidation playbooks describe the fix as adopting a canonical resource set: agree that Patient, Encounter, Observation, MedicationRequest, and Condition are the shared vocabulary, map every legacy field into one of them, and call the migration done. That's a genuine improvement over two incompatible schemas, and it's necessary groundwork.

It's also, structurally, just a flat list. Nothing says a MedicationRequest has to be linked to a valid Encounter, or that a Condition code from one hospital's local value set means the same clinical state as a superficially similar code from the other's. A mapping can be completely valid FHIR, every required field populated, every resource well-formed, and still be semantically wrong in a way no FHIR validator will ever flag, because FHIR validates structure, not meaning.

A FHIR-only mapping validates that a field is populated correctly. It can't validate that "attending physician" means the same clinical role in both source systems, that check needs a constraint the resource set never defines.

This is the point at which teams discover that the migration they thought was finished has actually just moved the disagreement downstream, from "our schemas don't match" to "our FHIR resources match, but we still don't agree on what they mean."

Using a Formal Ontology as the Semantic Bridge Between Legacy Systems

A formal ontology closes that gap by defining concepts and relations independently of either system's storage shape, and independently of FHIR's resource boundaries. Common Core Ontologies, built on Basic Formal Ontology's mid-level classes, agent, act, information content entity, gives a merging project a vocabulary that already distinguishes, for example, a physician as an agent bearing a role from the act of attending a specific encounter. Two legacy systems that represented "attending physician" differently can both resolve to the same ontology concept, with the mapping layer absorbing the system-specific detail instead of leaving it implicit in a FHIR field.

That matters most in exactly the cases a flat resource list handles worst: where one system's local convention and the other's don't obviously collide, because they're both valid FHIR, right up until a downstream analytics team or a care-coordination workflow treats them as interchangeable and gets a wrong answer. An ontology forces that equivalence, or that distinction, to be stated explicitly and checked, rather than discovered later in production. The CSSDM ontology work on continuity-of-care data, documented in a recent arXiv paper on ontology-based interoperability, makes the same case from a different clinical angle: the hard part of hospital data integration isn't moving records between systems, it's guaranteeing they still mean what they meant before the move.

The FHIR specification itself stays exactly as useful in this setup as it was before: it's still the interchange format carrying the data between systems. The ontology layer doesn't replace it; it sits above it, giving both merging teams a shared, checkable definition of what each FHIR field is supposed to represent.

A Practical Mapping Workflow, From Legacy Fields to Ontology Concepts

  1. Inventory legacy fields and existing FHIR mappings. Pull the full field list from both systems, including any FHIR mapping work already done, before deciding anything is equivalent.
  2. Resolve each field to an ontology concept, not just a FHIR resource type. "Maps to Patient.generalPractitioner" is not the same claim as "represents the same agent-role relationship in both systems," and conflating the two is where drift starts.
  3. Add a validation layer that rejects mappings violating the ontology. Express the concept constraints as SHACL shapes and run every proposed mapping against them before it ships, so a structurally valid but semantically wrong mapping gets caught before go-live, not after.
  4. Pilot on one high-churn entity type before rolling out system-wide. Patient or Encounter is usually the right choice: high volume, high downstream dependency, and specific enough that disagreements surface quickly rather than hiding in an edge case nobody touches for a year.

How Do You Stop Semantic Drift After the Merger Is "Done"?

The riskiest moment in most EHR consolidations isn't the cutover weekend; it's eighteen months later, when one of the merged organizations' clinical teams requests a new field, a new value set, a new local convention, and whoever approves it has no mechanism forcing them to check it against what the other side already assumes. The initial migration gets all the project management attention; the slow accumulation of small, locally reasonable changes afterward gets almost none, and that's exactly where meaning drifts back apart.

A schema-only consolidation has no answer to this beyond another migration project each time drift is noticed, which is rare, since nothing structural flags it. An ontology-based mapping turns the same problem into a concept review: a proposed new field gets checked against the existing ontology concepts before it's added, and a validation layer keeps enforcing the agreed relationships going forward, rather than relying on institutional memory of what a field was supposed to mean at merger time.

When This Becomes a Software Engineering Problem, Not Just a Modeling One

Defining the ontology concepts for a hospital merger, patient, encounter, provider role, the relations between them, is a relatively contained modeling exercise, especially when it extends an existing mid-level suite instead of starting from a blank class hierarchy. The part that actually takes engineering effort is everything around it: the mapping pipeline that resolves live legacy records into ontology instances, the SHACL validation running inline rather than as a weekly batch job, and the governance tooling that lets a clinical informatics team propose a new concept without needing to write RDF by hand. None of that comes out of the box with an EHR platform or an interface engine, which is why the mapping and validation layer, not the ontology itself, is usually where a consolidation timeline actually slips.

Frequently Asked Questions

Do we need to adopt FHIR before we can use an ontology layer?

No, though most hospital mergers already have FHIR in the mix somewhere. The ontology layer sits above whatever interchange format moves the data, FHIR resources, HL7 v2 messages, or a vendor's proprietary export, and defines what each field means independently of how it's transported. Teams without FHIR yet can still start by resolving legacy fields to ontology concepts and adding FHIR mapping later.

How is this different from building a bigger canonical schema?

A bigger canonical schema is still a flat list of fields; it stores more, but nothing in it enforces what a field is allowed to mean or which combinations are valid. An ontology adds a class hierarchy and relations with constraints, so a validator can reject a mapping that is structurally fine but semantically wrong, something a canonical schema has no mechanism to catch.

Does this only work for CCO/BFO, or any ontology?

The pattern, mid-level classes plus a validation layer, works with any formal ontology. CCO and BFO are a practical starting point because their classes, agent, act, information content entity, already cover most of what a hospital's clinical and administrative data represents, so teams extend an existing hierarchy instead of designing one during a merger under time pressure.

How long does a first ontology-mapping pilot take for one hospital merger?

Scoped to one high-churn entity type, typically Patient or Encounter, a pilot that maps both legacy schemas to ontology concepts and stands up a SHACL validation layer usually runs a small number of weeks. The slow part is rarely the ontology modeling; it's getting both merging teams to agree on what a field has actually meant in production, which surfaces disagreements a pure schema mapping exercise would have hidden.

Do we need an ontologist on staff for this?

Not necessarily a full-time one. A small team can extend CCO's existing classes for a first pilot without designing a hierarchy from scratch. Where mergers usually need outside help is the mapping and validation tooling around the ontology, SHACL shapes, APIs, governance workflows, which is custom software development work rather than ontology authoring.

What's the actual cost of skipping the ontology layer and just mapping to FHIR?

The migration itself ships on time either way. The cost shows up afterward, as recurring production incidents when two merged teams read the same FHIR field and have quietly disagreed about its meaning for months, each inferring it from their own legacy system's convention rather than from an enforced definition. That cost is diffuse and hard to attribute, which is exactly why it's easy to underweight during the merger timeline.

Can this coexist with an existing interface engine (HL7 v2 to FHIR)?

Yes, and this is the common path in practice. The interface engine keeps handling message translation and transport exactly as it does today. The ontology layer sits downstream of it, mapping the resulting FHIR resources to ontology concepts and validating those mappings, so the interface engine's job doesn't change, it just stops being asked to also guarantee semantic consistency, which it was never designed to do.