[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

Parameter

Type

Description

clinicCode

String

The clinic code or room code provided by provider.

success

Closure

A closure called when the Clinic or Room information is successfully retrieved. Receives an optional Room object, an Account object, and a ClinicType enumeration as parameters. ClinicType can be clinic or room.

failure

Closure

A closure called when an error occurs during the API call. Receives an Error as a parameter.

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

Parameter

Type

Description

clinicCode

String

The clinic code that provide by provider.

success

Closure

A closure called when the Account and Room information is successfully retrieved from VSeeClinicKit. Receives an Account object and an optional Room object as parameters.

failure

Closure

A closure called when an error occurs during the API call. Receives an Error as a parameter.

Example Usage

 

Load clinic and list of rooms

Parameter

Type

Description

Parameter

Type

Description

accountCode

String

The clinic code that provide by provider.

success

Closure

A closure called when the Account information and the list of rooms are successfully retrieved. Receives an optional Account object and an optional array of Room objects as parameters.

failure

Closure

A closure called when an error occurs during the API call. Receives an Error as a parameter.

 

Load room information

Load the Room information based on the provided room code.

 

Parameter

Type

Description

Parameter

Type

Description

roomCode

String

The room code that provide by provider.

success

Closure

A closure called when the Room is successfully retrieved. Receives a Room object as a parameter.

failure

Closure

A closure called when an error occurs during the API call. Receives an Error as a parameter.

Example Usage