General Search
Performing a General Search with the search Method
search MethodOverview
The search method in the b.well SDK allows for a versatile and customizable search of providers based on various criteria. It is designed to cater to a range of search needs, from a broad general search to more specific queries.
Method Signature
suspend fun search(providerSearchRequest: ProviderSearchRequest): BWellResult<Provider>providerSearchRequest: Encapsulates search parameters.BWellResult<Provider>: Returns a collection of providers and connections, along with FHIR OperationOutcome and paging information.
Search Parameters
-
Search Term:
- The primary filter for searches, usable for organization names, locations, addresses, or phone numbers.
-
Specialty Filters:
- An array of strings for filtering by specialty. Best used for specific provider searches rather than general searches.
-
Organization Type Filters:
- Filters results by organization type, more suitable for targeted searches.
-
Gender:
- Filters providers based on gender (male, female, other, unknown). Used for more specific provider searches.
-
Location:
- Filters results by geographical location using latitude, longitude, and distance parameters.
-
Sort By:
- Offers various sorting options. The default is relevance. Other options include distance and content (for organizations).
-
Pagination:
page: Specifies the page number for results.pageSize: Determines the number of results per page.
Best Practices
- General Searches: For a broad search, it's best to rely on the
searchTermwithout overly restrictive filters. - Specific Queries: Use filters like
specialtyFilters,organizationTypeFilters, andgenderfor targeted searches. - Sorting: The default sort by relevance is typically the most effective, especially for general searches.
- Pagination: Adjust
pageandpageSizeto manage the volume of search results effectively.
Updated 10 months ago
Did this page help you?
