Data Management with FHIR
0.1.0 - ci-build France flag

Data Management with FHIR - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

StructureMap: Mapping Observation laboratory resources to Measurement OMOP Domain

Official URL: https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreFHIR2OMOPMeasurement Version: 0.1.0
Draft as of 2025-10-23 Computable Name: CoreFHIR2OMOPMeasurement

Mapping Observation laboratory resources to Measurement OMOP Domain

map "https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreFHIR2OMOPMeasurement" = "CoreFHIR2OMOPMeasurement"

// Mapping Observation laboratory resources to Measurement OMOP Domain

uses "http://hl7.org/fhir/StructureDefinition/Observation" alias LabObs as source
uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/LogicalBundle" alias LogicalBundle as target
uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/OMOPMeasurement" alias MeasurementTable as target

imports "https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreSimpleObservation2OMOPMeasurement"

// imports "https://interop.aphp.fr/ig/fhir/dm/StructureMap/ComplexMeasurement"
// imports "https://interop.aphp.fr/ig/fhir/dm/StructureMap/*Measurement"
group Observation(source src : LabObs, target tgtBundle : LogicalBundle) {
  src -> tgtBundle.logicalId = uuid() "setId";
  src -> tgtBundle.type = 'transaction' "setType";
  src where code.coding.code in ('14682-9' | '22664-7' | '77147-7') -> tgtBundle.entry as newEntry then {
    src -> newEntry.measurement = create('MeasurementTable') as newMeasurement then {
      src then SimpleObservation(src, newMeasurement) "transformSimpleObservation";
    } "createSimpleObservation";
  } "newEntrySimpleObservation";
// src where code.coding.code in ('50197-3') -> tgtBundle.entry as newEntry then {         src -> newEntry.measurement = create("MeasurementTable") as newMeasurement then {             src then ComplexMeasurement(src, newMeasurement) "transformComplexMeasurement";         } "createComplexMeasurement";     } "newEntryComplexMeasurement";
}