See llms.txt for all machine-readable content.

Back to Templates

Triage hospital FHIR observations with Google Gemini, Google Sheets, and Slack

Quick overview

Youtube Video: https://youtu.be/hq4jZv8EZYg?si=aU_0S13Zvbo30IS-

This workflow runs every 15 minutes to poll FHIR Observation data from mock.health, uses Google Gemini to triage each new observation, escalates high-severity findings to Slack, and logs all processed observations and recommendations to a Google Sheets tracking sheet.

How it works

  1. Runs every 15 minutes on a schedule.
  2. Reads the last successful sync timestamp from workflow static data and polls the mock.health FHIR Observation endpoint for the most recently updated records since that time.
  3. Parses the FHIR bundle, normalizes each Observation into a consistent alert payload, and stops if no valid observations are returned.
  4. Checks Google Sheets for matching observationId values and filters out observations already marked as processed.
  5. Sends each unprocessed observation to Google Gemini to assign a severity, headline, clinical rationale, and recommended action, then merges the triage back into the observation record.
  6. Routes CRITICAL and HIGH observations to Slack as an escalation message, then restores the original payload for downstream logging.
  7. Appends or updates the observation in Google Sheets (marking it processed) and advances the stored sync cursor to the newest processed observation timestamp.

Setup

  1. Create or select a mock.health API bearer token credential and ensure it can access the FHIR Observation endpoint used in the HTTP request.
  2. Add a Google Gemini (Google PaLM) API credential for the Gemini chat model used to generate triage JSON.
  3. Add a Google Sheets Service Account credential, grant it access to the target spreadsheet, and ensure the “Observations” sheet has columns matching the fields written (including observationId and processed).
  4. Add a Slack OAuth credential and set the target channel for escalations (the workflow currently posts to channel ID C0B8VH1M5PX).