Starter FHIR Implementation Guide
1.0.1 - draft International flag

Starter FHIR Implementation Guide, published by Jembi Health Systems. This guide is not an authorized publication; it is the continuous build for version 1.0.1 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/jembi/Starter-FHIR-IG/ and changes regularly. See the Directory of published versions

: Map Breastfeeding Observation to Proprietary Structure - JSON Representation

Draft as of 2024-11-17

Raw json | Download

{
  "resourceType" : "StructureMap",
  "id" : "ObservationToProprietaryBreastfeedingStatus",
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureMap ObservationToProprietaryBreastfeedingStatus</b></p><a name=\"ObservationToProprietaryBreastfeedingStatus\"> </a><a name=\"hcObservationToProprietaryBreastfeedingStatus\"> </a><a name=\"ObservationToProprietaryBreastfeedingStatus-en-US\"> </a><pre class=\"fml\">\r\n<b>map</b><span style=\"color: navy\"> &quot;</span>http://jembi.org/fhir/StructureMap/ObservationToProprietaryBreastfeedingStatus<span style=\"color: navy\">&quot; = &quot;</span>ObservationToProprietaryBreastfeedingStatus<span style=\"color: navy\">&quot;\r\n\r\n</span><b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureDefinition-breastfeeding-status-observation.html\" title=\"Observation - Breastfeeding Status\">http://jembi.org/fhir/StructureDefinition/breastfeeding-status-observation</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=\"StructureDefinition-BreastfeedingStatusProprietaryLogicalModel.html\" title=\"Breastfeeding Status Proprietary Logical Model\">http://jembi.org/fhir/StructureDefinition/BreastfeedingStatusProprietaryLogicalModel</a><span style=\"color: navy\">&quot; </span><b>as </b><b>target</b>\r\n\r\n<b>group </b>ObservationToProprietaryBreastfeedingStatus<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>Observation, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>BreastfeedingStatusProprietaryLogicalModel<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  src.status<b> as </b><span style=\"color: maroon\">status</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.observationStatus = <span style=\"color: maroon\">status</span> <i>&quot;SetObservationStatus&quot;</i><span style=\"color: navy\">;</span>\r\n  src.code<b> as </b><span style=\"color: maroon\">codeableConcept</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    codeableConcept.coding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      coding.code<b> as </b><span style=\"color: maroon\">code</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.code = <span style=\"color: maroon\">code</span> <i>&quot;SetObservationCode&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  src.effective<b> as </b><span style=\"color: maroon\">authored</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.date = <span style=\"color: maroon\">authored</span> <i>&quot;SetObservationEffectiveDateTime&quot;</i><span style=\"color: navy\">;</span>\r\n  src.subject<b> as </b><span style=\"color: maroon\">subject</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    subject.extension<b> as </b><span style=\"color: maroon\">extension</span><b> where </b>(url = 'http://jembi.org/fhir/StructureDefinition/source-system-resource-reference')<b> then</b><span style=\"color: navy\"> {\r\n</span>      extension.value<span style=\"color: navy\"> : </span>string<b> as </b><span style=\"color: maroon\">val</span><b> then</b><span style=\"color: navy\"> {\r\n</span>        val<span style=\"color: navy\"><b> -&gt; </b></span>tgt.patient = <span style=\"color: maroon\">val</span> <i>&quot;SetObservationSubjectReference&quot;</i><span style=\"color: navy\">;</span>\r\n      <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  src.performer<b> as </b><span style=\"color: maroon\">performer</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    performer.extension<b> as </b><span style=\"color: maroon\">extension</span><b> where </b>(url = 'http://jembi.org/fhir/StructureDefinition/source-system-resource-reference')<b> then</b><span style=\"color: navy\"> {\r\n</span>      extension.value<span style=\"color: navy\"> : </span>string<b> as </b><span style=\"color: maroon\">val</span><b> then</b><span style=\"color: navy\"> {\r\n</span>        val<span style=\"color: navy\"><b> -&gt; </b></span>tgt.performer = <span style=\"color: maroon\">val</span> <i>&quot;SetObservationPerformerReference&quot;</i><span style=\"color: navy\">;</span>\r\n      <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  src.encounter<b> as </b><span style=\"color: maroon\">encounter</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    encounter.extension<b> as </b><span style=\"color: maroon\">extension</span><b> where </b>(url = 'http://jembi.org/fhir/StructureDefinition/source-system-resource-reference')<b> then</b><span style=\"color: navy\"> {\r\n</span>      extension.value<span style=\"color: navy\"> : </span>string<b> as </b><span style=\"color: maroon\">val</span><b> then</b><span style=\"color: navy\"> {\r\n</span>        val<span style=\"color: navy\"><b> -&gt; </b></span>tgt.encounter = <span style=\"color: maroon\">val</span> <i>&quot;SetObservationEncounterReference&quot;</i><span style=\"color: navy\">;</span>\r\n      <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  src.value<span style=\"color: navy\"> : </span>CodeableConcept<b> as </b><span style=\"color: maroon\">codeableConcept</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    codeableConcept.coding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      coding.code<b> as </b><span style=\"color: maroon\">code</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.breastFeedingStatus = <span style=\"color: maroon\">code</span> <i>&quot;SetObservationValueCodingCode&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
  },
  "url" : "http://jembi.org/fhir/StructureMap/ObservationToProprietaryBreastfeedingStatus",
  "version" : "1.0.1",
  "name" : "ObservationToProprietaryBreastfeedingStatus",
  "status" : "draft",
  "date" : "2024-11-17T13:26:33+00:00",
  "publisher" : "Jembi Health Systems",
  "contact" : [
    {
      "name" : "Jembi Health Systems",
      "telecom" : [
        {
          "system" : "url",
          "value" : "https://www.jembi.org/"
        },
        {
          "system" : "email",
          "value" : "info@jembi.org"
        }
      ]
    },
    {
      "name" : "Richard Langford",
      "telecom" : [
        {
          "system" : "email",
          "value" : "richard.langford@jembi.org",
          "use" : "work"
        }
      ]
    }
  ],
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code" : "001",
          "display" : "World"
        }
      ]
    }
  ],
  "structure" : [
    {
      "url" : "http://jembi.org/fhir/StructureDefinition/breastfeeding-status-observation",
      "mode" : "source"
    },
    {
      "url" : "http://jembi.org/fhir/StructureDefinition/BreastfeedingStatusProprietaryLogicalModel",
      "mode" : "target"
    }
  ],
  "group" : [
    {
      "name" : "ObservationToProprietaryBreastfeedingStatus",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "src",
          "type" : "Observation",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "BreastfeedingStatusProprietaryLogicalModel",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "SetObservationStatus",
          "source" : [
            {
              "context" : "src",
              "element" : "status",
              "variable" : "status"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "observationStatus",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "status"
                }
              ]
            }
          ]
        },
        {
          "name" : "code",
          "source" : [
            {
              "context" : "src",
              "element" : "code",
              "variable" : "codeableConcept"
            }
          ],
          "rule" : [
            {
              "name" : "coding",
              "source" : [
                {
                  "context" : "codeableConcept",
                  "element" : "coding",
                  "variable" : "coding"
                }
              ],
              "rule" : [
                {
                  "name" : "SetObservationCode",
                  "source" : [
                    {
                      "context" : "coding",
                      "element" : "code",
                      "variable" : "code"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt",
                      "contextType" : "variable",
                      "element" : "code",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueId" : "code"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "SetObservationEffectiveDateTime",
          "source" : [
            {
              "context" : "src",
              "element" : "effective",
              "variable" : "authored"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "date",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "authored"
                }
              ]
            }
          ]
        },
        {
          "name" : "subject",
          "source" : [
            {
              "context" : "src",
              "element" : "subject",
              "variable" : "subject"
            }
          ],
          "rule" : [
            {
              "name" : "extension",
              "source" : [
                {
                  "context" : "subject",
                  "element" : "extension",
                  "variable" : "extension",
                  "condition" : "(url = 'http://jembi.org/fhir/StructureDefinition/source-system-resource-reference')"
                }
              ],
              "rule" : [
                {
                  "name" : "valueString",
                  "source" : [
                    {
                      "context" : "extension",
                      "type" : "string",
                      "element" : "value",
                      "variable" : "val"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "SetObservationSubjectReference",
                      "source" : [
                        {
                          "context" : "val"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgt",
                          "contextType" : "variable",
                          "element" : "patient",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "val"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "performer",
          "source" : [
            {
              "context" : "src",
              "element" : "performer",
              "variable" : "performer"
            }
          ],
          "rule" : [
            {
              "name" : "extension",
              "source" : [
                {
                  "context" : "performer",
                  "element" : "extension",
                  "variable" : "extension",
                  "condition" : "(url = 'http://jembi.org/fhir/StructureDefinition/source-system-resource-reference')"
                }
              ],
              "rule" : [
                {
                  "name" : "valueString",
                  "source" : [
                    {
                      "context" : "extension",
                      "type" : "string",
                      "element" : "value",
                      "variable" : "val"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "SetObservationPerformerReference",
                      "source" : [
                        {
                          "context" : "val"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgt",
                          "contextType" : "variable",
                          "element" : "performer",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "val"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "encounter",
          "source" : [
            {
              "context" : "src",
              "element" : "encounter",
              "variable" : "encounter"
            }
          ],
          "rule" : [
            {
              "name" : "extension",
              "source" : [
                {
                  "context" : "encounter",
                  "element" : "extension",
                  "variable" : "extension",
                  "condition" : "(url = 'http://jembi.org/fhir/StructureDefinition/source-system-resource-reference')"
                }
              ],
              "rule" : [
                {
                  "name" : "valueString",
                  "source" : [
                    {
                      "context" : "extension",
                      "type" : "string",
                      "element" : "value",
                      "variable" : "val"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "SetObservationEncounterReference",
                      "source" : [
                        {
                          "context" : "val"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgt",
                          "contextType" : "variable",
                          "element" : "encounter",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "val"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "valueCodeableConcept",
          "source" : [
            {
              "context" : "src",
              "type" : "CodeableConcept",
              "element" : "value",
              "variable" : "codeableConcept"
            }
          ],
          "rule" : [
            {
              "name" : "coding",
              "source" : [
                {
                  "context" : "codeableConcept",
                  "element" : "coding",
                  "variable" : "coding"
                }
              ],
              "rule" : [
                {
                  "name" : "SetObservationValueCodingCode",
                  "source" : [
                    {
                      "context" : "coding",
                      "element" : "code",
                      "variable" : "code"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt",
                      "contextType" : "variable",
                      "element" : "breastFeedingStatus",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueId" : "code"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}