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
Callback function called when a payer is selected or cleared.
Currently selected payer item for controlled component behavior.
Disable the combobox interaction. Defaults to false.
Mark the field as required for form validation. Defaults to false.
Additional CSS classes to apply to the trigger element.
Placeholder text shown when no payer is selected. Defaults to “Search payers…”.
HTML id attribute for the combobox. Defaults to “payer-search-combobox”.
ref React.Ref<HTMLDivElement>
Ref forwarded to the combobox trigger element.
PayerSearchItem
Unique identifier for the payer in the Stedi clearinghouse system.
Primary display name for the payer (e.g., “Blue Cross Blue Shield”).
Primary payer identifier used for claims submission.
Array of alternative names and aliases for the payer.
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
Real-time Search
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:
Network Errors
Search Errors
User Feedback
Authentication failures - Shows authentication error message
Network timeouts - Provides retry button
Invalid responses - Graceful degradation with error message
Rate limiting - Automatic backoff and retry
Error States : Clear error messages with actionable solutions
Retry Mechanisms : Easy retry buttons for failed searches
Loading Indicators : Visual feedback during operations
Empty States : Helpful messages when no results found
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.