FHIR to OMOP FHIR IG
2.0.0-ballot - STU 1 Ballot International flag

FHIR to OMOP FHIR IG, published by HL7 International / Biomedical Research and Regulation. This guide is not an authorized publication; it is the continuous build for version 2.0.0-ballot built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/fhir-omop-ig/ and changes regularly. See the Directory of published versions

StructureMap: Mapping Procedure resource to Procedure Occurrence OMOP Domain

Official URL: http://hl7.org/fhir/uv/omop/StructureMap/ProcedureMap Version: 2.0.0-ballot
Standards status: Trial-use Maturity Level: 2 Computable Name: ProcedureMap
Other Identifiers: OID:2.16.840.1.113883.4.642.40.77.43.9

This mapping maps FHIR Procedure instances to OMOP Procedure Occurrence Table objects.

Procedure Resource Considerations

OMOP CDM Domain Assignment

There might be variability in source EHR data representation, where each EHR might represent the same clinical activity differently when exported to FHIR. For instance, some procedures in FHIR are represented in the Measurements or Observations domains in OMOP, such as lab orders and diagnostic imaging. It is a mapping challenge in deciding whether to map individual activities to the OMOP Procedure Occurrence, Measurement, or Observation domains. This is determined by domain assignment of the target OMOP concept_id(s) for any given procedure represented on FHIR. An evaluation of each source procedure that differentiates true procedures (e.g., surgeries) from diagnostic activities is necessary to avoid FHIR procedure resource data misclassification. Activities ought to be mapped to the appropriate OMOP measurement or observation tables rather than procedure_occurrence through evaluation of the underlying concepts and which domain each is represented withtin the OHDSI Standardized Vocabularies. (See: OMOP Domain Assignment Logic for additional infomration)

Temporal Context and Encounter Linkage

The performedDateTime or performedPeriod fields ought to map to procedure_date in OMOP, with the start date serving as the primary temporal reference. When a performedPeriod includes an end date, this might optionally map to procedure_end_date to capture procedure duration. The associated Encounter ought to map to visit_occurrence_id, establishing the contextual relationship between the procedure and the healthcare visit.

Provider Attribution

When available, the Performer field ought to map to provider_id in the procedure_occurrence table. While not all data sources provide specific performer information, including this mapping when possible enhances analytical capabilities for provider attribution studies.

Status and Type Considerations

Procedure Status Handling

Only completed procedures ought to be mapped to the OMOP procedure_occurrence table. Transformation ought to filter out planned, cancelled, or incomplete procedures to ensure data integrity. This filtering criterion ought to be clearly documented in ETL specifications.

Procedure Type Classification

The procedure type ought to be mapped to procedure_type_concept_id based on the healthcare setting context, such as inpatient surgery or outpatient diagnostic procedures. This classification helps differentiate care settings and supports research into distinctions between venues of care delivery.

Mapping

Language: en

/// url = 'http://hl7.org/fhir/uv/omop/StructureMap/ProcedureMap'
/// name = 'ProcedureMap'
/// title = 'Mapping Procedure resource to Procedure Occurrence OMOP Domain'
/// status = 'active'
/// description = 'This mapping maps FHIR Procedure instances to OMOP Procedure Occurrence Table objects.'

uses "http://hl7.org/fhir/StructureDefinition/Procedure" alias Procedure as source
uses "http://hl7.org/fhir/uv/omop/StructureDefinition/ProcedureOccurrence" alias ProcedureTable as target

group ProcedureOccurrence(source src : Procedure, target tgt : ProcedureTable) {
  src where (src.occurrence.empty().not()) then {
    src as s -> tgt then {
      s.id as id -> tgt.procedure_occurrence_id = cast(id, 'integer');
    } "procedureID";
    src.subject as subject -> tgt then {
      subject.reference as s -> tgt.person_id = (%s.substring(%s.indexOf('/') + 1));
    };
    src.code as s -> tgt then {
      s.coding as sc -> tgt then {
        sc.code as a ->  tgt.procedure_concept_id = translate(a, 'http://hl7.org/fhir/uv/omop/ConceptMap/ProcedureType', 'code'),  tgt.procedure_source_value = a;
      };
    };
    src.occurrence : dateTime as edt ->  tgt.procedure_datetime = cast(edt, 'dateTime'),  tgt.procedure_date = cast(edt, 'date');
    src.occurrence : Period as s -> tgt then {
      s.start as start ->  tgt.procedure_datetime = cast(start, 'dateTime'),  tgt.procedure_date = cast(start, 'date');
      s.end as end ->  tgt.procedure_end_datetime,  tgt.procedure_end_date = cast(end, 'date');
    };
    src.encounter as encounter -> tgt then {
      encounter.reference as e -> tgt.visit_occurrence_id = (%e.substring(%e.indexOf('/') + 1));
    };
  } "procedureMapping";
}