Get FHIR Record

Overview

get_fhir_record retrieves patient medical records — including vaccination history and other health data — for a
specific FHIR resource type. An LLM/agent should call this tool when checking immunization records, COVID-19
vaccinations, or other single-resource-type medical events. resource is required; person_id is optional and is
extracted from the access token if not provided. For better results when the user mentions medical terms (labs,
conditions, medications, vitals, etc.), pass text_filters with variations of those terms to prioritize relevant
data in the response.

Required Parameters

resource (string, one of the supported FHIR resource names)

  • The FHIR resource type to retrieve (e.g. Immunization, Condition, MedicationRequest).

Optional Parameters

person_id (string)

  • Default: None
  • The identifier of the person whose FHIR records are to be retrieved. If not provided, extracted from the access token.

active_only (boolean)

  • Default: false
  • Whether to filter for active records only.

start_date (date, YYYY-MM-DD)

  • Default: None
  • Earliest date (inclusive) to include. No lower bound if omitted.

end_date (date, YYYY-MM-DD)

  • Default: None
  • Latest date (inclusive) to include. No upper bound if omitted.

maximum_tokens (integer)

  • Default: None
  • Maximum number of tokens to return in the result.

text_filters (list of strings)

  • Default: None
  • Text strings to prioritize matching records in results — improves accuracy for specific test results, vitals, or time-series queries. Generate multiple variations per term (full name, abbreviations, medical synonyms). Not for general summaries or vague queries.

count (integer)

  • Default: the environment's observations_default_count
  • Number of raw FHIR records to fetch before filtering. Minimum of 300 is automatically enforced; increase to 1000–5000 for comprehensive historical searches.

ignore_cache (boolean)

  • Default: false
  • If true, bypasses any cached records and fetches fresh data.

debug (boolean)

  • Default: false
  • Whether to display debugging information.

Returns

FhirRecordRetrievalOutput — a result field containing the retrieved patient record data as a string.

Notes

Unlike dump_fhir_record (which fetches all client-facing resource types in one call), this tool retrieves a single resource type at a time — use it for targeted, single-resource-type lookups.



Did this page help you?