handling AuthorizeID to not to be null if the sharedprefence data is getting null.

update_3.16.0_CR5439_Pharmacy_Intervention
Syed Taha Alam 7 months ago
parent 6f3e4d189f
commit 2d5d774852

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

Loading…
Cancel
Save