PackagesCanonicalsLogsProblems
    Packages
    ch.fhir.ig.cda-fhir-maps@0.2.0
    http://fhir.ch/ig/cda-fhir-maps/StructureMap/BundleToCdaChEmedMedicationCardDocument
{
  "description": "Medication Card document, 2.16.756.5.30.1.1.10.1.3 2020-01-09 Oliver Egger, 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-BundleToCdaChEmedMedicationCardDocument.json",
  "package_name": "ch.fhir.ig.cda-fhir-maps",
  "date": "2021-06-18T18:31:19+02:00",
  "group": [ {
    "name": "BundleToCdaChEmedMedicationCardDocument",
    "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": "BundleToClinicalDocumentEmedMedicationCardDocument",
        "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-medicationcard.html target: https://art-decor.org/art-decor/decor-templates--cdachemed-?section=templates&id=2.16.756.5.30.1.1.10.1.3"
  }, {
    "name": "CompositionClinicalDocumentChEmedMedicationCardDocument",
    "rule": [ {
      "name": "SectionMedicationCardSectionContentModule",
      "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": "SectionMedicationCardSectionContentModule",
          "variable": [ "bundle", "section", "cdasection" ]
        } ]
      } ],
      "source": [ {
        "context": "composition",
        "element": "section",
        "variable": "section",
        "condition": "$this.code.coding.where((system = 'http://loinc.org') and (code = '10160-0'))"
      } ],
      "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-medicationcard.html target: https://art-decor.org/art-decor/decor-templates--cdachemed-?section=templates&id=2.16.756.5.30.1.1.10.1.3"
  }, {
    "name": "SectionMedicationCardSectionContentModule",
    "rule": [ {
      "name": "CH-PHARM-MedicationCardSectionContentModule",
      "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.9"
        } ],
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "IHE-PHARM-PML",
      "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.5"
        } ],
        "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": "MedicationStatement", "source": [ { "context": "entry", "element": "resource", "variable": "medicationStatement", "condition": "$this.ofType(FHIR.MedicationStatement)" } ], "target": [ { "context": "cdasection", "element": "entry", "variable": "entry", "contextType": "variable" }, { "context": "entry", "element": "substanceAdministration", "variable": "substanceAdministration", "contextType": "variable" } ], "dependent": [ { "name": "MedicationTreatmentPlanItemEntryContentModule", "variable": [ "bundle", "medicationStatement", "substanceAdministration" ] } ] } ], "source": [ { "context": "entry", "element": "fullUrl", "condition": "($this in %section.entry.reference) and $this.startsWith('urn:uuid')" } ] }, { "name": "MedicationStatement", "source": [ { "context": "entry", "element": "resource", "variable": "medicationStatement", "condition": "$this.ofType(FHIR.MedicationStatement) and (('MedicationStatement' + '/' + $this.id) in %section.entry.reference)" } ], "target": [ { "context": "cdasection", "element": "entry", "variable": "entry", "contextType": "variable" }, { "context": "entry", "element": "substanceAdministration", "variable": "substanceAdministration", "contextType": "variable" } ], "dependent": [ { "name": "MedicationTreatmentPlanItemEntryContentModule", "variable": [ "bundle", "medicationStatement", "substanceAdministration" ] } ] } ], "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-medicationcard.html target: https://art-decor.org/art-decor/decor-templates--cdachemed-?section=templates&id=2.16.756.5.30.1.1.10.3.9" }, { "name": "BundleToClinicalDocumentEmedMedicationCardDocument", "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-PML", "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.5" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "CDA-CH-EMED-MedicationCardDocument", "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.3" } ], "transform": "copy", "contextType": "variable" } ] }, { "name": "entry", "rule": [ { "name": "resource", "source": [ { "context": "entry", "element": "resource", "variable": "resource", "condition": "$this.ofType(FHIR.Composition)" } ], "dependent": [ { "name": "CompositionClinicalDocumentChEmedMedicationCardDocument", "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-medicationcard.html target: 2.16.756.5.30.1.1.10.9.42" } ], "publisher": "ahdis", "name": "BundleToCdaChEmedMedicationCardDocument", "copyright": "CC-BY-SA-4.0", "type": null, "experimental": null, "resourceType": "StructureMap", "title": null, "package_version": "0.2.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/MedicationStatement", "mode": "source", "alias": "MedicationStatement" }, { "url": "http://hl7.org/fhir/StructureDefinition/Dosage", "mode": "source", "alias": "Dosage" } ], "status": "draft", "id": "175ad053-18d4-44c4-b3a5-38a13a906f38", "kind": null, "url": "http://fhir.ch/ig/cda-fhir-maps/StructureMap/BundleToCdaChEmedMedicationCardDocument", "version": "0.2.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" } ] } ] }