Operation API: Verschreibungsdaten einstellen (E-Rezept-Fachdienst)
Die Operation $provide-prescription-erp
wird vom E-Rezept-Fachdienst ausgeführt und ist eine spezielle Funktion, die dazu dient, bereits erstellte elektronische Verschreibungen in den Medication Service zu übertragen. Sie beinhaltet nicht das Erstellen der Verschreibungsdaten, sondern konzentriert sich darauf, eine bereits erzeugte Verschreibung sicher in den Medication Service hochzuladen und dauerhaft zu speichern. Die nachstehende verdeutlicht die Kommunikationsflüsse für das Einstellen einer Verschreibung in den Medication Service per FHIR Operation $provide-prescription-erp
.
OperationDefinition
Operation Definition: Provide Prescription 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-prescription-erp)
POST [base]/epa/medication/api/v1/fhir/$provide-prescription-erp
OperationId: providePrescription_MedicationSvc
Beispielanfrage
{ "resourceType": "Parameters", "id": "example-epa-op-provide-prescription-erp-input-parameters-2", "meta": { "profile": [ "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-op-provide-prescription-erp-input-parameters" ] }, "parameter": [ { "name": "rxPrescription", "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": "medicationRequest", "resource": { "resourceType": "MedicationRequest", "id": "7a86ebaf-526b-488a-9025-21913bc4dacc", "meta": { "profile": [ "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-request" ] }, "dispenseRequest": { "quantity": { "system": "http://unitsofmeasure.org", "code": "{Package}", "value": 1 } }, "extension": [ { "extension": [ { "url": "indicator", "valueBoolean": false } ], "url": "https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension" } ], "status": "active", "intent": "order", "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" } }, "authoredOn": "2025-01-22", "dosageInstruction": [ { "text": "1-0-0-0" } ], "substitution": { "allowedBoolean": true } } }, { "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": "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-provide-prescription-erp-input-parameters-2" /> <meta> <profile value="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-op-provide-prescription-erp-input-parameters" /> </meta> <parameter> <name value="rxPrescription" /> <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="medicationRequest" /> <resource> <MedicationRequest> <id value="7a86ebaf-526b-488a-9025-21913bc4dacc" /> <meta> <profile value="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-request" /> </meta> <extension url="https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension"> <extension url="indicator"> <valueBoolean value="false" /> </extension> </extension> <status value="active" /> <intent value="order" /> <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> <authoredOn value="2025-01-22" /> <dosageInstruction> <text value="1-0-0-0" /> </dosageInstruction> <dispenseRequest> <quantity> <value value="1" /> <system value="http://unitsofmeasure.org" /> <code value="{Package}" /> </quantity> </dispenseRequest> <substitution> <allowedBoolean value="true" /> </substitution> </MedicationRequest> </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="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-rx-prescription-erp-output-parameters-1", "meta": { "profile": [ "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-op-rx-prescription-erp-output-parameters" ] }, "parameter": [ { "name": "rxPrescription", "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-prescription-erp-output-parameters-1" /> <meta> <profile value="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-op-rx-prescription-erp-output-parameters" /> </meta> <parameter> <name value="rxPrescription" /> <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" }