[Android] Clinic & Room API

A clinic is a medical facility that provides healthcare services remotely through telecommunication technologies.

Get Account

/** * Interface for getting account details. */ interface AccountApi { /** * Get account details by code. * * @param code The code of the account. * @return A resource containing the account details. */ suspend fun getAccount(code: String): Resource<Account> }

 

Example Usage

/** * Launches a coroutine to get account details by code. * * @param accountCode The code of the room. */ viewModelScope.launch { val res = VseeApi.accountApi.getAccount(code = accountCode) when (res) { is Resource.Success -> { // Save account data. } is Resource.Error -> Timber.e("Get account detail $accountCode error: ${res.message}") } }

 

Get room

A clinic room is a room in a medical facility where patients are examined and treated by healthcare professionals.

/** * Interface for getting room details. */ interface RoomApi { /** * Get room details by code. * * @param roomCode The code of the room. * @param timeZone The time zone of the user. * @return A resource containing the room details. */ suspend fun getRoom(roomCode: String, timeZone: String): Resource<Room> /** * Get providers by room code. * * @param roomCode The code of the room. * @return A resource containing a list of providers. */ suspend fun getProviders(roomCode: String): Resource<List<User>> }

 

Example Usage

Get providers

Clinic providers are healthcare professionals who work in medical facilities such as clinics and hospitals1. They provide medical care to patients and may include doctors, nurses, physician assistants, and other healthcare professionals.

 

Example Usage

 

 

Â