|
|
|
|
@ -14,15 +14,13 @@ class PatientRegistrationViewModel extends BaseViewModel {
|
|
|
|
|
PatientRegistrationService _patientRegistrationService =
|
|
|
|
|
locator<PatientRegistrationService>();
|
|
|
|
|
|
|
|
|
|
GetPatientInfoResponseModel get getPatientInfoResponseModel =>
|
|
|
|
|
_patientRegistrationService.getPatientInfoResponseModel;
|
|
|
|
|
|
|
|
|
|
GetPatientInfoResponseModel get getPatientInfoResponseModel =>_patientRegistrationService.getPatientInfoResponseModel;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CheckPatientForRegistrationModel checkPatientForRegistrationModel ;
|
|
|
|
|
CheckPatientForRegistrationModel checkPatientForRegistrationModel;
|
|
|
|
|
Future checkPatientForRegistration(
|
|
|
|
|
CheckPatientForRegistrationModel registrationModel) async {
|
|
|
|
|
|
|
|
|
|
checkPatientForRegistrationModel =registrationModel;
|
|
|
|
|
checkPatientForRegistrationModel = registrationModel;
|
|
|
|
|
setState(ViewState.BusyLocal);
|
|
|
|
|
await _patientRegistrationService
|
|
|
|
|
.checkPatientForRegistration(registrationModel);
|
|
|
|
|
@ -36,8 +34,8 @@ class PatientRegistrationViewModel extends BaseViewModel {
|
|
|
|
|
Future getPatientInfo(
|
|
|
|
|
GetPatientInfoRequestModel getPatientInfoRequestModel) async {
|
|
|
|
|
setState(ViewState.BusyLocal);
|
|
|
|
|
await _patientRegistrationService.
|
|
|
|
|
getPatientInfo(getPatientInfoRequestModel);
|
|
|
|
|
await _patientRegistrationService
|
|
|
|
|
.getPatientInfo(getPatientInfoRequestModel);
|
|
|
|
|
if (_patientRegistrationService.hasError) {
|
|
|
|
|
error = _patientRegistrationService.error;
|
|
|
|
|
setState(ViewState.ErrorLocal);
|
|
|
|
|
@ -48,7 +46,8 @@ class PatientRegistrationViewModel extends BaseViewModel {
|
|
|
|
|
Future sendActivationCodeByOTPNotificationType(
|
|
|
|
|
{SendActivationCodeByOTPNotificationTypeForRegistrationModel
|
|
|
|
|
registrationModel,
|
|
|
|
|
int otpType}) async {
|
|
|
|
|
int otpType,
|
|
|
|
|
PatientRegistrationViewModel user}) async {
|
|
|
|
|
setState(ViewState.Busy);
|
|
|
|
|
await _patientRegistrationService.sendActivationCodeByOTPNotificationType(
|
|
|
|
|
otpType: otpType);
|
|
|
|
|
|