This page is part of the FHIR Specification (v3.5.0: R4 Ballot #2). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3
Orders and Observations Work Group | Maturity Level: N/A | Ballot Status: Informative | Compartments: Device, Encounter, Patient, Practitioner, RelatedPerson |
R3 : R4 Conversion maps for Observation.
Functional status for this map: 48 tests of which 14 fail to execute. 34 fail round-trip testing and 34 r3 resources are invalid (0 errors). (see documentation)
map "http://hl7.org/fhir/StructureMap/Observation3to4" = "R3 to R4 Conversions for Observation" uses "http://hl7.org/fhir/3.0/StructureDefinition/Observation" alias ObservationR3 as source uses "http://hl7.org/fhir/StructureDefinition/Observation" alias Observation as target imports "http://hl7.org/fhir/StructureMap/*3to4" group Observation extends DomainResource input src : ObservationR3 as source input tgt : Observation as target "Observation.identifier" : for src.identifier as vs make tgt.identifier as vt "Observation.basedOn" : for src.basedOn as vs make tgt.basedOn as vt "Observation.status" : for src.status as vs make tgt.status as vt "Observation.category" : for src.category as vs make tgt.category as vt "Observation.code" : for src.code as vs make tgt.code as vt "Observation.subject" : for src.subject as vs make tgt.subject as vt "Observation.context" : for src.context as vs make tgt.context as vt "Observation.effective-dateTime" : for src.effective : dateTime as vs make tgt.effective = create("dateTime") as vt then dateTime(vs,vt) "Observation.effective-Period" : for src.effective : Period as vs make tgt.effective = create("Period") as vt then Period(vs,vt) "Observation.issued" : for src.issued as vs make tgt.issued as vt "Observation.performer" : for src.performer as vs make tgt.performer as vt "Observation.value-Quantity" : for src.value : Quantity as vs make tgt.value = create("Quantity") as vt then Quantity(vs,vt) "Observation.value-CodeableConcept" : for src.value : CodeableConcept as vs make tgt.value = create("CodeableConcept") as vt then CodeableConcept(vs,vt) "Observation.value-string" : for src.value : string as vs make tgt.value = create("string") as vt then string(vs,vt) "Observation.value-boolean" : for src.value : boolean as vs make tgt.value = create("boolean") as vt then boolean(vs,vt) "Observation.value-Range" : for src.value : Range as vs make tgt.value = create("Range") as vt then Range(vs,vt) "Observation.value-Ratio" : for src.value : Ratio as vs make tgt.value = create("Ratio") as vt then Ratio(vs,vt) "Observation.value-SampledData" : for src.value : SampledData as vs make tgt.value = create("SampledData") as vt then SampledData(vs,vt) "Observation.value-time" : for src.value : time as vs make tgt.value = create("time") as vt then time(vs,vt) "Observation.value-dateTime" : for src.value : dateTime as vs make tgt.value = create("dateTime") as vt then dateTime(vs,vt) "Observation.value-Period" : for src.value : Period as vs make tgt.value = create("Period") as vt then Period(vs,vt) "Observation.dataAbsentReason" : for src.dataAbsentReason as vs make tgt.dataAbsentReason as vt "Observation.interpretation" : for src.interpretation as vs make tgt.interpretation as vt "Observation.comment" : for src.comment as vs make tgt.comment as vt "Observation.bodySite" : for src.bodySite as vs make tgt.bodySite as vt "Observation.method" : for src.method as vs make tgt.method as vt "Observation.specimen" : for src.specimen as vs make tgt.specimen as vt "Observation.device" : for src.device as vs make tgt.device as vt "Observation.referenceRange" : for src.referenceRange as vs0 make tgt.referenceRange as vt0 then { "Observation.referenceRange.low" : for vs0.low as vs make vt0.low as vt "Observation.referenceRange.high" : for vs0.high as vs make vt0.high as vt "Observation.referenceRange.type" : for vs0.type as vs make vt0.type as vt "Observation.referenceRange.appliesTo" : for vs0.appliesTo as vs make vt0.appliesTo as vt "Observation.referenceRange.age" : for vs0.age as vs make vt0.age as vt "Observation.referenceRange.text" : for vs0.text as vs make vt0.text as vt } "Observation.component" : for src.component as vs0 make tgt.component as vt0 then { "Observation.component.code" : for vs0.code as vs make vt0.code as vt "Observation.component.value-Quantity" : for vs0.value : Quantity as vs make vt0.value = create("Quantity") as vt then Quantity(vs,vt) "Observation.component.value-CodeableConcept" : for vs0.value : CodeableConcept as vs make vt0.value = create("CodeableConcept") as vt then CodeableConcept(vs,vt) "Observation.component.value-string" : for vs0.value : string as vs make vt0.value = create("string") as vt then string(vs,vt) "Observation.component.value-Range" : for vs0.value : Range as vs make vt0.value = create("Range") as vt then Range(vs,vt) "Observation.component.value-Ratio" : for vs0.value : Ratio as vs make vt0.value = create("Ratio") as vt then Ratio(vs,vt) "Observation.component.value-SampledData" : for vs0.value : SampledData as vs make vt0.value = create("SampledData") as vt then SampledData(vs,vt) "Observation.component.value-time" : for vs0.value : time as vs make vt0.value = create("time") as vt then time(vs,vt) "Observation.component.value-dateTime" : for vs0.value : dateTime as vs make vt0.value = create("dateTime") as vt then dateTime(vs,vt) "Observation.component.value-Period" : for vs0.value : Period as vs make vt0.value = create("Period") as vt then Period(vs,vt) "Observation.component.dataAbsentReason" : for vs0.dataAbsentReason as vs make vt0.dataAbsentReason as vt "Observation.component.interpretation" : for vs0.interpretation as vs make vt0.interpretation as vt } endgroup
map "http://hl7.org/fhir/StructureMap/Observation4to3" = "R4 to R3 Conversion for Observation" uses "http://hl7.org/fhir/StructureDefinition/Observation" alias Observation as source uses "http://hl7.org/fhir/3.0/StructureDefinition/Observation" alias ObservationR3 as target imports "http://hl7.org/fhir/StructureMap/*4to3" group Observation extends DomainResource input src : Observation as source input tgt : ObservationR3 as target "Observation.identifier" : for src.identifier as vs make tgt.identifier as vt "Observation.basedOn" : for src.basedOn as vs make tgt.basedOn as vt "Observation.status" : for src.status as vs make tgt.status as vt "Observation.category" : for src.category as vs make tgt.category as vt "Observation.code" : for src.code as vs make tgt.code as vt "Observation.subject" : for src.subject as vs make tgt.subject as vt "Observation.context" : for src.context as vs make tgt.context as vt "Observation.effective-dateTime" : for src.effective : dateTime as vs make tgt.effective = create("dateTime") as vt then dateTime(vs,vt) "Observation.effective-Period" : for src.effective : Period as vs make tgt.effective = create("Period") as vt then Period(vs,vt) "Observation.issued" : for src.issued as vs make tgt.issued as vt "Observation.performer" : for src.performer as vs make tgt.performer as vt "Observation.value-Quantity" : for src.value : Quantity as vs make tgt.value = create("Quantity") as vt then Quantity(vs,vt) "Observation.value-CodeableConcept" : for src.value : CodeableConcept as vs make tgt.value = create("CodeableConcept") as vt then CodeableConcept(vs,vt) "Observation.value-string" : for src.value : string as vs make tgt.value = create("string") as vt then string(vs,vt) "Observation.value-boolean" : for src.value : boolean as vs make tgt.value = create("boolean") as vt then boolean(vs,vt) "Observation.value-Range" : for src.value : Range as vs make tgt.value = create("Range") as vt then Range(vs,vt) "Observation.value-Ratio" : for src.value : Ratio as vs make tgt.value = create("Ratio") as vt then Ratio(vs,vt) "Observation.value-SampledData" : for src.value : SampledData as vs make tgt.value = create("SampledData") as vt then SampledData(vs,vt) "Observation.value-time" : for src.value : time as vs make tgt.value = create("time") as vt then time(vs,vt) "Observation.value-dateTime" : for src.value : dateTime as vs make tgt.value = create("dateTime") as vt then dateTime(vs,vt) "Observation.value-Period" : for src.value : Period as vs make tgt.value = create("Period") as vt then Period(vs,vt) "Observation.dataAbsentReason" : for src.dataAbsentReason as vs make tgt.dataAbsentReason as vt "Observation.interpretation" : for src.interpretation as vs make tgt.interpretation as vt "Observation.comment" : for src.comment as vs make tgt.comment as vt "Observation.bodySite" : for src.bodySite as vs make tgt.bodySite as vt "Observation.method" : for src.method as vs make tgt.method as vt "Observation.specimen" : for src.specimen as vs make tgt.specimen as vt "Observation.device" : for src.device as vs make tgt.device as vt "Observation.referenceRange" : for src.referenceRange as vs0 make tgt.referenceRange as vt0 then { "Observation.referenceRange.low" : for vs0.low as vs make vt0.low as vt "Observation.referenceRange.high" : for vs0.high as vs make vt0.high as vt "Observation.referenceRange.type" : for vs0.type as vs make vt0.type as vt "Observation.referenceRange.appliesTo" : for vs0.appliesTo as vs make vt0.appliesTo as vt "Observation.referenceRange.age" : for vs0.age as vs make vt0.age as vt "Observation.referenceRange.text" : for vs0.text as vs make vt0.text as vt } "Observation.related" : for src.hasMember as vs0 make tgt.related as vt0 then { } "Observation.related" : for src.derivedFrom as vs0 make tgt.related as vt0 then { } "Observation.component" : for src.component as vs0 make tgt.component as vt0 then { "Observation.component.code" : for vs0.code as vs make vt0.code as vt "Observation.component.value-Quantity" : for vs0.value : Quantity as vs make vt0.value = create("Quantity") as vt then Quantity(vs,vt) "Observation.component.value-CodeableConcept" : for vs0.value : CodeableConcept as vs make vt0.value = create("CodeableConcept") as vt then CodeableConcept(vs,vt) "Observation.component.value-string" : for vs0.value : string as vs make vt0.value = create("string") as vt then string(vs,vt) "Observation.component.value-Range" : for vs0.value : Range as vs make vt0.value = create("Range") as vt then Range(vs,vt) "Observation.component.value-Ratio" : for vs0.value : Ratio as vs make vt0.value = create("Ratio") as vt then Ratio(vs,vt) "Observation.component.value-SampledData" : for vs0.value : SampledData as vs make vt0.value = create("SampledData") as vt then SampledData(vs,vt) "Observation.component.value-time" : for vs0.value : time as vs make vt0.value = create("time") as vt then time(vs,vt) "Observation.component.value-dateTime" : for vs0.value : dateTime as vs make vt0.value = create("dateTime") as vt then dateTime(vs,vt) "Observation.component.value-Period" : for vs0.value : Period as vs make vt0.value = create("Period") as vt then Period(vs,vt) "Observation.component.dataAbsentReason" : for vs0.dataAbsentReason as vs make vt0.dataAbsentReason as vt "Observation.component.interpretation" : for vs0.interpretation as vs make vt0.interpretation as vt } endgroup