Release 5

This page is part of the FHIR Specification (v5.0.0: R5 - STU). This is the current published version. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3

FHIR Infrastructure icon Work GroupMaturity Level: N/AStandards Status: InformativeSecurity Category: Anonymous Compartments: No defined compartments

R4 : R5 Conversion maps for ImplementationGuide.

Functional status for this map: See Conversions Summary. (see documentation)

map "http://hl7.org/fhir/StructureMap/ImplementationGuide3to4" = "R3 to R4 Conversions for ImplementationGuide"

uses "http://hl7.org/fhir/3.0/StructureDefinition/ImplementationGuide" alias ImplementationGuideR3 as source
uses "http://hl7.org/fhir/StructureDefinition/ImplementationGuide" alias ImplementationGuide as target

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

group ImplementationGuide(source src : ImplementationGuideR3, target tgt : ImplementationGuide) extends DomainResource <<type+>> {
  src.url -> tgt.url;
  src.version -> tgt.version;
  src.name -> tgt.name;
  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.copyright -> tgt.copyright;
  src.fhirVersion -> tgt.fhirVersion;
  src.dependency as vs0 check type = 'reference' -> tgt.dependsOn as vt0 then dependency(vs0, vt0);
  src.global as vs0 -> tgt.global as vt0 then global(vs0, vt0);
  src -> tgt.definition as dfn then definition(src, dfn) "definition";
  src where binary.exists() -> tgt.manifest as mft then manifest(src, mft) "manifest";
}

group dependency(source src, target tgt) extends BackboneElement {
  src.uri -> tgt.uri;
}

group global(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.profile -> tgt.profile;
}

group definition(source src, target tgt) extends BackboneElement {
  src.package as pck -> tgt.grouping as grp then grouping(pck, tgt, grp);
  src.page as vs0 -> tgt.page as vt0 then page(vs0, vt0);
}

group grouping(source src, target dfn, target grp) extends BackboneElement {
  src.name -> grp.name;
  src.description -> grp.description;
  src.resource as rs -> dfn.resource as rt then resource(rs, rt, src);
}

group resource(source src, target tgt, source pck) extends BackboneElement {
  pck.id -> tgt.groupingId "packageId";
  src.example where src.exampleFor.empty() as vs0 -> tgt.example = create('boolean') as vt0 then boolean(vs0, vt0);
  src.name -> tgt.name;
  src.description -> tgt.description;
  src.acronym as vs ->  tgt.extension as ext,  ext.url = 'http://hl7.org/fhir/3.0/StructureDefinition/extension-ImplementationGuide.package.resource.acronym',  ext.value = vs;
  src.source : uri as vs ->  tgt.reference as ref,  ref.reference = vs,  ref.extension as ext,  ext.url = 'http://hl7.org/fhir/3.0/StructureDefinition/BaseType',  ext.value = 'uri' "sourceUri";
  src.source : Reference as vs0 -> tgt.reference as vt0 then reference(vs0, vt0) "sourceRef";
  src.exampleFor as vs0 -> tgt.example = create('canonical') as vt0 then Reference2Canonical(vs0, vt0);
}

group page(source src, target tgt) extends BackboneElement {
  src.source as vs0 -> tgt.name = create('uri') as vt0 then uri(vs0, vt0);
  src.title -> tgt.title;
  src.kind as vs ->  tgt.extension as ext,  ext.url = 'http://hl7.org/fhir/3.0/StructureDefinition/extension-ImplementationGuide.page.kind',  ext.value = vs;
  src.type as vs ->  tgt.extension as ext,  ext.url = 'http://hl7.org/fhir/3.0/StructureDefinition/extension-ImplementationGuide.page.type',  ext.value = vs;
  src.package as vs ->  tgt.extension as ext,  ext.url = 'http://hl7.org/fhir/3.0/StructureDefinition/extension-ImplementationGuide.page.package',  ext.value = vs;
  src.format as vs ->  tgt.extension as ext,  ext.url = 'http://hl7.org/fhir/3.0/StructureDefinition/extension-ImplementationGuide.page.format',  ext.value = vs;
  src.page as vs0 -> tgt.page as vt0 then page(vs0, vt0);
}

group manifest(source src, target tgt) extends BackboneElement {
  src.binary -> tgt.other;
}


map "http://hl7.org/fhir/StructureMap/ImplementationGuide4to3" = "R4 to R3 Conversion for ImplementationGuide"

uses "http://hl7.org/fhir/StructureDefinition/ImplementationGuide" alias ImplementationGuide as source
uses "http://hl7.org/fhir/3.0/StructureDefinition/ImplementationGuide" alias ImplementationGuideR3 as target

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

group ImplementationGuide(source src : ImplementationGuide, target tgt : ImplementationGuideR3) extends DomainResource <<type+>> {
  src.url -> tgt.url;
  src.version -> tgt.version;
  src.name -> tgt.name;
  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.copyright -> tgt.copyright;
  src.fhirVersion -> tgt.fhirVersion;
  src.dependsOn as vs0 -> tgt.dependency as vt0 then dependency(vs0, vt0) "dependency";
  src.global as vs0 -> tgt.global as vt0 then global(vs0, vt0);
  src.definition as vs0 then definition(vs0, tgt);
  src.manifest as mft then manifest(mft, tgt);
}

group dependency(source src, target tgt) extends BackboneElement {
  src -> tgt.type = 'reference' "type";
  src.uri -> tgt.uri;
}

group global(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.profile -> tgt.profile;
}

group definition(source src, target tgt) extends BackboneElement {
  src.grouping as grp -> tgt.package as pck then grouping(grp, pck, src) "package";
  src.page as vs0 -> tgt.page as vt0 then page(vs0, vt0);
}

group grouping(source src, target tgt, source dfn) extends BackboneElement {
  src.name -> tgt.name;
  src.description -> tgt.description;
  dfn.resource as rs where groupingId = src.id -> tgt.resource as rt then resource(rs, rt);
}

group resource(source src, target tgt) extends BackboneElement {
  src.example : boolean as vs0 -> tgt.example as vt0 then boolean(vs0, vt0);
  src.name -> tgt.name;
  src.description -> tgt.description;
  src.extension as ext where url = 'http://hl7.org/fhir/3.0/StructureDefinition/extension-ImplementationGuide.package.resource.acronym' then {
    ext.value as vs0 -> tgt.acronym = vs0 "acronym2";
  } "acronym";
  src.reference as vs0 where extension('http://hl7.org/fhir/3.0/StructureDefinition/BaseType').empty() -> tgt.source = create('Reference') as vt0 then Reference(vs0, vt0) "source1";
  src.reference as vs0 where extension('http://hl7.org/fhir/3.0/StructureDefinition/BaseType').exists() -> tgt.source = create('uri') as vt0 then {
    vs0.reference as vs1 then uri(vs1, vt0) "source2a";
  } "source2";
  src.example : canonical as vs0 ->  tgt.example = true,  tgt.exampleFor as vt0 then canonical2Reference(vs0, vt0) "exampleFor";
}

group page(source src, target tgt) extends BackboneElement {
  src.name : uri as vs0 -> tgt.source as vt0 then uri(vs0, vt0) "source";
  src.title -> tgt.title;
  src.extension as ext where url = 'http://hl7.org/fhir/3.0/StructureDefinition/extension-ImplementationGuide.page.kind' then {
    ext.value as vs0 -> tgt.kind = vs0 "acronym2";
  } "acronym";
  src.extension as ext where url = 'http://hl7.org/fhir/3.0/StructureDefinition/extension-ImplementationGuide.page.type' then {
    ext.value as vs0 -> tgt.type = vs0 "acronym2";
  } "acronym";
  src.extension as ext where url = 'http://hl7.org/fhir/3.0/StructureDefinition/extension-ImplementationGuide.page.package' then {
    ext.value as vs0 -> tgt.package = vs0 "acronym2";
  } "acronym";
  src.extension as ext where url = 'http://hl7.org/fhir/3.0/StructureDefinition/extension-ImplementationGuide.page.format' then {
    ext.value as vs0 -> tgt.format = vs0 "acronym2";
  } "acronym";
  src.page as vs0 -> tgt.page as vt0 then page(vs0, vt0);
}

group manifest(source src, target tgt) extends BackboneElement {
  src.other -> tgt.binary "binary";
}


No validation errors - all conversions are clean