FHIR Extensions Pack
5.1.0-ballot1 - Ballot for Release 5.1.0 International flag

This page is part of the FHIR Core Extensions Registry (v5.1.0-ballot: Releases Ballot 4) based on FHIR (HL7® FHIR® Standard) v5.0.0. The current version which supersedes this version is 1.0.0. For a full list of available versions, see the Directory of published versions

: FML Conversion for SupplyDelivery: R5 to R4B - JSON Representation

Page standards status: Trial-use Maturity Level: 1

Raw json | Download


{
  "resourceType" : "StructureMap",
  "id" : "SupplyDelivery5to4B",
  "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/SupplyDelivery5to4B'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'SupplyDelivery5to4B'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'FML Conversion for SupplyDelivery: R5 to R4B'</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>SupplyDeliveryStatus<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-supplydelivery-status.html\" title=\"Supply Delivery Status\">http://hl7.org/fhir/supplydelivery-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/R4B/codesystem-supplydelivery-status.html\" title=\"SupplyDeliveryStatus\">http://hl7.org/fhir/4.3/supplydelivery-status</a><span style=\"color: navy\">&quot;\r\n</span>\r\n  s<span style=\"color: navy\">:</span>&quot;in-progress&quot; <b>-</b> t<span style=\"color: navy\">:</span><span style=\"color: navy\">&quot;</span>in-progress<span style=\"color: navy\">&quot;</span>\r\n  s<span style=\"color: navy\">:</span>completed <b>-</b> t<span style=\"color: navy\">:</span>completed\r\n  s<span style=\"color: navy\">:</span>abandoned <b>-</b> t<span style=\"color: navy\">:</span>abandoned\r\n  s<span style=\"color: navy\">:</span>&quot;entered-in-error&quot; <b>-</b> t<span style=\"color: navy\">:</span><span style=\"color: navy\">&quot;</span>entered-in-error<span style=\"color: navy\">&quot;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>conceptmap</b><span style=\"color: navy\"> &quot;</span>SupplyDeliverySupplyItemType<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-supplydelivery-supplyitemtype.html\" title=\"Supply Delivery Supply Item Type\">http://hl7.org/fhir/supplydelivery-supplyitemtype</a><span style=\"color: navy\">&quot;\r\n</span><b>  prefix </b>t<span style=\"color: navy\"> = &quot;</span><a href=\"http://terminology.hl7.org/5.3.0/CodeSystem-supply-item-type.html\" title=\"Supply Item Type\">http://terminology.hl7.org/CodeSystem/supply-item-type</a><span style=\"color: navy\">&quot;\r\n</span>\r\n  s<span style=\"color: navy\">:</span>medication <b>-</b> t<span style=\"color: navy\">:</span>medication\r\n  s<span style=\"color: navy\">:</span>device <b>-</b> t<span style=\"color: navy\">:</span>device\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/supplydelivery.html\" title=\"SupplyDelivery\">http://hl7.org/fhir/StructureDefinition/SupplyDelivery</a><span style=\"color: navy\">&quot; </span><b>alias </b>SupplyDeliveryR5 <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R4B/supplydelivery.html\" title=\"SupplyDelivery\">http://hl7.org/fhir/4.3/StructureDefinition/SupplyDelivery</a><span style=\"color: navy\">&quot; </span><b>alias </b>SupplyDeliveryR4B <b>as </b><b>target</b>\r\n\r\n<b>imports</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/StructureMap/*5to4B<span style=\"color: navy\">&quot;\r\n</span>\r\n<b>group </b>SupplyDelivery<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>SupplyDeliveryR5, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>SupplyDeliveryR4B<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.basedOn<span style=\"color: navy\"><b> -&gt; </b></span>tgt.basedOn<span style=\"color: navy\">;</span>\r\n  src.partOf<span style=\"color: navy\"><b> -&gt; </b></span>tgt.partOf<span style=\"color: navy\">;</span>\r\n  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\">'#SupplyDeliveryStatus'</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.patient<span style=\"color: navy\"><b> -&gt; </b></span>tgt.patient<span style=\"color: navy\">;</span>\r\n  src.type<b> as </b><span style=\"color: maroon\">v</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.type = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">v</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'#SupplyDeliverySupplyItemType'</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.suppliedItem<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.suppliedItem<b> as </b><span style=\"color: maroon\">t</span><b> then </b>SupplyDeliverySuppliedItem<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.occurrence<span style=\"color: navy\"> : </span>dateTime<span style=\"color: navy\"><b> -&gt; </b></span>tgt.occurrence<span style=\"color: navy\">;</span>\r\n  src.occurrence<span style=\"color: navy\"> : </span>Period<span style=\"color: navy\"><b> -&gt; </b></span>tgt.occurrence<span style=\"color: navy\">;</span>\r\n  src.occurrence<span style=\"color: navy\"> : </span>Timing<span style=\"color: navy\"><b> -&gt; </b></span>tgt.occurrence<span style=\"color: navy\">;</span>\r\n  src.supplier<span style=\"color: navy\"><b> -&gt; </b></span>tgt.supplier<span style=\"color: navy\">;</span>\r\n  src.destination<span style=\"color: navy\"><b> -&gt; </b></span>tgt.destination<span style=\"color: navy\">;</span>\r\n  src.receiver<span style=\"color: navy\"><b> -&gt; </b></span>tgt.receiver<span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>SupplyDeliverySuppliedItem<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.quantity<span style=\"color: navy\"><b> -&gt; </b></span>tgt.quantity<span style=\"color: navy\">;</span>\r\n  src.item<span style=\"color: navy\"> : </span>CodeableConcept<span style=\"color: navy\"><b> -&gt; </b></span>tgt.item<span style=\"color: navy\">;</span>\r\n  src.item<span style=\"color: navy\"> : </span>Reference<span style=\"color: navy\"><b> -&gt; </b></span>tgt.item<span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
  },
  "contained" : [
    {
      "resourceType" : "ConceptMap",
      "id" : "SupplyDeliveryStatus",
      "status" : "active",
      "group" : [
        {
          "source" : "http://hl7.org/fhir/supplydelivery-status",
          "target" : "http://hl7.org/fhir/4.3/supplydelivery-status",
          "element" : [
            {
              "code" : "in-progress",
              "target" : [
                {
                  "code" : "in-progress",
                  "relationship" : "related-to"
                }
              ]
            },
            {
              "code" : "completed",
              "target" : [
                {
                  "code" : "completed",
                  "relationship" : "related-to"
                }
              ]
            },
            {
              "code" : "abandoned",
              "target" : [
                {
                  "code" : "abandoned",
                  "relationship" : "related-to"
                }
              ]
            },
            {
              "code" : "entered-in-error",
              "target" : [
                {
                  "code" : "entered-in-error",
                  "relationship" : "related-to"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "resourceType" : "ConceptMap",
      "id" : "SupplyDeliverySupplyItemType",
      "status" : "active",
      "group" : [
        {
          "source" : "http://hl7.org/fhir/supplydelivery-supplyitemtype",
          "target" : "http://terminology.hl7.org/CodeSystem/supply-item-type",
          "element" : [
            {
              "code" : "medication",
              "target" : [
                {
                  "code" : "medication",
                  "relationship" : "related-to"
                }
              ]
            },
            {
              "code" : "device",
              "target" : [
                {
                  "code" : "device",
                  "relationship" : "related-to",
                  "comment" : "s:\"biologicallyderivedproduct\" - t:\"biologicallyderivedproduct\""
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "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/SupplyDelivery5to4B",
  "version" : "5.1.0-ballot1",
  "name" : "SupplyDelivery5to4B",
  "title" : "FML Conversion for SupplyDelivery: R5 to R4B",
  "status" : "active",
  "date" : "2023-12-19T08:40:03+11:00",
  "publisher" : "HL7 International / FHIR Infrastructure",
  "contact" : [
    {
      "telecom" : [
        {
          "system" : "url",
          "value" : "http://www.hl7.org/Special/committees/fiwg"
        }
      ]
    }
  ],
  "description" : "FMLConversionforSupplyDeliveryR5toR4B",
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code" : "001"
        }
      ]
    }
  ],
  "structure" : [
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/SupplyDelivery",
      "mode" : "source",
      "alias" : "SupplyDeliveryR5"
    },
    {
      "url" : "http://hl7.org/fhir/4.3/StructureDefinition/SupplyDelivery",
      "mode" : "target",
      "alias" : "SupplyDeliveryR4B"
    }
  ],
  "import" : [
    "http://hl7.org/fhir/StructureMap/*5to4B"
  ],
  "group" : [
    {
      "name" : "SupplyDelivery",
      "extends" : "DomainResource",
      "typeMode" : "type-and-types",
      "input" : [
        {
          "name" : "src",
          "type" : "SupplyDeliveryR5",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "SupplyDeliveryR4B",
          "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" : "basedOn",
          "source" : [
            {
              "context" : "src",
              "element" : "basedOn",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "basedOn",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "partOf",
          "source" : [
            {
              "context" : "src",
              "element" : "partOf",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "partOf",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "status",
          "source" : [
            {
              "context" : "src",
              "element" : "status",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "status",
              "transform" : "translate",
              "parameter" : [
                {
                  "valueId" : "v"
                },
                {
                  "valueString" : "#SupplyDeliveryStatus"
                },
                {
                  "valueString" : "code"
                }
              ]
            }
          ]
        },
        {
          "name" : "patient",
          "source" : [
            {
              "context" : "src",
              "element" : "patient",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "patient",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "type",
          "source" : [
            {
              "context" : "src",
              "element" : "type",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "type",
              "transform" : "translate",
              "parameter" : [
                {
                  "valueId" : "v"
                },
                {
                  "valueString" : "#SupplyDeliverySupplyItemType"
                },
                {
                  "valueString" : "code"
                }
              ]
            }
          ]
        },
        {
          "name" : "suppliedItem",
          "source" : [
            {
              "context" : "src",
              "element" : "suppliedItem",
              "variable" : "s"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "suppliedItem",
              "variable" : "t"
            }
          ],
          "dependent" : [
            {
              "name" : "SupplyDeliverySuppliedItem",
              "parameter" : [
                {
                  "valueId" : "s"
                },
                {
                  "valueId" : "t"
                }
              ]
            }
          ]
        },
        {
          "name" : "occurrenceDateTime",
          "source" : [
            {
              "context" : "src",
              "type" : "dateTime",
              "element" : "occurrence",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "occurrence",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "occurrencePeriod",
          "source" : [
            {
              "context" : "src",
              "type" : "Period",
              "element" : "occurrence",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "occurrence",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "occurrenceTiming",
          "source" : [
            {
              "context" : "src",
              "type" : "Timing",
              "element" : "occurrence",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "occurrence",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "supplier",
          "source" : [
            {
              "context" : "src",
              "element" : "supplier",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "supplier",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "destination",
          "source" : [
            {
              "context" : "src",
              "element" : "destination",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "destination",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "receiver",
          "source" : [
            {
              "context" : "src",
              "element" : "receiver",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "receiver",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "SupplyDeliverySuppliedItem",
      "extends" : "BackboneElement",
      "input" : [
        {
          "name" : "src",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "quantity",
          "source" : [
            {
              "context" : "src",
              "element" : "quantity",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "quantity",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "itemCodeableConcept",
          "source" : [
            {
              "context" : "src",
              "type" : "CodeableConcept",
              "element" : "item",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "item",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "itemReference",
          "source" : [
            {
              "context" : "src",
              "type" : "Reference",
              "element" : "item",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "item",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}