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

: ObservationDefinition Transforms: R5 to R4 - JSON Representation

Page standards status: Draft Maturity Level: 1

Raw json | Download


{
  "resourceType" : "StructureMap",
  "id" : "ObservationDefinition5to4",
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><pre class=\"fml\">\r\n<span style=\"color: #cc00cc\">/// <b>url</b> = </span><span style=\"color: blue\">'http://hl7.org/fhir/StructureMap/ObservationDefinition5to4'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'ObservationDefinition5to4'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'ObservationDefinition Transforms: R5 to R4'</span>\r\n<span style=\"color: #cc00cc\">/// <b>status</b> = </span><span style=\"color: blue\">'active'</span>\r\n\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/5.0/ObservationDefinition<span style=\"color: navy\">&quot; </span><b>alias </b>ObservationDefinitionR5 <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/4.0/ObservationDefinition<span style=\"color: navy\">&quot; </span><b>alias </b>ObservationDefinitionR4 <b>as </b><b>target</b>\r\n\r\n<b>imports</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/StructureMap/*5to4<span style=\"color: navy\">&quot;\r\n</span>\r\n<b>group </b>ObservationDefinition<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>ObservationDefinitionR5, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>ObservationDefinitionR4<span style=\"color: navy\">)</span><b> extends </b>DomainResource<b> &lt;&lt;type+&gt;&gt;</b><span style=\"color: navy\"> {\r\n</span>  src.identifier<span style=\"color: navy\"><b> -&gt; </b></span>tgt.identifier<span style=\"color: navy\">;</span>\r\n  src.category<span style=\"color: navy\"><b> -&gt; </b></span>tgt.category<span style=\"color: navy\">;</span>\r\n  src.code<span style=\"color: navy\"><b> -&gt; </b></span>tgt.code<span style=\"color: navy\">;</span>\r\n  src.permittedDataType<b> as </b><span style=\"color: maroon\">v</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.permittedDataType = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">v</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'http://hl7.org/fhir/ConceptMap/ObservationDefinition.permittedDataType-R5toR4'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n  src.multipleResultsAllowed<span style=\"color: navy\"><b> -&gt; </b></span>tgt.multipleResultsAllowed<span style=\"color: navy\">;</span>\r\n  src.method<span style=\"color: navy\"><b> -&gt; </b></span>tgt.method<span style=\"color: navy\">;</span>\r\n  src.preferredReportName<span style=\"color: navy\"><b> -&gt; </b></span>tgt.preferredReportName<span style=\"color: navy\">;</span>\r\n  src.permittedUnit<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -&gt; </b></span> tgt.quantitativeDetails<b> as </b><span style=\"color: maroon\">t</span><span style=\"color: navy\">, </span> t.customaryUnit<b> as </b><span style=\"color: maroon\">t1</span><span style=\"color: navy\">, </span> t1.coding = <span style=\"color: maroon\">s</span><span style=\"color: navy\">;</span>\r\n  src.qualifiedValue<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.qualifiedInterval<b> as </b><span style=\"color: maroon\">t</span><b> then </b>ObservationDefinitionQualifiedValue<span style=\"color: navy\">(</span><span style=\"color: maroon\">s</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">t</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n  src.qualifiedValue<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.validCodedValueSet = <span style=\"color: maroon\">t.validCodedValueSet</span><span style=\"color: navy\">;</span>\r\n  src.qualifiedValue<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.normalCodedValueSet = <span style=\"color: maroon\">t.normalCodedValueSet</span><span style=\"color: navy\">;</span>\r\n  src.qualifiedValue<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.abnormalCodedValueSet = <span style=\"color: maroon\">t.abnormalCodedValueSet</span><span style=\"color: navy\">;</span>\r\n  src.qualifiedValue<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.criticalCodedValueSet = <span style=\"color: maroon\">t.criticalCodedValueSet</span><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>ObservationDefinitionQualifiedValue<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\">)</span><b> extends </b>BackboneElement<span style=\"color: navy\"> {\r\n</span>  src.context<span style=\"color: navy\"><b> -&gt; </b></span>tgt.context<span style=\"color: navy\">;</span>\r\n  src.appliesTo<span style=\"color: navy\"><b> -&gt; </b></span>tgt.appliesTo<span style=\"color: navy\">;</span>\r\n  src.gender<b> as </b><span style=\"color: maroon\">v</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.gender = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">v</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'http://hl7.org/fhir/ConceptMap/ObservationDefinition.qualifiedValue.gender-R5toR4'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n  src.age<span style=\"color: navy\"><b> -&gt; </b></span>tgt.age<span style=\"color: navy\">;</span>\r\n  src.gestationalAge<span style=\"color: navy\"><b> -&gt; </b></span>tgt.gestationalAge<span style=\"color: navy\">;</span>\r\n  src.condition<span style=\"color: navy\"><b> -&gt; </b></span>tgt.condition<span style=\"color: navy\">;</span>\r\n  src.rangeCategory<b> as </b><span style=\"color: maroon\">v</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.category = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">v</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'http://hl7.org/fhir/ConceptMap/ObservationDefinition.qualifiedValue.rangeCategory-R5toR4'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n  src.range<span style=\"color: navy\"><b> -&gt; </b></span>tgt.range<span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
  },
  "extension" : [
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode" : "fhir"
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger" : 1,
      "_valueInteger" : {
        "extension" : [
          {
            "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom",
            "valueCanonical" : "http://hl7.org/fhir/extensions/ImplementationGuide/hl7.fhir.uv.xver"
          }
        ]
      }
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode" : "draft",
      "_valueCode" : {
        "extension" : [
          {
            "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom",
            "valueCanonical" : "http://hl7.org/fhir/extensions/ImplementationGuide/hl7.fhir.uv.xver"
          }
        ]
      }
    }
  ],
  "url" : "http://hl7.org/fhir/StructureMap/ObservationDefinition5to4",
  "version" : "0.1.0",
  "name" : "ObservationDefinition5to4",
  "title" : "ObservationDefinition Transforms: R5 to R4",
  "status" : "active",
  "date" : "2024-02-22T03:16:50+00:00",
  "publisher" : "HL7 International / FHIR Infrastructure",
  "contact" : [
    {
      "telecom" : [
        {
          "system" : "url",
          "value" : "http://www.hl7.org/Special/committees/fiwg"
        }
      ]
    }
  ],
  "description" : "ObservationDefinitionTransformsR5toR4",
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code" : "001"
        }
      ]
    }
  ],
  "structure" : [
    {
      "url" : "http://hl7.org/fhir/5.0/ObservationDefinition",
      "mode" : "source",
      "alias" : "ObservationDefinitionR5"
    },
    {
      "url" : "http://hl7.org/fhir/4.0/ObservationDefinition",
      "mode" : "target",
      "alias" : "ObservationDefinitionR4"
    }
  ],
  "import" : [
    "http://hl7.org/fhir/StructureMap/*5to4"
  ],
  "group" : [
    {
      "name" : "ObservationDefinition",
      "extends" : "DomainResource",
      "typeMode" : "type-and-types",
      "input" : [
        {
          "name" : "src",
          "type" : "ObservationDefinitionR5",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "ObservationDefinitionR4",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "identifier",
          "source" : [
            {
              "context" : "src",
              "element" : "identifier",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "identifier",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "category",
          "source" : [
            {
              "context" : "src",
              "element" : "category",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "category",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "code",
          "source" : [
            {
              "context" : "src",
              "element" : "code",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "code",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "permittedDataType",
          "source" : [
            {
              "context" : "src",
              "element" : "permittedDataType",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "permittedDataType",
              "transform" : "translate",
              "parameter" : [
                {
                  "valueId" : "v"
                },
                {
                  "valueString" : "http://hl7.org/fhir/ConceptMap/ObservationDefinition.permittedDataType-R5toR4"
                },
                {
                  "valueString" : "code"
                }
              ]
            }
          ]
        },
        {
          "name" : "multipleResultsAllowed",
          "source" : [
            {
              "context" : "src",
              "element" : "multipleResultsAllowed",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "multipleResultsAllowed",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "method",
          "source" : [
            {
              "context" : "src",
              "element" : "method",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "method",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "preferredReportName",
          "source" : [
            {
              "context" : "src",
              "element" : "preferredReportName",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "preferredReportName",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "permittedUnit",
          "source" : [
            {
              "context" : "src",
              "element" : "permittedUnit",
              "variable" : "s"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "quantitativeDetails",
              "variable" : "t"
            },
            {
              "context" : "t",
              "element" : "customaryUnit",
              "variable" : "t1"
            },
            {
              "context" : "t1",
              "element" : "coding",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "s"
                }
              ]
            }
          ]
        },
        {
          "name" : "qualifiedValue",
          "source" : [
            {
              "context" : "src",
              "element" : "qualifiedValue",
              "variable" : "s"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "qualifiedInterval",
              "variable" : "t"
            }
          ],
          "dependent" : [
            {
              "name" : "ObservationDefinitionQualifiedValue",
              "parameter" : [
                {
                  "valueId" : "s"
                },
                {
                  "valueId" : "t"
                }
              ]
            }
          ]
        },
        {
          "name" : "qualifiedValue",
          "source" : [
            {
              "context" : "src",
              "element" : "qualifiedValue",
              "variable" : "s"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "validCodedValueSet",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "t.validCodedValueSet"
                }
              ]
            }
          ]
        },
        {
          "name" : "qualifiedValue",
          "source" : [
            {
              "context" : "src",
              "element" : "qualifiedValue",
              "variable" : "s"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "normalCodedValueSet",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "t.normalCodedValueSet"
                }
              ]
            }
          ]
        },
        {
          "name" : "qualifiedValue",
          "source" : [
            {
              "context" : "src",
              "element" : "qualifiedValue",
              "variable" : "s"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "abnormalCodedValueSet",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "t.abnormalCodedValueSet"
                }
              ]
            }
          ]
        },
        {
          "name" : "qualifiedValue",
          "source" : [
            {
              "context" : "src",
              "element" : "qualifiedValue",
              "variable" : "s"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "criticalCodedValueSet",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "t.criticalCodedValueSet"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "ObservationDefinitionQualifiedValue",
      "extends" : "BackboneElement",
      "input" : [
        {
          "name" : "src",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "context",
          "source" : [
            {
              "context" : "src",
              "element" : "context",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "context",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "appliesTo",
          "source" : [
            {
              "context" : "src",
              "element" : "appliesTo",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "appliesTo",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "gender",
          "source" : [
            {
              "context" : "src",
              "element" : "gender",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "gender",
              "transform" : "translate",
              "parameter" : [
                {
                  "valueId" : "v"
                },
                {
                  "valueString" : "http://hl7.org/fhir/ConceptMap/ObservationDefinition.qualifiedValue.gender-R5toR4"
                },
                {
                  "valueString" : "code"
                }
              ]
            }
          ]
        },
        {
          "name" : "age",
          "source" : [
            {
              "context" : "src",
              "element" : "age",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "age",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "gestationalAge",
          "source" : [
            {
              "context" : "src",
              "element" : "gestationalAge",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "gestationalAge",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "condition",
          "source" : [
            {
              "context" : "src",
              "element" : "condition",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "condition",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "rangeCategory",
          "source" : [
            {
              "context" : "src",
              "element" : "rangeCategory",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "category",
              "transform" : "translate",
              "parameter" : [
                {
                  "valueId" : "v"
                },
                {
                  "valueString" : "http://hl7.org/fhir/ConceptMap/ObservationDefinition.qualifiedValue.rangeCategory-R5toR4"
                },
                {
                  "valueString" : "code"
                }
              ]
            }
          ]
        },
        {
          "name" : "range",
          "source" : [
            {
              "context" : "src",
              "element" : "range",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "range",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}