Build German E-Prescription FHIR Bundle (eRezept — gematik Profiles)
Skill: Convert a prescription into a gematik eRezept FHIR Bundle
Region: Germany (Deutschland) Category: Health care Does: Takes a medical prescription and assembles a HL7 FHIR Bundle conforming to the gematik eRezept profiles (KBV/gematik), signed and transmitted over the Telematikinfrastruktur (TI) to the E-Rezept-Fachdienst, from which the patient or pharmacy redeems it. Spec: gematik / KBV — eRezept FHIR profiles (Prescription/Workflow, current version)
The eRezept replaces the paper "Muster 16" for prescription-only drugs in statutory care. The prescriber's system builds a FHIR Bundle (Composition, MedicationRequest, Medication, Patient, Practitioner, Organization, Coverage), the doctor qualified-electronic-signs it, and it is stored on the E-Rezept-Fachdienst; the patient redeems via the eRezept app, eGK, or token. Issued per prescription. Element names below follow the gematik profiles, not a verbatim StructureDefinition.
When this applies
- A prescriber issues a prescription-only medication for a statutorily insured patient (the eRezept is the mandatory route for GKV apothekenpflichtige Arzneimittel).
- Used for the standard Workflow 160 (GKV) prescription; private (PKV) and special prescription types follow distinct workflows/profiles.
- The pharmacy retrieves and dispenses against the Bundle and posts the dispensation (MedicationDispense) back to the Fachdienst.
Structure (FHIR Bundle)
Bundle (type = document)
Composition eRezept "Verordnung" — links the resources
MedicationRequest dosage, quantity, substitution flag (aut idem), validity
Medication PZN, Darreichungsform, Wirkstoff/Handelsname, Normgröße
Patient KVNR (Versichertennummer 10-stellig), name, DOB
Practitioner LANR / prescriber, qualification
Organization BSNR (Betriebsstättennummer), institution
Coverage Kostenträger (Krankenkasse IK), insurance status
signature doctor's qualified electronic signature (QES) over the Bundle
Data rules
- Resources must use the gematik/KBV profile identifiers (meta.profile) and the prescribed value sets; the Composition.type marks it as an eRezept prescription document.
- Patient is keyed by KVNR (10-digit Versichertennummer); prescriber by LANR; practice by BSNR; payer by the Krankenkasse IK in Coverage.
- The medication is identified by PZN (Pharmazentralnummer) with form/strength; set the aut-idem / substitution flag correctly (it controls pharmacist substitution).
- The Bundle must carry a valid qualified electronic signature (QES) by the prescriber before it is accepted by the Fachdienst; an unsigned Bundle is invalid.
- Transmission and redemption occur over the TI to the E-Rezept-Fachdienst; the pharmacy returns a MedicationDispense; do not store/send outside TI.
Worked example (outline)
Bundle (document)
Composition: Workflow 160 (GKV)
Patient KVNR X110411319
Practitioner LANR 123456789, Organization BSNR 987654300
Coverage Krankenkasse IK 109500969
MedicationRequest: 1 package, dosage 1-0-1, aut idem allowed
Medication PZN 12345678, Ibuprofen 600 mg, Filmtabletten, N2
Signature: QES by prescriber
Signed FHIR Bundle posted to the E-Rezept-Fachdienst over TI; the pharmacy redeems and returns a MedicationDispense.
Validation checklist
- Bundle is a document with Composition linking all required resources, correct gematik/KBV meta.profile
- Patient KVNR (10 digits), prescriber LANR, practice BSNR, payer IK present
- Medication PZN with form/strength; aut-idem/substitution flag correct
- Dosage, quantity, and validity set on MedicationRequest
- Qualified electronic signature (QES) applied by the prescriber
- Workflow type correct (e.g. 160 for GKV)
- Transmitted over TI to the E-Rezept-Fachdienst; dispensation handled via MedicationDispense
Last updated: 2026-06-04 — confirm the current schema/version, identifiers, rounding, and deadline against current authority (gematik.de) guidance before use.