FHIR Mapping Language (FML)
0.1.0 - STU 1 World

FHIR Mapping Language (FML), 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/mapping-language-ig/ and changes regularly. See the Directory of published versions

: SourceLog

Page standards status: Informative

Raw json | Download

{
  "resourceType" : "StructureMap",
  "resourceDefinition" : "http://hl7.org/fhir/StructureDefinition/StructureMap|0.1.0",
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureMap SourceLog</b></p><a name=\"SourceLog\"> </a><a name=\"hcSourceLog\"> </a><pre class=\"fml\">\r\n<span style=\"color: #cc00cc\">/// <b>url</b> = </span><span style=\"color: blue\">'http://hl7.org/fhir/uv/mapping-language/StructureMap/SourceLog'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'SourceLog'</span>\r\n<span style=\"color: #cc00cc\">/// <b>status</b> = </span><span style=\"color: blue\">'active'</span>\r\n<span style=\"color: #cc00cc\">/// <b>description</b> = </span><span style=\"color: blue\">'Example demonstrating the log statement for writing to the application log'</span>\r\n\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/6.0.0-ballot5/patient.html\" title=\"Patient\">http://hl7.org/fhir/StructureDefinition/Patient</a><span style=\"color: navy\">&quot; </span><b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/6.0.0-ballot5/patient.html\" title=\"Patient\">http://hl7.org/fhir/StructureDefinition/Patient</a><span style=\"color: navy\">&quot; </span><b>as </b><b>target</b>\r\n\r\n<b>group </b>SourceLog<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>Patient, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>Patient<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  src.id<b> as </b><span style=\"color: maroon\">v</span><b> log </b><span style=\"color: navy\">(</span>'Processing patient id: ' &amp; v<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.id = <span style=\"color: maroon\">v</span> <i>&quot;r1&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
  },
  "url" : "http://hl7.org/fhir/uv/mapping-language/StructureMap/SourceLog",
  "name" : "SourceLog",
  "status" : "active",
  "description" : "Example demonstrating the log statement for writing to the application log",
  "structure" : [
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/Patient",
      "mode" : "source"
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/Patient",
      "mode" : "target"
    }
  ],
  "group" : [
    {
      "name" : "SourceLog",
      "input" : [
        {
          "mode" : "source",
          "name" : "src",
          "type" : "Patient"
        },
        {
          "mode" : "target",
          "name" : "tgt",
          "type" : "Patient"
        }
      ],
      "rule" : [
        {
          "source" : [
            {
              "context" : "src",
              "element" : [
                "id"
              ],
              "variable" : "v",
              "logMessage" : "'Processing patient id: ' & v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : [
                "id"
              ],
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "v"
                }
              ]
            }
          ],
          "name" : "r1"
        }
      ]
    }
  ],
  "id" : "SourceLog",
  "language" : "en"
}