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 DeviceUsage: R4 to R5 - JSON Representation

Page standards status: Trial-use Maturity Level: 1

Raw json | Download


{
  "resourceType" : "StructureMap",
  "id" : "DeviceUsage4to5",
  "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/DeviceUsage4to5'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'DeviceUsage4to5'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'FML Conversion for DeviceUsage: R4 to R5'</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>DeviceUsageStatus<span style=\"color: navy\">&quot; {\r\n</span><b>  prefix </b>s<span style=\"color: navy\"> = &quot;</span><a href=\"http://hl7.org/fhir/R4/codesystem-device-statement-status.html\" title=\"DeviceUseStatementStatus\">http://hl7.org/fhir/4.0/device-statement-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/R5/codesystem-deviceusage-status.html\" title=\"Device Usage Status\">http://hl7.org/fhir/deviceusage-status</a><span style=\"color: navy\">&quot;\r\n</span>\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>completed <b>-</b> t<span style=\"color: navy\">:</span>completed\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  s<span style=\"color: navy\">:</span>intended <b>-</b> t<span style=\"color: navy\">:</span>intended\r\n  s<span style=\"color: navy\">:</span>stopped <b>-</b> t<span style=\"color: navy\">:</span>stopped\r\n  s<span style=\"color: navy\">:</span>&quot;on-hold&quot; <b>-</b> t<span style=\"color: navy\">:</span><span style=\"color: navy\">&quot;</span>on-hold<span style=\"color: navy\">&quot;</span>\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/R4/deviceusestatement.html\" title=\"DeviceUseStatement\">http://hl7.org/fhir/4.0/StructureDefinition/DeviceUseStatement</a><span style=\"color: navy\">&quot; </span><b>alias </b>DeviceUseStatementR4 <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R5/deviceusage.html\" title=\"DeviceUsage\">http://hl7.org/fhir/StructureDefinition/DeviceUsage</a><span style=\"color: navy\">&quot; </span><b>alias </b>DeviceUsageR5 <b>as </b><b>target</b>\r\n\r\n<b>imports</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/StructureMap/*4to5<span style=\"color: navy\">&quot;\r\n</span>\r\n<b>group </b>DeviceUsage<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>DeviceUseStatementR4, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>DeviceUsageR5<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.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\">'#DeviceUsageStatus'</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.subject<span style=\"color: navy\"><b> -&gt; </b></span>tgt.patient<span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">src.category -&gt; tgt.category;</span>\r\n  src.derivedFrom<span style=\"color: navy\"><b> -&gt; </b></span>tgt.derivedFrom<span style=\"color: navy\">;</span>\r\n  src.timing<span style=\"color: navy\"> : </span>Timing<span style=\"color: navy\"><b> -&gt; </b></span>tgt.timing<span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">src.context -&gt; tgt.context;</span>\r\n  src.timing<span style=\"color: navy\"> : </span>Period<span style=\"color: navy\"><b> -&gt; </b></span>tgt.timing<span style=\"color: navy\">;</span>\r\n  src.timing<span style=\"color: navy\"> : </span>dateTime<span style=\"color: navy\"><b> -&gt; </b></span>tgt.timing<span style=\"color: navy\">;</span>\r\n  src.recordedOn<span style=\"color: navy\"><b> -&gt; </b></span>tgt.dateAsserted<span style=\"color: navy\">;</span>\r\n  src.source<span style=\"color: navy\"><b> -&gt; </b></span>tgt.informationSource<span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">src.usageStatus as v -&gt; tgt.usageStatus = translate(v, '#DeviceUsageStatus', 'code');</span>\r\n  src.device<span style=\"color: navy\"><b> -&gt; </b></span>tgt.device<span style=\"color: navy\">;</span>\r\n  src.reasonCode<span style=\"color: navy\"><b> -&gt; </b></span>tgt.reason<span style=\"color: navy\">;</span>\r\n  src.reasonReference<span style=\"color: navy\"><b> -&gt; </b></span>tgt.reason<span style=\"color: navy\">;</span>\r\n  src.bodySite<span style=\"color: navy\"><b> -&gt; </b></span>tgt.bodySite<span style=\"color: navy\">;</span>\r\n  src.note<span style=\"color: navy\"><b> -&gt; </b></span>tgt.note<span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
  },
  "contained" : [
    {
      "resourceType" : "ConceptMap",
      "id" : "DeviceUsageStatus",
      "status" : "active",
      "group" : [
        {
          "source" : "http://hl7.org/fhir/4.0/device-statement-status",
          "target" : "http://hl7.org/fhir/deviceusage-status",
          "element" : [
            {
              "code" : "active",
              "target" : [
                {
                  "code" : "active",
                  "relationship" : "related-to"
                }
              ]
            },
            {
              "code" : "completed",
              "target" : [
                {
                  "code" : "completed",
                  "relationship" : "related-to",
                  "comment" : "s:\"not-done\" - t:\"not-done\""
                }
              ]
            },
            {
              "code" : "entered-in-error",
              "target" : [
                {
                  "code" : "entered-in-error",
                  "relationship" : "related-to"
                }
              ]
            },
            {
              "code" : "intended",
              "target" : [
                {
                  "code" : "intended",
                  "relationship" : "related-to"
                }
              ]
            },
            {
              "code" : "stopped",
              "target" : [
                {
                  "code" : "stopped",
                  "relationship" : "related-to"
                }
              ]
            },
            {
              "code" : "on-hold",
              "target" : [
                {
                  "code" : "on-hold",
                  "relationship" : "related-to"
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "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/DeviceUsage4to5",
  "version" : "5.1.0",
  "name" : "DeviceUsage4to5",
  "title" : "FML Conversion for DeviceUsage: R4 to R5",
  "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" : "FMLConversionforDeviceUsageR4toR5",
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code" : "001"
        }
      ]
    }
  ],
  "structure" : [
    {
      "url" : "http://hl7.org/fhir/4.0/StructureDefinition/DeviceUseStatement",
      "mode" : "source",
      "alias" : "DeviceUseStatementR4"
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/DeviceUsage",
      "mode" : "target",
      "alias" : "DeviceUsageR5"
    }
  ],
  "import" : [
    "http://hl7.org/fhir/StructureMap/*4to5"
  ],
  "group" : [
    {
      "name" : "DeviceUsage",
      "extends" : "DomainResource",
      "typeMode" : "type-and-types",
      "input" : [
        {
          "name" : "src",
          "type" : "DeviceUseStatementR4",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "DeviceUsageR5",
          "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" : "status",
          "source" : [
            {
              "context" : "src",
              "element" : "status",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "status",
              "transform" : "translate",
              "parameter" : [
                {
                  "valueId" : "v"
                },
                {
                  "valueString" : "#DeviceUsageStatus"
                },
                {
                  "valueString" : "code"
                }
              ]
            }
          ]
        },
        {
          "name" : "subject",
          "source" : [
            {
              "context" : "src",
              "element" : "subject",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "patient",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ],
          "documentation" : "src.category -> tgt.category;"
        },
        {
          "name" : "derivedFrom",
          "source" : [
            {
              "context" : "src",
              "element" : "derivedFrom",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "derivedFrom",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "timingTiming",
          "source" : [
            {
              "context" : "src",
              "type" : "Timing",
              "element" : "timing",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "timing",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ],
          "documentation" : "src.context -> tgt.context;"
        },
        {
          "name" : "timingPeriod",
          "source" : [
            {
              "context" : "src",
              "type" : "Period",
              "element" : "timing",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "timing",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "timingDateTime",
          "source" : [
            {
              "context" : "src",
              "type" : "dateTime",
              "element" : "timing",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "timing",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "recordedOn",
          "source" : [
            {
              "context" : "src",
              "element" : "recordedOn",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "dateAsserted",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "source",
          "source" : [
            {
              "context" : "src",
              "element" : "source",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "informationSource",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ],
          "documentation" : "src.usageStatus as v -> tgt.usageStatus = translate(v, '#DeviceUsageStatus', 'code');"
        },
        {
          "name" : "device",
          "source" : [
            {
              "context" : "src",
              "element" : "device",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "device",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "reasonCode",
          "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" : "reasonReference",
          "source" : [
            {
              "context" : "src",
              "element" : "reasonReference",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "reason",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "bodySite",
          "source" : [
            {
              "context" : "src",
              "element" : "bodySite",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "bodySite",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "note",
          "source" : [
            {
              "context" : "src",
              "element" : "note",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "note",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}