Searching Health Resources
Workflow Guide
This guide describes the operations related to b.well directory of providers and available connections. The searchHealthResources method enables comprehensive searching across resource types within the b.well ecosystem. It allows users to find and retrieve information about healthcare providers, facilities, and support services, including practitioners, clinics, hospitals, health systems, insurance providers, and laboratories, and their organization logos from a single search.
Prerequisites
- Completed Authentication and Account Creation
Summary of Steps
- Use
searchHealthResourcesto find the desired Provider, Health System, Pharmacy, Insurance or Lab - Optionally, allow users to request a connection be added to the directory
Step 1: Search the b.well Directory for Health Resources
Use the searchHealthResources endpoint to search the b.well directory.
Search Parameters
- Search Term (
String): Key filter for searches, applicable for names, specialties, locations, or addresses. - Filters: Filters results based on organization type.
-
PRACTICEused for hospitals, clinics, and health system connections. -
PRACTITIONERused for healthcare providers. -
LABORATORYused for laboratory connections. -
INSURANCEused for insurance provider connections. -
PHARMACYused for pharmacy connections.
ID: Only return search results included in the array of IDs.Include Populated PROA Only: Return only results that have PROA connections.
Location: Sorts results by geographical location using latitude and longitude.
-
- Sort Options:
- By default, results are sorted by relevance in descending (
DESC) order when nosortByvalue is specified.- The most relevant results have the highest score, so sorting by
DESCis required to see the most relevant results first.
- The most relevant results have the highest score, so sorting by
- Available sorting options include:
- Relevance (default)
- Distance
- Content
- By default, results are sorted by relevance in descending (
- Pagination:
page: Specifies the page number for results.pageSize: Determines the number of results per page.
Organization and Health System Logos
Search results for health systems, practices, and other organizations can include a logo image for that organization. logoUrl is a string field holding a public URL that points to an organization's or health system's logo image, such as a hospital system's brand mark. Use it to help end users visually confirm they are connecting to the right organization in search results.
logoUrl is exposed as a plain, nullable string property on the top-level search result object and on each nested organization object.
The nested organization list is only populated when a result represents a practitioner with a known organization affiliation. For practices, insurance, laboratories, and other types, organization is empty — rely on the top-level logoUrl for those results.
Key understandings
- Public and unauthenticated. No credentials or extra headers are needed to fetch the image at the returned URL.
- Nullable. Not every organization has a logo yet. If an organization does not yet have a logo on file,
logoUrlis returned asnull— never an error, never a placeholder, never a broken-link URL. - Additive.
logoUrlis a new, optional field on existing search response types. You only receive it if you explicitly read the corresponding property. Existing integrations that don't reference it are unaffected. The field name is always camelCase —logoUrl, neverlogo_url.
Your integration should always:
- Treat
logoUrlas optional and nullable in your data model. - Render your own local placeholder — a generic building or organization icon, an initial-based avatar — whenever
logoUrlis null. - Check for null before assuming a value is present.
Example
import { SearchHealthResourcesRequest } from "@icanbwell/bwell-sdk-ts";
const response = await sdk.search.searchHealthResources(
new SearchHealthResourcesRequest({
search: "cardiologist",
searchLocation: { zipCode: "10001" },
})
);
for (const result of response.data?.results ?? []) {
// result.logoUrl: string | null
const logo = result.logoUrl ?? "/assets/placeholder-logo.png";
// Nested organization logos are also available:
const orgLogo = result.organization?.[0]?.logoUrl ?? null;
}Rendering best practices
- Don't send credentials. The URL can be fetched with a standard image request. Do not attach API credentials to it.
- Always have a placeholder. Ship a default placeholder image or icon in your app and show it whenever
logoUrlis null. - Prefer the most specific logo available. When both a result-level
logoUrland a nestedorganizationlogo are present, prefer the most specific one for that result. Fall back to the parent organization's logo when the result's ownlogoUrlis null.
Quick reference
| Query / Method | Field path | Type | Nullable |
|---|---|---|---|
searchHealthResources | result.logoUrl | string | null | Yes |
searchHealthResources | result.organization[].logoUrl | string | null | Yes |
Step 2: Submit a Connection for Review
In cases where the user is unable to find their desired connection, they can submit a request to the b.well team. The b.well team will attempt to add the requested connection to the b.well directory.
For this use case, use submitProviderForReview. Based on client configuration, the user may be notified of the availability of the connection via email or other notification system.
For complete request and response schema, see SearchManager documentation.
Updated 23 days ago
