Create a Data Connection
Establishing New Connections
Overview
The createConnection method in the b.well SDK is designed for initiating the process of establishing new connections with various healthcare-related entities. This process is crucial for integrating and interacting with providers, clinics, hospitals, health systems, or labs.
This method is to be used when establishing a connection when the data source category is BASIC.
Method Signature
suspend fun createConnection(request: ConnectionCreateRequest): BWellResult<Connection>request: AConnectionCreateRequestobject containing the necessary information for establishing a new connection.Connection: Information about the newly created connection.
Connection Creation Process
-
Request Preparation:
- The
ConnectionCreateRequestmust encapsulate essential details like the connection ID and any required credentials.
- The
-
Initiating Connection:
- The method initiates the connection process, which may involve authentication steps specific to the type of healthcare entity being connected.
Connection Object in b.well SDK
Connection Object in b.well SDKThe Connection class in the b.well SDK represents a data connection. It contains key information and statuses about the connection.
Properties
id(String): Unique identifier for the connection.name(String): Display name of the connection.category(ConnectionCategory): Category classification of the connection.type(ConnectionType): Type of the connection.status(ConnectionStatus, optional): Current status of the connection.syncStatus(SyncStatus, optional): Current synchronization status.statusUpdated(Date, optional): Last date when the status was updated.lastSynced(Date, optional): Date of the last synchronization.created(Date): Date when the connection was created.isDirect(Boolean): Indicates if it's a direct connection.
Best Practices
- Accurate Information: Ensure all details in the
ConnectionCreateRequestare accurate and complete. - Understanding OperationOutcome: Familiarize yourself with interpreting the
OperationOutcometo understand the success or failure of the connection process.
Updated about 2 months ago
