FHIR © HL7.org  |  Server Home  |  XIG Home  |  XIG Stats  |  Server Source  |  FHIR  

FHIR IG Statistics: StructureMap/ERPTPrescriptionStructureMapKBVCompoundingMedication

Packagede.gematik.erp.t-prescription
Resource TypeStructureMap
IdERPTPrescriptionStructureMapKBVCompoundingMedication
FHIR VersionR4
Sourcehttps://simplifier.net/resolve?scope=de.gematik.erp.t-prescription@1.1.0-ballot-1&canonical=https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapKBVCompoundingMedication
URLhttps://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapKBVCompoundingMedication
Version1.0.0-ballot-1
Statusdraft
Date2025-07-07
NameERPTPrescriptionStructureMapKBVCompoundingMedication
TitleE-T-Rezept Structure Map for KBV Compounding Medication
DescriptionMaps KBV-Compounding ERP Medication to BfArM T-Prescription Medication format

Resources that use this resource

No resources found


Resources that this resource uses

No resources found


Narrative

No narrative content found in resource


Source

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