FHIR Cross-Version Mapping Pack
0.1.0 - Ballot for Release 5.1.0 International flag

FHIR Cross-Version Mapping Pack, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/fhir-cross-version/ and changes regularly. See the Directory of published versions

StructureMap: Observation Transforms: R3 to R2

Official URL: http://hl7.org/fhir/StructureMap/Observation3to2 Version: 0.1.0
Standards status: Draft Maturity Level: 1 Computable Name: Observation3to2

ObservationTransformsR3toR2

/// url = 'http://hl7.org/fhir/StructureMap/Observation3to2'
/// name = 'Observation3to2'
/// title = 'Observation Transforms: R3 to R2'
/// status = 'active'

uses "http://hl7.org/fhir/3.0/Observation" alias Observation as source
uses "http://hl7.org/fhir/1.0/Observation" alias ObservationR2 as target

imports "http://hl7.org/fhir/StructureMap/*3to2"

group Observation(source src : Observation, target tgt : ObservationR2) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier "Observation-identifier";
  src.status -> tgt.status "Observation-status";
  src.category -> tgt.category "Observation-category";
  src.code -> tgt.code "Observation-code";
  src.subject -> tgt.subject "Observation-subject";
  src.context -> tgt.encounter "Observation-encounter";
  src.effective -> tgt.effective "Observation-effective";
  src.issued -> tgt.issued "Observation-issued";
  src.performer -> tgt.performer "Observation-performer";
  src.value -> tgt.value "Observation-value";
  src.dataAbsentReason -> tgt.dataAbsentReason "Observation-dataAbsentReason";
  src.interpretation -> tgt.interpretation "Observation-interpretation";
  src.comment -> tgt.comments "Observation-comments";
  src.bodySite -> tgt.bodySite "Observation-bodySite";
  src.method -> tgt.method "Observation-method";
  src.specimen -> tgt.specimen "Observation-specimen";
  src.device -> tgt.device "Observation-device";
  src.referenceRange as vs0 -> tgt.referenceRange as vt0 then obsReferenceRange(vs0, vt0) "Observation-referenceRange";
  src.related as vs0 -> tgt.related as vt0 then obsRelated(vs0, vt0) "Observation-related";
  src.component as vs0 -> tgt.component as vt0 then obsComponent(vs0, vt0) "Observation-component";
}

group obsReferenceRange(source src, target tgt) extends BackboneElement {
  src.low -> tgt.low "referenceRange-low";
  src.high -> tgt.high "referenceRange-high";
  src.appliesTo -> tgt.meaning "referenceRange-meaning";
  src.age -> tgt.age "referenceRange-age";
  src.text -> tgt.text "referenceRange-text";
}

group obsRelated(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type "related-type";
  src.target -> tgt.target "related-target";
}

group obsComponent(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code "component-code";
  src.value -> tgt.value "component-value";
  src.dataAbsentReason -> tgt.dataAbsentReason "component-dataAbsentReason";
  src.referenceRange as vs0 -> tgt.referenceRange as vt0 then obsReferenceRange(vs0, vt0) "component-referenceRange";
}