Operation API: Medikament ersetzen
Die Operation $replace
ermöglicht es, eine Medication- bzw. MedicationStatement-Instanz zu ersetzen. Dabei wird die MedicationStatement-Instanz mit dem Status stopped
gekennzeichnet. Wenn andere auf die Medication-Instanz referenzierte MedicationStatements die Zustände completed
, stopped
, on-hold
oder not-taken
haben, wird die entsprechende Medication auf inactive
gesetzt. Die Operation überprüft auch, ob die Medication aus dem Kontext von Verschreibungs- und Dispensierdaten entstanden ist. In diesem Fall wird der Zustand der Medication nicht verändert.
Die für die Ersetzung entstandene MedicationStatement-Instanz wird über die Extension: Replaces. mit der ersetzten Medication-Instanz referenziert. Durch diese Referenzierung ist klar erkennbar, dass die Medication durch eine andere ersetzt wurde. Das hilft bei der Historie der Medikationsinformationen.
Diese Operation muss auf der Instanzebene der MedicationStatement ausgeführt werden.
OperationDefinition
Operation Definition: Replace Medication Information
Geschäftslogik
Herkunftsnachweis
Der Herkunftsnachweis für die Werte aus den Input-Parametern (performer, enterer, author, unconfirmedAuthor und informant) MUSS in einer Provenance-Instanz mit dem Profil EPAProvenance gespeichert werden. Der Wert für den target
Parameter MUSS auf die spezifische Version der Ressourceninstanz verweisen.
Detaillierte Informationen zur Durchführung der Erstellung der Provenance-Instanz
EPAMedicationUniqueIdentifier
Anforderungen an den EPAMedicationUniqueIdentifier
Überprüfung der Telematik-ID bei einem Schreibvorgang
Jeder Lese- und Schreibvorgang erfordert die Authentifizierung der Leistungserbringerinstitution mittels OpenID Connect. Das signierte ID-Token des Identity Providers (IDP-Dienst) MUSS die Telematik-ID des zugreifenden Nutzers enthalten. Bei einem Schreibvorgang MUSS die Übereinstimmung der Telematik-ID des Nutzers überprüft und sichergestellt werden.
Überprüfung der Aktenidentität bei einem Schreibvorgang
Jeder Schreibvorgang in das Aktenkonto des Versicherten MUSS durch den Medciation Service dahingehend geprüft werden, dass der durch den HTTP Header angegebene Parameter x-insurantid
(Health Record Identifier) mit der per KVNR referenzierten Identität (Logical Reference in Element subject
bzw. patient
) in der zu schreibenden Instanz der FHIR-Ressource übereinstimmt.
Voraussetzungen
Dem Medication Service MÜSSEN zur Auswertung in Operationen für jede Aktivität die folgenden Informationen bereitstehen:
- Name des Nutzers
- Nutzergruppe/Rolle ((profession-)oid)
- Kennung (Telematik-ID oder KVNR)
- Hinweis auf eine gültige Befugnis des aktuellen Benutzers (requestor)
HTTP Header-Parameter
Ein ePA-Client MUSS die folgenden HTTP Header bei einer Anfrage an den Medication Service setzen:
Name | Anforderung | Datentyp | Beschreibung |
---|---|---|---|
x-insurantid | MUSS | String | Health Record Identifier |
x-useragent | KANN | String | User Agent Information |
X-Request-ID | MUSS | String | UUID der Nachricht |
Wiederholungsintervalle
Die folgenden Wiederholungsintervalle werden im Falle einer Fehlerantwort definiert:
- '409' Conflict (statusMismatch)
- etwa 24 Stunden
- '500' Internal Error
- etwa 10 Minuten
Erlaubte Nutzergruppen
professionOID |
---|
oid_versicherter |
oid_praxis_arzt |
oid_krankenhaus |
oid_institution |
oid_krankenhaus |
oid_institution-vorsorge-reha |
oid_zahnarztpraxis |
oid_praxis_psychotherapeut |
oid_institution-oegd |
oid_öffentliche_apotheke |
oid_institution-pflege |
oid_institution-geburtshilfe |
oid_praxis-physiotherapeut |
oid_institution-arbeitsmedizin |
Interaktion (MedicationStatement/[id]/$replace)
POST [base]/epa/medication/api/v1/fhir/MedicationStatement/[id]/$replace
OperationId: replaceMedicationInformation_MedicationSvc
Beispielanfrage
{ "resourceType": "Parameters", "id": "example-epa-op-replace-medication-input-parameters-1", "meta": { "profile": [ "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-op-replace-medication-in-parameters" ] }, "parameter": [ { "name": "replacement", "part": [ { "name": "medicationStatement", "resource": { "resourceType": "MedicationStatement", "id": "ExampleEpaReplaceMedicationStatementReplacement", "meta": { "profile": [ "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement" ] }, "subject": { "identifier": { "system": "http://fhir.de/sid/gkv/kvid-10", "value": "X110411319" } }, "status": "active", "medicationReference": { "reference": "Medication/ExampleEpaReplaceMedicationReplacementIBU800" }, "effectivePeriod": { "start": "2025-07-22" }, "dateAsserted": "2025-07-22", "informationSource": { "reference": "Practitioner/498c345f-31f5-4da6-9f04-00fa2bc8af7c" }, "dosage": [ { "timing": { "repeat": { "frequency": 1, "period": 1, "periodUnit": "d", "when": [ "NIGHT" ], "boundsDuration": { "value": 7, "code": "wk", "system": "http://unitsofmeasure.org", "unit": "Week" } } }, "doseAndRate": [ { "doseQuantity": { "value": 1, "code": "1", "system": "https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_BMP_DOSIEREINHEIT", "unit": "Stück" } } ] }, { "timing": { "repeat": { "frequency": 1, "period": 1, "periodUnit": "d", "when": [ "MORN" ], "boundsDuration": { "value": 7, "code": "wk", "system": "http://unitsofmeasure.org", "unit": "Week" } } }, "doseAndRate": [ { "doseQuantity": { "value": 2, "code": "1", "system": "https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_BMP_DOSIEREINHEIT", "unit": "Stück" } } ] } ] } }, { "name": "medication", "resource": { "resourceType": "Medication", "id": "ExampleEpaReplaceMedicationReplacementIBU800", "meta": { "profile": [ "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication" ] }, "code": { "coding": [ { "system": "http://fhir.de/CodeSystem/ifa/pzn", "code": "08545331", "display": "IBU-ratiopharm 800mg akut Schmerztabletten" }, { "system": "http://fhir.de/CodeSystem/bfarm/atc", "code": "M01AE01", "display": "Ibuprofen", "version": "2022" } ] }, "form": { "coding": [ { "system": "https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_DARREICHUNGSFORM", "code": "TAB", "display": "Tabletten", "version": "1.10" }, { "system": "http://standardterms.edqm.eu", "code": "12200", "display": "Tablet" }, { "system": "http://snomed.info/sct", "code": "385055001", "version": "http://snomed.info/sct/11000274103/version/20240515", "display": "Tablet (basic dose form)" } ] }, "status": "active", "amount": { "numerator": { "value": 50, "code": "{Tablet}", "system": "http://unitsofmeasure.org", "unit": "Tablet" }, "denominator": { "value": 1, "code": "{Package}", "system": "http://unitsofmeasure.org", "unit": "Package" } }, "ingredient": [ { "itemCodeableConcept": { "coding": [ { "code": "387207008", "system": "http://snomed.info/sct", "version": "http://snomed.info/sct/11000274103/version/20240515", "display": "Ibuprofen (substance)" } ] }, "strength": { "numerator": { "value": 400, "code": "mg", "system": "http://unitsofmeasure.org", "unit": "MilliGram" }, "denominator": { "value": 1, "code": "{Tablet}", "system": "http://unitsofmeasure.org", "unit": "Tablet" } } } ] } } ] }, { "name": "performer", "part": [ { "name": "organization", "resource": { "resourceType": "Organization", "id": "be51e0d2-783d-4e21-b16b-1a4cd7403515", "meta": { "tag": [ { "system": "https://gematik.de/fhir/directory/CodeSystem/Origin", "code": "ldap" } ], "profile": [ "https://gematik.de/fhir/directory/StructureDefinition/OrganizationDirectory" ] }, "identifier": [ { "system": "https://gematik.de/fhir/sid/telematik-id", "value": "9-2.58.00000040" } ], "active": true, "type": [ { "coding": [ { "code": "1.2.276.0.76.4.58", "system": "https://gematik.de/fhir/directory/CodeSystem/OrganizationProfessionOID", "display": "Betriebsstätte gematik" } ] } ], "name": "gematik GmbH", "alias": [ "gematik" ], "address": [ { "text": "gematik GmbH\nFriedrichstr. 136, \n10117 Berlin", "line": [ "Friedrichstr. 136" ], "city": "Berlin", "district": "Mitte", "state": "Berlin", "postalCode": "10117", "country": "DE" } ], "contact": [ { "purpose": { "coding": [ { "code": "ADMIN", "system": "http://terminology.hl7.org/CodeSystem/contactentity-type" } ] }, "name": { "text": "gematik ITSM" }, "telecom": [ { "system": "email", "value": "betrieb@gematik.de" } ] } ] } }, { "name": "practitioner", "resource": { "resourceType": "Practitioner", "id": "498c345f-31f5-4da6-9f04-00fa2bc8af7c", "meta": { "tag": [ { "system": "https://gematik.de/fhir/directory/CodeSystem/Origin", "code": "ldap" } ], "profile": [ "https://gematik.de/fhir/directory/StructureDefinition/PractitionerDirectory" ] }, "identifier": [ { "system": "https://gematik.de/fhir/sid/telematik-id", "value": "1-1.58.00000040" }, { "system": "https://fhir.kbv.de/NamingSystem/KBV_NS_Base_ANR", "value": "123456789" } ], "active": true, "qualification": [ { "code": { "coding": [ { "code": "1.2.276.0.76.4.31", "system": "https://gematik.de/fhir/directory/CodeSystem/PractitionerProfessionOID" } ] } }, { "code": { "coding": [ { "code": "010", "system": "urn:oid:1.2.276.0.76.5.514", "display": "FA Allgemeinmedizin" } ] } }, { "code": { "coding": [ { "code": "523", "system": "urn:oid:1.2.276.0.76.5.514", "display": "FA Innere Medizin und (SP) Gastroenterologie" } ] } } ], "name": [ { "prefix": [ "Dr." ], "given": [ "Max", "Manfred" ], "family": "Musterman", "text": "Dr. Max Manfred Mustermann" } ] } } ] } ] }
<Parameters xmlns="http://hl7.org/fhir"> <id value="example-epa-op-replace-medication-input-parameters-1" /> <meta> <profile value="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-op-replace-medication-in-parameters" /> </meta> <parameter> <name value="replacement" /> <part> <name value="medicationStatement" /> <resource> <MedicationStatement> <id value="ExampleEpaReplaceMedicationStatementReplacement" /> <meta> <profile value="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement" /> </meta> <status value="active" /> <medicationReference> <reference value="Medication/ExampleEpaReplaceMedicationReplacementIBU800" /> </medicationReference> <subject> <identifier> <system value="http://fhir.de/sid/gkv/kvid-10" /> <value value="X110411319" /> </identifier> </subject> <effectivePeriod> <start value="2025-07-22" /> </effectivePeriod> <dateAsserted value="2025-07-22" /> <informationSource> <reference value="Practitioner/498c345f-31f5-4da6-9f04-00fa2bc8af7c" /> </informationSource> <dosage> <timing> <repeat> <boundsDuration> <value value="7" /> <unit value="Week" /> <system value="http://unitsofmeasure.org" /> <code value="wk" /> </boundsDuration> <frequency value="1" /> <period value="1" /> <periodUnit value="d" /> <when value="NIGHT" /> </repeat> </timing> <doseAndRate> <doseQuantity> <value value="1" /> <unit value="Stück" /> <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_BMP_DOSIEREINHEIT" /> <code value="1" /> </doseQuantity> </doseAndRate> </dosage> <dosage> <timing> <repeat> <boundsDuration> <value value="7" /> <unit value="Week" /> <system value="http://unitsofmeasure.org" /> <code value="wk" /> </boundsDuration> <frequency value="1" /> <period value="1" /> <periodUnit value="d" /> <when value="MORN" /> </repeat> </timing> <doseAndRate> <doseQuantity> <value value="2" /> <unit value="Stück" /> <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_BMP_DOSIEREINHEIT" /> <code value="1" /> </doseQuantity> </doseAndRate> </dosage> </MedicationStatement> </resource> </part> <part> <name value="medication" /> <resource> <Medication> <id value="ExampleEpaReplaceMedicationReplacementIBU800" /> <meta> <profile value="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication" /> </meta> <code> <coding> <system value="http://fhir.de/CodeSystem/ifa/pzn" /> <code value="08545331" /> <display value="IBU-ratiopharm 800mg akut Schmerztabletten" /> </coding> <coding> <system value="http://fhir.de/CodeSystem/bfarm/atc" /> <version value="2022" /> <code value="M01AE01" /> <display value="Ibuprofen" /> </coding> </code> <status value="active" /> <form> <coding> <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_DARREICHUNGSFORM" /> <version value="1.10" /> <code value="TAB" /> <display value="Tabletten" /> </coding> <coding> <system value="http://standardterms.edqm.eu" /> <code value="12200" /> <display value="Tablet" /> </coding> <coding> <system value="http://snomed.info/sct" /> <version value="http://snomed.info/sct/11000274103/version/20240515" /> <code value="385055001" /> <display value="Tablet (basic dose form)" /> </coding> </form> <amount> <numerator> <value value="50" /> <unit value="Tablet" /> <system value="http://unitsofmeasure.org" /> <code value="{Tablet}" /> </numerator> <denominator> <value value="1" /> <unit value="Package" /> <system value="http://unitsofmeasure.org" /> <code value="{Package}" /> </denominator> </amount> <ingredient> <itemCodeableConcept> <coding> <system value="http://snomed.info/sct" /> <version value="http://snomed.info/sct/11000274103/version/20240515" /> <code value="387207008" /> <display value="Ibuprofen (substance)" /> </coding> </itemCodeableConcept> <strength> <numerator> <value value="400" /> <unit value="MilliGram" /> <system value="http://unitsofmeasure.org" /> <code value="mg" /> </numerator> <denominator> <value value="1" /> <unit value="Tablet" /> <system value="http://unitsofmeasure.org" /> <code value="{Tablet}" /> </denominator> </strength> </ingredient> </Medication> </resource> </part> </parameter> <parameter> <name value="performer" /> <part> <name value="organization" /> <resource> <Organization> <id value="be51e0d2-783d-4e21-b16b-1a4cd7403515" /> <meta> <profile value="https://gematik.de/fhir/directory/StructureDefinition/OrganizationDirectory" /> <tag> <system value="https://gematik.de/fhir/directory/CodeSystem/Origin" /> <code value="ldap" /> </tag> </meta> <identifier> <system value="https://gematik.de/fhir/sid/telematik-id" /> <value value="9-2.58.00000040" /> </identifier> <active value="true" /> <type> <coding> <system value="https://gematik.de/fhir/directory/CodeSystem/OrganizationProfessionOID" /> <code value="1.2.276.0.76.4.58" /> <display value="Betriebsstätte gematik" /> </coding> </type> <name value="gematik GmbH" /> <alias value="gematik" /> <address> <text value="gematik GmbH\nFriedrichstr. 136, \n10117 Berlin" /> <line value="Friedrichstr. 136" /> <city value="Berlin" /> <district value="Mitte" /> <state value="Berlin" /> <postalCode value="10117" /> <country value="DE" /> </address> <contact> <purpose> <coding> <system value="http://terminology.hl7.org/CodeSystem/contactentity-type" /> <code value="ADMIN" /> </coding> </purpose> <name> <text value="gematik ITSM" /> </name> <telecom> <system value="email" /> <value value="betrieb@gematik.de" /> </telecom> </contact> </Organization> </resource> </part> <part> <name value="practitioner" /> <resource> <Practitioner> <id value="498c345f-31f5-4da6-9f04-00fa2bc8af7c" /> <meta> <profile value="https://gematik.de/fhir/directory/StructureDefinition/PractitionerDirectory" /> <tag> <system value="https://gematik.de/fhir/directory/CodeSystem/Origin" /> <code value="ldap" /> </tag> </meta> <identifier> <system value="https://gematik.de/fhir/sid/telematik-id" /> <value value="1-1.58.00000040" /> </identifier> <identifier> <system value="https://fhir.kbv.de/NamingSystem/KBV_NS_Base_ANR" /> <value value="123456789" /> </identifier> <active value="true" /> <name> <text value="Dr. Max Manfred Mustermann" /> <family value="Musterman" /> <given value="Max" /> <given value="Manfred" /> <prefix value="Dr." /> </name> <qualification> <code> <coding> <system value="https://gematik.de/fhir/directory/CodeSystem/PractitionerProfessionOID" /> <code value="1.2.276.0.76.4.31" /> </coding> </code> </qualification> <qualification> <code> <coding> <system value="urn:oid:1.2.276.0.76.5.514" /> <code value="010" /> <display value="FA Allgemeinmedizin" /> </coding> </code> </qualification> <qualification> <code> <coding> <system value="urn:oid:1.2.276.0.76.5.514" /> <code value="523" /> <display value="FA Innere Medizin und (SP) Gastroenterologie" /> </coding> </code> </qualification> </Practitioner> </resource> </part> </parameter> </Parameters>
Beispielantwort
{ "resourceType": "Parameters", "id": "example-epa-op-replace-medication-output-parameters-1", "meta": { "profile": [ "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-op-replace-medication-out-parameters" ] }, "parameter": [ { "name": "operationOutcome", "resource": { "resourceType": "OperationOutcome", "id": "255002c7-aa1b-4163-bdd4-ede482453cca", "meta": { "profile": [ "https://gematik.de/fhir/epa/StructureDefinition/epa-operation-outcome" ] }, "issue": [ { "severity": "information", "code": "informational", "details": { "coding": [ { "code": "MEDICATIONSVC_OPERATION_SUCCESS", "system": "https://gematik.de/fhir/epa/CodeSystem/epa-operation-outcome-codes-cs", "display": "Operation Successfully Completed in Medication Service" } ] } } ] } }, { "name": "replaced", "part": [ { "name": "medicationStatement", "resource": { "resourceType": "MedicationStatement", "id": "cf16af56-ab31-435f-86dd-c5fdea86271d", "meta": { "versionId": "2", "lastUpdated": "2025-07-22T14:43:34.244Z", "profile": [ "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement" ] }, "subject": { "identifier": { "system": "http://fhir.de/sid/gkv/kvid-10", "value": "X110411319" } }, "status": "stopped", "medicationReference": { "reference": "Medication/e3fd4ae7-fa81-414f-b12d-864cdad41de8" }, "effectivePeriod": { "start": "2025-07-22" }, "dateAsserted": "2025-07-22", "informationSource": { "reference": "Practitioner/498c345f-31f5-4da6-9f04-00fa2bc8af7c" }, "dosage": [ { "timing": { "repeat": { "frequency": 1, "period": 1, "periodUnit": "d", "when": [ "NIGHT" ], "boundsDuration": { "value": 7, "code": "wk", "system": "http://unitsofmeasure.org", "unit": "Week" } } }, "doseAndRate": [ { "doseQuantity": { "value": 1, "code": "1", "system": "https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_BMP_DOSIEREINHEIT", "unit": "Stück" } } ] }, { "timing": { "repeat": { "frequency": 1, "period": 1, "periodUnit": "d", "when": [ "MORN" ], "boundsDuration": { "value": 7, "code": "wk", "system": "http://unitsofmeasure.org", "unit": "Week" } } }, "doseAndRate": [ { "doseQuantity": { "value": 2, "code": "1", "system": "https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_BMP_DOSIEREINHEIT", "unit": "Stück" } } ] } ] } }, { "name": "medication", "resource": { "resourceType": "Medication", "id": "e3fd4ae7-fa81-414f-b12d-864cdad41de8", "meta": { "versionId": "2", "lastUpdated": "2025-07-22T14:43:34.244Z", "profile": [ "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication" ] }, "extension": [ { "url": "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-type-extension", "valueCoding": { "code": "781405001", "system": "http://snomed.info/sct", "version": "http://snomed.info/sct/11000274103/version/20240515", "display": "Medicinal product package (product)" } } ], "identifier": [ { "system": "https://gematik.de/fhir/epa-medication/sid/epa-medication-unique-identifier", "value": "B849184C973EA5FA7D9751E6FAA6AFCFFD100183596239F84DD2C0DB4C751D67" } ], "code": { "coding": [ { "system": "http://fhir.de/CodeSystem/ifa/pzn", "code": "10019621", "display": "IBU-ratiopharm 400mg akut Schmerztabletten" }, { "system": "http://fhir.de/CodeSystem/bfarm/atc", "code": "M01AE01", "display": "Ibuprofen", "version": "2022" } ] }, "form": { "coding": [ { "system": "https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_DARREICHUNGSFORM", "code": "TAB", "display": "Tabletten", "version": "1.10" }, { "system": "http://standardterms.edqm.eu", "code": "12200", "display": "Tablet" }, { "system": "http://snomed.info/sct", "code": "385055001", "version": "http://snomed.info/sct/11000274103/version/20240515", "display": "Tablet (basic dose form)" } ] }, "status": "inactive", "amount": { "numerator": { "value": 50, "code": "{Tablet}", "system": "http://unitsofmeasure.org", "unit": "Tablet" }, "denominator": { "value": 1, "code": "{Package}", "system": "http://unitsofmeasure.org", "unit": "Package" } }, "ingredient": [ { "itemCodeableConcept": { "coding": [ { "code": "387207008", "system": "http://snomed.info/sct", "version": "http://snomed.info/sct/11000274103/version/20240515", "display": "Ibuprofen (substance)" } ] }, "strength": { "numerator": { "value": 400, "code": "mg", "system": "http://unitsofmeasure.org", "unit": "MilliGram" }, "denominator": { "value": 1, "code": "{Tablet}", "system": "http://unitsofmeasure.org", "unit": "Tablet" } } } ] } } ] }, { "name": "new", "part": [ { "name": "medicationStatement", "resource": { "resourceType": "MedicationStatement", "id": "235ec2f5-6e68-4c70-ad45-79287487f3d8", "meta": { "versionId": "1", "lastUpdated": "2025-07-22T14:43:33.244Z", "profile": [ "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement" ] }, "subject": { "identifier": { "system": "http://fhir.de/sid/gkv/kvid-10", "value": "X110411319" } }, "status": "active", "medicationReference": { "reference": "Medication/ExampleEpaReplaceMedicationReplacementIBU800" }, "effectivePeriod": { "start": "2025-07-22" }, "dateAsserted": "2025-07-22", "informationSource": { "reference": "Practitioner/498c345f-31f5-4da6-9f04-00fa2bc8af7c" }, "dosage": [ { "timing": { "repeat": { "frequency": 1, "period": 1, "periodUnit": "d", "when": [ "NIGHT" ], "boundsDuration": { "value": 7, "code": "wk", "system": "http://unitsofmeasure.org", "unit": "Week" } } }, "doseAndRate": [ { "doseQuantity": { "value": 1, "code": "1", "system": "https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_BMP_DOSIEREINHEIT", "unit": "Stück" } } ] }, { "timing": { "repeat": { "frequency": 1, "period": 1, "periodUnit": "d", "when": [ "MORN" ], "boundsDuration": { "value": 7, "code": "wk", "system": "http://unitsofmeasure.org", "unit": "Week" } } }, "doseAndRate": [ { "doseQuantity": { "value": 2, "code": "1", "system": "https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_BMP_DOSIEREINHEIT", "unit": "Stück" } } ] } ] } }, { "name": "medication", "resource": { "resourceType": "Medication", "id": "2cb57b8b-bd90-46da-8a3d-d265e40bc3d1", "meta": { "versionId": "1", "lastUpdated": "2025-01-22T14:43:33.244Z", "profile": [ "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication" ] }, "extension": [ { "url": "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-type-extension", "valueCoding": { "code": "781405001", "system": "http://snomed.info/sct", "version": "http://snomed.info/sct/11000274103/version/20240515", "display": "Medicinal product package (product)" } } ], "identifier": [ { "system": "https://gematik.de/fhir/epa-medication/sid/epa-medication-unique-identifier", "value": "F78C093639F9C1AD216341E77BE87E265B6A04BF4C830E4C010676146D035CA6" } ], "code": { "coding": [ { "system": "http://fhir.de/CodeSystem/ifa/pzn", "code": "08545331", "display": "IBU-ratiopharm 800mg akut Schmerztabletten" }, { "system": "http://fhir.de/CodeSystem/bfarm/atc", "code": "M01AE01", "display": "Ibuprofen", "version": "2022" } ] }, "form": { "coding": [ { "system": "https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_DARREICHUNGSFORM", "code": "TAB", "display": "Tabletten", "version": "1.10" }, { "system": "http://standardterms.edqm.eu", "code": "12200", "display": "Tablet" }, { "system": "http://snomed.info/sct", "code": "385055001", "version": "http://snomed.info/sct/11000274103/version/20240515", "display": "Tablet (basic dose form)" } ] }, "status": "active", "amount": { "numerator": { "value": 50, "code": "{Tablet}", "system": "http://unitsofmeasure.org", "unit": "Tablet" }, "denominator": { "value": 1, "code": "{Package}", "system": "http://unitsofmeasure.org", "unit": "Package" } }, "ingredient": [ { "itemCodeableConcept": { "coding": [ { "code": "387207008", "system": "http://snomed.info/sct", "version": "http://snomed.info/sct/11000274103/version/20240515", "display": "Ibuprofen (substance)" } ] }, "strength": { "numerator": { "value": 400, "code": "mg", "system": "http://unitsofmeasure.org", "unit": "MilliGram" }, "denominator": { "value": 1, "code": "{Tablet}", "system": "http://unitsofmeasure.org", "unit": "Tablet" } } } ] } } ] } ] }
<Parameters xmlns="http://hl7.org/fhir"> <id value="example-epa-op-replace-medication-output-parameters-1" /> <meta> <profile value="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-op-replace-medication-out-parameters" /> </meta> <parameter> <name value="operationOutcome" /> <resource> <OperationOutcome> <id value="255002c7-aa1b-4163-bdd4-ede482453cca" /> <meta> <profile value="https://gematik.de/fhir/epa/StructureDefinition/epa-operation-outcome" /> </meta> <issue> <severity value="information" /> <code value="informational" /> <details> <coding> <system value="https://gematik.de/fhir/epa/CodeSystem/epa-operation-outcome-codes-cs" /> <code value="MEDICATIONSVC_OPERATION_SUCCESS" /> <display value="Operation Successfully Completed in Medication Service" /> </coding> </details> </issue> </OperationOutcome> </resource> </parameter> <parameter> <name value="replaced" /> <part> <name value="medicationStatement" /> <resource> <MedicationStatement> <id value="cf16af56-ab31-435f-86dd-c5fdea86271d" /> <meta> <versionId value="2" /> <lastUpdated value="2025-07-22T14:43:34.244Z" /> <profile value="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement" /> </meta> <status value="stopped" /> <medicationReference> <reference value="Medication/e3fd4ae7-fa81-414f-b12d-864cdad41de8" /> </medicationReference> <subject> <identifier> <system value="http://fhir.de/sid/gkv/kvid-10" /> <value value="X110411319" /> </identifier> </subject> <effectivePeriod> <start value="2025-07-22" /> </effectivePeriod> <dateAsserted value="2025-07-22" /> <informationSource> <reference value="Practitioner/498c345f-31f5-4da6-9f04-00fa2bc8af7c" /> </informationSource> <dosage> <timing> <repeat> <boundsDuration> <value value="7" /> <unit value="Week" /> <system value="http://unitsofmeasure.org" /> <code value="wk" /> </boundsDuration> <frequency value="1" /> <period value="1" /> <periodUnit value="d" /> <when value="NIGHT" /> </repeat> </timing> <doseAndRate> <doseQuantity> <value value="1" /> <unit value="Stück" /> <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_BMP_DOSIEREINHEIT" /> <code value="1" /> </doseQuantity> </doseAndRate> </dosage> <dosage> <timing> <repeat> <boundsDuration> <value value="7" /> <unit value="Week" /> <system value="http://unitsofmeasure.org" /> <code value="wk" /> </boundsDuration> <frequency value="1" /> <period value="1" /> <periodUnit value="d" /> <when value="MORN" /> </repeat> </timing> <doseAndRate> <doseQuantity> <value value="2" /> <unit value="Stück" /> <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_BMP_DOSIEREINHEIT" /> <code value="1" /> </doseQuantity> </doseAndRate> </dosage> </MedicationStatement> </resource> </part> <part> <name value="medication" /> <resource> <Medication> <id value="e3fd4ae7-fa81-414f-b12d-864cdad41de8" /> <meta> <versionId value="2" /> <lastUpdated value="2025-07-22T14:43:34.244Z" /> <profile value="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication" /> </meta> <extension url="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-type-extension"> <valueCoding> <system value="http://snomed.info/sct" /> <version value="http://snomed.info/sct/11000274103/version/20240515" /> <code value="781405001" /> <display value="Medicinal product package (product)" /> </valueCoding> </extension> <identifier> <system value="https://gematik.de/fhir/epa-medication/sid/epa-medication-unique-identifier" /> <value value="B849184C973EA5FA7D9751E6FAA6AFCFFD100183596239F84DD2C0DB4C751D67" /> </identifier> <code> <coding> <system value="http://fhir.de/CodeSystem/ifa/pzn" /> <code value="10019621" /> <display value="IBU-ratiopharm 400mg akut Schmerztabletten" /> </coding> <coding> <system value="http://fhir.de/CodeSystem/bfarm/atc" /> <version value="2022" /> <code value="M01AE01" /> <display value="Ibuprofen" /> </coding> </code> <status value="inactive" /> <form> <coding> <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_DARREICHUNGSFORM" /> <version value="1.10" /> <code value="TAB" /> <display value="Tabletten" /> </coding> <coding> <system value="http://standardterms.edqm.eu" /> <code value="12200" /> <display value="Tablet" /> </coding> <coding> <system value="http://snomed.info/sct" /> <version value="http://snomed.info/sct/11000274103/version/20240515" /> <code value="385055001" /> <display value="Tablet (basic dose form)" /> </coding> </form> <amount> <numerator> <value value="50" /> <unit value="Tablet" /> <system value="http://unitsofmeasure.org" /> <code value="{Tablet}" /> </numerator> <denominator> <value value="1" /> <unit value="Package" /> <system value="http://unitsofmeasure.org" /> <code value="{Package}" /> </denominator> </amount> <ingredient> <itemCodeableConcept> <coding> <system value="http://snomed.info/sct" /> <version value="http://snomed.info/sct/11000274103/version/20240515" /> <code value="387207008" /> <display value="Ibuprofen (substance)" /> </coding> </itemCodeableConcept> <strength> <numerator> <value value="400" /> <unit value="MilliGram" /> <system value="http://unitsofmeasure.org" /> <code value="mg" /> </numerator> <denominator> <value value="1" /> <unit value="Tablet" /> <system value="http://unitsofmeasure.org" /> <code value="{Tablet}" /> </denominator> </strength> </ingredient> </Medication> </resource> </part> </parameter> <parameter> <name value="new" /> <part> <name value="medicationStatement" /> <resource> <MedicationStatement> <id value="235ec2f5-6e68-4c70-ad45-79287487f3d8" /> <meta> <versionId value="1" /> <lastUpdated value="2025-07-22T14:43:33.244Z" /> <profile value="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement" /> </meta> <status value="active" /> <medicationReference> <reference value="Medication/ExampleEpaReplaceMedicationReplacementIBU800" /> </medicationReference> <subject> <identifier> <system value="http://fhir.de/sid/gkv/kvid-10" /> <value value="X110411319" /> </identifier> </subject> <effectivePeriod> <start value="2025-07-22" /> </effectivePeriod> <dateAsserted value="2025-07-22" /> <informationSource> <reference value="Practitioner/498c345f-31f5-4da6-9f04-00fa2bc8af7c" /> </informationSource> <dosage> <timing> <repeat> <boundsDuration> <value value="7" /> <unit value="Week" /> <system value="http://unitsofmeasure.org" /> <code value="wk" /> </boundsDuration> <frequency value="1" /> <period value="1" /> <periodUnit value="d" /> <when value="NIGHT" /> </repeat> </timing> <doseAndRate> <doseQuantity> <value value="1" /> <unit value="Stück" /> <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_BMP_DOSIEREINHEIT" /> <code value="1" /> </doseQuantity> </doseAndRate> </dosage> <dosage> <timing> <repeat> <boundsDuration> <value value="7" /> <unit value="Week" /> <system value="http://unitsofmeasure.org" /> <code value="wk" /> </boundsDuration> <frequency value="1" /> <period value="1" /> <periodUnit value="d" /> <when value="MORN" /> </repeat> </timing> <doseAndRate> <doseQuantity> <value value="2" /> <unit value="Stück" /> <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_BMP_DOSIEREINHEIT" /> <code value="1" /> </doseQuantity> </doseAndRate> </dosage> </MedicationStatement> </resource> </part> <part> <name value="medication" /> <resource> <Medication> <id value="2cb57b8b-bd90-46da-8a3d-d265e40bc3d1" /> <meta> <versionId value="1" /> <lastUpdated value="2025-01-22T14:43:33.244Z" /> <profile value="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication" /> </meta> <extension url="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-type-extension"> <valueCoding> <system value="http://snomed.info/sct" /> <version value="http://snomed.info/sct/11000274103/version/20240515" /> <code value="781405001" /> <display value="Medicinal product package (product)" /> </valueCoding> </extension> <identifier> <system value="https://gematik.de/fhir/epa-medication/sid/epa-medication-unique-identifier" /> <value value="F78C093639F9C1AD216341E77BE87E265B6A04BF4C830E4C010676146D035CA6" /> </identifier> <code> <coding> <system value="http://fhir.de/CodeSystem/ifa/pzn" /> <code value="08545331" /> <display value="IBU-ratiopharm 800mg akut Schmerztabletten" /> </coding> <coding> <system value="http://fhir.de/CodeSystem/bfarm/atc" /> <version value="2022" /> <code value="M01AE01" /> <display value="Ibuprofen" /> </coding> </code> <status value="active" /> <form> <coding> <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_DARREICHUNGSFORM" /> <version value="1.10" /> <code value="TAB" /> <display value="Tabletten" /> </coding> <coding> <system value="http://standardterms.edqm.eu" /> <code value="12200" /> <display value="Tablet" /> </coding> <coding> <system value="http://snomed.info/sct" /> <version value="http://snomed.info/sct/11000274103/version/20240515" /> <code value="385055001" /> <display value="Tablet (basic dose form)" /> </coding> </form> <amount> <numerator> <value value="50" /> <unit value="Tablet" /> <system value="http://unitsofmeasure.org" /> <code value="{Tablet}" /> </numerator> <denominator> <value value="1" /> <unit value="Package" /> <system value="http://unitsofmeasure.org" /> <code value="{Package}" /> </denominator> </amount> <ingredient> <itemCodeableConcept> <coding> <system value="http://snomed.info/sct" /> <version value="http://snomed.info/sct/11000274103/version/20240515" /> <code value="387207008" /> <display value="Ibuprofen (substance)" /> </coding> </itemCodeableConcept> <strength> <numerator> <value value="400" /> <unit value="MilliGram" /> <system value="http://unitsofmeasure.org" /> <code value="mg" /> </numerator> <denominator> <value value="1" /> <unit value="Tablet" /> <system value="http://unitsofmeasure.org" /> <code value="{Tablet}" /> </denominator> </strength> </ingredient> </Medication> </resource> </part> </parameter> </Parameters>
Antwort-Status-Codes
Status Code | Bedingung | Error Code | Bemerkung |
---|---|---|---|
200 | Successful operation | EPA OperationOutcome | |
400 | Invalid request | EPA OperationOutcome | |
403 | Requestor role is not in the list of allowed user groups | invalidOid | |
403 | Requestor is not entitled | notEntitled | |
403 | ID-Token or Insurant-ID mismatch | EPA OperationOutcome | |
404 | Resource is not known | EPA OperationOutcome | |
404 | Unknown resource type | EPA OperationOutcome | |
404 | Not Found | EPA OperationOutcome | |
404 | Health record is in state UNKNOWN or INITIALIZED | noHealthRecord | (siehe 'Wiederholungsintervalle') |
409 | Health record is in state SUSPENDED | statusMismatch | (siehe 'Wiederholungsintervalle') |
423 | If the insurant objected to the medication process or objected to the submission of prescription and dispensation data into the ePA system, the Medication Service is locked. | locked | |
500 | Any other error | internalError | (siehe 'Wiederholungsintervalle') |
Serviceübergreifende Error Codes ohne Verweis auf EPA OperationOutcome MÜSSEN mit dem entsprechenden HTTP Status Code vom Medication Service mit dem Media Type application/json
nach folgendem Schema zurückgegeben werden:
{ "errorCode": "statusMismatch" }