FHIR Module
  • 05 Jul 2022
  • 3 Minutes to read
  • Dark
    Light

FHIR Module

  • Dark
    Light

Module Details

Core or Github ModuleCore Module
Restart RequiredNo
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.

InputsDescription
FHIR BundleThe FHIR Bundle 
Resource to ADDThe additional resource being added to the bundle
Resource URLThe resource URL
OutputsDescription
FHIR Bundle ResultThe 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.

InputsDescription
FHIR ResourceThe 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.

InputsDescription
FHIR BundleThe FHIR Bundle used by the step


Get Json for FHIRBundle

The Get Json for FHIRBundle step outputs the Bundle as a JSON formatted string.

InputsDescription
FHIRBundleThe FHIR Bundle used as an input
OutputsDescription
OutputThe JSON formatted string of the datatype


Get Json for FHIRObject

The Get Json for FHIRObject step outputs the Object as a JSON formatted string.

InputsDescription
FHIRBase ObjectThe FHIR Object used as an input
OutputsDescription
OutputThe JSON formatted string of the input


GetJson For FHIRResource

The Get Json for FHIRResource step outputs the Resource as a JSON formatted string.

InputsDescription
FHIRResourceThe FHIR Bundle used as an input
OutputsDescription
OutputThe 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.

InputsDescription
FHIR BundleThe inputted FHIR bundle
OutputsDescription
Resource ListA 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

InputsDescription
Json FHIRDataA JSON formatted string
OutputsDescription
OutputThe 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.

InputsDescription
FHIR Resource JSONA JSON formatted string


Read Resource From JSON

The Read Resource From Json step uses a JSON formatted string and outputs an FHIR Resource

InputsDescription
JSON FHIRDataA JSON formatted string
OutputsDescription
OutputThe outputted resource



Example

In this example, a patient's data will be pulled from an FHIR transaction bundle resource and will be checked to see if the patient is older than 18 years old. The input will be a JSON string describing a transaction that has a patient resource. The JSON file can be downloaded below.

   Bundle JSON  

  1. In a Designer Project, create a new Flow.
  2. Select the Create Data step from the Toolbox. Define a string input.

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

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

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

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

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

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

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

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

  17. 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.



Was this article helpful?