R4 Ballot #1 (Mixed Normative/Trial use)

This page is part of the FHIR Specification (v3.3.0: R4 Ballot 2). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3

FHIR Infrastructure Work GroupMaturity Level: N/ABallot Status: Informative Compartments: Not linked to any defined compartments

R2 : R3 Conversion maps for ImplementationGuide.

Functional status for this map: 1 test that all execute ok. All tests pass round-trip testing and all r3 resources are valid. (see documentation)

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

uses "http://hl7.org/fhir/DSTU2/StructureDefinition/ImplementationGuide" alias ImplementationGuideR2 as source
uses "http://hl7.org/fhir/StructureDefinition/ImplementationGuide" alias ImplementationGuide as target

imports "http://hl7.org/fhir/StructureMap/primitives2to3"
imports "http://hl7.org/fhir/StructureMap/BackboneElement2to3"
imports "http://hl7.org/fhir/StructureMap/DomainResource2to3"
imports "http://hl7.org/fhir/StructureMap/ContactPoint2to3"
imports "http://hl7.org/fhir/StructureMap/CodeableConcept2to3"
imports "http://hl7.org/fhir/StructureMap/Reference2to3"

group for type+types  ImplementationGuide extends DomainResource
  input src : ImplementationGuideR2 as source
  input tgt : ImplementationGuide as target

  "ImplementationGuide-url" : for src.url make tgt.url
  "ImplementationGuide-version" : for src.version make tgt.version
  "ImplementationGuide-name" : for src.name make tgt.name
  "ImplementationGuide-status" : for src.status make tgt.status
  "ImplementationGuide-experimental" : for src.experimental make tgt.experimental
  "ImplementationGuide-publisher" : for src.publisher make tgt.publisher
  "ImplementationGuide-contact" : for src.contact as vs0 make tgt.contact as vt0 then {
    "ContactDetail-name" : for vs0.name make vt0.name
    "ContactDetail-telecom" : for vs0.telecom make vt0.telecom
  }

  "ImplementationGuide-description" : for src.description make tgt.description
  "ImplementationGuide-copyright" : for src.copyright make tgt.copyright
  "ImplementationGuide-jurisdiction" : for src.useContext where coding.system = 'urn:iso:std:iso:3166' make tgt.jurisdiction
  "ImplementationGuide-useContext" : for src.useContext as vs where (coding.system = 'urn:iso:std:iso:3166').not() make  tgt.useContext as uc,  uc.code as ucc,  ucc.system = "http://hl7.org/fhir/usage-context-type",  ucc.code = "task",  uc.value = create("CodeableConcept") as vt then CodeableConcept(vs, vt)
  "ImplementationGuide-date" : for src.date make tgt.date
  "ImplementationGuide-fhirVersion" : for src.fhirVersion make tgt.fhirVersion
  "ImplementationGuide-dependency" : for src.dependency as vs0 make tgt.dependency as vt0 then {
    "ImplementationGuide.dependency-type" : for vs0.type make vt0.type
    "ImplementationGuide.dependency-uri" : for vs0.uri make vt0.uri
  }

  "ImplementationGuide-package" : for src.package as vs0 make tgt.package as vt0 then {
    "ImplementationGuide.package-name" : for vs0.name make vt0.name
    "ImplementationGuide.package-description" : for vs0.description make vt0.description
    "ImplementationGuide.package-resource" : for vs0.resource as vs make vt0.resource as vt then resource(vs, vt)
  }

  "ImplementationGuide-global" : for src.global as vs0 make tgt.global as vt0 then {
    "ImplementationGuide.global-type" : for vs0.type make vt0.type
    "ImplementationGuide.global-profile" : for vs0.profile make vt0.profile
  }

  "ImplementationGuide-binary" : for src.binary make tgt.binary
  "ImplementationGuide-page" : for src.page as vs0 make tgt.page as vt0 then page(vs0, vt0)
endgroup

group resource extends BackboneElement
  input src as source
  input tgt as target

  "ImplementationGuide.resource-purpose" : for src where src.purpose = 'example' make tgt.example = true
  "ImplementationGuide.resource-name" : for src.name make tgt.name
  "ImplementationGuide.resource-description" : for src.description make tgt.description
  "ImplementationGuide.resource-acronym" : for src.acronym make tgt.acronym
  "ImplementationGuide.resource-source" : for src.source make tgt.source
  "ImplementationGuide.resource-exampleFor" : for src.exampleFor make tgt.exampleFor
endgroup

group page extends BackboneElement
  input src as source
  input tgt as target

  "ImplementationGuide.page-source" : for src.source make tgt.source
  "ImplementationGuide.page-title" : for src.name make tgt.title
  "ImplementationGuide.page-kind" : for src.kind make tgt.kind
  "ImplementationGuide.page-type" : for src.type make tgt.type
  "ImplementationGuide.page-package" : for src.package make tgt.package
  "ImplementationGuide.page-format" : for src.format make tgt.format
  "ImplementationGuide.page-page" : for src.page as vs0 make tgt.page as vt0 then page(vs0, vt0)
endgroup

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

uses "http://hl7.org/fhir/StructureDefinition/ImplementationGuide" alias ImplementationGuide as source
uses "http://hl7.org/fhir/DSTU2/StructureDefinition/ImplementationGuide" alias ImplementationGuideR2 as target

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

group for type+types  ImplementationGuide extends DomainResource
  input src : ImplementationGuide as source
  input tgt : ImplementationGuideR2 as target

  "ImplementationGuide-url" : for src.url make tgt.url
  "ImplementationGuide-version" : for src.version make tgt.version
  "ImplementationGuide-name" : for src.name make tgt.name
  "ImplementationGuide-status" : for src.status make tgt.status
  "ImplementationGuide-experimental" : for src.experimental make tgt.experimental
  "ImplementationGuide-publisher" : for src.publisher make tgt.publisher
  "ImplementationGuide-contact" : for src.contact as vs0 make tgt.contact as vt0 then {
    "ImplementationGuide.contact-name" : for vs0.name make vt0.name
    "ImplementationGuide.contact-telecom" : for vs0.telecom make vt0.telecom
  }

  "ImplementationGuide-date" : for src.date make tgt.date
  "ImplementationGuide-description" : for src.description make tgt.description
  "ImplementationGuide-useContext" : for src.jurisdiction make tgt.useContext
  "ImplementationGuide-copyright" : for src.copyright make tgt.copyright
  "ImplementationGuide-fhirVersion" : for src.fhirVersion make tgt.fhirVersion
  "ImplementationGuide-dependency" : for src.dependency as vs0 make tgt.dependency as vt0 then {
    "ImplementationGuide.dependency-type" : for vs0.type make vt0.type
    "ImplementationGuide.dependency-uri" : for vs0.uri make vt0.uri
  }

  "ImplementationGuide-package" : for src.package as vs0 make tgt.package as vt0 then {
    "ImplementationGuide.package-name" : for vs0.name make vt0.name
    "ImplementationGuide.package-description" : for vs0.description make vt0.description
    "ImplementationGuide.package-resource" : for vs0.resource as vs make vt0.resource as vt then resource(vs, vt)
  }

  "ImplementationGuide-global" : for src.global as vs0 make tgt.global as vt0 then {
    "ImplementationGuide.global-type" : for vs0.type make vt0.type
    "ImplementationGuide.global-profile" : for vs0.profile make vt0.profile
  }

  "ImplementationGuide-binary" : for src.binary make tgt.binary
  "ImplementationGuide-page" : for src.page as vs0 make tgt.page as vt0 then page(vs0, vt0)
endgroup

group resource extends BackboneElement
  input src as source
  input tgt as target

  "ImplementationGuide.resource-purpose" : for src where example = true make tgt.purpose = 'example'
  "ImplementationGuide.resource-name" : for src.name make tgt.name
  "ImplementationGuide.resource-description" : for src.description make tgt.description
  "ImplementationGuide.resource-acronym" : for src.acronym make tgt.acronym
  "ImplementationGuide.resource-source" : for src.source make tgt.source
  "ImplementationGuide.resource-exampleFor" : for src.exampleFor make tgt.exampleFor
endgroup

group page extends BackboneElement
  input src as source
  input tgt as target

  "ImplementationGuide.page-source" : for src.source make tgt.source
  "ImplementationGuide.page-name" : for src.title make tgt.name
  "ImplementationGuide.page-kind" : for src.kind make tgt.kind
  "ImplementationGuide.page-type" : for src.type make tgt.type
  "ImplementationGuide.page-package" : for src.package make tgt.package
  "ImplementationGuide.page-format" : for src.format make tgt.format
  "ImplementationGuide.page-page" : for src.page as vs0 make tgt.page as vt0 then page(vs0, vt0)
endgroup