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: CodeSystem Transforms: R4 to R3

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

CodeSystemTransformsR4toR3

/// url = 'http://hl7.org/fhir/StructureMap/CodeSystem4to3'
/// name = 'CodeSystem4to3'
/// title = 'CodeSystem Transforms: R4 to R3'
/// status = 'active'

uses "http://hl7.org/fhir/4.0/CodeSystem" alias CodeSystem as source
uses "http://hl7.org/fhir/3.0/CodeSystem" alias CodeSystemR3 as target

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

group CodeSystem(source src : CodeSystem, target tgt : CodeSystemR3) extends DomainResource <<type+>> {
  src.url -> tgt.url;
  src.identifier -> tgt.identifier;
  src.version -> tgt.version;
  src.name -> tgt.name;
  src.title -> tgt.title;
  src.status -> tgt.status;
  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.caseSensitive -> tgt.caseSensitive;
  src.valueSet -> tgt.valueSet;
  src.hierarchyMeaning -> tgt.hierarchyMeaning;
  src.compositional -> tgt.compositional;
  src.versionNeeded -> tgt.versionNeeded;
  src.content -> tgt.content;
  src.count -> tgt.count;
  src.filter as vs0 -> tgt.filter as vt0 then filter(vs0, vt0);
  src.property as vs0 -> tgt.property as vt0 then property(vs0, vt0);
  src.concept as vs0 -> tgt.concept as vt0 then concept(vs0, vt0);
}

group filter(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code;
  src.description -> tgt.description;
  src.operator -> tgt.operator;
  src.value -> tgt.value;
}

group property(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code;
  src.uri -> tgt.uri;
  src.description -> tgt.description;
  src.type -> tgt.type;
}

group concept(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code;
  src.display -> tgt.display;
  src.definition -> tgt.definition;
  src.designation as vs0 -> tgt.designation as vt0 then designation(vs0, vt0);
  src.property as vs0 -> tgt.property as vt0 then propertyC(vs0, vt0);
  src.concept as vs0 -> tgt.concept as vt0 then concept(vs0, vt0);
}

group designation(source src, target tgt) extends BackboneElement {
  src.language -> tgt.language;
  src.use -> tgt.use;
  src.value -> tgt.value;
}

group propertyC(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code;
  src.value : code as vs0 -> tgt.value = create('code') as vt0 then code(vs0, vt0);
  src.value : Coding as vs0 -> tgt.value = create('Coding') as vt0 then Coding(vs0, vt0);
  src.value : string as vs0 -> tgt.value = create('string') as vt0 then string(vs0, vt0);
  src.value : integer as vs0 -> tgt.value = create('integer') as vt0 then integer(vs0, vt0);
  src.value : boolean as vs0 -> tgt.value = create('boolean') as vt0 then boolean(vs0, vt0);
  src.value : dateTime as vs0 -> tgt.value = create('dateTime') as vt0 then dateTime(vs0, vt0);
}