Introduction

Harnessing the Power of b.well for Healthcare Innovation

We are excited to introduce you to the b.well Kotlin SDK, an advanced toolkit tailored for the rapid development of healthcare applications. Our SDK offers a powerful gateway to b.well’s extensive suite of healthcare related functions, streamlining your development process and enhancing the capabilities of your applications.

Builder Pattern: Simplifying Complex Requests

A standout feature of our SDK is the implementation of the builder pattern for constructing requests. This intuitive approach significantly simplifies the process of setting up FHIR (Fast Healthcare Interoperability Resources) search parameters, a core component in healthcare applications.

Example Use-Case

Traditionally, setting up FHIR search parameters could be cumbersome, often involving the manipulation of complex objects. With our builder pattern, you can incrementally set various search terms in a more readable and maintainable manner. This method proves invaluable for handling FHIR resources, which are characterized by their numerous and often optional search parameters.

BwellResult<T>: A Unified Result Wrapper

To enhance the consistency and richness of information returned from search operations, we have introduced BwellResult<T>, a generic result wrapper. This wrapper encompasses:

SingleResource<T> & ResourceCollection<T>

Whether it's a single resource or a collection, BwellResult<T> provides a structured format. This includes:

  • data: The resource(s) obtained from the search.
  • pagingInfo (only in ResourceCollection): Information about pagination for easy navigation through large data sets.
  • operationOutcome: Detailed outcomes of the FHIR operation, aiding in effective error handling and result interpretation.
sealed class BwellResult<T> {  
    data class SingleResource<T>(  
        val data: T?,  
        val operationOutcome: OperationOutcome  
    ) : BwellResult<T>()  
    data class ResourceCollection<T>(  
        val data: List<T>?,  
        val pagingInfo: PagingInfo?,  
        val operationOutcome: OperationOutcome  
    ) : BwellResult<T>()  
}

Consistency and Ease of Use
Our approach ensures that every search operation through the SDK is met with consistent and comprehensive feedback. This design choice simplifies handling results and errors in your application, making the development process smoother and more intuitive.


What’s Next

As you navigate through this guide, you will discover how the b.well Kotlin SDK can revolutionize your healthcare application development. From initialization to complex searches, our documentation is designed to provide clear instructions and examples, making your journey with b.well both enjoyable and productive.