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

## : E-T-Rezept Structure Map for KBV PZN Medication - JSON Representation

Draft as of 2026-05-26

Raw json | Download

    {
      "resourceType" : "StructureMap",
      "id" : "ERPTPrescriptionStructureMapKBVPZNMedication",
      "text" : {
        "status" : "generated",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureMap ERPTPrescriptionStructureMapKBVPZNMedication</b></p><a name=\"ERPTPrescriptionStructureMapKBVPZNMedication\"> </a><a name=\"hcERPTPrescriptionStructureMapKBVPZNMedication\"> </a><pre class=\"fml\">\r\n<b>map</b><span style=\"color: navy\"> &quot;</span>https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapKBVPZNMedication<span style=\"color: navy\">&quot; = &quot;</span>ERPTPrescriptionStructureMapKBVPZNMedication<span style=\"color: navy\">&quot;\r\n\r\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">Mapping-Anweisungen zur Transformation von KBV PZN-Medikamenten zu BfArM T-Prescription Format</span>\r\n\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R4/medication.html\" title=\"Medication\">http://hl7.org/fhir/StructureDefinition/Medication</a><span style=\"color: navy\">&quot; </span><b>alias </b>kbvMedicationPZN <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R4/medication.html\" title=\"Medication\">http://hl7.org/fhir/StructureDefinition/Medication</a><span style=\"color: navy\">&quot; </span><b>alias </b>bfarmMedication <b>as </b><b>target</b>\r\n\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">Mapping-Anweisungen zur Transformation von KBV PZN-Medikamenten zu BfArM T-Prescription Format</span>\r\n<b>group </b>ERPTPrescriptionStructureMapKBVPZNMedication<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">kbvMedicationPZN</span><span style=\"color: navy\"> : </span>kbvMedicationPZN, <b>target</b> <span style=\"color: maroon\">bfarmMedication</span><span style=\"color: navy\"> : </span>bfarmMedication<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  kbvMedicationPZN.extension<b> as </b><span style=\"color: maroon\">extVar</span><span style=\"color: navy\"><b> -&gt; </b></span>bfarmMedication.extension<b> as </b><span style=\"color: maroon\">tgtExtVar</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    extVar<b> where </b>url='http://fhir.de/StructureDefinition/normgroesse'<span style=\"color: navy\"><b> -&gt; </b></span>tgtExtVar.url = <span style=\"color: blue\">'http://fhir.de/StructureDefinition/normgroesse'</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      extVar.value<b> as </b><span style=\"color: maroon\">extValVar</span><span style=\"color: navy\"><b> -&gt; </b></span>tgtExtVar.value = <span style=\"color: maroon\">extValVar</span> <i>&quot;copyExtensionValue&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Kopiert den Wert der Normgröße-Extension (N1, N2, N3)</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;copyNormgroesseExtensionUrl&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Übernimmt die Normgröße-Extension unverändert (deutsche Packungsgrößenangabe)</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;medicationExt&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Mappt Medication-Extensions von KBV- zu BfArM-Format</span>\r\n  kbvMedicationPZN.id<b> as </b><span style=\"color: maroon\">IdVar</span><span style=\"color: navy\"><b> -&gt; </b></span>bfarmMedication.id = <span style=\"color: maroon\">IdVar</span> <i>&quot;medicationId&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Übernimmt die eindeutige Medication-ID unverändert</span>\r\n  kbvMedicationPZN.code<b> as </b><span style=\"color: maroon\">codeVar</span><span style=\"color: navy\"><b> -&gt; </b></span>bfarmMedication.code = <span style=\"color: maroon\">codeVar</span> <i>&quot;medicationCode&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Kopiert den Medikamentencode (PZN - Pharmazentralnummer) für die eindeutige Identifikation</span>\r\n  kbvMedicationPZN.form<b> as </b><span style=\"color: maroon\">formVar</span><span style=\"color: navy\"><b> -&gt; </b></span>bfarmMedication.form = <span style=\"color: maroon\">formVar</span> <i>&quot;medicationForm&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Übernimmt die Darreichungsform (Tabletten, Kapseln, Tropfen, etc.)</span>\r\n  kbvMedicationPZN.amount<b> as </b><span style=\"color: maroon\">amountVar</span><span style=\"color: navy\"><b> -&gt; </b></span>bfarmMedication.amount<b> as </b><span style=\"color: maroon\">tgtAmountVar</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    amountVar.denominator<b> as </b><span style=\"color: maroon\">amountDenominatorVar</span><span style=\"color: navy\"><b> -&gt; </b></span>tgtAmountVar.denominator = <span style=\"color: maroon\">amountDenominatorVar</span> <i>&quot;medicationAmountDenominator&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Kopiert den Nenner der Mengenangabe (z.B. '1' für 'pro Packung')</span>\r\n    amountVar.numerator<b> as </b><span style=\"color: maroon\">amountNumeratorVar</span><span style=\"color: navy\"><b> -&gt; </b></span>tgtAmountVar.numerator<b> as </b><span style=\"color: maroon\">tgtAmountNumeratorVar</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      amountNumeratorVar.extension<b> as </b><span style=\"color: maroon\">amountNumExtVar</span><span style=\"color: navy\"><b> -&gt; </b></span>tgtAmountNumeratorVar.extension<b> as </b><span style=\"color: maroon\">tgtAmountNumExtVar</span><b> then</b><span style=\"color: navy\"> {\r\n</span>        amountNumExtVar<b> where </b>url='https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_PackagingSize'<span style=\"color: navy\"><b> -&gt; </b></span>tgtAmountNumExtVar.url = <span style=\"color: blue\">'https://gematik.de/fhir/epa-medication/StructureDefinition/medication-packaging-size-extension'</span><b> then</b><span style=\"color: navy\"> {\r\n</span>          amountNumExtVar.value<b> as </b><span style=\"color: maroon\">extValVar</span><span style=\"color: navy\"><b> -&gt; </b></span>tgtAmountNumExtVar.value = <span style=\"color: maroon\">extValVar</span> <i>&quot;copyExtensionValue&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Übernimmt den Packungsgrößenwert unverändert</span>\r\n        <span style=\"color: navy\">}</span> <i>&quot;copyPackagingSizeExtensionUrl&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Wandelt KBV-Packungsgrößen-Extension in gematik EPA-Medication Extension um</span>\r\n      <span style=\"color: navy\">}</span> <i>&quot;medicationAmountExt&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Transformiert Packungsgrößen-Extensions von KBV- zu gematik-Format</span>\r\n      amountNumeratorVar.value<b> as </b><span style=\"color: maroon\">amountNumeratorValueVar</span><span style=\"color: navy\"><b> -&gt; </b></span>tgtAmountNumeratorVar.value = <span style=\"color: maroon\">amountNumeratorValueVar</span> <i>&quot;medicationAmountNumeratorValue&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Kopiert den numerischen Wert der Menge (z.B. '20' für 20 Tabletten)</span>\r\n      amountNumeratorVar.unit<b> as </b><span style=\"color: maroon\">amountNumeratorUnitVar</span><span style=\"color: navy\"><b> -&gt; </b></span>tgtAmountNumeratorVar.unit = <span style=\"color: maroon\">amountNumeratorUnitVar</span> <i>&quot;medicationAmountNumeratorUnit&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Übernimmt die Mengeneinheit (Stück, ml, g, etc.)</span>\r\n      amountNumeratorVar.system<b> as </b><span style=\"color: maroon\">amountNumeratorSystemVar</span><span style=\"color: navy\"><b> -&gt; </b></span>tgtAmountNumeratorVar.system = <span style=\"color: maroon\">amountNumeratorSystemVar</span> <i>&quot;medicationAmountNumeratorSystem&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Kopiert das Codesystem für die Mengeneinheit (meist UCUM)</span>\r\n      amountNumeratorVar.code<b> as </b><span style=\"color: maroon\">amountNumeratorCodeVar</span><span style=\"color: navy\"><b> -&gt; </b></span>tgtAmountNumeratorVar.code = <span style=\"color: maroon\">amountNumeratorCodeVar</span> <i>&quot;medicationAmountNumeratorCode&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Übernimmt den standardisierten Code für die Mengeneinheit</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;medicationAmountNumerator&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Mappt den Zähler der Mengenangabe mit allen Details (Wert, Einheit, Extensions)</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;medicationAmount&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Mappt die Mengenangaben des Fertigarzneimittels (Packungsgröße und Inhalt)</span>\r\n  kbvMedicationPZN.ingredient<b> as </b><span style=\"color: maroon\">ingredientVar</span><span style=\"color: navy\"><b> -&gt; </b></span>bfarmMedication.ingredient = <span style=\"color: maroon\">ingredientVar</span> <i>&quot;medicationIngredient&quot;</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Kopiert Wirkstoffinformationen (bei PZN-Medikamenten meist nicht detailliert angegeben)</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
      },
      "url" : "https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapKBVPZNMedication",
      "version" : "2.0.0-ballot.1",
      "name" : "ERPTPrescriptionStructureMapKBVPZNMedication",
      "title" : "E-T-Rezept Structure Map for KBV PZN Medication",
      "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 KBV PZN-Medikamenten zu BfArM T-Prescription Format",
      "jurisdiction" : [
        {
          "coding" : [
            {
              "system" : "urn:iso:std:iso:3166",
              "code" : "DE",
              "display" : "Germany"
            }
          ]
        }
      ],
      "structure" : [
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/Medication",
          "mode" : "source",
          "alias" : "kbvMedicationPZN"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/Medication",
          "mode" : "target",
          "alias" : "bfarmMedication"
        }
      ],
      "group" : [
        {
          "name" : "ERPTPrescriptionStructureMapKBVPZNMedication",
          "typeMode" : "none",
          "documentation" : "Mapping-Anweisungen zur Transformation von KBV PZN-Medikamenten zu BfArM T-Prescription Format",
          "input" : [
            {
              "name" : "kbvMedicationPZN",
              "type" : "kbvMedicationPZN",
              "mode" : "source"
            },
            {
              "name" : "bfarmMedication",
              "type" : "bfarmMedication",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "medicationExt",
              "source" : [
                {
                  "context" : "kbvMedicationPZN",
                  "element" : "extension",
                  "variable" : "extVar"
                }
              ],
              "target" : [
                {
                  "context" : "bfarmMedication",
                  "contextType" : "variable",
                  "element" : "extension",
                  "variable" : "tgtExtVar"
                }
              ],
              "rule" : [
                {
                  "name" : "copyNormgroesseExtensionUrl",
                  "source" : [
                    {
                      "context" : "extVar",
                      "condition" : "url='http://fhir.de/StructureDefinition/normgroesse'"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgtExtVar",
                      "contextType" : "variable",
                      "element" : "url",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "http://fhir.de/StructureDefinition/normgroesse"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "copyExtensionValue",
                      "source" : [
                        {
                          "context" : "extVar",
                          "element" : "value",
                          "variable" : "extValVar"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgtExtVar",
                          "contextType" : "variable",
                          "element" : "value",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "extValVar"
                            }
                          ]
                        }
                      ],
                      "documentation" : "Kopiert den Wert der Normgröße-Extension (N1, N2, N3)"
                    }
                  ],
                  "documentation" : "Übernimmt die Normgröße-Extension unverändert (deutsche Packungsgrößenangabe)"
                }
              ],
              "documentation" : "Mappt Medication-Extensions von KBV- zu BfArM-Format"
            },
            {
              "name" : "medicationId",
              "source" : [
                {
                  "context" : "kbvMedicationPZN",
                  "element" : "id",
                  "variable" : "IdVar"
                }
              ],
              "target" : [
                {
                  "context" : "bfarmMedication",
                  "contextType" : "variable",
                  "element" : "id",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "IdVar"
                    }
                  ]
                }
              ],
              "documentation" : "Übernimmt die eindeutige Medication-ID unverändert"
            },
            {
              "name" : "medicationCode",
              "source" : [
                {
                  "context" : "kbvMedicationPZN",
                  "element" : "code",
                  "variable" : "codeVar"
                }
              ],
              "target" : [
                {
                  "context" : "bfarmMedication",
                  "contextType" : "variable",
                  "element" : "code",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "codeVar"
                    }
                  ]
                }
              ],
              "documentation" : "Kopiert den Medikamentencode (PZN - Pharmazentralnummer) für die eindeutige Identifikation"
            },
            {
              "name" : "medicationForm",
              "source" : [
                {
                  "context" : "kbvMedicationPZN",
                  "element" : "form",
                  "variable" : "formVar"
                }
              ],
              "target" : [
                {
                  "context" : "bfarmMedication",
                  "contextType" : "variable",
                  "element" : "form",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "formVar"
                    }
                  ]
                }
              ],
              "documentation" : "Übernimmt die Darreichungsform (Tabletten, Kapseln, Tropfen, etc.)"
            },
            {
              "name" : "medicationAmount",
              "source" : [
                {
                  "context" : "kbvMedicationPZN",
                  "element" : "amount",
                  "variable" : "amountVar"
                }
              ],
              "target" : [
                {
                  "context" : "bfarmMedication",
                  "contextType" : "variable",
                  "element" : "amount",
                  "variable" : "tgtAmountVar"
                }
              ],
              "rule" : [
                {
                  "name" : "medicationAmountDenominator",
                  "source" : [
                    {
                      "context" : "amountVar",
                      "element" : "denominator",
                      "variable" : "amountDenominatorVar"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgtAmountVar",
                      "contextType" : "variable",
                      "element" : "denominator",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueId" : "amountDenominatorVar"
                        }
                      ]
                    }
                  ],
                  "documentation" : "Kopiert den Nenner der Mengenangabe (z.B. '1' für 'pro Packung')"
                },
                {
                  "name" : "medicationAmountNumerator",
                  "source" : [
                    {
                      "context" : "amountVar",
                      "element" : "numerator",
                      "variable" : "amountNumeratorVar"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgtAmountVar",
                      "contextType" : "variable",
                      "element" : "numerator",
                      "variable" : "tgtAmountNumeratorVar"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "medicationAmountExt",
                      "source" : [
                        {
                          "context" : "amountNumeratorVar",
                          "element" : "extension",
                          "variable" : "amountNumExtVar"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgtAmountNumeratorVar",
                          "contextType" : "variable",
                          "element" : "extension",
                          "variable" : "tgtAmountNumExtVar"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "copyPackagingSizeExtensionUrl",
                          "source" : [
                            {
                              "context" : "amountNumExtVar",
                              "condition" : "url='https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_PackagingSize'"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "tgtAmountNumExtVar",
                              "contextType" : "variable",
                              "element" : "url",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "https://gematik.de/fhir/epa-medication/StructureDefinition/medication-packaging-size-extension"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "copyExtensionValue",
                              "source" : [
                                {
                                  "context" : "amountNumExtVar",
                                  "element" : "value",
                                  "variable" : "extValVar"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "tgtAmountNumExtVar",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "extValVar"
                                    }
                                  ]
                                }
                              ],
                              "documentation" : "Übernimmt den Packungsgrößenwert unverändert"
                            }
                          ],
                          "documentation" : "Wandelt KBV-Packungsgrößen-Extension in gematik EPA-Medication Extension um"
                        }
                      ],
                      "documentation" : "Transformiert Packungsgrößen-Extensions von KBV- zu gematik-Format"
                    },
                    {
                      "name" : "medicationAmountNumeratorValue",
                      "source" : [
                        {
                          "context" : "amountNumeratorVar",
                          "element" : "value",
                          "variable" : "amountNumeratorValueVar"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgtAmountNumeratorVar",
                          "contextType" : "variable",
                          "element" : "value",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "amountNumeratorValueVar"
                            }
                          ]
                        }
                      ],
                      "documentation" : "Kopiert den numerischen Wert der Menge (z.B. '20' für 20 Tabletten)"
                    },
                    {
                      "name" : "medicationAmountNumeratorUnit",
                      "source" : [
                        {
                          "context" : "amountNumeratorVar",
                          "element" : "unit",
                          "variable" : "amountNumeratorUnitVar"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgtAmountNumeratorVar",
                          "contextType" : "variable",
                          "element" : "unit",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "amountNumeratorUnitVar"
                            }
                          ]
                        }
                      ],
                      "documentation" : "Übernimmt die Mengeneinheit (Stück, ml, g, etc.)"
                    },
                    {
                      "name" : "medicationAmountNumeratorSystem",
                      "source" : [
                        {
                          "context" : "amountNumeratorVar",
                          "element" : "system",
                          "variable" : "amountNumeratorSystemVar"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgtAmountNumeratorVar",
                          "contextType" : "variable",
                          "element" : "system",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "amountNumeratorSystemVar"
                            }
                          ]
                        }
                      ],
                      "documentation" : "Kopiert das Codesystem für die Mengeneinheit (meist UCUM)"
                    },
                    {
                      "name" : "medicationAmountNumeratorCode",
                      "source" : [
                        {
                          "context" : "amountNumeratorVar",
                          "element" : "code",
                          "variable" : "amountNumeratorCodeVar"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgtAmountNumeratorVar",
                          "contextType" : "variable",
                          "element" : "code",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "amountNumeratorCodeVar"
                            }
                          ]
                        }
                      ],
                      "documentation" : "Übernimmt den standardisierten Code für die Mengeneinheit"
                    }
                  ],
                  "documentation" : "Mappt den Zähler der Mengenangabe mit allen Details (Wert, Einheit, Extensions)"
                }
              ],
              "documentation" : "Mappt die Mengenangaben des Fertigarzneimittels (Packungsgröße und Inhalt)"
            },
            {
              "name" : "medicationIngredient",
              "source" : [
                {
                  "context" : "kbvMedicationPZN",
                  "element" : "ingredient",
                  "variable" : "ingredientVar"
                }
              ],
              "target" : [
                {
                  "context" : "bfarmMedication",
                  "contextType" : "variable",
                  "element" : "ingredient",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "ingredientVar"
                    }
                  ]
                }
              ],
              "documentation" : "Kopiert Wirkstoffinformationen (bei PZN-Medikamenten meist nicht detailliert angegeben)"
            }
          ]
        }
      ]
    }