Enter waiting room Flow

 

For Patient

This use case describes the process of a user logging in and entering the waiting room after successful login using the VSeeClinicCore framework. The process includes both the login and the waiting room entry steps.

Preconditions

  • The user must have a valid username and password to log in.

  • The waiting room entry requires the user to be successfully logged in.

Use Case Steps

  1. User Login: The application initiates the login process by calling the userLogin function with the user's credentials (username and password).

public func userLogin(userName: String, password: String, success: @escaping() -> Void, failure: @escaping (Error) -> Void) { // Perform the login process with the provided username and password. }

 

 

  1. User Authentication: The userLogin API uses the provided username and password to authenticate the user with the backend server.

  2. Login Success: If the user authentication is successful, the success closure provided to the userLogin function is executed, indicating that the user is logged in.

 

  1. Login Failure: If the user authentication fails due to incorrect credentials or any other reason, the failure closure provided to the userLogin function is executed with an associated Error object, allowing the application to handle the failure gracefully.

 

  1. Initialize Intake Information: After successful login, the application initializes the intake information by creating an IntakeConfig object with the reason for the visit.

let intakeConfig = IntakeConfig(reasonForVisit: "Routine check-up")

 

  1. Start Visit using Native View (VSeeKit): The application starts the visit using the native view of VSeeKit by calling the startVisitByNativeView function and passing the initialized intake configuration.

VSeeKit.shared.startVisitByNativeView(with: intakeConfig, success: { // Handle successful start of the visit using VSeeKit native view. }, failure: { error in // Handle the failure to start the visit using VSeeKit native view. })
  1. Start Visit using Web Browser: Alternatively, the application can start the visit using a web browser by calling the startVisitByBrowser function and passing the initialized intake configuration.

 

 

Error Handling

In case of login failure, the application can handle the error appropriately by inspecting the Error object provided in the failure closure of the userLogin function. Similarly, when starting the visit using VSeeKit or the web browser, any failures will be passed in the failure closure of the respective functions.

The application can provide appropriate error messages or take necessary actions based on the type of errors encountered during login and visit initiation.

Conclusion

The use case of a user logging in and entering the waiting room demonstrates a seamless integration of VSeeClinicCore functionalities into the application. By following the described steps and handling errors effectively, the application can provide a smooth user experience for logged-in users to enter the waiting room and start their visits.

 

For Guest Patient

This use case describes the process of a guest user entering the waiting room without the need for login. Instead, the guest user provides their first name, last name, and date of birth (DOB) to proceed. The process includes initializing the guest user, inputting personal information, and starting the visit using the VSeeClinicCore framework.

Use Case Steps

 

  1. Initialize Guest User: The application initiates the guest user by calling the guestLogin function and providing the first name, last name, and date of birth (DOB) of the guest.

 

  1. Initialize Intake Information: After successful guest user initialization, the application initializes the intake information by creating an IntakeConfig object with the guest user's personal information, such as the reason for the visit and the provided first name, last name, and DOB.

 

  1. Start Visit using Native View (VSeeKit): The application starts the visit using the native view of VSeeKit by calling the startVisitByNativeView function and passing the initialized intake configuration.

  1. Start Visit using Web Browser: Alternatively, the application can start the visit using a web browser by calling the startVisitByBrowser function and passing the initialized intake configuration.

 

Error Handling

In case of any errors during the guest user initialization or visit initiation steps, the application can handle the Error object appropriately. Error handling may involve displaying error messages or taking necessary actions based on the type of errors encountered.

Conclusion

The use case of a guest user entering the waiting room without the need for login demonstrates a seamless integration of VSeeClinicCore functionalities into the application. By following the described steps and handling errors effectively, the application can provide a smooth user experience for guest users to enter the waiting room and start their visits without the need for authentication.