From 8b74c9df61c311bd66c484a274efdf36eeb6cc6f Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 4 Mar 2025 13:35:17 +0300 Subject: [PATCH] updates --- lib/core/service/client/base_app_client.dart | 2 +- lib/core/service/medical/labs_service.dart | 2 +- .../medical/ask_doctor/ask_doctor_page.dart | 19 ++++++++++++------- .../LabResult/laboratory_result_widget.dart | 2 +- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 9097d2fd..d083c422 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -187,7 +187,7 @@ class BaseAppClient { // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; //0560717232 - // body['PatientID'] = 4769527; //4609100 + // body['PatientID'] = 2007395; //4609100 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart index 9b3904be..28e922f2 100644 --- a/lib/core/service/medical/labs_service.dart +++ b/lib/core/service/medical/labs_service.dart @@ -231,7 +231,7 @@ class LabsService extends BaseService { _requestSendLabReportEmail.languageID = languageID; // await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) { - await baseAppClient.post(SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(isVidaPlus ? SEND_LAB_RESULT_EMAIL : SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) { if (isDownload) { labReportPDF = response['PdfContent']; } diff --git a/lib/pages/medical/ask_doctor/ask_doctor_page.dart b/lib/pages/medical/ask_doctor/ask_doctor_page.dart index 036bc328..96cd9944 100644 --- a/lib/pages/medical/ask_doctor/ask_doctor_page.dart +++ b/lib/pages/medical/ask_doctor/ask_doctor_page.dart @@ -108,17 +108,22 @@ class AskDoctorPage extends StatelessWidget { ); } - Future checkIfDoctorAvailable(DoctorList _doctor, BuildContext context) { + Future checkIfDoctorAvailable(DoctorList _doctor, BuildContext context) async { + AskDoctorService askDocservice = new AskDoctorService(); bool isAvailable = false; GifLoaderDialogUtils.showMyDialog(context); - service.isDoctorAvailable(doctorId: _doctor.doctorID, projectId: _doctor.projectID, clinicId: _doctor.clinicID).then((res) { + await askDocservice.isDoctorAvailable(doctorId: _doctor.doctorID, projectId: _doctor.projectID, clinicId: _doctor.clinicID).then((res) { GifLoaderDialogUtils.hideDialog(context); - print(res['IsDoctorAvailable']); - if (res['IsDoctorAvailable']) { - isAvailable = true; + if (res != null) { + print(res['IsDoctorAvailable']); + if (res['IsDoctorAvailable']) { + isAvailable = true; + } else { + isAvailable = false; + AppToast.showErrorToast(message: res['endUserMessage'], localContext: context); + } } else { - isAvailable = false; - AppToast.showErrorToast(message: res['endUserMessage'], localContext: context); + isAvailable = true; } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart b/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart index c492ee55..68f88910 100644 --- a/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart +++ b/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart @@ -67,7 +67,7 @@ class _LaboratoryResultWidgetState extends State { widget.patientLabOrder!.actualDoctorRate!, widget.patientLabOrder!.noOfPatientsRate!, projectViewModel.user.emailAddress!), - buttonTitle: TranslationBase.of(context).downloadReport, + buttonTitle: TranslationBase.of(context).download, buttonIcon: "assets/images/new/download_1.svg", showConfirmMessageDialog: false, isDownload: true,