E-T-Rezept Datenaustausch
Version 1.2.0 - release

StructureMap: E-T-Rezept Structure Map for KBV FreeText Medication

Offizielle URL: https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapKBVFreeTextMedication Version: 1.2.0
Active Stand: 2026-07-27 Maschinenlesbarer Name: ERPTPrescriptionStructureMapKBVFreeTextMedication

Maps KBV FreeText Medication to BfArM T-Prescription Medication format

Language: de

map "https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapKBVFreeTextMedication" = "ERPTPrescriptionStructureMapKBVFreeTextMedication"

// Maps KBV FreeText Medication to BfArM T-Prescription Medication format

uses "http://hl7.org/fhir/StructureDefinition/Medication" alias kbvMedicationFreeText as source
uses "http://hl7.org/fhir/StructureDefinition/Medication" alias bfarmMedication as target

// Mapping-Anweisungen zur Transformation von KBV Freitext-Medikamenten zu BfArM T-Prescription Format
group ERPTPrescriptionStructureMapKBVFreeTextMedication(source kbvMedicationFreeText : kbvMedicationFreeText, target bfarmMedication : bfarmMedication) {
  // Übernimmt die eindeutige Medication-ID unverändert
  kbvMedicationFreeText.id as IdVar -> bfarmMedication.id = IdVar "medicationId";
  // Mappt den Medikamentencode mit Freitext-Beschreibung
  kbvMedicationFreeText.code as srcCodeVar -> bfarmMedication.code as tgtCodeVar then {
    // Kopiert die Freitext-Bezeichnung des Medikaments (z.B. 'Aspirin 500mg Tabletten')
    srcCodeVar.text as srcCodeTextVar -> tgtCodeVar.text = srcCodeTextVar "medicationCodeText";
  } "medicationCode";
  // Mappt die Darreichungsform als Freitext
  kbvMedicationFreeText.form as srcFormVar -> bfarmMedication.form as tgtFormVar then {
    // Übernimmt die Freitext-Darreichungsform (z.B. 'Tabletten', 'Tropfen zum Einnehmen')
    srcFormVar.text as srcformTextVar -> tgtFormVar.text = srcformTextVar "medicationFormText";
  } "medicationForm";
}