Hier dokumentiert die gematik die Nutzung der Schnittstellen rund um den Nachrichtenaustausch zwischen Versicherten und Apotheken zum E-Rezept.
- E-Rezept API-Dokumentation für Nachrichtenaustausch
- 1. Anwendungsfall Nachricht als Versicherter an eine Apotheke schicken
- 2. Anwendungsfall Nachricht als Apotheke an einen Versicherten schicken
- 3. Anwendungsfall Ein E-Rezept verbindlich einer Apotheke zuweisen
- 4. Anwendungsfall Auf neue Nachrichten im E-Rezept Fachdienst prüfen
- 5. Anwendungsfall Alle Nachrichten vom E-Rezept Fachdienst abrufen
Als Versicherter möchte ich der Apotheke eine Nachricht schicken, um zu fragen, ob sie mein E-Rezept beliefern kann. Über eine Verzeichnissuche habe ich die gewünschte Apotheke gefunden, meine App kennt deren Telematik-ID, an die die folgende Nachricht adressiert wird.
HTTP-Request curl -XPOST -H "Content-Type: application/fhir+json; charset=UTF-8"
-H "Authorization: Bearer eyJraWQ.ewogImL2pA10Qql22ddtutrvx4FsDlz.rHQjEmB1lLmpqn9J" (1)
--data
"{
\"resourceType\": \"Communication\",
\"meta\": {
\"profile\": [
\"https://gematik.de/fhir/StructureDefinition/erxCommunication\"
]
},
\"status\": \"unknown\",
\"category\": [ {
\"coding\": [ {
\"system\": \"http://terminology.hl7.org/CodeSystem/communication-category\",
\"code\": \"notification\"
} ]
} ],
\"recipient\": [ { (2)
\"identifier\": {
\"type\":{
\"coding\": [ {
\"system\":\"http://terminology.hl7.org/CodeSystem/v2-0203\",
\"code\":\"BSNR\"
} ]
},
\"system\":\"https://fhir.kbv.de/NamingSystem/KBV_NS_Base_BSNR\",
\"value\":\"606358757\"
}
} ],
\"payload\": [ {
\"contentString\": \"Hallo, ich wollte gern fragen, ob das Medikament bei Ihnen vorrätig ist.\" (3)
}, {
\"resourceType\":\"Medication\", (4)
\"id\":\"5fe6e06c-8725-46d5-aecd-e65e041ca3de\",
\"meta\":{
\"profile\": [
\"https://fhir.kbv.de/StructureDefinition/KBV_PR_ERP_Medikament_PZN|1.0.0\"
]
},
\"code\":{
\"coding\": [ {
\"system\":\"http://fhir.de/CodeSystem/ifa/pzn\",
\"code\":\"06313728\" (5)
} ],
\"text\":\"Sumatriptan-1a Pharma 100 mg Tabletten\" (6)
},
\"form\":{
\"coding\": [ {
\"system\":\"KBV_CS_SFHIR_KBV_DARREICHUNGSFORM\",
\"code\":\"TAB\"
} ]
},
\"amount\":{
\"numerator\":{
\"value\":\"12\",
\"system\":\"http://unitsofmeasure.org\",
\"code\":\"{tbl}\"
},
\"denominator\":{
\"value\":\"1\"
}
},
\"extension\": [ {
\"url\":\"https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_MEDIKAMENT_KATEGORIE\",
\"valueCoding\":{
\"system\":\"https://fhir.kbv.de/CodeSystem/KBV_CS_MEDIKAMENT_KATEGORIE\",
\"code\":\"00\"
}
}, {
\"url\":\"https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_MEDIKAMENT_IMPFSTOFF\",
\"valueBoolean\":false
}, {
\"url\":\"http://fhir.de/StructureDefinition/normgroesse\",
\"valueCode\":\"N1\" (7)
} ]
} ]
}"
https://prescriptionserver.telematik/Communication
|
||
HTTP-Response HTTP/1.1 201 Created
Content-Type: application/fhir+json;charset=utf-8
Location:
https://prescriptionserver.telematik/Communication/12345
{
"resourceType": "Communication",
"id": "12345",
"meta": {
"versionId": "1",
"lastUpdated": "2020-03-12T18:01:10+00:00",
"profile": [
"https://gematik.de/fhir/StructureDefinition/erxCommunication"
]
},
"status": "unknown",
"category": [ {
"coding": [ {
"system": "http://terminology.hl7.org/CodeSystem/communication-category",
"code": "notification"
} ]
} ],
"sent": "2020-03-12T18:01:10+00:00", (1)
"recipient": [ {
"identifier": {
"type":{
"coding": [ {
"system":"http://terminology.hl7.org/CodeSystem/v2-0203",
"code":"BSNR"
} ]
},
"system":"https://fhir.kbv.de/NamingSystem/KBV_NS_Base_BSNR",
"value":"606358757"
}
} ],
"sender": { (2)
"identifier": {
"type":{
"coding": [ {
"system":"http://fhir.de/CodeSystem/identifier-type-de-basis",
"code":"GKV"
} ]
},
"system":"http://fhir.de/NamingSystem/gkv/kvid-10",
"value":"X234567890"
}
},
"payload": [ {
"contentString": "Hallo, ich wollte gern fragen, ob das Medikament bei Ihnen vorrätig ist."
}, {
"resourceType":"Medication",
"id":"5fe6e06c-8725-46d5-aecd-e65e041ca3de",
"meta":{
"profile": [
"https://fhir.kbv.de/StructureDefinition/KBV_PR_ERP_Medikament_PZN|1.0.0"
]
},
"code":{
"coding": [ {
"system":"http://fhir.de/CodeSystem/ifa/pzn",
"code":"06313728"
} ],
"text":"Sumatriptan-1a Pharma 100 mg Tabletten"
},
"form":{
"coding": [ {
"system":"KBV_CS_SFHIR_KBV_DARREICHUNGSFORM",
"code":"TAB"
} ]
},
"amount":{
"numerator":{
"value":"12",
"system":"http://unitsofmeasure.org",
"code":"{tbl}"
},
"denominator":{
"value":"1"
}
},
"extension": [ {
"url":"https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_MEDIKAMENT_KATEGORIE",
"valueCoding":{
"system":"https://fhir.kbv.de/CodeSystem/KBV_CS_MEDIKAMENT_KATEGORIE",
"code":"00"
}
}, {
"url":"https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_MEDIKAMENT_IMPFSTOFF",
"valueBoolean":false
}, {
"url":"http://fhir.de/StructureDefinition/normgroesse",
"valueCode":"N1"
} ]
} ]
}
|
||
Der Aufruf erfolgt als http- |
||
Code |
Type Success |
|
201 |
Created |
|
Code |
Type Error |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
405 |
Method Not Allowed |
|
408 |
Request Timeout |
|
429 |
Too Many Requests |
|
500 |
Server Errors |
|
Uns als Apotheke wurde von einem Versicherten eine Nachricht zu einem E-Rezept geschickt. Der Versicherte fragt, ob ein Medikament vorrätig ist, dieses wurde in der Anfrage über dessen Pharmazentralnummer http://fhir.de/CodeSystem/ifa/pzn|06313728 benannt. Eine interne Warenbestandsprüfung hat ergeben, dass das Medikament vorrätig ist, nun schicken wir dem Versicherten eine Nachricht als Antwort nach der Frage zur Verfügbarkeit des Medikaments.
HTTP-Request curl -XPOST -H "Content-Type: application/fhir+xml; charset=UTF-8"
-H "Authorization: Bearer eyJraWQ.ewogImL2pA10Qql22ddtutrvx4FsDlz.rHQjEmB1lLmpqn9J"
--data
"Communication xmlns="http://hl7.org/fhir">
<meta>
<profile value=\"https://gematik.de/fhir/StructureDefinition/erxCommunication\"/>
</meta>
<status value="unknown"/>
<category>
<coding>
<system value=\"http://terminology.hl7.org/CodeSystem/communication-category\"/>
<code value=\"notification\"/>
</coding>
</category>
<recipient>
<identifier>
<system value=\"http://fhir.de/NamingSystem/gkv/kvid-10\"/>
<value value=\"X234567890\"/>
</identifier>
</recipient>
<payload>
<contentString value=\"Guten Tag, das Medikament haben wir auf Lager. Kommen Sie zur Abholung gern vorbei.\"/>
</payload>
</Communication>"
https://prescriptionserver.telematik/Communication
|
||
HTTP-Response HTTP/1.1 201 Created
Content-Type: application/fhir+xml;charset=utf-8
Location:
https://prescriptionserver.telematik/Communication/12346
<Communication xmlns="http://hl7.org/fhir">
<id value="1092143"/>
<meta>
<versionId value="1"/>
<lastUpdated value="2020-03-12T18:15:10+00:00"/>
<source value="#BsTSF2KMvxsPJdMU"/>
<profile value="https://gematik.de/fhir/StructureDefinition/erxCommunication"/>
</meta>
<status value="unknown"/>
<category>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/communication-category"/>
<code value="notification"/>
</coding>
</category>
<sent value="2020-03-12T18:15:10+00:00"/> (1)
<recipient>
<identifier>
<system value="http://fhir.de/NamingSystem/gkv/kvid-10"/>
<value value="X234567890"/>
</identifier>
</recipient>
<sender> (2)
<identifier>
<system value="https://fhir.kbv.de/NamingSystem/KBV_NS_Base_BSNR"/>
<value value="606358750"/>
</identifier>
</sender>
<payload>
<contentString value="Guten Tag, das Medikament haben wir auf Lager. Kommen Sie zur Abholung gern vorbei."/>
</payload>
</Communication>
|
||
Der Aufruf erfolgt als http- |
||
Code |
Type Success |
|
201 |
Created |
|
Code |
Type Error |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
405 |
Method Not Allowed |
|
408 |
Request Timeout |
|
429 |
Too Many Requests |
|
500 |
Server Errors |
|
Als Versicherter möchte ich einer Apotheke alle Informationen zukommen lassen, damit diese mein E-Rezept beliefern kann.
HTTP-Request curl -XPOST -H "Content-Type: application/fhir+json; charset=UTF-8"
-H "Authorization: Bearer eyJraWQ.ewogImL2pA10Qql22ddtutrvx4FsDlz.rHQjEmB1lLmpqn9J"
--data
"{
\"resourceType\": \"Communication\",
\"meta\": {
\"profile\": [
\"https://gematik.de/fhir/StructureDefinition/erxCommunication\"
]
},
\"status\": \"unknown\",
\"category\": [ {
\"coding\": [ {
\"system\": \"http://terminology.hl7.org/CodeSystem/communication-category\",
\"code\": \"notification\"
} ]
} ],
\"recipient\": [ {
\"identifier\": {
\"type\":{
\"coding\": [ {
\"system\":\"http://terminology.hl7.org/CodeSystem/v2-0203\",
\"code\":\"BSNR\"
} ]
},
\"system\":\"https://fhir.kbv.de/NamingSystem/KBV_NS_Base_BSNR\",
\"value\":\"606358757\"
}
} ],
\"payload\": [ {
\"contentString\": \"Hallo, ich möchte gern das E-Rezept bei Ihnen einlösen. Bitte schicken Sie mir eine Bestell-Bestätigung.\"
}, {
\"reference\": \""Task/4711/$accept?ac=777bea0e13cc9c42ceec14aec3ddee2263325dc2c6c699db115f58fe423607ea\" (1)
} ]
}"
https://prescriptionserver.telematik/Communication
|
||
HTTP-Response HTTP/1.1 201 Created
Content-Type: application/fhir+json;charset=utf-8
Location:
https://prescriptionserver.telematik/Communication/12350
{
"resourceType": "Communication",
"id": "12350",
"meta": {
"versionId": "1",
"lastUpdated": "2020-03-13T18:01:10+00:00",
"profile": [
"https://gematik.de/fhir/StructureDefinition/erxCommunication"
]
},
"status": "unknown",
"category": [ {
"coding": [ {
"system": "http://terminology.hl7.org/CodeSystem/communication-category",
"code": "notification"
} ]
} ],
"sent": "2020-03-13T18:01:10+00:00",
"recipient": [ {
"identifier": {
"type":{
"coding": [ {
"system":"http://terminology.hl7.org/CodeSystem/v2-0203",
"code":"BSNR"
} ]
},
"system":"https://fhir.kbv.de/NamingSystem/KBV_NS_Base_BSNR",
"value":"606358757"
}
} ],
"sender": {
"identifier": {
"type":{
"coding": [ {
"system":"http://fhir.de/CodeSystem/identifier-type-de-basis",
"code":"GKV"
} ]
},
"system":"http://fhir.de/NamingSystem/gkv/kvid-10",
"value":"X234567890"
}
},
"payload": [ {
"contentString": "Hallo, ich möchte gern das E-Rezept bei Ihnen einlösen. Bitte schicken Sie mir eine Bestell-Bestätigung."
}, {
"reference": ""Task/4711/$accept?ac=777bea0e13cc9c42ceec14aec3ddee2263325dc2c6c699db115f58fe423607ea"
} ]
}
|
||
Der Aufruf erfolgt als http- |
||
Code |
Type Success |
|
201 |
Created |
|
Code |
Type Error |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
405 |
Method Not Allowed |
|
408 |
Request Timeout |
|
429 |
Too Many Requests |
|
500 |
Server Errors |
|
Als Versicherter und als Apotheke möchte ich wissen, ob im Fachdienst "ungelesene" Nachrichten für mich vorhanden sind.
HTTP-Request
curl -XGET -H "Authorization: Bearer eyJraWQ.ewogImL2pA10Qql22ddtutrvx4FsDlz.rHQjEmB1lLmpqn9J" (1) https://prescriptionserver.telematik/Communication?received=null (2)
|
||
HTTP-Response
HTTP/1.1 200 OK
Content-Type: application/fhir+json;charset=utf-8
{
"resourceType": "Bundle",
"id": "79cc4c08-0e7b-4e52-acee-6ec7519ce67f",
"meta": {
"lastUpdated": "2020-04-07T14:16:55.965+00:00"
},
"type": "searchset",
"total": 1,
"link": [ {
"relation": "self",
"url": "https://prescriptionserver.telematik/Communication?received=null"
} ],
"entry": [ {
"fullUrl": "https://prescriptionserver.telematik/Communication/12346",
"resource": {
"resourceType": "Communication",
"id": "12346",
"meta": {
"versionId": "1",
"lastUpdated": "2020-03-12T18:15:10+00:00",
"profile": [
"https://gematik.de/fhir/StructureDefinition/erxCommunication"
]
},
"status": "unknown",
"category": [ {
"coding": [ {
"system": "http://terminology.hl7.org/CodeSystem/communication-category",
"code": "notification"
} ]
} ],
"sent": "2020-03-12T18:15:10+00:00", (1)
"recipient": [ {
"identifier": {
"type":{
"coding": [ {
"system":"http://fhir.de/CodeSystem/identifier-type-de-basis",
"code":"GKV"
} ]
},
"system":"http://fhir.de/NamingSystem/gkv/kvid-10",
"value":"X234567890" (2)
}
} ],
"sender": {
"identifier": {
"type":{
"coding": [ {
"system":"http://terminology.hl7.org/CodeSystem/v2-0203",
"code":"BSNR"
} ]
},
"system":"https://fhir.kbv.de/NamingSystem/KBV_NS_Base_BSNR",
"value":"606358757"
}
},
"payload": [ {
"contentString": "Guten Tag, das Medikament haben wir auf Lager. Kommen Sie zur Abholung gern vorbei."
} ]
}
} ]
}
|
||
Der Aufruf erfolgt als http- |
||
Code |
Type Success |
|
200 |
OK |
|
Code |
Type Error |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
404 |
Not found |
|
500 |
Server Errors |
|
Als Apotheke möchten wir alle Nachrichten des Monats April 2020 abrufen, um uns einen Überblick der bisherigen E-Rezept-Anfragen zu beschaffen.
HTTP-Request
curl -XGET -H "Authorization: Bearer eyJraWQ.ewogImL2pA10Qql22ddtutrvx4FsDlz.rHQjEmB1lLmpqn9J" (1) https://prescriptionserver.telematik/Communication?sent=gt2020-04-01&_sort=sent (2)
|
||
HTTP-Response
HTTP/1.1 200 OK
Content-Type: application/fhir+xml;charset=utf-8
<Bundle xmlns="http://hl7.org/fhir">
<id value="48829c84-7ad7-4834-8362-2c2c109379b1"/>
<meta>
<lastUpdated value="2020-04-08T07:11:18.245+00:00"/>
</meta>
<type value="searchset"/>
<total value="391"/> (1)
<link>
<relation value="self"/>
<url value="https://prescriptionserver.telematik/Communication?_format=html%2Fxml&_sort=sent&sent=gt2014-03-01"/>
</link>
<link> (2)
<relation value="next"/>
<url value="https://prescriptionserver.telematik?_getpages=48829c84-7ad7-4834-8362-2c2c109379b1&_getpagesoffset=50&_count=50&_bundletype=searchset"/>
</link>
<entry>
<fullUrl value="https://prescriptionserver.telematik/Communication/74671"/>
<resource>
<Communication xmlns="http://hl7.org/fhir">
<id value="74671"/>
<meta>
<versionId value="1"/>
<lastUpdated value="2019-11-21T12:58:59.782+00:00"/>
<source value="#H8gavJ2v535x6V3f"/>
<profile value="https://gematik.de/fhir/StructureDefinition/erxCommunication"/>
</meta>
<status value="unknown"/>
<category>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/communication-category"/>
<code value="notification"/>
</coding>
</category>
<recipient>
<identifier>
<system value="https://fhir.kbv.de/NamingSystem/KBV_NS_Base_BSNR"/>
<value value="606358750"/>
</identifier>
</recipient>
<sender>
<identifier>
<system value="http://fhir.de/NamingSystem/gkv/kvid-10"/>
<value value="X234567890"/>
</identifier>
</sender>
<payload>
<contentString value="Hallo, ich wollte gern fragen, ob das Medikament bei Ihnen vorrätig ist."/>
</payload>
<payload id="5fe6e06c-8725-46d5-aecd-e65e041ca3de">
<extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_MEDIKAMENT_KATEGORIE">
<valueCoding>
<system value="https://fhir.kbv.de/CodeSystem/KBV_CS_MEDIKAMENT_KATEGORIE"/>
<code value="00"/>
</valueCoding>
</extension>
<extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_MEDIKAMENT_IMPFSTOFF">
<valueBoolean value="false"/>
</extension>
<extension url="http://fhir.de/StructureDefinition/normgroesse">
<valueCode value="N1"/>
</extension>
</payload>
</Communication>
</resource>
<search>
<mode value="match"/>
</search>
</entry>
(3)
</Bundle>
|
||
Der Aufruf erfolgt als http- |
||
Code |
Type Success |
|
200 |
OK |
|
Code |
Type Error |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
404 |
Not found |
|
500 |
Server Errors |
|



