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: ConceptMap Transforms: R3 to R2

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

ConceptMapTransformsR3toR2

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

uses "http://hl7.org/fhir/3.0/ConceptMap" alias ConceptMap as source
uses "http://hl7.org/fhir/1.0/ConceptMap" alias ConceptMapR2 as target

imports "http://hl7.org/fhir/StructureMap/primitives3to2"
imports "http://hl7.org/fhir/StructureMap/DomainResource3to2"
imports "http://hl7.org/fhir/StructureMap/ContactPoint3to2"
imports "http://hl7.org/fhir/StructureMap/Identifier3to2"
imports "http://hl7.org/fhir/StructureMap/Reference3to2"
imports "http://hl7.org/fhir/StructureMap/CodeableConcept3to2"

group ConceptMap(source src : ConceptMap, target tgt : ConceptMapR2) extends DomainResource <<type+>> {
  src.url -> tgt.url "ConceptMap-url";
  src.identifier -> tgt.identifier "ConceptMap-identifier";
  src.version -> tgt.version "ConceptMap-version";
  src.name -> tgt.name "ConceptMap-name";
  src.status -> tgt.status "ConceptMap-status";
  src.experimental -> tgt.experimental "ConceptMap-experimental";
  src.publisher -> tgt.publisher "ConceptMap-publisher";
  src.contact as vs0 -> tgt.contact as vt0 then {
    vs0.name -> vt0.name "contact-name";
    vs0.telecom -> vt0.telecom "contact-telecom";
  } "ConceptMap-contact";
  src.date -> tgt.date "ConceptMap-date";
  src.description -> tgt.description "ConceptMap-description";
  src.jurisdiction -> tgt.useContext "ConceptMap-useContext-1";
  src.useContext as vs then {
    vs.value -> tgt.useContext "ConceptMap-useContext-value";
  } "ConceptMap-useContext";
  src.purpose -> tgt.requirements "ConceptMap-requirements";
  src.copyright -> tgt.copyright "ConceptMap-copyright";
  src.source -> tgt.source "ConceptMap-source";
  src.target -> tgt.target "ConceptMap-target";
  src.group as grp then {
    grp.element as els -> tgt.element as elt then {
      grp.source -> elt.codeSystem "ConceptMap-element-code";
      els.code -> elt.code "ConceptMap-element-code";
      els.target as srcT -> elt.target as tgtT then {
        grp.target -> tgtT.codeSystem "ConceptMap-target-codeSystem";
        srcT.code -> tgtT.code "ConceptMap-target-code";
        srcT.equivalence -> tgtT.equivalence "ConceptMap-target-equivalence";
        srcT.comment -> tgtT.comments "ConceptMap-target-comments";
        srcT.dependsOn as vs -> tgtT.dependsOn as vt then {
          vs.property -> vt.element "ConceptMap-target-dependsOn-element";
          vs.system -> vt.codeSystem "ConceptMap-target-dependsOn-codeSystem";
          vs.code -> vt.code "ConceptMap-target-dependsOn-code";
        } "ConceptMap-target-dependsOn";
        srcT.product as vs -> tgtT.product as vt then {
          vs.property -> vt.element "ConceptMap-target-product-element";
          vs.system -> vt.codeSystem "ConceptMap-target-product-codeSystem";
          vs.code -> vt.code "ConceptMap-target-product-code";
        } "ConceptMap-target-product";
      } "ConceptMap-element-target";
    } "ConceptMap-group-element";
  } "ConceptMap-group";
}