...
A Clinic
represents a healthcare facility, while Room
is individual examination or treatment spaces within the clinic.
Load clinic or room from code
Load the Clinic or Room information based on the provided clinic code.
...
Parameter | Type | Description |
---|---|---|
|
| The clinic code or room code provided by provider. |
|
| A closure called when the Clinic or Room information is successfully retrieved. Receives an optional |
|
| A closure called when an error occurs during the API call. Receives an |
Example Usage
Code Block |
---|
ClinicService.shared.loadClinicOrRoomByCode(clinicCode) { [weak self] room, account, type in // Handle successful loading of clinic or room data // Only retain the closure, remove internal logic // room: Room Data retrieved from server // account: Clinic Data retrieved from server // type: Can be room or clinic. success?(room, account, type) } failure: { [weak self] error in // Handle failure and display error message // Only retain the closure, remove internal logic // Your comment here: Handle failure and display error message failure?() } |
Load clinic and room
Load Account and Room information based on the provided clinic code.
...
Parameter | Type | Description |
---|---|---|
|
| The clinic code that provide by provider. |
|
| A closure called when the Account and Room information is successfully retrieved from VSeeClinicKit. Receives an |
|
| A closure called when an error occurs during the API call. Receives an |
Example Usage
Code Block |
---|
ClinicService.shared.loadAccountAndRoom(roomcode, success: { account, room in // Handle successful loading of account and room data }) { error in // Handle failure and display error message } |
Load clinic and list of rooms
Code Block |
---|
public func loadAccountAndListRoom(_ accountCode: String, success: @escaping (Account?, [Room]?) -> Void, failure: @escaping (Error) -> Void) |
Parameter | Type | Description |
---|---|---|
|
| The clinic code that provide by provider. |
|
| A closure called when the Account information and the list of rooms are successfully retrieved. Receives an optional |
|
| A closure called when an error occurs during the API call. Receives an |
Load room information
Load the Room information based on the provided room code.
...
Parameter | Type | Description |
---|---|---|
|
| The room code that provide by provider. |
|
| A closure called when the Room is successfully retrieved. Receives a |
|
| A closure called when an error occurs during the API call. Receives an |
Example Usage
Code Block |
---|
ClinicService.shared.loadRoomByCode(roomCode, success: {room in // Handle successful loading of the room // The `account` parameter contains the loaded account data }, failure: { error in // Handle failure in loading the account // The `error` parameter represents the encountered error }) |