FHIR Cross-Version Mapping Pack
0.1.0 - Ballot for Release 5.1.0 International flag

FHIR Cross-Version Mapping Pack, 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/fhir-cross-version/ and changes regularly. See the Directory of published versions

StructureMap: HumanName Transforms: R3 to R2

Official URL: http://hl7.org/fhir/StructureMap/HumanName3to2 Version: 0.1.0
Standards status: Draft Maturity Level: 1 Computable Name: HumanName3to2

HumanNameTransformsR3toR2

/// url = 'http://hl7.org/fhir/StructureMap/HumanName3to2'
/// name = 'HumanName3to2'
/// title = 'HumanName Transforms: R3 to R2'
/// status = 'active'

uses "http://hl7.org/fhir/3.0/HumanName" alias HumanName as source
uses "http://hl7.org/fhir/1.0/HumanName" alias HumanNameR2 as target

imports "http://hl7.org/fhir/StructureMap/*3to2"

group HumanName(source src : HumanName, target tgt : HumanNameR2) <<type+>> {
  src.id -> tgt.id "HumanName-id";
  src.extension where url != 'http://hl7.org/fhir/StructureDefinition/HumanName-familyRepeat' -> tgt.extension "HumanName-extensions";
  src.use -> tgt.use "HumanName-use";
  src.text -> tgt.text "HumanName-text";
  src.family first -> tgt.family "HumanName-family";
  src.extension as ex where url = 'http://hl7.org/fhir/StructureDefinition/HumanName-familyRepeat' -> tgt.family as f then nameRepeat(ex, f) "HumanName-family-rpt-ex";
  src.given -> tgt.given "HumanName-given";
  src.prefix -> tgt.prefix "HumanName-prefix";
  src.suffix -> tgt.suffix "HumanName-suffix";
  src.period -> tgt.period "HumanName-period";
}

group nameRepeat(source src, target tgt) {
  src.value as v then string(v, tgt) "HumanName-family-rpt-2";
}