A React-based web application that provides an intuitive interface for searching and ranking healthcare providers using natural language queries powered by AI.
- Natural Language Search: Describe what you need in plain English
- Provider Results Table: View detailed provider information in an organized table
- AI-Powered Ranking: Score and rank providers based on your specific needs
- Real-time Updates: Instant feedback with loading states and error handling
- React with TypeScript
- TanStack Query (React Query) for data fetching and caching
- Material-UI (MUI) for UI components and icons
- CSS Modules for styling
Enter a natural language query describing what you're looking for:
Example Queries:
- "I need a cardiologist who can do an ultrasound near downtown Chicago"
- "Find pediatricians accepting Medicare in California"
- "Orthopedic surgeons with high patient volume in New York"
The search will return:
- Provider specialty
- Location (city, state, zipcode)
- Related medical services (HCPCS descriptions)
- Number of matching providers
Search results are displayed in an interactive table showing:
- Provider name and credentials
- Full address
- Medical specialty
- Medicare acceptance status
- Patient statistics (total beneficiaries, average age)
After getting search results, you can refine by scoring providers:
- Click "Rank Providers"
- Enter information about yourself
- Providers will be re-ranked with relevance scores
Example Scoring Queries:
- "23 year old white male"
- "Asian woman aged 68"
client/
├── src/
│ ├── api/
│ │ └── providers.ts # API service functions
│ ├── components/
│ │ ├── ProviderTable.tsx # Results table component
│ │ ├── SearchInput.tsx # Search input component
│ │ ├── SearchTips.tsx # Tips and guidance
│ │ └── ScoreDialog.tsx # Provider scoring dialog
│ ├── pages/
│ │ ├── Home.tsx # Main home page
│ │ └── Home.module.css # Page styles
│ └── types/
│ └── provider.ts # Types
├── public/
├── index.html
├── package.json
└── vite.config.ts
The client connects to the Provider Finder AI API with two main endpoints:
POST /api/search_providers
{
"query": "string"
}POST /api/rank_providers
{
"query": "string",
"provider_ids": [123, 456, 789]
}For full API documentation, visit: https://ai-provider-finder.onrender.com/docs
Reusable search input component with submit functionality.
Props:
userQuery: Current query stringsetUserQuery: Query state setterhandleSubmit: Form submit handlerplaceholder: Input placeholder text
Displays provider search or scoring results in a table format.
Props:
tableData: Provider data (search or score response)isLoading: Loading state indicator
Modal dialog for scoring and ranking providers.
Props:
userQuery: Current scoring querysetUserQuery: Query state setterhandleSubmit: Form submit handler
Static component providing helpful search query examples and tips.
The application uses React Query for server state management:
- Search Mutation: Handles provider search requests
- Score Mutation: Handles provider ranking requests
- Automatic Caching: React Query caches responses for improved performance
- Error Handling: Built-in error states for failed requests
The application handles various error states:
- Network errors
- API validation errors
- Empty search results
- Failed ranking requests
A FastAPI-based healthcare provider search and ranking system that uses natural language processing to find and rank medical providers based on various criteria.
https://ai-provider-finder.onrender.com
Interactive API documentation is available at:
- Swagger UI: https://ai-provider-finder.onrender.com/docs
Search for healthcare providers using natural language queries.
Endpoint: POST /api/search_providers
Request Body:
{
"query": "string"
}Response:
{
"success": true,
"parsed_params": {},
"results": [
{
"id": 0,
"last_name": "string",
"first_name": "string",
"credentials": "string",
"street_1": "string",
"street_2": "string",
"city": "string",
"state": "string",
"zipcode": "string",
"specialty": "string",
"accepts_medicare": "string",
"total_benes": 0,
"avg_age": 0
}
],
"hcpcs_desc": "string",
"count": 0,
"error": null
}Example Request:
curl -X POST "https://ai-provider-finder.onrender.com/api/search_providers" \
-H "Content-Type: application/json" \
-d '{"query": "I need a cardiologist who can do an ultrasound near downtown Chicago"}'Rank a specific set of providers based on relevance to a query.
Endpoint: POST /api/rank_providers
Request Body:
{
"query": "string",
"provider_ids": [0, 1, 2]
}Response:
{
"success": true,
"parsed_params": {},
"results": [
{
"id": 0,
"last_name": "string",
"first_name": "string",
"credentials": "string",
"street_1": "string",
"street_2": "string",
"city": "string",
"state": "string",
"zipcode": "string",
"specialty": "string",
"accepts_medicare": "string",
"total_benes": 0,
"avg_age": 0,
"score": 0.95,
"rank": 1
}
],
"error": null
}Example Request:
curl -X POST "https://ai-provider-finder.onrender.com/api/rank_providers" \
-H "Content-Type: application/json" \
-d '{
"query": "23 year old white male",
"provider_ids": [123, 456, 789]
}'Represents a healthcare provider with the following fields:
| Field | Type | Description |
|---|---|---|
id |
integer | Unique provider identifier |
last_name |
string | Provider's last name |
first_name |
string | Provider's first name (nullable) |
credentials |
string | Professional credentials (nullable) |
street_1 |
string | Primary street address |
street_2 |
string | Secondary address line (nullable) |
city |
string | City |
state |
string | State |
zipcode |
string | ZIP code |
specialty |
string | Medical specialty |
accepts_medicare |
string | Medicare acceptance status |
total_benes |
integer | Total number of beneficiaries |
avg_age |
number | Average patient age |
Extends Provider with ranking information:
| Field | Type | Description |
|---|---|---|
| All Provider fields | - | Inherits all Provider fields |
score |
number | Relevance score (0-100) |
rank |
integer | Ranking position |
| Field | Type | Description |
|---|---|---|
success |
boolean | Request success status |
parsed_params |
object | Parsed query parameters |
results |
Provider[] | Array of matching providers |
hcpcs_desc |
string | HCPCS code description (nullable) |
count |
integer | Total result count (nullable) |
error |
string | Error message if failed (nullable) |
| Field | Type | Description |
|---|---|---|
success |
boolean | Request success status |
parsed_params |
object | Parsed query parameters |
results |
ScoredProvider[] | Ranked providers with scores |
error |
string | Error message if failed (nullable) |
The API uses standard HTTP status codes:
200- Success422- Validation Error
Validation errors return:
{
"detail": [
{
"loc": ["string"],
"msg": "string",
"type": "string"
}
]
}Search for providers using conversational queries:
- "Find cardiologists near 10001"
- "Pediatricians accepting Medicare in California"
- "Orthopedic surgeons with high patient volume"
Rank and compare specific providers:
- Score providers based on user information