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

Example of a request with cardname parameter
{{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

Example of a request with iccsn parameters
{{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

Example of a request with patient document
{{baseURL}}/{{tenant}}/Bundle?action=$createerp&patientdocument=true

RED returns an array of prescriptions with person information and prescription lines

Result of bulk processing of a stored prescription
<Prescriptions>
    <person>
        <person>
            <lastname>Kastner</lastname>
            <firstname>Tobias</firstname>
            <birthday>1935-05-21</birthday>
        </person>
        <prescriptions>
            <prescription>
                <name>ENCEPUR KINDER / 1 FER N1</name>
                <url>{"urls":["Task/160.000.203.391.781.13/$accept?ac=1da7bf1a92146b0d249380df07150465c0945798c1c9f65aadf8c3de687bb685"]}</url>
            </prescription>
        </prescriptions>
    </person>
    <person>
        <person>
            <lastname>Meier</lastname>
            <firstname>Luca</firstname>
            <birthday>2012-10-08</birthday>
        </person>
        <prescriptions>
            <prescription>
                <name>Hydrochlorothiazid 2mg/ml (NRF 26.4) Suspension</name>
                <url>{"urls":["Task/160.000.203.391.782.10/$accept?ac=2058ffbe2fbf0ac890d948ded9e5d9a7f777783f6f233d05a38849fdf019483f"]}</url>
            </prescription>
        </prescriptions>
    </person>
    <person>
        <person>
            <lastname>Finkel</lastname>
            <firstname>Michelle</firstname>
            <birthday>2005-05-08</birthday>
        </person>
        <prescriptions>
            <prescription>
                <name>Viskose Aluminiumchlorid Hexahydrat-Lösung 20%(NRF 11.132.)</name>
                <url>{"urls":["Task/160.000.203.391.783.07/$accept?ac=45111875220241da5aa3f8c4a16580e5fc3d4aea2fdd4acdf507bada90828b8a"]}</url>
            </prescription>
        </prescriptions>
    </person>
</Prescriptions>

If the request could not be processed successfully an error message is returned

Error object
{
    "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

GET request triggering bulk processing requests for electronic prescriptions
{{baseURL}}/{{tenant}}/TI?action=$createerptask

The processerp-request is an option to create prescriptions for all stored tasks

GET request triggering bulk processing requests for electronic prescriptions
{{baseURL}}/{{tenant}}/TI?action=$processerp
  • No labels