|  |  | @ -29,6 +29,7 @@ import 'package:hmg_patient_app_new/features/authentication/models/resp_models/c | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/features/authentication/models/resp_models/check_user_staus_nhic_response_model.dart'; |  |  |  | import 'package:hmg_patient_app_new/features/authentication/models/resp_models/check_user_staus_nhic_response_model.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/features/authentication/models/resp_models/select_device_by_imei.dart'; |  |  |  | import 'package:hmg_patient_app_new/features/authentication/models/resp_models/select_device_by_imei.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/features/medical_file/medical_file_repo.dart'; |  |  |  | import 'package:hmg_patient_app_new/features/medical_file/medical_file_repo.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; |  |  |  | import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/presentation/authentication/login.dart'; |  |  |  | import 'package:hmg_patient_app_new/presentation/authentication/login.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/presentation/authentication/saved_login_screen.dart'; |  |  |  | import 'package:hmg_patient_app_new/presentation/authentication/saved_login_screen.dart'; | 
			
		
	
	
		
		
			
				
					|  |  | @ -389,8 +390,10 @@ class AuthenticationViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |       (failure) async => await _errorHandlerService.handleError(failure: failure), |  |  |  |       (failure) async => await _errorHandlerService.handleError(failure: failure), | 
			
		
	
		
		
			
				
					
					|  |  |  |       (apiResponse) async { |  |  |  |       (apiResponse) async { | 
			
		
	
		
		
			
				
					
					|  |  |  |         int? patientShareRequestID = 0; |  |  |  |         int? patientShareRequestID = 0; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         String? familyFileTokenID; | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (isFormFamilyFile) { |  |  |  |         if (isFormFamilyFile) { | 
			
		
	
		
		
			
				
					
					|  |  |  |           patientShareRequestID = apiResponse.data['PatientShareRequestID']; |  |  |  |           patientShareRequestID = apiResponse.data['PatientShareRequestID']; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           familyFileTokenID = apiResponse.data['LogInTokenID']; | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (apiResponse.messageStatus == 2) { |  |  |  |         if (apiResponse.messageStatus == 2) { | 
			
		
	
		
		
			
				
					
					|  |  |  |           LoaderBottomSheet.hideLoader(); |  |  |  |           LoaderBottomSheet.hideLoader(); | 
			
		
	
	
		
		
			
				
					|  |  | @ -412,7 +415,7 @@ class AuthenticationViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |                   isExcludedUser: isExcludedUser, |  |  |  |                   isExcludedUser: isExcludedUser, | 
			
		
	
		
		
			
				
					
					|  |  |  |                   responseID: responseID, |  |  |  |                   responseID: responseID, | 
			
		
	
		
		
			
				
					
					|  |  |  |                   patientShareRequestID: patientShareRequestID, |  |  |  |                   patientShareRequestID: patientShareRequestID, | 
			
		
	
		
		
			
				
					
					|  |  |  |               ); |  |  |  |                   familyFileTokenID: familyFileTokenID); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |           } else { |  |  |  |           } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |             // TODO: Handle isSMSSent false |  |  |  |             // TODO: Handle isSMSSent false | 
			
		
	
	
		
		
			
				
					|  |  | @ -438,7 +441,8 @@ class AuthenticationViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |       Function()? onResendActivation, |  |  |  |       Function()? onResendActivation, | 
			
		
	
		
		
			
				
					
					|  |  |  |       bool isFormFamilyFile = false, |  |  |  |       bool isFormFamilyFile = false, | 
			
		
	
		
		
			
				
					
					|  |  |  |       dynamic patientShareRequestID, |  |  |  |       dynamic patientShareRequestID, | 
			
		
	
		
		
			
				
					
					|  |  |  |       dynamic responseID}) async { |  |  |  |       dynamic responseID, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       String? familyFileTokenID}) async { | 
			
		
	
		
		
			
				
					
					|  |  |  |     bool isForRegister = (_appState.getUserRegistrationPayload.healthId != null || _appState.getUserRegistrationPayload.patientOutSa == true || _appState.getUserRegistrationPayload.patientOutSa == 1); |  |  |  |     bool isForRegister = (_appState.getUserRegistrationPayload.healthId != null || _appState.getUserRegistrationPayload.patientOutSa == true || _appState.getUserRegistrationPayload.patientOutSa == 1); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     final request = RequestUtils.getCommonRequestWelcome( |  |  |  |     final request = RequestUtils.getCommonRequestWelcome( | 
			
		
	
	
		
		
			
				
					|  |  | @ -510,7 +514,8 @@ class AuthenticationViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |           isRegister: false, |  |  |  |           isRegister: false, | 
			
		
	
		
		
			
				
					
					|  |  |  |           isFormFamilyFile: isFormFamilyFile, |  |  |  |           isFormFamilyFile: isFormFamilyFile, | 
			
		
	
		
		
			
				
					
					|  |  |  |           patientShareRequestID: patientShareRequestID, |  |  |  |           patientShareRequestID: patientShareRequestID, | 
			
		
	
		
		
			
				
					
					|  |  |  |           responseID: responseID); |  |  |  |           responseID: responseID, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           familyFileTokenID: familyFileTokenID); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |       resultEither.fold( |  |  |  |       resultEither.fold( | 
			
		
	
		
		
			
				
					
					|  |  |  |           (failure) async => await _errorHandlerService.handleError( |  |  |  |           (failure) async => await _errorHandlerService.handleError( | 
			
		
	
	
		
		
			
				
					|  |  | @ -543,6 +548,18 @@ class AuthenticationViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |           // Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RegisterNew)); |  |  |  |           // Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RegisterNew)); | 
			
		
	
		
		
			
				
					
					|  |  |  |           return; |  |  |  |           return; | 
			
		
	
		
		
			
				
					
					|  |  |  |         } else { |  |  |  |         } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           if (isFormFamilyFile) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             _dialogService.showCommonBottomSheetWithoutH( | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 message: "Family File Added Successfully", | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 onOkPressed: () { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   LoaderBottomSheet.showLoader(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   MedicalFileViewModel medicalFileVM = GetIt.instance<MedicalFileViewModel>(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   medicalFileVM.getFamilyFiles(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   LoaderBottomSheet.hideLoader(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   _navigationService.popUntilNamed(AppRoutes.medicalFilePage); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 }); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |           if (activation.list != null && activation.list!.isNotEmpty) { |  |  |  |           if (activation.list != null && activation.list!.isNotEmpty) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             _appState.setAuthenticatedUser(activation.list!.first); |  |  |  |             _appState.setAuthenticatedUser(activation.list!.first); | 
			
		
	
		
		
			
				
					
					|  |  |  |             _appState.setPrivilegeModelList(activation.list!.first.listPrivilege!); |  |  |  |             _appState.setPrivilegeModelList(activation.list!.first.listPrivilege!); | 
			
		
	
	
		
		
			
				
					|  |  | @ -630,7 +647,8 @@ class AuthenticationViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |       bool isFormFamilyFile = false, |  |  |  |       bool isFormFamilyFile = false, | 
			
		
	
		
		
			
				
					
					|  |  |  |       bool isExcludedUser = false, |  |  |  |       bool isExcludedUser = false, | 
			
		
	
		
		
			
				
					
					|  |  |  |       int? responseID, |  |  |  |       int? responseID, | 
			
		
	
		
		
			
				
					
					|  |  |  |       int? patientShareRequestID}) async { |  |  |  |       int? patientShareRequestID, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       String? familyFileTokenID}) async { | 
			
		
	
		
		
			
				
					
					|  |  |  |     _navigationService.pushToOtpScreen( |  |  |  |     _navigationService.pushToOtpScreen( | 
			
		
	
		
		
			
				
					
					|  |  |  |       phoneNumber: phoneNumber, |  |  |  |       phoneNumber: phoneNumber, | 
			
		
	
		
		
			
				
					
					|  |  |  |       isFormFamilyFile: isFormFamilyFile, |  |  |  |       isFormFamilyFile: isFormFamilyFile, | 
			
		
	
	
		
		
			
				
					|  |  | @ -641,6 +659,7 @@ class AuthenticationViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |           otpTypeEnum: otpTypeEnum, |  |  |  |           otpTypeEnum: otpTypeEnum, | 
			
		
	
		
		
			
				
					
					|  |  |  |           responseID: responseID, |  |  |  |           responseID: responseID, | 
			
		
	
		
		
			
				
					
					|  |  |  |           patientShareRequestID: patientShareRequestID, |  |  |  |           patientShareRequestID: patientShareRequestID, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           familyFileTokenID: familyFileTokenID, | 
			
		
	
		
		
			
				
					
					|  |  |  |           onWrongActivationCode: (String? value) { |  |  |  |           onWrongActivationCode: (String? value) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             onWrongActivationCode(message: value); |  |  |  |             onWrongActivationCode(message: value); | 
			
		
	
		
		
			
				
					
					|  |  |  |           }, |  |  |  |           }, | 
			
		
	
	
		
		
			
				
					|  |  | 
 |