Read and Write FHIR Data in an Agentic Workflow
Audience: Admins, Developers, Solution Architects
Purpose: Explains how to add FHIR action steps to Agentic Workflows in Kizen to read and write live FHIR data
Overview
Caution: This setup reflects Kizen's default configuration. Your administrator may have customized your layout, so columns or navigation may appear differently. Trial accounts may have limited features.
Once you use the FHIR integration to authenticate to your FHIR® server, you can read and write live FHIR data directly from an Agentic Workflow.
Before You Begin
To read and write FHIR data in an Agentic Workflow, you need:
A connection from Kizen to your FHIR server. For details, see Set Up FHIR in Kizen.
A valid access token and base URL for your FHIR server. See Authenticate to a FHIR Server in an Agentic Workflow for more information.
Read and Write FHIR in an Agentic Workflow
To read and write FHIR in an Agentic Workflow:
Choose the function to perform
In the Action Settings section of the Add Action modal, select the Action dropdown menu, and do one of the following:
To read a single FHIR resource, select FHIR Read, and set up the action. For more information, see Set Up a FHIR Read Action below.
To search FHIR resources and return results, select FHIR Search, and set up the action. For more information, see Set Up a FHIR Search Action below.
To create a new FHIR resource, select FHIR Create, and set up the action. For more information, see Set Up a FHIR Create Action below.
To update an existing FHIR resource in its entirety, select FHIR Update, and set up the action. For more information, see Set Up a FHIR Update Action below.
To update certain fields of an existing FHIR resource, select FHIR Patch, and set up the action. For more information, see Set Up a FHIR Patch Action below.
Set Up a FHIR Read Action
The FHIR Read action reads a single FHIR resource by its type and ID.
To set up a FHIR Read action:
Configure the sources for the script inputs
For each of the fields in the Script Inputs section of the Add Action modal, select the source of the field's value from the Input Source dropdown menu, and then configure the source with the additional controls that appear.

The fields are as follows:
Access Token
String
The access token from the FHIR Authenticate action
Yes
FHIR Base URL
String
The base URL of the FHIR server from the FHIR Authenticate action
Yes
Resource ID
String
The ID of the FHIR resource to read
Yes
Resource Type
String
The type of the FHIR resource to read in PascalCase, such as Patient or PractitionerRole
Yes
Configure the destinations for the script outputs
For each of the fields in the Script Outputs section of the modal, select the destination of the field's value from the Output Destination dropdown menu, and then configure the destination with the additional controls that appear.

The fields are as follows:
HTTP Status Code
Number
The HTTP status code that the read operation returned
No
Result
String
The result of the read operation in JSON format
No
Set Up a FHIR Search Action
The FHIR Search action runs a search on FHIR resources of the specified type and returns the results for use in your Agentic Workflow.
To set up a FHIR Search action:
Configure the sources for the script inputs
For each of the fields in the Script Inputs section of the Add Action modal, select the source of the field's value from the Input Source dropdown menu, and then configure the source with the additional controls that appear.

The fields are as follows:
Access Token
String
The access token from the FHIR Authenticate action
Yes
FHIR Base URL
String
The base URL of the FHIR server from the FHIR Authenticate action
Yes
Resource Type
String
The type of the FHIR resource to search in PascalCase, such as Patient or PractitionerRole
Yes
Search Parameters
String
The parameters of the search, like this: _count=10&_lastUpdated=gt2026-02-10T00:00:00Z
No
Configure the destinations for the script outputs
For each of the fields in the Script Outputs section of the modal, select the destination of the field's value from the Output Destination dropdown menu, and then configure the destination with the additional controls that appear.

The fields are as follows:
HTTP Status Code
Number
The HTTP status code that the search operation returned.
No
Result
String
The result set as a JSON string.
No
Total Count
Number
The total number of entries on the first page of results. Note that this isn't necessarily the same as the total number of FHIR bundles.
No
Set Up a FHIR Create Action
The FHIR Create action creates a new FHIR resource of the specified type from data in Kizen.
To set up a FHIR Create action:
Configure the sources for the script inputs
For each of the fields in the Script Inputs section of the Add Action modal, select the source of the field's value from the Input Source dropdown menu, and then configure the source with the additional controls that appear.

The fields are as follows:
Access Token
String
The access token from the FHIR Authenticate action
Yes
FHIR Base URL
String
The base URL of the FHIR server from the FHIR Authenticate action
Yes
Resource Body
String
The FHIR resource to create as a JSON string. Take this value from the output of a FHIR Read step.
Yes
Resource Type
String
The type of the FHIR resource to create in PascalCase, such as Patient or PractitionerRole.
Yes
Configure the destinations for the script outputs
For each of the fields in the Script Outputs section of the modal, select the destination of the field's value from the Output Destination dropdown menu, and then configure the destination with the additional controls that appear.

The fields are as follows:
Created Resource ID
String
The ID of the created FHIR resource
No
HTTP Status Code
Number
The HTTP status code that the create operation returned
No
Result
String
The JSON string of the created FHIR resource
No
Set Up a FHIR Update Action
The FHIR Update action replaces an existing FHIR resource of the specified type by overwriting it completely with data from Kizen.
To set up a FHIR Update action:
Configure the sources for the script inputs
For each of the fields in the Script Inputs section of the Add Action modal, select the source of the field's value from the Input Source dropdown menu, and then configure the source with the additional controls that appear.

The fields are as follows:
Access Token
String
The access token from the FHIR Authenticate action
Yes
FHIR Base URL
String
The base URL of the FHIR server from the FHIR Authenticate action
Yes
Resource Body
String
The FHIR resource to update as a JSON string
Yes
Resource ID
String
The ID of the FHIR resource to update
Yes
Resource Type
String
The type of the FHIR resource to update in PascalCase, such as Patient or PractitionerRole
Yes
Configure the destinations for the script outputs
For each of the fields in the Script Outputs section of the modal, select the destination of the field's value from the Output Destination dropdown menu, and then configure the destination with the additional controls that appear.

The fields are as follows:
HTTP Status Code
Number
The HTTP status code that the update operation returned
No
Result
String
The JSON string of the updated FHIR resource
No
Set Up a FHIR Patch Action
The FHIR Patch action partially updates a FHIR resource of the specified type with data from Kizen. Unlike FHIR Update, this action doesn't overwrite the resource completely.
To set up a FHIR Patch action:
Configure the sources for the script inputs
For each of the fields in the Script Inputs section of the Add Action modal, select the source of the field's value from the Input Source dropdown menu, and then configure the source with the additional controls that appear.

The fields are as follows:
Access Token
String
The access token from the FHIR Authenticate action
Yes
FHIR Base URL
String
The base URL of the FHIR server from the FHIR Authenticate action
Yes
Patch Body
String
The JSON Patch or FHIR Patch string to apply to the FHIR resource.
Yes
Patch Content Type
String
The technical content type of the patch body. The default value is application/json-patch+json.
No
Resource ID
String
The ID of the FHIR resource to patch.
Yes
Resource Type
String
The type of the FHIR resource to patch in PascalCase, such as Patient or PractitionerRole.
Yes
Configure the destinations for the script outputs
For each of the fields in the Script Outputs section of the modal, select the destination of the field's value from the Output Destination dropdown menu, and then configure the destination with the additional controls that appear.

The fields are as follows:
HTTP Status Code
Number
The HTTP status code that the patch operation returned
No
Result
String
The JSON string of the patched FHIR resource
No
What's Next
Continue to Synchronize Data Between FHIR and Kizen in an Agentic Workflow to learn how to use Agentic Workflows to keep your FHIR data in Kizen up to date.
HL7, FHIR, and the FHIR FLAME DESIGN are the registered trademarks of Health Level Seven International, and their use does not constitute endorsement by HL7.
Last updated
Was this helpful?



