FHIR Extensions Pack
5.1.0 - 5.1.0 (April 2024) International flag

This page is part of the FHIR Core Extensions Registry (v5.1.0: Release 5.1) based on FHIR (HL7® FHIR® Standard) v5.0.0. This is the current published version. For a full list of available versions, see the Directory of published versions

: FML Conversion for Subscription: R5 to R4 - JSON Representation

Page standards status: Trial-use Maturity Level: 1

Raw json | Download


{
  "resourceType" : "StructureMap",
  "id" : "Subscription5to4",
  "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/Subscription5to4'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'Subscription5to4'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'FML Conversion for Subscription: 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>conceptmap</b><span style=\"color: navy\"> &quot;</span>SubscriptionStatusCodes<span style=\"color: navy\">&quot; {\r\n</span><b>  prefix </b>s<span style=\"color: navy\"> = &quot;</span><a href=\"http://hl7.org/fhir/R5/codesystem-subscription-status.html\" title=\"Subscription Status\">http://hl7.org/fhir/subscription-status</a><span style=\"color: navy\">&quot;\r\n</span><b>  prefix </b>t<span style=\"color: navy\"> = &quot;</span><a href=\"http://hl7.org/fhir/R4/codesystem-subscription-status.html\" title=\"SubscriptionStatus\">http://hl7.org/fhir/4.0/subscription-status</a><span style=\"color: navy\">&quot;\r\n</span>\r\n  s<span style=\"color: navy\">:</span>requested <b>-</b> t<span style=\"color: navy\">:</span>requested\r\n  s<span style=\"color: navy\">:</span>active <b>-</b> t<span style=\"color: navy\">:</span>active\r\n  s<span style=\"color: navy\">:</span>error <b>-</b> t<span style=\"color: navy\">:</span>error\r\n  s<span style=\"color: navy\">:</span>off <b>-</b> t<span style=\"color: navy\">:</span>off\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R5/subscription.html\" title=\"Subscription\">http://hl7.org/fhir/StructureDefinition/Subscription</a><span style=\"color: navy\">&quot; </span><b>alias </b>SubscriptionR5 <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R4/subscription.html\" title=\"Subscription\">http://hl7.org/fhir/4.0/StructureDefinition/Subscription</a><span style=\"color: navy\">&quot; </span><b>alias </b>SubscriptionR4 <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>Subscription<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>SubscriptionR5, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>SubscriptionR4<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> as </b><span style=\"color: maroon\">v</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.status = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">v</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'#SubscriptionStatusCodes'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">src.identifier -&gt; tgt.identifier;</span>\r\n  src.contact<span style=\"color: navy\"><b> -&gt; </b></span>tgt.contact<span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">src.topic -&gt; tgt.topic;</span>\r\n  src.end<span style=\"color: navy\"><b> -&gt; </b></span>tgt.end<span style=\"color: navy\">;</span>\r\n  src.reason<span style=\"color: navy\"><b> -&gt; </b></span>tgt.reason<span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">src.managingEntity -&gt; tgt.managingEntity;</span>\r\n  src<span style=\"color: navy\"><b> -&gt; </b></span>tgt.channel<b> as </b><span style=\"color: maroon\">t</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    src.channelType<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -&gt; </b></span><span style=\"color: maroon\">tgt</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      s.code<span style=\"color: navy\"><b> -&gt; </b></span>t.type<span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;type&quot;</i><span style=\"color: navy\">;</span>\r\n    src.endpoint<span style=\"color: navy\"><b> -&gt; </b></span>t.endpoint<span style=\"color: navy\">;</span>\r\n    src.contentType<span style=\"color: navy\"><b> -&gt; </b></span>t.payload<span style=\"color: navy\">;</span>\r\n    src.parameter<b> as </b><span style=\"color: maroon\">p</span><span style=\"color: navy\"><b> -&gt; </b></span>t.header = <span style=\"color: navy\">(</span>%p.name + ': ' + %p.value<span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;channel&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">criteria replaced - see subscriptions backport IG</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
  },
  "contained" : [
    {
      "resourceType" : "ConceptMap",
      "id" : "SubscriptionStatusCodes",
      "status" : "active",
      "group" : [
        {
          "source" : "http://hl7.org/fhir/subscription-status",
          "target" : "http://hl7.org/fhir/4.0/subscription-status",
          "element" : [
            {
              "code" : "requested",
              "target" : [
                {
                  "code" : "requested",
                  "relationship" : "related-to"
                }
              ]
            },
            {
              "code" : "active",
              "target" : [
                {
                  "code" : "active",
                  "relationship" : "related-to"
                }
              ]
            },
            {
              "code" : "error",
              "target" : [
                {
                  "code" : "error",
                  "relationship" : "related-to"
                }
              ]
            },
            {
              "code" : "off",
              "target" : [
                {
                  "code" : "off",
                  "relationship" : "related-to",
                  "comment" : "s:\"entered-in-error\" - t:\"entered-in-error\""
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "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.extensions"
          }
        ]
      }
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode" : "trial-use",
      "_valueCode" : {
        "extension" : [
          {
            "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom",
            "valueCanonical" : "http://hl7.org/fhir/extensions/ImplementationGuide/hl7.fhir.uv.extensions"
          }
        ]
      }
    }
  ],
  "url" : "http://hl7.org/fhir/StructureMap/Subscription5to4",
  "version" : "5.1.0",
  "name" : "Subscription5to4",
  "title" : "FML Conversion for Subscription: R5 to R4",
  "status" : "active",
  "date" : "2024-04-27T18:54:50+10:00",
  "publisher" : "HL7 International / FHIR Infrastructure",
  "contact" : [
    {
      "telecom" : [
        {
          "system" : "url",
          "value" : "http://www.hl7.org/Special/committees/fiwg"
        }
      ]
    }
  ],
  "description" : "FMLConversionforSubscriptionR5toR4",
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code" : "001"
        }
      ]
    }
  ],
  "structure" : [
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/Subscription",
      "mode" : "source",
      "alias" : "SubscriptionR5"
    },
    {
      "url" : "http://hl7.org/fhir/4.0/StructureDefinition/Subscription",
      "mode" : "target",
      "alias" : "SubscriptionR4"
    }
  ],
  "import" : [
    "http://hl7.org/fhir/StructureMap/*5to4"
  ],
  "group" : [
    {
      "name" : "Subscription",
      "extends" : "DomainResource",
      "typeMode" : "type-and-types",
      "input" : [
        {
          "name" : "src",
          "type" : "SubscriptionR5",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "SubscriptionR4",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "status",
          "source" : [
            {
              "context" : "src",
              "element" : "status",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "status",
              "transform" : "translate",
              "parameter" : [
                {
                  "valueId" : "v"
                },
                {
                  "valueString" : "#SubscriptionStatusCodes"
                },
                {
                  "valueString" : "code"
                }
              ]
            }
          ],
          "documentation" : "src.identifier -> tgt.identifier;"
        },
        {
          "name" : "contact",
          "source" : [
            {
              "context" : "src",
              "element" : "contact",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "contact",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ],
          "documentation" : "src.topic -> tgt.topic;"
        },
        {
          "name" : "end",
          "source" : [
            {
              "context" : "src",
              "element" : "end",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "end",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "reason",
          "source" : [
            {
              "context" : "src",
              "element" : "reason",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "reason",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ],
          "documentation" : "src.managingEntity -> tgt.managingEntity;"
        },
        {
          "name" : "channel",
          "source" : [
            {
              "context" : "src"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "channel",
              "variable" : "t"
            }
          ],
          "rule" : [
            {
              "name" : "type",
              "source" : [
                {
                  "context" : "src",
                  "element" : "channelType",
                  "variable" : "s"
                }
              ],
              "target" : [
                {
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "tgt"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "code",
                  "source" : [
                    {
                      "context" : "s",
                      "element" : "code",
                      "variable" : "vvv"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "t",
                      "element" : "type",
                      "variable" : "vvv",
                      "transform" : "create"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "DefaultMappingGroupAnonymousAlias",
                      "parameter" : [
                        {
                          "valueId" : "vvv"
                        },
                        {
                          "valueId" : "vvv"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "endpoint",
              "source" : [
                {
                  "context" : "src",
                  "element" : "endpoint",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "t",
                  "element" : "endpoint",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "contentType",
              "source" : [
                {
                  "context" : "src",
                  "element" : "contentType",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "t",
                  "element" : "payload",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "parameter",
              "source" : [
                {
                  "context" : "src",
                  "element" : "parameter",
                  "variable" : "p"
                }
              ],
              "target" : [
                {
                  "context" : "t",
                  "element" : "header",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "%p.name + ': ' + %p.value"
                    }
                  ]
                }
              ]
            }
          ],
          "documentation" : "criteria replaced - see subscriptions backport IG"
        }
      ]
    }
  ]
}