InPatient CR dev

merge-update-with-lab-changes
haroon amjad 3 years ago
parent e79454973c
commit 0e4e285954

@ -350,6 +350,7 @@ class _Login extends State<Login> {
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.then((value) => {
checkIfIsInPatient(),
getToDoCount(),
GifLoaderDialogUtils.hideDialog(context),
if (appointmentRateViewModel.isHaveAppointmentNotRate)
@ -391,6 +392,23 @@ class _Login extends State<Login> {
});
}
checkIfIsInPatient() {
ClinicListService service = new ClinicListService();
service.checkIfInPatientAPI(context).then((res) {
if (res['MessageStatus'] == 1) {
if (res['List_PatientAdmissionInfo'].length != 0) {
print("INPATIENT!!!");
projectViewModel.setIsPatientAdmitted(true);
} else {
print("OUTPATIENT!!!");
projectViewModel.setIsPatientAdmitted(false);
}
} else {}
}).catchError((err) {
print(err);
});
}
void registerGeoZones() async {
await locator<GeofencingServices>().getAllGeoZones(GeoZonesRequestModel());
projectViewModel.platformBridge().registerHmgGeofences();

@ -547,6 +547,7 @@ class _AppDrawerState extends State<AppDrawer> {
_vitalSignService.weightKg = "";
await _privilegeService.getPrivilege();
projectProvider.setPrivilegeModelList(privilege: _privilegeService.privilegeModelList);
projectProvider.setIsPatientAdmitted(false);
var appLanguage = await sharedPref.getString(APP_LANGUAGE);
await sharedPref.clear();
await sharedPref.setString(APP_LANGUAGE, appLanguage);

Loading…
Cancel
Save