This page is part of the FHIR Core Extensions Registry (v1.0.0: Releases) based on FHIR v5.0.0. This is the current published version in its permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions
Terminology Infrastructure Work Group | Maturity Level: N/A | Standards Status: Informative | Security Category: N/A | Compartments: N/A |
Following are maps for converting between the equivalent R4B resource and this R5 resource.
/// url = 'http://hl7.org/fhir/StructureMap/ConceptMap5to4' /// name = 'ConceptMap5to4' /// title = 'FML Conversion for ConceptMap: R5 to R4' /// status = 'active' conceptmap "ConceptMapGroupUnmappedMode" { prefix s = "http://hl7.org/fhir/conceptmap-unmapped-mode" prefix t = "http://hl7.org/fhir/4.0/conceptmap-unmapped-mode" s:"use-source-code" - t:provided s:fixed - t:fixed s:"other-map" - t:"other-map" } conceptmap "ConceptMapRelationship" { prefix s = "http://hl7.org/fhir/concept-map-relationship" prefix t = "http://hl7.org/fhir/4.0/concept-map-equivalence" s:"related-to" - t:relatedto s:equivalent - t:equivalent s:"source-is-narrower-than-target" - t:wider s:"source-is-broader-than-target" - t:narrower s:"not-related-to" - t:unmatched } conceptmap "PublicationStatus" { prefix s = "http://hl7.org/fhir/publication-status" prefix t = "http://hl7.org/fhir/4.0/publication-status" s:draft - t:draft s:active - t:active s:retired - t:retired s:unknown - t:unknown } uses "http://hl7.org/fhir/StructureDefinition/ConceptMap" alias ConceptMapR5 as source uses "http://hl7.org/fhir/4.0/StructureDefinition/ConceptMap" alias ConceptMapR4 as target imports "http://hl7.org/fhir/StructureMap/*5to4" group ConceptMap(source src : ConceptMapR5, target tgt : ConceptMapR4) extends DomainResource <<type+>> { src.url -> tgt.url; src.identifier -> tgt.identifier; src.version -> tgt.version; src.name -> tgt.name; // src.versionAlgorithm : string -> tgt.versionAlgorithm; src.title -> tgt.title; src.status as v -> tgt.status = translate(v, '#PublicationStatus', 'code'); src.experimental -> tgt.experimental; src.date -> tgt.date; src.publisher -> tgt.publisher; src.contact -> tgt.contact; src.description -> tgt.description; src.useContext -> tgt.useContext; src.jurisdiction -> tgt.jurisdiction; src.purpose -> tgt.purpose; src.copyright -> tgt.copyright; src.sourceScope : uri -> tgt.source; // src.copyrightLabel -> tgt.copyrightLabel; src.sourceScope : canonical -> tgt.source; src.targetScope : uri -> tgt.target; src.targetScope : canonical -> tgt.target; src.group as s -> tgt.group as t then ConceptMapGroup(s, t, src); } group ConceptMapGroup(source src, target tgt, source srcMap) extends BackboneElement { src.source -> tgt.source; src.target -> tgt.target; src.element as s -> tgt.element as t then ConceptMapGroupElement(s, t, srcMap); src.unmapped as s -> tgt.unmapped as t then ConceptMapGroupUnmapped(s, t); } group ConceptMapGroupElement(source src, target tgt, source srcMap) extends BackboneElement { src.code -> tgt.code; src.display -> tgt.display; src.noMap as s -> tgt.target as t, t.equivalence = 'unmatched'; // src.valueSet -> tgt.valueSet; src.target as s -> tgt.target as t then ConceptMapGroupElementTarget(s, t, srcMap); } group ConceptMapGroupElementTarget(source src, target tgt, source srcMap) extends BackboneElement { src.code -> tgt.code; src.display -> tgt.display; src.relationship as v -> tgt.equivalence = translate(v, '#ConceptMapRelationship', 'code'); // src.valueSet -> tgt.valueSet; src.comment -> tgt.comment; src.dependsOn as s -> tgt.dependsOn as t then ConceptMapGroupElementTargetDependsOn(s, t, srcMap); // src.property as s -> tgt.property as t then ConceptMapGroupElementTargetProperty(s,t); src.product as s -> tgt.product as t then ConceptMapGroupElementTargetDependsOn(s, t, srcMap); } group ConceptMapGroupElementTargetDependsOn(source src, target tgt, source srcMap) extends BackboneElement { src.attribute as s -> tgt.property = (%srcMap.additionalAttribute.where(code = %s).uri); src.value : code -> tgt.value; src.value : Coding as s -> tgt then { s.system -> tgt.system; s.code -> tgt.value; s.display -> tgt.display; }; // todo: look up system from srcMap.additionalAttribute src.value : string -> tgt.value; } group ConceptMapGroupUnmapped(source src, target tgt) extends BackboneElement { src.mode as v -> tgt.mode = translate(v, '#ConceptMapGroupUnmappedMode', 'code'); src.code -> tgt.code; src.display -> tgt.display; src.otherMap -> tgt.url; // src.valueSet -> tgt.valueSet; }
/// url = 'http://hl7.org/fhir/StructureMap/ConceptMap5to4B' /// name = 'ConceptMap5to4B' /// title = 'FML Conversion for ConceptMap: R5 to R4B' /// status = 'active' conceptmap "ConceptMapGroupUnmappedMode" { prefix s = "http://hl7.org/fhir/conceptmap-unmapped-mode" prefix t = "http://hl7.org/fhir/4.3/conceptmap-unmapped-mode" s:"use-source-code" - t:provided s:fixed - t:fixed s:"other-map" - t:"other-map" } conceptmap "ConceptMapRelationship" { prefix s = "http://hl7.org/fhir/concept-map-relationship" prefix t = "http://hl7.org/fhir/4.3/concept-map-equivalence" s:"related-to" - t:relatedto s:equivalent - t:equivalent s:"source-is-narrower-than-target" - t:wider s:"source-is-broader-than-target" - t:narrower s:"not-related-to" - t:unmatched } conceptmap "PublicationStatus" { prefix s = "http://hl7.org/fhir/publication-status" prefix t = "http://hl7.org/fhir/4.3/publication-status" s:draft - t:draft s:active - t:active s:retired - t:retired s:unknown - t:unknown } uses "http://hl7.org/fhir/StructureDefinition/ConceptMap" alias ConceptMapR5 as source uses "http://hl7.org/fhir/4.3/StructureDefinition/ConceptMap" alias ConceptMapR4B as target imports "http://hl7.org/fhir/StructureMap/*5to4B" group ConceptMap(source src : ConceptMapR5, target tgt : ConceptMapR4B) extends DomainResource <<type+>> { src.url -> tgt.url; src.identifier -> tgt.identifier; src.version -> tgt.version; src.name -> tgt.name; // src.versionAlgorithm : string -> tgt.versionAlgorithm; src.title -> tgt.title; src.status as v -> tgt.status = translate(v, '#PublicationStatus', 'code'); src.experimental -> tgt.experimental; src.date -> tgt.date; src.publisher -> tgt.publisher; src.contact -> tgt.contact; src.description -> tgt.description; src.useContext -> tgt.useContext; src.jurisdiction -> tgt.jurisdiction; src.purpose -> tgt.purpose; src.copyright -> tgt.copyright; src.sourceScope : uri -> tgt.source; // src.copyrightLabel -> tgt.copyrightLabel; src.sourceScope : canonical -> tgt.source; src.targetScope : uri -> tgt.target; src.targetScope : canonical -> tgt.target; src.group as s -> tgt.group as t then ConceptMapGroup(s, t, src); } group ConceptMapGroup(source src, target tgt, source srcMap) extends BackboneElement { src.source -> tgt.source; src.target -> tgt.target; src.element as s -> tgt.element as t then ConceptMapGroupElement(s, t, srcMap); src.unmapped as s -> tgt.unmapped as t then ConceptMapGroupUnmapped(s, t); } group ConceptMapGroupElement(source src, target tgt, source srcMap) extends BackboneElement { src.code -> tgt.code; src.display -> tgt.display; src.noMap as s -> tgt.target as t, t.equivalence = 'unmatched'; // src.valueSet -> tgt.valueSet; src.target as s -> tgt.target as t then ConceptMapGroupElementTarget(s, t, srcMap); } group ConceptMapGroupElementTarget(source src, target tgt, source srcMap) extends BackboneElement { src.code -> tgt.code; src.display -> tgt.display; src.relationship as v -> tgt.equivalence = translate(v, '#ConceptMapRelationship', 'code'); // src.valueSet -> tgt.valueSet; src.comment -> tgt.comment; src.dependsOn as s -> tgt.dependsOn as t then ConceptMapGroupElementTargetDependsOn(s, t, srcMap); // src.property as s -> tgt.property as t then ConceptMapGroupElementTargetProperty(s,t); src.product as s -> tgt.product as t then ConceptMapGroupElementTargetDependsOn(s, t, srcMap); } group ConceptMapGroupElementTargetDependsOn(source src, target tgt, source srcMap) extends BackboneElement { src.attribute as s -> tgt.property = (%srcMap.additionalAttribute.where(code = %s).uri); src.value : code -> tgt.value; src.value : Coding as s -> tgt then { s.system -> tgt.system; s.code -> tgt.value; s.display -> tgt.display; }; // todo: look up system from srcMap.additionalAttribute src.value : string -> tgt.value; } group ConceptMapGroupUnmapped(source src, target tgt) extends BackboneElement { src.mode as v -> tgt.mode = translate(v, '#ConceptMapGroupUnmappedMode', 'code'); src.code -> tgt.code; src.display -> tgt.display; src.otherMap -> tgt.url; // src.valueSet -> tgt.valueSet; }
/// url = 'http://hl7.org/fhir/StructureMap/ConceptMap4Bto5' /// name = 'ConceptMap4Bto5' /// title = 'FML Conversion for ConceptMap: R4B to R5' /// status = 'active' conceptmap "ConceptMapGroupUnmappedMode" { prefix s = "http://hl7.org/fhir/4.3/conceptmap-unmapped-mode" prefix t = "http://hl7.org/fhir/conceptmap-unmapped-mode" s:provided - t:"use-source-code" s:fixed - t:fixed s:"other-map" - t:"other-map" } conceptmap "ConceptMapRelationship" { prefix s = "http://hl7.org/fhir/4.3/concept-map-equivalence" prefix t = "http://hl7.org/fhir/concept-map-relationship" s:relatedto - t:"related-to" s:inexact - t:"related-to" s:equivalent - t:equivalent s:equal - t:equivalent s:wider - t:"source-is-narrower-than-target" s:subsumes - t:"source-is-narrower-than-target" s:narrower - t:"source-is-broader-than-target" s:specializes - t:"source-is-broader-than-target" s:unmatched - t:"not-related-to" } conceptmap "PublicationStatus" { prefix s = "http://hl7.org/fhir/4.3/publication-status" prefix t = "http://hl7.org/fhir/publication-status" s:draft - t:draft s:active - t:active s:retired - t:retired s:unknown - t:unknown } uses "http://hl7.org/fhir/4.3/StructureDefinition/ConceptMap" alias ConceptMapR4B as source uses "http://hl7.org/fhir/StructureDefinition/ConceptMap" alias ConceptMapR5 as target imports "http://hl7.org/fhir/StructureMap/*4Bto5" group ConceptMap(source src : ConceptMapR4B, target tgt : ConceptMapR5) extends DomainResource <<type+>> { src.url -> tgt.url; src.identifier -> tgt.identifier; src.version -> tgt.version; src.name -> tgt.name; // src.versionAlgorithm : string -> tgt.versionAlgorithm; src.title -> tgt.title; src.status as v -> tgt.status = translate(v, '#PublicationStatus', 'code'); src.experimental -> tgt.experimental; src.date -> tgt.date; src.publisher -> tgt.publisher; src.contact -> tgt.contact; src.description -> tgt.description; src.useContext -> tgt.useContext; src.jurisdiction -> tgt.jurisdiction; src.purpose -> tgt.purpose; src.copyright -> tgt.copyright; src.source : uri -> tgt.sourceScope; // src.copyrightLabel -> tgt.copyrightLabel; src.source : canonical -> tgt.sourceScope; src.target : uri -> tgt.targetScope; src.target : canonical -> tgt.targetScope; src.group as s -> tgt.group as t then ConceptMapGroup(s, t); } group ConceptMapGroup(source src, target tgt) extends BackboneElement { src.source -> tgt.source; src.target -> tgt.target; src.element as s -> tgt.element as t then ConceptMapGroupElement(s, t); src.unmapped as s -> tgt.unmapped as t then ConceptMapGroupUnmapped(s, t); } group ConceptMapGroupElement(source src, target tgt) extends BackboneElement { src.code -> tgt.code; src.display -> tgt.display; src where src.target.all(equivalence = 'unmatched') as s -> tgt.noMap as t, t.value = 'true' "unmapped"; // src.valueSet -> tgt.valueSet; src.target as s where s != unmatched -> tgt.target as t then ConceptMapGroupElementTarget(s, t); } group ConceptMapGroupElementTarget(source src, target tgt) extends BackboneElement { src.code -> tgt.code; src.display -> tgt.display; src.equivalence as v -> tgt.relationship = translate(v, '#ConceptMapRelationship', 'code'); // src.valueSet -> tgt.valueSet; src.comment -> tgt.comment; src.dependsOn as s -> tgt.dependsOn as t then ConceptMapGroupElementTargetDependsOn(s, t); // src.property as s -> tgt.property as t then ConceptMapGroupElementTargetProperty(s,t); src.product as s -> tgt.product as t then ConceptMapGroupElementTargetDependsOn(s, t); } group ConceptMapGroupElementTargetDependsOn(source src, target tgt) extends BackboneElement { src.property -> tgt.attribute; src.value where src.system.empty() -> tgt.value; // todo: move the URL to ConceptMap.additionalAttribute - needs a new mapping language feature src where src.system.exists() -> tgt.value = create('Coding') as t then { src.system -> t.system; src.value -> t.code; src.display -> t.display; } "attributeValue"; } group ConceptMapGroupUnmapped(source src, target tgt) extends BackboneElement { src.mode as v -> tgt.mode = translate(v, '#ConceptMapGroupUnmappedMode', 'code'); src.code -> tgt.code; src.display -> tgt.display; src.url -> tgt.otherMap; // src.valueSet -> tgt.valueSet; }
/// url = 'http://hl7.org/fhir/StructureMap/ConceptMap4to5' /// name = 'ConceptMap4to5' /// title = 'FML Conversion for ConceptMap: R4 to R5' /// status = 'active' conceptmap "ConceptMapGroupUnmappedMode" { prefix s = "http://hl7.org/fhir/4.0/conceptmap-unmapped-mode" prefix t = "http://hl7.org/fhir/conceptmap-unmapped-mode" s:provided - t:"use-source-code" s:fixed - t:fixed s:"other-map" - t:"other-map" } conceptmap "ConceptMapRelationship" { prefix s = "http://hl7.org/fhir/4.0/concept-map-equivalence" prefix t = "http://hl7.org/fhir/concept-map-relationship" s:relatedto - t:"related-to" s:inexact - t:"related-to" s:equivalent - t:equivalent s:equal - t:equivalent s:wider - t:"source-is-narrower-than-target" s:subsumes - t:"source-is-narrower-than-target" s:narrower - t:"source-is-broader-than-target" s:specializes - t:"source-is-broader-than-target" s:unmatched - t:"not-related-to" } conceptmap "PublicationStatus" { prefix s = "http://hl7.org/fhir/4.0/publication-status" prefix t = "http://hl7.org/fhir/publication-status" s:draft - t:draft s:active - t:active s:retired - t:retired s:unknown - t:unknown } uses "http://hl7.org/fhir/4.0/StructureDefinition/ConceptMap" alias ConceptMapR4 as source uses "http://hl7.org/fhir/StructureDefinition/ConceptMap" alias ConceptMapR5 as target imports "http://hl7.org/fhir/StructureMap/*4to5" group ConceptMap(source src : ConceptMapR4, target tgt : ConceptMapR5) extends DomainResource <<type+>> { src.url -> tgt.url; src.identifier -> tgt.identifier; src.version -> tgt.version; src.name -> tgt.name; // src.versionAlgorithm : string -> tgt.versionAlgorithm; src.title -> tgt.title; src.status as v -> tgt.status = translate(v, '#PublicationStatus', 'code'); src.experimental -> tgt.experimental; src.date -> tgt.date; src.publisher -> tgt.publisher; src.contact -> tgt.contact; src.description -> tgt.description; src.useContext -> tgt.useContext; src.jurisdiction -> tgt.jurisdiction; src.purpose -> tgt.purpose; src.copyright -> tgt.copyright; src.source : uri -> tgt.sourceScope; // src.copyrightLabel -> tgt.copyrightLabel; src.source : canonical -> tgt.sourceScope; src.target : uri -> tgt.targetScope; src.target : canonical -> tgt.targetScope; src.group as s -> tgt.group as t then ConceptMapGroup(s, t); } group ConceptMapGroup(source src, target tgt) extends BackboneElement { src.source -> tgt.source; src.target -> tgt.target; src.element as s -> tgt.element as t then ConceptMapGroupElement(s, t); src.unmapped as s -> tgt.unmapped as t then ConceptMapGroupUnmapped(s, t); } group ConceptMapGroupElement(source src, target tgt) extends BackboneElement { src.code -> tgt.code; src.display -> tgt.display; src where src.target.all(equivalence = 'unmatched') as s -> tgt.noMap as t, t.value = 'true' "unmapped"; // src.valueSet -> tgt.valueSet; src.target as s where s != unmatched -> tgt.target as t then ConceptMapGroupElementTarget(s, t); } group ConceptMapGroupElementTarget(source src, target tgt) extends BackboneElement { src.code -> tgt.code; src.display -> tgt.display; src.equivalence as v -> tgt.relationship = translate(v, '#ConceptMapRelationship', 'code'); // src.valueSet -> tgt.valueSet; src.comment -> tgt.comment; src.dependsOn as s -> tgt.dependsOn as t then ConceptMapGroupElementTargetDependsOn(s, t); // src.property as s -> tgt.property as t then ConceptMapGroupElementTargetProperty(s,t); src.product as s -> tgt.product as t then ConceptMapGroupElementTargetDependsOn(s, t); } group ConceptMapGroupElementTargetDependsOn(source src, target tgt) extends BackboneElement { src.property -> tgt.attribute; src.value where src.system.empty() -> tgt.value; // todo: move the URL to ConceptMap.additionalAttribute - needs a new mapping language feature src where src.system.exists() -> tgt.value = create('Coding') as t then { src.system -> t.system; src.value -> t.code; src.display -> t.display; } "attributeValue"; } group ConceptMapGroupUnmapped(source src, target tgt) extends BackboneElement { src.mode as v -> tgt.mode = translate(v, '#ConceptMapGroupUnmappedMode', 'code'); src.code -> tgt.code; src.display -> tgt.display; src.url -> tgt.otherMap; // src.valueSet -> tgt.valueSet; }