diff --git a/lib/core/service/base/base_service.dart b/lib/core/service/base/base_service.dart index 09ee7c49..ade01d9b 100644 --- a/lib/core/service/base/base_service.dart +++ b/lib/core/service/base/base_service.dart @@ -14,7 +14,11 @@ class BaseService { List patientArrivalList = []; -//TODO add the user login model when we need it + BaseService(){ + doctorProfile = null; + } + + //TODO add the user login model when we need it Future getDoctorProfile({bool isGetProfile = false}) async { if(isGetProfile) { diff --git a/lib/core/service/patient/patientInPatientService.dart b/lib/core/service/patient/patientInPatientService.dart index e0bc94a3..bc7f1283 100644 --- a/lib/core/service/patient/patientInPatientService.dart +++ b/lib/core/service/patient/patientInPatientService.dart @@ -10,7 +10,7 @@ class PatientInPatientService extends BaseService { Future getInPatientList( PatientSearchRequestModel requestModel, bool isMyInpatient) async { hasError = false; - await getDoctorProfile(); + await getDoctorProfile(isGetProfile: true); if (isMyInpatient) { requestModel.doctorID = doctorProfile.doctorID; diff --git a/lib/screens/patients/PatientsInPatientScreen.dart b/lib/screens/patients/PatientsInPatientScreen.dart index 90a9ba29..ec9aeebc 100644 --- a/lib/screens/patients/PatientsInPatientScreen.dart +++ b/lib/screens/patients/PatientsInPatientScreen.dart @@ -71,7 +71,7 @@ class _PatientInPatientScreenState extends State model.specialClinicalCareMappingList[0].nursingStationID; requestModel.clinicID = 0; } - model.getInPatientList(requestModel); + await model.getInPatientList(requestModel); }, builder: (_, model, w) => AppScaffold(