FHIR Extensions Pack
5.1.0-ballot1 - Ballot for Release 5.1.0 International flag

This page is part of the FHIR Core Extensions Registry (v5.1.0-ballot: Releases Ballot 4) based on FHIR (HL7® FHIR® Standard) v5.0.0. The current version which supersedes this version is 1.0.0. For a full list of available versions, see the Directory of published versions

StructureMap: FML Conversion for ElementDefinition: R4 to R5

Official URL: http://hl7.org/fhir/StructureMap/ElementDefinition4to5 Version: 5.1.0-ballot1
Standards status: Trial-use Maturity Level: 1 Computable Name: ElementDefinition4to5

FMLConversionforElementDefinitionR4toR5

/// url = 'http://hl7.org/fhir/StructureMap/ElementDefinition4to5'
/// name = 'ElementDefinition4to5'
/// title = 'FML Conversion for ElementDefinition: R4 to R5'
/// status = 'active'

conceptmap "AggregationMode" {
  prefix s = "http://hl7.org/fhir/4.0/resource-aggregation-mode"
  prefix t = "http://hl7.org/fhir/resource-aggregation-mode"

  s:contained - t:contained
  s:referenced - t:referenced
  s:bundled - t:bundled
}

conceptmap "BindingStrength" {
  prefix s = "http://hl7.org/fhir/4.0/binding-strength"
  prefix t = "http://hl7.org/fhir/binding-strength"

  s:required - t:required
  s:extensible - t:extensible
  s:preferred - t:preferred
  s:example - t:example
}

conceptmap "ConstraintSeverity" {
  prefix s = "http://hl7.org/fhir/4.0/constraint-severity"
  prefix t = "http://hl7.org/fhir/constraint-severity"

  s:error - t:error
  s:warning - t:warning
}

conceptmap "DiscriminatorType" {
  prefix s = "http://hl7.org/fhir/4.0/discriminator-type"
  prefix t = "http://hl7.org/fhir/discriminator-type"

  s:value - t:value
  s:exists - t:exists
  s:pattern - t:pattern
  s:type - t:type
  s:profile - t:profile
}

conceptmap "PropertyRepresentation" {
  prefix s = "http://hl7.org/fhir/4.0/property-representation"
  prefix t = "http://hl7.org/fhir/property-representation"

  s:xmlAttr - t:xmlAttr
  s:xmlText - t:xmlText
  s:typeAttr - t:typeAttr
  s:cdaText - t:cdaText
  s:xhtml - t:xhtml
}

conceptmap "ReferenceVersionRules" {
  prefix s = "http://hl7.org/fhir/4.0/reference-version-rules"
  prefix t = "http://hl7.org/fhir/reference-version-rules"

  s:either - t:either
  s:independent - t:independent
  s:specific - t:specific
}

conceptmap "SlicingRules" {
  prefix s = "http://hl7.org/fhir/4.0/resource-slicing-rules"
  prefix t = "http://hl7.org/fhir/resource-slicing-rules"

  s:closed - t:closed
  s:open - t:open
  s:openAtEnd - t:openAtEnd
}

uses "http://hl7.org/fhir/4.0/StructureDefinition/ElementDefinition" alias ElementDefinitionR4 as source
uses "http://hl7.org/fhir/StructureDefinition/ElementDefinition" alias ElementDefinitionR5 as target

imports "http://hl7.org/fhir/StructureMap/*4to5"

group ElementDefinition(source src : ElementDefinitionR4, target tgt : ElementDefinitionR5) extends Element <<type+>> {
  src.modifierExtension -> tgt.modifierExtension;
  src.path -> tgt.path;
  src.representation as v -> tgt.representation = translate(v, '#PropertyRepresentation', 'code');
  src.sliceName -> tgt.sliceName;
  src.sliceIsConstraining -> tgt.sliceIsConstraining;
  src.label -> tgt.label;
  src.code -> tgt.code;
  src.slicing as s -> tgt.slicing as t then ElementDefinitionSlicing(s, t);
  src.short -> tgt.short;
  src.definition -> tgt.definition;
  src.comment -> tgt.comment;
  src.requirements -> tgt.requirements;
  src.alias -> tgt.alias;
  src.min -> tgt.min;
  src.max -> tgt.max;
  src.base as s -> tgt.base as t then ElementDefinitionBase(s, t);
  src.contentReference -> tgt.contentReference;
  src.type as s -> tgt.type as t then ElementDefinitionType(s, t);
  src.defaultValue : base64Binary -> tgt.defaultValue;
  src.defaultValue : boolean -> tgt.defaultValue;
  src.defaultValue : canonical -> tgt.defaultValue;
  src.defaultValue : code -> tgt.defaultValue;
  src.defaultValue : date -> tgt.defaultValue;
  src.defaultValue : dateTime -> tgt.defaultValue;
  src.defaultValue : decimal -> tgt.defaultValue;
  src.defaultValue : id -> tgt.defaultValue;
  src.defaultValue : instant -> tgt.defaultValue;
  src.defaultValue : integer -> tgt.defaultValue;
  src.defaultValue : markdown -> tgt.defaultValue; // src.defaultValue : integer64 -> tgt.defaultValue;
  src.defaultValue : oid -> tgt.defaultValue;
  src.defaultValue : positiveInt -> tgt.defaultValue;
  src.defaultValue : string -> tgt.defaultValue;
  src.defaultValue : time -> tgt.defaultValue;
  src.defaultValue : unsignedInt -> tgt.defaultValue;
  src.defaultValue : uri -> tgt.defaultValue;
  src.defaultValue : url -> tgt.defaultValue;
  src.defaultValue : uuid -> tgt.defaultValue;
  src.defaultValue : Address -> tgt.defaultValue;
  src.defaultValue : Age -> tgt.defaultValue;
  src.defaultValue : Annotation -> tgt.defaultValue;
  src.defaultValue : Attachment -> tgt.defaultValue;
  src.defaultValue : CodeableConcept -> tgt.defaultValue;
  src.defaultValue : Coding -> tgt.defaultValue; // src.defaultValue : CodeableReference -> tgt.defaultValue;
  src.defaultValue : ContactPoint -> tgt.defaultValue;
  src.defaultValue : Count -> tgt.defaultValue;
  src.defaultValue : Distance -> tgt.defaultValue;
  src.defaultValue : Duration -> tgt.defaultValue;
  src.defaultValue : HumanName -> tgt.defaultValue;
  src.defaultValue : Identifier -> tgt.defaultValue;
  src.defaultValue : Money -> tgt.defaultValue;
  src.defaultValue : Period -> tgt.defaultValue;
  src.defaultValue : Quantity -> tgt.defaultValue;
  src.defaultValue : Range -> tgt.defaultValue;
  src.defaultValue : Ratio -> tgt.defaultValue;
  src.defaultValue : Reference -> tgt.defaultValue; // src.defaultValue : RatioRange -> tgt.defaultValue;
  src.defaultValue : SampledData -> tgt.defaultValue;
  src.defaultValue : Signature -> tgt.defaultValue;
  src.defaultValue : Timing -> tgt.defaultValue;
  src.defaultValue : ContactDetail -> tgt.defaultValue;
  src.defaultValue : DataRequirement -> tgt.defaultValue;
  src.defaultValue : Expression -> tgt.defaultValue;
  src.defaultValue : ParameterDefinition -> tgt.defaultValue;
  src.defaultValue : RelatedArtifact -> tgt.defaultValue;
  src.defaultValue : TriggerDefinition -> tgt.defaultValue;
  src.defaultValue : UsageContext -> tgt.defaultValue;
  src.defaultValue : Dosage -> tgt.defaultValue; // src.defaultValue : Availability -> tgt.defaultValue;
  src.defaultValue : Meta -> tgt.defaultValue;
  src.meaningWhenMissing -> tgt.meaningWhenMissing;
  src.orderMeaning -> tgt.orderMeaning;
  src.fixed : base64Binary -> tgt.fixed;
  src.fixed : boolean -> tgt.fixed;
  src.fixed : canonical -> tgt.fixed;
  src.fixed : code -> tgt.fixed;
  src.fixed : date -> tgt.fixed;
  src.fixed : dateTime -> tgt.fixed;
  src.fixed : decimal -> tgt.fixed;
  src.fixed : id -> tgt.fixed;
  src.fixed : instant -> tgt.fixed;
  src.fixed : integer -> tgt.fixed;
  src.fixed : markdown -> tgt.fixed; // src.fixed : integer64 -> tgt.fixed;
  src.fixed : oid -> tgt.fixed;
  src.fixed : positiveInt -> tgt.fixed;
  src.fixed : string -> tgt.fixed;
  src.fixed : time -> tgt.fixed;
  src.fixed : unsignedInt -> tgt.fixed;
  src.fixed : uri -> tgt.fixed;
  src.fixed : url -> tgt.fixed;
  src.fixed : uuid -> tgt.fixed;
  src.fixed : Address -> tgt.fixed;
  src.fixed : Age -> tgt.fixed;
  src.fixed : Annotation -> tgt.fixed;
  src.fixed : Attachment -> tgt.fixed;
  src.fixed : CodeableConcept -> tgt.fixed;
  src.fixed : Coding -> tgt.fixed; // src.fixed : CodeableReference -> tgt.fixed;
  src.fixed : ContactPoint -> tgt.fixed;
  src.fixed : Count -> tgt.fixed;
  src.fixed : Distance -> tgt.fixed;
  src.fixed : Duration -> tgt.fixed;
  src.fixed : HumanName -> tgt.fixed;
  src.fixed : Identifier -> tgt.fixed;
  src.fixed : Money -> tgt.fixed;
  src.fixed : Period -> tgt.fixed;
  src.fixed : Quantity -> tgt.fixed;
  src.fixed : Range -> tgt.fixed;
  src.fixed : Ratio -> tgt.fixed;
  src.fixed : Reference -> tgt.fixed; // src.fixed : RatioRange -> tgt.fixed;
  src.fixed : SampledData -> tgt.fixed;
  src.fixed : Signature -> tgt.fixed;
  src.fixed : Timing -> tgt.fixed;
  src.fixed : ContactDetail -> tgt.fixed;
  src.fixed : DataRequirement -> tgt.fixed;
  src.fixed : Expression -> tgt.fixed;
  src.fixed : ParameterDefinition -> tgt.fixed;
  src.fixed : RelatedArtifact -> tgt.fixed;
  src.fixed : TriggerDefinition -> tgt.fixed;
  src.fixed : UsageContext -> tgt.fixed;
  src.fixed : Dosage -> tgt.fixed; // src.fixed : Availability -> tgt.fixed;
  src.fixed : Meta -> tgt.fixed;
  src.pattern : base64Binary -> tgt.pattern;
  src.pattern : boolean -> tgt.pattern;
  src.pattern : canonical -> tgt.pattern;
  src.pattern : code -> tgt.pattern;
  src.pattern : date -> tgt.pattern;
  src.pattern : dateTime -> tgt.pattern;
  src.pattern : decimal -> tgt.pattern;
  src.pattern : id -> tgt.pattern;
  src.pattern : instant -> tgt.pattern;
  src.pattern : integer -> tgt.pattern;
  src.pattern : markdown -> tgt.pattern; // src.pattern : integer64 -> tgt.pattern;
  src.pattern : oid -> tgt.pattern;
  src.pattern : positiveInt -> tgt.pattern;
  src.pattern : string -> tgt.pattern;
  src.pattern : time -> tgt.pattern;
  src.pattern : unsignedInt -> tgt.pattern;
  src.pattern : uri -> tgt.pattern;
  src.pattern : url -> tgt.pattern;
  src.pattern : uuid -> tgt.pattern;
  src.pattern : Address -> tgt.pattern;
  src.pattern : Age -> tgt.pattern;
  src.pattern : Annotation -> tgt.pattern;
  src.pattern : Attachment -> tgt.pattern;
  src.pattern : CodeableConcept -> tgt.pattern;
  src.pattern : Coding -> tgt.pattern; // src.pattern : CodeableReference -> tgt.pattern;
  src.pattern : ContactPoint -> tgt.pattern;
  src.pattern : Count -> tgt.pattern;
  src.pattern : Distance -> tgt.pattern;
  src.pattern : Duration -> tgt.pattern;
  src.pattern : HumanName -> tgt.pattern;
  src.pattern : Identifier -> tgt.pattern;
  src.pattern : Money -> tgt.pattern;
  src.pattern : Period -> tgt.pattern;
  src.pattern : Quantity -> tgt.pattern;
  src.pattern : Range -> tgt.pattern;
  src.pattern : Ratio -> tgt.pattern;
  src.pattern : Reference -> tgt.pattern; // src.pattern : RatioRange -> tgt.pattern;
  src.pattern : SampledData -> tgt.pattern;
  src.pattern : Signature -> tgt.pattern;
  src.pattern : Timing -> tgt.pattern;
  src.pattern : ContactDetail -> tgt.pattern;
  src.pattern : DataRequirement -> tgt.pattern;
  src.pattern : Expression -> tgt.pattern;
  src.pattern : ParameterDefinition -> tgt.pattern;
  src.pattern : RelatedArtifact -> tgt.pattern;
  src.pattern : TriggerDefinition -> tgt.pattern;
  src.pattern : UsageContext -> tgt.pattern;
  src.pattern : Dosage -> tgt.pattern; // src.pattern : Availability -> tgt.pattern;
  src.pattern : Meta -> tgt.pattern;
  src.example as s -> tgt.example as t then ElementDefinitionExample(s, t);
  src.minValue : date -> tgt.minValue;
  src.minValue : dateTime -> tgt.minValue;
  src.minValue : instant -> tgt.minValue;
  src.minValue : time -> tgt.minValue;
  src.minValue : decimal -> tgt.minValue;
  src.minValue : integer -> tgt.minValue;
  src.minValue : positiveInt -> tgt.minValue; // src.minValue : integer64 -> tgt.minValue;
  src.minValue : unsignedInt -> tgt.minValue;
  src.minValue : Quantity -> tgt.minValue;
  src.maxValue : date -> tgt.maxValue;
  src.maxValue : dateTime -> tgt.maxValue;
  src.maxValue : instant -> tgt.maxValue;
  src.maxValue : time -> tgt.maxValue;
  src.maxValue : decimal -> tgt.maxValue;
  src.maxValue : integer -> tgt.maxValue;
  src.maxValue : positiveInt -> tgt.maxValue; // src.maxValue : integer64 -> tgt.maxValue;
  src.maxValue : unsignedInt -> tgt.maxValue;
  src.maxValue : Quantity -> tgt.maxValue;
  src.maxLength -> tgt.maxLength;
  src.condition -> tgt.condition;
  src.constraint as s -> tgt.constraint as t then ElementDefinitionConstraint(s, t);
  src.mustSupport -> tgt.mustSupport; // src.mustHaveValue -> tgt.mustHaveValue;
  src.isModifier -> tgt.isModifier;
  src.isModifierReason -> tgt.isModifierReason;
  src.isSummary -> tgt.isSummary;
  src.binding as s -> tgt.binding as t then ElementDefinitionBinding(s, t);
  src.mapping as s -> tgt.mapping as t then ElementDefinitionMapping(s, t);
}

group ElementDefinitionSlicing(source src, target tgt) extends Element {
  src.discriminator as s -> tgt.discriminator as t then ElementDefinitionSlicingDiscriminator(s, t);
  src.description -> tgt.description;
  src.ordered -> tgt.ordered;
  src.rules as v -> tgt.rules = translate(v, '#SlicingRules', 'code');
}

group ElementDefinitionSlicingDiscriminator(source src, target tgt) extends Element {
  src.type as v -> tgt.type = translate(v, '#DiscriminatorType', 'code');
  src.path -> tgt.path;
}

group ElementDefinitionBase(source src, target tgt) extends Element {
  src.path -> tgt.path;
  src.min -> tgt.min;
  src.max -> tgt.max;
}

group ElementDefinitionType(source src, target tgt) extends Element {
  src.code -> tgt.code;
  src.profile -> tgt.profile;
  src.targetProfile -> tgt.targetProfile;
  src.aggregation as v -> tgt.aggregation = translate(v, '#AggregationMode', 'code');
  src.versioning as v -> tgt.versioning = translate(v, '#ReferenceVersionRules', 'code');
}

group ElementDefinitionExample(source src, target tgt) extends Element {
  src.label -> tgt.label;
  src.value : base64Binary -> tgt.value;
  src.value : boolean -> tgt.value;
  src.value : canonical -> tgt.value;
  src.value : code -> tgt.value;
  src.value : date -> tgt.value;
  src.value : dateTime -> tgt.value;
  src.value : decimal -> tgt.value;
  src.value : id -> tgt.value;
  src.value : instant -> tgt.value;
  src.value : integer -> tgt.value;
  src.value : markdown -> tgt.value; // src.value : integer64 -> tgt.value;
  src.value : oid -> tgt.value;
  src.value : positiveInt -> tgt.value;
  src.value : string -> tgt.value;
  src.value : time -> tgt.value;
  src.value : unsignedInt -> tgt.value;
  src.value : uri -> tgt.value;
  src.value : url -> tgt.value;
  src.value : uuid -> tgt.value;
  src.value : Address -> tgt.value;
  src.value : Age -> tgt.value;
  src.value : Annotation -> tgt.value;
  src.value : Attachment -> tgt.value;
  src.value : CodeableConcept -> tgt.value;
  src.value : Coding -> tgt.value; // src.value : CodeableReference -> tgt.value;
  src.value : ContactPoint -> tgt.value;
  src.value : Count -> tgt.value;
  src.value : Distance -> tgt.value;
  src.value : Duration -> tgt.value;
  src.value : HumanName -> tgt.value;
  src.value : Identifier -> tgt.value;
  src.value : Money -> tgt.value;
  src.value : Period -> tgt.value;
  src.value : Quantity -> tgt.value;
  src.value : Range -> tgt.value;
  src.value : Ratio -> tgt.value;
  src.value : Reference -> tgt.value; // src.value : RatioRange -> tgt.value;
  src.value : SampledData -> tgt.value;
  src.value : Signature -> tgt.value;
  src.value : Timing -> tgt.value;
  src.value : ContactDetail -> tgt.value;
  src.value : DataRequirement -> tgt.value;
  src.value : Expression -> tgt.value;
  src.value : ParameterDefinition -> tgt.value;
  src.value : RelatedArtifact -> tgt.value;
  src.value : TriggerDefinition -> tgt.value;
  src.value : UsageContext -> tgt.value;
  src.value : Dosage -> tgt.value; // src.value : Availability -> tgt.value;
  src.value : Meta -> tgt.value;
}

group ElementDefinitionConstraint(source src, target tgt) extends Element {
  src.key -> tgt.key;
  src.requirements -> tgt.requirements;
  src.severity as v -> tgt.severity = translate(v, '#ConstraintSeverity', 'code');
  src.human -> tgt.human; // src.suppress -> tgt.suppress;
  src.expression -> tgt.expression;
  src.source -> tgt.source;
}

group ElementDefinitionBinding(source src, target tgt) extends Element {
  src.strength as v -> tgt.strength = translate(v, '#BindingStrength', 'code');
  src.description -> tgt.description;
  src.valueSet -> tgt.valueSet;
}

group ElementDefinitionMapping(source src, target tgt) extends Element {
  src.identity -> tgt.identity;
  src.language -> tgt.language;
  src.map -> tgt.map;
  src.comment -> tgt.comment;
}