diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 7c06836d..67917cb0 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -44,7 +44,7 @@ class BaseAppClient { if (body == null || body['DoctorID'] == null) { body!['DoctorID'] = doctorProfile.doctorID; } - if (body['DoctorID'] == "") body['DoctorID'] = null; + if (body['DoctorID'] == "") body['DoctorID'] = doctorProfile.doctorID; // changed from null; because create update episode not working if (body['EditedBy'] == null) body['EditedBy'] = doctorProfile.doctorID; if (body['ProjectID'] == null) { body['ProjectID'] = doctorProfile.projectID; diff --git a/lib/core/viewModel/authentication_view_model.dart b/lib/core/viewModel/authentication_view_model.dart index 28279db7..bd242a88 100644 --- a/lib/core/viewModel/authentication_view_model.dart +++ b/lib/core/viewModel/authentication_view_model.dart @@ -101,7 +101,7 @@ class AuthenticationViewModel extends BaseViewModel { insertIMEIDetailsModel.vidaAuthTokenID = await sharedPref.getString(VIDA_AUTH_TOKEN_ID); insertIMEIDetailsModel.vidaRefreshTokenID = await sharedPref.getString(VIDA_REFRESH_TOKEN_ID); insertIMEIDetailsModel.password = userInfo.password; - insertIMEIDetailsModel.loginDoctorID = loggedUser != null ? loggedUser!.listMemberInformation![0].employeeID : user!.doctorID; + insertIMEIDetailsModel.loginDoctorID = loggedUser != null ? loggedUser!.listMemberInformation![0].employeeID : user!.editedBy; await _authService.insertDeviceImei(insertIMEIDetailsModel); if (_authService.hasError) {