From b42c47f074499c6a3679d0c73a997d3525d79d87 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 6 Feb 2024 15:00:54 +0300 Subject: [PATCH 01/14] Update to stores --- ios/Runner.xcodeproj/project.pbxproj | 6 +++--- lib/config/config.dart | 2 +- pubspec.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 1514bc24..77d6d13b 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -540,7 +540,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.5.84; + MARKETING_VERSION = 4.5.87; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -684,7 +684,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.5.84; + MARKETING_VERSION = 4.5.87; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -722,7 +722,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.5.84; + MARKETING_VERSION = 4.5.87; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/lib/config/config.dart b/lib/config/config.dart index c5afb016..4386f96f 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -345,7 +345,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.4; +var VERSION_ID = 12.5; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/pubspec.yaml b/pubspec.yaml index 5b1da571..729402a3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.5.85+1 +version: 4.5.051+4050051 environment: sdk: ">=2.7.0 <3.0.0" From 162b2fd22a7830fbbe20b53d7bd246ad4e0974a1 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 12 Feb 2024 09:43:29 +0300 Subject: [PATCH 02/14] updates --- lib/config/config.dart | 4 +- lib/main.dart | 4 -- lib/pages/landing/landing_page.dart | 3 ++ lib/splashPage.dart | 3 ++ lib/uitl/LocalNotification.dart | 71 +++++++++++++++++------------ 5 files changed, 50 insertions(+), 35 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 4386f96f..8e5bdc7b 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -21,8 +21,8 @@ var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:4422/'; -// var BASE_URL = 'https://uat.hmgwebservices.com/'; -var BASE_URL = 'https://hmgwebservices.com/'; +var BASE_URL = 'https://uat.hmgwebservices.com/'; +// var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'http://10.20.200.111:1010/'; // var BASE_URL = 'https://uat.hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/'; diff --git a/lib/main.dart b/lib/main.dart index 4be8957b..b740b661 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -81,10 +81,6 @@ class _MyApp extends State { Widget build(BuildContext context) { PlatformBridge.init(context); - LocalNotification.init(onNotificationClick: (payload) { - LocalNotification.getInstance().showNow(title: "Payload", subtitle: payload, payload: payload); - }); - // SystemChrome.setPreferredOrientations([ // DeviceOrientation.portraitUp, // DeviceOrientation.portraitDown, diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index d0e4f526..683ddc6d 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -303,6 +303,9 @@ class _LandingPageState extends State with WidgetsBindingObserver { int languageID = Provider.of(context, listen: false).isArabic ? 1 : 2; familyFileProvider.getSharedRecordByStatus(languageID); } + // Future.delayed(Duration(seconds: 3)).then((result) async { + // LocalNotification.getInstance().showNow(title: "Payload Update", subtitle: "Payload Update", payload: "Payload Update"); + // }); }); PayfortViewModel payfortViewModel = context.read(); diff --git a/lib/splashPage.dart b/lib/splashPage.dart index 778ab6ff..68580dc9 100644 --- a/lib/splashPage.dart +++ b/lib/splashPage.dart @@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/theme/theme_notifier.dart'; import 'package:diplomaticquarterapp/theme/theme_value.dart'; +import 'package:diplomaticquarterapp/uitl/LocalNotification.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/push-notification-handler.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; @@ -37,6 +38,8 @@ class _SplashScreenState extends State { Duration(seconds: 1, milliseconds: 500), () async { await loadPrivilege().then((value) { + LocalNotification.init(onNotificationClick: (payload) {}); + // LocalNotification.getInstance().showNow(title: "Payload", subtitle: "Subtitle", payload: "Payload"); if(!_privilegeService.hasError) { Navigator.of(context).pushReplacement( MaterialPageRoute( diff --git a/lib/uitl/LocalNotification.dart b/lib/uitl/LocalNotification.dart index 9e0cd11b..1a3f2bea 100644 --- a/lib/uitl/LocalNotification.dart +++ b/lib/uitl/LocalNotification.dart @@ -31,25 +31,27 @@ class LocalNotification { _initialize() async { try { var initializationSettingsAndroid = new AndroidInitializationSettings('app_icon'); - // var initializationSettingsIOS = DarwinInitializationSettings(onDidReceiveLocalNotification: null); - // var initializationSettings = InitializationSettings(android: initializationSettingsAndroid, iOS: initializationSettingsIOS); - // await flutterLocalNotificationsPlugin.initialize( - // initializationSettings, - // onDidReceiveNotificationResponse: (NotificationResponse notificationResponse) { - // switch (notificationResponse.notificationResponseType) { - // case NotificationResponseType.selectedNotification: - // // selectNotificationStream.add(notificationResponse.payload); - // break; - // case NotificationResponseType.selectedNotificationAction: - // // if (notificationResponse.actionId == navigationActionId) { - // // selectNotificationStream.add(notificationResponse.payload); - // // } - // break; - // } - // }, - // onDidReceiveBackgroundNotificationResponse: notificationTapBackground, - // ); - } catch (ex) {} + var initializationSettingsIOS = DarwinInitializationSettings(onDidReceiveLocalNotification: null); + var initializationSettings = InitializationSettings(android: initializationSettingsAndroid, iOS: initializationSettingsIOS); + await flutterLocalNotificationsPlugin.initialize( + initializationSettings, + onDidReceiveNotificationResponse: (NotificationResponse notificationResponse) { + switch (notificationResponse.notificationResponseType) { + case NotificationResponseType.selectedNotification: + // selectNotificationStream.add(notificationResponse.payload); + break; + case NotificationResponseType.selectedNotificationAction: + // if (notificationResponse.actionId == navigationActionId) { + // selectNotificationStream.add(notificationResponse.payload); + // } + break; + } + }, + // onDidReceiveBackgroundNotificationResponse: notificationTapBackground, + ); + } catch (ex) { + print(ex.toString()); + } // flutterLocalNotificationsPlugin.initialize(initializationSettings, onDidReceiveNotificationResponse: (NotificationResponse notificationResponse) // { // switch (notificationResponse.notificationResponseType) { @@ -96,15 +98,26 @@ class LocalNotification { } Future showNow({@required String title, @required String subtitle, String payload}) { - // Future.delayed(Duration(seconds: 1)).then((result) async { - // var androidPlatformChannelSpecifics = AndroidNotificationDetails('com.hmg.local_notification', 'HMG', - // channelDescription: 'HMG', importance: Importance.max, priority: Priority.high, ticker: 'ticker', vibrationPattern: _vibrationPattern()); - // var iOSPlatformChannelSpecifics = DarwinNotificationDetails(); - // var platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics, iOS: iOSPlatformChannelSpecifics); - // await flutterLocalNotificationsPlugin.show(_randomNumber(), title, subtitle, platformChannelSpecifics, payload: payload).catchError((err) { - // print(err); - // }); - // }); + Future.delayed(Duration(seconds: 1)).then((result) async { + var androidPlatformChannelSpecifics = AndroidNotificationDetails( + 'com.hmg.local_notification', + 'HMG', + channelDescription: 'HMG', + importance: Importance.max, + priority: Priority.high, + ticker: 'ticker', + vibrationPattern: _vibrationPattern(), + ongoing: true, + autoCancel: false, + usesChronometer: true, + when: DateTime.now().millisecondsSinceEpoch - 120 * 1000, + ); + var iOSPlatformChannelSpecifics = DarwinNotificationDetails(); + var platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics, iOS: iOSPlatformChannelSpecifics); + await flutterLocalNotificationsPlugin.show(25613, title, subtitle, platformChannelSpecifics, payload: payload).catchError((err) { + print(err); + }); + }); } Future scheduleNotification({@required DateTime scheduledNotificationDateTime, @required String title, @required String description}) async { @@ -115,7 +128,7 @@ class LocalNotification { vibrationPattern[2] = 5000; vibrationPattern[3] = 2000; - // var androidPlatformChannelSpecifics = AndroidNotificationDetails('active-prescriptions', 'ActivePrescriptions', + // var androidPlatformChannelSpecifics = AndroidNotificationDetails('active-prescriptions', 'ActivePrescriptions', // channelDescription: 'ActivePrescriptionsDescription', // // icon: 'secondary_icon', // sound: RawResourceAndroidNotificationSound('slow_spring_board'), From 7fc47ebf341f6aaa6b8f61ba8c676799e09fa7d6 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 14 Feb 2024 15:11:46 +0300 Subject: [PATCH 03/14] LiveCare invoice fix --- lib/config/config.dart | 4 ++-- lib/pages/livecare/widgets/LiveCareHistoryCard.dart | 3 ++- lib/services/livecare_services/livecare_provider.dart | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 8e5bdc7b..4386f96f 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -21,8 +21,8 @@ var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:4422/'; -var BASE_URL = 'https://uat.hmgwebservices.com/'; -// var BASE_URL = 'https://hmgwebservices.com/'; +// var BASE_URL = 'https://uat.hmgwebservices.com/'; +var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'http://10.20.200.111:1010/'; // var BASE_URL = 'https://uat.hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/'; diff --git a/lib/pages/livecare/widgets/LiveCareHistoryCard.dart b/lib/pages/livecare/widgets/LiveCareHistoryCard.dart index cf89b766..dac84e89 100644 --- a/lib/pages/livecare/widgets/LiveCareHistoryCard.dart +++ b/lib/pages/livecare/widgets/LiveCareHistoryCard.dart @@ -237,9 +237,10 @@ class _LiveCareHistoryCardState extends State { } sendInvoiceEmail(context) { + int languageID = projectViewModel.isArabic ? 1 : 2; LiveCareService service = new LiveCareService(); GifLoaderDialogUtils.showMyDialog(context); - service.sendLiveCareInvoiceEmail(widget.erRequestHistoryList.appointmentNo.toString(), widget.erRequestHistoryList.projectID, authUser.emailAddress, context).then((res) { + service.sendLiveCareInvoiceEmail(widget.erRequestHistoryList.appointmentNo.toString(), widget.erRequestHistoryList.projectID, authUser.emailAddress, languageID, context).then((res) { GifLoaderDialogUtils.hideDialog(context); AppToast.showSuccessToast(message: TranslationBase.of(context).emailSentSuccessfully); }).catchError((err) { diff --git a/lib/services/livecare_services/livecare_provider.dart b/lib/services/livecare_services/livecare_provider.dart index 25df930d..a01ef107 100644 --- a/lib/services/livecare_services/livecare_provider.dart +++ b/lib/services/livecare_services/livecare_provider.dart @@ -289,13 +289,13 @@ class LiveCareService extends BaseService { return Future.value(localRes); } - Future sendLiveCareInvoiceEmail(String appoNo, int projectID, String emailAddress, BuildContext context) async { + Future sendLiveCareInvoiceEmail(String appoNo, int projectID, String emailAddress, int languageID, BuildContext context) async { Map request; if (await this.sharedPref.getObject(USER_PROFILE) != null) { var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); authUser = data; } - request = {"To": emailAddress, "ProjectID": projectID, "AppointmentNo": appoNo}; + request = {"To": emailAddress, "ProjectID": projectID, "AppointmentNo": appoNo, "LanguageID": languageID}; dynamic localRes; await baseAppClient.post(SEND_LIVECARE_INVOICE_EMAIL, onSuccess: (response, statusCode) async { localRes = response; From e0c9914206772dccfa3d8458c208b6d02f55013a Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 15 Feb 2024 16:22:15 +0300 Subject: [PATCH 04/14] Issue for appointment reschedule fixed --- lib/pages/MyAppointments/AppointmentDetails.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pages/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart index cd5597db..362320eb 100644 --- a/lib/pages/MyAppointments/AppointmentDetails.dart +++ b/lib/pages/MyAppointments/AppointmentDetails.dart @@ -308,10 +308,10 @@ class _AppointmentDetailsState extends State with SingleTick } void goToBookConfirm() { - if (DocAvailableAppointments.areAppointmentsAvailable) + if (DocAvailableAppointments.areSlotsAvailable) navigateToBookConfirm(context); else - AppToast.showErrorToast(message: TranslationBase.of(context).emptySchedule); + AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot); } Future navigateToBookConfirm(context) async { From 727a9f136346bfadd984e3853a2264cf7da3996a Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 19 Feb 2024 12:39:38 +0300 Subject: [PATCH 05/14] updates & checks --- lib/config/config.dart | 13 ++++---- lib/core/service/client/base_app_client.dart | 2 +- lib/pages/landing/landing_page.dart | 1 + lib/uitl/gif_loader_dialog_utils.dart | 31 ++++++++++++++++++-- lib/widgets/in_app_browser/InAppBrowser.dart | 4 +-- 5 files changed, 38 insertions(+), 13 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 4386f96f..b73b0c16 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -22,9 +22,8 @@ var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:4422/'; // var BASE_URL = 'https://uat.hmgwebservices.com/'; -var BASE_URL = 'https://hmgwebservices.com/'; -// var BASE_URL = 'http://10.20.200.111:1010/'; -// var BASE_URL = 'https://uat.hmgwebservices.com/'; +// var BASE_URL = 'https://hmgwebservices.com/'; + var BASE_URL = 'http://10.20.200.111:1010/'; // var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; @@ -629,10 +628,10 @@ var CONVERT_PATIENT_TO_CASH = 'Services/Doctors.svc/REST/deActivateInsuranceComp //PAYFORT var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails"; var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse"; -var payFortEnvironment = FortEnvironment.production; -var applePayMerchantId = "merchant.com.hmgwebservices"; -// var payFortEnvironment = FortEnvironment.test; -// var applePayMerchantId = "merchant.com.hmgwebservices.uat"; +// var payFortEnvironment = FortEnvironment.production; +// var applePayMerchantId = "merchant.com.hmgwebservices"; +var payFortEnvironment = FortEnvironment.test; +var applePayMerchantId = "merchant.com.hmgwebservices.uat"; class AppGlobal { static var context; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index e9fa657e..d0d5ed1b 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -175,7 +175,7 @@ class BaseAppClient { // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; //0560717232 - // body['PatientID'] = 1374756; //4609100 + // body['PatientID'] = 3300938; //4609100 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 683ddc6d..f60e3bda 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -382,6 +382,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { setUserValues(value); Navigator.of(context).pushNamed(CONFIRM_LOGIN); } else { + GifLoaderDialogUtils.hideDialog(context); Navigator.of(context).pushNamed( WELCOME_LOGIN, ); diff --git a/lib/uitl/gif_loader_dialog_utils.dart b/lib/uitl/gif_loader_dialog_utils.dart index d95307de..4591c19f 100644 --- a/lib/uitl/gif_loader_dialog_utils.dart +++ b/lib/uitl/gif_loader_dialog_utils.dart @@ -3,15 +3,40 @@ import 'package:flutter/material.dart'; import '../widgets/Loader/gif_loader_container.dart'; class GifLoaderDialogUtils { + static bool _isLoadingVisible = false; + + static bool get isLoading => _isLoadingVisible; + static showMyDialog(BuildContext context) { - showDialog(context: context, builder: (cxt) => GifLoaderContainer()); + // showDialog(context: context, builder: (cxt) => GifLoaderContainer()); + WidgetsBinding.instance.addPostFrameCallback((_) { + _isLoadingVisible = true; + showDialog( + context: context, + barrierColor: Colors.black.withOpacity(0.5), + useRootNavigator: false, + builder: (BuildContext context) => GifLoaderContainer(), + ).then((value) { + _isLoadingVisible = false; + }); + }); } static hideDialog(BuildContext context) { try { - Navigator.of(context).pop(); + if (_isLoadingVisible) { + _isLoadingVisible = false; + Navigator.of(context).pop(); + } + _isLoadingVisible = false; + // Navigator.of(context, rootNavigator: true).canPop(); } catch (error) { - Future.delayed(Duration(milliseconds: 250)).then((value) => Navigator.of(context).canPop()); + // Future.delayed(Duration(milliseconds: 250)).then((value) => Navigator.of(context, rootNavigator: true).canPop()); + if (_isLoadingVisible) { + _isLoadingVisible = false; + Navigator.of(context).pop(); + } + _isLoadingVisible = false; } } } diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index c9fecbf9..c71b206b 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -40,9 +40,9 @@ class MyInAppBrowser extends InAppBrowser { // static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT - // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT + static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT - static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE + // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE // static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS From fe37de962113fb20d6ba25ae4149b8468c66be88 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 21 Feb 2024 09:29:29 +0300 Subject: [PATCH 06/14] Loading dialog updates --- lib/core/service/medical/medical_service.dart | 3 ++- .../medical/medical_view_model.dart | 4 ++-- lib/pages/BookAppointment/BookConfirm.dart | 8 +++---- lib/pages/ToDoList/ToDo.dart | 2 +- .../medical/medical_profile_page_new.dart | 2 +- lib/uitl/gif_loader_dialog_utils.dart | 5 +++-- lib/widgets/Loader/gif_loader_container.dart | 22 ++++++++++++++----- 7 files changed, 29 insertions(+), 17 deletions(-) diff --git a/lib/core/service/medical/medical_service.dart b/lib/core/service/medical/medical_service.dart index c8f29e44..0e763978 100644 --- a/lib/core/service/medical/medical_service.dart +++ b/lib/core/service/medical/medical_service.dart @@ -11,7 +11,7 @@ class MedicalService extends BaseService { List appoitmentAllHistoryResultList = List(); List doctorScheduleResponse = List(); List freeSlots = []; - getAppointmentHistory({bool isActiveAppointment = false}) async { + getAppointmentHistory({bool isActiveAppointment = false, bool isForTimeLine = false}) async { hasError = false; super.error = ""; Map body = Map(); @@ -19,6 +19,7 @@ class MedicalService extends BaseService { body['IsActiveAppointment'] = true; body['isDentalAllowedBackend'] = false; } + body['IsForTimeLine'] = isForTimeLine; var appoHistory = await sharedPref.getObject(APPOINTMENT_HISTORY_MEDICAL); if (appoHistory != null) { appoitmentAllHistoryResultList.clear(); diff --git a/lib/core/viewModels/medical/medical_view_model.dart b/lib/core/viewModels/medical/medical_view_model.dart index 004f368b..bdf40509 100644 --- a/lib/core/viewModels/medical/medical_view_model.dart +++ b/lib/core/viewModels/medical/medical_view_model.dart @@ -12,10 +12,10 @@ class MedicalViewModel extends BaseViewModel { List get appoitmentAllHistoryResultList => _medicalService.appoitmentAllHistoryResultList; List get getDoctorScheduleList => _medicalService.doctorScheduleResponse; List get freeSlots => _medicalService.freeSlots; - getAppointmentHistory() async { + getAppointmentHistory({bool isForTimeLine = false}) async { if (authenticatedUserObject.isLogin) { setState(ViewState.Busy); - await _medicalService.getAppointmentHistory(); + await _medicalService.getAppointmentHistory(isForTimeLine: isForTimeLine); if (_medicalService.hasError) { error = _medicalService.error; setState(ViewState.Error); diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart index 9f6c5df5..b6e2f668 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 { ConfirmDialog.closeAlertDialog(context); - GifLoaderDialogUtils.showMyDialog(context); + GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false); DoctorsListService service = new DoctorsListService(); bool isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT); service.cancelAppointment(appo, context, isReschedule: true).then((res) { @@ -326,7 +326,7 @@ class _BookConfirmState extends State { final timeSlot = DocAvailableAppointments.selectedAppoDateTime; String logs = await sharedPref.getString('selectedLogSlots'); List decodedLogs = json.decode(logs); - GifLoaderDialogUtils.showMyDialog(context); + GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false); AppoitmentAllHistoryResultList appo; widget.service .insertAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, widget.selectedTime, widget.selectedDate, initialSlotDuration, projectViewModel.isArabic ? 1 : 2, context, null, null, null, projectViewModel) @@ -383,7 +383,7 @@ class _BookConfirmState extends State { final timeSlot = DocAvailableAppointments.selectedAppoDateTime; widget.selectedDate = timeSlot.toUtc().add(Duration(hours: 3)).toString().split(" ")[0]; widget.selectedTime = timeSlot.toUtc().add(Duration(hours: 3)).toString().split(" ")[1].substring(0, 5); - GifLoaderDialogUtils.showMyDialog(context); + GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false); AppoitmentAllHistoryResultList appo; widget.service.insertLiveCareScheduleAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, docObject.serviceID, widget.selectedTime, widget.selectedDate, projectViewModel.isArabic ? 1 : 2, context).then((res) { if (res['MessageStatus'] == 1) { @@ -444,7 +444,7 @@ class _BookConfirmState extends State { getPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) { int languageID = projectViewModel.isArabic ? 1 : 2; String errorMsg = ""; - GifLoaderDialogUtils.showMyDialog(context); + GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false); widget.service.getPatientShare(appointmentNo, clinicID, projectID, languageID, context).then((res) { projectViewModel.selectedBodyPartList.clear(); projectViewModel.laserSelectionDuration = 0; diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index 75889850..ac1eb6f8 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -1174,9 +1174,9 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { addAdvancedNumberRequestTamara("Tamara-Advance-0000", tamaraOrderID, appo.appointmentNo.toString(), appo); } }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); print(err); AppToast.showErrorToast(message: err); - GifLoaderDialogUtils.hideDialog(context); }); } catch (err) { print(err); diff --git a/lib/pages/medical/medical_profile_page_new.dart b/lib/pages/medical/medical_profile_page_new.dart index 35f6cd45..e505e47e 100644 --- a/lib/pages/medical/medical_profile_page_new.dart +++ b/lib/pages/medical/medical_profile_page_new.dart @@ -31,7 +31,7 @@ class _MedicalProfilePageState extends State { var appoCountProvider = Provider.of(context); List myMedicalList = Utils.myMedicalList(projectViewModel: projectViewModel, context: context, count: appoCountProvider.count, isLogin: projectViewModel.isLogin); return BaseView( - onModelReady: (model) => model.getAppointmentHistory(), + onModelReady: (model) => model.getAppointmentHistory(isForTimeLine: true), builder: (_, model, widget1) => AppScaffold( isShowDecPage: false, isShowAppBar: false, diff --git a/lib/uitl/gif_loader_dialog_utils.dart b/lib/uitl/gif_loader_dialog_utils.dart index 4591c19f..1a847637 100644 --- a/lib/uitl/gif_loader_dialog_utils.dart +++ b/lib/uitl/gif_loader_dialog_utils.dart @@ -7,15 +7,16 @@ class GifLoaderDialogUtils { static bool get isLoading => _isLoadingVisible; - static showMyDialog(BuildContext context) { + static showMyDialog(BuildContext context, {bool barrierDismissible = true}) { // showDialog(context: context, builder: (cxt) => GifLoaderContainer()); WidgetsBinding.instance.addPostFrameCallback((_) { _isLoadingVisible = true; showDialog( + barrierDismissible: barrierDismissible, context: context, barrierColor: Colors.black.withOpacity(0.5), useRootNavigator: false, - builder: (BuildContext context) => GifLoaderContainer(), + builder: (BuildContext context) => GifLoaderContainer(barrierDismissible: barrierDismissible,), ).then((value) { _isLoadingVisible = false; }); diff --git a/lib/widgets/Loader/gif_loader_container.dart b/lib/widgets/Loader/gif_loader_container.dart index 75083d1a..79651081 100644 --- a/lib/widgets/Loader/gif_loader_container.dart +++ b/lib/widgets/Loader/gif_loader_container.dart @@ -2,6 +2,10 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter_gifimage/flutter_gifimage.dart'; class GifLoaderContainer extends StatefulWidget { + bool barrierDismissible; + + GifLoaderContainer({this.barrierDismissible = true}); + @override _GifLoaderContainerState createState() => _GifLoaderContainerState(); } @@ -29,14 +33,20 @@ class _GifLoaderContainerState extends State with TickerProv @override Widget build(BuildContext context) { - return Center( + return WillPopScope( + onWillPop: () async { + return widget.barrierDismissible; + }, + child: Center( //progress-loading.gif child: Container( - // margin: EdgeInsets.only(bottom: 40), - child: GifImage( - controller: controller1, - image: AssetImage("assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), + // margin: EdgeInsets.only(bottom: 40), + child: GifImage( + controller: controller1, + image: AssetImage("assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), + ), + ), ), - )); + ); } } From 5256d8873f738518c3549879985095cac34a0c4a Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 26 Feb 2024 11:05:25 +0300 Subject: [PATCH 07/14] ToDo & Appo Timeline changes --- lib/config/config.dart | 6 +- lib/pages/ToDoList/ToDo.dart | 41 ++++++++++++-- .../medical/medical_profile_page_new.dart | 2 +- .../appointment_services/GetDoctorsList.dart | 19 ++++++- .../medical/time_line_new_widget.dart | 56 ++++++++++++++----- 5 files changed, 99 insertions(+), 25 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index b73b0c16..0ad2285e 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -21,9 +21,9 @@ var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:4422/'; -// var BASE_URL = 'https://uat.hmgwebservices.com/'; +var BASE_URL = 'https://uat.hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/'; - var BASE_URL = 'http://10.20.200.111:1010/'; +// var BASE_URL = 'http://10.20.200.111:1010/'; // var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; @@ -344,7 +344,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.5; +var VERSION_ID = 12.6; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index ac1eb6f8..1c4c111b 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -100,6 +100,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { _tabController = TabController(length: 2, vsync: this); WidgetsBinding.instance.addPostFrameCallback((_) { getPatientAppointmentHistory(); + getAncillaryOrders(); }); super.initState(); imagesInfo @@ -831,6 +832,36 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { obGyneProcedureListResponse: obGyneProcedureListResponse))); } + getAncillaryOrders() { + DoctorsListService service = new DoctorsListService(); + service.getAncillaryOrders().then((res) { + if (res['MessageStatus'] == 1) { + if (res['AncillaryOrderList'].length != 0) { + res['AncillaryOrderList'].forEach((v) { + ancillaryLists.add(new AncillaryOrdersListModel.fromJson(v)); + }); + } + // if (res['AncillaryOrderList'].length != 0) { + // res['AncillaryOrderList'].forEach((item) { + // ancillaryLists.add(AncillaryOrdersListModel.fromJson(item)); + // }); + // } + // dataLoaded = true; + // if (widget.isFromMyAppointments) { + // performNextAction(widget.appointment); + // widget.isFromMyAppointments = false; + // } + setState(() {}); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + err != null ?? AppToast.showErrorToast(message: err); + }); + } + getPatientAppointmentHistory() async { int languageID = projectViewModel.isArabic ? 1 : 2; GifLoaderDialogUtils.showMyDialog(context); @@ -845,11 +876,11 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { appoList.add(new AppoitmentAllHistoryResultList.fromJson(v)); }); } - if (res['AncillaryOrderList'].length != 0) { - res['AncillaryOrderList'].forEach((item) { - ancillaryLists.add(AncillaryOrdersListModel.fromJson(item)); - }); - } + // if (res['AncillaryOrderList'].length != 0) { + // res['AncillaryOrderList'].forEach((item) { + // ancillaryLists.add(AncillaryOrdersListModel.fromJson(item)); + // }); + // } dataLoaded = true; if (widget.isFromMyAppointments) { performNextAction(widget.appointment); diff --git a/lib/pages/medical/medical_profile_page_new.dart b/lib/pages/medical/medical_profile_page_new.dart index e505e47e..f8f6499e 100644 --- a/lib/pages/medical/medical_profile_page_new.dart +++ b/lib/pages/medical/medical_profile_page_new.dart @@ -46,7 +46,7 @@ class _MedicalProfilePageState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - TimeLineView(model.isLogin, projectViewModel.isArabic, model.appoitmentAllHistoryResultList), + TimeLineView(model.isLogin, projectViewModel.isArabic, model.appoitmentAllHistoryResultList, model), SizedBox( height: 20, ), diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index b85ec599..f5022dc5 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -175,7 +175,7 @@ class DoctorsListService extends BaseService { return Future.value(localRes); } - Future getDoctorsRating(int docID,int languageID, context) async { + Future getDoctorsRating(int docID, int languageID, context) async { Map request; Request req = appGlobal.getPublicRequest(); @@ -226,7 +226,7 @@ class DoctorsListService extends BaseService { return Future.value(images); } - Future getDoctorsRatingDetails(int docID,int languageID, context) async { + Future getDoctorsRatingDetails(int docID, int languageID, context) async { Map request; Request req = appGlobal.getPublicRequest(); @@ -1790,6 +1790,21 @@ class DoctorsListService extends BaseService { return Future.value(localRes); } + Future getAncillaryOrders() async { + Map body = Map(); + + hasError = false; + dynamic localRes; + await baseAppClient.post(GET_ANCILLARY_ORDERS, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + + return Future.value(localRes); + } + Future getPayfortSDKTokenForPayment(String deviceID, String signatureValue, {bool isTest = true}) async { Map request; request = {"service_command": "SDK_TOKEN", "access_code": "BsM6He4FMBaZ86W64kjZ", "merchant_identifier": "ipxnRXXq", "language": "en", "device_id": deviceID, "signature": signatureValue}; diff --git a/lib/widgets/data_display/medical/time_line_new_widget.dart b/lib/widgets/data_display/medical/time_line_new_widget.dart index 0f5f9195..a15eecd4 100644 --- a/lib/widgets/data_display/medical/time_line_new_widget.dart +++ b/lib/widgets/data_display/medical/time_line_new_widget.dart @@ -2,6 +2,7 @@ import 'package:auto_size_text/auto_size_text.dart'; import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; @@ -25,8 +26,9 @@ import 'package:provider/provider.dart'; class TimeLineView extends StatefulWidget { bool isLogged, isArabic; List appoitmentAllHistoryResultList; + MedicalViewModel medicalViewModel; - TimeLineView(this.isLogged, this.isArabic, this.appoitmentAllHistoryResultList); + TimeLineView(this.isLogged, this.isArabic, this.appoitmentAllHistoryResultList, this.medicalViewModel); @override _TimeLineViewState createState() => _TimeLineViewState(); @@ -38,17 +40,31 @@ class _TimeLineViewState extends State { DateObj selectedDateObj = null; final authService = new auth.AuthProvider(); + static const _scrollThreshold = 1.00; + ScrollController _scrollController; + + bool isAllAppointmentsLoaded = false; + + @override + void dispose() { + _scrollController.removeListener(_scrollListener); + _scrollController.dispose(); + super.dispose(); + } + @override void initState() { super.initState(); + _scrollController = ScrollController(); + _scrollController.addListener(_scrollListener); dateObjs.add(new DateObj(0, 0, widget.isArabic ? "الكل" : "All")); - for (int i = 0; i < widget.appoitmentAllHistoryResultList.length; i++) { - tempList.add(widget.appoitmentAllHistoryResultList[i]); + for (int i = 0; i < widget.medicalViewModel.appoitmentAllHistoryResultList.length; i++) { + tempList.add(widget.medicalViewModel.appoitmentAllHistoryResultList[i]); dateObjs.add(new DateObj( - DateUtil.convertStringToDate(widget.appoitmentAllHistoryResultList[i].appointmentDate).month, - DateUtil.convertStringToDate(widget.appoitmentAllHistoryResultList[i].appointmentDate).year, + DateUtil.convertStringToDate(widget.medicalViewModel.appoitmentAllHistoryResultList[i].appointmentDate).month, + DateUtil.convertStringToDate(widget.medicalViewModel.appoitmentAllHistoryResultList[i].appointmentDate).year, DateUtil.getMonthYearLangDateFormatted( - DateUtil.convertStringToDate(widget.appoitmentAllHistoryResultList[i].appointmentDate), + DateUtil.convertStringToDate(widget.medicalViewModel.appoitmentAllHistoryResultList[i].appointmentDate), widget.isArabic ? "ar" : "en", ))); } @@ -61,20 +77,31 @@ class _TimeLineViewState extends State { // } } + void _scrollListener() async { + if (_scrollController.offset >= _scrollController.position.maxScrollExtent * _scrollThreshold && !_scrollController.position.outOfRange) { + print('Scroll position is at ${_scrollThreshold * 100}%.'); + if(!isAllAppointmentsLoaded) { + await sharedPref.remove(APPOINTMENT_HISTORY_MEDICAL); + widget.medicalViewModel.getAppointmentHistory(isForTimeLine: false); + isAllAppointmentsLoaded = true; + } + } + } + applyFilter(bool isAll) { tempList.clear(); if (isAll) { - for (int i = 0; i < widget.appoitmentAllHistoryResultList.length; i++) { - tempList.add(widget.appoitmentAllHistoryResultList[i]); + for (int i = 0; i < widget.medicalViewModel.appoitmentAllHistoryResultList.length; i++) { + tempList.add(widget.medicalViewModel.appoitmentAllHistoryResultList[i]); } } else { - for (int i = 0; i < widget.appoitmentAllHistoryResultList.length; i++) { + for (int i = 0; i < widget.medicalViewModel.appoitmentAllHistoryResultList.length; i++) { if (DateUtil.getMonthYearLangDateFormatted( - DateUtil.convertStringToDate(widget.appoitmentAllHistoryResultList[i].appointmentDate), + DateUtil.convertStringToDate(widget.medicalViewModel.appoitmentAllHistoryResultList[i].appointmentDate), widget.isArabic ? "ar" : "en", ) == selectedDateObj.monthYear) { - tempList.add(widget.appoitmentAllHistoryResultList[i]); + tempList.add(widget.medicalViewModel.appoitmentAllHistoryResultList[i]); } } } @@ -182,6 +209,7 @@ class _TimeLineViewState extends State { scrollDirection: Axis.horizontal, shrinkWrap: false, physics: BouncingScrollPhysics(), + controller: _scrollController, separatorBuilder: (BuildContext context, int index) { return mWidth(8); }, @@ -244,9 +272,9 @@ class _TimeLineViewState extends State { height: MediaQuery.of(context).size.width / 14, width: MediaQuery.of(context).size.width / (widget.isArabic ? 4 : 6), child: CustomTextButton( - shape: cardRadiusNew(8), - elevation: 0, - backgroundColor: Color(0xFFFBF2E31), + shape: cardRadiusNew(8), + elevation: 0, + backgroundColor: Color(0xFFFBF2E31), onPressed: () { // onLoginClick(); login(); From d6dacfb743d60ada05ae45a0358b74bc73e6b126 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 27 Feb 2024 12:13:55 +0300 Subject: [PATCH 08/14] Load more added in appointments timeline. --- lib/config/localized_values.dart | 1 + .../medical/medical_view_model.dart | 5 +- lib/core/viewModels/project_view_model.dart | 8 ++ lib/uitl/translations_delegate_base.dart | 1 + .../medical/time_line_new_widget.dart | 105 +++++++++++------- lib/widgets/drawer/app_drawer_widget.dart | 2 + 6 files changed, 81 insertions(+), 41 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 6bd06889..f05b94f3 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1907,4 +1907,5 @@ const Map localizedValues = { "upcoming": {"en": "Upcoming", "ar": "المواعيد القادمة"}, "noUpcomingAppointment": {"en": "No upcoming appointments", "ar": "لا توجد مواعيد القادمة"}, "locationTimeoutError": {"en": "Unable to fetch your location, Please try again.", "ar": "غير قادر على جلب موقعك، يرجى المحاولة مرة أخرى."}, + "loadMore": {"en": "Load More", "ar": "تحميل المزيد"}, }; \ No newline at end of file diff --git a/lib/core/viewModels/medical/medical_view_model.dart b/lib/core/viewModels/medical/medical_view_model.dart index bdf40509..a52af93b 100644 --- a/lib/core/viewModels/medical/medical_view_model.dart +++ b/lib/core/viewModels/medical/medical_view_model.dart @@ -10,8 +10,11 @@ class MedicalViewModel extends BaseViewModel { MedicalService _medicalService = locator(); List get appoitmentAllHistoryResultList => _medicalService.appoitmentAllHistoryResultList; + List get getDoctorScheduleList => _medicalService.doctorScheduleResponse; + List get freeSlots => _medicalService.freeSlots; + getAppointmentHistory({bool isForTimeLine = false}) async { if (authenticatedUserObject.isLogin) { setState(ViewState.Busy); @@ -46,5 +49,5 @@ class MedicalViewModel extends BaseViewModel { } else setState(ViewState.Idle); } - //} +//} } diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart index aff0faff..684af151 100644 --- a/lib/core/viewModels/project_view_model.dart +++ b/lib/core/viewModels/project_view_model.dart @@ -38,6 +38,14 @@ class ProjectViewModel extends BaseViewModel { dynamic searchvalue; bool isLogin = false; int laserSelectionDuration; + bool _isAllAppointmentsLoaded = false; + + bool get isAllAppointmentsLoaded => _isAllAppointmentsLoaded; + + void setIsAllAppointmentsLoaded(bool value) { + _isAllAppointmentsLoaded = value; + notifyListeners(); + } double _latitude; double _longitude; diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 0dd0c97d..3ab3fa66 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2916,6 +2916,7 @@ class TranslationBase { String get upcoming => localizedValues["upcoming"][locale.languageCode]; String get noUpcomingAppointment => localizedValues["noUpcomingAppointment"][locale.languageCode]; String get locationTimeoutError => localizedValues["locationTimeoutError"][locale.languageCode]; + String get loadMore => localizedValues["loadMore"][locale.languageCode]; } diff --git a/lib/widgets/data_display/medical/time_line_new_widget.dart b/lib/widgets/data_display/medical/time_line_new_widget.dart index a15eecd4..d2f64dfd 100644 --- a/lib/widgets/data_display/medical/time_line_new_widget.dart +++ b/lib/widgets/data_display/medical/time_line_new_widget.dart @@ -40,23 +40,16 @@ class _TimeLineViewState extends State { DateObj selectedDateObj = null; final authService = new auth.AuthProvider(); - static const _scrollThreshold = 1.00; - ScrollController _scrollController; - - bool isAllAppointmentsLoaded = false; + ProjectViewModel projectViewModel; @override void dispose() { - _scrollController.removeListener(_scrollListener); - _scrollController.dispose(); super.dispose(); } @override void initState() { super.initState(); - _scrollController = ScrollController(); - _scrollController.addListener(_scrollListener); dateObjs.add(new DateObj(0, 0, widget.isArabic ? "الكل" : "All")); for (int i = 0; i < widget.medicalViewModel.appoitmentAllHistoryResultList.length; i++) { tempList.add(widget.medicalViewModel.appoitmentAllHistoryResultList[i]); @@ -77,17 +70,6 @@ class _TimeLineViewState extends State { // } } - void _scrollListener() async { - if (_scrollController.offset >= _scrollController.position.maxScrollExtent * _scrollThreshold && !_scrollController.position.outOfRange) { - print('Scroll position is at ${_scrollThreshold * 100}%.'); - if(!isAllAppointmentsLoaded) { - await sharedPref.remove(APPOINTMENT_HISTORY_MEDICAL); - widget.medicalViewModel.getAppointmentHistory(isForTimeLine: false); - isAllAppointmentsLoaded = true; - } - } - } - applyFilter(bool isAll) { tempList.clear(); if (isAll) { @@ -110,6 +92,7 @@ class _TimeLineViewState extends State { @override Widget build(BuildContext context) { + projectViewModel = Provider.of(context); return Container( width: double.infinity, height: 210, @@ -192,28 +175,70 @@ class _TimeLineViewState extends State { ), mFlex(1), widget.isLogged - ? Container( - height: widget.isArabic ? 130 : 110, - width: double.infinity, - child: ListView.separated( - itemBuilder: (context, index) => Padding( - padding: widget.isArabic - ? EdgeInsets.only(left: index == 0 ? 0 : 12, right: (tempList.length - 1) == index ? 0 : 12) - : EdgeInsets.only(left: index == 0 ? 12 : 0, right: (tempList.length - 1) == index ? 12 : 0), - child: TimelineNewWidget( - appoitmentAllHistoryResul: tempList[index], - isLast: tempList.length - 1 == index ? true : false, + ? Row( + children: [ + Container( + height: widget.isArabic ? 130 : 110, + // width: double.infinity, + width: MediaQuery.of(context).size.width, + child: ListView.separated( + itemBuilder: (context, index) => Padding( + padding: widget.isArabic + ? EdgeInsets.only(left: index == 0 ? 0 : 12, right: (tempList.length - 1) == index ? 0 : 12) + : EdgeInsets.only(left: index == 0 ? 12 : 0, right: (tempList.length - 1) == index ? 12 : 0), + child: index < tempList.length + ? TimelineNewWidget( + appoitmentAllHistoryResul: tempList[index], + isLast: tempList.length - 1 == index ? true : false, + ) + : !projectViewModel.isAllAppointmentsLoaded + ? InkWell( + onTap: () async { + await sharedPref.remove(APPOINTMENT_HISTORY_MEDICAL); + widget.medicalViewModel.getAppointmentHistory(isForTimeLine: false); + projectViewModel.setIsAllAppointmentsLoaded(true); + }, + child: Row( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + mHeight(22.0), + Container( + child: Icon( + Icons.arrow_forward_outlined, + color: CustomColors.white, + size: 30, + ), + ), + mHeight(6.0), + Text( + TranslationBase.of(context).loadMore, + style: TextStyle( + color: CustomColors.white, + fontSize: 10, + fontWeight: FontWeight.w600, + letterSpacing: -0.36, + ), + ), + ], + ), + mWidth(24.0) + ], + ), + ) + : Container(), + ), + itemCount: (tempList.length + 1), + scrollDirection: Axis.horizontal, + shrinkWrap: false, + physics: BouncingScrollPhysics(), + separatorBuilder: (BuildContext context, int index) { + return index < tempList.length ? mWidth(8) : Container(); + }, ), ), - itemCount: tempList.length, - scrollDirection: Axis.horizontal, - shrinkWrap: false, - physics: BouncingScrollPhysics(), - controller: _scrollController, - separatorBuilder: (BuildContext context, int index) { - return mWidth(8); - }, - ), + ], ) : Container(), ], @@ -344,7 +369,7 @@ class TimelineNewWidget extends StatelessWidget { Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); return Container( - width: MediaQuery.of(context).size.width / 2.3, + width: isLast ? MediaQuery.of(context).size.width / 3.5 : MediaQuery.of(context).size.width / 2.5, child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart index bbc1e55f..f16e3cbc 100644 --- a/lib/widgets/drawer/app_drawer_widget.dart +++ b/lib/widgets/drawer/app_drawer_widget.dart @@ -338,6 +338,7 @@ class _AppDrawerState extends State { sharedPref.remove(APPOINTMENT_HISTORY_MEDICAL); sharedPref.remove(CLINICS_LIST); sharedPref.setBool(IS_ROBOT_INIT, null); + projectProvider.setIsAllAppointmentsLoaded(false); if (projectProvider.isArabic) { projectProvider.changeLanguage('en'); locator().hamburgerMenu.logMenuItemClick('change language to english'); @@ -608,6 +609,7 @@ class _AppDrawerState extends State { await sharedPref.clear(); await sharedPref.setString(APP_LANGUAGE, appLanguage); await sharedPref.remove(APPOINTMENT_HISTORY_MEDICAL); + projectProvider.setIsAllAppointmentsLoaded(false); this.user = null; Navigator.of(context).pushNamed(HOME); locator().hamburgerMenu.logMenuItemClick('logout'); From 2ebaed4841395e19664ed061911827d2ef667e0b Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 27 Feb 2024 14:45:10 +0300 Subject: [PATCH 09/14] label updated --- lib/pages/medical/eye/ContactLensPage.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pages/medical/eye/ContactLensPage.dart b/lib/pages/medical/eye/ContactLensPage.dart index 49db73b8..ba6d91dc 100644 --- a/lib/pages/medical/eye/ContactLensPage.dart +++ b/lib/pages/medical/eye/ContactLensPage.dart @@ -52,7 +52,7 @@ class ContactLensPage extends StatelessWidget { getRow('OZ', '${listHISGetContactLensPerscription.oZ}'), getRow('CT', '${listHISGetContactLensPerscription.cT}'), getRow('Blend', '${listHISGetContactLensPerscription.blend}'), - getRow(TranslationBase.of(context).reminder, '${listHISGetContactLensPerscription.remarks}', isLast: true), + getRow(TranslationBase.of(context).remarks, '${listHISGetContactLensPerscription.remarks}', isLast: true), ], ), ), @@ -84,7 +84,7 @@ class ContactLensPage extends StatelessWidget { getRow('OZ', '${listHISGetContactLensPerscription.oZ}'), getRow('CT', '${listHISGetContactLensPerscription.cT}'), getRow('Blend', '${listHISGetContactLensPerscription.blend}'), - getRow(TranslationBase.of(context).reminder, '${listHISGetContactLensPerscription.remarks}', isLast: true), + getRow(TranslationBase.of(context).remarks, '${listHISGetContactLensPerscription.remarks}', isLast: true), ], ), ), From 968e59707e030cd58f2f3b5f9d4b7f31cf9ddcdd Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 3 Mar 2024 10:37:21 +0300 Subject: [PATCH 10/14] updates --- lib/config/config.dart | 12 ++++++------ lib/uitl/gif_loader_dialog_utils.dart | 4 +++- lib/widgets/in_app_browser/InAppBrowser.dart | 4 ++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 0ad2285e..a24f0ed2 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -21,8 +21,8 @@ var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:4422/'; -var BASE_URL = 'https://uat.hmgwebservices.com/'; -// var BASE_URL = 'https://hmgwebservices.com/'; +// var BASE_URL = 'https://uat.hmgwebservices.com/'; +var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'http://10.20.200.111:1010/'; // var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; @@ -628,10 +628,10 @@ var CONVERT_PATIENT_TO_CASH = 'Services/Doctors.svc/REST/deActivateInsuranceComp //PAYFORT var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails"; var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse"; -// var payFortEnvironment = FortEnvironment.production; -// var applePayMerchantId = "merchant.com.hmgwebservices"; -var payFortEnvironment = FortEnvironment.test; -var applePayMerchantId = "merchant.com.hmgwebservices.uat"; +var payFortEnvironment = FortEnvironment.production; +var applePayMerchantId = "merchant.com.hmgwebservices"; +// var payFortEnvironment = FortEnvironment.test; +// var applePayMerchantId = "merchant.com.hmgwebservices.uat"; class AppGlobal { static var context; diff --git a/lib/uitl/gif_loader_dialog_utils.dart b/lib/uitl/gif_loader_dialog_utils.dart index 1a847637..5b0446cc 100644 --- a/lib/uitl/gif_loader_dialog_utils.dart +++ b/lib/uitl/gif_loader_dialog_utils.dart @@ -16,7 +16,9 @@ class GifLoaderDialogUtils { context: context, barrierColor: Colors.black.withOpacity(0.5), useRootNavigator: false, - builder: (BuildContext context) => GifLoaderContainer(barrierDismissible: barrierDismissible,), + builder: (BuildContext context) => GifLoaderContainer( + barrierDismissible: barrierDismissible, + ), ).then((value) { _isLoadingVisible = false; }); diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index c71b206b..c9fecbf9 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -40,9 +40,9 @@ class MyInAppBrowser extends InAppBrowser { // static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT - static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT + // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT - // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE + static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE // static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS From 3dffb26aee7e1d473bc61813f17dc17795c7f779 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 10 Mar 2024 10:28:13 +0300 Subject: [PATCH 11/14] updates --- android/build.gradle | 2 +- lib/widgets/hospital_location.dart | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index bef6ad3c..a10c1dc7 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.8.20' + ext.kotlin_version = '1.8.0' repositories { google() jcenter() diff --git a/lib/widgets/hospital_location.dart b/lib/widgets/hospital_location.dart index 998f8250..9f7e509f 100644 --- a/lib/widgets/hospital_location.dart +++ b/lib/widgets/hospital_location.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; @@ -41,7 +43,7 @@ class HospitalLocation extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - location!.locationName!.trim(), + location!.locationName!.trim(), style: TextStyle(fontSize: 16, letterSpacing: -0.64, fontWeight: FontWeight.w600, color: Color(0xff2E303A)), ), SizedBox(height: 10), @@ -81,13 +83,18 @@ class HospitalLocation extends StatelessWidget { mapType: MapType.google, coords: Coords(double.parse(location!.latitude!), double.parse(location!.longitude!)), title: location!.locationName!, - ); + ).catchError((err) { + MapLauncher.showMarker( + mapType: Platform.isIOS ? MapType.apple : MapType.google, + coords: Coords(double.parse(location!.latitude!), double.parse(location!.longitude!)), + title: location!.locationName!, + ); + }); }, ), SizedBox(height: 10), - contactButton(Icons.call, TranslationBase.of(context).callNow, () async{ - - await launchUrl(Uri.parse("tel://" + location!.phoneNumber.toString())); + contactButton(Icons.call, TranslationBase.of(context).callNow, () async { + await launchUrl(Uri.parse("tel://" + location!.phoneNumber.toString())); }), ], ), @@ -105,7 +112,6 @@ class HospitalLocation extends StatelessWidget { backgroundColor: Color(0xffF5F5F5), shape: StadiumBorder(side: BorderSide(color: Color(0xffF0F0F0), width: 1)), ), - onPressed: callback, icon: Icon( _iconData, From 52a5e978a7e39e29f09c876d5fccfd62a1a99c00 Mon Sep 17 00:00:00 2001 From: Aamir Date: Sun, 10 Mar 2024 16:03:54 +0300 Subject: [PATCH 12/14] changes local --- lib/config/config.dart | 575 ++++++------------ lib/pages/BookAppointment/BookConfirm.dart | 11 +- .../widgets/reminder_dialog.dart | 11 +- .../MyAppointments/AppointmentDetails.dart | 18 +- lib/uitl/CalendarUtils.dart | 14 +- 5 files changed, 219 insertions(+), 410 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 07871dde..a13abed2 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -22,9 +22,9 @@ var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:2018/'; // var BASE_URL = 'http://10.50.100.198:4422/'; -// var BASE_URL = 'https://uat.hmgwebservices.com/'; +var BASE_URL = 'https://uat.hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/'; -var BASE_URL = 'https://hmgwebservices.com/'; +//var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'http://10.20.200.111:1010/'; //var BASE_URL = 'https://uat.hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/'; @@ -32,7 +32,7 @@ var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; - // var BASE_URL = 'https://webservices.hmg.com/'; +// var BASE_URL = 'https://webservices.hmg.com/'; // var BASE_URL = 'http://10.50.100.198:4422/'; @@ -78,19 +78,14 @@ var WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo'; var GET_PRIVILEGE = 'Services/Patients.svc/REST/Service_Privilege'; // Wifi Credentials -var WIFI_CREDENTIALS = - "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID"; +var WIFI_CREDENTIALS = "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID"; ///Doctor -var GET_MY_DOCTOR = - 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; +var GET_MY_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; var GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles'; -var GET_DOCTOR_PRE_POST_IMAGES = - 'Services/Doctors.svc/REST/GetDoctorPrePostImages'; -var GET_DOCTOR_RATING_NOTES = - 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating'; -var GET_DOCTOR_RATING_DETAILS = - 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails'; +var GET_DOCTOR_PRE_POST_IMAGES = 'Services/Doctors.svc/REST/GetDoctorPrePostImages'; +var GET_DOCTOR_RATING_NOTES = 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating'; +var GET_DOCTOR_RATING_DETAILS = 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails'; var GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating'; @@ -98,46 +93,31 @@ var GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating'; // var PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList'; var PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async'; -var GET_PRESCRIPTIONS_ALL_ORDERS = - 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -var GET_PRESCRIPTION_REPORT = - 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; -var SEND_PRESCRIPTION_EMAIL = - 'Services/Notifications.svc/REST/SendPrescriptionEmail'; -var GET_PRESCRIPTION_REPORT_ENH = - 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; +var GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +var GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; +var SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail'; +var GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; ///Lab Order var GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; -var GET_Patient_LAB_SPECIAL_RESULT = - 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; -var SEND_LAB_RESULT_EMAIL = - 'Services/Notifications.svc/REST/SendLabReportEmail'; +var GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; +var SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail'; var GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults'; -var GET_Patient_LAB_ORDERS_RESULT = - 'Services/Patients.svc/REST/GetPatientLabOrdersResults'; -var SEND_COVID_LAB_RESULT_EMAIL = - 'Services/Notifications.svc/REST/GenerateCOVIDReport'; -var COVID_PASSPORT_UPDATE = - 'Services/Patients.svc/REST/Covid19_Certificate_PassportUpdate'; -var GET_PATIENT_PASSPORT_NUMBER = - 'Services/Patients.svc/REST/Covid19_Certificate_GetPassport'; - -var UPDATE_WORKPLACE_NAME = - 'Services/Patients.svc/REST/ActivateSickLeave_FromVida'; -var GET_SICKLEAVE_STATUS_ADMISSION_NO = - 'Services/ChatBot_Service.svc/REST/GetSickLeaveStatusByAdmissionNo'; +var GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults'; +var SEND_COVID_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/GenerateCOVIDReport'; +var COVID_PASSPORT_UPDATE = 'Services/Patients.svc/REST/Covid19_Certificate_PassportUpdate'; +var GET_PATIENT_PASSPORT_NUMBER = 'Services/Patients.svc/REST/Covid19_Certificate_GetPassport'; + +var UPDATE_WORKPLACE_NAME = 'Services/Patients.svc/REST/ActivateSickLeave_FromVida'; +var GET_SICKLEAVE_STATUS_ADMISSION_NO = 'Services/ChatBot_Service.svc/REST/GetSickLeaveStatusByAdmissionNo'; /// var GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; -var GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = - 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo'; +var GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo'; -var GET_PATIENT_ORDERS_DETAILS = - 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead'; +var GET_PATIENT_ORDERS_DETAILS = 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead'; var GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; -var SEND_RAD_REPORT_EMAIL = - 'Services/Notifications.svc/REST/SendRadReportEmail'; +var SEND_RAD_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendRadReportEmail'; ///Feedback var SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList'; @@ -149,39 +129,28 @@ var GET_PATIENT_AppointmentHistory = 'Services' '/Doctors.svc/REST/PateintHasAppoimentHistory_Async'; ///VITAL SIGN -var GET_PATIENT_VITAL_SIGN = - 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; +var GET_PATIENT_VITAL_SIGN = 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; ///Er Nearest -var GET_NEAREST_HOSPITAL = - 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime'; +var GET_NEAREST_HOSPITAL = 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime'; ///ED Online -var ER_GET_VISUAL_TRIAGE_QUESTIONS = - "services/Doctors.svc/REST/ER_GetVisualTriageQuestions"; -var ER_SAVE_TRIAGE_INFORMATION = - "services/Doctors.svc/REST/ER_SaveTriageInformation"; -var ER_GetPatientPaymentInformationForERClinic = - "services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic"; +var ER_GET_VISUAL_TRIAGE_QUESTIONS = "services/Doctors.svc/REST/ER_GetVisualTriageQuestions"; +var ER_SAVE_TRIAGE_INFORMATION = "services/Doctors.svc/REST/ER_SaveTriageInformation"; +var ER_GetPatientPaymentInformationForERClinic = "services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic"; ///Er Nearest -var GET_AMBULANCE_REQUEST = - 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; -var GET_PATIENT_ALL_PRES_ORDERS = - 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -var GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = - 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID'; +var GET_AMBULANCE_REQUEST = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; +var GET_PATIENT_ALL_PRES_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +var GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID'; var UPDATE_PRESS_ORDER = 'Services/Patients.svc/REST/PatientER_UpdatePresOrder'; -var INSERT_ER_INERT_PRES_ORDER = - 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; +var INSERT_ER_INERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; /// ER RRT var GET_ALL_RC_TRANSPORTATION = 'api/Transportation/getalltransportation'; var GET_ALL_TRANSPORTATIONS_RC = 'api/Transportation/getalltransportation'; -var GET_ALL_RRT_QUESTIONS = - 'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions'; -var GET_RRT_SERVICE_PRICE = - 'Services/Patients.svc/REST/PatientE_RealRRT_GetServicePrice'; +var GET_ALL_RRT_QUESTIONS = 'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions'; +var GET_RRT_SERVICE_PRICE = 'Services/Patients.svc/REST/PatientE_RealRRT_GetServicePrice'; var GET_ALL_TRANSPORTATIONS_ORDERS = 'api/Transportation/get'; @@ -202,8 +171,7 @@ var GET_BABYINFORMATION_REQUEST = 'Services/Community.svc/REST/GetBabyByUserID'; var GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID'; ///userInformation -var GET_USERINFORMATION_REQUEST = - 'Services/Community.svc/REST/GetUserInformation_New'; +var GET_USERINFORMATION_REQUEST = 'Services/Community.svc/REST/GetUserInformation_New'; ///Update email var UPDATE_PATENT_EMAIL = 'Services/Patients.svc/REST/UpdatePateintEmail'; @@ -225,37 +193,26 @@ var GET_TABLE_REQUEST = 'Services/Community.svc/REST/CreateVaccinationTable'; var GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities'; ///BloodDetails -var GET_BLOOD_REQUEST = - 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails'; +var GET_BLOOD_REQUEST = 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails'; -var SAVE_BLOOD_REQUEST = - 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; +var SAVE_BLOOD_REQUEST = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; -var GET_BLOOD_AGREEMENT = - 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation'; -var SAVE_BLOOD_AGREEMENT = - 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; +var GET_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation'; +var SAVE_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; ///Reports var REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo'; -var INSERT_REQUEST_FOR_MEDICAL_REPORT = - 'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; -var SEND_MEDICAL_REPORT_EMAIL = - 'Services/Notifications.svc/REST/SendMedicalReportEmail'; -var GET_INPATIENT_ADMISSIONS = - 'Services/inps.svc/REST/getAdmissionForMedicalReport'; +var INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; +var SEND_MEDICAL_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendMedicalReportEmail'; +var GET_INPATIENT_ADMISSIONS = 'Services/inps.svc/REST/getAdmissionForMedicalReport'; var GET_MEDICAL_REPORT_PDF = 'Services/inps.svc/REST/getMedicalReportPDF'; ///Rate // var IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated'; -var IS_LAST_APPOITMENT_RATED = - 'Services/Doctors.svc/REST/IsLastAppoitmentRated_Async'; -var GET_APPOINTMENT_DETAILS_BY_NO = - 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo'; -var NEW_RATE_APPOINTMENT_URL = - "Services/Doctors.svc/REST/AppointmentsRating_InsertAppointmentRate"; -var NEW_RATE_DOCTOR_URL = - "Services/Doctors.svc/REST/DoctorsRating_InsertDoctorRate"; +var IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated_Async'; +var GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo'; +var NEW_RATE_APPOINTMENT_URL = "Services/Doctors.svc/REST/AppointmentsRating_InsertAppointmentRate"; +var NEW_RATE_DOCTOR_URL = "Services/Doctors.svc/REST/DoctorsRating_InsertDoctorRate"; var GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; @@ -263,8 +220,7 @@ var GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; var GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized"; //URL to get active appointment list -var GET_ACTIVE_APPOINTMENTS_LIST_URL = - "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber"; +var GET_ACTIVE_APPOINTMENTS_LIST_URL = "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber"; //URL to get projects list var GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; @@ -273,165 +229,119 @@ var GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; var GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime"; //URL to dental doctors list -var GET_DENTAL_DOCTORS_LIST_URL = - "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping"; +var GET_DENTAL_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping"; //URL to get doctor free slots var GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots"; //URL to insert appointment -var INSERT_SPECIFIC_APPOINTMENT = - "Services/Doctors.svc/REST/InsertSpecificAppointment"; +var INSERT_SPECIFIC_APPOINTMENT = "Services/Doctors.svc/REST/InsertSpecificAppointment"; //URL to get patient share -var GET_PATIENT_SHARE = - "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO"; +var GET_PATIENT_SHARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO"; //URL to get patient appointment history -var GET_PATIENT_APPOINTMENT_HISTORY = - "Services/Doctors.svc/REST/PateintHasAppoimentHistory"; +var GET_PATIENT_APPOINTMENT_HISTORY = "Services/Doctors.svc/REST/PateintHasAppoimentHistory"; -var GET_OBGYNE_ORDERS_LIST = - "services/Patients.svc/REST/HIS_OBGYNEProcedureGet"; +var GET_OBGYNE_ORDERS_LIST = "services/Patients.svc/REST/HIS_OBGYNEProcedureGet"; -var GET_OBGYNE_DOCTORS_LIST = - "services/Doctors.svc/REST/HIS_ObgyneUltrasoundDoctors"; +var GET_OBGYNE_DOCTORS_LIST = "services/Doctors.svc/REST/HIS_ObgyneUltrasoundDoctors"; -var OBGYNE_PROCEDURE_UPDATE = - "services/Patients.svc/REST/HIS_OBGYNEProcedure_Update"; +var OBGYNE_PROCEDURE_UPDATE = "services/Patients.svc/REST/HIS_OBGYNEProcedure_Update"; -var GET_RRT_PROCEDURE_LIST = - "Services/Patients.svc/REST/GetRRTProcedureDetailsListFromVida"; +var GET_RRT_PROCEDURE_LIST = "Services/Patients.svc/REST/GetRRTProcedureDetailsListFromVida"; -var DOCTOR_SCHEDULE_URL = - 'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable'; +var DOCTOR_SCHEDULE_URL = 'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable'; -var SEND_REPORT_EYE_EMAIL = - "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail"; +var SEND_REPORT_EYE_EMAIL = "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail"; -var SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = - "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail"; +var SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail"; //URL to get patient appointment curfew history // var GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = "Services/Doctors.svc/REST/AppoimentHistoryForCurfew"; -var GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = - "Services/Doctors.svc/REST/AppoimentHistoryForCurfew_Async"; +var GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = "Services/Doctors.svc/REST/AppoimentHistoryForCurfew_Async"; //URL to confirm appointment -var CONFIRM_APPOINTMENT = - "Services/MobileNotifications.svc/REST/ConfirmAppointment"; +var CONFIRM_APPOINTMENT = "Services/MobileNotifications.svc/REST/ConfirmAppointment"; -var INSERT_VIDA_REQUEST = - "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart"; +var INSERT_VIDA_REQUEST = "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart"; //URL to cancel appointment var CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment"; //URL get appointment QR -var GENERATE_QR_APPOINTMENT = - "Services/Doctors.svc/REST/GenerateQRAppointmentNo"; +var GENERATE_QR_APPOINTMENT = "Services/Doctors.svc/REST/GenerateQRAppointmentNo"; //URL send email appointment QR -var EMAIL_QR_APPOINTMENT = - "Services/Notifications.svc/REST/sendEmailForOnLineCheckin"; +var EMAIL_QR_APPOINTMENT = "Services/Notifications.svc/REST/sendEmailForOnLineCheckin"; //URL check payment status -var CHECK_PAYMENT_STATUS = - "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID"; +var CHECK_PAYMENT_STATUS = "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID"; //URL create advance payment var CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment"; -var HIS_CREATE_ADVANCE_PAYMENT = - "Services/Patients.svc/REST/HIS_CreateAdvancePayment"; +var HIS_CREATE_ADVANCE_PAYMENT = "Services/Patients.svc/REST/HIS_CreateAdvancePayment"; -var ER_CREATE_ADVANCE_PAYMENT = - "services/Doctors.svc/REST/ER_CreateAdvancePaymentForClinic"; +var ER_CREATE_ADVANCE_PAYMENT = "services/Doctors.svc/REST/ER_CreateAdvancePaymentForClinic"; -var ER_INSERT_ADVANCE_PAYMENT = - "services/Doctors.svc/REST/ER_InsertEROnlinePaymentDetails"; +var ER_INSERT_ADVANCE_PAYMENT = "services/Doctors.svc/REST/ER_InsertEROnlinePaymentDetails"; -var ADD_ADVANCE_NUMBER_REQUEST = - 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest'; +var ADD_ADVANCE_NUMBER_REQUEST = 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest'; -var GENERATE_ANCILLARY_ORDERS_INVOICE = - 'Services/Doctors.svc/REST/AutoGenerateAncillaryOrderInvoice'; +var GENERATE_ANCILLARY_ORDERS_INVOICE = 'Services/Doctors.svc/REST/AutoGenerateAncillaryOrderInvoice'; -var IS_ALLOW_ASK_DOCTOR = - 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; +var IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; var GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; -var ADD_VIDA_REQUEST = - 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart'; +var ADD_VIDA_REQUEST = 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart'; var SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo'; -var GET_LIVECARE_CLINICS = - 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics'; +var GET_LIVECARE_CLINICS = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics'; -var GET_LIVECARE_SCHEDULE_CLINICS = - 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule'; +var GET_LIVECARE_SCHEDULE_CLINICS = 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule'; -var GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = - 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID'; +var GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID'; -var GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = - 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots'; +var GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots'; -var INSERT_LIVECARE_SCHEDULE_APPOINTMENT = - 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule'; +var INSERT_LIVECARE_SCHEDULE_APPOINTMENT = 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule'; -var GET_PATIENT_SHARE_LIVECARE = - "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare"; +var GET_PATIENT_SHARE_LIVECARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare"; -var SET_ONLINE_CHECKIN_FOR_APPOINTMENT = - "Services/Patients.svc/REST/SetOnlineCheckInForAppointment"; +var SET_ONLINE_CHECKIN_FOR_APPOINTMENT = "Services/Patients.svc/REST/SetOnlineCheckInForAppointment"; -var GET_LIVECARE_CLINIC_TIMING = - 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule'; +var GET_LIVECARE_CLINIC_TIMING = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule'; -var GET_ER_APPOINTMENT_FEES = - 'Services/DoctorApplication.svc/REST/GetERAppointmentFees'; +var GET_ER_APPOINTMENT_FEES = 'Services/DoctorApplication.svc/REST/GetERAppointmentFees'; var GET_ER_APPOINTMENT_TIME = 'Services/ER_VirtualCall.svc/REST/GetRestTime'; -var ADD_NEW_CALL_FOR_PATIENT_ER = - 'Services/DoctorApplication.svc/REST/NewCallForPatientER'; +var ADD_NEW_CALL_FOR_PATIENT_ER = 'Services/DoctorApplication.svc/REST/NewCallForPatientER'; -var GET_LIVECARE_HISTORY = - 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory'; -var CANCEL_LIVECARE_REQUEST = - 'Services/ER_VirtualCall.svc/REST/DeleteErRequest'; -var SEND_LIVECARE_INVOICE_EMAIL = - 'Services/Notifications.svc/REST/SendInvoiceForLiveCare'; +var GET_LIVECARE_HISTORY = 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory'; +var CANCEL_LIVECARE_REQUEST = 'Services/ER_VirtualCall.svc/REST/DeleteErRequest'; +var SEND_LIVECARE_INVOICE_EMAIL = 'Services/Notifications.svc/REST/SendInvoiceForLiveCare'; -var CHANGE_PATIENT_ER_SESSION = - 'Services/DoctorApplication.svc/REST/ChangePatientERSession'; +var CHANGE_PATIENT_ER_SESSION = 'Services/DoctorApplication.svc/REST/ChangePatientERSession'; -var APPLE_PAY_INSERT_REQUEST = - 'Services/PayFort_Serv.svc/REST/PayFort_ApplePayRequestData_Insert'; +var APPLE_PAY_INSERT_REQUEST = 'Services/PayFort_Serv.svc/REST/PayFort_ApplePayRequestData_Insert'; var GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions'; var TAMARA_REQUEST_INSERT = 'Services/PayFort_Serv.svc/REST/AddTamaraRequest'; -var UPDATE_HEALTH_TERMS = - 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport'; +var UPDATE_HEALTH_TERMS = 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport'; -var GET_PATIENT_HEALTH_STATS = - 'Services/Patients.svc/REST/Med_GetTransactionsSts'; +var GET_PATIENT_HEALTH_STATS = 'Services/Patients.svc/REST/Med_GetTransactionsSts'; -var SEND_CHECK_IN_NFC_REQUEST = - 'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC'; +var SEND_CHECK_IN_NFC_REQUEST = 'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC'; -var HAS_DENTAL_PLAN = - 'Services/Doctors.svc/REST/Dental_IsPatientHasOnGoingEstimation'; +var HAS_DENTAL_PLAN = 'Services/Doctors.svc/REST/Dental_IsPatientHasOnGoingEstimation'; -var LASER_BODY_PARTS = - 'Services/Patients.svc/REST/Laser_GetBodyPartsByCategory'; +var LASER_BODY_PARTS = 'Services/Patients.svc/REST/Laser_GetBodyPartsByCategory'; -var INSERT_COVID_QUESTIONNAIRE = - 'Services/Doctors.svc/REST/COVID19_Questionnarie_Insert'; -var UPDATE_COVID_QUESTIONNAIRE = - 'Services/Doctors.svc/REST/COVID19_Questionnarie_Update'; +var INSERT_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnarie_Insert'; +var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnarie_Update'; //URL to get medicine and pharmacies list var CHANNEL = 3; @@ -453,27 +363,19 @@ var IS_TEXT_COMPLETED = false; var GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region"; var GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList"; -var GET_PAtIENTS_INSURANCE = - "Services/Patients.svc/REST/Get_PatientInsuranceDetails"; -var GET_PAtIENTS_INSURANCE_UPDATED = - "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory"; +var GET_PAtIENTS_INSURANCE = "Services/Patients.svc/REST/Get_PatientInsuranceDetails"; +var GET_PAtIENTS_INSURANCE_UPDATED = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory"; var INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList"; -var INSURANCE_SCHEMES = - "Services/Patients.svc/REST/PatientER_SchemesOfAactiveCompaniesGet"; -var UPDATE_MANUAL_INSURANCE = - "Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate"; -var INSURANCE_COMPANIES = - "Services/Patients.svc/REST/PatientER_InsuranceCompanyGet"; -var GET_PATIENT_INSURANCE_DETAILS = - "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails"; -var UPLOAD_INSURANCE_CARD = - 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate'; +var INSURANCE_SCHEMES = "Services/Patients.svc/REST/PatientER_SchemesOfAactiveCompaniesGet"; +var UPDATE_MANUAL_INSURANCE = "Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate"; +var INSURANCE_COMPANIES = "Services/Patients.svc/REST/PatientER_InsuranceCompanyGet"; +var GET_PATIENT_INSURANCE_DETAILS = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails"; +var UPLOAD_INSURANCE_CARD = 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate'; var GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID"; var GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail"; -var GET_PAtIENTS_INSURANCE_APPROVALS = - "Services/Patients.svc/REST/GetApprovalStatus_Async"; +var GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus_Async"; // var GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus"; var SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse'; @@ -482,132 +384,89 @@ var GET_VACCINATION_ONHAND = "/Services/ERP.svc/REST/GET_VACCINATION_ONHAND"; var GET_PATIENT_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave'; -var GET_PATIENT_SICK_LEAVE_STATUS = - 'Services/Patients.svc/REST/GetPatientSickLeave_Status'; +var GET_PATIENT_SICK_LEAVE_STATUS = 'Services/Patients.svc/REST/GetPatientSickLeave_Status'; var SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail'; -var GET_PATIENT_AdVANCE_BALANCE_AMOUNT = - 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount'; -var GET_PATIENT_INFO_BY_ID = - 'Services/Doctors.svc/REST/GetPatientInfoByPatientID'; -var GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER = - 'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber'; -var SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = - 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment'; -var CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = - 'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment'; +var GET_PATIENT_AdVANCE_BALANCE_AMOUNT = 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount'; +var GET_PATIENT_INFO_BY_ID = 'Services/Doctors.svc/REST/GetPatientInfoByPatientID'; +var GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER = 'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber'; +var SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment'; +var CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment'; -var GET_COVID_DRIVETHRU_PROJECT_LIST = - 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter'; +var GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter'; -var GET_COVID_DRIVETHRU_PAYMENT_INFO = - 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation'; +var GET_COVID_DRIVETHRU_PAYMENT_INFO = 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation'; -var GET_COVID_DRIVETHRU_FREE_SLOTS = - 'Services/Doctors.svc/REST/COVID19_GetFreeSlots'; +var GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots'; -var GET_COVID_DRIVETHRU_PROCEDURES_LIST = - 'Services/Doctors.svc/REST/COVID19_GetTestProcedures'; +var GET_COVID_DRIVETHRU_PROCEDURES_LIST = 'Services/Doctors.svc/REST/COVID19_GetTestProcedures'; ///Smartwatch Integration Services -var GET_PATIENT_LAST_RECORD = - 'Services/Patients.svc/REST/Med_GetPatientLastRecord'; -var INSERT_PATIENT_HEALTH_DATA = - 'Services/Patients.svc/REST/Med_InsertTransactions'; +var GET_PATIENT_LAST_RECORD = 'Services/Patients.svc/REST/Med_GetPatientLastRecord'; +var INSERT_PATIENT_HEALTH_DATA = 'Services/Patients.svc/REST/Med_InsertTransactions'; ///My Trackers -var GET_DIABETIC_RESULT_AVERAGE = - 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage'; +var GET_DIABETIC_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage'; var GET_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_GetDiabtecResults'; var ADD_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_AddDiabtecResult'; -var GET_BLOOD_PRESSURE_RESULT_AVERAGE = - 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage'; -var GET_BLOOD_PRESSURE_RESULT = - 'Services/Patients.svc/REST/Patient_GetBloodPressureResult'; -var ADD_BLOOD_PRESSURE_RESULT = - 'Services/Patients.svc/REST/Patient_AddBloodPressureResult'; +var GET_BLOOD_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage'; +var GET_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetBloodPressureResult'; +var ADD_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddBloodPressureResult'; -var GET_WEIGHT_PRESSURE_RESULT_AVERAGE = - 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage'; -var GET_WEIGHT_PRESSURE_RESULT = - 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult'; -var ADD_WEIGHT_PRESSURE_RESULT = - 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult'; +var GET_WEIGHT_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage'; +var GET_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult'; +var ADD_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult'; -var ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID = - 'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID'; +var ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID = 'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID'; -var GET_CALL_INFO_HOURS_RESULT = - 'Services/Doctors.svc/REST/GetCallInfoHoursResult'; -var GET_CALL_REQUEST_TYPE_LOV = - 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; +var GET_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult'; +var GET_CALL_REQUEST_TYPE_LOV = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; var GET_QUESTION_TYPES = 'Services/OUTPs.svc/REST/getQuestionsTypes'; -var UPDATE_DIABETIC_RESULT = - 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult'; - -var SEND_AVERAGE_BLOOD_SUGAR_REPORT = - 'Services/Notifications.svc/REST/SendAverageBloodSugarReport'; -var DEACTIVATE_DIABETIC_STATUS = - 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus'; -var DEACTIVATE_BLOOD_PRESSURES_STATUS = - 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus'; - -var UPDATE_BLOOD_PRESSURE_RESULT = - 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult'; -var SEND_AVERAGE_BLOOD_WEIGHT_REPORT = - 'Services/Notifications.svc/REST/SendAverageBodyWeightReport'; -var SEND_AVERAGE_BLOOD_PRESSURE_REPORT = - 'Services/Notifications.svc/REST/SendAverageBloodPressureReport'; - -var UPDATE_WEIGHT_PRESSURE_RESULT = - 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult'; -var DEACTIVATE_WEIGHT_PRESSURE_RESULT = - 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus'; +var UPDATE_DIABETIC_RESULT = 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult'; + +var SEND_AVERAGE_BLOOD_SUGAR_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodSugarReport'; +var DEACTIVATE_DIABETIC_STATUS = 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus'; +var DEACTIVATE_BLOOD_PRESSURES_STATUS = 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus'; + +var UPDATE_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult'; +var SEND_AVERAGE_BLOOD_WEIGHT_REPORT = 'Services/Notifications.svc/REST/SendAverageBodyWeightReport'; +var SEND_AVERAGE_BLOOD_PRESSURE_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodPressureReport'; + +var UPDATE_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult'; +var DEACTIVATE_WEIGHT_PRESSURE_RESULT = 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus'; var GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse'; var UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus'; var INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo'; -var INSERT_APPOINTMENT_QUESTION = - 'Services/OUTPs.svc/REST/insertAppointmentQuestion'; -var RATE_DOCTOR_RESPONSE = - 'Services/OUTPs.svc/REST/insertAppointmentQuestionRating'; +var INSERT_APPOINTMENT_QUESTION = 'Services/OUTPs.svc/REST/insertAppointmentQuestion'; +var RATE_DOCTOR_RESPONSE = 'Services/OUTPs.svc/REST/insertAppointmentQuestionRating'; var GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies'; // H2O -var H2O_GET_USER_PROGRESS = - "Services/H2ORemainder.svc/REST/H2O_GetUserProgress"; -var H2O_INSERT_USER_ACTIVITY = - "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity"; -var H2O_GET_USER_DETAIL = - "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New"; -var H2O_UPDATE_USER_DETAIL = - "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New"; -var H2O_UNDO_USER_ACTIVITY = - "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity"; +var H2O_GET_USER_PROGRESS = "Services/H2ORemainder.svc/REST/H2O_GetUserProgress"; +var H2O_INSERT_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity"; +var H2O_GET_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New"; +var H2O_UPDATE_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New"; +var H2O_UNDO_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity"; //E_Referral Services -var GET_ALL_RELATIONSHIP_TYPES = - "Services/Patients.svc/REST/GetAllRelationshipTypes"; -var SEND_ACTIVATION_CODE_FOR_E_REFERRAL = - 'Services/Authentication.svc/REST/SendActivationCodeForEReferral'; -var CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = - 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral'; +var GET_ALL_RELATIONSHIP_TYPES = "Services/Patients.svc/REST/GetAllRelationshipTypes"; +var SEND_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/SendActivationCodeForEReferral'; +var CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral'; var GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities'; var CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral"; var GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals"; // Encillary Orders -var GET_ANCILLARY_ORDERS = - 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList'; +var GET_ANCILLARY_ORDERS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList'; -var GET_ANCILLARY_ORDERS_DETAILS = - 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList'; +var GET_ANCILLARY_ORDERS_DETAILS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList'; //Pharmacy wishlist // var GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/"; @@ -640,19 +499,13 @@ var GET_SHIPPING_OPTIONS = "get_shipping_option/"; var DELETE_SHOPPING_CART = "delete_shopping_cart_items/"; var DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/"; var ORDER_SHOPPING_CART = "orders"; -var GET_LACUM_ACCOUNT_INFORMATION = - "Services/Patients.svc/REST/GetLakumAccountInformation"; -var GET_LACUM_GROUP_INFORMATION = - "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping"; -var LACUM_ACCOUNT_ACTIVATE = - "Services/Patients.svc/REST/LakumAccountActivation"; -var LACUM_ACCOUNT_DEACTIVATE = - "Services/Patients.svc/REST/LakumAccountDeactivation"; +var GET_LACUM_ACCOUNT_INFORMATION = "Services/Patients.svc/REST/GetLakumAccountInformation"; +var GET_LACUM_GROUP_INFORMATION = "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping"; +var LACUM_ACCOUNT_ACTIVATE = "Services/Patients.svc/REST/LakumAccountActivation"; +var LACUM_ACCOUNT_DEACTIVATE = "Services/Patients.svc/REST/LakumAccountDeactivation"; var CREATE_LAKUM_ACCOUNT = "Services/Patients.svc/REST/PHR_CreateLakumAccount"; -var TRANSFER_YAHALA_LOYALITY_POINTS = - "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints"; -var LAKUM_GET_USER_TERMS_AND_CONDITIONS = - "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy"; +var TRANSFER_YAHALA_LOYALITY_POINTS = "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints"; +var LAKUM_GET_USER_TERMS_AND_CONDITIONS = "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy"; // var PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList'; var PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async'; @@ -662,29 +515,18 @@ var GET_MOST_VIEWED_PRODUCTS = "mostview"; var GET_NEW_PRODUCTS = "newproducts"; // Home Health Care -var HHC_GET_ALL_SERVICES = - "Services/Patients.svc/REST/PatientER_HHC_GetAllServices"; -var HHC_GET_ALL_CMC_SERVICES = - "Services/Patients.svc/REST/PatientER_CMC_GetAllServices"; -var PATIENT_ER_UPDATE_PRES_ORDER = - "Services/Patients.svc/REST/PatientER_UpdatePresOrder"; -var GET_ORDER_DETAIL_BY_ID = - "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder"; -var GET_CMC_ORDER_DETAIL_BY_ID = - "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder"; +var HHC_GET_ALL_SERVICES = "Services/Patients.svc/REST/PatientER_HHC_GetAllServices"; +var HHC_GET_ALL_CMC_SERVICES = "Services/Patients.svc/REST/PatientER_CMC_GetAllServices"; +var PATIENT_ER_UPDATE_PRES_ORDER = "Services/Patients.svc/REST/PatientER_UpdatePresOrder"; +var GET_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder"; +var GET_CMC_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder"; var GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems"; -var PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS = - 'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications'; -var PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ = - 'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead'; -var GET_PATIENT_ALL_PRES_ORD = - 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -var PATIENT_ER_INSERT_PRES_ORDER = - 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; -var BLOOD_DONATION_REGISTER_BLOOD_TYPE = - 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; -var ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = - 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; +var PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS = 'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications'; +var PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ = 'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead'; +var GET_PATIENT_ALL_PRES_ORD = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +var PATIENT_ER_INSERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; +var BLOOD_DONATION_REGISTER_BLOOD_TYPE = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; +var ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; // HHC RC SERVICES var HHC_GET_ALL_SERVICES_RC = "api/HHC/getallhhc"; @@ -728,21 +570,17 @@ var GET_CUSTOMER_INFO = "VerifyCustomer"; //Pharmacy -var GET_PHARMACY_CATEGORISE = - 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=0'; +var GET_PHARMACY_CATEGORISE = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=0'; var GET_OFFERS_CATEGORISE = 'discountcategories'; var GET_OFFERS_PRODUCTS = 'offerproducts/'; -var GET_CATEGORISE_PARENT = - 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id='; +var GET_CATEGORISE_PARENT = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id='; var GET_PARENT_PRODUCTS = 'products?categoryid='; -var GET_SUB_CATEGORISE = - 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id='; +var GET_SUB_CATEGORISE = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id='; var GET_SUB_PRODUCTS = 'products?categoryid='; var GET_FINAL_PRODUCTS = 'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId='; var GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory'; -var GET_DISEASE_BY_CLINIC_ID = - 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID'; +var GET_DISEASE_BY_CLINIC_ID = 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID'; var SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime'; var TIMER_MIN = 10; @@ -758,97 +596,72 @@ var SCAN_QR_CODE = 'productbysku/'; var FILTERED_PRODUCTS = 'products?categoryids='; -var GET_DOCTOR_LIST_CALCULATION = - "Services/Doctors.svc/REST/GetCallculationDoctors"; +var GET_DOCTOR_LIST_CALCULATION = "Services/Doctors.svc/REST/GetCallculationDoctors"; -var GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC = - "Services/Patients.svc/REST/GetDentalAppointments"; +var GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC = "Services/Patients.svc/REST/GetDentalAppointments"; -var GET_DENTAL_APPOINTMENT_INVOICE = - "Services/Patients.svc/REST/HIS_eInvoiceForDentalByAppointmentNo"; +var GET_DENTAL_APPOINTMENT_INVOICE = "Services/Patients.svc/REST/HIS_eInvoiceForDentalByAppointmentNo"; -var SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL = - "Services/Notifications.svc/REST/SendInvoiceForDental"; +var SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL = "Services/Notifications.svc/REST/SendInvoiceForDental"; -var GET_TAMARA_PLAN = - 'https://mdlaboratories.com/tamaralive/Home/GetInstallments'; +var GET_TAMARA_PLAN = 'https://mdlaboratories.com/tamaralive/Home/GetInstallments'; -var GET_TAMARA_PAYMENT_STATUS = - 'https://mdlaboratories.com/tamaralive/api/OnlineTamara/order_status?orderid='; +var GET_TAMARA_PAYMENT_STATUS = 'https://mdlaboratories.com/tamaralive/api/OnlineTamara/order_status?orderid='; -var UPDATE_TAMARA_STATUS = - 'Services/PayFort_Serv.svc/REST/Tamara_UpdateRequestStatus'; +var UPDATE_TAMARA_STATUS = 'Services/PayFort_Serv.svc/REST/Tamara_UpdateRequestStatus'; -var MARK_APPOINTMENT_TAMARA_STATUS = - 'Services/Patients.svc/REST/MarkAppointmentForTamaraPayment_FromVida'; +var MARK_APPOINTMENT_TAMARA_STATUS = 'Services/Patients.svc/REST/MarkAppointmentForTamaraPayment_FromVida'; -var AUTO_GENERATE_INVOICE_TAMARA = - 'Services/PayFort_Serv.svc/REST/Tamara_GetinfoByAppointmentNo_AutoGenerateInvoice'; +var AUTO_GENERATE_INVOICE_TAMARA = 'Services/PayFort_Serv.svc/REST/Tamara_GetinfoByAppointmentNo_AutoGenerateInvoice'; var GET_ONESIGNAL_VOIP_TOKEN = 'https://onesignal.com/api/v1/players'; -var CANCEL_PHARMA_LIVECARE_REQUEST = - 'https://vcallapi.hmg.com/api/PharmaLiveCare/SendPaymentStatus'; +var CANCEL_PHARMA_LIVECARE_REQUEST = 'https://vcallapi.hmg.com/api/PharmaLiveCare/SendPaymentStatus'; -var INSERT_FREE_SLOTS_LOGS = - 'Services/Doctors.svc/Rest/InsertDoctorFreeSlotsLogs'; +var INSERT_FREE_SLOTS_LOGS = 'Services/Doctors.svc/Rest/InsertDoctorFreeSlotsLogs'; var GET_NATIONALITY = 'Services/Lists.svc/REST/GetNationality'; -var PAYFORT_TEST_URL = - 'https://sbpaymentservices.payfort.com/FortAPI/paymentApi'; +var PAYFORT_TEST_URL = 'https://sbpaymentservices.payfort.com/FortAPI/paymentApi'; var PAYFORT_PROD_URL = 'https://paymentservices.payfort.com/FortAPI/paymentApi'; // Check If InPatient API var CHECK_IF_INPATIENT = 'Services/Patients.svc/REST/GetInPatientAdmissionInfo'; -var CHECK_IF_PATIENT_ADMITTED = - 'Services/Inps.svc/REST/checkIsPatientAdmittedOrAdmissionRequest'; +var CHECK_IF_PATIENT_ADMITTED = 'Services/Inps.svc/REST/checkIsPatientAdmittedOrAdmissionRequest'; // Get General Instructions API var GET_GENERAL_INSTRUCTIONS = 'Services/INPs.svc/REST/getGeneralInstructions'; // Get Medical Instructions API -var GET_MEDICAL_INSTRUCTIONS = - 'Services/INPs.svc/REST/getPatientAdmissionRequest'; +var GET_MEDICAL_INSTRUCTIONS = 'Services/INPs.svc/REST/getPatientAdmissionRequest'; -var GET_INPATIENT_ADVANCE_PAYMENT_REQUESTS = - 'Services/INPs.svc/REST/getInpatientAdvancePendingPayment'; +var GET_INPATIENT_ADVANCE_PAYMENT_REQUESTS = 'Services/INPs.svc/REST/getInpatientAdvancePendingPayment'; -var GET_INPATIENT_PAID_ADVANCE_PAYMENT = - 'Services/INPs.svc/REST/getInpatientAdvanceHistory'; +var GET_INPATIENT_PAID_ADVANCE_PAYMENT = 'Services/INPs.svc/REST/getInpatientAdvanceHistory'; -var GET_INPATIENT_ADVANCE_PAYMENT_LINK = - 'Services/PayFort_Serv.svc/REST/InsertInPatientAdvanceDetails'; +var GET_INPATIENT_ADVANCE_PAYMENT_LINK = 'Services/PayFort_Serv.svc/REST/InsertInPatientAdvanceDetails'; var INSERT_INPATIENT_ORDER = 'Services/INPs.svc/REST/Inpcp_insertOrder'; -var INPATIENT_DISCHARGE_MEDICATIONS = - 'Services/INPs.svc/REST/chekPatientHasDischargeMedicine'; +var INPATIENT_DISCHARGE_MEDICATIONS = 'Services/INPs.svc/REST/chekPatientHasDischargeMedicine'; -var GET_BIRTH_NOTIFICATION = - 'Services/INPs.svc/REST/getBirthNotification_bymothermrn'; +var GET_BIRTH_NOTIFICATION = 'Services/INPs.svc/REST/getBirthNotification_bymothermrn'; var SAVE_BIRTH_NOTIFICATION = 'Services/INPs.svc/REST/SaveBirthNotification'; //Meal Plan APIs var GET_ADMITTED_PATIENTS = 'Services/MOP.svc/REST/GetAdmittedPatients'; -var GET_CURRENT_WEEKID_WEEKDAY = - 'Services/MOP.svc/REST/GetCurrentWeekAndDayHMGMP'; -var GET_MEALS_OF_SCHEDULE_ID = - 'Services/MOP.svc/REST/GetMealsOfScheduleID_Mobile'; -var GET_MEAL_ITEMS_OF_SCHEDULE_ID = - 'Services/MOP.svc/REST/GetDefaultItemsOfScheduleID'; +var GET_CURRENT_WEEKID_WEEKDAY = 'Services/MOP.svc/REST/GetCurrentWeekAndDayHMGMP'; +var GET_MEALS_OF_SCHEDULE_ID = 'Services/MOP.svc/REST/GetMealsOfScheduleID_Mobile'; +var GET_MEAL_ITEMS_OF_SCHEDULE_ID = 'Services/MOP.svc/REST/GetDefaultItemsOfScheduleID'; var PLACE_MEAL_PLAN_ORDER = 'Services/MOP.svc/REST/UpdateOrMakeNewOrder'; -var CHECK_PATIENT_NPHIES_ELIGIBILITY = - 'Services/Doctors.svc/REST/checkPatientInsuranceCompanyValidity'; -var CONVERT_PATIENT_TO_CASH = - 'Services/Doctors.svc/REST/deActivateInsuranceCompany'; +var CHECK_PATIENT_NPHIES_ELIGIBILITY = 'Services/Doctors.svc/REST/checkPatientInsuranceCompanyValidity'; +var CONVERT_PATIENT_TO_CASH = 'Services/Doctors.svc/REST/deActivateInsuranceCompany'; //PAYFORT -var getPayFortProjectDetails = - "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails"; +var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails"; var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse"; var payFortEnvironment = FortEnvironment.production; var applePayMerchantId = "merchant.com.hmgwebservices"; diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart index a7d21c61..b2ccf085 100644 --- a/lib/pages/BookAppointment/BookConfirm.dart +++ b/lib/pages/BookAppointment/BookConfirm.dart @@ -2,13 +2,11 @@ import 'dart:convert'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/main.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/models/header_model.dart'; -import 'package:diplomaticquarterapp/pages/insurance/UpdateInsuranceManually.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/routes.dart'; @@ -259,7 +257,7 @@ class _BookConfirmState extends State { ConfirmDialog.closeAlertDialog(context); GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false); DoctorsListService service = new DoctorsListService(); - bool isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT); + bool isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT) ?? false; service.cancelAppointment(appo, context, isReschedule: true).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { @@ -274,7 +272,6 @@ class _BookConfirmState extends State { AppToast.showErrorToast(message: res['ErrorEndUserMessage']); } }).catchError((err) { - GifLoaderDialogUtils.hideDialog(context); }); } @@ -330,9 +327,9 @@ class _BookConfirmState extends State { GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false); AppoitmentAllHistoryResultList appo; 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) + // .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) .then((res) { if (res['MessageStatus'] == 1) { AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess); diff --git a/lib/pages/BookAppointment/widgets/reminder_dialog.dart b/lib/pages/BookAppointment/widgets/reminder_dialog.dart index c327ce35..25e3a14c 100644 --- a/lib/pages/BookAppointment/widgets/reminder_dialog.dart +++ b/lib/pages/BookAppointment/widgets/reminder_dialog.dart @@ -11,7 +11,6 @@ import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:flutter/material.dart'; import 'package:jiffy/jiffy.dart'; -import 'package:manage_calendar_events/manage_calendar_events.dart'; import 'package:permission_handler/permission_handler.dart'; Future> requestPermissions() async { @@ -78,18 +77,16 @@ Future _showReminderDialog(BuildContext context, DateTime dateTime, String } if (onMultiDateSuccess.call(i) == null) { - CalendarUtils calendarUtils = await CalendarUtils.getInstance(); try { + CalendarUtils calendarUtils = await CalendarUtils.getInstance(); await calendarUtils.createOrUpdateEvent( - title: title ?? TranslationBase - .of(context) - .reminderTitle + " " + doctorName, + title: title ?? TranslationBase.of(context).reminderTitle + " " + doctorName, description: description ?? "At " + appoDateFormatted + " " + appoTimeFormatted, scheduleDateTime: dateTime, eventId: eventId); - onSuccess(); - }catch(e){ + onSuccess(); + } catch (e) { print(e); } } else { diff --git a/lib/pages/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart index 4719b47d..d33ed4ca 100644 --- a/lib/pages/MyAppointments/AppointmentDetails.dart +++ b/lib/pages/MyAppointments/AppointmentDetails.dart @@ -1,10 +1,8 @@ import 'dart:collection'; -import 'dart:convert'; import 'package:device_calendar/device_calendar.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/main.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart'; @@ -13,7 +11,6 @@ import 'package:diplomaticquarterapp/models/header_model.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/BookConfirm.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/components/DocAvailableAppointments.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/SchedulePage.dart'; -import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; @@ -155,12 +152,15 @@ class _AppointmentDetailsState extends State with SingleTick setState(() { if (index == 1) { if (widget.appo.clinicID == 17 || - widget.appo.clinicID == 47 || - widget.appo.clinicID == 23 || - widget.appo.clinicID == 253 || - widget.appo.clinicID == 265 || - widget.appo.isExecludeDoctor! || - widget.appo.isLiveCareAppointment!) { + widget.appo.clinicID == 47 || + widget.appo.clinicID == 23 || + widget.appo.clinicID == 253 || + widget.appo.clinicID == 265 || + widget.appo.isExecludeDoctor != null + ? widget.appo.isExecludeDoctor! + : false || widget.appo.isLiveCareAppointment != null + ? widget.appo.isLiveCareAppointment! + : false) { _tabController!.index = _tabController!.previousIndex; AppointmentDetails.showFooterButton = false; } else { diff --git a/lib/uitl/CalendarUtils.dart b/lib/uitl/CalendarUtils.dart index 1b34d18b..3a1aa3c6 100644 --- a/lib/uitl/CalendarUtils.dart +++ b/lib/uitl/CalendarUtils.dart @@ -2,24 +2,26 @@ import 'dart:async'; import 'dart:ui'; import 'package:device_calendar/device_calendar.dart'; -import 'package:timezone/timezone.dart'; final DeviceCalendarPlugin deviceCalendarPlugin = DeviceCalendarPlugin(); class CalendarUtils { static Completer? _completer; - Calendar? get writableCalendars => calendars?.firstWhere((c) => !c.isReadOnly!); + Calendar? get writableCalendars => calendars.firstWhere((c) => !c.isReadOnly!); List calendars; CalendarUtils._(this.calendars); static Future getInstance() async { + _completer = null; + if (_completer == null) { - _completer = Completer(); + _completer = await Completer(); try { final calendarsResult = await deviceCalendarPlugin.retrieveCalendars(); - _completer?.complete(CalendarUtils._(calendarsResult.data!)); + // if (calendarsResult.data != null) + _completer?.complete(await CalendarUtils._(await calendarsResult.data!)); } on Exception catch (e) { _completer!.completeError(e); final Future sharedPrefsFuture = _completer!.future; @@ -37,7 +39,7 @@ class CalendarUtils { _currentLocation = getLocation('Asia/Dubai'); else _currentLocation = getLocation('Asia/Riyadh'); - + scheduleDateTime!.forEach((element) { RecurrenceRule recurrenceRule = RecurrenceRule( RecurrenceFrequency.Daily, @@ -74,7 +76,7 @@ class CalendarUtils { TZDateTime scheduleDateTimeUTZ = TZDateTime.from(scheduleDateTime!, _currentLocation); - //print("eventId: " + eventId); + // print("eventId: " + eventId); // print("writableCalendars-name: " + writableCalendars.name); // print("writableCalendars-Id: " + writableCalendars.id); // print("writableCalendarsToString: " + writableCalendars.toString()); From 660ec3a2072c72ec0a723d5f79f2e85cd4361f27 Mon Sep 17 00:00:00 2001 From: Aamir Date: Sun, 10 Mar 2024 17:27:56 +0300 Subject: [PATCH 13/14] changes local --- lib/uitl/CalendarUtils.dart | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/uitl/CalendarUtils.dart b/lib/uitl/CalendarUtils.dart index 3a1aa3c6..c61b07f6 100644 --- a/lib/uitl/CalendarUtils.dart +++ b/lib/uitl/CalendarUtils.dart @@ -2,14 +2,16 @@ import 'dart:async'; import 'dart:ui'; import 'package:device_calendar/device_calendar.dart'; +import 'package:manage_calendar_events/manage_calendar_events.dart' as mcn; final DeviceCalendarPlugin deviceCalendarPlugin = DeviceCalendarPlugin(); +final mcn.CalendarPlugin _myPlugin = mcn.CalendarPlugin(); class CalendarUtils { static Completer? _completer; - Calendar? get writableCalendars => calendars.firstWhere((c) => !c.isReadOnly!); - List calendars; + mcn.Calendar? get writableCalendars => calendars.firstWhere((c) => !c.isReadOnly!); + List calendars; CalendarUtils._(this.calendars); @@ -19,9 +21,9 @@ class CalendarUtils { if (_completer == null) { _completer = await Completer(); try { - final calendarsResult = await deviceCalendarPlugin.retrieveCalendars(); + final List? calendarsResult = await _myPlugin.getCalendars(); // if (calendarsResult.data != null) - _completer?.complete(await CalendarUtils._(await calendarsResult.data!)); + _completer?.complete(await CalendarUtils._(await calendarsResult!)); } on Exception catch (e) { _completer!.completeError(e); final Future sharedPrefsFuture = _completer!.future; @@ -88,7 +90,7 @@ class CalendarUtils { }); } - deleteEvent(Calendar _calendar, Event _event) async { + deleteEvent(mcn.Calendar _calendar, Event _event) async { await deviceCalendarPlugin.deleteEvent(_calendar.id, _event.eventId); } From e18ba6822af178079431dd7654fe25c1e7177744 Mon Sep 17 00:00:00 2001 From: Aamir Date: Mon, 11 Mar 2024 11:21:33 +0300 Subject: [PATCH 14/14] changes local --- .../widgets/AppointmentActions.dart | 2 +- lib/uitl/CalendarUtils.dart | 44 ++++++++++++++----- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart index 97cd91dd..5075f71f 100644 --- a/lib/pages/MyAppointments/widgets/AppointmentActions.dart +++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart @@ -59,7 +59,7 @@ class AppointmentActions extends StatefulWidget { class _AppointmentActionsState extends State { List appoButtonsList = []; static bool isHuawei = false; - late HmsApiAvailability hmsApiAvailability; + HmsApiAvailability hmsApiAvailability = HmsApiAvailability(); @override void initState() { diff --git a/lib/uitl/CalendarUtils.dart b/lib/uitl/CalendarUtils.dart index c61b07f6..f98adc2b 100644 --- a/lib/uitl/CalendarUtils.dart +++ b/lib/uitl/CalendarUtils.dart @@ -1,17 +1,19 @@ import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; import 'dart:ui'; import 'package:device_calendar/device_calendar.dart'; -import 'package:manage_calendar_events/manage_calendar_events.dart' as mcn; +import 'package:manage_calendar_events/manage_calendar_events.dart' as ios; final DeviceCalendarPlugin deviceCalendarPlugin = DeviceCalendarPlugin(); -final mcn.CalendarPlugin _myPlugin = mcn.CalendarPlugin(); +final ios.CalendarPlugin _myPlugin = ios.CalendarPlugin(); class CalendarUtils { static Completer? _completer; - mcn.Calendar? get writableCalendars => calendars.firstWhere((c) => !c.isReadOnly!); - List calendars; + dynamic get writableCalendars => calendars.firstWhere((c) => !c.isReadOnly!); + dynamic calendars; CalendarUtils._(this.calendars); @@ -21,9 +23,15 @@ class CalendarUtils { if (_completer == null) { _completer = await Completer(); try { - final List? calendarsResult = await _myPlugin.getCalendars(); - // if (calendarsResult.data != null) - _completer?.complete(await CalendarUtils._(await calendarsResult!)); + final dynamic calendarsResult; + if (Platform.isIOS) { + calendarsResult = await _myPlugin.getCalendars(); + _completer?.complete(await CalendarUtils._(await calendarsResult!)); + } else { + calendarsResult = await deviceCalendarPlugin.retrieveCalendars(); + print(jsonEncode(calendarsResult.data!)); + _completer?.complete(await CalendarUtils._(await calendarsResult.data!)); + } } on Exception catch (e) { _completer!.completeError(e); final Future sharedPrefsFuture = _completer!.future; @@ -31,6 +39,7 @@ class CalendarUtils { return sharedPrefsFuture; } } + return _completer!.future; } @@ -78,11 +87,18 @@ class CalendarUtils { TZDateTime scheduleDateTimeUTZ = TZDateTime.from(scheduleDateTime!, _currentLocation); - // print("eventId: " + eventId); + print("eventId: " + "hhgvhg"); // print("writableCalendars-name: " + writableCalendars.name); // print("writableCalendars-Id: " + writableCalendars.id); - // print("writableCalendarsToString: " + writableCalendars.toString()); - Event event = Event(writableCalendars!.id, start: scheduleDateTimeUTZ, end: scheduleDateTimeUTZ.add(Duration(minutes: 30)), title: title, description: description); + print("writableCalendarsToString: " + writableCalendars.toString()); + print("writableCalendarsToString: " + writableCalendars!.id!); + Event event = await Event( + writableCalendars!.id, + start: scheduleDateTimeUTZ, + end: scheduleDateTimeUTZ.add(Duration(minutes: 30)), + title: title, + description: description, + ); deviceCalendarPlugin.createOrUpdateEvent(event).catchError((e) { print("catchError " + e.toString()); }).whenComplete(() { @@ -90,8 +106,12 @@ class CalendarUtils { }); } - deleteEvent(mcn.Calendar _calendar, Event _event) async { - await deviceCalendarPlugin.deleteEvent(_calendar.id, _event.eventId); + deleteEvent(Calendar _calendar, Event _event) async { + if (Platform.isIOS) { + await _myPlugin.deleteEvent(calendarId: _calendar.id!, eventId: _event.eventId!); + } else { + await deviceCalendarPlugin.deleteEvent(_calendar.id, _event.eventId); + } } Future retrieveEvents(