startVisitByRequestAccess function
Implementation
void startVisitByRequestAccess(BuildContext context, String? phoneContact) {
final IGraphQlClient? client = AppWrapperBase.of(context)?.graphQLClient;
if (phoneContact == null) {
throw const UserException(
'failed to send otp, user patient phone number not found');
}
StoreProvider.dispatch<CoreState>(context,
UpdateStartVisitTypeAction(startVisitType: StartVisitType.requestAccess));
sendOTP(context, client, phoneContact);
}