- Created by Alexander Wilms, last modified on Jan 24, 2024
After a pharmacy has dispensed the prescription (handed over the product to patient) a dispense request (POST) must be created and sent to the Fachdienst. The dispense request references the prescription and marks it as delivered. It also returns a receipt to the pharmacy for billing.
The dispense request contains a FHIR bundle of type MedicationDispense. In order to create a dispense the user must be in the role of a pharmacist and use a pharmacy SMC-B card.
With the following request, the receipt for a dispensed specific e-prescription can be fetched via RED interchange API. In order to get receipt details the user must be in the role of a pharmacist and use a pharmacy SMC-B card.
{{baseURL}}/{{tenant}}/Task?action=$receipt&prescriptionid={{prescriptionid}}
If the prescription has been dispensed RED returns status 200 with the receipt bundle.
<Bundle xmlns="http://hl7.org/fhir"> <id value="a003fb78-0d00-0000-0003-000000000000"/> <meta> <profile value="https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_Bundle|1.2"/> </meta> <identifier> <system value="https://gematik.de/fhir/erp/NamingSystem/GEM_ERP_NS_PrescriptionId"/> <value value="160.000.226.032.387.20"/> </identifier> <type value="document"/> <timestamp value="2024-01-23T14:27:49.022+00:00"/> <link> <relation value="self"/> <url value="https://erp-ref.zentral.erp.splitdns.ti-dienste.de/Task/160.000.226.032.387.20/$close/"/> </link> <entry> <fullUrl value="urn:uuid:b5e533d2-d889-4c9f-9103-ccb4edd62b77"/> <resource> <Composition> <id value="b5e533d2-d889-4c9f-9103-ccb4edd62b77"/> <meta> <profile value="https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_Composition|1.2"/> </meta> <extension url="https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_EX_Beneficiary"> <valueIdentifier> <system value="https://gematik.de/fhir/sid/telematik-id"/> <value value="3-SMC-B-Testkarte-883110000116808"/> </valueIdentifier> </extension> <status value="final"/> <type> <coding> <system value="https://gematik.de/fhir/erp/CodeSystem/GEM_ERP_CS_DocumentType"/> <code value="3"/> <display value="Receipt"/> </coding> </type> <date value="2024-01-23T14:27:49.020+00:00"/> <author> <reference value="https://erp-ref.zentral.erp.splitdns.ti-dienste.de/Device/1"/> </author> <title value="Quittung"/> <event> <period> <start value="2024-01-23T08:02:51.714+00:00"/> <end value="2024-01-23T14:27:49.020+00:00"/> </period> </event> <section> <entry> <reference value="Binary/PrescriptionDigest-160.000.226.032.387.20"/> </entry> </section> </Composition> </resource> </entry> <entry> <fullUrl value="https://erp-ref.zentral.erp.splitdns.ti-dienste.de/Device/1"/> <resource> <Device> <id value="1"/> <meta> <profile value="https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_Device|1.2"/> </meta> <status value="active"/> <serialNumber value="1.12.0"/> <deviceName> <name value="E-Rezept Fachdienst"/> <type value="user-friendly-name"/> </deviceName> <version> <value value="1.12.0"/> </version> <contact> <system value="email"/> <value value="betrieb@gematik.de"/> </contact> </Device> </resource> </entry> <entry> <fullUrl value="https://erp-ref.zentral.erp.splitdns.ti-dienste.de/Binary/PrescriptionDigest-160.000.226.032.387.20"/> <resource> <Binary> <id value="PrescriptionDigest-160.000.226.032.387.20"/> <meta> <versionId value="1"/> <profile value="https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_Digest|1.2"/> </meta> <contentType value="application/octet-stream"/> <data value="Ekz04SBANAyRuMHxuERMuZKynOc6c1MXGB58alWKsfE="/> </Binary> </resource> </entry> <signature> <type> <system value="urn:iso-astm:E1762-95:2013"/> <code value="1.2.840.10065.1.12.1.1"/> </type> <when value="2024-01-23T14:27:49.023+00:00"/> <who> <reference value="https://erp-ref.zentral.erp.splitdns.ti-dienste.de/Device/1"/> </who> <sigFormat value="application/pkcs7-mime"/> <data value="MIIUoAYJKoZIhvcNAQcCoIIUkTCCFI0CAQUxDTALBglghkgBZQMEAgEwggp3BgkqhkiG9w0BBwGgggpoBIIKZDw/eG1sIHZlcnNpb249IjEuMCIgZW5jb2Rpbmc9InV0Zi04Ij8+CjxCdW5kbGUgeG1sbnM9Imh0dHA6Ly9obDcub3JnL2ZoaXIiPjxpZCB2YWx1ZT0iYTAwM2ZiNzgtMGQwMC0wMDAw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MEAQIwCgYIKoZIhvcNAwcwDgYIKoZIhvcNAwICAgCAMA0GCCqGSIb3DQMCAgFAMAcGBSsOAwIHMA0GCCqGSIb3DQMCAgEoMIHQBgsqhkiG9w0BCRACLzGBwDCBvTCBujCBtwQglWUf2RjpmekMOi2PXNXpzi4OqObXVk7e7slLqYBr3GMwgZIwgYqkgYcwgYQxCzAJBgNVBAYTAkRFMR8wHQYDVQQKDBZnZW1hdGlrIEdtYkggTk9ULVZBTElEMTIwMAYDVQQLDClLb21wb25lbnRlbi1DQSBkZXIgVGVsZW1hdGlraW5mcmFzdHJ1a3R1cjEgMB4GA1UEAwwXR0VNLktPTVAtQ0E1MCBURVNULU9OTFkCAwFJuTAKBggqhkjOPQQDAgRGMEQCIHaQabYXlDvkUSjb3wwhdPknZx/KUk5DOTn/SmzykPx7AiBwEm3HmjNqjsYNgvmZMIde/W8QsYELTxNp8Lfz+zpSJQ=="/> </signature> </Bundle>
If the prescription has not yet been dispensed RED returns status 204 with an XML object with the current task status
<Task> <prescriptionid>160.000.226.032.329.97</prescriptionid> <status>in-progress</status> </Task>
In all other cases RED returns status 404.
- No labels