TIFlow - Datenaustausch BfArM Webdienst
Version 2.0.0-ballot.1 - ci-build

## : E-T-Rezept Structure Map for MedicationDispense - JSON Representation

Draft as of 2026-05-26

Raw json | Download

    {
      "resourceType" : "StructureMap",
      "id" : "ERPTPrescriptionStructureMapMedicationDispense",
      "text" : {
        "status" : "generated",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureMap ERPTPrescriptionStructureMapMedicationDispense</b></p><a name=\"ERPTPrescriptionStructureMapMedicationDispense\"> </a><a name=\"hcERPTPrescriptionStructureMapMedicationDispense\"> </a><pre class=\"fml\">\r\n<b>map</b><span style=\"color: navy\"> &quot;</span>https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapMedicationDispense<span style=\"color: navy\">&quot; = &quot;</span>ERPTPrescriptionStructureMapMedicationDispense<span style=\"color: navy\">&quot;\r\n\r\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">Mapping-Anweisungen zur Transformation von gematik ERP MedicationDispense zu BfArM T-Prescription MedicationDispense</span>\r\n\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R4/medicationdispense.html\" title=\"MedicationDispense\">http://hl7.org/fhir/StructureDefinition/MedicationDispense</a><span style=\"color: navy\">&quot; </span><b>alias </b>gematikMedicationDispense <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R4/medicationdispense.html\" title=\"MedicationDispense\">http://hl7.org/fhir/StructureDefinition/MedicationDispense</a><span style=\"color: navy\">&quot; </span><b>alias </b>bfarmMedicationDispense <b>as </b><b>target</b>\r\n\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">Mapping-Anweisungen zur Transformation von gematik ERP MedicationDispense zu BfArM T-Prescription MedicationDispense</span>\r\n<b>group </b>ERPTPrescriptionStructureMapMedicationDispense<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">gematikMedicationDispense</span><span style=\"color: navy\"> : </span>gematikMedicationDispense, <b>target</b> <span style=\"color: maroon\">bfarmMedicationDispense</span><span style=\"color: navy\"> : </span>bfarmMedicationDispense<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  gematikMedicationDispense.extension<b> as </b><span style=\"color: maroon\">extDosageMetaVar</span><b> where </b>url='http://ig.fhir.de/igs/medication/StructureDefinition/GeneratedDosageInstructionsMeta'<span style=\"color: navy\"><b> -&gt; </b></span>bfarmMedicationDispense.extension = <span style=\"color: maroon\">extDosageMetaVar</span> <i>&quot;medicationDispenseExt&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Kopiert Dosage Metadata Extension</span>\r\n  gematikMedicationDispense.extension<b> as </b><span style=\"color: maroon\">extDosageRenderedVar</span><b> where </b>url='http://hl7.org/fhir/5.0/StructureDefinition/extension-MedicationDispense.renderedDosageInstruction'<span style=\"color: navy\"><b> -&gt; </b></span>bfarmMedicationDispense.extension = <span style=\"color: maroon\">extDosageRenderedVar</span> <i>&quot;medicationDispenseExt&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Kopiert RenderedDosageText</span>\r\n  gematikMedicationDispense.dosageInstruction<b> as </b><span style=\"color: maroon\">dosageInstructionVar</span><span style=\"color: navy\"><b> -&gt; </b></span>bfarmMedicationDispense.dosageInstruction = <span style=\"color: maroon\">dosageInstructionVar</span> <i>&quot;medicationDispenseDosageInstruction&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Übernimmt die Dosierungsanweisungen aus der ursprünglichen Abgabe für den digitalen Durchschlag</span>\r\n  gematikMedicationDispense.whenHandedOver<b> as </b><span style=\"color: maroon\">whenHandedOverVar</span><span style=\"color: navy\"><b> -&gt; </b></span>bfarmMedicationDispense.whenHandedOver = <span style=\"color: maroon\">whenHandedOverVar</span> <i>&quot;medicationDispenseWhenHandedOver&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Kopiert das Abgabedatum zur Dokumentation des Zeitpunkts der Medikamentenausgabe</span>\r\n  gematikMedicationDispense.medication<b> as </b><span style=\"color: maroon\">medicationVar</span><span style=\"color: navy\"><b> -&gt; </b></span>bfarmMedicationDispense.medication = <span style=\"color: maroon\">medicationVar</span> <i>&quot;medicationReference&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Kopiert die Medikamentenreferenz - das referenzierte Medication wird separat gemappt</span>\r\n  gematikMedicationDispense.status<b> as </b><span style=\"color: maroon\">gematikMedicationDispenseStatus</span><span style=\"color: navy\"><b> -&gt; </b></span>bfarmMedicationDispense.status = <span style=\"color: blue\">'completed'</span> <i>&quot;medicationDispenseStatus&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Setzt den Status auf 'completed' da die Abgabe bereits erfolgt ist (digitaler Durchschlag)</span>\r\n  gematikMedicationDispense.quantity<b> as </b><span style=\"color: maroon\">quantityVar</span><span style=\"color: navy\"><b> -&gt; </b></span>bfarmMedicationDispense.quantity = <span style=\"color: maroon\">quantityVar</span> <i>&quot;medicationDispenseQuantity&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Übernimmt die abgegebene Menge zur Dokumentation der tatsächlich ausgehändigten Medikamentenmenge</span>\r\n  gematikMedicationDispense.performer<b> as </b><span style=\"color: maroon\">srcPerformerVar</span><span style=\"color: navy\"><b> -&gt; </b></span>bfarmMedicationDispense.performer<b> as </b><span style=\"color: maroon\">tgtPerformerVar</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    srcPerformerVar.actor<b> as </b><span style=\"color: maroon\">srcPerformerActorVar</span><span style=\"color: navy\"><b> -&gt; </b></span>tgtPerformerVar.actor<b> as </b><span style=\"color: maroon\">tgtPerformerActorVar</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      srcPerformerActorVar.identifier<b> as </b><span style=\"color: maroon\">srcPerformerActorIdentifierVar</span><b> then</b><span style=\"color: navy\"> {\r\n</span>        srcPerformerActorIdentifierVar.value<b> as </b><span style=\"color: maroon\">srcPerformerActorIdentifierValueVar</span><span style=\"color: navy\"><b> -&gt; </b></span>tgtPerformerActorVar.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Organization/'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">srcPerformerActorIdentifierValueVar</span><span style=\"color: navy\">)</span> <i>&quot;medicationDispensePerformerActorIdentifierValue&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Wandelt Apotheken-Identifier in Organization-Referenz um (Organization/&lt;telematik-id&gt;)</span>\r\n      <span style=\"color: navy\">}</span> <i>&quot;medicationDispensePerformerActorIdentifier&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Extrahiert den Identifier der abgebenden Apotheke</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;medicationDispensePerformerActor&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Verarbeitet den Actor (abgebende Apotheke) des Performers</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;medicationDispensePerformer&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Transformiert Apotheken-Identifier zu Organization-Referenz für eindeutige Zuordnung der abgebenden Apotheke</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
      },
      "url" : "https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapMedicationDispense",
      "version" : "2.0.0-ballot.1",
      "name" : "ERPTPrescriptionStructureMapMedicationDispense",
      "title" : "E-T-Rezept Structure Map for MedicationDispense",
      "status" : "draft",
      "experimental" : false,
      "date" : "2026-05-26",
      "publisher" : "gematik GmbH",
      "contact" : [
        {
          "name" : "gematik GmbH",
          "telecom" : [
            {
              "system" : "url",
              "value" : "https://gematik.de"
            },
            {
              "system" : "email",
              "value" : "erp-umsetzung@gematik.de"
            }
          ]
        }
      ],
      "description" : "Mapping-Anweisungen zur Transformation von gematik ERP MedicationDispense zu BfArM T-Prescription MedicationDispense",
      "jurisdiction" : [
        {
          "coding" : [
            {
              "system" : "urn:iso:std:iso:3166",
              "code" : "DE",
              "display" : "Germany"
            }
          ]
        }
      ],
      "structure" : [
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/MedicationDispense",
          "mode" : "source",
          "alias" : "gematikMedicationDispense"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/MedicationDispense",
          "mode" : "target",
          "alias" : "bfarmMedicationDispense"
        }
      ],
      "group" : [
        {
          "name" : "ERPTPrescriptionStructureMapMedicationDispense",
          "typeMode" : "none",
          "documentation" : "Mapping-Anweisungen zur Transformation von gematik ERP MedicationDispense zu BfArM T-Prescription MedicationDispense",
          "input" : [
            {
              "name" : "gematikMedicationDispense",
              "type" : "gematikMedicationDispense",
              "mode" : "source"
            },
            {
              "name" : "bfarmMedicationDispense",
              "type" : "bfarmMedicationDispense",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "medicationDispenseExt",
              "source" : [
                {
                  "context" : "gematikMedicationDispense",
                  "element" : "extension",
                  "variable" : "extDosageMetaVar",
                  "condition" : "url='http://ig.fhir.de/igs/medication/StructureDefinition/GeneratedDosageInstructionsMeta'"
                }
              ],
              "target" : [
                {
                  "context" : "bfarmMedicationDispense",
                  "contextType" : "variable",
                  "element" : "extension",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "extDosageMetaVar"
                    }
                  ]
                }
              ],
              "documentation" : "Kopiert Dosage Metadata Extension"
            },
            {
              "name" : "medicationDispenseExt",
              "source" : [
                {
                  "context" : "gematikMedicationDispense",
                  "element" : "extension",
                  "variable" : "extDosageRenderedVar",
                  "condition" : "url='http://hl7.org/fhir/5.0/StructureDefinition/extension-MedicationDispense.renderedDosageInstruction'"
                }
              ],
              "target" : [
                {
                  "context" : "bfarmMedicationDispense",
                  "contextType" : "variable",
                  "element" : "extension",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "extDosageRenderedVar"
                    }
                  ]
                }
              ],
              "documentation" : "Kopiert RenderedDosageText"
            },
            {
              "name" : "medicationDispenseDosageInstruction",
              "source" : [
                {
                  "context" : "gematikMedicationDispense",
                  "element" : "dosageInstruction",
                  "variable" : "dosageInstructionVar"
                }
              ],
              "target" : [
                {
                  "context" : "bfarmMedicationDispense",
                  "contextType" : "variable",
                  "element" : "dosageInstruction",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "dosageInstructionVar"
                    }
                  ]
                }
              ],
              "documentation" : "Übernimmt die Dosierungsanweisungen aus der ursprünglichen Abgabe für den digitalen Durchschlag"
            },
            {
              "name" : "medicationDispenseWhenHandedOver",
              "source" : [
                {
                  "context" : "gematikMedicationDispense",
                  "element" : "whenHandedOver",
                  "variable" : "whenHandedOverVar"
                }
              ],
              "target" : [
                {
                  "context" : "bfarmMedicationDispense",
                  "contextType" : "variable",
                  "element" : "whenHandedOver",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "whenHandedOverVar"
                    }
                  ]
                }
              ],
              "documentation" : "Kopiert das Abgabedatum zur Dokumentation des Zeitpunkts der Medikamentenausgabe"
            },
            {
              "name" : "medicationReference",
              "source" : [
                {
                  "context" : "gematikMedicationDispense",
                  "element" : "medication",
                  "variable" : "medicationVar"
                }
              ],
              "target" : [
                {
                  "context" : "bfarmMedicationDispense",
                  "contextType" : "variable",
                  "element" : "medication",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "medicationVar"
                    }
                  ]
                }
              ],
              "documentation" : "Kopiert die Medikamentenreferenz - das referenzierte Medication wird separat gemappt"
            },
            {
              "name" : "medicationDispenseStatus",
              "source" : [
                {
                  "context" : "gematikMedicationDispense",
                  "element" : "status",
                  "variable" : "gematikMedicationDispenseStatus"
                }
              ],
              "target" : [
                {
                  "context" : "bfarmMedicationDispense",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "completed"
                    }
                  ]
                }
              ],
              "documentation" : "Setzt den Status auf 'completed' da die Abgabe bereits erfolgt ist (digitaler Durchschlag)"
            },
            {
              "name" : "medicationDispenseQuantity",
              "source" : [
                {
                  "context" : "gematikMedicationDispense",
                  "element" : "quantity",
                  "variable" : "quantityVar"
                }
              ],
              "target" : [
                {
                  "context" : "bfarmMedicationDispense",
                  "contextType" : "variable",
                  "element" : "quantity",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "quantityVar"
                    }
                  ]
                }
              ],
              "documentation" : "Übernimmt die abgegebene Menge zur Dokumentation der tatsächlich ausgehändigten Medikamentenmenge"
            },
            {
              "name" : "medicationDispensePerformer",
              "source" : [
                {
                  "context" : "gematikMedicationDispense",
                  "element" : "performer",
                  "variable" : "srcPerformerVar"
                }
              ],
              "target" : [
                {
                  "context" : "bfarmMedicationDispense",
                  "contextType" : "variable",
                  "element" : "performer",
                  "variable" : "tgtPerformerVar"
                }
              ],
              "rule" : [
                {
                  "name" : "medicationDispensePerformerActor",
                  "source" : [
                    {
                      "context" : "srcPerformerVar",
                      "element" : "actor",
                      "variable" : "srcPerformerActorVar"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgtPerformerVar",
                      "contextType" : "variable",
                      "element" : "actor",
                      "variable" : "tgtPerformerActorVar"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "medicationDispensePerformerActorIdentifier",
                      "source" : [
                        {
                          "context" : "srcPerformerActorVar",
                          "element" : "identifier",
                          "variable" : "srcPerformerActorIdentifierVar"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "medicationDispensePerformerActorIdentifierValue",
                          "source" : [
                            {
                              "context" : "srcPerformerActorIdentifierVar",
                              "element" : "value",
                              "variable" : "srcPerformerActorIdentifierValueVar"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "tgtPerformerActorVar",
                              "contextType" : "variable",
                              "element" : "reference",
                              "transform" : "append",
                              "parameter" : [
                                {
                                  "valueString" : "Organization/"
                                },
                                {
                                  "valueId" : "srcPerformerActorIdentifierValueVar"
                                }
                              ]
                            }
                          ],
                          "documentation" : "Wandelt Apotheken-Identifier in Organization-Referenz um (Organization/<telematik-id>)"
                        }
                      ],
                      "documentation" : "Extrahiert den Identifier der abgebenden Apotheke"
                    }
                  ],
                  "documentation" : "Verarbeitet den Actor (abgebende Apotheke) des Performers"
                }
              ],
              "documentation" : "Transformiert Apotheken-Identifier zu Organization-Referenz für eindeutige Zuordnung der abgebenden Apotheke"
            }
          ]
        }
      ]
    }