TRxHub IG
0.1.0 - ci-build

TRxHub IG - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

Home

Official URL: https://trxhub.mediservice.ch/fhir/ImplementationGuide/trxhub.mediservice.ch Version: 0.1.0
Draft as of 2026-05-29 Computable Name: TRxHubIG

🦖 TRxHub Implementation Guide

This implementation guide is still a draft and subject to change. In its current state it can give an idea what the FHIR profiles will look like. Furthermore, the actual implementation of the profiles is still in progress, and not all resources present in the IG are available on the API yet.

Please check the capability statement of the FHIR server, available at /fhir/metadata, to see which resources are currently available.

Introduction

This implementation guide provides the means of documenting the FHIR profiles used in the TRxHub.

The TRxHub FHIR server is based on the HL7 FHIR R4.0.1 specification. Its implementation is conformed and compatible to the official specification and only extends specific constraints.

Reading the Implementation Guide

The implementation guide shows the specific implementation of the FHIR standard in the TRxHub.

TRxHub does not implement all the properties of the resources that are available in the official FHIR specification. The properties implemented are marked with Must Support which is visible as a red S in the Flags column of the structure view. The server processes only these properties. The use of additional properties that are not supported won't throw an error but will be ignored and lost during processing.

Must Support has no effect on cardinality; it is purely a documentation of what is processed by TRxHub.

Security

The TRxHub implements a client credentials flow for authentication of clients.

Implementation

To access the API, it is recommended to use the hapi-fhir-client library.

Profiles

All resources sent to the server are validated with the profiles defined in the IG. Therefore, it is required to set the meta.profile property in the objects to the URL of the profile defined in the IG.

The URL can be found at the top of each Resource Profile page in the gray table below the title, after Official URL:.

If no profile is set, the server will throw a validation error.

Example:

{
  "resourceType": "Patient",
  "id": "TRxHubPatientExample",
  "meta": {
    "profile": [
      "https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-patient"
    ]
  },
  ...
}

The canonical URL to use for each profile is listed at the top of the corresponding profile page.

Example Resources

Example instances for each profile are listed in the Artifact Index (e.g. Patient-TRxHubPatientExample) and rendered on the corresponding profile page under "Examples".

Current Restrictions

The TRxHub currently only implements what is known as the "External Interface" (i.e. the FHIR API documented in this IG). The "Internal Interface" (the API through which TRxHub sends and retrieves data at Mediservice) is not yet implemented. Certain flows that require status feedback can, therefore, not be fully tested yet.

Glossary

Term Meaning
Coverage Insurance or self-pay details, scoped to one prescription.
External service Any party calling the TRxHub FHIR API.
MedicationRequest A single medication from a prescription.
Mediservice ERP Downstream system TRxHub forwards data to. Not called directly by external services.
Prescription Contains patient data, medication etc. Sent with TRxHubPrescriptionDocumentBundle
ServiceRequest The intent of a flow — either register-prescription or order-medication.
TRxHub ID Server-generated identifier returned in every response; used for subsequent references.
Task TRxHub-managed status tracker for a ServiceRequest. Read-only for external services.
ePrescription A CHMED16A-encoded prescription, posted as a TRxHubEPrescriptionBundle.