BundleToCdaCh
type: StructureMap
node role: treeRoot
resource.id:
  value: BundleToCdaCh
domain resource.text:
  narrative.status:
    value: generated
  narrative.div: map "http://fhir.ch/ig/cda-fhir-maps/StructureMap/BundleToCdaCh" = "BundleToCdaCh" // CDA-CH document, 2.16.756.5.30.1.1.10.1.14 // 2020-01-16 Oliver Egger, copyright ahdis ag, Apache License // CDA-CH: https://art-decor.org/art-decor/decor-templates--hl7chcda- // FHIR CH-Core: http://fhir.ch/ig/ch-core/index.html uses "http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument" alias ClinicalDocument as target uses "http://hl7.org/fhir/cda/StructureDefinition/Author" alias Author as target uses "http://hl7.org/fhir/cda/StructureDefinition/RecordTarget" alias RecordTarget as target uses "http://hl7.org/fhir/cda/StructureDefinition/DataEnterer" alias DataEnterer as target uses "http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity" alias AssignedEntity as target uses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as source uses "http://hl7.org/fhir/StructureDefinition/Composition" alias Composition as source uses "http://hl7.org/fhir/StructureDefinition/Person" alias Person as source imports "http://fhir.ch/ig/cda-fhir-maps/StructureMap/FhirToCdaTypes" imports "http://fhir.ch/ig/cda-fhir-maps/StructureMap/BundleToCda" // source: http://build.fhir.org/ig/hl7ch/ch-core/branches/master/StructureDefinition-ch-core-document.html // target: https://art-decor.org/art-decor/decor-templates--hl7chcda-?id=2.16.756.5.30.1.1.10.1.14 group BundleToCdaCh(source bundle : Bundle, target cda : ClinicalDocument) { bundle -> cda.recordTarget as recordTarget, cda.author as author then BundleToClinicalDocumentCh(bundle, recordTarget, author, cda) "bundle"; } // source: http://build.fhir.org/ig/hl7ch/ch-core/branches/master/StructureDefinition-ch-core-document.html // target: https://art-decor.org/art-decor/decor-templates--hl7chcda-?id=2.16.756.5.30.1.1.10.1.14 group BundleToClinicalDocumentCh(source bundle : Bundle, target recordTarget : RecordTarget, target author : Author, target cda : ClinicalDocument) extends BundleToClinicalDocument { bundle -> author.template…
structure map.url:
  value: http://fhir.ch/ig/cda-fhir-maps/StructureMap/BundleToCdaCh
structure map.version:
  value: 0.1.0
structure map.name:
  value: BundleToCdaCh
structure map.status:
  value: draft
structure map.date:
  value: 2020-12-09T15:16:13+01:00
structure map.publisher:
  value: ahdis
structure map.contact:
  index: 0
  contact detail.name:
    value: ahdis
  contact detail.telecom:
    index: 0
    contact point.system:
      value: url
    contact point.value:
      value: http://www.ahdis.ch/
structure map.description:
  value: CDA-CH document, 2.16.756.5.30.1.1.10.1.14 2020-01-16 Oliver Egger, copyright ahdis ag, Apache License CDA-CH: https://art-decor.org/art-decor/decor-templates--hl7chcda- FHIR CH-Core: http://fhir.ch/ig/ch-core/index.html
structure map.copyright:
  value: CC-BY-SA-4.0
structure map.structure:
  index: 0
  structure map.structure.url:
    value: http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument
    link: http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument
  structure map.structure.mode:
    value: target
  structure map.structure.alias:
    value: ClinicalDocument
structure map.structure:
  index: 1
  structure map.structure.url:
    value: http://hl7.org/fhir/cda/StructureDefinition/Author
    link: http://hl7.org/fhir/cda/StructureDefinition/Author
  structure map.structure.mode:
    value: target
  structure map.structure.alias:
    value: Author
structure map.structure:
  index: 2
  structure map.structure.url:
    value: http://hl7.org/fhir/cda/StructureDefinition/RecordTarget
    link: http://hl7.org/fhir/cda/StructureDefinition/RecordTarget
  structure map.structure.mode:
    value: target
  structure map.structure.alias:
    value: RecordTarget
structure map.structure:
  index: 3
  structure map.structure.url:
    value: http://hl7.org/fhir/cda/StructureDefinition/DataEnterer
    link: http://hl7.org/fhir/cda/StructureDefinition/DataEnterer
  structure map.structure.mode:
    value: target
  structure map.structure.alias:
    value: DataEnterer
structure map.structure:
  index: 4
  structure map.structure.url:
    value: http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity
    link: http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity
  structure map.structure.mode:
    value: target
  structure map.structure.alias:
    value: AssignedEntity
structure map.structure:
  index: 5
  structure map.structure.url:
    value: http://hl7.org/fhir/StructureDefinition/Bundle
    link: http://hl7.org/fhir/StructureDefinition/Bundle
  structure map.structure.mode:
    value: source
  structure map.structure.alias:
    value: Bundle
structure map.structure:
  index: 6
  structure map.structure.url:
    value: http://hl7.org/fhir/StructureDefinition/Composition
    link: http://hl7.org/fhir/StructureDefinition/Composition
  structure map.structure.mode:
    value: source
  structure map.structure.alias:
    value: Composition
structure map.structure:
  index: 7
  structure map.structure.url:
    value: http://hl7.org/fhir/StructureDefinition/Person
    link: http://hl7.org/fhir/StructureDefinition/Person
  structure map.structure.mode:
    value: source
  structure map.structure.alias:
    value: Person
structure map.import:
  value: http://fhir.ch/ig/cda-fhir-maps/StructureMap/FhirToCdaTypes
  index: 0
  link: http://fhir.ch/ig/cda-fhir-maps/StructureMap/FhirToCdaTypes
structure map.import:
  value: http://fhir.ch/ig/cda-fhir-maps/StructureMap/BundleToCda
  index: 1
  link: http://fhir.ch/ig/cda-fhir-maps/StructureMap/BundleToCda
structure map.group:
  index: 0
  structure map.group.name:
    value: BundleToCdaCh
  structure map.group.type mode:
    value: none
  structure map.group.documentation:
    value: source: http://build.fhir.org/ig/hl7ch/ch-core/branches/master/StructureDefinition-ch-core-document.html target: https://art-decor.org/art-decor/decor-templates--hl7chcda-?id=2.16.756.5.30.1.1.10.1.14
  structure map.group.input:
    index: 0
    structure map.group.input.name:
      value: bundle
    structure map.group.input.type:
      value: Bundle
    structure map.group.input.mode:
      value: source
  structure map.group.input:
    index: 1
    structure map.group.input.name:
      value: cda
    structure map.group.input.type:
      value: ClinicalDocument
    structure map.group.input.mode:
      value: target
  structure map.group.rule:
    index: 0
    structure map.group.rule.name:
      value: bundle
    structure map.group.rule.source:
      index: 0
      structure map.group.rule.source.context:
        value: bundle
    structure map.group.rule.target:
      index: 0
      structure map.group.rule.target.context:
        value: cda
      structure map.group.rule.target.context type:
        value: variable
      structure map.group.rule.target.element:
        value: recordTarget
      structure map.group.rule.target.variable:
        value: recordTarget
    structure map.group.rule.target:
      index: 1
      structure map.group.rule.target.context:
        value: cda
      structure map.group.rule.target.context type:
        value: variable
      structure map.group.rule.target.element:
        value: author
      structure map.group.rule.target.variable:
        value: author
    structure map.group.rule.dependent:
      index: 0
      structure map.group.rule.dependent.name:
        value: BundleToClinicalDocumentCh
      structure map.group.rule.dependent.variable:
        value: bundle
        index: 0
      structure map.group.rule.dependent.variable:
        value: recordTarget
        index: 1
      structure map.group.rule.dependent.variable:
        value: author
        index: 2
      structure map.group.rule.dependent.variable:
        value: cda
        index: 3
structure map.group:
  index: 1
  structure map.group.name:
    value: BundleToClinicalDocumentCh
  structure map.group.extends:
    value: BundleToClinicalDocument
  structure map.group.type mode:
    value: none
  structure map.group.documentation:
    value: source: http://build.fhir.org/ig/hl7ch/ch-core/branches/master/StructureDefinition-ch-core-document.html target: https://art-decor.org/art-decor/decor-templates--hl7chcda-?id=2.16.756.5.30.1.1.10.1.14
  structure map.group.input:
    index: 0
    structure map.group.input.name:
      value: bundle
    structure map.group.input.type:
      value: Bundle
    structure map.group.input.mode:
      value: source
  structure map.group.input:
    index: 1

value: recordTarget

value: RecordTarget

value: target

index: 2
structure map.group.input.name:
  value: author
structure map.group.input.type:
  value: Author
structure map.group.input.mode:
  value: target

index: 3
structure map.group.input.name:
  value: cda
structure map.group.input.type:
  value: ClinicalDocument
structure map.group.input.mode:
  value: target

index: 0
structure map.group.rule.name:
  value: tempalteId
structure map.group.rule.source:
  index: 0
  structure map.group.rule.source.context:
    value: bundle
structure map.group.rule.target:
  index: 0
  structure map.group.rule.target.context:
    value: author
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: templateId
  structure map.group.rule.target.variable:
    value: templateId
structure map.group.rule.target:
  index: 1
  structure map.group.rule.target.context:
    value: templateId
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: root
  structure map.group.rule.target.transform:
    value: copy
  structure map.group.rule.target.parameter:
    index: 0
    structure map.group.rule.target.parameter.value string:
      value: 2.16.756.5.30.1.1.10.9.23

index: 1
structure map.group.rule.name:
  value: tempalteId
structure map.group.rule.source:
  index: 0
  structure map.group.rule.source.context:
    value: bundle
structure map.group.rule.target:
  index: 0
  structure map.group.rule.target.context:
    value: recordTarget
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: templateId
  structure map.group.rule.target.variable:
    value: templateId
structure map.group.rule.target:
  index: 1
  structure map.group.rule.target.context:
    value: templateId
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: root
  structure map.group.rule.target.transform:
    value: copy
  structure map.group.rule.target.parameter:
    index: 0
    structure map.group.rule.target.parameter.value string:
      value: 2.16.756.5.30.1.1.10.2.1

index: 2
structure map.group.rule.name:
  value: tempalteId
structure map.group.rule.source:
  index: 0
  structure map.group.rule.source.context:
    value: bundle
structure map.group.rule.target:
  index: 0
  structure map.group.rule.target.context:
    value: cda
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: custodian
  structure map.group.rule.target.variable:
    value: custodian
structure map.group.rule.target:
  index: 1
  structure map.group.rule.target.context:
    value: custodian
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: templateId
  structure map.group.rule.target.variable:
    value: templateId
structure map.group.rule.target:
  index: 2
  structure map.group.rule.target.context:
    value: templateId
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: root
  structure map.group.rule.target.transform:
    value: copy
  structure map.group.rule.target.parameter:
    index: 0
    structure map.group.rule.target.parameter.value string:
      value: 2.16.756.5.30.1.1.10.2.3

index: 3
structure map.group.rule.name:
  value: realmCode
structure map.group.rule.source:
  index: 0
  structure map.group.rule.source.context:
    value: bundle
structure map.group.rule.target:
  index: 0
  structure map.group.rule.target.context:
    value: cda
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: realmCode
  structure map.group.rule.target.variable:
    value: realmCode
structure map.group.rule.rule:
  index: 0
  structure map.group.rule.name:
    value: CHE
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: bundle
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: realmCode
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: code
    structure map.group.rule.target.transform:
      value: copy
    structure map.group.rule.target.parameter:
      index: 0
      structure map.group.rule.target.parameter.value string:
        value: CHE

index: 4
structure map.group.rule.name:
  value: HL7CdaR2-2005-containsClinicalDocument.componentAsStructuredBody
structure map.group.rule.source:
  index: 0
  structure map.group.rule.source.context:
    value: bundle
structure map.group.rule.target:
  index: 0
  structure map.group.rule.target.context:
    value: cda
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: templateId
  structure map.group.rule.target.variable:
    value: templateId
structure map.group.rule.rule:
  index: 0
  structure map.group.rule.name:
    value: root
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: bundle
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: templateId
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: root
    structure map.group.rule.target.transform:
      value: copy
    structure map.group.rule.target.parameter:
      index: 0
      structure map.group.rule.target.parameter.value string:
        value: 2.16.840.1.113883.10.12.2

index: 5
structure map.group.rule.name:
  value: CDA-CHv2.0-structuredBody
structure map.group.rule.source:
  index: 0
  structure map.group.rule.source.context:
    value: bundle
structure map.group.rule.target:
  index: 0
  structure map.group.rule.target.context:
    value: cda
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: templateId
  structure map.group.rule.target.variable:
    value: templateId
structure map.group.rule.rule:
  index: 0
  structure map.group.rule.name:
    value: root
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: bundle
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: templateId
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: root
    structure map.group.rule.target.transform:
      value: copy
    structure map.group.rule.target.parameter:
      index: 0
      structure map.group.rule.target.parameter.value string:
        value: 2.16.756.5.30.1.1.10.1.9

index: 6
structure map.group.rule.name:
  value: entry
structure map.group.rule.source:
  index: 0
  structure map.group.rule.source.context:
    value: bundle
  structure map.group.rule.source.element:
    value: entry
  structure map.group.rule.source.variable:
    value: entry
structure map.group.rule.rule:
  index: 0
  structure map.group.rule.name:
    value: resource
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: entry
    structure map.group.rule.source.element:
      value: resource
    structure map.group.rule.source.variable:
      value: resource
    structure map.group.rule.source.condition:
      value: $this.ofType(FHIR.Composition)
  structure map.group.rule.dependent:
    index: 0
    structure map.group.rule.dependent.name:
      value: CompositionClinicalDocumentCH
    structure map.group.rule.dependent.variable:
      value: bundle
      index: 0
    structure map.group.rule.dependent.variable:
      value: resource
      index: 1
    structure map.group.rule.dependent.variable:
      value: cda
      index: 2

index: 2
structure map.group.name:
  value: SectionCdaRemarksCoded
structure map.group.extends:
  value: SectionCdaSection
structure map.group.type mode:
  value: none
structure map.group.documentation:
  value: _________________________ Section Level Templates _________________________ source: http://build.fhir.org/ig/hl7ch/ch-core/branches/master/StructureDefinition-ch-core-composition-definitions.html#Composition.section target: https://art-decor.org/art-decor/decor-templates--hl7chcda-?id=2.16.756.5.30.1.1.10.3.2
structure map.group.input:
  index: 0
  structure map.group.input.name:
    value: bundle
  structure map.group.input.type:
    value: Bundle
  structure map.group.input.mode:
    value: source
structure map.group.input:
  index: 1
  structure map.group.input.name:
    value: section
  structure map.group.input.type:
    value: Section
  structure map.group.input.mode:
    value: source
structure map.group.input:
  index: 2
  structure map.group.input.name:
    value: cdasection
  structure map.group.input.type:
    value: CdaSection
  structure map.group.input.mode:
    value: target
structure map.group.rule:
  index: 0
  structure map.group.rule.name:
    value: templateId
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: section
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: cdasection
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: templateId
    structure map.group.rule.target.variable:
      value: templateId
  structure map.group.rule.target:
    index: 1
    structure map.group.rule.target.context:
      value: templateId
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: root
    structure map.group.rule.target.transform:
      value: copy
    structure map.group.rule.target.parameter:
      index: 0
      structure map.group.rule.target.parameter.value string:
        value: 2.16.756.5.30.1.1.10.3.2
structure map.group.rule:
  index: 1
  structure map.group.rule.name:
    value: entry
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: section
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: cdasection
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: entry
    structure map.group.rule.target.variable:
      value: entry
  structure map.group.rule.target:
    index: 1
    structure map.group.rule.target.context:
      value: entry
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: act
    structure map.group.rule.target.variable:
      value: act
  structure map.group.rule.target:
    index: 2
    structure map.group.rule.target.context:
      value: act
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: classCode
    structure map.group.rule.target.transform:
      value: copy
    structure map.group.rule.target.parameter:
      index: 0
      structure map.group.rule.target.parameter.value string:
        value: ACT
  structure map.group.rule.target:
    index: 3
    structure map.group.rule.target.context:
      value: act
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: moodCode
    structure map.group.rule.target.transform:
      value: copy
    structure map.group.rule.target.parameter:
      index: 0
      structure map.group.rule.target.parameter.value string:
        value: EVN
  structure map.group.rule.rule:
    index: 0
    structure map.group.rule.name:
      value: templateId
    structure map.group.rule.source:
      index: 0
      structure map.group.rule.source.context:
        value: section
    structure map.group.rule.target:
      index: 0
      structure map.group.rule.target.context:
        value: act
      structure map.group.rule.target.context type:
        value: variable
      structure map.group.rule.target.element:
        value: templateId
      structure map.group.rule.target.variable:
        value: templateId
    structure map.group.rule.target:
      index: 1
      structure map.group.rule.target.context:
        value: templateId
      structure map.group.rule.target.context type:
        value: variable
      structure map.group.rule.target.element:
        value: root
      structure map.group.rule.target.transform:
        value: copy
      structure map.group.rule.target.parameter:
        index: 0
  structure map.group.rule.rule:
    index: 1
    structure map.group.rule.name:
      value: templateId
    structure map.group.rule.source:
      index: 0
      structure map.group.rule.source.context:
        value: section
    structure map.group.rule.target:
      index: 0
      structure map.group.rule.target.context:
        value: act
      structure map.group.rule.target.context type:
        value: variable
      structure map.group.rule.target.element:
        value: templateId
      structure map.group.rule.target.variable:
        value: templateId
    structure map.group.rule.target:
      index: 1
      structure map.group.rule.target.context:
        value: templateId
      structure map.group.rule.target.context type:
        value: variable
      structure map.group.rule.target.element:
        value: root
      structure map.group.rule.target.transform:
        value: copy
      structure map.group.rule.target.parameter:
        index: 0
  structure map.group.rule.rule:
    index: 2
    structure map.group.rule.name:
      value: templateId
    structure map.group.rule.source:
      index: 0
      structure map.group.rule.source.context:
        value: section
    structure map.group.rule.target:
      index: 0
      structure map.group.rule.target.context:
        value: act
      structure map.group.rule.target.context type:
        value: variable
      structure map.group.rule.target.element:
        value: templateId
      structure map.group.rule.target.variable:
        value: templateId
    structure map.group.rule.target:
      index: 1
      structure map.group.rule.target.context:
        value: templateId

value: 2.16.756.5.30.1.1.10.4.2

value: 2.16.840.1.113883.10.20.1.40

value: variable

value: root

value: copy

index: 0
structure map.group.rule.target.parameter.value string:
  value: 1.3.6.1.4.1.19376.1.5.3.1.4.2

index: 3
structure map.group.rule.name:
  value: code
structure map.group.rule.source:
  index: 0
  structure map.group.rule.source.context:
    value: section
structure map.group.rule.target:
  index: 0
  structure map.group.rule.target.context:
    value: act
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: code
  structure map.group.rule.target.variable:
    value: code
structure map.group.rule.target:
  index: 1
  structure map.group.rule.target.context:
    value: code
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: code
  structure map.group.rule.target.transform:
    value: copy
  structure map.group.rule.target.parameter:
    index: 0
    structure map.group.rule.target.parameter.value string:
      value: 48767-8
structure map.group.rule.target:
  index: 2
  structure map.group.rule.target.context:
    value: code
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: codeSystem
  structure map.group.rule.target.transform:
    value: copy
  structure map.group.rule.target.parameter:
    index: 0
    structure map.group.rule.target.parameter.value string:
      value: 2.16.840.1.113883.6.1
structure map.group.rule.target:
  index: 3
  structure map.group.rule.target.context:
    value: code
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: codeSystemName
  structure map.group.rule.target.transform:
    value: copy
  structure map.group.rule.target.parameter:
    index: 0
    structure map.group.rule.target.parameter.value string:
      value: LOINC
structure map.group.rule.target:
  index: 4
  structure map.group.rule.target.context:
    value: code
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: displayName
  structure map.group.rule.target.transform:
    value: copy
  structure map.group.rule.target.parameter:
    index: 0
    structure map.group.rule.target.parameter.value string:
      value: Annotation comment

index: 4
structure map.group.rule.name:
  value: section.text
structure map.group.rule.source:
  index: 0
  structure map.group.rule.source.context:
    value: section
  structure map.group.rule.source.element:
    value: text
  structure map.group.rule.source.variable:
    value: text
structure map.group.rule.rule:
  index: 0
  structure map.group.rule.name:
    value: id
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: text
    structure map.group.rule.source.element:
      value: div
    structure map.group.rule.source.variable:
      value: div
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: act
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: text
    structure map.group.rule.target.variable:
      value: text
  structure map.group.rule.target:
    index: 1
    structure map.group.rule.target.context:
      value: text
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: reference
    structure map.group.rule.target.variable:
      value: reference
  structure map.group.rule.target:
    index: 2
    structure map.group.rule.target.context:
      value: reference
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: value
    structure map.group.rule.target.transform:
      value: evaluate
    structure map.group.rule.target.parameter:
      index: 0
      structure map.group.rule.target.parameter.value string:
        value: '#' + %div.substring(%div.indexOf('id') + %div.substring(%div.indexOf('id')).indexOf('\"') + 1, %div.substring(%div.indexOf('id') + %div.substring(%div.indexOf('id')).indexOf('\"') + 1).indexOf('\"'))

index: 5
structure map.group.rule.name:
  value: completed
structure map.group.rule.source:
  index: 0
  structure map.group.rule.source.context:
    value: section
structure map.group.rule.target:
  index: 0
  structure map.group.rule.target.context:
    value: act
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: statusCode
  structure map.group.rule.target.variable:
    value: statusCode
structure map.group.rule.target:
  index: 1
  structure map.group.rule.target.context:
    value: statusCode
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: code
  structure map.group.rule.target.transform:
    value: copy
  structure map.group.rule.target.parameter:
    index: 0
    structure map.group.rule.target.parameter.value string:
      value: completed

index: 3
structure map.group.name:
  value: SectionCdaOriginalRepresentationObservationMedia
structure map.group.type mode:
  value: none
structure map.group.input:
  index: 0
  structure map.group.input.name:
    value: binary
  structure map.group.input.type:
    value: Binary
  structure map.group.input.mode:
    value: source
structure map.group.input:
  index: 1
  structure map.group.input.name:
    value: section
  structure map.group.input.type:
    value: Section
  structure map.group.input.mode:
    value: source
structure map.group.input:
  index: 2
  structure map.group.input.name:
    value: cdasection
  structure map.group.input.type:
    value: CdaSection
  structure map.group.input.mode:
    value: target
structure map.group.rule:
  index: 0
  structure map.group.rule.name:
    value: entry
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: section
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: cdasection
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: entry
    structure map.group.rule.target.variable:
      value: entry
  structure map.group.rule.rule:
    index: 0
    structure map.group.rule.name:
      value: driv
    structure map.group.rule.source:
      index: 0
      structure map.group.rule.source.context:
        value: binary
    structure map.group.rule.target:
      index: 0
      structure map.group.rule.target.context:
        value: entry
      structure map.group.rule.target.context type:
        value: variable
      structure map.group.rule.target.element:
        value: typeCode
      structure map.group.rule.target.transform:
        value: copy
      structure map.group.rule.target.parameter:
        index: 0
  structure map.group.rule.rule:
    index: 1
    structure map.group.rule.name:
      value: observationMedia
    structure map.group.rule.source:
      index: 0
      structure map.group.rule.source.context:
        value: binary
    structure map.group.rule.target:
      index: 0
      structure map.group.rule.target.context:
        value: entry
      structure map.group.rule.target.context type:
        value: variable
      structure map.group.rule.target.element:
        value: observationMedia
      structure map.group.rule.target.variable:
        value: observationMedia
    structure map.group.rule.target:
      index: 1
      structure map.group.rule.target.context:
        value: observationMedia
      structure map.group.rule.target.context type:
        value: variable
      structure map.group.rule.target.element:
        value: classCode
      structure map.group.rule.target.transform:
        value: copy
      structure map.group.rule.target.parameter:
        index: 0
    structure map.group.rule.target:
      index: 2
      structure map.group.rule.target.context:
        value: observationMedia
      structure map.group.rule.target.context type:
        value: variable
      structure map.group.rule.target.element:
        value: moodCode
      structure map.group.rule.target.transform:
        value: copy
      structure map.group.rule.target.parameter:
        index: 0
    structure map.group.rule.rule:
      index: 0
      structure map.group.rule.name:
        value: section.entry
      structure map.group.rule.source:
        index: 0
      structure map.group.rule.rule:
        index: 0
    structure map.group.rule.rule:
      index: 1
      structure map.group.rule.name:
        value: templateId
      structure map.group.rule.source:
        index: 0
      structure map.group.rule.target:
        index: 0
      structure map.group.rule.target:
        index: 1
    structure map.group.rule.rule:
      index: 2
      structure map.group.rule.name:
        value: value
      structure map.group.rule.source:
        index: 0
      structure map.group.rule.target:
        index: 0
      structure map.group.rule.target:
        index: 1
      structure map.group.rule.target:
        index: 2
      structure map.group.rule.rule:
        index: 0
      structure map.group.rule.rule:
        index: 1
      structure map.group.rule.rule:
        index: 2
      structure map.group.rule.rule:
        index: 3

value: DRIV

value: OBS

value: EVN

value: section

value: entry

value: entry

value: narrativeLink

index: 0
structure map.group.rule.source.context:
  value: entry
structure map.group.rule.source.element:
  value: extension
structure map.group.rule.source.variable:
  value: extension
structure map.group.rule.source.condition:
  value: $this.url = 'http://hl7.org/fhir/StructureDefinition/narrativeLink'

index: 0
structure map.group.rule.name:
  value: reference
structure map.group.rule.source:
  index: 0
  structure map.group.rule.source.context:
    value: extension
  structure map.group.rule.source.element:
    value: valueUrl
  structure map.group.rule.source.variable:
    value: valueUrl
structure map.group.rule.target:
  index: 0
  structure map.group.rule.target.context:
    value: observationMedia
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: ID
  structure map.group.rule.target.transform:
    value: copy
  structure map.group.rule.target.parameter:
    index: 0
    structure map.group.rule.target.parameter.value id:
      value: valueUrl

value: binary

value: observationMedia

value: variable

value: templateId

value: templateId

value: templateId

value: variable

value: root

value: copy

index: 0
structure map.group.rule.target.parameter.value string:
  value: 2.16.756.5.30.1.1.10.4.83

value: binary

value: observationMedia

value: variable

value: value

value: value

value: value

value: variable

value: mediaType

value: copy

index: 0
structure map.group.rule.target.parameter.value string:
  value: 2.16.756.5.30.1.1.10.4.83

value: value

value: variable

value: representation

value: copy

index: 0
structure map.group.rule.target.parameter.value string:
  value: B64

value: contentType

index: 0
structure map.group.rule.source.context:
  value: binary
structure map.group.rule.source.element:
  value: contentType
structure map.group.rule.source.variable:
  value: contentType

index: 0
structure map.group.rule.target.context:
  value: value
structure map.group.rule.target.context type:
  value: variable
structure map.group.rule.target.element:
  value: mediaType
structure map.group.rule.target.transform:
  value: copy
structure map.group.rule.target.parameter:
  index: 0
  structure map.group.rule.target.parameter.value id:
    value: contentType

value: data

index: 0
structure map.group.rule.source.context:
  value: binary
structure map.group.rule.source.element:
  value: data
structure map.group.rule.source.variable:
  value: data

index: 0
structure map.group.rule.target.context:
  value: value
structure map.group.rule.target.context type:
  value: variable
structure map.group.rule.target.element:
  value: data
structure map.group.rule.target.transform:
  value: copy
structure map.group.rule.target.parameter:
  index: 0
  structure map.group.rule.target.parameter.value id:
    value: data

value: lang

index: 0
structure map.group.rule.source.context:
  value: binary
structure map.group.rule.source.element:
  value: language
structure map.group.rule.source.variable:
  value: lang

index: 0
structure map.group.rule.target.context:
  value: observationMedia
structure map.group.rule.target.context type:
  value: variable
structure map.group.rule.target.element:
  value: languageCode
structure map.group.rule.target.variable:
  value: languageCode

index: 1
structure map.group.rule.target.context:
  value: languageCode
structure map.group.rule.target.context type:
  value: variable
structure map.group.rule.target.element:
  value: code
structure map.group.rule.target.transform:
  value: copy
structure map.group.rule.target.parameter:
  index: 0
  structure map.group.rule.target.parameter.value id:
    value: lang

value: langUnknown

index: 0
structure map.group.rule.source.context:
  value: binary
structure map.group.rule.source.condition:
  value: $this.language.exists() = false

index: 0
structure map.group.rule.target.context:
  value: observationMedia
structure map.group.rule.target.context type:
  value: variable
structure map.group.rule.target.element:
  value: languageCode
structure map.group.rule.target.variable:
  value: languageCode

index: 1
structure map.group.rule.target.context:
  value: languageCode
structure map.group.rule.target.context type:
  value: variable
structure map.group.rule.target.element:
  value: nullFlavor
structure map.group.rule.target.transform:
  value: copy
structure map.group.rule.target.parameter:
  index: 0
  structure map.group.rule.target.parameter.value string:
    value: UNK

index: 4
structure map.group.name:
  value: SectionCdaOriginalRepresentation
structure map.group.extends:
  value: SectionCdaSection
structure map.group.type mode:
  value: none
structure map.group.documentation:
  value: source: http://build.fhir.org/ig/hl7ch/ch-core/branches/master/StructureDefinition-ch-core-composition-definitions.html#Composition.section target: https://art-decor.org/art-decor/decor-templates--hl7chcda-?id=2.16.756.5.30.1.1.10.1.14 target: https://art-decor.org/art-decor/decor-templates--hl7chcda-?id=2.16.756.5.30.1.1.10.4.83
structure map.group.input:
  index: 0
  structure map.group.input.name:
    value: bundle
  structure map.group.input.type:
    value: Bundle
  structure map.group.input.mode:
    value: source
structure map.group.input:
  index: 1
  structure map.group.input.name:
    value: section
  structure map.group.input.type:
    value: Section
  structure map.group.input.mode:
    value: source
structure map.group.input:
  index: 2
  structure map.group.input.name:
    value: cdasection
  structure map.group.input.type:
    value: CdaSection
  structure map.group.input.mode:
    value: target
structure map.group.rule:
  index: 0
  structure map.group.rule.name:
    value: templateId
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: section
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: cdasection
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: templateId
    structure map.group.rule.target.variable:
      value: templateId
  structure map.group.rule.target:
    index: 1
    structure map.group.rule.target.context:
      value: templateId
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: root
    structure map.group.rule.target.transform:
      value: copy
    structure map.group.rule.target.parameter:
      index: 0
      structure map.group.rule.target.parameter.value string:
        value: 2.16.756.5.30.1.1.10.3.45
structure map.group.rule:
  index: 1
  structure map.group.rule.name:
    value: patient
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: bundle
    structure map.group.rule.source.element:
      value: entry
    structure map.group.rule.source.variable:
      value: entry
  structure map.group.rule.rule:
    index: 0
    structure map.group.rule.name:
      value: fullUrlAsUuid
    structure map.group.rule.source:
      index: 0
      structure map.group.rule.source.context:
        value: entry
      structure map.group.rule.source.element:
        value: fullUrl
      structure map.group.rule.source.condition:
        value: ($this in %section.entry.reference) and $this.startsWith('urn:uuid')
    structure map.group.rule.rule:
      index: 0
      structure map.group.rule.name:
        value: patient
      structure map.group.rule.source:
        index: 0
      structure map.group.rule.dependent:
        index: 0
  structure map.group.rule.rule:
    index: 1
    structure map.group.rule.name:
      value: patient
    structure map.group.rule.source:
      index: 0
      structure map.group.rule.source.context:
        value: entry
      structure map.group.rule.source.element:
        value: resource
      structure map.group.rule.source.variable:
        value: binary
      structure map.group.rule.source.condition:
        value: ('Binary' + '/' + $this.id) in %section.entry.reference
    structure map.group.rule.dependent:
      index: 0
      structure map.group.rule.dependent.name:
        value: SectionCdaOriginalRepresentationObservationMedia
      structure map.group.rule.dependent.variable:
        value: binary
        index: 0
      structure map.group.rule.dependent.variable:
        value: section
        index: 1
      structure map.group.rule.dependent.variable:
        value: cdasection
        index: 2

value: entry

value: resource

value: binary

value: SectionCdaOriginalRepresentationObservationMedia

value: binary
index: 0

value: section
index: 1

value: cdasection
index: 2

index: 5
structure map.group.name:
  value: PersonAssignedEntityWithId
structure map.group.type mode:
  value: none
structure map.group.documentation:
  value: _________________________ Entry Level Templates ________________________ _________________________ Header Level Templates _________________________ source: http://build.fhir.org/ig/hl7ch/ch-core/branches/master/StructureDefinition-ch-core-composition-epr.html target: https://art-decor.org/art-decor/decor-templates--hl7chcda-?id=2.16.756.5.30.1.1.10.9.12
structure map.group.input:
  index: 0
  structure map.group.input.name:
    value: person
  structure map.group.input.type:
    value: Person
  structure map.group.input.mode:
    value: source
structure map.group.input:
  index: 1
  structure map.group.input.name:
    value: assignedEntity
  structure map.group.input.type:
    value: AssignedEntity
  structure map.group.input.mode:
    value: target
structure map.group.rule:
  index: 0
  structure map.group.rule.name:
    value: identifier
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: person
    structure map.group.rule.source.element:
      value: identifier
    structure map.group.rule.source.variable:
      value: identifier
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: assignedEntity
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: id
    structure map.group.rule.target.variable:
      value: id
  structure map.group.rule.dependent:
    index: 0
    structure map.group.rule.dependent.name:
      value: IdentifierII
    structure map.group.rule.dependent.variable:
      value: identifier
      index: 0
    structure map.group.rule.dependent.variable:
      value: id
      index: 1
structure map.group.rule:
  index: 1
  structure map.group.rule.name:
    value: address
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: person
    structure map.group.rule.source.element:
      value: address
    structure map.group.rule.source.variable:
      value: address
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: assignedEntity
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: addr
    structure map.group.rule.target.variable:
      value: addr
  structure map.group.rule.dependent:
    index: 0
    structure map.group.rule.dependent.name:
      value: AddressAD
    structure map.group.rule.dependent.variable:
      value: address
      index: 0
    structure map.group.rule.dependent.variable:
      value: addr
      index: 1
structure map.group.rule:
  index: 2
  structure map.group.rule.name:
    value: name
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: person
    structure map.group.rule.source.element:
      value: name
    structure map.group.rule.source.variable:
      value: humanname
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: assignedEntity
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: assignedPerson
    structure map.group.rule.target.variable:
      value: assignedPerson
  structure map.group.rule.target:
    index: 1
    structure map.group.rule.target.context:
      value: assignedPerson
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: name
    structure map.group.rule.target.variable:
      value: en
  structure map.group.rule.dependent:
    index: 0
    structure map.group.rule.dependent.name:
      value: HumanNameEN
    structure map.group.rule.dependent.variable:
      value: humanname
      index: 0
    structure map.group.rule.dependent.variable:
      value: en
      index: 1

index: 6
structure map.group.name:
  value: CompositionClinicalDocumentCH
structure map.group.type mode:
  value: none
structure map.group.documentation:
  value: _________________________ Template Type not specified ___________________ source: http://hl7.org/fhir/R4/person.html target: https://art-decor.org/art-decor/decor-templates--hl7chcda-?id=2.16.756.5.30.1.1.10.9.36
structure map.group.input:
  index: 0
  structure map.group.input.name:
    value: bundle
  structure map.group.input.type:
    value: Bundle
  structure map.group.input.mode:
    value: source
structure map.group.input:
  index: 1
  structure map.group.input.name:
    value: composition
  structure map.group.input.type:
    value: Composition
  structure map.group.input.mode:
    value: source
structure map.group.input:
  index: 2
  structure map.group.input.name:
    value: cda
  structure map.group.input.type:
    value: ClinicalDocument
  structure map.group.input.mode:
    value: target
structure map.group.rule:
  index: 0
  structure map.group.rule.name:
    value: type
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: composition
    structure map.group.rule.source.element:
      value: type
    structure map.group.rule.source.variable:
      value: type
  structure map.group.rule.rule:
    index: 0
    structure map.group.rule.name:
      value: translation
    structure map.group.rule.source:
      index: 0
      structure map.group.rule.source.context:
        value: type
      structure map.group.rule.source.element:
        value: coding
      structure map.group.rule.source.variable:
        value: coding
      structure map.group.rule.source.condition:
        value: $this.system = 'http://snomed.info/sct'
    structure map.group.rule.target:
      index: 0
      structure map.group.rule.target.context:
        value: cda
      structure map.group.rule.target.context type:
        value: variable
      structure map.group.rule.target.element:
        value: code
      structure map.group.rule.target.variable:
        value: code
    structure map.group.rule.target:
      index: 1
      structure map.group.rule.target.context:
        value: code
      structure map.group.rule.target.context type:
        value: variable
      structure map.group.rule.target.element:
        value: translation
      structure map.group.rule.target.variable:
        value: translation
    structure map.group.rule.dependent:
      index: 0
      structure map.group.rule.dependent.name:
        value: CodingCE
      structure map.group.rule.dependent.variable:
        value: coding
        index: 0
      structure map.group.rule.dependent.variable:
        value: translation
        index: 1
structure map.group.rule:
  index: 1
  structure map.group.rule.name:
    value: confidentialityCode
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: composition
    structure map.group.rule.source.element:
      value: confidentiality
    structure map.group.rule.source.variable:
      value: conf
    structure map.group.rule.source.condition:
      value: $this.extension.where(url = 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-ext-epr-confidentialitycode').exists()
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: cda
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: confidentialityCode
    structure map.group.rule.target.variable:
      value: cdaconf
  structure map.group.rule.rule:
    index: 0
    structure map.group.rule.name:
      value: extension
    structure map.group.rule.source:
      index: 0
      structure map.group.rule.source.context:
        value: conf
      structure map.group.rule.source.element:
        value: extension
      structure map.group.rule.source.variable:
        value: extension
    structure map.group.rule.rule:
      index: 0
      structure map.group.rule.name:
        value: valueCodeableConcept
      structure map.group.rule.source:
        index: 0
      structure map.group.rule.rule:
        index: 0
structure map.group.rule:
  index: 2
  structure map.group.rule.name:
    value: setIdMapped
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: composition
    structure map.group.rule.source.element:
      value: extension
    structure map.group.rule.source.variable:
      value: ext
    structure map.group.rule.source.condition:
      value: $this.url = 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-ext-epr-setid'
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: cda
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: setId
    structure map.group.rule.target.variable:
      value: setId
  structure map.group.rule.rule:
    index: 0
    structure map.group.rule.name:
      value: IdentifierII
    structure map.group.rule.source:
      index: 0
      structure map.group.rule.source.context:
        value: ext
      structure map.group.rule.source.element:
        value: valueIdentifier
      structure map.group.rule.source.variable:
        value: valueIdentifier
    structure map.group.rule.dependent:
      index: 0
      structure map.group.rule.dependent.name:
        value: IdentifierII
      structure map.group.rule.dependent.variable:
        value: valueIdentifier
        index: 0
      structure map.group.rule.dependent.variable:
        value: setId
        index: 1
  structure map.group.rule.documentation:
    value: If setId exists as Composition.ch-ext-epr-setid, then map to ClinicalDocument.setId
structure map.group.rule:
  index: 3
  structure map.group.rule.name:
    value: setIdCreated
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: composition
    structure map.group.rule.source.variable:
      value: composition
    structure map.group.rule.source.condition:
      value: $this.extension.where(url = 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-ext-epr-setid').exists() = false
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: cda
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: setId
    structure map.group.rule.target.variable:
      value: setId

value: extension

value: valueCodeableConcept

value: valueCodeableConcept

value: coding

index: 0
structure map.group.rule.source.context:
  value: valueCodeableConcept
structure map.group.rule.source.element:
  value: coding
structure map.group.rule.source.variable:
  value: coding

index: 0
structure map.group.rule.dependent.name:
  value: CodingCE
structure map.group.rule.dependent.variable:
  value: coding
  index: 0
structure map.group.rule.dependent.variable:
  value: cdaconf
  index: 1

index: 0
structure map.group.rule.name:
  value: upper
structure map.group.rule.source:
  index: 0
  structure map.group.rule.source.context:
    value: composition
structure map.group.rule.target:
  index: 0
  structure map.group.rule.target.variable:
    value: uuid
  structure map.group.rule.target.transform:
    value: uuid
structure map.group.rule.target:
  index: 1
  structure map.group.rule.target.context:
    value: setId
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: root
  structure map.group.rule.target.transform:
    value: evaluate
  structure map.group.rule.target.parameter:
    index: 0
    structure map.group.rule.target.parameter.value string:
      value: %uuid.upper()

value: If setId doesn't exist, create ClinicalDocument.setId as UUID upper case

index: 4
structure map.group.rule.name:
  value: versionNumberMapped
structure map.group.rule.source:
  index: 0
  structure map.group.rule.source.context:
    value: composition
  structure map.group.rule.source.element:
    value: extension
  structure map.group.rule.source.variable:
    value: ext
  structure map.group.rule.source.condition:
    value: $this.url = 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-ext-epr-versionnumber'
structure map.group.rule.target:
  index: 0
  structure map.group.rule.target.context:
    value: cda
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: versionNumber
  structure map.group.rule.target.variable:
    value: versionNumber
structure map.group.rule.rule:
  index: 0
  structure map.group.rule.name:
    value: IntegerInt
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: ext
    structure map.group.rule.source.element:
      value: valueUnsignedInt
    structure map.group.rule.source.variable:
      value: valueUnsignedInt
  structure map.group.rule.dependent:
    index: 0
    structure map.group.rule.dependent.name:
      value: IntegerINT
    structure map.group.rule.dependent.variable:
      value: valueUnsignedInt
      index: 0
    structure map.group.rule.dependent.variable:
      value: versionNumber
      index: 1
structure map.group.rule.documentation:
  value: If versionNumber exists as Composition.ch-ext-epr-versionnumber, then map to ClinicalDocument.versionNumber

index: 5
structure map.group.rule.name:
  value: versionNumberCreated
structure map.group.rule.source:
  index: 0
  structure map.group.rule.source.context:
    value: composition
  structure map.group.rule.source.variable:
    value: composition
  structure map.group.rule.source.condition:
    value: $this.extension.where(url = 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-ext-epr-versionnumber').exists() = false
structure map.group.rule.target:
  index: 0
  structure map.group.rule.target.context:
    value: cda
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: versionNumber
  structure map.group.rule.target.variable:
    value: versionNumber
structure map.group.rule.rule:
  index: 0
  structure map.group.rule.name:
    value: versionNumber
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: composition
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: versionNumber
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: value
    structure map.group.rule.target.transform:
      value: copy
    structure map.group.rule.target.parameter:
      index: 0
      structure map.group.rule.target.parameter.value string:
        value: 1
structure map.group.rule.documentation:
  value: If versionNumber doesn't exist, create ClinicalDocument.versionNumber = 1

index: 6
structure map.group.rule.name:
  value: informationRecipient
structure map.group.rule.source:
  index: 0
  structure map.group.rule.source.context:
    value: composition
  structure map.group.rule.source.element:
    value: extension
  structure map.group.rule.source.variable:
    value: extension
  structure map.group.rule.source.condition:
    value: $this.url = 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-ext-epr-informationrecipient'
structure map.group.rule.target:
  index: 0
  structure map.group.rule.target.context:
    value: cda
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: informationRecipient
  structure map.group.rule.target.variable:
    value: informationRecipient
structure map.group.rule.rule:
  index: 0
  structure map.group.rule.name:
    value: PRCP
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: extension
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: informationRecipient
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: typeCode
    structure map.group.rule.target.transform:
      value: copy
    structure map.group.rule.target.parameter:
      index: 0
      structure map.group.rule.target.parameter.value string:
        value: PRCP
structure map.group.rule.rule:
  index: 1
  structure map.group.rule.name:
    value: templateId
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: extension
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: informationRecipient
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: templateId
    structure map.group.rule.target.variable:
      value: templateId
  structure map.group.rule.target:
    index: 1
    structure map.group.rule.target.context:
      value: templateId
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: root
    structure map.group.rule.target.transform:
      value: copy
    structure map.group.rule.target.parameter:
      index: 0
      structure map.group.rule.target.parameter.value string:
        value: 2.16.756.5.30.1.1.10.2.4
structure map.group.rule.rule:
  index: 2
  structure map.group.rule.name:
    value: valueReference
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: extension
    structure map.group.rule.source.element:
      value: valueReference
    structure map.group.rule.source.variable:
      value: valueReference
  structure map.group.rule.rule:
    index: 0
    structure map.group.rule.name:
      value: patient
    structure map.group.rule.source:
      index: 0
      structure map.group.rule.source.context:
        value: bundle
      structure map.group.rule.source.element:
        value: entry
      structure map.group.rule.source.variable:
        value: entry
    structure map.group.rule.rule:
      index: 0
      structure map.group.rule.name:
        value: intendedRecipient
      structure map.group.rule.source:
        index: 0
      structure map.group.rule.target:
        index: 0
      structure map.group.rule.rule:
        index: 0
      structure map.group.rule.rule:
        index: 1
    structure map.group.rule.rule:
      index: 1
      structure map.group.rule.name:
        value: organization
      structure map.group.rule.source:
        index: 0
      structure map.group.rule.target:
        index: 0
      structure map.group.rule.target:
        index: 1
      structure map.group.rule.dependent:
        index: 0

value: entry

value: resource

value: patient

value: (($this.id = %valueReference.reference.substring(8)) or ($this.id = %valueReference.reference.substring(9)))

value: informationRecipient

value: variable

value: intendedRecipient

value: intendedRecipient

value: address

index: 0
structure map.group.rule.source.context:
  value: patient
structure map.group.rule.source.element:
  value: address
structure map.group.rule.source.variable:
  value: address

index: 0
structure map.group.rule.target.context:
  value: intendedRecipient
structure map.group.rule.target.context type:
  value: variable
structure map.group.rule.target.element:
  value: addr
structure map.group.rule.target.variable:
  value: addr

index: 0
structure map.group.rule.dependent.name:
  value: AddressAD
structure map.group.rule.dependent.variable:
  value: address
  index: 0
structure map.group.rule.dependent.variable:
  value: addr
  index: 1

value: name

index: 0
structure map.group.rule.source.context:
  value: patient
structure map.group.rule.source.element:
  value: name
structure map.group.rule.source.variable:
  value: humanname

index: 0
structure map.group.rule.target.context:
  value: intendedRecipient
structure map.group.rule.target.context type:
  value: variable
structure map.group.rule.target.element:
  value: informationRecipient
structure map.group.rule.target.variable:
  value: informationRecipient2

index: 1
structure map.group.rule.target.context:
  value: informationRecipient2
structure map.group.rule.target.context type:
  value: variable
structure map.group.rule.target.element:
  value: name
structure map.group.rule.target.variable:
  value: en

index: 0
structure map.group.rule.dependent.name:
  value: HumanNameEN
structure map.group.rule.dependent.variable:
  value: humanname
  index: 0
structure map.group.rule.dependent.variable:
  value: en
  index: 1

value: entry

value: resource

value: organization

value: (($this.id = %valueReference.reference.substring(13)) or ($this.id = %valueReference.reference.substring(9)))

value: informationRecipient

value: variable

value: intendedRecipient

value: intendedRecipient

value: intendedRecipient

value: variable

value: receivedOrganization

value: receivedOrganization

value: Organization2CdaOrganization

value: organization
index: 0

value: receivedOrganization
index: 1

index: 7
structure map.group.rule.name:
  value: dataEnterer
structure map.group.rule.source:
  index: 0
  structure map.group.rule.source.context:
    value: composition
  structure map.group.rule.source.element:
    value: extension
  structure map.group.rule.source.variable:
    value: extension
  structure map.group.rule.source.condition:
    value: $this.url = 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-ext-epr-dataenterer'
structure map.group.rule.target:
  index: 0
  structure map.group.rule.target.context:
    value: cda
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: dataEnterer
  structure map.group.rule.target.variable:
    value: dataEnterer
structure map.group.rule.rule:
  index: 0
  structure map.group.rule.name:
    value: templateId
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: extension
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: dataEnterer
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: templateId
    structure map.group.rule.target.variable:
      value: templateId
  structure map.group.rule.target:
    index: 1
    structure map.group.rule.target.context:
      value: templateId
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: root
    structure map.group.rule.target.transform:
      value: copy
    structure map.group.rule.target.parameter:
      index: 0
      structure map.group.rule.target.parameter.value string:
        value: 2.16.756.5.30.1.1.10.2.7
structure map.group.rule.rule:
  index: 1
  structure map.group.rule.name:
    value: extensionTime
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: extension
    structure map.group.rule.source.element:
      value: extension
    structure map.group.rule.source.variable:
      value: extensionTime
    structure map.group.rule.source.condition:
      value: $this.url = 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-ext-epr-time'
  structure map.group.rule.rule:
    index: 0
    structure map.group.rule.name:
      value: DateTime
    structure map.group.rule.source:
      index: 0
      structure map.group.rule.source.context:
        value: extensionTime
      structure map.group.rule.source.element:
        value: valueDateTime
      structure map.group.rule.source.variable:
        value: valueDateTime
    structure map.group.rule.target:
      index: 0
      structure map.group.rule.target.context:
        value: dataEnterer
      structure map.group.rule.target.context type:
        value: variable
      structure map.group.rule.target.element:
        value: time
      structure map.group.rule.target.variable:
        value: time
    structure map.group.rule.dependent:
      index: 0
      structure map.group.rule.dependent.name:
        value: DateTimeTS
      structure map.group.rule.dependent.variable:
        value: valueDateTime
        index: 0
      structure map.group.rule.dependent.variable:
        value: time
        index: 1
structure map.group.rule.rule:
  index: 2
  structure map.group.rule.name:
    value: extensionPerson
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: extension
    structure map.group.rule.source.element:
      value: extension
    structure map.group.rule.source.variable:
      value: extensionPerson
    structure map.group.rule.source.condition:
      value: $this.url = 'enterer'
  structure map.group.rule.rule:
    index: 0
    structure map.group.rule.name:
      value: valueReference
    structure map.group.rule.source:
      index: 0
      structure map.group.rule.source.context:
        value: extensionPerson
      structure map.group.rule.source.element:
        value: valueReference
      structure map.group.rule.source.variable:
        value: valueReference
    structure map.group.rule.rule:
      index: 0
      structure map.group.rule.name:
        value: person
      structure map.group.rule.source:
        index: 0
      structure map.group.rule.rule:
        index: 0

value: bundle

value: entry

value: entry

value: AssignedEntityWithId

index: 0
structure map.group.rule.source.context:
  value: entry
structure map.group.rule.source.element:
  value: resource
structure map.group.rule.source.variable:
  value: person
structure map.group.rule.source.condition:
  value: (($this.id = %valueReference.reference.substring(7)) or ($this.id = %valueReference.reference.substring(9)))

index: 0
structure map.group.rule.target.context:
  value: dataEnterer
structure map.group.rule.target.context type:
  value: variable
structure map.group.rule.target.element:
  value: assignedEntity
structure map.group.rule.target.variable:
  value: assignedEntity

index: 0
structure map.group.rule.dependent.name:
  value: PersonAssignedEntityWithId
structure map.group.rule.dependent.variable:
  value: person
  index: 0
structure map.group.rule.dependent.variable:
  value: assignedEntity
  index: 1

value: Person/ or urn:uuid:

index: 8
structure map.group.rule.name:
  value: SectionCdaOriginalRepresentation
structure map.group.rule.source:
  index: 0
  structure map.group.rule.source.context:
    value: composition
  structure map.group.rule.source.element:
    value: section
  structure map.group.rule.source.variable:
    value: section
  structure map.group.rule.source.condition:
    value: $this.code.coding.where((system = 'http://loinc.org') and (code = '55108-5'))
structure map.group.rule.target:
  index: 0
  structure map.group.rule.target.context:
    value: cda
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: component
  structure map.group.rule.target.variable:
    value: component
structure map.group.rule.rule:
  index: 0
  structure map.group.rule.name:
    value: contextConductionInd
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: section
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: component
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: contextConductionInd
    structure map.group.rule.target.transform:
      value: copy
    structure map.group.rule.target.parameter:
      index: 0
      structure map.group.rule.target.parameter.value boolean:
        value: true
structure map.group.rule.rule:
  index: 1
  structure map.group.rule.name:
    value: cdasection
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: section
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: component
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: structuredBody
    structure map.group.rule.target.variable:
      value: structuredBody
  structure map.group.rule.target:
    index: 1
    structure map.group.rule.target.context:
      value: structuredBody
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: component
    structure map.group.rule.target.variable:
      value: component
  structure map.group.rule.target:
    index: 2
    structure map.group.rule.target.context:
      value: component
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: section
    structure map.group.rule.target.variable:
      value: cdasection
  structure map.group.rule.dependent:
    index: 0
    structure map.group.rule.dependent.name:
      value: SectionCdaOriginalRepresentation
    structure map.group.rule.dependent.variable:
      value: bundle
      index: 0
    structure map.group.rule.dependent.variable:
      value: section
      index: 1
    structure map.group.rule.dependent.variable:
      value: cdasection
      index: 2

index: 9
structure map.group.rule.name:
  value: SectionRemarksCoded
structure map.group.rule.source:
  index: 0
  structure map.group.rule.source.context:
    value: composition
  structure map.group.rule.source.element:
    value: section
  structure map.group.rule.source.variable:
    value: section
  structure map.group.rule.source.condition:
    value: $this.code.coding.where((system = 'http://loinc.org') and (code = '48767-8'))
structure map.group.rule.target:
  index: 0
  structure map.group.rule.target.context:
    value: cda
  structure map.group.rule.target.context type:
    value: variable
  structure map.group.rule.target.element:
    value: component
  structure map.group.rule.target.variable:
    value: component
structure map.group.rule.rule:
  index: 0
  structure map.group.rule.name:
    value: contextConductionInd
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: section
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: component
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: contextConductionInd
    structure map.group.rule.target.transform:
      value: copy
    structure map.group.rule.target.parameter:
      index: 0
      structure map.group.rule.target.parameter.value boolean:
        value: true
structure map.group.rule.rule:
  index: 1
  structure map.group.rule.name:
    value: cdasection
  structure map.group.rule.source:
    index: 0
    structure map.group.rule.source.context:
      value: section
  structure map.group.rule.target:
    index: 0
    structure map.group.rule.target.context:
      value: component
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: structuredBody
    structure map.group.rule.target.variable:
      value: structuredBody
  structure map.group.rule.target:
    index: 1
    structure map.group.rule.target.context:
      value: structuredBody
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: component
    structure map.group.rule.target.variable:
      value: component
  structure map.group.rule.target:
    index: 2
    structure map.group.rule.target.context:
      value: component
    structure map.group.rule.target.context type:
      value: variable
    structure map.group.rule.target.element:
      value: section
    structure map.group.rule.target.variable:
      value: cdasection
  structure map.group.rule.dependent:
    index: 0
    structure map.group.rule.dependent.name:
      value: SectionCdaRemarksCoded
    structure map.group.rule.dependent.variable:
      value: bundle
      index: 0
    structure map.group.rule.dependent.variable:
      value: section
      index: 1
    structure map.group.rule.dependent.variable:
      value: cdasection
      index: 2