R4 Ballot #1 (Mixed Normative/Trial use)

This page is part of the FHIR Specification (v3.3.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 GroupMaturity Level: N/ABallot Status: Informative Compartments: Device, Encounter, Patient, Practitioner, RelatedPerson

R2 : R3 Conversion maps for Observation.

Functional status for this map: 34 tests that all execute ok. All tests pass round-trip testing and 15 r3 resources are invalid (58 errors). (see documentation)

map "http://hl7.org/fhir/StructureMap/Observation2to3" = "R2 to R3 Conversions for Observation"

uses "http://hl7.org/fhir/DSTU2/StructureDefinition/Observation" alias ObservationR2 as source
uses "http://hl7.org/fhir/StructureDefinition/Observation" alias Observation as target

imports "http://hl7.org/fhir/StructureMap/*2to3"

group for type+types  Observation extends DomainResource
  input src : ObservationR2 as source
  input tgt : Observation as target

  "Observation-identifier" : for src.identifier make tgt.identifier
  "Observation-status" : for src.status make tgt.status
  "Observation-category" : for src.category make tgt.category
  "Observation-code" : for src.code make tgt.code
  "Observation-subject" : for src.subject make tgt.subject
  "Observation-encounter" : for src.encounter make tgt.context
  "Observation-effective" : for src.effective make tgt.effective
  "Observation-issued" : for src.issued make tgt.issued
  "Observation-performer" : for src.performer make tgt.performer
  "Observation-value" : for src.value make tgt.value 
  "Observation-dataAbsentReason" : for src.dataAbsentReason make tgt.dataAbsentReason
  "Observation-interpretation" : for src.interpretation make tgt.interpretation
  "Observation-comments" : for src.comments make tgt.comment
  "Observation-bodySite" : for src.bodySite make tgt.bodySite
  "Observation-method" : for src.method make tgt.method
  "Observation-specimen" : for src.specimen make tgt.specimen
  "Observation-device" : for src.device make tgt.device
  "Observation-referenceRange" : for src.referenceRange as vs0 make tgt.referenceRange as vt0 then obsReferenceRange(vs0, vt0)
  "Observation-related" : for src.related as vs0 make tgt.related as vt0 then obsRelated(vs0, vt0) 
  "Observation-component" : for src.component as vs0 make tgt.component as vt0 then obsComponent(vs0, vt0) 
endgroup

group obsReferenceRange extends BackboneElement
  input src as source
  input tgt as target

  "Observation.referenceRange-low" : for src.low make tgt.low
  "Observation.referenceRange-high" : for src.high make tgt.high
  "Observation.referenceRange-meaning" : for src.meaning make tgt.appliesTo
  "Observation.referenceRange-age" : for src.age make tgt.age
  "Observation.referenceRange-text" : for src.text make tgt.text
endgroup
  
group obsRelated extends BackboneElement
  input src as source
  input tgt as target

  "Observation.related-type" : for src.type make tgt.type
  "Observation.related-target" : for src.target make tgt.target
endgroup
  
group obsComponent extends BackboneElement
  input src as source
  input tgt as target

  "Observation.component-code" : for src.code make tgt.code
  "Observation.component-value" : for src.value make tgt.value 
  "Observation.component-dataAbsentReason" : for src.dataAbsentReason make tgt.dataAbsentReason
  "Observation.component-referenceRange" : for src.referenceRange as vs0 make tgt.referenceRange as vt0 then obsReferenceRange(vs0, vt0)
endgroup

map "http://hl7.org/fhir/StructureMap/Observation3to2" = "R3 to R2 Conversion for Observation"

uses "http://hl7.org/fhir/StructureDefinition/Observation" alias Observation as source
uses "http://hl7.org/fhir/DSTU2/StructureDefinition/Observation" alias ObservationR2 as target

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

group for type+types  Observation extends DomainResource
  input src : Observation as source
  input tgt : ObservationR2 as target

  "Observation-identifier" : for src.identifier make tgt.identifier
  "Observation-status" : for src.status make tgt.status
  "Observation-category" : for src.category make tgt.category
  "Observation-code" : for src.code make tgt.code
  "Observation-subject" : for src.subject make tgt.subject
  "Observation-encounter" : for src.context make tgt.encounter
  "Observation-effective" : for src.effective make tgt.effective
  "Observation-issued" : for src.issued make tgt.issued
  "Observation-performer" : for src.performer make tgt.performer
  "Observation-value" : for src.value make tgt.value 
  "Observation-dataAbsentReason" : for src.dataAbsentReason make tgt.dataAbsentReason
  "Observation-interpretation" : for src.interpretation make tgt.interpretation
  "Observation-comments" : for src.comment make tgt.comments
  "Observation-bodySite" : for src.bodySite make tgt.bodySite
  "Observation-method" : for src.method make tgt.method
  "Observation-specimen" : for src.specimen make tgt.specimen
  "Observation-device" : for src.device make tgt.device
  "Observation-referenceRange" : for src.referenceRange as vs0 make tgt.referenceRange as vt0 then obsReferenceRange(vs0, vt0)
  "Observation-related" : for src.related as vs0 make tgt.related as vt0 then obsRelated(vs0, vt0) 
  "Observation-component" : for src.component as vs0 make tgt.component as vt0 then obsComponent(vs0, vt0) 
endgroup

group obsReferenceRange extends BackboneElement
  input src as source
  input tgt as target

  "Observation.referenceRange-low" : for src.low make tgt.low
  "Observation.referenceRange-high" : for src.high make tgt.high
  "Observation.referenceRange-meaning" : for src.appliesTo make tgt.meaning
  "Observation.referenceRange-age" : for src.age make tgt.age
  "Observation.referenceRange-text" : for src.text make tgt.text
endgroup
  
group obsRelated extends BackboneElement
  input src as source
  input tgt as target

  "Observation.related-type" : for src.type make tgt.type
  "Observation.related-target" : for src.target make tgt.target
endgroup
  
group obsComponent extends BackboneElement
  input src as source
  input tgt as target

  "Observation.component-code" : for src.code make tgt.code
  "Observation.component-value" : for src.value make tgt.value 
  "Observation.component-dataAbsentReason" : for src.dataAbsentReason make tgt.dataAbsentReason
  "Observation.component-referenceRange" : for src.referenceRange as vs0 make tgt.referenceRange as vt0 then obsReferenceRange(vs0, vt0)
endgroup

genetics-example1-somatic
  • ERROR @ Observation.contained: Condition.clinicalStatus SHALL be present if verificationStatus is not entered-in-error [verificationStatus='entered-in-error' or clinicalStatus.exists()] (src = InstanceValidator)
  • ERROR @ Observation.extension[1]: The extension http://hl7.org/fhir/StructureDefinition/geneticsGenomeBuild is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[2]: The extension http://hl7.org/fhir/StructureDefinition/geneticsChromosome is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[3]: The extension http://hl7.org/fhir/StructureDefinition/geneticsGenomicStart is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[4]: The extension http://hl7.org/fhir/StructureDefinition/geneticsGenomicStop is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[5]: The extension http://hl7.org/fhir/StructureDefinition/geneticsSpecies is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[6]: The extension http://hl7.org/fhir/StructureDefinition/geneticsCIGAR is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[7]: The extension http://hl7.org/fhir/StructureDefinition/geneticsAssessedCondition is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[8]: The extension http://hl7.org/fhir/StructureDefinition/geneticsReferenceAllele is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[9]: The extension http://hl7.org/fhir/StructureDefinition/geneticsObservedAllele is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[10]: The extension http://hl7.org/fhir/StructureDefinition/geneticsGene is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[11]: The extension http://hl7.org/fhir/StructureDefinition/geneticsTranscriptReferenceSequenceId is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[12]: The extension http://hl7.org/fhir/StructureDefinition/geneticsDNASequenceVariation is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[13]: The extension http://hl7.org/fhir/StructureDefinition/geneticsDNASequenceVariationType is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[14]: The extension http://hl7.org/fhir/StructureDefinition/geneticsAminoAcidChange is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[15]: The extension http://hl7.org/fhir/StructureDefinition/geneticsAlleleName is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[16]: The extension http://hl7.org/fhir/StructureDefinition/geneticsGenomicSourceClass is unknown, and not allowed here (src = InstanceValidator)
genetics-example2-germline
  • ERROR @ Observation.extension[1]: The extension http://hl7.org/fhir/StructureDefinition/geneticsGenomeBuild is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[2]: The extension http://hl7.org/fhir/StructureDefinition/geneticsChromosome is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[3]: The extension http://hl7.org/fhir/StructureDefinition/geneticsGenomicStart is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[4]: The extension http://hl7.org/fhir/StructureDefinition/geneticsGenomicStop is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[5]: The extension http://hl7.org/fhir/StructureDefinition/geneticsReferenceAllele is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[6]: The extension http://hl7.org/fhir/StructureDefinition/geneticsObservedAllele is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[7]: The extension http://hl7.org/fhir/StructureDefinition/geneticsGene is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[8]: The extension http://hl7.org/fhir/StructureDefinition/geneticsDNASequenceVariation is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[9]: The extension http://hl7.org/fhir/StructureDefinition/geneticsVariationId is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[10]: The extension http://hl7.org/fhir/StructureDefinition/geneticsDNARegionName is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[11]: The extension http://hl7.org/fhir/StructureDefinition/geneticsDNASequenceVariationType is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[12]: The extension http://hl7.org/fhir/StructureDefinition/geneticsAminoAcidChange is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[13]: The extension http://hl7.org/fhir/StructureDefinition/geneticsGenomicSourceClass is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[14]: The extension http://hl7.org/fhir/StructureDefinition/geneticsSpecies is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[15]: The extension http://hl7.org/fhir/StructureDefinition/geneticsCIGAR is unknown, and not allowed here (src = InstanceValidator)
genetics-example3-mutationlist
  • ERROR @ Observation.extension[1]: The extension http://hl7.org/fhir/StructureDefinition/geneticsGenomeBuild is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[2]: The extension http://hl7.org/fhir/StructureDefinition/geneticsGene is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[3]: The extension http://hl7.org/fhir/StructureDefinition/geneticsSpecies is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[4]: The extension http://hl7.org/fhir/StructureDefinition/geneticsResult is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[5]: The extension http://hl7.org/fhir/StructureDefinition/geneticsResult is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[6]: The extension http://hl7.org/fhir/StructureDefinition/geneticsResult is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[7]: The extension http://hl7.org/fhir/StructureDefinition/geneticsResult is unknown, and not allowed here (src = InstanceValidator)
genetics-example3-mutationlist-1
  • ERROR @ Observation.extension[1]: The extension http://hl7.org/fhir/StructureDefinition/geneticsDNASequenceVariation is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[2]: The extension http://hl7.org/fhir/StructureDefinition/geneticsDNARegionName is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[3]: The extension http://hl7.org/fhir/StructureDefinition/geneticsAminoAcidChange is unknown, and not allowed here (src = InstanceValidator)
genetics-example3-mutationlist-2
  • ERROR @ Observation.extension[1]: The extension http://hl7.org/fhir/StructureDefinition/geneticsDNARegionName is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[2]: The extension http://hl7.org/fhir/StructureDefinition/geneticsAminoAcidChange is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[3]: The extension http://hl7.org/fhir/StructureDefinition/geneticsVariationId is unknown, and not allowed here (src = InstanceValidator)
genetics-example3-mutationlist-3
  • ERROR @ Observation.extension[1]: The extension http://hl7.org/fhir/StructureDefinition/geneticsDNARegionName is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[2]: The extension http://hl7.org/fhir/StructureDefinition/geneticsVariationId is unknown, and not allowed here (src = InstanceValidator)
genetics-example3-mutationlist-4
  • ERROR @ Observation.extension[1]: The extension http://hl7.org/fhir/StructureDefinition/geneticsDNARegionName is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ Observation.extension[2]: The extension http://hl7.org/fhir/StructureDefinition/geneticsVariationId is unknown, and not allowed here (src = InstanceValidator)
obs-uslab-example1
  • ERROR @ Observation.extension: The extension http://hl7.org/fhir/StructureDefinition/uslab-observationkind is unknown, and not allowed here (src = InstanceValidator)
obs-uslab-example2
  • ERROR @ Observation.extension: The extension http://hl7.org/fhir/StructureDefinition/uslab-observationkind is unknown, and not allowed here (src = InstanceValidator)
obs-uslab-example3
  • ERROR @ Observation.extension: The extension http://hl7.org/fhir/StructureDefinition/uslab-observationkind is unknown, and not allowed here (src = InstanceValidator)
obs-uslab-example4
  • ERROR @ Observation.extension: The extension http://hl7.org/fhir/StructureDefinition/uslab-observationkind is unknown, and not allowed here (src = InstanceValidator)
obs-uslab-example5
  • ERROR @ Observation.extension: The extension http://hl7.org/fhir/StructureDefinition/uslab-observationkind is unknown, and not allowed here (src = InstanceValidator)
obs-uslab-example6
  • ERROR @ Observation.extension: The extension http://hl7.org/fhir/StructureDefinition/uslab-observationkind is unknown, and not allowed here (src = InstanceValidator)
obs-uslab-example7
  • ERROR @ Observation.extension: The extension http://hl7.org/fhir/StructureDefinition/uslab-observationkind is unknown, and not allowed here (src = InstanceValidator)
obs-uslab-example8
  • ERROR @ Observation.extension: The extension http://hl7.org/fhir/StructureDefinition/uslab-observationkind is unknown, and not allowed here (src = InstanceValidator)
  • WARNING @ Observation.code.coding[2].display: value should not start or finish with whitespace (src = InstanceValidator)