From 690174c79a3fcac7ba816d5332de51c36490964e Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 22 Oct 2025 12:42:31 +0300 Subject: [PATCH] updates --- lib/core/service/client/base_app_client.dart | 2 +- lib/pages/landing/fragments/home_page_fragment2.dart | 5 +++-- .../prescriptions/prescription_items_page.dart | 12 ++++++++++-- lib/pages/medical/reports/report_list_widget.dart | 1 + .../medical/LabResult/newUI/LabItem.dart | 2 +- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 6081599d..89babd27 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'] = 4771637; //4609100 + // body['PatientID'] = 4772171; //4609100 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart index 717396a1..29570011 100644 --- a/lib/pages/landing/fragments/home_page_fragment2.dart +++ b/lib/pages/landing/fragments/home_page_fragment2.dart @@ -1,3 +1,4 @@ +import 'package:hmg_patient_app/config/config.dart'; import 'package:hmg_patient_app/config/size_config.dart'; import 'package:hmg_patient_app/core/viewModels/dashboard_view_model.dart'; import 'package:hmg_patient_app/core/viewModels/project_view_model.dart'; @@ -167,9 +168,9 @@ class _HomePageFragment2State extends State { ); }, child: SvgPicture.network( - "https://marathoon.com/service/hmgvideo/Banner_English.svg", + // "https://marathoon.com/service/hmgvideo/Banner_English.svg", // "https://marathoon.com/service/hmgvideo/Banner_Arabic.svg", - // projectViewModel.isArabic ? projectViewModel.hisProjectOffers.first.titleArabic!.split("\$")[1].trim() : projectViewModel.hisProjectOffers.first.titleName!.split("\$")[1].trim(), + BASE_URL.contains("uat.") ? "https://marathoon.com/service/hmgvideo/Banner_English.svg" : projectViewModel.isArabic ? projectViewModel.hisProjectOffers.first.titleArabic!.split("\$")[1].trim() : projectViewModel.hisProjectOffers.first.titleName!.split("\$")[1].trim(), // height: 300, width: MediaQuery.of(context).size.width, fit: BoxFit.contain, diff --git a/lib/pages/medical/prescriptions/prescription_items_page.dart b/lib/pages/medical/prescriptions/prescription_items_page.dart index 471cad04..1af8415a 100644 --- a/lib/pages/medical/prescriptions/prescription_items_page.dart +++ b/lib/pages/medical/prescriptions/prescription_items_page.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:hmg_patient_app/core/enum/viewstate.dart'; import 'package:hmg_patient_app/core/model/prescriptions/Prescriptions.dart'; import 'package:hmg_patient_app/core/model/prescriptions/prescription_report.dart'; @@ -25,6 +27,9 @@ import 'package:hmg_patient_app/widgets/show_zoom_image_dialog.dart'; import 'package:hmg_patient_app/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:http/http.dart' as http; +import 'package:open_filex/open_filex.dart'; +import 'package:path_provider/path_provider.dart'; import 'package:provider/provider.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -449,14 +454,17 @@ class PrescriptionItemsPage extends StatelessWidget { GifLoaderDialogUtils.showMyDialog(context); await _prescriptionsService .getMedicationsInstructionsPDF(setupID: prescriptions.setupID!, projectID: prescriptions.projectID!, appointmentNo: prescriptions.appointmentNo.toString()) - .then((val) { + .then((val) async { if (_prescriptionsService.hasError) { GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: _prescriptionsService.error ?? "Unable to get PDF."); } else { GifLoaderDialogUtils.hideDialog(context); print(_prescriptionsService.prescriptionInstructionsPDFLink); - launchUrl(Uri.parse(_prescriptionsService.prescriptionInstructionsPDFLink)); + + launchUrl(Uri.parse(_prescriptionsService.prescriptionInstructionsPDFLink), mode: LaunchMode.externalApplication); + // launchUrl(Uri.parse(_prescriptionsService.prescriptionInstructionsPDFLink)); + // OpenFilex.open(_prescriptionsService.prescriptionInstructionsPDFLink); } }); }, diff --git a/lib/pages/medical/reports/report_list_widget.dart b/lib/pages/medical/reports/report_list_widget.dart index 9c61f7cd..26982556 100644 --- a/lib/pages/medical/reports/report_list_widget.dart +++ b/lib/pages/medical/reports/report_list_widget.dart @@ -102,6 +102,7 @@ class ReportListWidget extends StatelessWidget { children: [ if (report.projectName != null) MyRichText(TranslationBase.of(context).hospital + ":", report.projectName!, projectViewModel.isArabic), if (report.clinicDescription != null) MyRichText(TranslationBase.of(context).clinic + ":", report.clinicDescription!, projectViewModel.isArabic), + // MyRichText(TranslationBase.of(context).invoiceNo + ":", report.invoiceNo_VP.toString(), projectViewModel.isArabic), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisSize: MainAxisSize.max, diff --git a/lib/widgets/data_display/medical/LabResult/newUI/LabItem.dart b/lib/widgets/data_display/medical/LabResult/newUI/LabItem.dart index 040bbb05..c7a2e1a0 100644 --- a/lib/widgets/data_display/medical/LabResult/newUI/LabItem.dart +++ b/lib/widgets/data_display/medical/LabResult/newUI/LabItem.dart @@ -85,7 +85,7 @@ class _LabItemState extends State { children: [ ItemResultCardWidgetWithParams( title: data?.description ?? '', - subTitle: data?.resultValue ?? '', + subTitle: "${data?.resultValue} ${data?.uOM}" ?? '', referenceRange: data?.referanceRange ?? '', percentage: data?.percentage ?? 0.0, note: data?.notes ?? '',