FHIR © HL7.org  |  FHIRsmith 4.0.1  |  Server Home  |  XIG Home  |  XIG Stats  | 

FHIR IG analytics

Packagehl7.fhir.uv.fml
Resource TypeStructureMap
IdStructureMap-StructNestedToTop.json
FHIR VersionR6
Sourcehttps://build.fhir.org/ig/HL7/mapping-language-ig/StructureMap-StructNestedToTop.html
URLhttp://hl7.org/fhir/uv/fml/StructureMap/StructNestedToTop
Statusactive
NameStructNestedToTop
Realmuv
Authorityhl7
DescriptionExample demonstrating pulling a nested child element up to a top-level property

Resources that use this resource

No resources found


Resources that this resource uses

No resources found


Narrative

Note: links and images are rebased to the (stated) source

Generated Narrative: StructureMap StructNestedToTop

url: http://hl7.org/fhir/uv/fml/StructureMap/StructNestedToTop

name: StructNestedToTop

status: Active

description:

Example demonstrating pulling a nested child element up to a top-level property

structure

url: Patient

mode: Source Structure Definition

structure

url: Patient

mode: Target Structure Definition

group

name: StructNestedToTop

input

mode: Source Instance

name: src

type: Patient

input

mode: Target Instance

name: tgt

type: Patient

rule

Sources

-ContextElementVariable
*srccontactc

rule

Sources

-ContextElementVariable
*cnamecn

rule

Sources

-ContextElementVariable
*cnfamilyf

target

context: tgt

element: id

transform: copy

Parameters

-Value[x]
*f

name: r1

name: r2

documentation: pull nested contact.name.family up into top-level id

name: r3


Source1

{
  "resourceType": "StructureMap",
  "resourceDefinition": "http://hl7.org/fhir/StructureDefinition/StructureMap|0.1.0",
  "text": {
    "status": "generated",
    "div": "<!-- snip (see above) -->"
  },
  "url": "http://hl7.org/fhir/uv/fml/StructureMap/StructNestedToTop",
  "name": "StructNestedToTop",
  "status": "active",
  "description": "Example demonstrating pulling a nested child element up to a top-level property",
  "structure": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/Patient",
      "mode": "source"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/Patient",
      "mode": "target"
    }
  ],
  "group": [
    {
      "name": "StructNestedToTop",
      "input": [
        {
          "mode": "source",
          "name": "src",
          "type": "Patient"
        },
        {
          "mode": "target",
          "name": "tgt",
          "type": "Patient"
        }
      ],
      "rule": [
        {
          "source": [
            {
              "context": "src",
              "element": [
                "contact"
              ],
              "variable": "c"
            }
          ],
          "rule": [
            {
              "source": [
                {
                  "context": "c",
                  "element": [
                    "name"
                  ],
                  "variable": "cn"
                }
              ],
              "rule": [
                {
                  "source": [
                    {
                      "context": "cn",
                      "element": [
                        "family"
                      ],
                      "variable": "f"
                    }
                  ],
                  "target": [
                    {
                      "context": "tgt",
                      "element": [
                        "id"
                      ],
                      "transform": "copy",
                      "parameter": [
                        {
                          "valueId": "f"
                        }
                      ]
                    }
                  ],
                  "name": "r1"
                }
              ],
              "name": "r2"
            }
          ],
          "documentation": "pull nested contact.name.family up into top-level id",
          "name": "r3"
        }
      ]
    }
  ],
  "id": "StructNestedToTop"
}