Get FHIR Record


Description: Retrieves patient medical records, including vaccination history and other health data, for a specific patient. Particularly useful for checking immunization records, COVID-19 vaccinations, and other medical events. Requires patient ID and FHIR resourceType.


get_fhir_record Parameters

Required Parameters

  1. resource (string)
    • Available FHIR resource types:
      • "MedicationRequest"
      • "MedicationDispense"
      • "MedicationStatement"
      • "Procedure"
      • "CarePlan"
      • "DiagnosticReport"
      • "Lab"
      • "Vitals"
      • "Condition"
      • "AllergyIntolerance"
      • "Encounter"
      • "Immunization"
    • Description: Name of FHIR resource to retrieve.

Optional Parameters

  1. active_only (boolean)

    • Default: false
    • Description: Whether to filter for active records only. Default is False.
  2. count (integer or null)

    • Default: 300
    • Description: Number of raw FHIR records to fetch BEFORE filtering. MINIMUM: 300 (automatically enforced). This parameter controls the raw fetch size to ensure sufficient data exists for filtering. Always use high values (≥300) for initial queries. Increase to 1000-5000 for comprehensive historical search scenarios.
  3. end_date (date string or null)

    • Default: null
    • Format: YYYY-MM-DD
    • Description: The latest date (inclusive) to include FHIR records. If not provided, no upper date bound is applied.
  4. maximum_tokens (integer or null)

    • Default: null
    • Description: The maximum number of tokens to return in the result. Default is None.
  5. start_date (date string or null)

    • Default: null
    • Format: YYYY-MM-DD
    • Description: The earliest date (inclusive) to include FHIR records. If not provided, no lower date bound is applied.
  6. text_filters (array of strings or null)

    • Default: null
    • Description: List of text strings to prioritize matching records in results. Matching records appear first, improving answer accuracy. Use when user asks about specific medical data items, especially:
      • Specific test results ('A1c', 'cholesterol', 'glucose')
      • Particular vital signs ('blood pressure', 'temperature', 'weight')
      • Time-series queries ('last 5 readings', 'most recent values')
      • Counting/trending ('how many times', 'changes over time')

    Generate multiple variations for each term:

    • Full name + abbreviations (e.g., 'hemoglobin' + 'hgb')
    • Medical synonyms (e.g., 'glycohemoglobin' for A1c)
    • Related components (e.g., for 'blood pressure' add 'systolic', 'diastolic')
    • Common alternatives (e.g., for 'cholesterol' add 'ldl', 'hdl', 'triglyceride')

    Examples:

    • 'last 5 A1c results' → ['hemoglobin', 'hgb', 'a1c', 'hba1c', 'glycohemoglobin']
    • 'cholesterol levels' → ['cholesterol', 'ldl', 'hdl', 'triglyceride', 'lipid']
    • 'recent blood pressure' → ['blood pressure', 'bp', 'systolic', 'diastolic']

    Don't use for:

    • General summaries ('tell me about my health', 'what's in my chart')
    • Broad categories ('all lab results', 'all medications')
    • Vague queries ('anything abnormal', 'what should I know')

When to Use get_fhir_record

This tool retrieves patient medical records, including vaccination history and other health data, for a specific patient. It's particularly useful for:

  • Checking immunization records, COVID-19 vaccinations, and other medical events
  • Retrieving specific FHIR resource types
  • Getting detailed medical data with filtering capabilities

TIP: For better results when the user mentions medical terms (labs, conditions, medications, vitals, etc.), use the 'text_filters' parameter with variations of those terms. This helps prioritize relevant data.