CDA-FHIR-Maps (R4)
0.3.0 - DSTU 1

This page is part of the CDA-FHIR-Maps (R4) (v0.3.0: DSTU 1) based on FHIR R4. . For a full list of available versions, see the Directory of published versions

: CDA-CH-EMED Medication Dispense document to Bundle - TTL Representation

Raw ttl | Download


@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

 a fhir:StructureMap;
  fhir:nodeRole fhir:treeRoot;
  fhir:Resource.id [ fhir:value "CdaChEmedMedicationDispenseDocumentToBundle"];
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ];
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n         <pre>map &quot;http://fhir.ch/ig/cda-fhir-maps/StructureMap/CdaChEmedMedicationDispenseDocumentToBundle&quot; = &quot;CdaChEmedMedicationDispenseDocumentToBundle&quot;\n\n// Medication Dispense document, 2.16.756.5.30.1.1.10.1.5\n// 2020-02-11 Oliver Egger, Michaela Ziegler, copyright ahdis ag, Apache License\n// CDA-CH-EMED:  https://art-decor.org/art-decor/decor-project--cdachemed-\n// FHIR CH-EMED: http://fhir.ch/ig/ch-emed/index.html\n\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument&quot; alias ClinicalDocument as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor&quot; alias AssignedAuthor as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity&quot; alias AssignedEntity as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/Author&quot; alias Author as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization&quot; alias CustodianOrganization as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/IVL_TS&quot; alias IVL_TS as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/EIVL_TS&quot; alias EIVL_TS as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/Observation&quot; alias Observation as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/PatientRole&quot; alias PatientRole as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/RecordTarget&quot; alias RecordTarget as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/Section&quot; alias Section as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/SubstanceAdministration&quot; alias SubstanceAdministration as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/Supply&quot; alias Supply as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/SXPR_TS&quot; alias SXPR_TS as source\nuses &quot;http://hl7.org/fhir/StructureDefinition/Bundle&quot; alias Bundle as target\nuses &quot;http://hl7.org/fhir/StructureDefinition/Composition&quot; alias Composition as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Patient&quot; alias Patient as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Practitioner&quot; alias Practitioner as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Organization&quot; alias Organization as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/MedicationDispense&quot; alias MedicationDispense as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Dosage&quot; alias Dosage as produced\n\nimports &quot;http://fhir.ch/ig/cda-fhir-maps/StructureMap/CdaToFhirTypes&quot;\nimports &quot;http://fhir.ch/ig/cda-fhir-maps/StructureMap/CdaToBundle&quot;\nimports &quot;http://fhir.ch/ig/cda-fhir-maps/StructureMap/CdaChToBundle&quot;\nimports &quot;http://fhir.ch/ig/cda-fhir-maps/StructureMap/CdaChEmedToBundle&quot;\n\n// source: https://art-decor.org/art-decor/decor-templates--cdachemed-?section=templates&amp;id=2.16.756.5.30.1.1.10.1.5\n// target: http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-composition-medicationdispense.html\ngroup CdaChEmedMedicationDispenseDocumentToBundle(source cda : ClinicalDocument, target bundle : Bundle) {\n  cda -&gt;  bundle.entry as e,  e.resource = create('Composition') as composition,  composition.id = uuid() as uuid,  e.fullUrl = append('urn:uuid:', uuid),  bundle.entry as e2,  e2.resource = create('Patient') as patient,  patient.id = uuid() as uuid2,  e2.fullUrl = append('urn:uuid:', uuid2) then ClinicalDocumentChEmedMedicationDispenseDocumentToBundle(cda, patient, composition, bundle) &quot;ClinicalDocumentToBody&quot;;\n}\n\n// source: https://art-decor.org/art-decor/decor-templates--cdachemed-?section=templates&amp;id=2.16.756.5.30.1.1.10.1.5\n// target: http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-composition-medicationdispense.html\ngroup ClinicalDocumentChEmedMedicationDispenseDocumentToBundle(source cda : ClinicalDocument, target patient : Patient, target composition : Composition, target bundle : Bundle) extends ClinicalDocumentToBundle {\n  cda then ClinicalDocumentCompositionCh(cda, composition, patient, bundle) &quot;composition&quot;;\n  cda.component as component then {\n    component.structuredBody as body then {\n      body.component as component then {\n        component.section as srcSection where (templateId.where(root = '2.16.756.5.30.1.1.10.3.11')) -&gt; composition.section as tgtSection then SectionDispenseSectionContentModule(cda, srcSection, patient, tgtSection, bundle);\n        component.section as srcSection where (templateId.where(root = '2.16.756.5.30.1.1.10.3.2')) -&gt; composition.section as tgtSection then ClinicalDocumentSection(cda, srcSection, patient, tgtSection, bundle);\n        component.section as srcSection where (templateId.where(root = '2.16.756.5.30.1.1.10.3.45')) -&gt; composition.section as tgtSection then SectionOriginalRepresentation(cda, srcSection, patient, tgtSection, bundle);\n      };\n    } &quot;body&quot;;\n  };\n}\n\n// _________________________ Section Level Templates _________________________\n// source: https://art-decor.org/art-decor/decor-templates--cdachemed-?section=templates&amp;id=2.16.756.5.30.1.1.10.3.11\n// target: http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-composition-medicationdispense.html\ngroup SectionDispenseSectionContentModule(source cda : ClinicalDocument, source src : Section, source patient : Patient, target tgt, target bundle : Bundle) extends ClinicalDocumentSection {\n  src.entry as cdaEntry where (supply.templateId.where(root = '2.16.756.5.30.1.1.10.4.42')) -&gt;  bundle.entry as e,  e.resource = create('MedicationDispense') as medicationdispense,  medicationdispense.id = uuid() as uuid,  e.fullUrl = append('urn:uuid:', uuid),  tgt.entry = create('Reference') as reference,  reference.reference = append('urn:uuid:', uuid) then {\n    cdaEntry.supply as supply then DispenseItemEntryContentModule(src, supply, patient, medicationdispense);\n  } &quot;DispenseItemEntryContentModule&quot;;\n}\n\n</pre>\n      </div>"
  ];
  fhir:StructureMap.url [ fhir:value "http://fhir.ch/ig/cda-fhir-maps/StructureMap/CdaChEmedMedicationDispenseDocumentToBundle"];
  fhir:StructureMap.version [ fhir:value "0.3.0"];
  fhir:StructureMap.name [ fhir:value "CdaChEmedMedicationDispenseDocumentToBundle"];
  fhir:StructureMap.status [ fhir:value "draft"];
  fhir:StructureMap.date [ fhir:value "2022-02-11T11:14:39+01:00"^^xsd:dateTime];
  fhir:StructureMap.publisher [ fhir:value "ahdis"];
  fhir:StructureMap.contact [
     fhir:index 0;
     fhir:ContactDetail.name [ fhir:value "ahdis" ];
     fhir:ContactDetail.telecom [
       fhir:index 0;
       fhir:ContactPoint.system [ fhir:value "url" ];
       fhir:ContactPoint.value [ fhir:value "http://www.ahdis.ch/" ]     ]
  ];
  fhir:StructureMap.description [ fhir:value "Medication Dispense document, 2.16.756.5.30.1.1.10.1.5 2020-02-11 Oliver Egger, Michaela Ziegler, copyright ahdis ag, Apache License CDA-CH-EMED:  https://art-decor.org/art-decor/decor-project--cdachemed- FHIR CH-EMED: http://fhir.ch/ig/ch-emed/index.html"];
  fhir:StructureMap.copyright [ fhir:value "CC-BY-SA-4.0"];
  fhir:StructureMap.structure [
     fhir:index 0;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument";
       fhir:link <http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument>     ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ];
     fhir:StructureMap.structure.alias [ fhir:value "ClinicalDocument" ]
  ], [
     fhir:index 1;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor";
       fhir:link <http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor>     ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ];
     fhir:StructureMap.structure.alias [ fhir:value "AssignedAuthor" ]
  ], [
     fhir:index 2;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity";
       fhir:link <http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity>     ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ];
     fhir:StructureMap.structure.alias [ fhir:value "AssignedEntity" ]
  ], [
     fhir:index 3;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/cda/StructureDefinition/Author";
       fhir:link <http://hl7.org/fhir/cda/StructureDefinition/Author>     ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ];
     fhir:StructureMap.structure.alias [ fhir:value "Author" ]
  ], [
     fhir:index 4;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization";
       fhir:link <http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization>     ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ];
     fhir:StructureMap.structure.alias [ fhir:value "CustodianOrganization" ]
  ], [
     fhir:index 5;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/cda/StructureDefinition/IVL_TS";
       fhir:link <http://hl7.org/fhir/cda/StructureDefinition/IVL_TS>     ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ];
     fhir:StructureMap.structure.alias [ fhir:value "IVL_TS" ]
  ], [
     fhir:index 6;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/cda/StructureDefinition/EIVL_TS";
       fhir:link <http://hl7.org/fhir/cda/StructureDefinition/EIVL_TS>     ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ];
     fhir:StructureMap.structure.alias [ fhir:value "EIVL_TS" ]
  ], [
     fhir:index 7;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/cda/StructureDefinition/Observation";
       fhir:link <http://hl7.org/fhir/cda/StructureDefinition/Observation>     ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ];
     fhir:StructureMap.structure.alias [ fhir:value "Observation" ]
  ], [
     fhir:index 8;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/cda/StructureDefinition/PatientRole";
       fhir:link <http://hl7.org/fhir/cda/StructureDefinition/PatientRole>     ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ];
     fhir:StructureMap.structure.alias [ fhir:value "PatientRole" ]
  ], [
     fhir:index 9;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/cda/StructureDefinition/RecordTarget";
       fhir:link <http://hl7.org/fhir/cda/StructureDefinition/RecordTarget>     ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ];
     fhir:StructureMap.structure.alias [ fhir:value "RecordTarget" ]
  ], [
     fhir:index 10;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/cda/StructureDefinition/Section";
       fhir:link <http://hl7.org/fhir/cda/StructureDefinition/Section>     ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ];
     fhir:StructureMap.structure.alias [ fhir:value "Section" ]
  ], [
     fhir:index 11;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/cda/StructureDefinition/SubstanceAdministration";
       fhir:link <http://hl7.org/fhir/cda/StructureDefinition/SubstanceAdministration>     ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ];
     fhir:StructureMap.structure.alias [ fhir:value "SubstanceAdministration" ]
  ], [
     fhir:index 12;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/cda/StructureDefinition/Supply";
       fhir:link <http://hl7.org/fhir/cda/StructureDefinition/Supply>     ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ];
     fhir:StructureMap.structure.alias [ fhir:value "Supply" ]
  ], [
     fhir:index 13;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/cda/StructureDefinition/SXPR_TS";
       fhir:link <http://hl7.org/fhir/cda/StructureDefinition/SXPR_TS>     ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ];
     fhir:StructureMap.structure.alias [ fhir:value "SXPR_TS" ]
  ], [
     fhir:index 14;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/StructureDefinition/Bundle";
       fhir:link <http://hl7.org/fhir/StructureDefinition/Bundle>     ];
     fhir:StructureMap.structure.mode [ fhir:value "target" ];
     fhir:StructureMap.structure.alias [ fhir:value "Bundle" ]
  ], [
     fhir:index 15;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/StructureDefinition/Composition";
       fhir:link <http://hl7.org/fhir/StructureDefinition/Composition>     ];
     fhir:StructureMap.structure.mode [ fhir:value "produced" ];
     fhir:StructureMap.structure.alias [ fhir:value "Composition" ]
  ], [
     fhir:index 16;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/StructureDefinition/Patient";
       fhir:link <http://hl7.org/fhir/StructureDefinition/Patient>     ];
     fhir:StructureMap.structure.mode [ fhir:value "produced" ];
     fhir:StructureMap.structure.alias [ fhir:value "Patient" ]
  ], [
     fhir:index 17;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/StructureDefinition/Practitioner";
       fhir:link <http://hl7.org/fhir/StructureDefinition/Practitioner>     ];
     fhir:StructureMap.structure.mode [ fhir:value "produced" ];
     fhir:StructureMap.structure.alias [ fhir:value "Practitioner" ]
  ], [
     fhir:index 18;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/StructureDefinition/Organization";
       fhir:link <http://hl7.org/fhir/StructureDefinition/Organization>     ];
     fhir:StructureMap.structure.mode [ fhir:value "produced" ];
     fhir:StructureMap.structure.alias [ fhir:value "Organization" ]
  ], [
     fhir:index 19;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/StructureDefinition/MedicationDispense";
       fhir:link <http://hl7.org/fhir/StructureDefinition/MedicationDispense>     ];
     fhir:StructureMap.structure.mode [ fhir:value "produced" ];
     fhir:StructureMap.structure.alias [ fhir:value "MedicationDispense" ]
  ], [
     fhir:index 20;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/StructureDefinition/Dosage";
       fhir:link <http://hl7.org/fhir/StructureDefinition/Dosage>     ];
     fhir:StructureMap.structure.mode [ fhir:value "produced" ];
     fhir:StructureMap.structure.alias [ fhir:value "Dosage" ]
  ];
  fhir:StructureMap.import [
     fhir:value "http://fhir.ch/ig/cda-fhir-maps/StructureMap/CdaToFhirTypes";
     fhir:index 0;
     fhir:link <http://fhir.ch/ig/cda-fhir-maps/StructureMap/CdaToFhirTypes>
  ], [
     fhir:value "http://fhir.ch/ig/cda-fhir-maps/StructureMap/CdaToBundle";
     fhir:index 1;
     fhir:link <http://fhir.ch/ig/cda-fhir-maps/StructureMap/CdaToBundle>
  ], [
     fhir:value "http://fhir.ch/ig/cda-fhir-maps/StructureMap/CdaChToBundle";
     fhir:index 2;
     fhir:link <http://fhir.ch/ig/cda-fhir-maps/StructureMap/CdaChToBundle>
  ], [
     fhir:value "http://fhir.ch/ig/cda-fhir-maps/StructureMap/CdaChEmedToBundle";
     fhir:index 3;
     fhir:link <http://fhir.ch/ig/cda-fhir-maps/StructureMap/CdaChEmedToBundle>
  ];
  fhir:StructureMap.group [
     fhir:index 0;
     fhir:StructureMap.group.name [ fhir:value "CdaChEmedMedicationDispenseDocumentToBundle" ];
     fhir:StructureMap.group.typeMode [ fhir:value "none" ];
     fhir:StructureMap.group.documentation [ fhir:value "source: https://art-decor.org/art-decor/decor-templates--cdachemed-?section=templates&id=2.16.756.5.30.1.1.10.1.5 target: http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-composition-medicationdispense.html" ];
     fhir:StructureMap.group.input [
       fhir:index 0;
       fhir:StructureMap.group.input.name [ fhir:value "cda" ];
       fhir:StructureMap.group.input.type [ fhir:value "ClinicalDocument" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.input.name [ fhir:value "bundle" ];
       fhir:StructureMap.group.input.type [ fhir:value "Bundle" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]     ];
     fhir:StructureMap.group.rule [
       fhir:index 0;
       fhir:StructureMap.group.rule.name [ fhir:value "ClinicalDocumentToBody" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "cda" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "e" ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "e" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "composition" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Composition" ]         ]       ], [
         fhir:index 2;
         fhir:StructureMap.group.rule.target.context [ fhir:value "composition" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "id" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "uuid" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]       ], [
         fhir:index 3;
         fhir:StructureMap.group.rule.target.context [ fhir:value "e" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "fullUrl" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "append" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]         ], [
           fhir:index 1;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "uuid" ]         ]       ], [
         fhir:index 4;
         fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "e2" ]       ], [
         fhir:index 5;
         fhir:StructureMap.group.rule.target.context [ fhir:value "e2" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "patient" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Patient" ]         ]       ], [
         fhir:index 6;
         fhir:StructureMap.group.rule.target.context [ fhir:value "patient" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "id" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "uuid2" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]       ], [
         fhir:index 7;
         fhir:StructureMap.group.rule.target.context [ fhir:value "e2" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "fullUrl" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "append" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]         ], [
           fhir:index 1;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "uuid2" ]         ]       ];
       fhir:StructureMap.group.rule.dependent [
         fhir:index 0;
         fhir:StructureMap.group.rule.dependent.name [ fhir:value "ClinicalDocumentChEmedMedicationDispenseDocumentToBundle" ];
         fhir:StructureMap.group.rule.dependent.variable [
           fhir:value "cda";
           fhir:index 0         ], [
           fhir:value "patient";
           fhir:index 1         ], [
           fhir:value "composition";
           fhir:index 2         ], [
           fhir:value "bundle";
           fhir:index 3         ]       ]     ]
  ], [
     fhir:index 1;
     fhir:StructureMap.group.name [ fhir:value "ClinicalDocumentChEmedMedicationDispenseDocumentToBundle" ];
     fhir:StructureMap.group.extends [ fhir:value "ClinicalDocumentToBundle" ];
     fhir:StructureMap.group.typeMode [ fhir:value "none" ];
     fhir:StructureMap.group.documentation [ fhir:value "source: https://art-decor.org/art-decor/decor-templates--cdachemed-?section=templates&id=2.16.756.5.30.1.1.10.1.5 target: http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-composition-medicationdispense.html" ];
     fhir:StructureMap.group.input [
       fhir:index 0;
       fhir:StructureMap.group.input.name [ fhir:value "cda" ];
       fhir:StructureMap.group.input.type [ fhir:value "ClinicalDocument" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.input.name [ fhir:value "patient" ];
       fhir:StructureMap.group.input.type [ fhir:value "Patient" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]     ], [
       fhir:index 2;
       fhir:StructureMap.group.input.name [ fhir:value "composition" ];
       fhir:StructureMap.group.input.type [ fhir:value "Composition" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]     ], [
       fhir:index 3;
       fhir:StructureMap.group.input.name [ fhir:value "bundle" ];
       fhir:StructureMap.group.input.type [ fhir:value "Bundle" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]     ];
     fhir:StructureMap.group.rule [
       fhir:index 0;
       fhir:StructureMap.group.rule.name [ fhir:value "composition" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "cda" ]       ];
       fhir:StructureMap.group.rule.dependent [
         fhir:index 0;
         fhir:StructureMap.group.rule.dependent.name [ fhir:value "ClinicalDocumentCompositionCh" ];
         fhir:StructureMap.group.rule.dependent.variable [
           fhir:value "cda";
           fhir:index 0         ], [
           fhir:value "composition";
           fhir:index 1         ], [
           fhir:value "patient";
           fhir:index 2         ], [
           fhir:value "bundle";
           fhir:index 3         ]       ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.rule.name [ fhir:value "component" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "cda" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "component" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "component" ]       ];
       fhir:StructureMap.group.rule.rule [
         fhir:index 0;
         fhir:StructureMap.group.rule.name [ fhir:value "body" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "component" ];
           fhir:StructureMap.group.rule.source.element [ fhir:value "structuredBody" ];
           fhir:StructureMap.group.rule.source.variable [ fhir:value "body" ]         ];
         fhir:StructureMap.group.rule.rule [
           fhir:index 0;
           fhir:StructureMap.group.rule.name [ fhir:value "component" ];
           fhir:StructureMap.group.rule.source [
             fhir:index 0;
             fhir:StructureMap.group.rule.source.context [ fhir:value "body" ];
             fhir:StructureMap.group.rule.source.element [ fhir:value "component" ];
             fhir:StructureMap.group.rule.source.variable [ fhir:value "component" ]           ];
           fhir:StructureMap.group.rule.rule [
             fhir:index 0;
             fhir:StructureMap.group.rule.name [ fhir:value "section" ];
             fhir:StructureMap.group.rule.source [
               fhir:index 0;
               fhir:StructureMap.group.rule.source.context [ fhir:value "component" ];
               fhir:StructureMap.group.rule.source.element [ fhir:value "section" ];
               fhir:StructureMap.group.rule.source.variable [ fhir:value "srcSection" ];
               fhir:StructureMap.group.rule.source.condition [ fhir:value "(templateId.where(root = '2.16.756.5.30.1.1.10.3.11'))" ]             ];
             fhir:StructureMap.group.rule.target [
               fhir:index 0;
               fhir:StructureMap.group.rule.target.context [ fhir:value "composition" ];
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
               fhir:StructureMap.group.rule.target.element [ fhir:value "section" ];
               fhir:StructureMap.group.rule.target.variable [ fhir:value "tgtSection" ]             ];
             fhir:StructureMap.group.rule.dependent [
               fhir:index 0;
               fhir:StructureMap.group.rule.dependent.name [ fhir:value "SectionDispenseSectionContentModule" ];
               fhir:StructureMap.group.rule.dependent.variable [
                 fhir:value "cda";
                 fhir:index 0               ], [
                 fhir:value "srcSection";
                 fhir:index 1               ], [
                 fhir:value "patient";
                 fhir:index 2               ], [
                 fhir:value "tgtSection";
                 fhir:index 3               ], [
                 fhir:value "bundle";
                 fhir:index 4               ]             ]           ], [
             fhir:index 1;
             fhir:StructureMap.group.rule.name [ fhir:value "section" ];
             fhir:StructureMap.group.rule.source [
               fhir:index 0;
               fhir:StructureMap.group.rule.source.context [ fhir:value "component" ];
               fhir:StructureMap.group.rule.source.element [ fhir:value "section" ];
               fhir:StructureMap.group.rule.source.variable [ fhir:value "srcSection" ];
               fhir:StructureMap.group.rule.source.condition [ fhir:value "(templateId.where(root = '2.16.756.5.30.1.1.10.3.2'))" ]             ];
             fhir:StructureMap.group.rule.target [
               fhir:index 0;
               fhir:StructureMap.group.rule.target.context [ fhir:value "composition" ];
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
               fhir:StructureMap.group.rule.target.element [ fhir:value "section" ];
               fhir:StructureMap.group.rule.target.variable [ fhir:value "tgtSection" ]             ];
             fhir:StructureMap.group.rule.dependent [
               fhir:index 0;
               fhir:StructureMap.group.rule.dependent.name [ fhir:value "ClinicalDocumentSection" ];
               fhir:StructureMap.group.rule.dependent.variable [
                 fhir:value "cda";
                 fhir:index 0               ], [
                 fhir:value "srcSection";
                 fhir:index 1               ], [
                 fhir:value "patient";
                 fhir:index 2               ], [
                 fhir:value "tgtSection";
                 fhir:index 3               ], [
                 fhir:value "bundle";
                 fhir:index 4               ]             ]           ], [
             fhir:index 2;
             fhir:StructureMap.group.rule.name [ fhir:value "section" ];
             fhir:StructureMap.group.rule.source [
               fhir:index 0;
               fhir:StructureMap.group.rule.source.context [ fhir:value "component" ];
               fhir:StructureMap.group.rule.source.element [ fhir:value "section" ];
               fhir:StructureMap.group.rule.source.variable [ fhir:value "srcSection" ];
               fhir:StructureMap.group.rule.source.condition [ fhir:value "(templateId.where(root = '2.16.756.5.30.1.1.10.3.45'))" ]             ];
             fhir:StructureMap.group.rule.target [
               fhir:index 0;
               fhir:StructureMap.group.rule.target.context [ fhir:value "composition" ];
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
               fhir:StructureMap.group.rule.target.element [ fhir:value "section" ];
               fhir:StructureMap.group.rule.target.variable [ fhir:value "tgtSection" ]             ];
             fhir:StructureMap.group.rule.dependent [
               fhir:index 0;
               fhir:StructureMap.group.rule.dependent.name [ fhir:value "SectionOriginalRepresentation" ];
               fhir:StructureMap.group.rule.dependent.variable [
                 fhir:value "cda";
                 fhir:index 0               ], [
                 fhir:value "srcSection";
                 fhir:index 1               ], [
                 fhir:value "patient";
                 fhir:index 2               ], [
                 fhir:value "tgtSection";
                 fhir:index 3               ], [
                 fhir:value "bundle";
                 fhir:index 4               ]             ]           ]         ]       ]     ]
  ], [
     fhir:index 2;
     fhir:StructureMap.group.name [ fhir:value "SectionDispenseSectionContentModule" ];
     fhir:StructureMap.group.extends [ fhir:value "ClinicalDocumentSection" ];
     fhir:StructureMap.group.typeMode [ fhir:value "none" ];
     fhir:StructureMap.group.documentation [ fhir:value "_________________________ Section Level Templates _________________________ source: https://art-decor.org/art-decor/decor-templates--cdachemed-?section=templates&id=2.16.756.5.30.1.1.10.3.11 target: http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-composition-medicationdispense.html" ];
     fhir:StructureMap.group.input [
       fhir:index 0;
       fhir:StructureMap.group.input.name [ fhir:value "cda" ];
       fhir:StructureMap.group.input.type [ fhir:value "ClinicalDocument" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.input.name [ fhir:value "src" ];
       fhir:StructureMap.group.input.type [ fhir:value "Section" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]     ], [
       fhir:index 2;
       fhir:StructureMap.group.input.name [ fhir:value "patient" ];
       fhir:StructureMap.group.input.type [ fhir:value "Patient" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]     ], [
       fhir:index 3;
       fhir:StructureMap.group.input.name [ fhir:value "tgt" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]     ], [
       fhir:index 4;
       fhir:StructureMap.group.input.name [ fhir:value "bundle" ];
       fhir:StructureMap.group.input.type [ fhir:value "Bundle" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]     ];
     fhir:StructureMap.group.rule [
       fhir:index 0;
       fhir:StructureMap.group.rule.name [ fhir:value "DispenseItemEntryContentModule" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "src" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "cdaEntry" ];
         fhir:StructureMap.group.rule.source.condition [ fhir:value "(supply.templateId.where(root = '2.16.756.5.30.1.1.10.4.42'))" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "e" ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "e" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "medicationdispense" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "MedicationDispense" ]         ]       ], [
         fhir:index 2;
         fhir:StructureMap.group.rule.target.context [ fhir:value "medicationdispense" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "id" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "uuid" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]       ], [
         fhir:index 3;
         fhir:StructureMap.group.rule.target.context [ fhir:value "e" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "fullUrl" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "append" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]         ], [
           fhir:index 1;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "uuid" ]         ]       ], [
         fhir:index 4;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "reference" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ]         ]       ], [
         fhir:index 5;
         fhir:StructureMap.group.rule.target.context [ fhir:value "reference" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "append" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]         ], [
           fhir:index 1;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "uuid" ]         ]       ];
       fhir:StructureMap.group.rule.rule [
         fhir:index 0;
         fhir:StructureMap.group.rule.name [ fhir:value "supply" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "cdaEntry" ];
           fhir:StructureMap.group.rule.source.element [ fhir:value "supply" ];
           fhir:StructureMap.group.rule.source.variable [ fhir:value "supply" ]         ];
         fhir:StructureMap.group.rule.dependent [
           fhir:index 0;
           fhir:StructureMap.group.rule.dependent.name [ fhir:value "DispenseItemEntryContentModule" ];
           fhir:StructureMap.group.rule.dependent.variable [
             fhir:value "src";
             fhir:index 0           ], [
             fhir:value "supply";
             fhir:index 1           ], [
             fhir:value "patient";
             fhir:index 2           ], [
             fhir:value "medicationdispense";
             fhir:index 3           ]         ]       ]     ]
  ].

# - ontology header ------------------------------------------------------------

 a owl:Ontology;
  owl:imports fhir:fhir.ttl.