This page is part of the Vulcan FHIR to OMOP FHIR Implementation Guide (v1.0.0-ballot: INFORMATIVE 1 Ballot 1) based on FHIR (HL7® FHIR® Standard) v5.0.0. No current official version has been published yet. For a full list of available versions, see the Directory of published versions
Official URL: http://hl7.org/fhir/uv/omop/StructureMap/AllergyMap | Version: 1.0.0-ballot | |||
Standards status: Informative | Maturity Level: 1 | Computable Name: AllergyMap |
This mapping maps FHIR AllergyIntolerance instances to OMOP Observation Table objects.
Mapping FHIR Allergy and Intolerance resources to OMOP present unique challenges that require consideration of data granularity, standardization, and preservation of clinical relationships. Note: The AllergyIntolerance resource serves as a use case example in the CodeableConcept and Value as Concept mapping patterns. The principles and patterns are described there in more detail.
The simplest mapping scenario involves patients with no known allergies. In this case:
When patients have documented allergies to specific substances, the mapping complexity increases significantly. Consider the example of "Allergy to Penicillin G":
The "value as concept" mapping pattern to OMOP addresses scenarios where an observation has both a general category and a specific value that must be captured separately. This pattern is employed for allergy mappings, involving two key fields:
When allergy data FHIR resouces includes specific reactions (e.g., rash, anaphylaxis), two records should be created:
1: Primary Allergy Record
observation_concept_id
: "Allergy to Drug"value_as_concept_id
: Specific allergen (e.g., "Penicillin G")2: Reaction Record
observation_concept_id
: "Allergic Reaction to Drug"value_as_concept_id
: Specific reaction (e.g., "Rash")To maintain the clinical relationship between allergies and their reactions:
observation_event_id
in the reaction record to reference the observation_id
of the primary allergy recordfact_relationship
table to establish connections between related clinical facts/// url = 'http://hl7.org/fhir/uv/omop/StructureMap/AllergyMap' /// name = 'AllergyMap' /// title = 'Mapping Allergy resource to Observation OMOP Domain' /// status = 'draft' uses "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance" alias Allergy as source uses "http://hl7.org/fhir/uv/omop/StructureDefinition/Observation" alias ObservationTable as target group Observation(source src : Allergy, target tgt : ObservationTable) { src.code as s -> tgt then { s.coding as sc -> tgt then { sc.code -> tgt.observation_concept_id, tgt.observation_source_value, tgt.observation_source_concept_id; }; }; // src.id as id -> tgt.observation_id = cast(id, "integer"); src.onset : dateTime as osd -> tgt.observation_date = cast(osd, 'date'), tgt.observation_datetime = osd; // src.patient as s -> tgt then { src.reaction as s -> tgt then { s.manifestation as sman -> tgt then { sman.concept as smanc -> tgt then { smanc.coding as sc -> tgt then { sc.code -> tgt.value_as_concept_id, tgt.value_source_value; }; }; }; }; }