TIFlow - Verordnungen für Arzneimittel
Version 2.0.0-ballot.1 - ci-build

## StructureMap: KBVPrErpMedicationPznMap

Official URL: https://gematik.de/fhir/structure-comparer/StructureMap/KBVPrErpMedicationPznMap | Version: 2.0.0-ballot.1
Active as of 2026-02-02 | Computable Name: KBVPrErpMedicationPznMap

Auto-generated StructureMap for KBV_PR_ERP_Medication_PZN | 1.4.0 -> EPAMedication | 1.3.0

### Feld-Mappings

Quelle (Eingangsdaten) | Ziel (Ausgabedaten) | Aktion | Transformation & Beschreibung
--- | --- | --- | ---
`KBVPRERPMedicationPZN` | `EPAMedication.extension` | Manuell | Fester Wert: 781405001, Medicinal product package (product) | Quelle: Medication.extension:type

### Extensions

#### Extension: KBV_EX_Base_Medication_Type

Bedingung: url = `https://fhir.kbv.de/StructureDefinition/KBV_EX_Base_Medication_Type`

Quelle (Eingangsdaten) | Ziel (Ausgabedaten) | Aktion | Transformation & Beschreibung
--- | --- | --- | ---
`KBVPRERPMedicationPZN.extension` `[Bedingung: url = 'https://fhir.kbv.de/StructureDefinition/KBV_EX_Base_Medication_Type']` | `EPAMedication.extension` | Nicht Übertragen | Feld wird nicht gemappt | Quelle: Medication.extension:Kategorie

#### Extension: KBV_EX_ERP_Medication_Category

Bedingung: url = `https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Category`

Quelle (Eingangsdaten) | Ziel (Ausgabedaten) | Aktion | Transformation & Beschreibung
--- | --- | --- | ---
`KBVPRERPMedicationPZN.extension` `[Bedingung: url = 'https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Category']` | `EPAMedication.extension.url` | Fester Wert | setzt festen Wert: `https://gematik.de/fhir/epa-medication/StructureDefinition/drug-category-extension`
`KBVPRERPMedicationPZN.extension.value` `[Bedingung: url = 'https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Category']` | `EPAMedication.extension.value.system` | Fester Wert | setzt festen Wert: `https://gematik.de/fhir/epa-medication/CodeSystem/epa-drug-category-cs`

#### Extension: KBV_EX_ERP_Medication_Vaccine

Bedingung: url = `https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Vaccine`

Quelle (Eingangsdaten) | Ziel (Ausgabedaten) | Aktion | Transformation & Beschreibung
--- | --- | --- | ---
`KBVPRERPMedicationPZN.extension` `[Bedingung: url = 'https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Vaccine']` | `EPAMedication.extension.url` | Fester Wert | setzt festen Wert: `https://gematik.de/fhir/epa-medication/StructureDefinition/medication-id-vaccine-extension`

#### Extension: normgroesse

Bedingung: url = `http://fhir.de/StructureDefinition/normgroesse`

Quelle (Eingangsdaten) | Ziel (Ausgabedaten) | Aktion | Transformation & Beschreibung
--- | --- | --- | ---
`KBVPRERPMedicationPZN.extension` `[Bedingung: url = 'http://fhir.de/StructureDefinition/normgroesse']` | `EPAMedication.extension.url` | Fester Wert | setzt festen Wert: `http://fhir.de/StructureDefinition/normgroesse`

    map "https://gematik.de/fhir/structure-comparer/StructureMap/KBVPrErpMedicationPznMap" = "KBVPrErpMedicationPznMap"

    // Auto-generated StructureMap for KBV_PR_ERP_Medication_PZN|1.4.0 -> EPAMedication|1.3.0

    uses "https://fhir.kbv.de/StructureDefinition/KBV_PR_ERP_Medication_PZN" alias KBVPRERPMedicationPZN as source
    uses "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication" alias EPAMedication as target

    // Mapping generated for KBV_PR_ERP_Medication_PZN|1.4.0 -> EPAMedication|1.3.0
    group KBVPrErpMedicationPznMap(source KBVPRERPMedicationPZN : KBVPRERPMedicationPZN, target EPAMedication : EPAMedication) <<types>> {
      KBVPRERPMedicationPZN.amount as srcKBVPRERPMedicationPZNAmount1bc52eb6 -> EPAMedication.amount = srcKBVPRERPMedicationPZNAmount1bc52eb6 as tgtEPAMedicationAmount30d45c22 "MedicationAmountac45bfbc"; // Automatic copy
      KBVPRERPMedicationPZN.batch as srcKBVPRERPMedicationPZNBatche87a138e -> EPAMedication.batch = srcKBVPRERPMedicationPZNBatche87a138e as tgtEPAMedicationBatch90ce2ac1 "MedicationBatch235a7d75"; // Copied to 'Medication.batch'
      KBVPRERPMedicationPZN.code as srcKBVPRERPMedicationPZNCodeaa13053d -> EPAMedication.code = srcKBVPRERPMedicationPZNCodeaa13053d as tgtEPAMedicationCodea6251800 "MedicationCoded98e85bf"; // Automatic copy
      KBVPRERPMedicationPZN.extension as srcKBVPRERPMedicationPZNExtension84c1ba51 where url != 'https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Category' and url != 'normSizeCode' and url != 'http://fhir.de/StructureDefinition/normgroesse' and url != 'Impfstoff' and url != 'https://fhir.kbv.de/StructureDefinition/KBV_EX_Base_Medication_Type' and url != 'valueCode' and url != 'valueBoolean' and url != 'valueCodeableConcept' and url != 'packaging' and url != 'valueCoding' and url != 'type' and url != 'Normgroesse' and url != 'https://gematik.de/fhir/epa-medication/StructureDefinition/medication-id-vaccine-extension' and url != 'manufacturingInstructions' and url != 'https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Vaccine' and url != 'Kategorie' and url != 'https://gematik.de/fhir/epa-medication/StructureDefinition/drug-category-extension' and url != 'drugCategory' and url != 'rxPrescriptionProcessIdentifier' and url != 'Arzneimittelkategorie' and url != 'isVaccine' -> EPAMedication.extension = srcKBVPRERPMedicationPZNExtension84c1ba51 as tgtEPAMedicationExtension59cd7688 "MedicationExtension9f8d5121"; // Automatic copy
      KBVPRERPMedicationPZN.extension where url = 'https://fhir.kbv.de/StructureDefinition/KBV_EX_Base_Medication_Type' -> EPAMedication.extension "MedicationExtensionKategorie86255b0b"; // Feld wird nicht gemappt | Quelle: Medication.extension:Kategorie
      KBVPRERPMedicationPZN.extension as srcKBVPRERPMedicationPZNExtensionArzneimittelkategorie53fe9037 where url = 'https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Category' and url = 'https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Category' ->  EPAMedication.extension = create('Extension') as tgtEPAMedicationExtensionDrugcategory059b5c6b,  tgtEPAMedicationExtensionDrugcategory059b5c6b.url = 'https://gematik.de/fhir/epa-medication/StructureDefinition/drug-category-extension' then {
        srcKBVPRERPMedicationPZNExtensionArzneimittelkategorie53fe9037.value as srcMedicationExtensionDrugcategoryValueXbd04993e -> tgtEPAMedicationExtensionDrugcategory059b5c6b.value = create('Coding') as tgtMedicationExtensionDrugcategoryValueXbd04993e then {
          srcMedicationExtensionDrugcategoryValueXbd04993e as srcMedicationExtensionDrugcategoryValueXSystem2cf01aef -> tgtMedicationExtensionDrugcategoryValueXbd04993e.system = 'https://gematik.de/fhir/epa-medication/CodeSystem/epa-drug-category-cs' as tgtMedicationExtensionDrugcategoryValueXSystem2cf01aef "MedicationExtensionDrugcategoryValueXSystem2cf01aef"; // Fixed value 'https://gematik.de/fhir/epa-medication/StructureDefinition/drug-category-extension'
          srcMedicationExtensionDrugcategoryValueXbd04993e.code as srcMedicationExtensionDrugcategoryValueXCodec72163f2 -> tgtMedicationExtensionDrugcategoryValueXbd04993e.code = srcMedicationExtensionDrugcategoryValueXCodec72163f2 as tgtMedicationExtensionDrugcategoryValueXCodec72163f2 "MedicationExtensionDrugcategoryValueXCodec72163f2"; // Copied drugCategory code
        } "MedicationExtensionDrugcategoryValueXbd04993e"; // Copied from 'Medication.extension:Arzneimittelkategorie.value[x]'
      } "MedicationExtensionDrugcategorye963e601"; // Copied from 'Medication.extension:Arzneimittelkategorie'
      KBVPRERPMedicationPZN.extension as srcKBVPRERPMedicationPZNExtensionImpfstoff35b2c2a5 where url = 'https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Vaccine' and url = 'https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Vaccine' ->  EPAMedication.extension = create('Extension') as tgtEPAMedicationExtensionIsvaccinea7742b5a,  tgtEPAMedicationExtensionIsvaccinea7742b5a.url = 'https://gematik.de/fhir/epa-medication/StructureDefinition/medication-id-vaccine-extension' then {
        srcKBVPRERPMedicationPZNExtensionImpfstoff35b2c2a5.value as srcMedicationExtensionIsvaccineValueXac9b8b1e -> tgtEPAMedicationExtensionIsvaccinea7742b5a.value = srcMedicationExtensionIsvaccineValueXac9b8b1e as tgtMedicationExtensionIsvaccineValueXac9b8b1e "MedicationExtensionIsvaccineValueXac9b8b1e"; // Copied from 'Medication.extension:Impfstoff.value[x]'
      } "MedicationExtensionIsvaccine98c25b06"; // Copied from 'Medication.extension:Impfstoff'
      KBVPRERPMedicationPZN.extension as srcKBVPRERPMedicationPZNExtensionNormgroesse9fd0c9a5 where url = 'http://fhir.de/StructureDefinition/normgroesse' and url = 'http://fhir.de/StructureDefinition/normgroesse' ->  EPAMedication.extension = create('Extension') as tgtEPAMedicationExtensionNormsizecode7bd0a39d,  tgtEPAMedicationExtensionNormsizecode7bd0a39d.url = 'http://fhir.de/StructureDefinition/normgroesse' then {
        srcKBVPRERPMedicationPZNExtensionNormgroesse9fd0c9a5.value as srcMedicationExtensionNormsizecodeValueX145c1bd0 -> tgtEPAMedicationExtensionNormsizecode7bd0a39d.value = srcMedicationExtensionNormsizecodeValueX145c1bd0 as tgtMedicationExtensionNormsizecodeValueX145c1bd0 "MedicationExtensionNormsizecodeValueX145c1bd0"; // Copied from 'Medication.extension:Normgroesse.value[x]'
      } "MedicationExtensionNormsizecode34ece564"; // Copied from 'Medication.extension:Normgroesse'
      KBVPRERPMedicationPZN as manualsrcMedicationExtensionType61374588 -> EPAMedication.extension as tgtEPAMedicationExtensionType1a2ef415 "MedicationExtensionType61374588"; // Manual action required | Fester Wert: 781405001, Medicinal product package (product) | Quelle: Medication.extension:type
      KBVPRERPMedicationPZN.form as srcKBVPRERPMedicationPZNForme6d03882 -> EPAMedication.form = srcKBVPRERPMedicationPZNForme6d03882 as tgtEPAMedicationForm691ed321 "MedicationForm5a0bbd5f"; // Automatic copy
      KBVPRERPMedicationPZN.ingredient as srcKBVPRERPMedicationPZNIngredient546feb94 -> EPAMedication.ingredient = create('BackboneElement') as tgtEPAMedicationIngredient78db398c "MedicationIngredient801affef"; // Automatic copy
    }