Lab Knowledge
Retrieving Lab Knowledge
Overview
The getLabKnowledge method in the b.well SDK is designed to provide users with common questions and answers about lab results, offering a simplified interface for accessing detailed lab information.
Method Signature
suspend fun getLabKnowledge(request: LabKnowledgeRequest): BWellResult<LabKnowledge>request: ALabKnowledgeRequestobject specifying the lab ID.BWellResult<LabKnowledge>: Resolves toLabKnowledge, containing HTML content about the lab.
Data Class: LabKnowledge
content: Detailed information about the lab, presented in HTML format.
Example Usage
val request = LabKnowledgeRequest.Builder()
.labId(labId.toString()) // Specify the lab ID
.page() // Page number
.pageSize() // Number of results per page
.build()
labsViewModel.getLabKnowledge(request)Best Practices
- Ensure the lab ID is correctly included in the request.
- Handle
BadRequestExceptionin case the lab ID is null.
Updated about 2 months ago
