Module Details |
Core or Github Module | Core Module |
Restart Required | No |
Step Location | Integration > FHIR |
Settings Location | N/A |
Prerequisites | |
The Fast Healthcare Interoperability Resources (FHIR) Module allows integration with the FHIR API and currently supports FHIR STU 3.
FHIR is a standard for electronic healthcare data exchange that was designed for REST web services.
The module provides users with pre-built Flow steps that can help users to access and manipulate FHIR data objects. For FHIR, any entities using SimpleQuantities now use Quantities.
Add Resource to Bundle
The Add Resource to Bundle step provides a way to add resource types to an FHIR Bundle. The step takes in an FHIR Bundle, Resource, and the Resource URL as inputs and outputs a new FHIR Bundle object.
Inputs | Description |
---|
FHIR Bundle | The FHIR Bundle |
Resource to ADD | The additional resource being added to the bundle |
Resource URL | The resource URL |
Outputs | Description |
---|
FHIR Bundle Result | The updated FHIR Bundle |

Cast FHIR Resource to FHIR Type
The Cast FHIR Resource to FHIR Type step allows a resource to be cast as a different FHIR Type. The FHIR Type for casting can be configured in the Settings for the step.
Inputs | Description |
---|
FHIR Resource | The FHIR resource being cast into another resource Type. |

For Each Resource in FHIR Bundle
The For Each Resource in FHIR Bundle step functions similarly to a ForEach step, allowing actions to be applied to individual resources in a bundle.
Inputs | Description |
---|
FHIR Bundle | The FHIR Bundle used by the step |

Get Json for FHIRBundle
The Get Json for FHIRBundle step outputs the Bundle as a JSON formatted string.
Inputs | Description |
---|
FHIRBundle | The FHIR Bundle used as an input |
Outputs | Description |
---|
Output | The JSON formatted string of the datatype |

Get Json for FHIRObjectThe Get Json for FHIRObject step outputs the Object as a JSON formatted string.
Inputs | Description |
---|
FHIRBase Object | The FHIR Object used as an input |
Outputs | Description |
---|
Output | The JSON formatted string of the input |

GetJson For FHIRResource
The Get Json for FHIRResource step outputs the Resource as a JSON formatted string.
Inputs | Description |
---|
FHIRResource | The FHIR Bundle used as an input |
Outputs | Description |
---|
Output | The JSON formatted string of the input |

Get Resources from Bundle
The Get Resources from Bundle step retrieves a list of resources used in the Bundle.
Inputs | Description |
---|
FHIR Bundle | The inputted FHIR bundle |
Outputs | Description |
---|
Resource List | A list of objects contained in the bundle |

Read Bundle From JSONData
The Read Bundle From JSONData step takes in a JSON formatted string and outputs a Bundle
Inputs | Description |
---|
Json FHIRData | A JSON formatted string |
Outputs | Description |
---|
Output | The outputted bundle |

Read JSON and Cast to FHIR Type
The Read JSON and Cast to FHIR Type step uses a JSON formatted string as an input and casts this to a specific FHIR Type. The type can be defined in the settings for the step.
Inputs | Description |
---|
FHIR Resource JSON | A JSON formatted string |

Read Resource From JSON
The Read Resource From Json step uses a JSON formatted string and outputs an FHIR Resource
Inputs | Description |
---|
JSON FHIRData | A JSON formatted string |
Outputs | Description |
---|
Output | The outputted resource |

Example
In this example, a patient's data will be pulled from an FHIR transaction bundle resource and checked to see if the patient is older than 18. The input will be a JSON string describing a transaction that has a patient resource. The JSON file can be downloaded below.
Bundle JSON
- In a Designer Project, create a new Flow.
- Select the Create Data step from the Toolbox. Define a string input.

- Click SHOW EDITOR to open the Merge Text Editor screen. Paste the contents of the downloaded file.

- Save and close the Text Editor and the Data Definitions window.
- Navigate to Integrations > All Integrations > FHIR and select the Read Bundle from JSONData step.
- Under the INPUTS category on the Properties panel, select Bundle JSON.

- Navigate to Integrations > All Integrations > FHIR. Select the Get Resources from Bundle step. Use the output of the previous step as the input.

- In the same category, add the Cast FHIR Resource to FHIR Type step.
- Under the SETTINGS category, select Patient in the FHIRTypeName.
- For the input, select Resource List.Last

- Navigate to Data > Dates and select the Parse Date step.
- Under the INPUTS category, select BirthDateElement from FHIR Resource Result. Then, click DONE

- Add an Add Years step from Data > Dates.
- Under INPUTS enter "18" in the Years field and select Parse Date_ Output. for the Source Date.

- Add and define a Run Rule step. Configure the Rule to evaluate if an input is less than or equal to the current date.

- Add a popup step at the end of each path to display the result.

- On the top action bar, click Debug. Then, click START DEBUGGING. Since the birthdate of the patient in this example is 12/25/2000, the patient is older than 18 and should follow the True path.
