FHIR Resource Creator

The FHIR Resource Creator is a component that demonstrates how to create and map FHIR resources. It does so by demonstrating the following workflow:

  1. First parses a template FHIR resource JSON. In this example, a v4.0.1 Patient resource has been provided.

  2. Performs some sample mappings to the FHIR resource object

  3. Removes any null values remaining in the mapped FHIR resource object

  4. Serializes the FHIR resource object for further processing

How to use it:

Using +COMPONENT, import the FHIR Resource Creator, and click Edit to open the Translator

You can easily generate a new template resource using the FHIR Profiling Tool .

Click on the output of the json.parse() on line 8 to see the parsed JSON template:

Untitled.png

You’ll see the JSON template contains the structure for a Patient resource, with each field populated with a json.NULL:

image-20240524-192956.png

Now click on the result of the trace on line 18 after the FHIR object has been mapped and cleaned using the https://interfaceware.atlassian.net/wiki/x/AoDys:

You can see that the FHIR object now only contains the data that was mapped over. Notice that the other template fields that originally contained json.NULLs have also been removed:

Related pages