Server Home  |  XIG Home  |  XIG Stats  | 

FHIRsmith Logo FHIR IG analytics

Packagehl7.fhir.uv.mapping-language
Resource TypeStructureMap
IdStructureMap-TargetListModes.json
FHIR VersionR6
Sourcehttps://build.fhir.org/ig/HL7/mapping-language-ig/StructureMap-TargetListModes.html
URLhttp://hl7.org/fhir/uv/mapping-language/StructureMap/TargetListModes
Version0.1.0
Statusactive
Date2026-10-15T22:52:06+00:00
NameTargetListModes
Realmuv
Authorityhl7
DescriptionExample demonstrating target list mode: share

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 TargetListModes

/// url = 'http://hl7.org/fhir/uv/mapping-language/StructureMap/TargetListModes'
/// version = '0.1.0'
/// name = 'TargetListModes'
/// status = 'active'
/// description = 'Example demonstrating target list mode: share'

uses "http://hl7.org/fhir/StructureDefinition/Patient" as source
uses "http://hl7.org/fhir/StructureDefinition/Patient" as target

group TargetListModes(source src : Patient, target tgt : Patient) {
  src.id as v -> tgt.id = v "r0";
  // Create or reuse the HumanName shared under the label "firstName".
  src.name as v -> tgt.name as tn share firstName then {
    v.family as f -> tn.family = f "r1";
  } "r2";
  // share a single target element across multiple rule applications
  src.identifier as v -> tgt.name as tn share firstName then {
    v.value as val -> tn.text = val "r3";
  } "r4";
}


Source1

{
  "resourceType": "StructureMap",
  "resourceDefinition": "http://hl7.org/fhir/StructureDefinition/StructureMap|0.1.0",
  "id": "TargetListModes",
  "text": {
    "status": "generated",
    "div": "<!-- snip (see above) -->"
  },
  "url": "http://hl7.org/fhir/uv/mapping-language/StructureMap/TargetListModes",
  "identifier": [
    {
      "system": "urn:ietf:rfc:3986",
      "value": "urn:oid:2.16.840.1.113883.4.642.40.89.43.36"
    }
  ],
  "version": "0.1.0",
  "name": "TargetListModes",
  "status": "active",
  "date": "2026-10-15T22:52:06+00:00",
  "publisher": "HL7 International / FHIR Infrastructure",
  "contact": [
    {
      "name": "HL7 International / FHIR Infrastructure",
      "telecom": [
        {
          "system": "url",
          "value": "http://www.hl7.org/Special/committees/fiwg"
        }
      ]
    },
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://www.hl7.org/Special/committees/fiwg"
        }
      ]
    }
  ],
  "description": "Example demonstrating target list mode: share",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code": "001",
          "display": "World"
        }
      ]
    }
  ],
  "structure": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/Patient",
      "mode": "source"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/Patient",
      "mode": "target"
    }
  ],
  "group": [
    {
      "name": "TargetListModes",
      "input": [
        {
          "name": "src",
          "type": "Patient",
          "mode": "source"
        },
        {
          "name": "tgt",
          "type": "Patient",
          "mode": "target"
        }
      ],
      "rule": [
        {
          "name": "r0",
          "source": [
            {
              "context": "src",
              "element": [
                "id"
              ],
              "variable": "v"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": [
                "id"
              ],
              "transform": "copy",
              "parameter": [
                {
                  "valueId": "v"
                }
              ]
            }
          ]
        },
        {
          "name": "r2",
          "source": [
            {
              "context": "src",
              "element": [
                "name"
              ],
              "variable": "v"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": [
                "name"
              ],
              "variable": "tn",
              "listMode": [
                "share"
              ],
              "listRuleId": "firstName"
            }
          ],
          "rule": [
            {
              "name": "r1",
              "source": [
                {
                  "context": "v",
                  "element": [
                    "family"
                  ],
                  "variable": "f"
                }
              ],
              "target": [
                {
                  "context": "tn",
                  "element": [
                    "family"
                  ],
                  "transform": "copy",
                  "parameter": [
                    {
                      "valueId": "f"
                    }
                  ]
                }
              ]
            }
          ],
          "documentation": "Create or reuse the HumanName shared under the label \"firstName\"."
        },
        {
          "name": "r4",
          "source": [
            {
              "context": "src",
              "element": [
                "identifier"
              ],
              "variable": "v"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": [
                "name"
              ],
              "variable": "tn",
              "listMode": [
                "share"
              ],
              "listRuleId": "firstName"
            }
          ],
          "rule": [
            {
              "name": "r3",
              "source": [
                {
                  "context": "v",
                  "element": [
                    "value"
                  ],
                  "variable": "val"
                }
              ],
              "target": [
                {
                  "context": "tn",
                  "element": [
                    "text"
                  ],
                  "transform": "copy",
                  "parameter": [
                    {
                      "valueId": "val"
                    }
                  ]
                }
              ]
            }
          ],
          "documentation": "share a single target element across multiple rule applications"
        }
      ]
    }
  ]
}