You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

The RED telematik API allows communication with E-Rezept-Fachdienst to retrieve stored electronic prescriptions and to send dispense requests.

Request prescription

A prescription is identified by its PrescriptionID and the AccessCode. PrescriptionID and AccessCode are represented by the barcode on the prescription form. The barcode contains a string containing an array of urls. Each url is represented by a string with this format:

Task/<Prescription ID>/$accept?ac=<AccessCode>

{"urls":["Task/160.000.111.065.827.98/$accept?ac=b8d9e513cd11cfe0a1d829b96a503e9df5b17803bbdbc4036f32858494539f28"]}

In this example the prescriptionID is 160.000.111.065.827.98 and AccessCode is b8d9e513cd11cfe0a1d829b96a503e9df5b17803bbdbc4036f32858494539f28.

To get the prescription data for this prescription a GET request is sent:

> GET http://localhost:29221/{tenant}/Task?action=$accept&prescriptionid={PrescriptionID}&accesscode={AccessCode}

Example

http://localhost:29221/{tenant}/Task?action=$accept&prescriptionid=160.000.111.065.827.98&accesscode=b8d9e513cd11cfe0a1d829b96a503e9df5b17803bbdbc4036f32858494539f28

This request returns a FHIR bundle with several items.

  • Composition: contains summary information and references to all items in the bundle
  • MedicationRequest: refers to Medication, patient, requester and insurance. Includes administrative information such as copayment, emergencyFee, substitution (aut-idem) or payer (BVG). Also contains the dosage and quantity
  • Medication: contains data of prescribed product (e.g. PZN ID, flag vaccine, Normgröße, form and amount)
  • Patient: person the prescription was created for, including insurance ID, name and address
  • Practitioner: physician who created and signed the prescription, including LANR, name and qualification
  • Organization: practice which created the prescription, including BSNR, address and contact
  • Coverage: payer and insurance information, including insurance status, WOP, person group, copayment status, payer identification


This GET request can be used for the initial fetch of prescription data as well as further requests to fetch the same data later. When the FHIR bundle is returned from Fachdienst a second access code (“secret”) is added. All further requests to Fachdienst (in order to retrieve prescription data again, cancel or dispense the prescription) must include this secret to prove the requesters authorization to access the data. RED stores the secret in its database and adds it automatically for every further processing action of this request.

Return a prescription

After a pharmacy has requested an electronic prescription from Fachdienst and received the FHIR bundle the Fachdienst locks the prescription. If the pharmacy is not able to deliver the prescribed products the prescription can be returned. If a prescription is returned it is released on Fachdienst and may be requested by someone else.

To return a prescription a GET request is sent. In addition to PrescriptionID and AccessCode RED automatically includes the secret.

> GET http://localhost:29221/{tenant}/Task?action=$reject&prescriptionid={PrescriptionID}&accesscode={AccessCode}

Example

http://localhost:29221/{tenant}/Task?action=$reject&prescriptionid=160.000.111.065.827.98&accesscode=b8d9e513cd11cfe0a1d829b96a503e9df5b17803bbdbc4036f32858494539f28

Dispense a prescription

After a pharmacy has delivered the prescription a dispense request is created. The dispense request contains a FHIR bundle of type MedicationDispense. 

The bundle is sent to RED using POST

> POST http://localhost:29221/{tenant}/Bundle

  • No labels