Requesting a new SubstanceDefinition

Definitions

GSRS - Global Substance Registration System

GSID - Global Substance ID

Background

The WHO-UMC IDMP Management and Publish API is built to demonstrate how a FHIR API could be used to request new SubstanceDefinitions in an asynchronous way. The reason we need an asynchronous model is that generating the Definitions might take long time since it normaly will require human interaction.

A GSID is generated and a new SubstanceDefinition resource is created based on the input in form of a SubstanceDefinition Draft 'template'.

Try it out

Following is a step wise tutorial of how to request for and retrieve a GSID and SubstanceDefinition resource.

The simple GET calls described can be done using a ordinary web browser but it is recommended to use PostMan, especially the POST calls cannot be done using a normal browser.

Process

1. The user submits a request using a POST call with the FHIR Task resource as body. The Task contains a SubstanceDefinition resource containing required information to generate a neew GSID.

An example Task is found following the link below.

GET
request template

Send the Task as the body of a POST call to the following api (to test this Postman should be used):

POST
Task

2. The user submits a request to get status information for the created Task. Use the url returned in the Content Location header of the response from the request call.

Note that the Id in the status request call is the Id of the created Task.

GET
status request using url (with dummy key)

As long as the request is still pending the Http response is 202 (Accepted) with an X-Progress header indicating the current progress.

3. When sucessful there will be a '200' response with a link to to the generated SubstanceDefinition (GSID) in the output section of the Task.

To try the behaviour

a) make a dummy call to the task using Postman.

b) pick the link in the ContentLocation header of the response.

c) paste the link into a web browser and refresh. You should se the status change but it will not be Completed since this is only a demo.

GET
Example of a generated SubstanceDefinition resource (GSID)

The actual SubstanceDefinition FHIR resource representing an GSID and the Task is returned as json or xml based on the Accept header or a query string parameter (_format=xml).