Compare commits

..

No commits in common. 'ce7f633a85f46b41a6d144a4a15448d5d9163bf4' and '34c08e670755621aac09b7ae4619e5cac71e3466' have entirely different histories.

@ -407,8 +407,7 @@ class AuthenticationViewModel extends BaseViewModel {
logout({bool isFromLogin = false}) async {
localToken = "";
String? lang = await sharedPref.getString(APP_Language);
//COMMENTED THE NOT TO CLEAR THE SHARED PREF
// await Utils.clearSharedPref();
await Utils.clearSharedPref();
doctorProfile = null;
sharedPref.setString(APP_Language, lang ?? 'en');
deleteUser();

@ -78,6 +78,7 @@ class PharmacyInterventionService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
DrAppToastMsg.showErrorToast(error);
super.error = super.error ?? "" + "\n" + error;
}, body: {});
return success;
@ -96,6 +97,8 @@ class PharmacyInterventionService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
DrAppToastMsg.showErrorToast(error);
super.error = super.error! + "\n" + error;
}, body: {});
return success;
}
@ -122,6 +125,9 @@ class PharmacyInterventionService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
DrAppToastMsg.showErrorToast(error);
super.error = super.error! + "\n" + error;
}, body: request);
return result;
}
@ -133,10 +139,11 @@ class PharmacyInterventionService extends BaseService {
var result = false;
await baseAppClient.post(UPDATE_INFECTIOUS_STATUS,
onSuccess: (dynamic response, int statusCode) {
result = response['IsAccepted'] ?? false;
result = response['IsAccepted'];
}, onFailure: (String error, int statusCode) {
hasError = true;
DrAppToastMsg.showErrorToast(error);
super.error = super.error! + "\n" + error;
}, body: request);
return result;
}
@ -151,6 +158,8 @@ class PharmacyInterventionService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
DrAppToastMsg.showErrorToast(error);
super.error = super.error! + "\n" + error;
}, body: {});
return station;
}

@ -95,10 +95,6 @@ class PharmacyInterventionViewModel extends BaseViewModel {
NursingStation? nursingStations;
PharmacyInterventionViewModel(){
getDoctorProfile();
}
// InterventionHistoryList? interventionHistoryList = InterventionHistoryList.fromJson({
// "entityList": [
// {
@ -572,10 +568,8 @@ class PharmacyInterventionViewModel extends BaseViewModel {
String successMessage = ''
}) async {
Map<String, dynamic>? user = await sharedPref.getObj(LOGGED_IN_USER);
var userId = user?['List_MemberInformation'][0]['MemberID'] ?? doctorProfile?.doctorID;
if(userId == null) {
return;
}
var userId = user?['List_MemberInformation'][0]['MemberID'];
var requestJson = {
"PatientID":currentlySelectedMedication?.patientID ?? '',
'AdmissionNo': currentlySelectedMedication?.admissionNo.toString() ?? '',

Loading…
Cancel
Save