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

: ReferralRequest Transforms: R3 to R2 - JSON Representation

Page standards status: Draft Maturity Level: 1

Raw json | Download


{
  "resourceType" : "StructureMap",
  "id" : "ReferralRequest3to2",
  "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/ReferralRequest3to2'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'ReferralRequest3to2'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'ReferralRequest Transforms: R3 to R2'</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/3.0/ReferralRequest<span style=\"color: navy\">&quot; </span><b>alias </b>ReferralRequest <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/1.0/ReferralRequest<span style=\"color: navy\">&quot; </span><b>alias </b>ReferralRequestR2 <b>as </b><b>target</b>\r\n\r\n<b>imports</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/StructureMap/*3to2<span style=\"color: navy\">&quot;\r\n</span>\r\n<b>group </b>ReferralRequest<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>ReferralRequest, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>ReferralRequestR2<span style=\"color: navy\">)</span><b> extends </b>DomainResource<b> &lt;&lt;type+&gt;&gt;</b><span style=\"color: navy\"> {\r\n</span>  src.status<b> check </b>$this != 'entered-in-error'<span style=\"color: navy\"><b> -&gt; </b></span>tgt.status <i>&quot;ReferralRequest-status&quot;</i><span style=\"color: navy\">;</span>\r\n  src.identifier<span style=\"color: navy\"><b> -&gt; </b></span>tgt.identifier <i>&quot;ReferralRequest-identifier&quot;</i><span style=\"color: navy\">;</span>\r\n  src.authoredOn<span style=\"color: navy\"><b> -&gt; </b></span>tgt.date <i>&quot;ReferralRequest-date&quot;</i><span style=\"color: navy\">;</span>\r\n  src.type<span style=\"color: navy\"><b> -&gt; </b></span>tgt.type <i>&quot;ReferralRequest-type&quot;</i><span style=\"color: navy\">;</span>\r\n  src.specialty<span style=\"color: navy\"><b> -&gt; </b></span>tgt.specialty <i>&quot;ReferralRequest-specialty&quot;</i><span style=\"color: navy\">;</span>\r\n  src.priority<b> as </b><span style=\"color: maroon\">v</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.priority = <b>cc</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://hl7.org/fhir/diagnostic-order-priority'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">v</span><span style=\"color: navy\">)</span> <i>&quot;ReferralRequest-priority&quot;</i><span style=\"color: navy\">;</span>\r\n  src.subject<span style=\"color: navy\"><b> -&gt; </b></span>tgt.patient <i>&quot;ReferralRequest-patient&quot;</i><span style=\"color: navy\">;</span>\r\n  src.requester<b> as </b><span style=\"color: maroon\">v</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    v.agent<span style=\"color: navy\"><b> -&gt; </b></span>tgt.requester <i>&quot;ReferralRequest-requester-inner&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;ReferralRequest-requester&quot;</i><span style=\"color: navy\">;</span>\r\n  src.recipient<span style=\"color: navy\"><b> -&gt; </b></span>tgt.recipient <i>&quot;ReferralRequest-recipient&quot;</i><span style=\"color: navy\">;</span>\r\n  src.context<span style=\"color: navy\"><b> -&gt; </b></span>tgt.encounter <i>&quot;ReferralRequest-encounter&quot;</i><span style=\"color: navy\">;</span>\r\n  src.reasonCode<span style=\"color: navy\"><b> -&gt; </b></span>tgt.reason <i>&quot;ReferralRequest-reason&quot;</i><span style=\"color: navy\">;</span>\r\n  src.description<span style=\"color: navy\"><b> -&gt; </b></span>tgt.description <i>&quot;ReferralRequest-description&quot;</i><span style=\"color: navy\">;</span>\r\n  src.serviceRequested<span style=\"color: navy\"><b> -&gt; </b></span>tgt.serviceRequested <i>&quot;ReferralRequest-serviceRequested&quot;</i><span style=\"color: navy\">;</span>\r\n  src.supportingInfo<span style=\"color: navy\"><b> -&gt; </b></span>tgt.supportingInformation <i>&quot;ReferralRequest-supportingInformation&quot;</i><span style=\"color: navy\">;</span>\r\n  src.occurrence<span style=\"color: navy\"><b> -&gt; </b></span>tgt.fulfillmentTime <i>&quot;ReferralRequest-fulfillmentTime&quot;</i><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/ReferralRequest3to2",
  "version" : "0.1.0",
  "name" : "ReferralRequest3to2",
  "title" : "ReferralRequest Transforms: R3 to R2",
  "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" : "ReferralRequestTransformsR3toR2",
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code" : "001"
        }
      ]
    }
  ],
  "structure" : [
    {
      "url" : "http://hl7.org/fhir/3.0/ReferralRequest",
      "mode" : "source",
      "alias" : "ReferralRequest"
    },
    {
      "url" : "http://hl7.org/fhir/1.0/ReferralRequest",
      "mode" : "target",
      "alias" : "ReferralRequestR2"
    }
  ],
  "import" : [
    "http://hl7.org/fhir/StructureMap/*3to2"
  ],
  "group" : [
    {
      "name" : "ReferralRequest",
      "extends" : "DomainResource",
      "typeMode" : "type-and-types",
      "input" : [
        {
          "name" : "src",
          "type" : "ReferralRequest",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "ReferralRequestR2",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "ReferralRequest-status",
          "source" : [
            {
              "context" : "src",
              "element" : "status",
              "variable" : "vvv",
              "check" : "$this != 'entered-in-error'"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "status",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "ReferralRequest-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" : "ReferralRequest-date",
          "source" : [
            {
              "context" : "src",
              "element" : "authoredOn",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "date",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "ReferralRequest-type",
          "source" : [
            {
              "context" : "src",
              "element" : "type",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "type",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "ReferralRequest-specialty",
          "source" : [
            {
              "context" : "src",
              "element" : "specialty",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "specialty",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "ReferralRequest-priority",
          "source" : [
            {
              "context" : "src",
              "element" : "priority",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "priority",
              "transform" : "cc",
              "parameter" : [
                {
                  "valueString" : "http://hl7.org/fhir/diagnostic-order-priority"
                },
                {
                  "valueId" : "v"
                }
              ]
            }
          ]
        },
        {
          "name" : "ReferralRequest-patient",
          "source" : [
            {
              "context" : "src",
              "element" : "subject",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "patient",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "ReferralRequest-requester",
          "source" : [
            {
              "context" : "src",
              "element" : "requester",
              "variable" : "v"
            }
          ],
          "rule" : [
            {
              "name" : "ReferralRequest-requester-inner",
              "source" : [
                {
                  "context" : "v",
                  "element" : "agent",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "requester",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "ReferralRequest-recipient",
          "source" : [
            {
              "context" : "src",
              "element" : "recipient",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "recipient",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "ReferralRequest-encounter",
          "source" : [
            {
              "context" : "src",
              "element" : "context",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "encounter",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "ReferralRequest-reason",
          "source" : [
            {
              "context" : "src",
              "element" : "reasonCode",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "reason",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "ReferralRequest-description",
          "source" : [
            {
              "context" : "src",
              "element" : "description",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "description",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "ReferralRequest-serviceRequested",
          "source" : [
            {
              "context" : "src",
              "element" : "serviceRequested",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "serviceRequested",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "ReferralRequest-supportingInformation",
          "source" : [
            {
              "context" : "src",
              "element" : "supportingInfo",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "supportingInformation",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "ReferralRequest-fulfillmentTime",
          "source" : [
            {
              "context" : "src",
              "element" : "occurrence",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "fulfillmentTime",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}