Skip to main content

FHIR Converter API

Convert FHIR resources from FHIR R4 to STU3 and vice versa.

Overview

Use this API to convert resource types MedicationRequest and MedicationStatements from STU3 to FHIR R4 and vice versa.

You can:

  • post either a MedicationRequest or MedicationStatement

You cannot:

  • convert between any other resource types

To use this API:

  1. Send your source payload to this API.
  2. This API converts your source payload to the target version.
  3. You receive the converted payload in the response.

Who can use this API

This API can only be used where there is a legal basis to do so. Make sure you have a valid use case before you go too far with your development. You must do this before you can go live (see ‘Onboarding’ below).


API status and roadmap

This API is in alpha, meaning:

  • it is available for testing in integration environment
  • we expect to make breaking changes based on developer feedback

Roadmap

To see our roadmap, or to suggest, comment or vote on features for this API, see our interactive product backlog.

If you have any other queries, please contact us.


Technology

This API uses HTTP POST to submit data.

The API is synchronous - you receive your converted resource in the response body.

The data payload conforms to the FHIR global standard for health care data exchange. Specifically, it is aligned with FHIR UK Core, which is built on FHIR Release 4, or FHIR GP Connect, which is built on FHIR STU3.


Network access

This API is available on the internet.

For more details, see Network access for APIs.


Security and authorisation

Open-access authentication

The FHIR Converter API is open-access, which means: * we do not authenticate or authorise the calling application * we do not authenticate or authorise the end user - they might not even be present We generally use open-access APIs for public data, where security is not a concern. Our open-access APIs are generally RESTful APIs. For more details on how to access them, see our open-access REST API tutorial.


Environments and testing

Environment Base URL
Integration test https://int.api.service.nhs.uk/fhir-converter
Production Not yet available

Our integration test environment:

  • is for formal integration testing
  • is for receiving data quality reports of test data

For more details see integration testing with our RESTful APIs.


Endpoints

Convert FHIR payload

post
/$convert

Request

Body

Content type: application/fhir+json; fhirVersion=3.0

Examples

Schema

Name Description

Content type: application/fhir+xml; fhirVersion=3.0

Examples

Schema

Name Description

Content type: application/fhir+json; fhirVersion=4.0

Examples

Schema

Name Description

Content type: application/fhir+xml; fhirVersion=4.0

Examples

Schema

Name Description

Response

HTTP status: 200

Successful convertion

Body

Content type: application/fhir+json; fhirVersion=3.0

Examples

Content type: application/fhir+xml; fhirVersion=3.0

Examples

Content type: application/fhir+json; fhirVersion=4.0

Examples

Content type: application/fhir+xml; fhirVersion=4.0

Examples

HTTP status: 400

Invalid request

Body

Content type: application/fhir+json; fhirVersion=4.0

Example