[iOS] Clinic & Room API
Â
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.
public func loadClinicOrRoomByCode(_ clinicCode: String,
success: ((_ room: Room?, _ account: Account, _ clinicType: ClinicType) -> ())?,
failure: ((_ error: Error) -> ())?)
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
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.
public func loadAccountAndRoom(_ clinicCode: 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 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
Â
Load clinic and list of rooms
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 |