Implementation Guide
E-T-Rezept Datenaustausch
Version 1.1.0-ballot-1 - ballot

: E-T-Rezept Structure Map for Medication - XML Representation

Draft as of 2025-07-07

Raw xml | Download


<StructureMap xmlns="http://hl7.org/fhir">
  <id value="ERPTPrescriptionStructureMapMedication"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureMap ERPTPrescriptionStructureMapMedication</b></p><a name="ERPTPrescriptionStructureMapMedication"> </a><a name="hcERPTPrescriptionStructureMapMedication"> </a><pre class="fml">
<b>map</b><span style="color: navy"> &quot;</span>https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapMedication<span style="color: navy">&quot; = &quot;</span>ERPTPrescriptionStructureMapMedication<span style="color: navy">&quot;

</span><span style="color: navy">// </span><span style="color: green">Router-Mapping zur Auswahl der korrekten Medication-Transformation basierend auf dem KBV/gematik Profil</span>

<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>srcMedication <b>as </b><b>source</b>
<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>tgtMedication <b>as </b><b>target</b>

<b>imports</b><span style="color: navy"> &quot;</span><a href="StructureMap-ERPTPrescriptionStructureMapGEMMedication.html" title="E-T-Rezept Structure Map for Medication">https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapGEMMedication</a><span style="color: navy">&quot;
</span><b>imports</b><span style="color: navy"> &quot;</span><a href="StructureMap-ERPTPrescriptionStructureMapKBVCompoundingMedication.html" title="E-T-Rezept Structure Map for KBV Compounding Medication">https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapKBVCompoundingMedication</a><span style="color: navy">&quot;
</span><b>imports</b><span style="color: navy"> &quot;</span><a href="StructureMap-ERPTPrescriptionStructureMapKBVPZNMedication.html" title="E-T-Rezept Structure Map for KBV PZN Medication">https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapKBVPZNMedication</a><span style="color: navy">&quot;
</span><b>imports</b><span style="color: navy"> &quot;</span><a href="StructureMap-ERPTPrescriptionStructureMapKBVFreeTextMedication.html" title="E-T-Rezept Structure Map for KBV FreeText Medication">https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapKBVFreeTextMedication</a><span style="color: navy">&quot;
</span><b>imports</b><span style="color: navy"> &quot;</span><a href="StructureMap-ERPTPrescriptionStructureMapKBVIngredientMedication.html" title="E-T-Rezept Structure Map for KBV Ingredient Medication">https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapKBVIngredientMedication</a><span style="color: navy">&quot;
</span>
<span style="color: navy">// </span><span style="color: green">Router-Mapping zur Auswahl der korrekten Medication-Transformation basierend auf dem KBV/gematik Profil</span>
<b>group </b>ERPTPrescriptionStructureMapMedication<span style="color: navy">(</span><b>source</b> <span style="color: maroon">srcMedication</span><span style="color: navy"> : </span>srcMedication, <b>target</b> <span style="color: maroon">tgtMedication</span><span style="color: navy"> : </span>tgtMedication<span style="color: navy">)</span><span style="color: navy"> {
</span>  srcMedication<b> as </b><span style="color: maroon">srcPZN</span><b> where </b>meta.profile.contains('KBV_PR_ERP_Medication_PZN')<b> then</b><span style="color: navy"> {
</span>    srcPZN<b> then </b>ERPTPrescriptionStructureMapKBVPZNMedication<span style="color: navy">(</span><span style="color: maroon">srcMedication</span><span style="color: navy">, </span><span style="color: maroon">tgtMedication</span><span style="color: navy">)</span> <i>&quot;mapPZN&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">Führt die Transformation für PZN-Medikamente durch (Fertigarzneimittel mit Pharmazentralnummer)</span>
  <span style="color: navy">}</span> <i>&quot;decideOnMedicationPZN&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">Erkennt PZN-basierte Medikamente und leitet an spezialisiertes PZN-Mapping weiter</span>
  srcMedication<b> as </b><span style="color: maroon">srcFreeText</span><b> where </b>meta.profile.contains('KBV_PR_ERP_Medication_FreeText')<b> then</b><span style="color: navy"> {
</span>    srcFreeText<b> then </b>ERPTPrescriptionStructureMapKBVFreeTextMedication<span style="color: navy">(</span><span style="color: maroon">srcMedication</span><span style="color: navy">, </span><span style="color: maroon">tgtMedication</span><span style="color: navy">)</span> <i>&quot;mapFreeText&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">Führt die Transformation für Freitext-Medikamente durch (nicht standardisierte Arzneimittelangaben)</span>
  <span style="color: navy">}</span> <i>&quot;decideOnMedicationFreeText&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">Erkennt Freitext-Medikamente und leitet an spezialisiertes FreeText-Mapping weiter</span>
  srcMedication<b> as </b><span style="color: maroon">srcIngredient</span><b> where </b>meta.profile.contains('KBV_PR_ERP_Medication_Ingredient')<b> then</b><span style="color: navy"> {
</span>    srcIngredient<b> then </b>ERPTPrescriptionStructureMapKBVIngredientMedication<span style="color: navy">(</span><span style="color: maroon">srcMedication</span><span style="color: navy">, </span><span style="color: maroon">tgtMedication</span><span style="color: navy">)</span> <i>&quot;mapIngredient&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">Führt die Transformation für wirkstoffbasierte Medikamente durch (Rezeptur nach Wirkstoffen)</span>
  <span style="color: navy">}</span> <i>&quot;decideOnMedicationIngredient&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">Erkennt wirkstoffbasierte Medikamente und leitet an spezialisiertes Ingredient-Mapping weiter</span>
  srcMedication<b> as </b><span style="color: maroon">srcCompounding</span><b> where </b>meta.profile.contains('KBV_PR_ERP_Medication_Compounding')<b> then</b><span style="color: navy"> {
</span>    srcCompounding<b> then </b>ERPTPrescriptionStructureMapKBVCompoundingMedication<span style="color: navy">(</span><span style="color: maroon">srcMedication</span><span style="color: navy">, </span><span style="color: maroon">tgtMedication</span><span style="color: navy">)</span> <i>&quot;mapCompounding&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">Führt die Transformation für Rezeptur-Medikamente durch (individuell hergestellte Arzneimittel)</span>
  <span style="color: navy">}</span> <i>&quot;decideOnMedicationCompounding&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">Erkennt Rezeptur-Medikamente und leitet an spezialisiertes Compounding-Mapping weiter</span>
  srcMedication<b> as </b><span style="color: maroon">srcGemMed</span><b> where </b>meta.profile.contains('GEM_ERP_PR_Medication')<b> then</b><span style="color: navy"> {
</span>    srcGemMed<b> then </b>ERPTPrescriptionStructureMapGEMMedication<span style="color: navy">(</span><span style="color: maroon">srcMedication</span><span style="color: navy">, </span><span style="color: maroon">tgtMedication</span><span style="color: navy">)</span> <i>&quot;mapGemMed&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">Führt die Transformation für gematik-Medikamente durch (abgegebene Arzneimittel aus der Apotheke)</span>
  <span style="color: navy">}</span> <i>&quot;decideOnMedicationGematik&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">Erkennt gematik-Medikamente und leitet an spezialisiertes gematik-Mapping weiter</span>
<span style="color: navy">}

</span></pre></div>
  </text>
  <url
       value="https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapMedication"/>
  <version value="1.1.0-ballot-1"/>
  <name value="ERPTPrescriptionStructureMapMedication"/>
  <title value="E-T-Rezept Structure Map for Medication"/>
  <status value="draft"/>
  <experimental value="false"/>
  <date value="2025-07-07"/>
  <publisher value="gematik GmbH"/>
  <contact>
    <name value="gematik GmbH"/>
    <telecom>
      <system value="url"/>
      <value value="https://gematik.de"/>
    </telecom>
    <telecom>
      <system value="email"/>
      <value value="erp-umsetzung@gematik.de"/>
    </telecom>
  </contact>
  <description
               value="Router-Mapping zur Auswahl der korrekten Medication-Transformation basierend auf dem KBV/gematik Profil"/>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="DE"/>
      <display value="Germany"/>
    </coding>
  </jurisdiction>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Medication"/>
    <mode value="source"/>
    <alias value="srcMedication"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Medication"/>
    <mode value="target"/>
    <alias value="tgtMedication"/>
  </structure>
  <import
          value="https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapGEMMedication"/>
  <import
          value="https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapKBVCompoundingMedication"/>
  <import
          value="https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapKBVPZNMedication"/>
  <import
          value="https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapKBVFreeTextMedication"/>
  <import
          value="https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapKBVIngredientMedication"/>
  <group>
    <name value="ERPTPrescriptionStructureMapMedication"/>
    <typeMode value="none"/>
    <documentation
                   value="Router-Mapping zur Auswahl der korrekten Medication-Transformation basierend auf dem KBV/gematik Profil"/>
    <input>
      <name value="srcMedication"/>
      <type value="srcMedication"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgtMedication"/>
      <type value="tgtMedication"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="decideOnMedicationPZN"/>
      <source>
        <context value="srcMedication"/>
        <variable value="srcPZN"/>
        <condition
                   value="meta.profile.contains('KBV_PR_ERP_Medication_PZN')"/>
      </source>
      <rule>
        <name value="mapPZN"/>
        <source>
          <context value="srcPZN"/>
        </source>
        <dependent>
          <name value="ERPTPrescriptionStructureMapKBVPZNMedication"/>
          <variable value="srcMedication"/>
          <variable value="tgtMedication"/>
        </dependent>
        <documentation
                       value="Führt die Transformation für PZN-Medikamente durch (Fertigarzneimittel mit Pharmazentralnummer)"/>
      </rule>
      <documentation
                     value="Erkennt PZN-basierte Medikamente und leitet an spezialisiertes PZN-Mapping weiter"/>
    </rule>
    <rule>
      <name value="decideOnMedicationFreeText"/>
      <source>
        <context value="srcMedication"/>
        <variable value="srcFreeText"/>
        <condition
                   value="meta.profile.contains('KBV_PR_ERP_Medication_FreeText')"/>
      </source>
      <rule>
        <name value="mapFreeText"/>
        <source>
          <context value="srcFreeText"/>
        </source>
        <dependent>
          <name value="ERPTPrescriptionStructureMapKBVFreeTextMedication"/>
          <variable value="srcMedication"/>
          <variable value="tgtMedication"/>
        </dependent>
        <documentation
                       value="Führt die Transformation für Freitext-Medikamente durch (nicht standardisierte Arzneimittelangaben)"/>
      </rule>
      <documentation
                     value="Erkennt Freitext-Medikamente und leitet an spezialisiertes FreeText-Mapping weiter"/>
    </rule>
    <rule>
      <name value="decideOnMedicationIngredient"/>
      <source>
        <context value="srcMedication"/>
        <variable value="srcIngredient"/>
        <condition
                   value="meta.profile.contains('KBV_PR_ERP_Medication_Ingredient')"/>
      </source>
      <rule>
        <name value="mapIngredient"/>
        <source>
          <context value="srcIngredient"/>
        </source>
        <dependent>
          <name value="ERPTPrescriptionStructureMapKBVIngredientMedication"/>
          <variable value="srcMedication"/>
          <variable value="tgtMedication"/>
        </dependent>
        <documentation
                       value="Führt die Transformation für wirkstoffbasierte Medikamente durch (Rezeptur nach Wirkstoffen)"/>
      </rule>
      <documentation
                     value="Erkennt wirkstoffbasierte Medikamente und leitet an spezialisiertes Ingredient-Mapping weiter"/>
    </rule>
    <rule>
      <name value="decideOnMedicationCompounding"/>
      <source>
        <context value="srcMedication"/>
        <variable value="srcCompounding"/>
        <condition
                   value="meta.profile.contains('KBV_PR_ERP_Medication_Compounding')"/>
      </source>
      <rule>
        <name value="mapCompounding"/>
        <source>
          <context value="srcCompounding"/>
        </source>
        <dependent>
          <name value="ERPTPrescriptionStructureMapKBVCompoundingMedication"/>
          <variable value="srcMedication"/>
          <variable value="tgtMedication"/>
        </dependent>
        <documentation
                       value="Führt die Transformation für Rezeptur-Medikamente durch (individuell hergestellte Arzneimittel)"/>
      </rule>
      <documentation
                     value="Erkennt Rezeptur-Medikamente und leitet an spezialisiertes Compounding-Mapping weiter"/>
    </rule>
    <rule>
      <name value="decideOnMedicationGematik"/>
      <source>
        <context value="srcMedication"/>
        <variable value="srcGemMed"/>
        <condition value="meta.profile.contains('GEM_ERP_PR_Medication')"/>
      </source>
      <rule>
        <name value="mapGemMed"/>
        <source>
          <context value="srcGemMed"/>
        </source>
        <dependent>
          <name value="ERPTPrescriptionStructureMapGEMMedication"/>
          <variable value="srcMedication"/>
          <variable value="tgtMedication"/>
        </dependent>
        <documentation
                       value="Führt die Transformation für gematik-Medikamente durch (abgegebene Arzneimittel aus der Apotheke)"/>
      </rule>
      <documentation
                     value="Erkennt gematik-Medikamente und leitet an spezialisiertes gematik-Mapping weiter"/>
    </rule>
  </group>
</StructureMap>