Multiple FHIR versions support

To ensure backward compatibility to older applications currently both FHIR STU3 and FHIR R4 are supported. The default version used is still STU3.

Support for STU3 will be dropped after all applications have been adopted.

Instructions on how to deal with the two FHIR versions:

  • The endpoint is the same for all versions. It is always /fhir
  • If you are using the API debugger there is a new picklist where you can select the FHIR version for each request. (left to the method picklist GET/POST/PUT/DELETE)
  • If your app does requests add application/fhir+json; fhirVersion=4.0 as “Content-Type” header for POST/PUT requests or as “Accept” header for GET requests if you want to use FHIR R4. (this should also be done for GET /fhir/metadata)
  • If you use the angular-midatajs plugin library there is a new method midataServer.setFhirVersion("4.0"); that you can call to change the FHIR version. (Do “npm update” in your project to download the new version)
  • STU3 Resources in the database which are read with the R4 version API are converted on the fly. This is not a full converter - only fields/resources which are known to be used in the past are converted. If you miss something important please tell me.
  • FHIR R4 resources which are read with the old STU3 version API are not converted - they might be returned incomplete (eg. without the fields that have changed between FHIR versions)