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

FHIR IG Statistics: StructureMap/ERPTPrescriptionStructureMapCarbonCopy

Packagede.gematik.erp.t-prescription
Resource TypeStructureMap
IdERPTPrescriptionStructureMapCarbonCopy
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/ERPTPrescriptionStructureMapCarbonCopy
URLhttps://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapCarbonCopy
Version1.0.0-ballot-1
Statusdraft
Date2025-07-07
NameERPTPrescriptionStructureMapCarbonCopy
TitleE-T-Rezept Structure Map for CarbonCopy
DescriptionDiese Ressource beschreibt das Mapping und führt die Mappings aller Teilressourcen zusammen. Weitere Informationen und Beschreibungen zum Mapping können auf der Seite [Mapping des digitalen Durchschlag E-T-Rezept](./trezept.html#mapping-des-digitalen-durchschlag-e-t-rezept) eingesehen werden.

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": "ERPTPrescriptionStructureMapCarbonCopy",
  "url": "https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapCarbonCopy",
  "title": "E-T-Rezept Structure Map for CarbonCopy",
  "description": "Diese Ressource beschreibt das Mapping und führt die Mappings aller Teilressourcen zusammen. Weitere Informationen und Beschreibungen zum Mapping können auf der Seite [Mapping des digitalen Durchschlag E-T-Rezept](./trezept.html#mapping-des-digitalen-durchschlag-e-t-rezept) eingesehen werden.",
  "import": [
    "https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapMedicationDispense",
    "https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapMedicationRequest",
    "https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapOrganization",
    "https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapTask",
    "https://gematik.de/fhir/erp-t-prescription/StructureMap/ERPTPrescriptionStructureMapMedication"
  ],
  "structure": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/Bundle",
      "mode": "source",
      "alias": "bundle"
    },
    {
      "url": "https://gematik.de/fhir/erp-t-prescription/StructureDefinition/erp-tprescription-carbon-copy",
      "mode": "target",
      "alias": "erpTCarbonCopy"
    }
  ],
  "group": [
    {
      "input": [
        {
          "name": "bundle",
          "type": "bundle",
          "mode": "source"
        },
        {
          "name": "erpTCarbonCopy",
          "type": "erpTCarbonCopy",
          "mode": "target"
        }
      ],
      "rule": [
        {
          "source": [
            {
              "context": "bundle"
            }
          ],
          "target": [
            {
              "contextType": "variable",
              "context": "erpTCarbonCopy",
              "element": "meta",
              "variable": "erpTCarbonCopyMeta"
            }
          ],
          "rule": [
            {
              "source": [
                {
                  "context": "bundle"
                }
              ],
              "target": [
                {
                  "parameter": [
                    {
                      "valueString": "https://gematik.de/fhir/erp-t-prescription/StructureDefinition/erp-tprescription-carbon-copy|1.0"
                    }
                  ],
                  "context": "erpTCarbonCopyMeta",
                  "contextType": "variable",
                  "element": "profile",
                  "transform": "copy"
                }
              ],
              "name": "tgtMetaProfile",
              "documentation": "Setzt das meta.profile des digitalen Durchschlags T-Rezept"
            }
          ],
          "name": "tgtMeta"
        },
        {
          "source": [
            {
              "context": "bundle"
            }
          ],
          "target": [
            {
              "contextType": "variable",
              "context": "erpTCarbonCopy",
              "element": "parameter",
              "variable": "tgtRxPrescription"
            },
            {
              "contextType": "variable",
              "context": "tgtRxPrescription",
              "element": "part",
              "variable": "tgtRxPrescriptionPartId"
            },
            {
              "contextType": "variable",
              "context": "tgtRxPrescription",
              "element": "part",
              "variable": "tgtRxPrescriptionPartMR"
            },
            {
              "contextType": "variable",
              "context": "tgtRxPrescription",
              "element": "part",
              "variable": "tgtRxPrescriptionPartMed"
            },
            {
              "parameter": [
                {
                  "valueString": "rxPrescription"
                }
              ],
              "context": "tgtRxPrescription",
              "contextType": "variable",
              "element": "name",
              "transform": "copy"
            }
          ],
          "rule": [
            {
              "source": [
                {
                  "context": "bundle",
                  "element": "entry",
                  "variable": "srcEntryVar"
                }
              ],
              "rule": [
                {
                  "source": [
                    {
                      "context": "srcEntryVar",
                      "element": "resource",
                      "variable": "srcEntryResourceVar"
                    }
                  ],
                  "rule": [
                    {
                      "source": [
                        {
                          "context": "srcEntryResourceVar",
                          "variable": "srcEntryTaskVar",
                          "condition": "ofType(Task)"
                        }
                      ],
                      "target": [
                        {
                          "parameter": [
                            {
                              "valueString": "prescriptionId"
                            }
                          ],
                          "context": "tgtRxPrescriptionPartId",
                          "contextType": "variable",
                          "element": "name",
                          "transform": "copy"
                        },
                        {
                          "parameter": [
                            {
                              "valueString": "Identifier"
                            }
                          ],
                          "context": "tgtRxPrescriptionPartId",
                          "contextType": "variable",
                          "element": "value",
                          "transform": "create",
                          "variable": "newIdentifier"
                        }
                      ],
                      "rule": [
                        {
                          "source": [
                            {
                              "context": "srcEntryTaskVar"
                            }
                          ],
                          "dependent": [
                            {
                              "variable": [
                                "srcEntryTaskVar",
                                "newIdentifier"
                              ],
                              "name": "ERPTPrescriptionStructureMapTask"
                            }
                          ],
                          "name": "parameterrXPrescriptionPartIdentifier"
                        }
                      ],
                      "name": "parameterrXPrescriptionPart",
                      "documentation": "Mappt die E-Rezept-ID des Tasks in den digitalen Durchschlag"
                    },
                    {
                      "source": [
                        {
                          "context": "srcEntryResourceVar",
                          "variable": "srcEntryBundleMRVar",
                          "condition": "ofType(MedicationRequest)"
                        }
                      ],
                      "target": [
                        {
                          "parameter": [
                            {
                              "valueString": "medicationRequest"
                            }
                          ],
                          "context": "tgtRxPrescriptionPartMR",
                          "contextType": "variable",
                          "element": "name",
                          "transform": "copy"
                        }
                      ],
                      "rule": [
                        {
                          "source": [
                            {
                              "context": "srcEntryBundleMRVar"
                            }
                          ],
                          "target": [
                            {
                              "parameter": [
                                {
                                  "valueString": "MedicationRequest"
                                }
                              ],
                              "context": "tgtRxPrescriptionPartMR",
                              "contextType": "variable",
                              "element": "resource",
                              "transform": "create",
                              "variable": "newMedicationRequest"
                            }
                          ],
                          "rule": [
                            {
                              "source": [
                                {
                                  "context": "srcEntryBundleMRVar"
                                }
                              ],
                              "dependent": [
                                {
                                  "variable": [
                                    "srcEntryBundleMRVar",
                                    "newMedicationRequest"
                                  ],
                                  "name": "ERPTPrescriptionStructureMapMedicationRequest"
                                }
                              ],
                              "name": "entryMedicationRequestPartResourceSet"
                            }
                          ],
                          "name": "entryMedicationRequestPart",
                          "documentation": "Mappt den KBV-MedicationRequest auf das BfArM MedicationRequest Zielprofil"
                        }
                      ],
                      "name": "entryMedicationRequest"
                    },
                    {
                      "source": [
                        {
                          "context": "srcEntryVar",
                          "variable": "srcMedicationRequestId",
                          "condition": "resource.ofType(MedicationRequest)"
                        }
                      ],
                      "target": [
                        {
                          "parameter": [
                            {
                              "valueString": "medication"
                            }
                          ],
                          "context": "tgtRxPrescriptionPartMed",
                          "contextType": "variable",
                          "element": "name",
                          "transform": "copy"
                        }
                      ],
                      "rule": [
                        {
                          "source": [
                            {
                              "context": "bundle",
                              "element": "entry",
                              "variable": "srcEntryVar2"
                            }
                          ],
                          "rule": [
                            {
                              "source": [
                                {
                                  "context": "srcEntryVar2",
                                  "variable": "srcEntryBundleMRMedIdVar",
                                  "condition": "resource.ofType(Medication).where(id=%srcMedicationRequestId.resource.medication.reference.replace('Medication/', '').toString())"
                                }
                              ],
                              "target": [
                                {
                                  "parameter": [
                                    {
                                      "valueString": "Medication"
                                    }
                                  ],
                                  "context": "tgtRxPrescriptionPartMed",
                                  "contextType": "variable",
                                  "element": "resource",
                                  "transform": "create",
                                  "variable": "newMedicationPrescriptionMedication"
                                }
                              ],
                              "rule": [
                                {
                                  "source": [
                                    {
                                      "context": "srcEntryBundleMRMedIdVar",
                                      "variable": "srcEntryBundleMRMedIdVarRes",
                                      "element": "resource"
                                    }
                                  ],
                                  "dependent": [
                                    {
                                      "variable": [
                                        "srcEntryBundleMRMedIdVarRes",
                                        "newMedicationPrescriptionMedication"
                                      ],
                                      "name": "ERPTPrescriptionStructureMapMedication"
                                    }
                                  ],
                                  "name": "entryMedicationPrescriptionMedicationPartResourceSet"
                                }
                              ],
                              "name": "entryMedicationPrescriptionMedicationPart",
                              "documentation": "Mappt die KBV-Medication auf das BfArM Medication Zielprofil"
                            }
                          ],
                          "name": "prepMedication"
                        }
                      ],
                      "name": "entryMedicationRequestMedication"
                    }
                  ],
                  "name": "rxPrescriptionParameter"
                }
              ],
              "name": "bundleEntries"
            }
          ],
          "name": "rxPrescriptionRule",
          "documentation": "Mapping der Rezeptinformationen"
        },
        {
          "source": [
            {
              "context": "bundle"
            }
          ],
          "target": [
            {
              "contextType": "variable",
              "context": "erpTCarbonCopy",
              "element": "parameter",
              "variable": "tgtRxDispensation"
            },
            {
              "contextType": "variable",
              "context": "tgtRxDispensation",
              "element": "part",
              "variable": "tgtRxDispensationPartOrg"
            },
            {
              "parameter": [
                {
                  "valueString": "rxDispensation"
                }
              ],
              "context": "tgtRxDispensation",
              "contextType": "variable",
              "element": "name",
              "transform": "copy"
            }
          ],
          "rule": [
            {
              "source": [
                {
                  "context": "bundle",
                  "element": "entry",
                  "variable": "srcEntryVar"
                }
              ],
              "rule": [
                {
                  "source": [
                    {
                      "context": "srcEntryVar",
                      "element": "resource",
                      "variable": "srcEntryResourceVar"
                    }
                  ],
                  "rule": [
                    {
                      "source": [
                        {
                          "context": "srcEntryResourceVar",
                          "variable": "srcEntryBundleOrgVar",
                          "condition": "ofType(Bundle).where(entry.first().fullUrl.contains('fhir-directory'))"
                        }
                      ],
                      "target": [
                        {
                          "parameter": [
                            {
                              "valueString": "organization"
                            }
                          ],
                          "context": "tgtRxDispensationPartOrg",
                          "contextType": "variable",
                          "element": "name",
                          "transform": "copy"
                        }
                      ],
                      "rule": [
                        {
                          "source": [
                            {
                              "context": "srcEntryBundleOrgVar"
                            }
                          ],
                          "target": [
                            {
                              "parameter": [
                                {
                                  "valueString": "Organization"
                                }
                              ],
                              "context": "tgtRxDispensationPartOrg",
                              "contextType": "variable",
                              "element": "resource",
                              "transform": "create",
                              "variable": "newOrganization"
                            }
                          ],
                          "rule": [
                            {
                              "source": [
                                {
                                  "context": "srcEntryBundleOrgVar"
                                }
                              ],
                              "dependent": [
                                {
                                  "variable": [
                                    "srcEntryBundleOrgVar",
                                    "newOrganization"
                                  ],
                                  "name": "ERPTPrescriptionStructureMapOrganization"
                                }
                              ],
                              "name": "entryOrganizationPartResourceSet"
                            }
                          ],
                          "name": "entryOrganizationPart",
                          "documentation": "Mapping des FHIR-VZD Search Sets in eine BfArM Organization"
                        }
                      ],
                      "name": "entryVZDSearchSet"
                    },
                    {
                      "source": [
                        {
                          "context": "srcEntryResourceVar",
                          "variable": "srcEntryBundleMDVar",
                          "condition": "ofType(MedicationDispense)"
                        }
                      ],
                      "target": [
                        {
                          "contextType": "variable",
                          "context": "tgtRxDispensation",
                          "element": "part",
                          "variable": "tgtRxDispensationPartMD"
                        }
                      ],
                      "rule": [
                        {
                          "source": [
                            {
                              "context": "srcEntryBundleMDVar"
                            }
                          ],
                          "target": [
                            {
                              "parameter": [
                                {
                                  "valueString": "medicationDispense"
                                }
                              ],
                              "context": "tgtRxDispensationPartMD",
                              "contextType": "variable",
                              "element": "name",
                              "transform": "copy"
                            },
                            {
                              "parameter": [
                                {
                                  "valueString": "MedicationDispense"
                                }
                              ],
                              "context": "tgtRxDispensationPartMD",
                              "contextType": "variable",
                              "element": "resource",
                              "transform": "create",
                              "variable": "newMedicationDispense"
                            }
                          ],
                          "rule": [
                            {
                              "source": [
                                {
                                  "context": "srcEntryBundleMDVar"
                                }
                              ],
                              "dependent": [
                                {
                                  "variable": [
                                    "srcEntryBundleMDVar",
                                    "newMedicationDispense"
                                  ],
                                  "name": "ERPTPrescriptionStructureMapMedicationDispense"
                                }
                              ],
                              "name": "entryMedicationDispensePartResourceSet"
                            }
                          ],
                          "name": "entryMedicationDispensePart",
                          "documentation": "Mappt die Abgabeinforamtionen der Apotheke auf das BfArM MedicationDispense Zielprofil"
                        }
                      ],
                      "name": "entryMedicationDispense"
                    },
                    {
                      "source": [
                        {
                          "context": "srcEntryVar",
                          "variable": "srcMedicationDispenseId",
                          "condition": "resource.ofType(MedicationDispense)"
                        }
                      ],
                      "target": [
                        {
                          "contextType": "variable",
                          "context": "tgtRxDispensation",
                          "element": "part",
                          "variable": "tgtRxDispensationPartDispMed"
                        },
                        {
                          "parameter": [
                            {
                              "valueString": "medication"
                            }
                          ],
                          "context": "tgtRxDispensationPartDispMed",
                          "contextType": "variable",
                          "element": "name",
                          "transform": "copy"
                        }
                      ],
                      "rule": [
                        {
                          "source": [
                            {
                              "context": "bundle",
                              "element": "entry",
                              "variable": "srcEntryVar2"
                            }
                          ],
                          "rule": [
                            {
                              "source": [
                                {
                                  "context": "srcEntryVar2",
                                  "variable": "srcEntryBundleMDMedIdVar",
                                  "condition": "resource.ofType(Medication).where(id=%srcMedicationDispenseId.resource.medication.reference.replace('Medication/', '').toString())"
                                }
                              ],
                              "target": [
                                {
                                  "parameter": [
                                    {
                                      "valueString": "Medication"
                                    }
                                  ],
                                  "context": "tgtRxDispensationPartDispMed",
                                  "contextType": "variable",
                                  "element": "resource",
                                  "transform": "create",
                                  "variable": "newMedicationDispensationMedication"
                                }
                              ],
                              "rule": [
                                {
                                  "source": [
                                    {
                                      "context": "srcEntryBundleMDMedIdVar",
                                      "variable": "srcEntryBundleMDMedIdVarRes",
                                      "element": "resource"
                                    }
                                  ],
                                  "dependent": [
                                    {
                                      "variable": [
                                        "srcEntryBundleMDMedIdVarRes",
                                        "newMedicationDispensationMedication"
                                      ],
                                      "name": "ERPTPrescriptionStructureMapMedication"
                                    }
                                  ],
                                  "name": "entryMedicationDispensationMedicationPartResourceSet"
                                }
                              ],
                              "name": "entryMedicationDispensationMedicationPart",
                              "documentation": "Mappt die Informationen des abgegebenen Arzneimittels auf das BfArM Medication Zielprofil"
                            }
                          ],
                          "name": "prepMedication"
                        }
                      ],
                      "name": "entryMedicationDispenseMedication"
                    }
                  ],
                  "name": "rxDispensationParameter"
                }
              ],
              "name": "bundleEntries"
            }
          ],
          "name": "MedicationDispenseFromBundle",
          "documentation": "Mapping der Abgabeinformationen"
        }
      ],
      "name": "erpTPrescriptionCarbonCopy",
      "typeMode": "none",
      "documentation": "Mapping des digitalen Durchschlags T-Rezept"
    }
  ],
  "status": "draft",
  "version": "1.0.0-ballot-1",
  "date": "2025-07-07",
  "name": "ERPTPrescriptionStructureMapCarbonCopy",
  "experimental": false
}