diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 286f206d..3454ba19 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -167,15 +167,23 @@ class _PatientsScreenState extends State { var strExist = str.length > 0 ? true : false; if (true) { List filterDate = []; - + String patiantAppointment = ""; for (var i = 0; i < responseModelList2.length; i++) { - String patiantAppointment = - convertDateFormat(responseModelList[i].appointmentDate); + try { + if (responseModelList[i].appointmentDate == "") { + patiantAppointment = responseModelList[i].arrivedOn; + } else { + patiantAppointment = + convertDateFormat(responseModelList[i].appointmentDate); + } - String dateAppointment = checkDate(patiantAppointment); + String dateAppointment = checkDate(patiantAppointment); - if (dateAppointment.contains(str)) { - filterDate.add(responseModelList[i]); + if (dateAppointment.contains(str)) { + filterDate.add(responseModelList[i]); + } + } catch (e) { + print(e); } } @@ -441,17 +449,18 @@ class _PatientsScreenState extends State { }, )), Padding( - padding: EdgeInsets.only( - top: MediaQuery.of(context) - .size - .height * - 0.03), - child: SERVICES_PATIANT2[ - int.parse(patientType)] == - "List_MyOutPatient" - ? _locationBar(context) - : Container(), - ), + padding: EdgeInsets.only( + top: MediaQuery.of(context) + .size + .height * + 0.03), + child: _locationBar(context) + // child: SERVICES_PATIANT2[ + // int.parse(patientType)] == + // "List_MyOutPatient" + // ? _locationBar(context) + // : Container(), + ), // Row( // mainAxisAlignment: // MainAxisAlignment.spaceEvenly,