From 554548bc9a3907b6bd213d44f8325a7aed80002c Mon Sep 17 00:00:00 2001 From: Sultan khan <> Date: Sun, 4 Aug 2024 11:05:38 +0300 Subject: [PATCH] CR updates --- lib/config/config.dart | 2 +- lib/pages/BookAppointment/BookConfirm.dart | 12 ++++++------ .../appointment_services/GetDoctorsList.dart | 8 +++++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index d876cf8a..775d737e 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 = 15.9; +var VERSION_ID = 16.1; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart index e53ef60c..757b7d23 100644 --- a/lib/pages/BookAppointment/BookConfirm.dart +++ b/lib/pages/BookAppointment/BookConfirm.dart @@ -256,7 +256,7 @@ class _BookConfirmState extends State { ); } - cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo, BuildContext context) async { + cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo, BuildContext context, {int? invoiceNumber, int? lineItemNo}) async { ConfirmDialog.closeAlertDialog(context); GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false); DoctorsListService service = new DoctorsListService(); @@ -268,7 +268,7 @@ class _BookConfirmState extends State { if (isLiveCareSchedule != null && isLiveCareSchedule) { insertLiveCareScheduledAppointment(context, widget.doctor); } else { - insertAppointment(context, widget.doctor, widget.initialSlotDuration); + insertAppointment(context, widget.doctor, widget.initialSlotDuration, invoiceNumber: invoiceNumber, lineItemNo: lineItemNo); } }); } else { @@ -342,7 +342,7 @@ class _BookConfirmState extends State { okFunction: () => { ConfirmDialog.closeAlertDialog(context), insertAppointment( - context, widget.doctor, widget.initialSlotDuration, invoiceNumber: package.patientPackageComponents![0].invoiceNo) }, + context, widget.doctor, widget.initialSlotDuration, invoiceNumber: package.patientPackageComponents![0].invoiceNo, lineItemNo:package.patientPackageComponents![0].lineItemNo ) }, cancelFunction: () => { ConfirmDialog.closeAlertDialog(context), insertAppointment( @@ -361,7 +361,7 @@ class _BookConfirmState extends State { }); } - insertAppointment(context, DoctorList docObject, int initialSlotDuration, {int? invoiceNumber} ) async { + insertAppointment(context, DoctorList docObject, int initialSlotDuration, {int? invoiceNumber, int? lineItemNo} ) async { final timeSlot = DocAvailableAppointments.selectedAppoDateTime; String logs = await sharedPref.getString('selectedLogSlots'); List decodedLogs = json.decode(logs); @@ -370,7 +370,7 @@ class _BookConfirmState extends State { widget.service // .insertAppointment(docObject.doctorID!, docObject.clinicID!, docObject.projectID!, widget.selectedTime, widget.selectedDate, initialSlotDuration, context, 'null', null, null, projectViewModel) .insertAppointment(docObject.doctorID!, docObject.clinicID!, docObject.projectID!, widget.selectedTime, widget.selectedDate, initialSlotDuration, projectViewModel.isArabic ? 1 : 2, context, - null, null, null, projectViewModel, invoiceNumber ) + null, null, null, projectViewModel, invoiceNumber, lineItemNo!) .then((res) { if (res['MessageStatus'] == 1) { AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess); @@ -407,7 +407,7 @@ class _BookConfirmState extends State { confirmMessage: res['ErrorEndUserMessage'], okText: TranslationBase.of(context).confirm, cancelText: TranslationBase.of(context).cancel_nocaps, - okFunction: () => {cancelAppointment(docObject, appo, context)}, + okFunction: () => {cancelAppointment(docObject, appo, context, invoiceNumber: invoiceNumber, lineItemNo: lineItemNo!)}, cancelFunction: () => {}, ); dialog.showAlertDialog(context); diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index aa94e425..02598470 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -335,7 +335,7 @@ class DoctorsListService extends BaseService { } Future insertAppointment(int docID, int clinicID, int projectID, String selectedTime, String selectedDate, int initialSlotDuration, int languageID, BuildContext context, - [String? procedureID, num? testTypeEnum, num? testProcedureEnum, ProjectViewModel? projectViewModel, int? invoiceNumber]) async { + [String? procedureID, num? testTypeEnum, num? testProcedureEnum, ProjectViewModel? projectViewModel, int? invoiceNumber, int? lineItemNo]) async { Map request; if (await this.sharedPref.getObject(USER_PROFILE) != null) { @@ -375,7 +375,9 @@ class DoctorsListService extends BaseService { "PatientID": authUser.patientID, "PatientTypeID": authUser.patientType, "PatientType": authUser.patientType, - "InvoiceNumber":invoiceNumber + "InvoiceNo":invoiceNumber, + "LineItemNo":lineItemNo, + // "TokenID":"@dm!n" }; if (clinicID == 253) { @@ -520,7 +522,7 @@ class DoctorsListService extends BaseService { authUser = data; } request = { "PatientID":patientID, "ClinicID":clinicID, "ProjectID": projectID, "LanguageID": languageID}; - // request = { "PatientID":4768732, "ClinicID":1, "ProjectID": 15, "LanguageID": languageID, "TokenID":"@dm!n" }; + //request = { "PatientID":4768732, "ClinicID":1, "ProjectID": 15, "LanguageID": languageID, "TokenID":"@dm!n" }; dynamic localRes;