diff --git a/lib/config/config.dart b/lib/config/config.dart index 91de1019..3f54786f 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -346,7 +346,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 12.3; +var VERSION_ID = 12.4; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart index 8a893108..15d4e8cb 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart @@ -278,7 +278,7 @@ class _AnicllaryOrdersState extends State with SingleTic ), mWidth(3), Text( - projectViewModel.user!.patientIdentificationNo!, + projectViewModel.user.patientIdentificationNo!, style: TextStyle( fontWeight: FontWeight.w600, fontSize: 12, @@ -596,12 +596,15 @@ class _AnicllaryOrdersState extends State with SingleTic } else { openPayment(selectedPaymentMethod, projectViewModel.user, double.parse(getTotalValue()), null, selectedInstallmentPlan); } + } else { + openPayment(selectedPaymentMethod, projectViewModel.user, double.parse(getTotalValue()), null, selectedInstallmentPlan); } }, patientShare: double.parse(getTotalValue()), isFromAdvancePayment: !projectViewModel.havePrivilege(94), )); } + void startApplePay() async { transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.user.patientID!); @@ -764,8 +767,7 @@ class _AnicllaryOrdersState extends State with SingleTic if (res["status"].toString().toLowerCase() == "success") { updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID!, int.parse(this.selectedInstallmentPlan!), appo); } else { - updateTamaraRequestStatus("Failed", "00", Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), tamaraOrderID != null ? tamaraOrderID! : "", - int.parse(this.selectedInstallmentPlan!), appo); + updateTamaraRequestStatus("Failed", "00", transID, tamaraOrderID != null ? tamaraOrderID! : "", int.parse(this.selectedInstallmentPlan!), appo); } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); @@ -815,10 +817,6 @@ class _AnicllaryOrdersState extends State with SingleTic createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { DoctorsListService service = new DoctorsListService(); String paymentReference = res['Fort_id'].toString(); - // List ancillaryOrdersProcedureList = []; - // selectedProcList.forEach((element) { - // ancillaryOrdersProcedureList.add(new AncillaryOrdersProcedureList(procedureID: num.parse(element.procedureID), procedureDescription: element.procedureName)); - // }); service.HIS_createAdvancePayment(appo, widget.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], projectViewModel.user.patientType, projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, projectViewModel.user.patientID, localContext, isAncillaryOrder: true) @@ -837,6 +835,17 @@ class _AnicllaryOrdersState extends State with SingleTic }); } + addAdvancedNumberRequest(String advanceNumber, String paymentReference, dynamic appointmentID, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, localContext).then((res) { + autoGenerateInvoice(); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(localContext); + AppToast.showErrorToast(message: err.toString()); + print(err); + }); + } + autoGenerateInvoice() { List selectedProcListAPI = []; @@ -861,17 +870,6 @@ class _AnicllaryOrdersState extends State with SingleTic }); } - - addAdvancedNumberRequest(String advanceNumber, String paymentReference, dynamic appointmentID, AppoitmentAllHistoryResultList appo) { - DoctorsListService service = new DoctorsListService(); - service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, localContext).then((res) { - autoGenerateInvoice(); - }).catchError((err) { - GifLoaderDialogUtils.hideDialog(localContext); - AppToast.showErrorToast(message: err.toString()); - print(err); - }); - } showAlertDialog(dynamic invoiceNo, dynamic projectID) { AlertDialogBox( context: context, diff --git a/lib/pages/BookAppointment/DentalComplaints.dart b/lib/pages/BookAppointment/DentalComplaints.dart index cbcd7689..7617f23a 100644 --- a/lib/pages/BookAppointment/DentalComplaints.dart +++ b/lib/pages/BookAppointment/DentalComplaints.dart @@ -264,7 +264,8 @@ class _DentalComplaintsState extends State { getLanguageID(); hasDentalPlan = false; ClinicListService service = new ClinicListService(); - service.getChiefComplaintsList(widget.searchInfo.ClinicID!, widget.searchInfo.ProjectID!, languageID, context).then((res) { + int? patientID = projectViewModel.isLogin ? projectViewModel.user.patientID : -1; + service.getChiefComplaintsList(patientID!, widget.searchInfo.ClinicID!, widget.searchInfo.ProjectID!, languageID, false, context).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { setState(() { diff --git a/lib/pages/MyAppointments/MyAppointments.dart b/lib/pages/MyAppointments/MyAppointments.dart index 1d511c91..c279a9ab 100644 --- a/lib/pages/MyAppointments/MyAppointments.dart +++ b/lib/pages/MyAppointments/MyAppointments.dart @@ -333,6 +333,10 @@ class _MyAppointmentsState extends State with SingleTickerProvid //Merging Booked & Confirmed Appointments into Upcoming Tab _patientBookedAndConfirmedAppointmentListHospital.addAll(_patientBookedAppointmentListHospital); _patientBookedAndConfirmedAppointmentListClinic.addAll(_patientBookedAppointmentListClinic); + + _patientBookedAndConfirmedAppointmentListHospital.addAll(_patientConfirmedAppointmentListHospital); + _patientBookedAndConfirmedAppointmentListClinic.addAll(_patientConfirmedAppointmentListClinic); + } openAppointmentsTab() async { @@ -359,7 +363,8 @@ class _MyAppointmentsState extends State with SingleTickerProvid } Widget getBookedAppointments() { - return _getAppointment(bookedAppoList.length, (filterType == FilterType.Clinic) ? _patientBookedAppointmentListClinic : _patientBookedAppointmentListHospital); + // return _getAppointment(bookedAppoList.length, (filterType == FilterType.Clinic) ? _patientBookedAppointmentListClinic : _patientBookedAppointmentListHospital); + return Container(); } Widget getBookedAndConfirmedAppointments() { diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index 38c745f3..79e51e0c 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -64,7 +64,7 @@ class ClinicListService extends BaseService { return Future.value(localRes); } - Future getChiefComplaintsList(int clinicID, int projectID, int languageID, BuildContext context, {doctorId}) async { + Future getChiefComplaintsList(int patientID, int clinicID, int projectID, int languageID, bool isContinueDentalPlan, BuildContext context, {doctorId}) async { //Utils.showProgressDialog(context); Map request; @@ -89,8 +89,8 @@ class ClinicListService extends BaseService { "SessionID": null, "isDentalAllowedBackend": true, "DeviceTypeID": 1, - "PatientID": 1, - "ContinueDentalPlan": true, + "PatientID": patientID, + "ContinueDentalPlan": isContinueDentalPlan, "IsSearchAppointmnetByClinicID": false, "DateofBirth": authUser.dateofBirth };