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

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

Draft as of 2026-05-26

Raw xml | Download

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

    </span><span style="color: navy">// </span><span style="color: green">Maps GEM ERP Medication to BfArM T-Prescription Medication format</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>gematikMedication <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>bfarmMedication <b>as </b><b>target</b>

    <span style="color: navy">// </span><span style="color: green">Mapping-Anweisungen zur Transformation von gematik ERP-Medikamenten zu BfArM T-Prescription Format</span>
    <b>group </b>ERPTPrescriptionStructureMapGEMMedication<span style="color: navy">(</span><b>source</b> <span style="color: maroon">gematikMedication</span><span style="color: navy"> : </span>gematikMedication, <b>target</b> <span style="color: maroon">bfarmMedication</span><span style="color: navy"> : </span>bfarmMedication<span style="color: navy">)</span><span style="color: navy"> {
    </span>  gematikMedication.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>
      gematikMedication.contained<b> as </b><span style="color: maroon">ContainedVar</span><span style="color: navy"><b> -&gt; </b></span>bfarmMedication.contained = <span style="color: maroon">ContainedVar</span> <i>&quot;mapContainedRessources&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">Kopiert eingebettete Ressourcen (z.B. referenzierte Medications oder Organizations)</span>
      gematikMedication.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"> {
    </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"> {
    </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</span>
        <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 N1, N2, N3)</span>
        extVar<b> where </b>url='https://gematik.de/fhir/epa-medication/StructureDefinition/medication-formulation-packaging-extension'<span style="color: navy"><b> -&gt; </b></span>tgtExtVar.url = <span style="color: blue">'https://gematik.de/fhir/epa-medication/StructureDefinition/medication-formulation-packaging-extension'</span><b> then</b><span style="color: navy"> {
    </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 Verpackungs-Extension</span>
        <span style="color: navy">}</span> <i>&quot;copyPackagingExtensionUrl&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">Übernimmt die gematik-Verpackungs-Extension für Formulierungen</span>
      <span style="color: navy">}</span> <i>&quot;medicationExtension&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">Mappt gematik-spezifische Medication-Extensions zu BfArM-Format</span>
      gematikMedication.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 oder andere Identifikation) des abgegebenen Arzneimittels</span>
      gematikMedication.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 des tatsächlich abgegebenen Arzneimittels</span>
      gematikMedication.amount<b> as </b><span style="color: maroon">amountVar</span><span style="color: navy"><b> -&gt; </b></span>bfarmMedication.amount = <span style="color: maroon">amountVar</span> <i>&quot;medicationAmount&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">Kopiert die Mengenangaben des abgegebenen Arzneimittels (tatsächlich ausgehändigte Menge)</span>
      gematikMedication.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">Übernimmt Wirkstoffinformationen des abgegebenen Arzneimittels (falls vorhanden)</span>
    <span style="color: navy">}

    </span></pre></div>
      </text>
      <url
           value="https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapGEMMedication"/>
      <version value="2.0.0-ballot.1"/>
      <name value="ERPTPrescriptionStructureMapGEMMedication"/>
      <title value="E-T-Rezept Structure Map for Medication"/>
      <status value="draft"/>
      <experimental value="false"/>
      <date value="2026-05-26"/>
      <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="Maps GEM ERP Medication to BfArM T-Prescription Medication format"/>
      <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="gematikMedication"/>
      </structure>
      <structure>
        <url value="http://hl7.org/fhir/StructureDefinition/Medication"/>
        <mode value="target"/>
        <alias value="bfarmMedication"/>
      </structure>
      <group>
        <name value="ERPTPrescriptionStructureMapGEMMedication"/>
        <typeMode value="none"/>
        <documentation
                       value="Mapping-Anweisungen zur Transformation von gematik ERP-Medikamenten zu BfArM T-Prescription Format"/>
        <input>
          <name value="gematikMedication"/>
          <type value="gematikMedication"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="bfarmMedication"/>
          <type value="bfarmMedication"/>
          <mode value="target"/>
        </input>
        <rule>
          <name value="medicationId"/>
          <source>
            <context value="gematikMedication"/>
            <element value="id"/>
            <variable value="IdVar"/>
          </source>
          <target>
            <context value="bfarmMedication"/>
            <contextType value="variable"/>
            <element value="id"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="IdVar"/>
            </parameter>
          </target>
          <documentation
                         value="Übernimmt die eindeutige Medication-ID unverändert"/>
        </rule>
        <rule>
          <name value="mapContainedRessources"/>
          <source>
            <context value="gematikMedication"/>
            <element value="contained"/>
            <variable value="ContainedVar"/>
          </source>
          <target>
            <context value="bfarmMedication"/>
            <contextType value="variable"/>
            <element value="contained"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="ContainedVar"/>
            </parameter>
          </target>
          <documentation
                         value="Kopiert eingebettete Ressourcen (z.B. referenzierte Medications oder Organizations)"/>
        </rule>
        <rule>
          <name value="medicationExtension"/>
          <source>
            <context value="gematikMedication"/>
            <element value="extension"/>
            <variable value="extVar"/>
          </source>
          <target>
            <context value="bfarmMedication"/>
            <contextType value="variable"/>
            <element value="extension"/>
            <variable value="tgtExtVar"/>
          </target>
          <rule>
            <name value="copyNormgroesseExtensionUrl"/>
            <source>
              <context value="extVar"/>
              <condition
                         value="url='http://fhir.de/StructureDefinition/normgroesse'"/>
            </source>
            <target>
              <context value="tgtExtVar"/>
              <contextType value="variable"/>
              <element value="url"/>
              <transform value="copy"/>
              <parameter>
                <valueString
                             value="http://fhir.de/StructureDefinition/normgroesse"/>
              </parameter>
            </target>
            <rule>
              <name value="copyExtensionValue"/>
              <source>
                <context value="extVar"/>
                <element value="value"/>
                <variable value="extValVar"/>
              </source>
              <target>
                <context value="tgtExtVar"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="extValVar"/>
                </parameter>
              </target>
              <documentation value="Kopiert den Wert der Normgröße-Extension"/>
            </rule>
            <documentation
                           value="Übernimmt die Normgröße-Extension unverändert (deutsche Packungsgrößenangabe N1, N2, N3)"/>
          </rule>
          <rule>
            <name value="copyPackagingExtensionUrl"/>
            <source>
              <context value="extVar"/>
              <condition
                         value="url='https://gematik.de/fhir/epa-medication/StructureDefinition/medication-formulation-packaging-extension'"/>
            </source>
            <target>
              <context value="tgtExtVar"/>
              <contextType value="variable"/>
              <element value="url"/>
              <transform value="copy"/>
              <parameter>
                <valueString
                             value="https://gematik.de/fhir/epa-medication/StructureDefinition/medication-formulation-packaging-extension"/>
              </parameter>
            </target>
            <rule>
              <name value="copyExtensionValue"/>
              <source>
                <context value="extVar"/>
                <element value="value"/>
                <variable value="extValVar"/>
              </source>
              <target>
                <context value="tgtExtVar"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="extValVar"/>
                </parameter>
              </target>
              <documentation value="Kopiert den Wert der Verpackungs-Extension"/>
            </rule>
            <documentation
                           value="Übernimmt die gematik-Verpackungs-Extension für Formulierungen"/>
          </rule>
          <documentation
                         value="Mappt gematik-spezifische Medication-Extensions zu BfArM-Format"/>
        </rule>
        <rule>
          <name value="medicationCode"/>
          <source>
            <context value="gematikMedication"/>
            <element value="code"/>
            <variable value="codeVar"/>
          </source>
          <target>
            <context value="bfarmMedication"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="codeVar"/>
            </parameter>
          </target>
          <documentation
                         value="Kopiert den Medikamentencode (PZN oder andere Identifikation) des abgegebenen Arzneimittels"/>
        </rule>
        <rule>
          <name value="medicationForm"/>
          <source>
            <context value="gematikMedication"/>
            <element value="form"/>
            <variable value="formVar"/>
          </source>
          <target>
            <context value="bfarmMedication"/>
            <contextType value="variable"/>
            <element value="form"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="formVar"/>
            </parameter>
          </target>
          <documentation
                         value="Übernimmt die Darreichungsform des tatsächlich abgegebenen Arzneimittels"/>
        </rule>
        <rule>
          <name value="medicationAmount"/>
          <source>
            <context value="gematikMedication"/>
            <element value="amount"/>
            <variable value="amountVar"/>
          </source>
          <target>
            <context value="bfarmMedication"/>
            <contextType value="variable"/>
            <element value="amount"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="amountVar"/>
            </parameter>
          </target>
          <documentation
                         value="Kopiert die Mengenangaben des abgegebenen Arzneimittels (tatsächlich ausgehändigte Menge)"/>
        </rule>
        <rule>
          <name value="medicationIngredient"/>
          <source>
            <context value="gematikMedication"/>
            <element value="ingredient"/>
            <variable value="ingredientVar"/>
          </source>
          <target>
            <context value="bfarmMedication"/>
            <contextType value="variable"/>
            <element value="ingredient"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="ingredientVar"/>
            </parameter>
          </target>
          <documentation
                         value="Übernimmt Wirkstoffinformationen des abgegebenen Arzneimittels (falls vorhanden)"/>
        </rule>
      </group>
    </StructureMap>