Sync FHIR data to Snowflake on schedule
Recipe ToolsDeveloper ToolAPI IntegrationDatabaseMarketing
What it does
When a scheduled time arrives, this automation retrieves patient data from FHIR and loads it into Snowflake. The flow validates the access token before fetching records so only authenticated data reaches the warehouse.
Who it's for
Data and analytics teams who need to keep FHIR patient data synchronized with Snowflake for reporting.
How teams use this
Automate daily FHIR to Snowflake loads
Run the sync every morning so patient data in Snowflake is always current without manual intervention. The team can build reports on fresh data each day.
Validate tokens before loading data
Check that the access token exists before attempting to fetch FHIR records, so failed authentications do not create incomplete rows in Snowflake.
Extend sync to multiple FHIR endpoints
Add a loop to iterate over different FHIR sources and insert all results into Snowflake, so one schedule handles data from multiple systems.
Route data to different Snowflake tables
Condition the insert step to send records to different tables based on patient type or data source, so the warehouse stays organized by data origin.
How it works
- Run on a set schedule. This automation starts at the scheduled time you specify, then moves to the next step to begin the data sync.
- Generate a token. Call the token generator endpoint via HTTP to obtain credentials for accessing FHIR data from the source system.
- Retrieve the FHIR access token. Make an HTTP call to the FHIR OAuth endpoint to get the token needed to authenticate patient data requests.
- Fetch patient records from FHIR. If the access token is present, call FHIR via HTTP to retrieve the patient data for this sync cycle.
- Load data into Snowflake. Insert the patient records into the POC_TEST_DATA_LOAD.WORKATO_JSON table so the data is available for analysis.