{ "description": "Pharmaceutical Advice document, 2.16.756.5.30.1.1.10.1.6 2020-11-12 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", "_filename": "StructureMap-BundleToCdaChEmedPharmaceuticalAdviceDocument.json", "package_name": "ch.fhir.ig.cda-fhir-maps", "date": "2020-12-09T15:16:13+01:00", "group": [ { "name": "BundleToCdaChEmedPharmaceuticalAdviceDocument", "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": "BundleToClinicalDocumentEmedPharmaceuticalAdviceDocument", "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-pharmaceuticaladvice.html target: https://art-decor.org/art-decor/decor-templates--cdachemed-?section=templates&id=2.16.756.5.30.1.1.10.1.6" }, { "name": "CompositionClinicalDocumentChEmedPharmaceuticalAdviceDocument", "rule": [ { "name": "SectionPharmaceuticalAdviceSectionContentModule", "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": "SectionPharmaceuticalAdviceSectionContentModule", "variable": [ "bundle", "section", "cdasection" ] } ] } ], "source": [ { "context": "composition", "element": "section", "variable": "section", "condition": "$this.code.coding.where((system = 'http://loinc.org') and (code = '61357-0'))" } ], "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-pharmaceuticaladvice.html target: https://art-decor.org/art-decor/decor-templates--cdachemed-?section=templates&id=2.16.756.5.30.1.1.10.1.6" }, { "name": "SectionPharmaceuticalAdviceSectionContentModule", "rule": [ { "name": "CH-PHARM-PharmaceuticalAdviceSectionContentModule", "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.12" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "IHE-PHARM-PADV", "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.2" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "extension", "rule": [ { "name": "upper", "source": [ { "context": "section" } ], "target": [ { "variable": "uuid", "transform": "uuid" }, { "context": "id", "element": "root", "parameter": [ { "valueString": "%uuid.upper()" } ], "transform": "evaluate", "contextType": "variable" } ] } ], "source": [ { "context": "section", "variable": "section", "condition": "$this.extension.where(url = 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-ext-epr-sectionid').exists() = false" } ], "target": [ { "context": "cdasection", "element": "id", "variable": "id", "contextType": "variable" } ], "documentation": "create section id if there is none in the fhir bundle (mapping source)" }, { "name": "entry", "rule": [ { "name": "fullUrlAsUuid", "rule": [ { "name": "Observation", "source": [ { "context": "entry", "element": "resource", "variable": "fhirobservation", "condition": "$this.ofType(FHIR.Observation)" } ], "target": [ { "context": "cdasection", "element": "entry", "variable": "entry", "contextType": "variable" }, { "context": "entry", "element": "observation", "variable": "cdaobservation", "contextType": "variable" } ], "dependent": [ { "name": "PharmaceuticalAdviceItemEntryContentModule", "variable": [ "bundle", "fhirobservation", "cdaobservation" ] } ] } ], "source": [ { "context": "entry", "element": "fullUrl", "condition": "($this in %section.entry.reference) and $this.startsWith('urn:uuid')" } ] }, { "name": "Observation", "source": [ { "context": "entry", "element": "resource", "variable": "fhirobservation", "condition": "$this.ofType(FHIR.Observation) and (('Observation' + '/' + $this.id) in %section.entry.reference)" } ], "target": [ { "context": "cdasection", "element": "entry", "variable": "entry", "contextType": "variable" }, { "context": "entry", "element": "observation", "variable": "cdaobservation", "contextType": "variable" } ], "dependent": [ { "name": "PharmaceuticalAdviceItemEntryContentModule", "variable": [ "bundle", "fhirobservation", "cdaobservation" ] } ] } ], "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 _________________________ source: http://build.fhir.org/ig/hl7ch/ch-emed/StructureDefinition-ch-emed-composition-pharmaceuticaladvice.html target: https://art-decor.org/art-decor/decor-templates--cdachemed-?section=templates&id=2.16.756.5.30.1.1.10.3.12" }, { "name": "BundleToClinicalDocumentEmedPharmaceuticalAdviceDocument", "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-PHARM-PADV", "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.2" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "CDA-PHARM-PharmaceuticalAdvice", "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.6" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "entry", "rule": [ { "name": "resource", "source": [ { "context": "entry", "element": "resource", "variable": "resource", "condition": "$this.ofType(FHIR.Composition)" } ], "dependent": [ { "name": "CompositionClinicalDocumentChEmedPharmaceuticalAdviceDocument", "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 _________________________ source: http://build.fhir.org/ig/hl7ch/ch-emed/StructureDefinition-ch-emed-composition-pharmaceuticaladvice.html target: 2.16.756.5.30.1.1.10.9.42" } ], "publisher": "ahdis", "name": "BundleToCdaChEmedPharmaceuticalAdviceDocument", "copyright": "CC-BY-SA-4.0", "type": null, "experimental": null, "resourceType": "StructureMap", "title": null, "package_version": "0.1.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/Observation", "mode": "source", "alias": "Observation" }, { "url": "http://hl7.org/fhir/StructureDefinition/Dosage", "mode": "source", "alias": "Dosage" } ], "status": "draft", "id": "08e88e81-3c29-41cc-864f-e8ee659cddf4", "kind": null, "url": "http://fhir.ch/ig/cda-fhir-maps/StructureMap/BundleToCdaChEmedPharmaceuticalAdviceDocument", "version": "0.1.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" } ] } ] }