{
"description": "Maps KBV-Compounding ERP Medication to BfArM T-Prescription Medication format",
"_filename": "StructureMap-ERPTPrescriptionStructureMapKBVCompoundingMedication.json",
"package_name": "de.gematik.erp.t",
"date": "2025-07-07",
"group": [ {
"name": "ERPTPrescriptionStructureMapKBVCompoundingMedication",
"rule": [ {
"name": "medicationExt",
"rule": [ {
"name": "copyFormulaPackagingExtensionUrl",
"rule": [ {
"name": "copyExtensionValue",
"source": [ {
"context": "extMatchVar",
"element": "value",
"variable": "extValVar"
} ],
"target": [ {
"context": "tgtExtVar",
"element": "value",
"parameter": [ {
"valueId": "extValVar"
} ],
"transform": "copy",
"contextType": "variable"
} ],
"documentation": "Copies the the value for each Extension"
} ],
"source": [ {
"context": "extVar",
"variable": "extMatchVar",
"condition": "url='https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Packaging'"
} ],
"target": [ {
"context": "tgtExtVar",
"element": "url",
"parameter": [ {
"valueString": "https://gematik.de/fhir/epa-medication/StructureDefinition/medication-formulation-packaging-extension"
} ],
"transform": "copy",
"contextType": "variable"
} ]
} ],
"source": [ {
"context": "kbvMedicationCompounding",
"element": "extension",
"variable": "extVar"
} ],
"target": [ {
"context": "bfarmMedication",
"element": "extension",
"variable": "tgtExtVar",
"contextType": "variable"
} ],
"documentation": "Copies the Medication Extensions"
}, {
"name": "medicationId",
"source": [ {
"context": "kbvMedicationCompounding",
"element": "id",
"variable": "IdVar"
} ],
"target": [ {
"context": "bfarmMedication",
"element": "id",
"parameter": [ {
"valueId": "IdVar"
} ],
"transform": "copy",
"contextType": "variable"
} ],
"documentation": "Copies the Medication Id"
}, {
"name": "medicationCode",
"rule": [ {
"name": "medicationCodeText",
"source": [ {
"context": "srcCodeVar",
"element": "text",
"variable": "srcCodeTextVar"
} ],
"target": [ {
"context": "tgtCodeVar",
"element": "text",
"parameter": [ {
"valueId": "srcCodeTextVar"
} ],
"transform": "copy",
"contextType": "variable"
} ],
"documentation": "Copies the Medication Code Text"
} ],
"source": [ {
"context": "kbvMedicationCompounding",
"element": "code",
"variable": "srcCodeVar"
} ],
"target": [ {
"context": "bfarmMedication",
"element": "code",
"variable": "tgtCodeVar",
"contextType": "variable"
} ],
"documentation": "Copies the Medication Code"
}, {
"name": "medicationForm",
"source": [ {
"context": "kbvMedicationCompounding",
"element": "form",
"variable": "formVar"
} ],
"target": [ {
"context": "bfarmMedication",
"element": "form",
"parameter": [ {
"valueId": "formVar"
} ],
"transform": "copy",
"contextType": "variable"
} ],
"documentation": "Copies the Medication Form"
}, {
"name": "medicationAmount",
"rule": [ {
"name": "medicationAmountDenominator",
"source": [ {
"context": "amountVar",
"element": "denominator",
"variable": "amountDenominatorVar"
} ],
"target": [ {
"context": "tgtAmountVar",
"element": "denominator",
"parameter": [ {
"valueId": "amountDenominatorVar"
} ],
"transform": "copy",
"contextType": "variable"
} ]
}, {
"name": "medicationAmountNumerator",
"rule": [ {
"name": "medicationAmountExt",
"rule": [ {
"name": "copyPackagingSizeExtensionUrl",
"source": [ {
"context": "amountNumExtVar",
"condition": "url='https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_PackagingSize'"
} ],
"target": [ {
"context": "tgtAmountNumExtVar",
"element": "url",
"parameter": [ {
"valueString": "https://gematik.de/fhir/epa-medication/StructureDefinition/medication-packaging-size-extension"
} ],
"transform": "copy",
"contextType": "variable"
} ]
}, {
"name": "copyExtensionValue",
"source": [ {
"context": "amountNumExtVar",
"element": "value",
"variable": "extValVar"
} ],
"target": [ {
"context": "tgtAmountNumExtVar",
"element": "value",
"parameter": [ {
"valueId": "extValVar"
} ],
"transform": "copy",
"contextType": "variable"
} ],
"documentation": "Copies the the value for each Extension"
} ],
"source": [ {
"context": "amountNumeratorVar",
"element": "extension",
"variable": "amountNumExtVar"
} ],
"target": [ {
"context": "tgtAmountNumeratorVar",
"element": "extension",
"variable": "tgtAmountNumExtVar",
"contextType": "variable"
} ],
"documentation": "Copies the Medication Extensions"
}, {
"name": "medicationAmountNumeratorValue",
"source": [ {
"context": "amountNumeratorVar",
"element": "value",
"variable": "amountNumeratorValueVar"
} ],
"target": [ {
"context": "tgtAmountNumeratorVar",
"element": "value",
"parameter": [ {
"valueId": "amountNumeratorValueVar"
} ],
"transform": "copy",
"contextType": "variable"
} ]
}, {
"name": "medicationAmountNumeratorUnit",
"source": [ {
"context": "amountNumeratorVar",
"element": "unit",
"variable": "amountNumeratorUnitVar"
} ],
"target": [ {
"context": "tgtAmountNumeratorVar",
"element": "unit",
"parameter": [ {
"valueId": "amountNumeratorUnitVar"
} ],
"transform": "copy",
"contextType": "variable"
} ]
}, {
"name": "medicationAmountNumeratorSystem",
"source": [ {
"context": "amountNumeratorVar",
"element": "system",
"variable": "amountNumeratorSystemVar"
} ],
"target": [ {
"context": "tgtAmountNumeratorVar",
"element": "system",
"parameter": [ {
"valueId": "amountNumeratorSystemVar"
} ],
"transform": "copy",
"contextType": "variable"
} ]
}, {
"name": "medicationAmountNumeratorCode",
"source": [ {
"context": "amountNumeratorVar",
"element": "code",
"variable": "amountNumeratorCodeVar"
} ],
"target": [ {
"context": "tgtAmountNumeratorVar",
"element": "code",
"parameter": [ {
"valueId": "amountNumeratorCodeVar"
} ],
"transform": "copy",
"contextType": "variable"
} ]
} ],
"source": [ {
"context": "amountVar",
"element": "numerator",
"variable": "amountNumeratorVar"
} ],
"target": [ {
"context": "tgtAmountVar",
"element": "numerator",
"variable": "tgtAmountNumeratorVar",
"contextType": "variable"
} ]
} ],
"source": [ {
"context": "kbvMedicationCompounding",
"element": "amount",
"variable": "amountVar"
} ],
"target": [ {
"context": "bfarmMedication",
"element": "amount",
"variable": "tgtAmountVar",
"contextType": "variable"
} ],
"documentation": "Copies the Medication Amount"
}, {
"name": "medicationIngredient",
"rule": [ {
"name": "medicationIngredientItemValue",
"source": [ {
"context": "ingredientVar",
"element": "item",
"variable": "IngredientItemValueVar"
} ],
"target": [ {
"context": "tgtIngredientVar",
"element": "item",
"parameter": [ {
"valueId": "IngredientItemValueVar"
} ],
"transform": "copy",
"contextType": "variable"
} ]
}, {
"name": "medicationIngredientExt",
"rule": [ {
"name": "copyPackagingSizeExtensionUrl",
"rule": [ {
"name": "copyExtensionValue",
"source": [ {
"context": "IngredientExtVar",
"element": "value",
"variable": "extValVar"
} ],
"target": [ {
"context": "tgtIngredientExtVar",
"element": "value",
"parameter": [ {
"valueId": "extValVar"
} ],
"transform": "copy",
"contextType": "variable"
} ],
"documentation": "Copies the the value for each Extension"
} ],
"source": [ {
"context": "IngredientExtVar",
"condition": "url='https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Ingredient_Form'"
} ],
"target": [ {
"context": "tgtIngredientExtVar",
"element": "url",
"parameter": [ {
"valueString": "https://gematik.de/fhir/epa-medication/StructureDefinition/medication-ingredient-darreichungsform-extension"
} ],
"transform": "copy",
"contextType": "variable"
} ]
} ],
"source": [ {
"context": "ingredientVar",
"element": "extension",
"variable": "IngredientExtVar"
} ],
"target": [ {
"context": "tgtIngredientVar",
"element": "extension",
"variable": "tgtIngredientExtVar",
"contextType": "variable"
} ],
"documentation": "Copies the Medication Extensions"
}, {
"name": "medicationIngredientStrength",
"rule": [ {
"name": "medicationIngredientDenominator",
"source": [ {
"context": "IngredientStrengthValueVar",
"element": "denominator",
"variable": "ingredientDenominatorVar"
} ],
"target": [ {
"context": "IngredientStrengthValueVar",
"element": "denominator",
"parameter": [ {
"valueId": "ingredientDenominatorVar"
} ],
"transform": "copy",
"contextType": "variable"
} ]
}, {
"name": "medicationIngredientNumerator",
"source": [ {
"context": "IngredientStrengthValueVar",
"element": "numerator",
"variable": "ingredientNumeratorVar"
} ],
"target": [ {
"context": "IngredientStrengthValueVar",
"element": "numerator",
"parameter": [ {
"valueId": "ingredientNumeratorVar"
} ],
"transform": "copy",
"contextType": "variable"
} ]
}, {
"name": "medicationIngredientStrengthExt",
"rule": [ {
"name": "copyPackagingSizeExtensionUrl",
"rule": [ {
"name": "copyExtensionValue",
"source": [ {
"context": "IngredientStrExtVar",
"element": "value",
"variable": "extValVar"
} ],
"target": [ {
"context": "tgtIngredientStrExtVar",
"element": "value",
"parameter": [ {
"valueId": "extValVar"
} ],
"transform": "copy",
"contextType": "variable"
} ],
"documentation": "Copies the the value for each Extension"
} ],
"source": [ {
"context": "IngredientStrExtVar",
"condition": "url='https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Ingredient_Amount'"
} ],
"target": [ {
"context": "tgtIngredientStrExtVar",
"element": "url",
"parameter": [ {
"valueString": "https://gematik.de/fhir/epa-medication/StructureDefinition/medication-ingredient-amount-extension"
} ],
"transform": "copy",
"contextType": "variable"
} ]
} ],
"source": [ {
"context": "IngredientStrengthValueVar",
"element": "extension",
"variable": "IngredientStrExtVar"
} ],
"target": [ {
"context": "IngredientStrengthValueVar",
"element": "extension",
"variable": "tgtIngredientStrExtVar",
"contextType": "variable"
} ],
"documentation": "Copies the Ingredient Strength Extensions"
} ],
"source": [ {
"context": "ingredientVar",
"element": "strength",
"variable": "IngredientStrengthValueVar"
} ],
"target": [ {
"context": "tgtIngredientVar",
"element": "strength",
"variable": "IngredientStrengthValueVar",
"contextType": "variable"
} ]
} ],
"source": [ {
"context": "kbvMedicationCompounding",
"element": "ingredient",
"variable": "ingredientVar"
} ],
"target": [ {
"context": "bfarmMedication",
"element": "ingredient",
"variable": "tgtIngredientVar",
"contextType": "variable"
} ]
} ],
"input": [ {
"mode": "source",
"name": "kbvMedicationCompounding",
"type": "kbvMedicationCompounding"
}, {
"mode": "target",
"name": "bfarmMedication",
"type": "bfarmMedication"
} ],
"typeMode": "none",
"documentation": "Mapping group for medication information transformation"
} ],
"publisher": null,
"name": "ERPTPrescriptionStructureMapKBVCompoundingMedication",
"type": null,
"experimental": "false",
"resourceType": "StructureMap",
"title": "E-T-Rezept Structure Map for KBV Compounding Medication",
"package_version": "prescription-1.1.0-ballot-1",
"structure": [ {
"url": "http://hl7.org/fhir/StructureDefinition/Medication",
"mode": "source",
"alias": "kbvMedicationCompounding"
}, {
"url": "http://hl7.org/fhir/StructureDefinition/Medication",
"mode": "target",
"alias": "bfarmMedication"
} ],
"status": "draft",
"id": "d5083ef0-2787-4153-90ae-20fb187722f8",
"kind": null,
"url": "https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapKBVCompoundingMedication",
"version": "1.0.0-ballot-1"
}