Medication prescriptions can be sent to RED using the FHIR interface and are stored in the RED database (see RED interchange API - Create Data Medication). In order to create prescriptions the user must be in the role of a physician and use a physician SMC-B card.
There are two alternative workflows:
- The sending system creates a request for an e-prescription. RED receives and processes the request, promts the user for the HBA PIN to create an electronic signature, sends the signed prescription to the central backend and returns task id and access code. In this workflow the user does ot interact with the RED user interface.
- The sending system creates a request for an e-prescription task. RED receives and processes the request, but does not immediately creates an electronic prescription. At any time the user can access the RED user interface to see a list of all prescriptions tasked for him. The user may review the prescription tasks and initiate the bulk creation of all prescriptions from the RED frontend. The sending system then may request the task ids and access codes from RED. The Bulk creation may also be triggered by the sending system.
In order to accept a process prescriptions must be in the role of a physician and use a physician SMC-B card.
Direct prescription
The createrp-request triggers the direct creation of a prescription.
{{baseURL}}/{{tenant}}/Bundle?action=$createerp
See RED Interchange API - Postman Collection
There are two formats for the Bundle
- VOS: legacy format for VOS interface
- ERP: current format for electronic prescription
- 0230/0230a - Patient und Medication PZN: creates a new person with coverage, practitioner and organization and medication, then creates an electronic prescription task
- 0231/0231a - Patient und Medication PZN and create ERP: creates a new person with coverage, practitioner and organization and medication, then creates an electronic prescription task and returns task ID and access code
- 0232 - Patient und Medication Rezeptur: creates a new person with coverage, practitioner and organization and medication for an extemporaneous mixture, then creates an electronic prescription task
- 0233 - Patient und Medication Rezeptur and create ERP: creates a new person with coverage, practitioner and organization and medication for an extemporaneous mixture, then creates an electronic prescription and returns the prescription task ID
Additional request parameters
The request may be extended by additional parameters
cardname: specify the Name of the HBA to be used for signature creation. Requires to set the name to HBC card in RED before
{{baseURL}}/{{tenant}}/Bundle?action=$createerp&cardname=HBAArzt
hbaiccsn and smcbiccsn: specify the ICCSN-IDs of HBA and SMC-B to be used. The ICCSNs can be fetched by using a getCards request. They are assigned to the card and will not change over time
{{baseURL}}/{{tenant}}/Bundle?action=$createerp&hbaiccsn=80276883110000136667&smbiccsn=80276883110000117848
patientdocument: after the prescription has been handed over to Fachdienst this returns the token and access code and a base64 string representing the patient document with the barcode for the pharmacy
{{baseURL}}/{{tenant}}/Bundle?action=$createerp&patientdocument=true
RED returns an array of prescriptions with person information and prescription lines
If the request could not be processed successfully an error message is returned
{ "Error": { "key": "erp.service.signdocument.error", "desc": "Es gab ein Problem beim Signieren des Dokuments", "hint": "Möglicherweise wurde die PIN nicht korrekt eingegeben?" } }
Prescription tasks
The createrptask-request creates a request for later manual prescription
{{baseURL}}/{{tenant}}/TI?action=$createerptask
The processerp-request is an option to create prescriptions for all stored tasks
{{baseURL}}/{{tenant}}/TI?action=$processerp