The headless React SDK to drive patient eligibility. Hooks allow you to focus on building your UX/UI, rather than the complexity of eligibility input and API calls.
TypeScript SDK, browser and node-compatible, for managing eligibility checks. Provides an abstraction over the eligibility API's.
If using React, do not use this directly.
The SDK emits analytics events throughout the eligibility flow. To receive these events, implement the AnalyticsHandler interface and pass it to the SDK constructor:
import { BridgeSdk } from "@usebridge/sdk-core"
import type { AnalyticsHandler, AnalyticsEvent, AnalyticsEventName } from "@usebridge/sdk-core"
const myAnalyticsHandler: AnalyticsHandler = {
onEvent<T extends AnalyticsEventName>(event: T, data: AnalyticsEvent<T>) {
// Send to your analytics service
console.log(event, data)
},
onError(error: Error) {
// Handle fatal errors
console.error(error)
},
}
const sdk = new BridgeSdk({
publishableKey: "pk_...",
analyticsHandler: myAnalyticsHandler,
})SDK Lifecycle
sdk.initializedsdk.error
Input Events
input.payer.searchinput.state.updated
Soft Eligibility
soft_eligibility.session.createdsoft_eligibility.session.submitsoft_eligibility.session.updatedsoft_eligibility.session.complete.eligiblesoft_eligibility.session.complete.ineligible
Hard Eligibility
hard_eligibility.session.createdhard_eligibility.session.submithard_eligibility.session.updatedhard_eligibility.session.complete.eligiblehard_eligibility.session.complete.ineligible