Operation API: Dispensierinformationen einstellen (E-Rezept-Fachdienst)
Die Operation $provide-dispensation-erp
im Medication Service dient dazu, Informationen über die Abgabe von Arzneimitteln, die auf Basis einer Verschreibung erfolgt, in den Medication Service einzutragen. Diese Operation wird vom E-Rezept-Fachdienst verwendet, wenn ein Versicherter sein Arzneimittel in einer Apotheke erhält. Sie dokumentiert, dass das Arzneimittel gemäß der Verschreibung abgegeben wurde, einschließlich der Details wie Menge, Abgabedatum und Informationen zur Apotheke. Dies ermöglicht einen vollständigen Überblick über die verschriebenen und dispensierten Arzneimittel des Versicherten.
OperationDefinition
Operation Definition: Provide Dispensation eRP
Geschäftslogik
Erstellung des Wertes für den RxPrescriptionProcessIdentifier
Der im Medication Service erzeugte Identifier folgt dem Schema prescriptionId
+ "_" + authoredOn
[YYYYMMDD]. Dabei wird die Verschreibungs-ID (Prescription-ID) mit dem Datum der Verschreibung kombiniert, um einen eindeutigen Identifier zu erzeugen. Das Datum wird im Format YYYYMMDD
(Jahr, Monat, Tag) angegeben.
Beispiel
{ "system": "https://gematik.de/fhir/epa-medication/sid/rx-prescription-process-identifier", "value": "160.153.303.257.459_20250122" }
EPAMedicationUniqueIdentifier
Anforderungen an den EPAMedicationUniqueIdentifier
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_erp-vau |
Interaktion ($provide-dispensation-erp)
POST [base]/epa/medication/api/v1/fhir/$provide-dispensation-erp
OperationId: provideDispensation_MedicationSvc
Beispielanfrage
{ "resourceType": "Parameters", "id": "example-epa-op-provide-dispensation-erp-input-parameters-2", "meta": { "profile": [ "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-op-provide-dispensation-erp-input-parameters" ] }, "parameter": [ { "name": "rxDispensation", "part": [ { "name": "prescriptionId", "valueIdentifier": { "system": "https://gematik.de/fhir/erp/NamingSystem/GEM_ERP_NS_PrescriptionId", "value": "160.153.303.257.459" } }, { "name": "authoredOn", "valueDate": "2025-01-22" }, { "name": "medicationDispense", "resource": { "resourceType": "MedicationDispense", "id": "86d65df3-5ca4-457d-8859-285830fe091b", "meta": { "profile": [ "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-dispense" ] }, "status": "completed", "category": { "coding": [ { "code": "prescription", "system": "https://gematik.de/fhir/terminology/CodeSystem/EPAMedicationDispenseCategoryCS", "display": "prescription dispense" } ] }, "medicationReference": { "reference": "Medication/c7f34f27-7564-43ad-b13f-2be3c5d7fd3d" }, "subject": { "identifier": { "type": { "coding": [ { "code": "KVZ10", "system": "http://fhir.de/CodeSystem/identifier-type-de-basis", "display": "Krankenversichertennummer" } ] }, "value": "X110411319", "system": "http://fhir.de/sid/gkv/kvid-10" } }, "whenHandedOver": "2025-01-22", "performer": [ { "actor": { "reference": "Organization/151f1697-7512-4e21-9466-1b75207475d8" } } ], "dosageInstruction": [ { "text": "1-0-0-0" } ], "substitution": { "wasSubstituted": false } } }, { "name": "medication", "resource": { "resourceType": "Medication", "id": "c7f34f27-7564-43ad-b13f-2be3c5d7fd3d", "meta": { "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", "display": "Medicinal product package (product)" } }, { "url": "https://gematik.de/fhir/epa-medication/StructureDefinition/drug-category-extension", "valueCoding": { "system": "https://gematik.de/fhir/terminology/CodeSystem/epa-drug-category-cs", "code": "00" } }, { "url": "http://fhir.de/StructureDefinition/normgroesse", "valueCode": "N3" } ], "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": "organization", "resource": { "resourceType": "Organization", "id": "151f1697-7512-4e21-9466-1b75207475d8", "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.54", "system": "https://gematik.de/fhir/directory/CodeSystem/OrganizationProfessionOID", "display": "Öffentliche Apotheke" } ] } ], "name": "gematik Apotheke", "alias": [ "Apotheke" ], "address": [ { "text": "gematik Apotheke\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" } ] } ] } } ] } ] }
<Parameters xmlns="http://hl7.org/fhir"> <id value="example-epa-op-provide-dispensation-erp-input-parameters-2" /> <meta> <profile value="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-op-provide-dispensation-erp-input-parameters" /> </meta> <parameter> <name value="rxDispensation" /> <part> <name value="prescriptionId" /> <valueIdentifier> <system value="https://gematik.de/fhir/erp/NamingSystem/GEM_ERP_NS_PrescriptionId" /> <value value="160.153.303.257.459" /> </valueIdentifier> </part> <part> <name value="authoredOn" /> <valueDate value="2025-01-22" /> </part> <part> <name value="medicationDispense" /> <resource> <MedicationDispense> <id value="86d65df3-5ca4-457d-8859-285830fe091b" /> <meta> <profile value="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-dispense" /> </meta> <status value="completed" /> <category> <coding> <system value="https://gematik.de/fhir/terminology/CodeSystem/EPAMedicationDispenseCategoryCS" /> <code value="prescription" /> <display value="prescription dispense" /> </coding> </category> <medicationReference> <reference value="Medication/c7f34f27-7564-43ad-b13f-2be3c5d7fd3d" /> </medicationReference> <subject> <identifier> <type> <coding> <system value="http://fhir.de/CodeSystem/identifier-type-de-basis" /> <code value="KVZ10" /> <display value="Krankenversichertennummer" /> </coding> </type> <system value="http://fhir.de/sid/gkv/kvid-10" /> <value value="X110411319" /> </identifier> </subject> <performer> <actor> <reference value="Organization/151f1697-7512-4e21-9466-1b75207475d8" /> </actor> </performer> <whenHandedOver value="2025-01-22" /> <dosageInstruction> <text value="1-0-0-0" /> </dosageInstruction> <substitution> <wasSubstituted value="false" /> </substitution> </MedicationDispense> </resource> </part> <part> <name value="medication" /> <resource> <Medication> <id value="c7f34f27-7564-43ad-b13f-2be3c5d7fd3d" /> <meta> <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" /> <code value="781405001" /> <display value="Medicinal product package (product)" /> </valueCoding> </extension> <extension url="https://gematik.de/fhir/epa-medication/StructureDefinition/drug-category-extension"> <valueCoding> <system value="https://gematik.de/fhir/terminology/CodeSystem/epa-drug-category-cs" /> <code value="00" /> </valueCoding> </extension> <extension url="http://fhir.de/StructureDefinition/normgroesse"> <valueCode value="N3" /> </extension> <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> <part> <name value="organization" /> <resource> <Organization> <id value="151f1697-7512-4e21-9466-1b75207475d8" /> <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.54" /> <display value="Öffentliche Apotheke" /> </coding> </type> <name value="gematik Apotheke" /> <alias value="Apotheke" /> <address> <text value="gematik Apotheke\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> </parameter> </Parameters>
Beispielantwort
{ "resourceType": "Parameters", "id": "example-epa-op-rx-dispensation-erp-output-parameters-1", "meta": { "profile": [ "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-op-rx-dispensation-erp-output-parameters" ] }, "parameter": [ { "name": "rxDispensation", "part": [ { "name": "prescriptionId", "valueIdentifier": { "system": "https://gematik.de/fhir/erp/NamingSystem/GEM_ERP_NS_PrescriptionId", "value": "160.153.303.257.459" } }, { "name": "authoredOn", "valueDate": "2025-01-22" }, { "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" } ] } } ] } } ] } ] }
<Parameters xmlns="http://hl7.org/fhir"> <id value="example-epa-op-rx-dispensation-erp-output-parameters-1" /> <meta> <profile value="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-op-rx-dispensation-erp-output-parameters" /> </meta> <parameter> <name value="rxDispensation" /> <part> <name value="prescriptionId" /> <valueIdentifier> <system value="https://gematik.de/fhir/erp/NamingSystem/GEM_ERP_NS_PrescriptionId" /> <value value="160.153.303.257.459" /> </valueIdentifier> </part> <part> <name value="authoredOn" /> <valueDate value="2025-01-22" /> </part> <part> <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> </part> </parameter> </Parameters>
Antwort-Status-Codes
Status Code | Bedingung | Error Code | Bemerkung |
---|---|---|---|
200 | Successful operation | EPA OperationOutcome | |
400 | An Operation Error | EPA OperationOutcome | |
403 | Requestor role is not in the list of allowed usergroups | invalidOid | |
403 | ID-Token or Insurant-ID mismatch | EPA OperationOutcome | |
404 | An Operation Error | EPA OperationOutcome | |
409 | Health record is in state SUSPENDED | statusMismatch | (siehe 'Wiederholungsintervalle') |
423 | If the insurant 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" }