diff --git a/lib/config/config.dart b/lib/config/config.dart index d5086b5b..d0ff0df9 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -5,8 +5,8 @@ const ONLY_NUMBERS = "[0-9]"; const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_DATE = "[0-9/]"; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; -const BASE_URL = 'https://hmgwebservices.com/'; -// const BASE_URL = 'https://uat.hmgwebservices.com/'; +// const BASE_URL = 'https://hmgwebservices.com/'; +const BASE_URL = 'https://uat.hmgwebservices.com/'; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient"; diff --git a/lib/config/shared_pref_kay.dart b/lib/config/shared_pref_kay.dart index 784c8fff..628f5a0e 100644 --- a/lib/config/shared_pref_kay.dart +++ b/lib/config/shared_pref_kay.dart @@ -1,15 +1,16 @@ -final TOKEN = 'token'; -final PROJECT_ID = 'projectID'; -final VIDA_AUTH_TOKEN_ID = 'VidaAuthTokenID'; -final VIDA_REFRESH_TOKEN_ID = 'VidaRefreshTokenID'; -final LOGIN_TOKEN_ID = 'LogInToken'; -final DOCTOR_ID = 'doctorID'; -final SLECTED_PATIENT_TYPE = 'slectedPatientType'; -final APP_Language = 'language'; -final DOCTOR_PROFILE = 'doctorProfile'; -final LIVE_CARE_PATIENT = 'livecare-patient-profile'; -final LOGGED_IN_USER = 'loggedUser'; -final DASHBOARD_DATA = 'dashboard-data'; -final OTP_TYPE = 'otp-type'; -final LAST_LOGIN_USER = 'last-login-user'; -final CLINIC_NAME = 'clinic-name'; +const TOKEN = 'token'; +const PROJECT_ID = 'projectID'; +const VIDA_AUTH_TOKEN_ID = 'VidaAuthTokenID'; +const VIDA_REFRESH_TOKEN_ID = 'VidaRefreshTokenID'; +const LOGIN_TOKEN_ID = 'LogInToken'; +const DOCTOR_ID = 'doctorID'; +const SLECTED_PATIENT_TYPE = 'slectedPatientType'; +const APP_Language = 'language'; +const DOCTOR_PROFILE = 'doctorProfile'; +const LIVE_CARE_PATIENT = 'livecare-patient-profile'; +const LOGGED_IN_USER = 'loggedUser'; +const EMPLOYEE_ID = 'EmployeeID'; +const DASHBOARD_DATA = 'dashboard-data'; +const OTP_TYPE = 'otp-type'; +const LAST_LOGIN_USER = 'last-login-user'; +const CLINIC_NAME = 'clinic-name'; diff --git a/lib/core/model/auth/activation_Code_req_model.dart b/lib/core/model/auth/activation_Code_req_model.dart index 73c97242..85d7f1d3 100644 --- a/lib/core/model/auth/activation_Code_req_model.dart +++ b/lib/core/model/auth/activation_Code_req_model.dart @@ -1,6 +1,7 @@ class ActivationCodeModel { int channel; int languageID; + int loginDoctorID; double versionID; int memberID; int facilityId; @@ -14,7 +15,7 @@ class ActivationCodeModel { this.memberID, this.facilityId, this.otpSendType, - this.generalid}); + this.generalid,this.loginDoctorID}); ActivationCodeModel.fromJson(Map json) { channel = json['Channel']; @@ -24,6 +25,7 @@ class ActivationCodeModel { facilityId = json['facilityId']; otpSendType = json['OTP_SendType']; generalid = json['generalid']; + loginDoctorID = json['LoginDoctorID']; } Map toJson() { @@ -35,6 +37,7 @@ class ActivationCodeModel { data['facilityId'] = this.facilityId; data['OTP_SendType'] = otpSendType; data['generalid'] = this.generalid; + data['LoginDoctorID'] = this.loginDoctorID; return data; } } diff --git a/lib/core/model/auth/activation_code_for_verification_screen_model.dart b/lib/core/model/auth/activation_code_for_verification_screen_model.dart index a261ce46..dae31f8c 100644 --- a/lib/core/model/auth/activation_code_for_verification_screen_model.dart +++ b/lib/core/model/auth/activation_code_for_verification_screen_model.dart @@ -3,6 +3,7 @@ class ActivationCodeForVerificationScreenModel { String mobileNumber; String zipCode; int channel; + int loginDoctorID; int languageID; double versionID; int memberID; @@ -25,7 +26,7 @@ class ActivationCodeForVerificationScreenModel { this.isMobileFingerPrint, this.vidaAuthTokenID, this.vidaRefreshTokenID, - this.iMEI}); + this.iMEI,this.loginDoctorID}); ActivationCodeForVerificationScreenModel.fromJson(Map json) { oTPSendType = json['OTP_SendType']; @@ -41,6 +42,7 @@ class ActivationCodeForVerificationScreenModel { vidaAuthTokenID = json['VidaAuthTokenID']; vidaRefreshTokenID = json['VidaRefreshTokenID']; iMEI = json['IMEI']; + loginDoctorID = json['LoginDoctorID']; } Map toJson() { @@ -56,6 +58,7 @@ class ActivationCodeForVerificationScreenModel { data['generalid'] = this.generalid; data['IsMobileFingerPrint'] = this.isMobileFingerPrint; data['IMEI'] = this.iMEI; + data['LoginDoctorID'] = this.loginDoctorID; return data; } } diff --git a/lib/core/model/auth/check_activation_code_request_model.dart b/lib/core/model/auth/check_activation_code_request_model.dart index c247a4fc..94502a71 100644 --- a/lib/core/model/auth/check_activation_code_request_model.dart +++ b/lib/core/model/auth/check_activation_code_request_model.dart @@ -3,6 +3,7 @@ class CheckActivationCodeRequestModel { String zipCode; int doctorID; int memberID; + int loginDoctorID; String password; String facilityId; String iPAdress; @@ -32,7 +33,7 @@ class CheckActivationCodeRequestModel { this.activationCode, this.vidaAuthTokenID, this.vidaRefreshTokenID, - this.oTPSendType,this.password,this.facilityId,this.memberID,this.isForSilentLogin=false,this.iMEI}); + this.oTPSendType,this.password,this.facilityId,this.memberID,this.isForSilentLogin=false,this.iMEI,this.loginDoctorID}); CheckActivationCodeRequestModel.fromJson(Map json) { mobileNumber = json['MobileNumber']; @@ -49,6 +50,7 @@ class CheckActivationCodeRequestModel { vidaAuthTokenID = json['VidaAuthTokenID']; vidaRefreshTokenID = json['VidaRefreshTokenID']; oTPSendType = json['OTP_SendType']; + loginDoctorID = json['LoginDoctorID']; } Map toJson() { @@ -72,6 +74,7 @@ class CheckActivationCodeRequestModel { data['Password'] = this.password; data['IMEI'] = this.iMEI; data['IsForSilentLogin'] = this.isForSilentLogin; + data['LoginDoctorID'] = this.loginDoctorID; return data; } } diff --git a/lib/core/viewModel/authentication_view_model.dart b/lib/core/viewModel/authentication_view_model.dart index 217b7b58..3641ba6d 100644 --- a/lib/core/viewModel/authentication_view_model.dart +++ b/lib/core/viewModel/authentication_view_model.dart @@ -142,6 +142,7 @@ class AuthenticationViewModel extends BaseViewModel { iMEI: user.iMEI, facilityId: user.projectID, memberID: user.doctorID, + loginDoctorID: user.doctorID, zipCode: user.outSA == true ? '971' : '966', mobileNumber: user.mobile, oTPSendType: authMethodType.getTypeIdService(), @@ -163,6 +164,7 @@ class AuthenticationViewModel extends BaseViewModel { ActivationCodeModel activationCodeModel = ActivationCodeModel( facilityId: projectID, memberID: loggedUser.listMemberInformation[0].memberID, + loginDoctorID: loggedUser.listMemberInformation[0].employeeID, otpSendType: authMethodType.getTypeIdService().toString(), ); await _authService.sendActivationCodeForDoctorApp(activationCodeModel); @@ -196,6 +198,7 @@ class AuthenticationViewModel extends BaseViewModel { facilityId:userInfo.projectID!=null? userInfo.projectID.toString():user.projectID.toString(), oTPSendType: await sharedPref.getInt(OTP_TYPE), iMEI: localToken, + loginDoctorID:userInfo.userID!=null? int.parse(userInfo.userID):user.doctorID,// loggedUser.listMemberInformation[0].employeeID, isForSilentLogin:isSilentLogin, generalid: "Cs2020@2016\$2958"); await _authService.checkActivationCodeForDoctorApp(checkActivationCodeForDoctorApp);