From 4dd16bde59762959a434de8934818376beb2049a Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 7 Sep 2023 12:53:14 +0300 Subject: [PATCH 1/8] Inpatient medical report fixes --- .../medical/reports/report_home_page.dart | 92 +++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/lib/pages/medical/reports/report_home_page.dart b/lib/pages/medical/reports/report_home_page.dart index 7cc8fc2b..911e74a0 100644 --- a/lib/pages/medical/reports/report_home_page.dart +++ b/lib/pages/medical/reports/report_home_page.dart @@ -104,40 +104,39 @@ class _HomeReportPageState extends State with SingleTickerProvid ), if (model.user != null) Expanded( - child: - TabBarView( - physics: BouncingScrollPhysics(), - controller: _tabController_new, - children: [ + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController_new, + children: [ Container( - child: Column( - children: [ - Padding( - padding: EdgeInsets.all(21), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - myRadioButton(TranslationBase.of(context).requested, 0), - myRadioButton(TranslationBase.of(context).ready, 1), - myRadioButton(TranslationBase.of(context).cancelled, 2), - ], - ), + child: Column( + children: [ + Padding( + padding: EdgeInsets.all(21), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + myRadioButton(TranslationBase.of(context).requested, 0), + myRadioButton(TranslationBase.of(context).ready, 1), + myRadioButton(TranslationBase.of(context).cancelled, 2), + ], + ), + ), + Expanded( + child: IndexedStack( + index: _currentPage, + children: [ + ReportListWidget(reportList: model.reportsOrderRequestList, emailAddress: model.user.emailAddress), + ReportListWidget(reportList: model.reportsOrderReadyList, emailAddress: model.user.emailAddress), + ReportListWidget(reportList: model.reportsOrderCanceledList, emailAddress: model.user.emailAddress), + ], + ), + ) + ], ), - Expanded( - child: IndexedStack( - index: _currentPage, - children: [ - ReportListWidget(reportList: model.reportsOrderRequestList, emailAddress: model.user.emailAddress), - ReportListWidget(reportList: model.reportsOrderReadyList, emailAddress: model.user.emailAddress), - ReportListWidget(reportList: model.reportsOrderCanceledList, emailAddress: model.user.emailAddress), - ], - ), - ) - ], - ), - ), - // InPatient Medical Reports - Container( + ), + // InPatient Medical Reports + Container( child: model.admissionsMedicalReportList.isNotEmpty ? Column( children: [ @@ -249,20 +248,21 @@ class _HomeReportPageState extends State with SingleTickerProvid if (projectViewModel.havePrivilege(21) // && _tabController_new.index == 0 ) - Padding( - padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), - child: DefaultButton( - TranslationBase.of(context).requestMedicalReport.toLowerCase().capitalizeFirstofEach, - () => Navigator.push( - context, - FadePage( - page: MedicalReports(), - ), - ).then((value) { - model.getReports(); - }), - ), - ) + if (_tabController_new.index == 0) + Padding( + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: DefaultButton( + TranslationBase.of(context).requestMedicalReport.toLowerCase().capitalizeFirstofEach, + () => Navigator.push( + context, + FadePage( + page: MedicalReports(), + ), + ).then((value) { + model.getReports(); + }), + ), + ) ], ), ), From 49963911ba6870b0096f654763212f5a0f56d796 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 7 Sep 2023 14:12:53 +0300 Subject: [PATCH 2/8] Patient eligibility change --- lib/config/config.dart | 2 +- lib/config/localized_values.dart | 3 ++ lib/pages/BookAppointment/BookConfirm.dart | 29 +++++++++++++++++-- lib/pages/ToDoList/ToDo.dart | 28 ++++++++++++++++-- .../appointment_services/GetDoctorsList.dart | 2 +- lib/uitl/translations_delegate_base.dart | 3 ++ 6 files changed, 61 insertions(+), 6 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index e93af7c8..1b4c69b3 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -326,7 +326,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 = 10.8; +var VERSION_ID = 10.9; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 4984053d..ea364e24 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1893,4 +1893,7 @@ const Map localizedValues = { "sickLeaveAdmittedPatient": {"en": "You cannot activate this sick leave since you're an admitted patient.", "ar": "لا يمكنك تفعيل هذه الإجازة المرضية لأنك مريض مقبل."}, "dischargeDate": {"en": "Discharge Date", "ar": "تاريخ التفريغ"}, "selectAdmissionText": {"en": "Please select one of the admissions from below to view medical reports:", "ar": "يرجى تحديد أحد حالات القبول من الأسفل لعرض التقارير الطبية:"}, + + "invalidEligibility": {"en": "You cannot make online payment because you are not eligible to use the provided service.", "ar": "لا يمكنك إجراء الدفع عبر الإنترنت لأنك غير مؤهل لاستخدام الخدمة المقدمة."}, + "invalidInsurance": {"en": "You cannot make online payment because you do not have a valid insurance.", "ar": "لا يمكنك إجراء الدفع عبر الإنترنت لأنه ليس لديك تأمين صالح."}, }; \ No newline at end of file diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart index 830bd6bb..f6988037 100644 --- a/lib/pages/BookAppointment/BookConfirm.dart +++ b/lib/pages/BookAppointment/BookConfirm.dart @@ -59,6 +59,9 @@ class _BookConfirmState extends State { AppSharedPreferences sharedPref = new AppSharedPreferences(); + bool isInsured = false; + bool isEligible = false; + @override void initState() { // widget.authUser = new AuthenticatedUser(); @@ -437,13 +440,35 @@ class _BookConfirmState extends State { } getPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) { + String errorMsg = ""; GifLoaderDialogUtils.showMyDialog(context); widget.service.getPatientShare(appointmentNo, clinicID, projectID, context).then((res) { projectViewModel.selectedBodyPartList.clear(); projectViewModel.laserSelectionDuration = 0; print(res); - widget.patientShareResponse = new PatientShareResponse.fromJson(res); - navigateToBookSuccess(context, docObject, widget.patientShareResponse); + widget.patientShareResponse = new PatientShareResponse.fromJson(res['OnlineCheckInAppointments'][0]); + + isInsured = res["IsInsured"]; + isEligible = res["IsEligible"]; + + if (isInsured && isEligible) { + navigateToBookSuccess(context, docObject, widget.patientShareResponse); + } else { + if (isInsured && !isEligible) { + errorMsg = TranslationBase.of(context).invalidEligibility; + } else { + errorMsg = TranslationBase.of(context).invalidInsurance; + } + ConfirmDialog dialog = new ConfirmDialog( + isDissmissable: false, + context: context, + confirmMessage: errorMsg, + okText: "Update insurance", + cancelText: "Continue as cash", + okFunction: () => {openUpdateInsurance()}, + cancelFunction: () => {continueAsCash(docObject, appointmentNo)}); + dialog.showAlertDialog(context); + } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); // AppToast.showErrorToast(message: err); diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index 9d806a18..d98c40be 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -79,6 +79,9 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { bool dataLoaded = false; + bool isInsured = false; + bool isEligible = false; + @override void initState() { widget.patientShareResponse = new PatientShareResponse(); @@ -889,6 +892,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { } getPatientShare(context, AppoitmentAllHistoryResultList appo) { + String errorMsg = ""; DoctorsListService service = new DoctorsListService(); if (appo.isLiveCareAppointment) { getLiveCareAppointmentPatientShare(context, service, appo); @@ -896,8 +900,28 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { GifLoaderDialogUtils.showMyDialog(context); service.getPatientShare(appo.appointmentNo.toString(), appo.clinicID, appo.projectID, context).then((res) { GifLoaderDialogUtils.hideDialog(context); - widget.patientShareResponse = new PatientShareResponse.fromJson(res); - openPaymentDialog(appo, widget.patientShareResponse); + widget.patientShareResponse = new PatientShareResponse.fromJson(res['OnlineCheckInAppointments'][0]); + isInsured = res["IsInsured"]; + isEligible = res["IsEligible"]; + + if (isInsured && isEligible) { + openPaymentDialog(appo, widget.patientShareResponse); + } else { + if (isInsured && !isEligible) { + errorMsg = TranslationBase.of(context).invalidEligibility; + } else { + errorMsg = TranslationBase.of(context).invalidInsurance; + } + ConfirmDialog dialog = new ConfirmDialog( + isDissmissable: false, + context: context, + confirmMessage: errorMsg, + okText: "Update insurance", + cancelText: "Continue as cash", + okFunction: () => {openUpdateInsurance()}, + cancelFunction: () => {continueAsCash(appo)}); + dialog.showAlertDialog(context); + } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: err); diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index 7d97239c..f4c0aec3 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -484,7 +484,7 @@ class DoctorsListService extends BaseService { dynamic localRes; await baseAppClient.post(GET_PATIENT_SHARE, onSuccess: (response, statusCode) async { - localRes = response['OnlineCheckInAppointments'][0]; + localRes = response; }, onFailure: (String error, int statusCode) { throw error; }, body: request); diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 8d8f51ee..35e6b7bf 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2903,6 +2903,9 @@ class TranslationBase { String get dischargeDate => localizedValues["dischargeDate"][locale.languageCode]; String get selectAdmissionText => localizedValues["selectAdmissionText"][locale.languageCode]; + String get invalidEligibility => localizedValues["invalidEligibility"][locale.languageCode]; + String get invalidInsurance => localizedValues["invalidInsurance"][locale.languageCode]; + } class TranslationBaseDelegate extends LocalizationsDelegate { From 9ed454f67a3405d18e3791ce5f51b63df9fb2b1b Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 12 Sep 2023 11:01:04 +0300 Subject: [PATCH 3/8] Cash patient check implemented --- lib/config/localized_values.dart | 3 +- lib/pages/BookAppointment/BookConfirm.dart | 32 +++++++++++++--------- lib/pages/ToDoList/ToDo.dart | 32 +++++++++++++--------- lib/uitl/translations_delegate_base.dart | 3 +- 4 files changed, 42 insertions(+), 28 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index ea364e24..4a24f79b 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1893,7 +1893,8 @@ const Map localizedValues = { "sickLeaveAdmittedPatient": {"en": "You cannot activate this sick leave since you're an admitted patient.", "ar": "لا يمكنك تفعيل هذه الإجازة المرضية لأنك مريض مقبل."}, "dischargeDate": {"en": "Discharge Date", "ar": "تاريخ التفريغ"}, "selectAdmissionText": {"en": "Please select one of the admissions from below to view medical reports:", "ar": "يرجى تحديد أحد حالات القبول من الأسفل لعرض التقارير الطبية:"}, - "invalidEligibility": {"en": "You cannot make online payment because you are not eligible to use the provided service.", "ar": "لا يمكنك إجراء الدفع عبر الإنترنت لأنك غير مؤهل لاستخدام الخدمة المقدمة."}, "invalidInsurance": {"en": "You cannot make online payment because you do not have a valid insurance.", "ar": "لا يمكنك إجراء الدفع عبر الإنترنت لأنه ليس لديك تأمين صالح."}, + "continueCash": {"en": "Continue as cash", "ar": "تواصل نقدا"}, + "updateInsurance": {"en": "Update insurance", "ar": "تحديث التأمين"}, }; \ No newline at end of file diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart index f6988037..50dbc70f 100644 --- a/lib/pages/BookAppointment/BookConfirm.dart +++ b/lib/pages/BookAppointment/BookConfirm.dart @@ -61,6 +61,7 @@ class _BookConfirmState extends State { bool isInsured = false; bool isEligible = false; + bool isCash = false; @override void initState() { @@ -450,24 +451,29 @@ class _BookConfirmState extends State { isInsured = res["IsInsured"]; isEligible = res["IsEligible"]; + isCash = res["IsCash"]; - if (isInsured && isEligible) { + if (isCash) { navigateToBookSuccess(context, docObject, widget.patientShareResponse); } else { - if (isInsured && !isEligible) { - errorMsg = TranslationBase.of(context).invalidEligibility; + if (isInsured && isEligible) { + navigateToBookSuccess(context, docObject, widget.patientShareResponse); } else { - errorMsg = TranslationBase.of(context).invalidInsurance; + if (isInsured && !isEligible) { + errorMsg = TranslationBase.of(context).invalidEligibility; + } else { + errorMsg = TranslationBase.of(context).invalidInsurance; + } + ConfirmDialog dialog = new ConfirmDialog( + isDissmissable: false, + context: context, + confirmMessage: errorMsg, + okText: TranslationBase.of(context).updateInsuranceText, + cancelText: TranslationBase.of(context).continueCash, + okFunction: () => {openUpdateInsurance()}, + cancelFunction: () => {continueAsCash(docObject, appointmentNo)}); + dialog.showAlertDialog(context); } - ConfirmDialog dialog = new ConfirmDialog( - isDissmissable: false, - context: context, - confirmMessage: errorMsg, - okText: "Update insurance", - cancelText: "Continue as cash", - okFunction: () => {openUpdateInsurance()}, - cancelFunction: () => {continueAsCash(docObject, appointmentNo)}); - dialog.showAlertDialog(context); } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index d98c40be..d3af8742 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -81,6 +81,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { bool isInsured = false; bool isEligible = false; + bool isCash = false; @override void initState() { @@ -903,24 +904,29 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { widget.patientShareResponse = new PatientShareResponse.fromJson(res['OnlineCheckInAppointments'][0]); isInsured = res["IsInsured"]; isEligible = res["IsEligible"]; + isCash = res["IsCash"]; - if (isInsured && isEligible) { + if (isCash) { openPaymentDialog(appo, widget.patientShareResponse); } else { - if (isInsured && !isEligible) { - errorMsg = TranslationBase.of(context).invalidEligibility; + if (isInsured && isEligible) { + openPaymentDialog(appo, widget.patientShareResponse); } else { - errorMsg = TranslationBase.of(context).invalidInsurance; + if (isInsured && !isEligible) { + errorMsg = TranslationBase.of(context).invalidEligibility; + } else { + errorMsg = TranslationBase.of(context).invalidInsurance; + } + ConfirmDialog dialog = new ConfirmDialog( + isDissmissable: false, + context: context, + confirmMessage: errorMsg, + okText: TranslationBase.of(context).updateInsuranceText, + cancelText: TranslationBase.of(context).continueCash, + okFunction: () => {openUpdateInsurance()}, + cancelFunction: () => {continueAsCash(appo)}); + dialog.showAlertDialog(context); } - ConfirmDialog dialog = new ConfirmDialog( - isDissmissable: false, - context: context, - confirmMessage: errorMsg, - okText: "Update insurance", - cancelText: "Continue as cash", - okFunction: () => {openUpdateInsurance()}, - cancelFunction: () => {continueAsCash(appo)}); - dialog.showAlertDialog(context); } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 35e6b7bf..b14c21a5 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2902,9 +2902,10 @@ class TranslationBase { String get sickLeaveAdmittedPatient => localizedValues["sickLeaveAdmittedPatient"][locale.languageCode]; String get dischargeDate => localizedValues["dischargeDate"][locale.languageCode]; String get selectAdmissionText => localizedValues["selectAdmissionText"][locale.languageCode]; - String get invalidEligibility => localizedValues["invalidEligibility"][locale.languageCode]; String get invalidInsurance => localizedValues["invalidInsurance"][locale.languageCode]; + String get continueCash => localizedValues["continueCash"][locale.languageCode]; + String get updateInsuranceText => localizedValues["updateInsurance"][locale.languageCode]; } From df610690d55abdd4effe7974c30041c0bf72d838 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 1 Oct 2023 11:46:48 +0300 Subject: [PATCH 4/8] updates --- lib/config/localized_values.dart | 1 + lib/core/service/client/base_app_client.dart | 2 +- .../medical/labs/laboratory_result_page.dart | 56 ++++++++++++++----- lib/pages/paymentService/payment_service.dart | 14 ++--- lib/uitl/translations_delegate_base.dart | 1 + lib/uitl/utils.dart | 26 ++++----- .../bottom_navigation_item.dart | 8 +-- lib/widgets/others/app_scaffold_widget.dart | 8 +-- 8 files changed, 72 insertions(+), 44 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 4a24f79b..e818eb82 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1897,4 +1897,5 @@ const Map localizedValues = { "invalidInsurance": {"en": "You cannot make online payment because you do not have a valid insurance.", "ar": "لا يمكنك إجراء الدفع عبر الإنترنت لأنه ليس لديك تأمين صالح."}, "continueCash": {"en": "Continue as cash", "ar": "تواصل نقدا"}, "updateInsurance": {"en": "Update insurance", "ar": "تحديث التأمين"}, + "downloadReport": {"en": "Download Report", "ar": "تحميل تقرير المختبر"}, }; \ No newline at end of file diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index fb3c900a..9cb81a41 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -149,7 +149,7 @@ class BaseAppClient { // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; - // body['PatientID'] = 4767370; //3844083 + // body['PatientID'] = 2001273; //3844083 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 diff --git a/lib/pages/medical/labs/laboratory_result_page.dart b/lib/pages/medical/labs/laboratory_result_page.dart index 847f979b..88fdcbe8 100644 --- a/lib/pages/medical/labs/laboratory_result_page.dart +++ b/lib/pages/medical/labs/laboratory_result_page.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/LabResult/laboratory_result_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; @@ -37,22 +38,47 @@ class _LaboratoryResultPageState extends State { showNewAppBar: true, showNewAppBarTitle: true, backgroundColor: Color(0xffF8F8F8), - body: ListView.builder( - physics: BouncingScrollPhysics(), - padding: EdgeInsets.only(bottom: 12), - itemBuilder: (context, index) => LaboratoryResultWidget( - onTap: () async { - GifLoaderDialogUtils.showMyDialog(context); - await model.sendLabReportEmail(patientLabOrder: widget.patientLabOrders, mes: TranslationBase.of(context).sendSuc, userObj: projectViewModel.user); - GifLoaderDialogUtils.hideDialog(context); - }, - billNo: widget.patientLabOrders.invoiceNo, - // details: model.patientLabSpecialResult[index].resultDataHTML, - details: model.patientLabSpecialResult.isEmpty ? null : getSpecialResults(model), - orderNo: widget.patientLabOrders.orderNo, - patientLabOrder: widget.patientLabOrders, + body: SingleChildScrollView( + child: Column( + children: [ + ListView.builder( + physics: BouncingScrollPhysics(), + shrinkWrap: true, + padding: EdgeInsets.only(bottom: 12), + itemBuilder: (context, index) => LaboratoryResultWidget( + onTap: () async { + GifLoaderDialogUtils.showMyDialog(context); + await model.sendLabReportEmail(patientLabOrder: widget.patientLabOrders, mes: TranslationBase.of(context).sendSuc, userObj: projectViewModel.user); + GifLoaderDialogUtils.hideDialog(context); + }, + billNo: widget.patientLabOrders.invoiceNo, + // details: model.patientLabSpecialResult[index].resultDataHTML, + details: model.patientLabSpecialResult.isEmpty ? null : getSpecialResults(model), + orderNo: widget.patientLabOrders.orderNo, + patientLabOrder: widget.patientLabOrders, + ), + itemCount: 1, + ), + ], + ), + ), + bottomSheet: Container( + color: Colors.white, + height: MediaQuery.of(context).size.height * 0.08, + width: double.infinity, + padding: EdgeInsets.all(12.0), + child: Column( + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.9, + child: DefaultButton( + TranslationBase.of(context).downloadReport, + () => {}, + textColor: Colors.white, + ), + ), + ], ), - itemCount: 1, ), ), ); diff --git a/lib/pages/paymentService/payment_service.dart b/lib/pages/paymentService/payment_service.dart index 5bcf4592..3c5cb01f 100644 --- a/lib/pages/paymentService/payment_service.dart +++ b/lib/pages/paymentService/payment_service.dart @@ -1,4 +1,4 @@ -import 'package:badges/badges.dart'; +import 'package:badges/badges.dart' as badge_import; import 'package:diplomaticquarterapp/Constants.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; @@ -95,11 +95,11 @@ class PaymentService extends StatelessWidget { ? Positioned( left: 8, top: 4, - child: Badge( + child: badge_import.Badge( toAnimate: false, elevation: 0, - position: BadgePosition.topEnd(), - shape: BadgeShape.circle, + position: badge_import.BadgePosition.topEnd(), + shape: badge_import.BadgeShape.circle, badgeColor: secondaryColor.withOpacity(1.0), borderRadius: BorderRadius.circular(8), badgeContent: Container( @@ -111,11 +111,11 @@ class PaymentService extends StatelessWidget { : Positioned( right: 8, top: 4, - child: Badge( + child: badge_import.Badge( toAnimate: false, elevation: 0, - position: BadgePosition.topEnd(), - shape: BadgeShape.circle, + position: badge_import.BadgePosition.topEnd(), + shape: badge_import.BadgeShape.circle, badgeColor: secondaryColor.withOpacity(1.0), borderRadius: BorderRadius.circular(8), badgeContent: Container( diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index b14c21a5..0863de1e 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2906,6 +2906,7 @@ class TranslationBase { String get invalidInsurance => localizedValues["invalidInsurance"][locale.languageCode]; String get continueCash => localizedValues["continueCash"][locale.languageCode]; String get updateInsuranceText => localizedValues["updateInsurance"][locale.languageCode]; + String get downloadReport => localizedValues["downloadReport"][locale.languageCode]; } diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index ece5613d..f061b6bf 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -4,7 +4,7 @@ import 'dart:io'; import 'dart:typed_data'; import 'package:auto_size_text/auto_size_text.dart'; -import 'package:badges/badges.dart'; +import 'package:badges/badges.dart' as badge_import; import 'package:cached_network_image/cached_network_image.dart'; import 'package:connectivity/connectivity.dart'; import 'package:crypto/crypto.dart' as crypto; @@ -241,11 +241,11 @@ class Utils { ? Positioned( left: 8, top: 4, - child: Badge( + child: badge_import.Badge( toAnimate: false, elevation: 0, - position: BadgePosition.topEnd(), - shape: BadgeShape.circle, + position: badge_import.BadgePosition.topEnd(), + shape: badge_import.BadgeShape.circle, badgeColor: secondaryColor.withOpacity(1.0), borderRadius: BorderRadius.circular(8), badgeContent: Container( @@ -259,11 +259,11 @@ class Utils { ? Positioned( right: 8, top: 4, - child: Badge( + child: badge_import.Badge( toAnimate: false, elevation: 0, - position: BadgePosition.topEnd(), - shape: BadgeShape.circle, + position: badge_import.BadgePosition.topEnd(), + shape: badge_import.BadgeShape.circle, badgeColor: secondaryColor.withOpacity(1.0), borderRadius: BorderRadius.circular(8), badgeContent: Container( @@ -614,11 +614,11 @@ class Utils { ? Positioned( left: 8, top: 4, - child: Badge( + child: badge_import.Badge( toAnimate: false, elevation: 0, - position: BadgePosition.topEnd(), - shape: BadgeShape.circle, + position: badge_import.BadgePosition.topEnd(), + shape: badge_import.BadgeShape.circle, badgeColor: secondaryColor.withOpacity(1.0), borderRadius: BorderRadius.circular(8), badgeContent: Container( @@ -632,11 +632,11 @@ class Utils { ? Positioned( right: 8, top: 4, - child: Badge( + child: badge_import.Badge( toAnimate: false, elevation: 0, - position: BadgePosition.topEnd(), - shape: BadgeShape.circle, + position: badge_import.BadgePosition.topEnd(), + shape: badge_import.BadgeShape.circle, badgeColor: secondaryColor.withOpacity(1.0), borderRadius: BorderRadius.circular(8), badgeContent: Container( diff --git a/lib/widgets/bottom_navigation/bottom_navigation_item.dart b/lib/widgets/bottom_navigation/bottom_navigation_item.dart index ff085dd9..f7cdafce 100644 --- a/lib/widgets/bottom_navigation/bottom_navigation_item.dart +++ b/lib/widgets/bottom_navigation/bottom_navigation_item.dart @@ -1,4 +1,4 @@ -import 'package:badges/badges.dart'; +import 'package:badges/badges.dart' as badge_import; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; @@ -106,10 +106,10 @@ class BottomNavigationItem extends StatelessWidget { Positioned( right: 18.0, bottom: 28.0, - child: Badge( + child: badge_import.Badge( toAnimate: false, - position: BadgePosition.topEnd(), - shape: BadgeShape.circle, + position: badge_import.BadgePosition.topEnd(), + shape: badge_import.BadgeShape.circle, badgeColor: secondaryColor.withOpacity(1.0), borderRadius: BorderRadius.circular(8), badgeContent: Container( diff --git a/lib/widgets/others/app_scaffold_widget.dart b/lib/widgets/others/app_scaffold_widget.dart index 6865ece5..f433a8e4 100644 --- a/lib/widgets/others/app_scaffold_widget.dart +++ b/lib/widgets/others/app_scaffold_widget.dart @@ -1,5 +1,5 @@ import 'package:auto_size_text/auto_size_text.dart'; -import 'package:badges/badges.dart'; +import 'package:badges/badges.dart' as badge_import; import 'package:barcode_scan2/barcode_scan2.dart'; import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; @@ -494,7 +494,7 @@ class AppBarWidgetState extends State { actions: [ (widget.isPharmacy && widget.showPharmacyCart) ? IconButton( - icon: Badge( + icon: badge_import.Badge( badgeContent: Text( orderPreviewViewModel.cartResponse.quantityCount.toString(), style: TextStyle(color: Colors.white), @@ -507,8 +507,8 @@ class AppBarWidgetState extends State { : Container(), (widget.isOfferPackages && widget.showOfferPackagesCart) ? IconButton( - icon: Badge( - position: BadgePosition.topStart(top: -15, start: -10), + icon: badge_import.Badge( + position: badge_import.BadgePosition.topStart(top: -15, start: -10), badgeContent: Text( _badgeText, style: TextStyle(fontSize: 9, color: Colors.white, fontWeight: FontWeight.normal), From 34d3cf29456fbf3850459a172ce378889694e6d0 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 2 Oct 2023 12:01:56 +0300 Subject: [PATCH 5/8] CR 6204 Lab reports enhancements in progress --- .../labs/request_send_lab_report_email.dart | 54 ++++++++++--------- lib/core/service/medical/labs_service.dart | 3 +- .../viewModels/medical/labs_view_model.dart | 2 +- .../medical/labs/laboratory_result_page.dart | 6 ++- 4 files changed, 37 insertions(+), 28 deletions(-) diff --git a/lib/core/model/labs/request_send_lab_report_email.dart b/lib/core/model/labs/request_send_lab_report_email.dart index 65ac1762..a849da73 100644 --- a/lib/core/model/labs/request_send_lab_report_email.dart +++ b/lib/core/model/labs/request_send_lab_report_email.dart @@ -25,34 +25,36 @@ class RequestSendLabReportEmail { String invoiceNo; String orderDate; String orderNo; + bool isDownload; RequestSendLabReportEmail( {this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.patientOutSA, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID, - this.patientID, - this.tokenID, - this.patientTypeID, - this.patientType, - this.to, - this.dateofBirth, - this.patientIditificationNum, - this.patientMobileNumber, - this.patientName, - this.setupID, - this.projectName, - this.clinicName, - this.doctorName, - this.projectID, - this.invoiceNo, - this.orderDate, - this.orderNo}); + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.patientID, + this.tokenID, + this.patientTypeID, + this.patientType, + this.to, + this.dateofBirth, + this.patientIditificationNum, + this.patientMobileNumber, + this.patientName, + this.setupID, + this.projectName, + this.clinicName, + this.doctorName, + this.projectID, + this.invoiceNo, + this.orderDate, + this.orderNo, + this.isDownload}); RequestSendLabReportEmail.fromJson(Map json) { versionID = json['VersionID']; @@ -81,6 +83,7 @@ class RequestSendLabReportEmail { invoiceNo = json['InvoiceNo']; orderDate = json['OrderDate']; orderNo = json['OrderNo']; + isDownload = json['IsDownload']; } Map toJson() { @@ -111,6 +114,7 @@ class RequestSendLabReportEmail { data['InvoiceNo'] = this.invoiceNo; data['OrderDate'] = this.orderDate; data['OrderNo'] = this.orderNo; + data['IsDownload'] = this.isDownload; return data; } } diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart index 714ebcb1..06115173 100644 --- a/lib/core/service/medical/labs_service.dart +++ b/lib/core/service/medical/labs_service.dart @@ -194,7 +194,7 @@ class LabsService extends BaseService { RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail(); - Future sendLabReportEmail({PatientLabOrders patientLabOrder, AuthenticatedUser userObj}) async { + Future sendLabReportEmail({PatientLabOrders patientLabOrder, AuthenticatedUser userObj, bool isDownload = false}) async { _requestSendLabReportEmail.projectID = patientLabOrder.projectID; _requestSendLabReportEmail.invoiceNo = patientLabOrder.invoiceNo; _requestSendLabReportEmail.doctorName = patientLabOrder.doctorName; @@ -208,6 +208,7 @@ class LabsService extends BaseService { _requestSendLabReportEmail.projectName = patientLabOrder.projectName; _requestSendLabReportEmail.setupID = patientLabOrder.setupID; _requestSendLabReportEmail.orderNo = patientLabOrder.orderNo; + _requestSendLabReportEmail.isDownload = isDownload; await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { hasError = true; diff --git a/lib/core/viewModels/medical/labs_view_model.dart b/lib/core/viewModels/medical/labs_view_model.dart index e42dbbb4..263d7d32 100644 --- a/lib/core/viewModels/medical/labs_view_model.dart +++ b/lib/core/viewModels/medical/labs_view_model.dart @@ -135,7 +135,7 @@ class LabsViewModel extends BaseViewModel { } } - sendLabReportEmail({PatientLabOrders patientLabOrder, String mes, AuthenticatedUser userObj}) async { + sendLabReportEmail({PatientLabOrders patientLabOrder, String mes, AuthenticatedUser userObj, bool isDownload = false}) async { await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder, userObj: userObj); if (_labsService.hasError) { error = _labsService.error; diff --git a/lib/pages/medical/labs/laboratory_result_page.dart b/lib/pages/medical/labs/laboratory_result_page.dart index 88fdcbe8..574c407f 100644 --- a/lib/pages/medical/labs/laboratory_result_page.dart +++ b/lib/pages/medical/labs/laboratory_result_page.dart @@ -73,7 +73,11 @@ class _LaboratoryResultPageState extends State { width: MediaQuery.of(context).size.width * 0.9, child: DefaultButton( TranslationBase.of(context).downloadReport, - () => {}, + () async { + GifLoaderDialogUtils.showMyDialog(context); + await model.sendLabReportEmail(patientLabOrder: widget.patientLabOrders, mes: TranslationBase.of(context).sendSuc, userObj: projectViewModel.user, isDownload: true); + GifLoaderDialogUtils.hideDialog(context); + }, textColor: Colors.white, ), ), From 14928ad833a3ac1514c68730867150a40f1eec9e Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 2 Oct 2023 12:48:15 +0300 Subject: [PATCH 6/8] CR 6204 --- lib/core/model/labs/request_send_lab_report_email.dart | 6 +++++- lib/core/service/medical/labs_service.dart | 1 + lib/core/viewModels/medical/labs_view_model.dart | 2 +- lib/pages/medical/labs/laboratory_result_page.dart | 5 ++++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/core/model/labs/request_send_lab_report_email.dart b/lib/core/model/labs/request_send_lab_report_email.dart index a849da73..2fae6e0c 100644 --- a/lib/core/model/labs/request_send_lab_report_email.dart +++ b/lib/core/model/labs/request_send_lab_report_email.dart @@ -26,6 +26,7 @@ class RequestSendLabReportEmail { String orderDate; String orderNo; bool isDownload; + int doctorID; RequestSendLabReportEmail( {this.versionID, @@ -54,7 +55,8 @@ class RequestSendLabReportEmail { this.invoiceNo, this.orderDate, this.orderNo, - this.isDownload}); + this.isDownload, + this.doctorID}); RequestSendLabReportEmail.fromJson(Map json) { versionID = json['VersionID']; @@ -84,6 +86,7 @@ class RequestSendLabReportEmail { orderDate = json['OrderDate']; orderNo = json['OrderNo']; isDownload = json['IsDownload']; + doctorID = json['DoctorID']; } Map toJson() { @@ -115,6 +118,7 @@ class RequestSendLabReportEmail { data['OrderDate'] = this.orderDate; data['OrderNo'] = this.orderNo; data['IsDownload'] = this.isDownload; + data['DoctorID'] = this.doctorID; return data; } } diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart index 06115173..1bc12af3 100644 --- a/lib/core/service/medical/labs_service.dart +++ b/lib/core/service/medical/labs_service.dart @@ -209,6 +209,7 @@ class LabsService extends BaseService { _requestSendLabReportEmail.setupID = patientLabOrder.setupID; _requestSendLabReportEmail.orderNo = patientLabOrder.orderNo; _requestSendLabReportEmail.isDownload = isDownload; + _requestSendLabReportEmail.doctorID = patientLabOrder.doctorID; await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { hasError = true; diff --git a/lib/core/viewModels/medical/labs_view_model.dart b/lib/core/viewModels/medical/labs_view_model.dart index 263d7d32..e250a85c 100644 --- a/lib/core/viewModels/medical/labs_view_model.dart +++ b/lib/core/viewModels/medical/labs_view_model.dart @@ -136,7 +136,7 @@ class LabsViewModel extends BaseViewModel { } sendLabReportEmail({PatientLabOrders patientLabOrder, String mes, AuthenticatedUser userObj, bool isDownload = false}) async { - await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder, userObj: userObj); + await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder, userObj: userObj, isDownload: true); if (_labsService.hasError) { error = _labsService.error; } else diff --git a/lib/pages/medical/labs/laboratory_result_page.dart b/lib/pages/medical/labs/laboratory_result_page.dart index 574c407f..9ef18fb3 100644 --- a/lib/pages/medical/labs/laboratory_result_page.dart +++ b/lib/pages/medical/labs/laboratory_result_page.dart @@ -59,12 +59,15 @@ class _LaboratoryResultPageState extends State { ), itemCount: 1, ), + SizedBox( + height: 120.0, + ) ], ), ), bottomSheet: Container( color: Colors.white, - height: MediaQuery.of(context).size.height * 0.08, + height: MediaQuery.of(context).size.height * 0.081, width: double.infinity, padding: EdgeInsets.all(12.0), child: Column( From b2f390c19d438d08afa00ee66ec6fcee11bdb739 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 2 Oct 2023 14:42:47 +0300 Subject: [PATCH 7/8] CR 6204 implemented --- ios/Podfile | 26 +++++++++++++++++++ lib/core/service/medical/labs_service.dart | 10 ++++++- .../viewModels/medical/labs_view_model.dart | 13 +++++++--- .../medical/labs/laboratory_result_page.dart | 21 +++++++++++++++ pubspec.yaml | 2 +- 5 files changed, 67 insertions(+), 5 deletions(-) diff --git a/ios/Podfile b/ios/Podfile index c92f7e80..264db98d 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -32,6 +32,7 @@ target 'Runner' do use_modular_headers! pod 'OpenTok', '~> 2.22.0' + pod 'VTO2Lib' flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) end @@ -53,9 +54,34 @@ post_install do |installer| ] build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386' build_configuration.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' + xcconfig_path = build_configuration.base_configuration_reference.real_path + xcconfig = File.read(xcconfig_path) + xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR") + File.open(xcconfig_path, "w") { |file| file << xcconfig_mod } + if build_configuration.build_settings['WRAPPER_EXTENSION'] == 'bundle' build_configuration.build_settings['DEVELOPMENT_TEAM'] = '3A359E86ZF' end end end +end + +post_integrate do |installer| + compiler_flags_key = 'COMPILER_FLAGS' + project_path = 'Pods/Pods.xcodeproj' + + project = Xcodeproj::Project.open(project_path) + project.targets.each do |target| + target.build_phases.each do |build_phase| + if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase) + build_phase.files.each do |file| + if !file.settings.nil? && file.settings.key?(compiler_flags_key) + compiler_flags = file.settings[compiler_flags_key] + file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '') + end + end + end + end + end + project.save() end \ No newline at end of file diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart index 1bc12af3..c9abb4e8 100644 --- a/lib/core/service/medical/labs_service.dart +++ b/lib/core/service/medical/labs_service.dart @@ -11,6 +11,8 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da class LabsService extends BaseService { List patientLabOrdersList = List(); + String labReportPDF = ""; + Future getPatientLabOrdersList() async { hasError = false; Map body = Map(); @@ -211,7 +213,13 @@ class LabsService extends BaseService { _requestSendLabReportEmail.isDownload = isDownload; _requestSendLabReportEmail.doctorID = patientLabOrder.doctorID; - await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { + await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) { + + if(isDownload) { + labReportPDF = response['LabReportsPDFContent']; + } + + }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; }, body: _requestSendLabReportEmail.toJson()); diff --git a/lib/core/viewModels/medical/labs_view_model.dart b/lib/core/viewModels/medical/labs_view_model.dart index e250a85c..c9fdd114 100644 --- a/lib/core/viewModels/medical/labs_view_model.dart +++ b/lib/core/viewModels/medical/labs_view_model.dart @@ -20,6 +20,8 @@ class LabsViewModel extends BaseViewModel { List get labOrdersResultsList => _labsService.labOrdersResultsList; List timeSeries = []; + String get labReportPDF => _labsService.labReportPDF; + List _patientLabOrdersListClinic = List(); List _patientLabOrdersListHospital = List(); @@ -136,10 +138,15 @@ class LabsViewModel extends BaseViewModel { } sendLabReportEmail({PatientLabOrders patientLabOrder, String mes, AuthenticatedUser userObj, bool isDownload = false}) async { - await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder, userObj: userObj, isDownload: true); + await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder, userObj: userObj, isDownload: isDownload); if (_labsService.hasError) { error = _labsService.error; - } else - AppToast.showSuccessToast(message: mes); + } else { + if(isDownload) { + + } else { + AppToast.showSuccessToast(message: mes); + } + } } } diff --git a/lib/pages/medical/labs/laboratory_result_page.dart b/lib/pages/medical/labs/laboratory_result_page.dart index 9ef18fb3..f2c86c5f 100644 --- a/lib/pages/medical/labs/laboratory_result_page.dart +++ b/lib/pages/medical/labs/laboratory_result_page.dart @@ -1,7 +1,12 @@ +import 'dart:convert'; +import 'dart:io'; +import 'dart:typed_data'; + import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; @@ -9,6 +14,8 @@ import 'package:diplomaticquarterapp/widgets/data_display/medical/LabResult/labo import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:open_filex/open_filex.dart'; +import 'package:path_provider/path_provider.dart'; import 'package:provider/provider.dart'; class LaboratoryResultPage extends StatefulWidget { @@ -80,6 +87,12 @@ class _LaboratoryResultPageState extends State { GifLoaderDialogUtils.showMyDialog(context); await model.sendLabReportEmail(patientLabOrder: widget.patientLabOrders, mes: TranslationBase.of(context).sendSuc, userObj: projectViewModel.user, isDownload: true); GifLoaderDialogUtils.hideDialog(context); + try { + String path = await _createFileFromString(model.labReportPDF, "pdf"); + OpenFilex.open(path); + } catch (ex) { + AppToast.showErrorToast(message: "Cannot open file."); + } }, textColor: Colors.white, ), @@ -91,6 +104,14 @@ class _LaboratoryResultPageState extends State { ); } + Future _createFileFromString(String encodedStr, String ext) async { + Uint8List bytes = base64.decode(encodedStr); + String dir = (await getApplicationDocumentsDirectory()).path; + File file = File("$dir/" + DateTime.now().millisecondsSinceEpoch.toString() + "." + ext); + await file.writeAsBytes(bytes); + return file.path; + } + String getSpecialResults(LabsViewModel model) { String labResults = ""; model.patientLabSpecialResult.forEach((element) { diff --git a/pubspec.yaml b/pubspec.yaml index 9f3755da..a711467e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -207,7 +207,7 @@ dependencies: sms_otp_auto_verify: ^2.1.0 flutter_ios_voip_kit: ^0.0.5 google_api_availability: ^3.0.1 -# open_file: ^3.2.1 + # open_file: ^3.2.1 open_filex: ^4.3.2 path_provider: ^2.0.8 # flutter_callkit_incoming: ^1.0.3+3 From af5b0766a27c0916d7b63f032f4c9fa9b4c6f22b Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 3 Oct 2023 09:51:50 +0300 Subject: [PATCH 8/8] CR 6654, Disable update manual insurance temporarily. --- lib/config/localized_values.dart | 1 + .../AttachInsuranceCardImageDialog.dart | 41 +++++++++++-------- lib/pages/insurance/insurance_page.dart | 16 ++++---- lib/uitl/translations_delegate_base.dart | 1 + 4 files changed, 35 insertions(+), 24 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index e818eb82..7fd9507b 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1898,4 +1898,5 @@ const Map localizedValues = { "continueCash": {"en": "Continue as cash", "ar": "تواصل نقدا"}, "updateInsurance": {"en": "Update insurance", "ar": "تحديث التأمين"}, "downloadReport": {"en": "Download Report", "ar": "تحميل تقرير المختبر"}, + "habibCallCenter": {"en": "Please contact AlHabib call center to update your insurance manually.", "ar": "يرجى الاتصال بمركز اتصال الحبيب لتحديث التأمين الخاص بك يدوياً."}, }; \ No newline at end of file diff --git a/lib/pages/insurance/AttachInsuranceCardImageDialog.dart b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart index c331da2a..16c8cdf5 100644 --- a/lib/pages/insurance/AttachInsuranceCardImageDialog.dart +++ b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart @@ -132,24 +132,31 @@ class _AttachInsuranceCardImageDialogState extends State { Navigator.pop(context), Navigator.push( - context, - FadePage( - page: UpdateInsuranceManually( + context, + FadePage( + page: UpdateInsuranceManually( patientIdentificationNo: patientIdentificationID, patientID: patientID, patientMobileNumber: mobileNumber, - ))) + ), + ), + ), }, cancelFunction: () => {}); dialog.showAlertDialog(context); diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 0863de1e..804cecdd 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2907,6 +2907,7 @@ class TranslationBase { String get continueCash => localizedValues["continueCash"][locale.languageCode]; String get updateInsuranceText => localizedValues["updateInsurance"][locale.languageCode]; String get downloadReport => localizedValues["downloadReport"][locale.languageCode]; + String get habibCallCenter => localizedValues["habibCallCenter"][locale.languageCode]; }