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

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

@ -95,6 +95,10 @@ class PharmacyInterventionViewModel extends BaseViewModel {
NursingStation? nursingStations;
PharmacyInterventionViewModel(){
getDoctorProfile();
}
// InterventionHistoryList? interventionHistoryList = InterventionHistoryList.fromJson({
// "entityList": [
// {
@ -568,8 +572,10 @@ class PharmacyInterventionViewModel extends BaseViewModel {
String successMessage = ''
}) async {
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 = {
"PatientID":currentlySelectedMedication?.patientID ?? '',
'AdmissionNo': currentlySelectedMedication?.admissionNo.toString() ?? '',

Loading…
Cancel
Save