Skip to main content

Overview

The PayerSearchCombobox provides a powerful search interface for finding healthcare payers and insurance providers. It features real-time search, autocomplete suggestions, alias support, and integration with the SampleHC clearinghouse database.

Basic Usage

API Reference

PayerSearchComboboxProps

function
Callback function called when a payer is selected or cleared.
PayerSearchItem | null
Currently selected payer item for controlled component behavior.
boolean
Disable the combobox interaction. Defaults to false.
boolean
Mark the field as required for form validation. Defaults to false.
string
Additional CSS classes to apply to the trigger element.
string
Placeholder text shown when no payer is selected. Defaults to “Search payers…”.
string
HTML id attribute for the combobox. Defaults to “payer-search-combobox”.
React.Ref<HTMLDivElement>
Ref forwarded to the combobox trigger element.

PayerSearchItem

string
required
Unique identifier for the payer in the Stedi clearinghouse system.
string
required
Primary display name for the payer (e.g., “Blue Cross Blue Shield”).
string
required
Primary payer identifier used for claims submission.
string[]
required
Array of alternative names and aliases for the payer.
string[]
required
Array of all known names for the payer, including official names.

Search Hook

You can also use the search functionality independently with the usePayerSearch hook:

Advanced Examples

Multiple Payer Selection

Validation and Error Handling

Features

  • Debounced Input: Search queries are debounced (250ms) to reduce API calls
  • On-demand Search: Search begins when dropdown is opened and query is entered
  • Live Results: Results update as you type

Smart Matching

  • Primary Names: Matches against official payer names
  • Aliases: Searches through known aliases and alternative names
  • Fuzzy Matching: Handles minor spelling variations and typos

User Experience

  • Keyboard Navigation: Full keyboard support with arrow keys and Enter
  • Loading States: Visual feedback during search operations
  • Error Handling: Graceful error handling with retry options
  • Accessibility: ARIA labels and screen reader support

Visual Features

  • Alias Display: Shows number of aliases with tooltip details
  • Clear Selection: Easy-to-use clear button for selected items
  • Responsive Design: Works on mobile and desktop devices

Error Handling

The component includes comprehensive error handling:

Integration Notes

Backend Integration: The component automatically uses the configured backend URL and authentication from the workflow context.
Performance: Search results are cached for 30 seconds to improve performance for repeated queries.
API Requirements: Requires valid API credentials and access to the SampleHC clearinghouse endpoints.

Styling

The component inherits your application’s theme and can be customized:
All styling is compatible with Tailwind CSS classes and follows the shadcn/ui design system.