{
"description": "Medication Dispense document, 2.16.756.5.30.1.1.10.1.5\\r\\n2020-01-09 Oliver Egger, copyright ahdis ag, Apache License\\r\\nCDA-CH-EMED: https://art-decor.org/art-decor/decor-project--cdachemed-\\r\\nFHIR CH-EMED: http://fhir.ch/ig/ch-emed/index.html",
"_filename": "StructureMap-BundleToCdaChEmedMedicationDispenseDocument.json",
"package_name": "ch.fhir.ig.cda-fhir-maps",
"date": "2022-02-11T11:14:39+01:00",
"group": [ {
"name": "BundleToCdaChEmedMedicationDispenseDocument",
"rule": [ {
"name": "bundle",
"source": [ {
"context": "bundle"
} ],
"target": [ {
"context": "cda",
"element": "recordTarget",
"variable": "recordTarget",
"contextType": "variable"
}, {
"context": "cda",
"element": "author",
"variable": "author",
"contextType": "variable"
} ],
"dependent": [ {
"name": "BundleToClinicalDocumentEmedMedicationDispenseDocument",
"variable": [ "bundle", "recordTarget", "author", "cda" ]
} ]
} ],
"input": [ {
"mode": "source",
"name": "bundle",
"type": "Bundle"
}, {
"mode": "target",
"name": "cda",
"type": "ClinicalDocument"
} ],
"typeMode": "none",
"documentation": "source: http://build.fhir.org/ig/hl7ch/ch-emed/StructureDefinition-ch-emed-composition-medicationdispense.html\r\ntarget: https://art-decor.org/art-decor/decor-templates--cdachemed-?section=templates&id=2.16.756.5.30.1.1.10.1.5"
}, {
"name": "CompositionClinicalDocumentChEmedMedicationDispenseDocument",
"rule": [ {
"name": "fixloinc",
"source": [ {
"context": "composition",
"element": "type"
} ],
"target": [ {
"context": "cda",
"element": "code",
"variable": "code",
"contextType": "variable"
}, {
"context": "code",
"element": "codeSystem",
"parameter": [ {
"valueString": "2.16.840.1.113883.6.1"
} ],
"transform": "copy",
"contextType": "variable"
}, {
"context": "code",
"element": "codeSystemName",
"parameter": [ {
"valueString": "LOINC"
} ],
"transform": "copy",
"contextType": "variable"
}, {
"context": "code",
"element": "code",
"parameter": [ {
"valueString": "60593-1"
} ],
"transform": "copy",
"contextType": "variable"
}, {
"context": "code",
"element": "displayName",
"parameter": [ {
"valueString": "Medication dispensed.extended"
} ],
"transform": "copy",
"contextType": "variable"
} ]
}, {
"name": "SectionDispenseSectionContentModule",
"rule": [ {
"name": "contextConductionInd",
"source": [ {
"context": "section"
} ],
"target": [ {
"context": "component",
"element": "contextConductionInd",
"parameter": [ {
"valueBoolean": true
} ],
"transform": "copy",
"contextType": "variable"
} ]
}, {
"name": "cdasection",
"source": [ {
"context": "section"
} ],
"target": [ {
"context": "component",
"element": "structuredBody",
"variable": "structuredBody",
"contextType": "variable"
}, {
"context": "structuredBody",
"element": "component",
"variable": "component",
"contextType": "variable"
}, {
"context": "component",
"element": "section",
"variable": "cdasection",
"contextType": "variable"
} ],
"dependent": [ {
"name": "SectionDispenseSectionContentModule",
"variable": [ "bundle", "section", "cdasection" ]
} ]
} ],
"source": [ {
"context": "composition",
"element": "section",
"variable": "section",
"condition": "$this.code.coding.where((system = 'http://loinc.org') and (code = '60590-7'))"
} ],
"target": [ {
"context": "cda",
"element": "component",
"variable": "component",
"contextType": "variable"
} ]
}, {
"name": "SectionRemarksCoded",
"rule": [ {
"name": "contextConductionInd",
"source": [ {
"context": "section"
} ],
"target": [ {
"context": "component",
"element": "contextConductionInd",
"parameter": [ {
"valueBoolean": true
} ],
"transform": "copy",
"contextType": "variable"
} ]
}, {
"name": "cdasection",
"source": [ {
"context": "section"
} ],
"target": [ {
"context": "component",
"element": "structuredBody",
"variable": "structuredBody",
"contextType": "variable"
}, {
"context": "structuredBody",
"element": "component",
"variable": "component",
"contextType": "variable"
}, {
"context": "component",
"element": "section",
"variable": "cdasection",
"contextType": "variable"
} ],
"dependent": [ {
"name": "SectionCdaRemarksCoded",
"variable": [ "bundle", "section", "cdasection" ]
} ]
} ],
"source": [ {
"context": "composition",
"element": "section",
"variable": "section",
"condition": "$this.code.coding.where((system = 'http://loinc.org') and (code = '48767-8'))"
} ],
"target": [ {
"context": "cda",
"element": "component",
"variable": "component",
"contextType": "variable"
} ]
}, {
"name": "SectionCdaOriginalRepresentation",
"rule": [ {
"name": "contextConductionInd",
"source": [ {
"context": "section"
} ],
"target": [ {
"context": "component",
"element": "contextConductionInd",
"parameter": [ {
"valueBoolean": true
} ],
"transform": "copy",
"contextType": "variable"
} ]
}, {
"name": "cdasection",
"source": [ {
"context": "section"
} ],
"target": [ {
"context": "component",
"element": "structuredBody",
"variable": "structuredBody",
"contextType": "variable"
}, {
"context": "structuredBody",
"element": "component",
"variable": "component",
"contextType": "variable"
}, {
"context": "component",
"element": "section",
"variable": "cdasection",
"contextType": "variable"
} ],
"dependent": [ {
"name": "SectionCdaOriginalRepresentation",
"variable": [ "bundle", "section", "cdasection" ]
} ]
} ],
"source": [ {
"context": "composition",
"element": "section",
"variable": "section",
"condition": "$this.code.coding.where((system = 'http://loinc.org') and (code = '55108-5'))"
} ],
"target": [ {
"context": "cda",
"element": "component",
"variable": "component",
"contextType": "variable"
} ]
} ],
"input": [ {
"mode": "source",
"name": "bundle",
"type": "Bundle"
}, {
"mode": "source",
"name": "composition",
"type": "Composition"
}, {
"mode": "target",
"name": "cda",
"type": "ClinicalDocument"
} ],
"typeMode": "none",
"documentation": "source: http://build.fhir.org/ig/hl7ch/ch-emed/StructureDefinition-ch-emed-composition-medicationdispense.html\r\ntarget: https://art-decor.org/art-decor/decor-templates--cdachemed-?section=templates&id=2.16.756.5.30.1.1.10.1.5"
}, {
"name": "SectionDispenseSectionContentModule",
"rule": [ {
"name": "CH-PHARM-DispenseSectionContentModule",
"source": [ {
"context": "section"
} ],
"target": [ {
"context": "cdasection",
"element": "templateId",
"variable": "templateId",
"contextType": "variable"
}, {
"context": "templateId",
"element": "root",
"parameter": [ {
"valueString": "2.16.756.5.30.1.1.10.3.11"
} ],
"transform": "copy",
"contextType": "variable"
} ]
}, {
"name": "IHE-DispenseSectionContentModule",
"source": [ {
"context": "section"
} ],
"target": [ {
"context": "cdasection",
"element": "templateId",
"variable": "templateId",
"contextType": "variable"
}, {
"context": "templateId",
"element": "root",
"parameter": [ {
"valueString": "1.3.6.1.4.1.19376.1.9.1.2.3"
} ],
"transform": "copy",
"contextType": "variable"
} ]
}, {
"name": "Section",
"source": [ {
"context": "section",
"condition": "text.exists() = false"
} ],
"target": [ {
"context": "cdasection",
"element": "text",
"parameter": [ {
"valueString": "see pdf
"
} ],
"transform": "copy",
"contextType": "variable"
} ]
}, {
"name": "entry",
"rule": [ {
"name": "fullUrlAsUuid",
"rule": [ {
"name": "MedicationDispense",
"source": [ {
"context": "entry",
"element": "resource",
"variable": "medicationDispense",
"condition": "$this.ofType(FHIR.MedicationDispense)"
} ],
"target": [ {
"context": "cdasection",
"element": "entry",
"variable": "entry",
"contextType": "variable"
}, {
"context": "entry",
"element": "supply",
"variable": "supply",
"contextType": "variable"
} ],
"dependent": [ {
"name": "DispenseItemEntryContentModule",
"variable": [ "bundle", "medicationDispense", "supply" ]
} ]
} ],
"source": [ {
"context": "entry",
"element": "fullUrl",
"condition": "($this in %section.entry.reference) and $this.startsWith('urn:uuid')"
} ]
}, {
"name": "MedicationDispense",
"source": [ {
"context": "entry",
"element": "resource",
"variable": "medicationDispense",
"condition": "$this.ofType(FHIR.MedicationDispense) and (('MedicationDispense' + '/' + $this.id) in %section.entry.reference)"
} ],
"target": [ {
"context": "cdasection",
"element": "entry",
"variable": "entry",
"contextType": "variable"
}, {
"context": "entry",
"element": "supply",
"variable": "supply",
"contextType": "variable"
} ],
"dependent": [ {
"name": "DispenseItemEntryContentModule",
"variable": [ "bundle", "medicationDispense", "supply" ]
} ]
} ],
"source": [ {
"context": "bundle",
"element": "entry",
"variable": "entry"
} ]
} ],
"input": [ {
"mode": "source",
"name": "bundle",
"type": "Bundle"
}, {
"mode": "source",
"name": "section",
"type": "Section"
}, {
"mode": "target",
"name": "cdasection",
"type": "CdaSection"
} ],
"extends": "SectionCdaSection",
"typeMode": "none",
"documentation": "_________________________ Section Level Templates _________________________\r\nsource: http://build.fhir.org/ig/hl7ch/ch-emed/StructureDefinition-ch-emed-composition-medicationdispense.html\r\ntarget: https://art-decor.org/art-decor/decor-templates--cdachemed-?section=templates&id=2.16.756.5.30.1.1.10.3.11"
}, {
"name": "BundleToClinicalDocumentEmedMedicationDispenseDocument",
"rule": [ {
"name": "ExchangeFormatAccordingToTheSwissEPR",
"source": [ {
"context": "bundle"
} ],
"target": [ {
"context": "cda",
"element": "templateId",
"variable": "templateId",
"contextType": "variable"
}, {
"context": "templateId",
"element": "root",
"parameter": [ {
"valueString": "2.16.756.5.30.1.127.1.4"
} ],
"transform": "copy",
"contextType": "variable"
} ]
}, {
"name": "IHE-PCC",
"source": [ {
"context": "bundle"
} ],
"target": [ {
"context": "cda",
"element": "templateId",
"variable": "templateId",
"contextType": "variable"
}, {
"context": "templateId",
"element": "root",
"parameter": [ {
"valueString": "1.3.6.1.4.1.19376.1.5.3.1.1.1"
} ],
"transform": "copy",
"contextType": "variable"
} ]
}, {
"name": "IHE-PharmacyDispenseDocumentContentModule",
"source": [ {
"context": "bundle"
} ],
"target": [ {
"context": "cda",
"element": "templateId",
"variable": "templateId",
"contextType": "variable"
}, {
"context": "templateId",
"element": "root",
"parameter": [ {
"valueString": "1.3.6.1.4.1.19376.1.9.1.1.3"
} ],
"transform": "copy",
"contextType": "variable"
} ]
}, {
"name": "CDA-CH-EMED-MedicationDispenseDocument",
"source": [ {
"context": "bundle"
} ],
"target": [ {
"context": "cda",
"element": "templateId",
"variable": "templateId",
"contextType": "variable"
}, {
"context": "templateId",
"element": "root",
"parameter": [ {
"valueString": "2.16.756.5.30.1.1.10.1.5"
} ],
"transform": "copy",
"contextType": "variable"
} ]
}, {
"name": "entry",
"rule": [ {
"name": "resource",
"source": [ {
"context": "entry",
"element": "resource",
"variable": "resource",
"condition": "$this.ofType(FHIR.Composition)"
} ],
"dependent": [ {
"name": "CompositionClinicalDocumentChEmedMedicationDispenseDocument",
"variable": [ "bundle", "resource", "cda" ]
} ]
} ],
"source": [ {
"context": "bundle",
"element": "entry",
"variable": "entry"
} ]
} ],
"input": [ {
"mode": "source",
"name": "bundle",
"type": "Bundle"
}, {
"mode": "target",
"name": "recordTarget",
"type": "RecordTarget"
}, {
"mode": "target",
"name": "author",
"type": "Author"
}, {
"mode": "target",
"name": "cda",
"type": "ClinicalDocument"
} ],
"extends": "BundleToClinicalDocumentCh",
"typeMode": "none",
"documentation": "_________________________ Header Level Templates _________________________\r\nsource: http://build.fhir.org/ig/hl7ch/ch-emed/StructureDefinition-ch-emed-composition-medicationdispense.html\r\ntarget: 2.16.756.5.30.1.1.10.9.42"
} ],
"meta": {
"versionId": "2",
"lastUpdated": "2021-11-04T13:32:05.797+01:00"
},
"publisher": "ahdis",
"name": "BundleToCdaChEmedMedicationDispenseDocument",
"copyright": "CC-BY-SA-4.0",
"type": null,
"experimental": null,
"resourceType": "StructureMap",
"title": null,
"package_version": "0.3.0",
"structure": [ {
"url": "http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument",
"mode": "target",
"alias": "ClinicalDocument"
}, {
"url": "http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor",
"mode": "target",
"alias": "AssignedAuthor"
}, {
"url": "http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity",
"mode": "target",
"alias": "AssignedEntity"
}, {
"url": "http://hl7.org/fhir/cda/StructureDefinition/Author",
"mode": "target",
"alias": "Author"
}, {
"url": "http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization",
"mode": "target",
"alias": "CustodianOrganization"
}, {
"url": "http://hl7.org/fhir/cda/StructureDefinition/IVL_TS",
"mode": "target",
"alias": "IVL_TS"
}, {
"url": "http://hl7.org/fhir/cda/StructureDefinition/EIVL_TS",
"mode": "target",
"alias": "EIVL_TS"
}, {
"url": "http://hl7.org/fhir/cda/StructureDefinition/PatientRole",
"mode": "target",
"alias": "PatientRole"
}, {
"url": "http://hl7.org/fhir/cda/StructureDefinition/RecordTarget",
"mode": "target",
"alias": "RecordTarget"
}, {
"url": "http://hl7.org/fhir/cda/StructureDefinition/Section",
"mode": "target",
"alias": "Section"
}, {
"url": "http://hl7.org/fhir/cda/StructureDefinition/SubstanceAdministration",
"mode": "target",
"alias": "SubstanceAdministration"
}, {
"url": "http://hl7.org/fhir/cda/StructureDefinition/SXPR_TS",
"mode": "target",
"alias": "SXPR_TS"
}, {
"url": "http://hl7.org/fhir/cda/StructureDefinition/Supply",
"mode": "target",
"alias": "Supply"
}, {
"url": "http://hl7.org/fhir/StructureDefinition/Bundle",
"mode": "source",
"alias": "Bundle"
}, {
"url": "http://hl7.org/fhir/StructureDefinition/Composition",
"mode": "source",
"alias": "Composition"
}, {
"url": "http://hl7.org/fhir/StructureDefinition/Patient",
"mode": "source",
"alias": "Patient"
}, {
"url": "http://hl7.org/fhir/StructureDefinition/Practitioner",
"mode": "source",
"alias": "Practitioner"
}, {
"url": "http://hl7.org/fhir/StructureDefinition/Organization",
"mode": "source",
"alias": "Organization"
}, {
"url": "http://hl7.org/fhir/StructureDefinition/MedicationDispense",
"mode": "source",
"alias": "MedicationDispense"
}, {
"url": "http://hl7.org/fhir/StructureDefinition/Dosage",
"mode": "source",
"alias": "Dosage"
} ],
"status": "draft",
"id": "1937f53e-12ed-4fbe-9bf3-b5352df3ae8d",
"kind": null,
"url": "http://fhir.ch/ig/cda-fhir-maps/StructureMap/BundleToCdaChEmedMedicationDispenseDocument",
"version": "0.3.0",
"import": [ "http://fhir.ch/ig/cda-fhir-maps/StructureMap/FhirToCdaTypes", "http://fhir.ch/ig/cda-fhir-maps/StructureMap/BundleToCda", "http://fhir.ch/ig/cda-fhir-maps/StructureMap/BundleToCdaCh", "http://fhir.ch/ig/cda-fhir-maps/StructureMap/BundleToCdaChEmed" ],
"contact": [ {
"name": "ahdis",
"telecom": [ {
"value": "http://www.ahdis.ch/",
"system": "url"
} ]
} ]
}