Schedule an appointment flow

Appointment Scheduling Flow Documentation

Use Case: Patient schedules a new medical appointment after logging in.

Precondition:

  • User has successfully logged in with valid username and password.

Use Case Steps:

User Login

The application initiates the login process.

Call the userLogin function with the user's credentials.

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

Handle success and failure scenarios appropriately.

Create Intake Information with IntakeConfig:

Define an IntakeConfig with relevant information.

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

 

Use VisitService to create intake with the provided configuration.

VisitService.shared.createIntake(with: intakeConfig, success: { intake // Store the intake to update later }, failure: { error in // Handle the failure to start the visit using VSeeKit native view. })

Get List of Consultation Types:

Retrieve a list of consultation types corresponding to the current room.

 

Select a Consultation Type and Update Intake:

Choose a consultation type from the obtained list.

Update the previously created intake with the selected consultation type.

Use Updated Intake Information to Get Available Room Slots:

Utilize the updated intake information to retrieve a list of available room slots for each corresponding day.

 

Select a Room Slot and Schedule the Visit:

Choose a room slot from the list of available slots.

Schedule the visit using the selected intake, provider (if applicable), and room slot.

Handle success and failure scenarios accordingly.

 

By following these steps, a patient can successfully log in and schedule a new medical appointment based on their preferences and available slots.