diff --git a/lib/config/config.dart b/lib/config/config.dart index c9f3186a..e14a544a 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -43,6 +43,8 @@ const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabO /// const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; +const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo'; + const GET_PATIENT_ORDERS_DETAILS = 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead'; const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart index 030e6c3e..870fef97 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart @@ -208,7 +208,7 @@ class _AllHabibMedicalServiceState extends State { onTap: () => Navigator.push( context, FadePage( - page: ToDo(), + page: ToDo(isShowAppBar: true), ), ), imageLocation: diff --git a/lib/pages/BookAppointment/SearchResults.dart b/lib/pages/BookAppointment/SearchResults.dart index 72226c2e..e9897cf8 100644 --- a/lib/pages/BookAppointment/SearchResults.dart +++ b/lib/pages/BookAppointment/SearchResults.dart @@ -37,7 +37,7 @@ class _SearchResultsState extends State { ...List.generate( widget.patientDoctorAppointmentListHospital.length, (index) => AppExpandableNotifier( - isExpand: index == 1 ? true : false, + // isExpand: index == 0 ? true : false, title: widget.patientDoctorAppointmentListHospital[index] .filterName + " - " + diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index 355bb52b..4d5d4d49 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -5,7 +5,7 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart'; import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart'; -import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; @@ -216,6 +216,9 @@ class _SearchByClinicState extends State { List arrDistance = []; List result; int numAll; + List _patientDoctorAppointmentListHospital = + List(); + DoctorsListService service = new DoctorsListService(); service .getDoctorsList( @@ -228,23 +231,48 @@ class _SearchByClinicState extends State { if (res['MessageStatus'] == 1) { setState(() { if (res['DoctorList'].length != 0) { - print(res['DoctorList']); + // print(res['DoctorList']); doctorsList.clear(); res['DoctorList'].forEach((v) { doctorsList.add(new DoctorList.fromJson(v)); + // arr.add(new DoctorList.fromJson(v).projectName); + // arrDistance.add(new DoctorList.fromJson(v) + // .projectDistanceInKiloMeters + // .toString()); + }); + doctorsList.forEach((element) { + List doctorByHospital = + _patientDoctorAppointmentListHospital + .where( + (elementClinic) => + elementClinic.filterName == element.projectName, + ) + .toList(); - arr.add(new DoctorList.fromJson(v).projectName); - arrDistance.add(new DoctorList.fromJson(v) - .projectDistanceInKiloMeters - .toString()); + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[ + _patientDoctorAppointmentListHospital + .indexOf(doctorByHospital[0])] + .patientDoctorAppointmentList + .add(element); + } else { + _patientDoctorAppointmentListHospital.add( + PatientDoctorAppointmentList( + filterName: element.projectName, + distanceInKMs: + element.projectDistanceInKiloMeters.toString(), + patientDoctorAppointment: element)); + } }); } else {} }); result = LinkedHashSet.from(arr).toList(); numAll = result.length; + // navigateToSearchResults( + // context, doctorsList, result, numAll, arrDistance); navigateToSearchResults( - context, doctorsList, result, numAll, arrDistance); + context, doctorsList, _patientDoctorAppointmentListHospital); } else { AppToast.showErrorToast(message: res['ErrorEndUserMessage']); } @@ -267,17 +295,18 @@ class _SearchByClinicState extends State { } Future navigateToSearchResults( - context, docList, result, numAll, resultDistance) async { - Navigator.push( context, - MaterialPageRoute( - builder: (context) => BranchView( - doctorsList: docList, - result: result, - num: numAll, - resultDistance: resultDistance), - ), - ).then((value) { + List docList, + List + patientDoctorAppointmentListHospital) async { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => SearchResults( + isLiveCareAppointment: false, + doctorsList: docList, + patientDoctorAppointmentListHospital: + patientDoctorAppointmentListHospital))).then((value) { getProjectsList(); }); } diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index 25f2e0a7..2e0a3047 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -30,6 +30,10 @@ class ToDo extends StatefulWidget { var languageID; MyInAppBrowser browser; + bool isShowAppBar = true; + + ToDo({@required this.isShowAppBar}); + @override _ToDoState createState() => _ToDoState(); } @@ -62,7 +66,7 @@ class _ToDoState extends State { return AppScaffold( appBarTitle: TranslationBase.of(context).todoList, imagesInfo: imagesInfo, - isShowAppBar: false, + isShowAppBar: widget.isShowAppBar, isShowDecPage: true, description: TranslationBase.of(context).infoTodo, body: SingleChildScrollView( diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index f86511c1..b8d27d65 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -430,13 +430,13 @@ class _LandingPageState extends State with WidgetsBindingObserver { children: [ HomePage( goToMyProfile: () { - // _changeCurrentTab(1); + _changeCurrentTab(1); }, ), MedicalProfilePage(), BookingOptions(), MyFamily(isAppbarVisible: false), - ToDo(), + ToDo(isShowAppBar: false), ], // Please do not remove the BookingOptions from this array ), bottomNavigationBar: BottomNavBar( diff --git a/lib/pages/paymentService/payment_service.dart b/lib/pages/paymentService/payment_service.dart index 63d09f3a..126c3cdc 100644 --- a/lib/pages/paymentService/payment_service.dart +++ b/lib/pages/paymentService/payment_service.dart @@ -51,9 +51,11 @@ class PaymentService extends StatelessWidget { fontSize: 14, fontWeight: FontWeight.normal, ), - SizedBox(height: 12,), + SizedBox( + height: 12, + ), Container( - margin: EdgeInsets.only(left: 10,right: 10), + margin: EdgeInsets.only(left: 10, right: 10), child: Image.asset( 'assets/images/online_payment_icon.png', fit: BoxFit.fill, @@ -67,37 +69,43 @@ class PaymentService extends StatelessWidget { ), ), Expanded( - child: Container( - margin: EdgeInsets.all(5.0), - padding: EdgeInsets.all(9), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8.0), - shape: BoxShape.rectangle), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - TranslationBase.of(context).onlineCheckIn, - color: HexColor('#B61422'), - bold: true, - ), - Texts( - TranslationBase.of(context).appointment, - fontSize: 14, - fontWeight: FontWeight.normal, - ), - SizedBox(height: 12,), - Align( - alignment: !projectViewModel.isArabic - ? Alignment.centerRight - : Alignment.centerLeft, - child: Image.asset( - 'assets/images/device_icon.png', - height: 55, + child: InkWell( + onTap: () => + Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true))), + child: Container( + margin: EdgeInsets.all(5.0), + padding: EdgeInsets.all(9), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8.0), + shape: BoxShape.rectangle), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).onlineCheckIn, + color: HexColor('#B61422'), + bold: true, ), - ), - ], + Texts( + TranslationBase.of(context).appointment, + fontSize: 14, + fontWeight: FontWeight.normal, + ), + SizedBox( + height: 12, + ), + Align( + alignment: !projectViewModel.isArabic + ? Alignment.centerRight + : Alignment.centerLeft, + child: Image.asset( + 'assets/images/device_icon.png', + height: 55, + ), + ), + ], + ), ), ), ) @@ -130,7 +138,9 @@ class PaymentService extends StatelessWidget { fontSize: 14, fontWeight: FontWeight.normal, ), - SizedBox(height: 12,), + SizedBox( + height: 12, + ), Align( alignment: !projectViewModel.isArabic ? Alignment.centerRight diff --git a/lib/widgets/bottom_navigation/bottom_nav_bar.dart b/lib/widgets/bottom_navigation/bottom_nav_bar.dart index 1ae7b684..2632ec4a 100644 --- a/lib/widgets/bottom_navigation/bottom_nav_bar.dart +++ b/lib/widgets/bottom_navigation/bottom_nav_bar.dart @@ -103,6 +103,6 @@ class _BottomNavBarState extends State { } Future navigateToToDoList(context) async { - Navigator.push(context, MaterialPageRoute(builder: (context) => ToDo())); + Navigator.push(context, MaterialPageRoute(builder: (context) => ToDo(isShowAppBar: false))); } }