Merge branch 'development_v3.3' of http://34.17.52.79/Haroon6138/diplomatic-quarter into dev_v3.13.6

# Conflicts:
#	lib/config/config.dart
#	lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart
#	lib/pages/BookAppointment/BookSuccess.dart
#	lib/pages/Covid-DriveThru/covid-payment-summary.dart
#	lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart
#	lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart
#	lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart
#	lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart
#	lib/pages/ErService/OrderLogPage.dart
#	lib/pages/ErService/rapid-response-team/rrt-request-page.dart
#	lib/pages/ToDoList/ToDo.dart
#	lib/pages/livecare/widgets/clinic_list.dart
#	lib/pages/medical/balance/confirm_payment_page.dart
#	lib/services/payfort_services/payfort_service.dart
#	lib/services/payfort_services/payfort_view_model.dart
#	lib/splashPage.dart
#	pubspec.yaml
merge-update-with-lab-changes
Sultan khan 2 years ago
commit a4ed832147

@ -56,6 +56,8 @@ var PHARMACY_REDIRECT_URL = 'https://bit.ly/AlhabibPharmacy';
// RC API URL // RC API URL
var RC_BASE_URL = 'https://rc.hmg.com/'; var RC_BASE_URL = 'https://rc.hmg.com/';
// var RC_BASE_URL = 'https://rc.hmg.com/test/';
// var RC_BASE_URL = 'https://ms.hmg.com/rc/'; // var RC_BASE_URL = 'https://ms.hmg.com/rc/';
var PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; var PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity';
@ -659,8 +661,6 @@ var PLACE_MEAL_PLAN_ORDER = 'Services/MOP.svc/REST/UpdateOrMakeNewOrder';
var CHECK_PATIENT_NPHIES_ELIGIBILITY = 'Services/Doctors.svc/REST/checkPatientInsuranceCompanyValidity'; var CHECK_PATIENT_NPHIES_ELIGIBILITY = 'Services/Doctors.svc/REST/checkPatientInsuranceCompanyValidity';
var CONVERT_PATIENT_TO_CASH = 'Services/Doctors.svc/REST/deActivateInsuranceCompany'; var CONVERT_PATIENT_TO_CASH = 'Services/Doctors.svc/REST/deActivateInsuranceCompany';
//PAYFORT //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 addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse";
@ -669,7 +669,6 @@ var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse";
var payFortEnvironment = FortEnvironment.test; var payFortEnvironment = FortEnvironment.test;
var applePayMerchantId = "merchant.com.hmgwebservices.uat"; var applePayMerchantId = "merchant.com.hmgwebservices.uat";
class AppGlobal { class AppGlobal {
static var context; static var context;

@ -326,7 +326,7 @@ const Map localizedValues = {
"nearester": {"en": "Nearest ER", "ar": "أقرب طوارى"}, "nearester": {"en": "Nearest ER", "ar": "أقرب طوارى"},
"locationa": {"en": "Location", "ar": "الموقع"}, "locationa": {"en": "Location", "ar": "الموقع"},
"call_now": {"en": "Call now", "ar": "اتصل الان"}, "call_now": {"en": "Call now", "ar": "اتصل الان"},
"ambulancerequest": {"en": "Ambulance", "ar": "خدمات النقل "}, "ambulancerequest": {"en": "Ambulance", "ar": "طلب النقل "},
"requestA": {"en": "Request", "ar": "الاسعافي"}, "requestA": {"en": "Request", "ar": "الاسعافي"},
"NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"}, "NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"},
"NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"}, "NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"},
@ -1338,7 +1338,7 @@ const Map localizedValues = {
"covid-alert-header": {"en": "Pay With-in 15 mins to confirm the appointment", "ar": "الرجاء اتمام عملية الدفع خلال 15 دقيقه لتاكيد الموعد"}, "covid-alert-header": {"en": "Pay With-in 15 mins to confirm the appointment", "ar": "الرجاء اتمام عملية الدفع خلال 15 دقيقه لتاكيد الموعد"},
"covid-alert-info": { "covid-alert-info": {
"en": "Payment for Covid-19 Test should Be made with-in 15 mins otherwise The system will Cancel the Scheduled appointment automatically", "en": "Payment for Covid-19 Test should Be made with-in 15 mins otherwise The system will Cancel the Scheduled appointment automatically",
"ar": "سيتم الغاء الموعد عن طريق النظام بشكل الي في حال عدم اتمام عمليه الدفع خلال 15 دقيقة" "ar": "سيتم الغاء الموعد عن طريق النظام بشكل الي في حال عدم اتمام عمليه الدفع خلال 15 دقيقة"
}, },
"covid-alert-mins": {"en": "Pay With-in 15 mins", "ar": "ادفع خلال 15 دقيقة"}, "covid-alert-mins": {"en": "Pay With-in 15 mins", "ar": "ادفع خلال 15 دقيقة"},
"back": {"en": "Back", "ar": "رجوع"}, "back": {"en": "Back", "ar": "رجوع"},
@ -1942,6 +1942,7 @@ const Map localizedValues = {
"habibCallCenter": {"en": "Please contact AlHabib call center to update your insurance manually.", "ar": "يرجى الاتصال بمركز اتصال الحبيب لتحديث التأمين الخاص بك يدوياً."}, "habibCallCenter": {"en": "Please contact AlHabib call center to update your insurance manually.", "ar": "يرجى الاتصال بمركز اتصال الحبيب لتحديث التأمين الخاص بك يدوياً."},
"cashAmountUpdateInsurance": {"en": "Please note that this is the cash amount, If you want to update your insurance, Please tap below:", "ar": "يرجى ملاحظة أن هذا هو المبلغ النقدي، إذا كنت ترغب في تحديث التأمين الخاص بك، يرجى النقر أدناه:"}, "cashAmountUpdateInsurance": {"en": "Please note that this is the cash amount, If you want to update your insurance, Please tap below:", "ar": "يرجى ملاحظة أن هذا هو المبلغ النقدي، إذا كنت ترغب في تحديث التأمين الخاص بك، يرجى النقر أدناه:"},
"validInsurance": {"en": "Do you have a valid insurance?", "ar": "هل لديك تأمين صالح؟"}, "validInsurance": {"en": "Do you have a valid insurance?", "ar": "هل لديك تأمين صالح؟"},
"contactRRT": {"en": "Contact RRT", "ar": "تواصل مع فريق الاستجابة السريعة"},
"checkInViaLocation": {"en": "Check-In Via Location", "ar": "تسجيل الوصول عبر الموقع"}, "checkInViaLocation": {"en": "Check-In Via Location", "ar": "تسجيل الوصول عبر الموقع"},
"locationCheckInError": {"en": "Please make sure that you're within the hospital location to perform online check-in.", "ar": "يرجى التأكد من تواجدك داخل موقع المستشفى لإجراء تسجيل الوصول عبر الإنترنت."}, "locationCheckInError": {"en": "Please make sure that you're within the hospital location to perform online check-in.", "ar": "يرجى التأكد من تواجدك داخل موقع المستشفى لإجراء تسجيل الوصول عبر الإنترنت."},
"onlyAdmitted": {"en": "This service is only available for admitted patients", "ar": "هذه الخدمة متاحة فقط للمرضى المقبولين"}, "onlyAdmitted": {"en": "This service is only available for admitted patients", "ar": "هذه الخدمة متاحة فقط للمرضى المقبولين"},

@ -104,14 +104,6 @@ class _NewHomeHealthCareStepThreePageState extends State<NewHomeHealthCareStepTh
), ),
Container( Container(
height: 200, height: 200,
// child: GoogleMap(
// mapType: MapType.normal,
// markers: markers,
// initialCameraPosition: _kGooglePlex,
// onMapCreated: (GoogleMapController controller) {
// _controller.complete(controller);
// },
// ),
decoration: containerColorRadiusBorderWidth(Colors.transparent, 12,Colors.transparent,0.5), decoration: containerColorRadiusBorderWidth(Colors.transparent, 12,Colors.transparent,0.5),
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
child: Image.network( child: Image.network(

@ -618,23 +618,23 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
applePayInsertRequest.clientRequestID = transID; applePayInsertRequest.clientRequestID = transID;
applePayInsertRequest.clinicID = 0; applePayInsertRequest.clinicID = 0;
applePayInsertRequest.currency = projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR"; applePayInsertRequest.currency = projectViewModel.user.outSA == 1 ? "AED" : "SAR";
// applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress; // applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress;
applePayInsertRequest.customerEmail = "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com"; applePayInsertRequest.customerEmail = "CustID_${projectViewModel.user.patientID}@HMG.com";
applePayInsertRequest.customerID = projectViewModel.authenticatedUserObject.user.patientID; applePayInsertRequest.customerID = projectViewModel.user.patientID;
applePayInsertRequest.customerName = projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user.lastName!; applePayInsertRequest.customerName = projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!;
applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN); applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN);
applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN); applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN);
applePayInsertRequest.doctorID = 0; applePayInsertRequest.doctorID = 0;
applePayInsertRequest.projectID = widget.projectID.toString(); applePayInsertRequest.projectID = widget.projectID.toString();
applePayInsertRequest.serviceID = ServiceTypeEnum.advancePayment.getIdFromServiceEnum().toString(); applePayInsertRequest.serviceID = ServiceTypeEnum.advancePayment.getIdFromServiceEnum().toString();
applePayInsertRequest.channelID = 3; applePayInsertRequest.channelID = 3;
applePayInsertRequest.patientID = projectViewModel.authenticatedUserObject.user.patientID; applePayInsertRequest.patientID = projectViewModel.user.patientID;
applePayInsertRequest.patientTypeID = projectViewModel.authenticatedUserObject.user.patientType; applePayInsertRequest.patientTypeID = projectViewModel.user.patientType;
applePayInsertRequest.patientOutSA = projectViewModel.authenticatedUserObject.user.outSA; applePayInsertRequest.patientOutSA = projectViewModel.user.outSA;
applePayInsertRequest.appointmentDate = null; applePayInsertRequest.appointmentDate = null;
applePayInsertRequest.appointmentNo = 0; applePayInsertRequest.appointmentNo = widget.appoNo;
applePayInsertRequest.orderDescription = "Advance Payment"; applePayInsertRequest.orderDescription = "Ancillary Order Payment";
applePayInsertRequest.liveServiceID = "0"; applePayInsertRequest.liveServiceID = "0";
applePayInsertRequest.latitude = "0.0"; applePayInsertRequest.latitude = "0.0";
applePayInsertRequest.longitude = "0.0"; applePayInsertRequest.longitude = "0.0";
@ -642,7 +642,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
applePayInsertRequest.isSchedule = "0"; applePayInsertRequest.isSchedule = "0";
applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en'; applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en';
applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2; applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2;
applePayInsertRequest.userName = projectViewModel.authenticatedUserObject.user.patientID; applePayInsertRequest.userName = projectViewModel.user.patientID;
applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html"; applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html";
applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html"; applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html";
applePayInsertRequest.paymentOption = "ApplePay"; applePayInsertRequest.paymentOption = "ApplePay";
@ -659,21 +659,21 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
service.applePayInsertRequest(applePayInsertRequest, context).then((res) async { service.applePayInsertRequest(applePayInsertRequest, context).then((res) async {
await context.read<PayfortViewModel>().initiateApplePayWithPayfort( await context.read<PayfortViewModel>().initiateApplePayWithPayfort(
customerName: projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user!.lastName!, customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com", customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "Ancillary Order Payment", orderDescription: "Ancillary Order Payment",
orderAmount: double.parse(getTotalValue()), orderAmount: double.parse(getTotalValue()),
merchantReference: transID, merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR", currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async { onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}"); log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString()); AppToast.showErrorToast(message: failureResult.toString());
}, },
onSuccess: (successResult) async { onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}"); log("Payfort: ${successResult.responseMessage}");
await context.read<PayfortViewModel>().addPayfortApplePayResponse(result: successResult); await context.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
checkPaymentStatus(AppoitmentAllHistoryResultList()); checkPaymentStatus(AppoitmentAllHistoryResultList());
}, },
projectId: widget.projectID, projectId: widget.projectID,

@ -768,24 +768,20 @@ class _BookSuccessState extends State<BookSuccess> {
applePayInsertRequest.clientRequestID = transID; applePayInsertRequest.clientRequestID = transID;
applePayInsertRequest.clinicID = appo.clinicID; applePayInsertRequest.clinicID = appo.clinicID;
applePayInsertRequest.currency = projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR"; applePayInsertRequest.currency = projectViewModel.user.outSA == 1 ? "AED" : "SAR";
// applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress; // applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress;
applePayInsertRequest.customerEmail = "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com"; applePayInsertRequest.customerEmail = "CustID_${projectViewModel.user.patientID}@HMG.com";
applePayInsertRequest.customerID = projectViewModel.authenticatedUserObject.user.patientID; applePayInsertRequest.customerID = projectViewModel.user.patientID;
applePayInsertRequest.customerName = projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel!.authenticatedUserObject.user!.lastName!; applePayInsertRequest.customerName = projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!;
applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN); applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN);
applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN); applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN);
applePayInsertRequest.doctorID = appo.doctorID; applePayInsertRequest.doctorID = appo.doctorID;
applePayInsertRequest.projectID = appo.projectID.toString(); applePayInsertRequest.projectID = appo.projectID.toString();
applePayInsertRequest.serviceID = applePayInsertRequest.serviceID = ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum().toString();
ServiceTypeEnum.advancePayment.getIdFromServiceEnum().toString();
applePayInsertRequest.channelID = 3; applePayInsertRequest.channelID = 3;
applePayInsertRequest.patientID = applePayInsertRequest.patientID = projectViewModel.user.patientID;
projectViewModel.authenticatedUserObject.user.patientID; applePayInsertRequest.patientTypeID = projectViewModel.user.patientType;
applePayInsertRequest.patientTypeID = applePayInsertRequest.patientOutSA = projectViewModel.user.outSA;
projectViewModel.authenticatedUserObject.user.patientType;
applePayInsertRequest.patientOutSA =
projectViewModel.authenticatedUserObject.user.outSA;
applePayInsertRequest.appointmentDate = appo.appointmentDate; applePayInsertRequest.appointmentDate = appo.appointmentDate;
applePayInsertRequest.appointmentNo = appo.appointmentNo; applePayInsertRequest.appointmentNo = appo.appointmentNo;
applePayInsertRequest.orderDescription = "Appointment Payment"; applePayInsertRequest.orderDescription = "Appointment Payment";
@ -797,12 +793,9 @@ class _BookSuccessState extends State<BookSuccess> {
applePayInsertRequest.isSchedule = appo.isLiveCareAppointment! ? "1" : "0"; applePayInsertRequest.isSchedule = appo.isLiveCareAppointment! ? "1" : "0";
applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en'; applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en';
applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2; applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2;
applePayInsertRequest.userName = applePayInsertRequest.userName = projectViewModel.user.patientID;
projectViewModel.authenticatedUserObject.user.patientID; applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html";
applePayInsertRequest.responseContinueURL = applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html";
"http://hmg.com/Documents/success.html";
applePayInsertRequest.backClickUrl =
"http://hmg.com/Documents/success.html";
applePayInsertRequest.paymentOption = "ApplePay"; applePayInsertRequest.paymentOption = "ApplePay";
applePayInsertRequest.isMobSDK = true; applePayInsertRequest.isMobSDK = true;
@ -822,21 +815,21 @@ class _BookSuccessState extends State<BookSuccess> {
service.applePayInsertRequest(applePayInsertRequest, context).then(( service.applePayInsertRequest(applePayInsertRequest, context).then((
res) async { res) async {
await context.read<PayfortViewModel>().initiateApplePayWithPayfort( await context.read<PayfortViewModel>().initiateApplePayWithPayfort(
customerName: projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel!.authenticatedUserObject.user!.lastName!, customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com", customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "Appointment Payment", orderDescription: "Appointment Payment",
orderAmount: double.parse(patientShareResponse.patientShareWithTax.toString()), orderAmount: double.parse(patientShareResponse.patientShareWithTax.toString()),
merchantReference: transID, merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR", currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async { onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}"); log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString()); AppToast.showErrorToast(message: failureResult.toString());
}, },
onSuccess: (successResult) async { onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}"); log("Payfort: ${successResult.responseMessage}");
await context.read<PayfortViewModel>().addPayfortApplePayResponse(result: successResult); await context.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
checkPaymentStatus(appo); checkPaymentStatus(appo);
}, },
projectId: appo.projectID, projectId: appo.projectID,
@ -912,13 +905,13 @@ class _BookSuccessState extends State<BookSuccess> {
onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) {
try { try {
if (selectedPaymentMethod == "TAMARA") { if (selectedPaymentMethod == "TAMARA") {
checkTamaraPaymentStatus(Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), appo); checkTamaraPaymentStatus(transID!, appo);
// if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") { if (tamaraPaymentStatus != null && tamaraPaymentStatus!.toLowerCase() == "approved") {
// updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(selectedInstallments), appo); updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID!, num.parse(selectedInstallments!), appo);
// } else { } else {
// updateTamaraRequestStatus( updateTamaraRequestStatus(
// "Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID != null ? tamaraOrderID : "", num.parse(selectedInstallments), appo); "Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID! != null ? tamaraOrderID! : "", num.parse(selectedInstallments!), appo);
// } }
} else { } else {
checkPaymentStatus(appo); checkPaymentStatus(appo);
} }
@ -954,7 +947,7 @@ class _BookSuccessState extends State<BookSuccess> {
}); });
} }
updateTamaraRequestStatus(String responseMessage, String status, String clientRequestID, String tamaraOrderID, int selectedInstallments, AppoitmentAllHistoryResultList appo) { updateTamaraRequestStatus(String responseMessage, String status, String clientRequestID, String tamaraOrderID, num selectedInstallments, AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
try { try {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();

@ -31,7 +31,6 @@ class CovidPaymentSummary extends StatefulWidget {
MyInAppBrowser? browser; MyInAppBrowser? browser;
AuthenticatedUser? authenticatedUser; AuthenticatedUser? authenticatedUser;
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
String transID = "";
CovidPaymentSummary({required this.patientShareResponse, required this.selectedPaymentMethod}); CovidPaymentSummary({required this.patientShareResponse, required this.selectedPaymentMethod});
@ -44,6 +43,8 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
late String tamaraPaymentStatus; late String tamaraPaymentStatus;
late String tamaraOrderID; late String tamaraOrderID;
String transID = "";
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
@ -216,11 +217,11 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async { openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async {
widget.browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context); widget.browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context);
transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo);
widget.browser!.openPaymentBrowser( widget.browser!.openPaymentBrowser(
amount, amount,
"Covid appointment payment", "Covid appointment payment",
Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo),
appo.projectID.toString(), appo.projectID.toString(),
authenticatedUser.emailAddress!, authenticatedUser.emailAddress!,
paymentMethod, paymentMethod,
@ -232,13 +233,11 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
widget.patientShareResponse!.isLiveCareAppointment!, widget.patientShareResponse!.isLiveCareAppointment!,
"2", "2",
"", "",
AppGlobal.context,
widget.patientShareResponse!.appointmentDate, widget.patientShareResponse!.appointmentDate,
widget.patientShareResponse!.appointmentNo!, widget.patientShareResponse!.appointmentNo,
widget.patientShareResponse!.clinicID!, widget.patientShareResponse!.clinicID,
widget.patientShareResponse!.doctorID!, widget.patientShareResponse!.doctorID,
widget.selectedInstallmentPlan, widget.selectedInstallmentPlan);
);
} }
onBrowserLoadStart(String url) { onBrowserLoadStart(String url) {
@ -278,7 +277,8 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
print("onBrowserExit Called!!!!"); print("onBrowserExit Called!!!!");
try { try {
if (widget.selectedPaymentMethod == "TAMARA") { if (widget.selectedPaymentMethod == "TAMARA") {
checkTamaraPaymentStatus(Utils.getAppointmentTransID(appo.projectID!!, appo.clinicID!, appo.appointmentNo!), appo); // checkTamaraPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), appo);
checkTamaraPaymentStatus(transID, appo);
// if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") { // if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") {
// updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(widget.selectedInstallmentPlan), appo); // updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(widget.selectedInstallmentPlan), appo);
// } else { // } else {
@ -301,8 +301,8 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
if (res["status"].toString().toLowerCase() == "success") { if (res["status"].toString().toLowerCase() == "success") {
updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID, int.parse(widget.selectedInstallmentPlan!), appo); updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID, int.parse(widget.selectedInstallmentPlan!), appo);
} else { } else {
updateTamaraRequestStatus("Failed", "00", Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), tamaraOrderID != null ? tamaraOrderID : "", updateTamaraRequestStatus("Failed", "00", transID, tamaraOrderID != null ? tamaraOrderID : "",
int.parse(widget.selectedInstallmentPlan!), appo); num.parse(widget.selectedInstallmentPlan!), appo);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -320,7 +320,7 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
}); });
} }
updateTamaraRequestStatus(String responseMessage, String status, String clientRequestID, String tamaraOrderID, int selectedInstallments, AppoitmentAllHistoryResultList appo) { updateTamaraRequestStatus(String responseMessage, String status, String clientRequestID, String tamaraOrderID, num selectedInstallments, AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
try { try {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
@ -378,7 +378,7 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
checkPaymentStatus(AppoitmentAllHistoryResultList appo) { checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), false, context).then((res) { service.checkPaymentStatus(transID, false, context).then((res) {
print("Printing Payment Status Reponse!!!!"); print("Printing Payment Status Reponse!!!!");
print(res); print(res);
String paymentInfo = res['Response_Message']; String paymentInfo = res['Response_Message'];

@ -495,6 +495,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
_vitalSignService.weightKg = ""; _vitalSignService.weightKg = "";
Provider.of<ProjectViewModel>(context, listen: false).user = result.list; Provider.of<ProjectViewModel>(context, listen: false).user = result.list;
Provider.of<ProjectViewModel>(context, listen: false).setUser(result.list); Provider.of<ProjectViewModel>(context, listen: false).setUser(result.list);
Provider.of<ProjectViewModel>(context, listen: false).authenticatedUserObject.user = result.list;
try { try {
// await appointmentRateViewModel.getIsLastAppointmentRatedList(); // await appointmentRateViewModel.getIsLastAppointmentRatedList();

@ -219,10 +219,13 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
TranslationBase.of(context).pickupLocation + ": ", TranslationBase.of(context).pickupLocation + ": ",
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
), ),
Text( Container(
width: MediaQuery.of(context).size.width * 0.7,
child: Text(
order.pickupLocation!.trim().toString(), order.pickupLocation!.trim().toString(),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48),
), ),
),
], ],
), ),
], ],
@ -352,12 +355,13 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
patientER_RC: _patientER_RC, patientER_RC: _patientER_RC,
amRequestViewModel: widget.amRequestViewModel, amRequestViewModel: widget.amRequestViewModel,
), ),
BillAmount( Container(),
changeCurrentTab: _changeCurrentTab, // BillAmount(
patientER: _patientER, // changeCurrentTab: _changeCurrentTab,
patientER_RC: _patientER_RC, // patientER: _patientER,
amRequestViewModel: widget.amRequestViewModel, // patientER_RC: _patientER_RC,
), // amRequestViewModel: widget.amRequestViewModel,
// ),
Summary( Summary(
changeCurrentTab: _changeCurrentTab, changeCurrentTab: _changeCurrentTab,
patientER: _patientER, patientER: _patientER,

@ -6,12 +6,14 @@ import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.da
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/ambulanceRequest/locationDetails.dart'; import 'package:diplomaticquarterapp/models/ambulanceRequest/locationDetails.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/ProgressDialog.dart'; import 'package:diplomaticquarterapp/uitl/ProgressDialog.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart';
@ -496,10 +498,36 @@ class _PickupLocationState extends State<PickupLocation> {
), ),
], ],
), ),
SizedBox( // SizedBox(
height: 45, // height: 45,
// ),
// if (myAppointment != null)
// SizedBox(
// height: 100,
// ),
Container(
margin: EdgeInsets.only(top: 12),
decoration: cardRadius(12),
padding: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(TranslationBase.of(context).billAmount + " : ", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
SizedBox(height: 16.0),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
Text(
TranslationBase.of(context).sar + (widget.patientER_RC.transportationDetails!.tripType == 1 ? ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}' : ' ${(widget.patientER_RC.patientERTransportationMethod!.priceTotal * 2)}'),
style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold),
),
],
)
],
),
), ),
if (myAppointment != null)
SizedBox( SizedBox(
height: 100, height: 100,
), ),
@ -510,6 +538,20 @@ class _PickupLocationState extends State<PickupLocation> {
bottomSheet: Container( bottomSheet: Container(
color: Theme.of(context).scaffoldBackgroundColor, color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12.0), padding: EdgeInsets.all(12.0),
child: Row(
children: [
Expanded(
flex: 1,
child: DefaultButton(
TranslationBase.of(context).back,
() {
widget.changeCurrentTab(0);
},
),
),
SizedBox(width: 12.0),
Expanded(
flex: 1,
child: DefaultButton( child: DefaultButton(
TranslationBase.of(context).next, TranslationBase.of(context).next,
() { () {
@ -563,9 +605,18 @@ class _PickupLocationState extends State<PickupLocation> {
} }
widget.patientER_RC.transportationDetails!.pickupSpot = _isInsideHome ? 1 : 0; widget.patientER_RC.transportationDetails!.pickupSpot = _isInsideHome ? 1 : 0;
widget.changeCurrentTab(2);
widget.patientER_RC.transportationDetails!.ambulate = 3;
widget.patientER_RC.transportationDetails!.ambulateTitle = "none";
widget.patientER_RC.transportationDetails!.notes = "";
widget.changeCurrentTab(3);
}); });
}, },
color: CustomColors.green,
),
),
],
), ),
), ),
); );

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart'; import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
@ -13,6 +14,7 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
enum Direction { ToHospital, FromHospital } enum Direction { ToHospital, FromHospital }
enum Way { OneWay, TwoWays } enum Way { OneWay, TwoWays }
class SelectTransportationMethod extends StatefulWidget { class SelectTransportationMethod extends StatefulWidget {
@ -122,7 +124,7 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
Expanded( Expanded(
flex: 1, flex: 1,
child: Text( child: Text(
TranslationBase.of(context).sar + ' ${widget.amRequestViewModel.amRequestModeList[index].price}', TranslationBase.of(context).sar + ' ${widget.amRequestViewModel.amRequestModeList[index].priceTotal}',
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
letterSpacing: -0.48, letterSpacing: -0.48,
@ -231,7 +233,6 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
height: 5, height: 5,
), ),
Container( Container(
margin: EdgeInsets.only(bottom: 65),
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
@ -288,12 +289,14 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
}); });
}, },
), ),
Text(TranslationBase.of(context).twoDirec, Text(
TranslationBase.of(context).twoDirec,
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
letterSpacing: -0.48, letterSpacing: -0.48,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
)), ),
),
], ],
), ),
), ),
@ -303,13 +306,36 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
], ],
), ),
), ),
SizedBox( // SizedBox(
height: 30, // height: 30,
// ),
],
),
Container(
margin: EdgeInsets.only(top: 12),
decoration: cardRadius(12),
padding: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(TranslationBase.of(context).billAmount + " : ", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
SizedBox(height: 16.0),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
Text(
TranslationBase.of(context).sar + (_way == Way.OneWay ? ' ${_erTransportationMethod.priceTotal}' : ' ${(_erTransportationMethod.priceTotal * 2)}'),
style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold),
), ),
], ],
)
],
),
), ),
SizedBox( SizedBox(
height: 15, height: 100,
), ),
], ],
), ),
@ -318,6 +344,19 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
bottomSheet: Container( bottomSheet: Container(
color: Theme.of(context).scaffoldBackgroundColor, color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12.0), padding: EdgeInsets.all(12.0),
child: Row(
children: [
Expanded(
flex: 1,
child: DefaultButton(
TranslationBase.of(context).back,
() {
Navigator.pop(context);
},
)),
SizedBox(width: 12.0),
Expanded(
flex: 1,
child: DefaultButton( child: DefaultButton(
TranslationBase.of(context).next, TranslationBase.of(context).next,
() { () {
@ -350,6 +389,10 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
widget.changeCurrentTab(1); widget.changeCurrentTab(1);
}); });
}, },
color: CustomColors.green,
),
),
],
), ),
), ),
); );

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
@ -9,6 +10,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
class Summary extends StatefulWidget { class Summary extends StatefulWidget {
final Function(int)? changeCurrentTab; final Function(int)? changeCurrentTab;
@ -87,48 +89,89 @@ class _SummaryState extends State<Summary> {
SizedBox( SizedBox(
height: 8, height: 8,
), ),
_getNormalText(TranslationBase.of(context).selectAmbulate), _getNormalText(TranslationBase.of(context).way),
_getNormalText( _getNormalText(
'${widget.patientER_RC.transportationDetails!.ambulateTitle}', widget.patientER_RC.transportationDetails!.tripType == 0 ? TranslationBase.of(context).twoDirec : TranslationBase.of(context).oneDirec,
isBold: true,
),
SizedBox(
height: 8,
),
_getNormalText(TranslationBase.of(context).notes),
_getNormalText(
'${widget.patientER_RC.transportationDetails!.notes ?? '---'}',
isBold: true, isBold: true,
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
// // _getNormalText(TranslationBase.of(context).notes),
// // _getNormalText(
// // '${widget.patientER_RC.transportationDetails.notes ?? '---'}',
// // isBold: true,
// // ),
// SizedBox(
// height: 8,
// ),
], ],
), ),
), ),
SizedBox( // SizedBox(
height: 20, // height: 20,
// ),
// Text(TranslationBase.of(context).billAmount, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
// SizedBox(
// height: 5,
// ),
Container(
margin: EdgeInsets.only(top: 12),
decoration: cardRadius(12),
padding: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(TranslationBase.of(context).billAmount + " : ", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
SizedBox(height: 16.0),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
Text(
TranslationBase.of(context).sar +
(widget.patientER_RC.transportationDetails!.tripType == 1
? ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}'
: ' ${(widget.patientER_RC.patientERTransportationMethod!.priceTotal * 2)}'),
style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold),
),
],
)
],
), ),
Text(TranslationBase.of(context).billAmount, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
SizedBox(
height: 5,
), ),
Container( Container(
height: 55, margin: EdgeInsets.only(top: 12),
padding: EdgeInsets.all(10),
decoration: cardRadius(12), decoration: cardRadius(12),
padding: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(TranslationBase.of(context).contactRRT + " : ", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
SizedBox(height: 16.0),
InkWell(
onTap: () {
launchUrl(
Uri.parse("tel://0115259555"),
);
},
child: Row( child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
_getNormalText(TranslationBase.of(context).patientShareTotal + ':'), Text("0115259555", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold)),
Container( Icon(
padding: EdgeInsets.only(left: 20.0, right: 20.0), Icons.headset_mic_rounded,
child: _getNormalText(TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}', isBold: true, isTotal: true) size: 30.0,
)
],
), ),
)
], ],
), ),
), ),
SizedBox(height: 50), SizedBox(height: 80),
], ],
), ),
), ),
@ -136,11 +179,30 @@ class _SummaryState extends State<Summary> {
bottomSheet: Container( bottomSheet: Container(
color: Theme.of(context).scaffoldBackgroundColor, color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12.0), padding: EdgeInsets.all(12.0),
child: DefaultButton(TranslationBase.of(context).send, () async { child: Row(
children: [
Expanded(
flex: 1,
child: DefaultButton(
TranslationBase.of(context).back,
() {
widget.changeCurrentTab!(1);
},
),
),
SizedBox(width: 12.0),
Expanded(
flex: 1,
child: DefaultButton(
TranslationBase.of(context).submit,
() async {
await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER_RC); await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER_RC);
widget.tabController.animateTo(1); },
color: CustomColors.green,
}), ),
),
],
),
), ),
); );
} }

@ -202,9 +202,12 @@ class OrderLogPage extends StatelessWidget {
TranslationBase.of(context).pickupLocation + ": ", TranslationBase.of(context).pickupLocation + ": ",
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
), ),
Text( Container(
width: MediaQuery.of(context).size.width * 0.7,
child: Text(
order.pickupLocation!.trim().toString(), order.pickupLocation!.trim().toString(),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, overflow: TextOverflow.clip),
),
), ),
], ],
), ),

@ -173,22 +173,122 @@ class RRTRequestPageState extends State<RRTRequestPage> {
String amount = selectedProcedure.patientShare.toString(); String amount = selectedProcedure.patientShare.toString();
String vat = selectedProcedure.patientTaxAmount.toString(); String vat = selectedProcedure.patientTaxAmount.toString();
String total = selectedProcedure.patientShareWithTax.toString(); String total = selectedProcedure.patientShareWithTax.toString();
return Column( return Container(
crossAxisAlignment: CrossAxisAlignment.stretch, decoration: cardRadius(12),
padding: EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Text(
height: 30, TranslationBase.of(context).billAmount,
decoration: BoxDecoration(color: Theme.of(context).appBarTheme.backgroundColor, borderRadius: BorderRadius.only(topLeft: radius, topRight: radius)), textAlign: TextAlign.center,
child: Center(child: Text(TranslationBase.of(context).approximateServiceFee, style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w500, letterSpacing: 1))), style: TextStyle(
), fontSize: 16.0,
pricingRow(label: TranslationBase.of(context).patientShare, value: '$amount ${TranslationBase.of(context).sar}'), fontWeight: FontWeight.w600,
Container(height: 0.5, color: Theme.of(context).appBarTheme.backgroundColor), letterSpacing: -0.64,
pricingRow(label: TranslationBase.of(context).patientTaxToDo, value: '$vat ${TranslationBase.of(context).sar}'), ),
Container(height: 0.5, color: Theme.of(context).appBarTheme.backgroundColor), ),
pricingRow(label: TranslationBase.of(context).patientShareWithTax, value: '$total ${TranslationBase.of(context).sar}', labelBold: true), mHeight(10),
Container(height: 0.5, color: Theme.of(context).appBarTheme.backgroundColor), Row(
children: [
Expanded(
child: Text(
TranslationBase.of(context).patientShareToDo,
style: TextStyle(
fontSize: 10,
letterSpacing: -0.4,
color: CustomColors.textColor,
fontWeight: FontWeight.w600,
),
),
),
Expanded(
child: Text(
'$amount ${TranslationBase.of(context).sar}',
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
),
],
),
mHeight(4),
mDivider(CustomColors.lightGreyColor),
mHeight(4),
Row(
children: [
Expanded(
child: Text(
TranslationBase.of(context).patientTaxToDo,
style: TextStyle(
fontSize: 10,
letterSpacing: -0.4,
color: CustomColors.textColor,
fontWeight: FontWeight.w600,
),
),
),
Expanded(
child: Text(
'$vat ${TranslationBase.of(context).sar}',
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
),
], ],
),
mHeight(4),
mDivider(CustomColors.lightGreyColor),
mHeight(4),
Row(
children: [
Expanded(
child: Text(
TranslationBase.of(context).patientShareTotalToDo,
style: TextStyle(
fontSize: 14,
letterSpacing: -0.4,
color: CustomColors.textColor,
fontWeight: FontWeight.bold,
),
),
),
Expanded(
child: Text(
'$total ${TranslationBase.of(context).sar}',
style: TextStyle(
fontSize: 14,
letterSpacing: -0.48,
fontWeight: FontWeight.bold,
),
),
),
],
),
],
),
); );
// Column(
// crossAxisAlignment: CrossAxisAlignment.stretch,
// children: [
// Container(
// height: 30,
// decoration: BoxDecoration(color: Theme.of(context).appBarTheme.color, borderRadius: BorderRadius.only(topLeft: radius, topRight: radius)),
// child: Center(child: Text(TranslationBase.of(context).approximateServiceFee, style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w500, letterSpacing: 1))),
// ),
// pricingRow(label: TranslationBase.of(context).patientShare, value: '$amount ${TranslationBase.of(context).sar}'),
// Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
// pricingRow(label: TranslationBase.of(context).patientTaxToDo, value: '$vat ${TranslationBase.of(context).sar}'),
// Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
// pricingRow(label: TranslationBase.of(context).patientShareWithTax, value: '$total ${TranslationBase.of(context).sar}', labelBold: true),
// Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
// ],
// );
} }
Widget pricingRow({required String label, required String value, bool labelBold = false, bool valueBold = false}) { Widget pricingRow({required String label, required String value, bool labelBold = false, bool valueBold = false}) {

@ -45,21 +45,21 @@ class StepsWidget extends StatelessWidget {
: CustomColors.grey2, : CustomColors.grey2,
), ),
), ),
Expanded( // Expanded(
child: showProgress( // child: showProgress(
title: TranslationBase.of(context).otherInfo, // title: TranslationBase.of(context).otherInfo,
status: index == 2 // status: index == 2
? TranslationBase.of(context).inPrgress // ? TranslationBase.of(context).inPrgress
: index > 2 // : index > 2
? TranslationBase.of(context).completed // ? TranslationBase.of(context).completed
: TranslationBase.of(context).locked, // : TranslationBase.of(context).locked,
color: index == 2 // color: index == 2
? CustomColors.orange // ? CustomColors.orange
: index > 2 // : index > 2
? CustomColors.green // ? CustomColors.green
: CustomColors.grey2, // : CustomColors.grey2,
), // ),
), // ),
showProgress( showProgress(
title: TranslationBase.of(context).RRTSummary, title: TranslationBase.of(context).RRTSummary,
status: index == 3 ? TranslationBase.of(context).inPrgress : TranslationBase.of(context).locked, status: index == 3 ? TranslationBase.of(context).inPrgress : TranslationBase.of(context).locked,

@ -1155,7 +1155,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) {
print("onBrowserExit Called!!!!"); print("onBrowserExit Called!!!!");
if (selectedPaymentMethod == "TAMARA") { if (selectedPaymentMethod == "TAMARA") {
checkTamaraPaymentStatus(Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), appo); checkTamaraPaymentStatus(transID!, appo);
// if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") { // if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") {
// updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(selectedInstallments), appo); // updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(selectedInstallments), appo);
// } else { // } else {
@ -1174,8 +1174,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
if (res["status"].toString().toLowerCase() == "success") { if (res["status"].toString().toLowerCase() == "success") {
updateTamaraRequestStatus("success", "14", orderID, res["tamara_order_id"], int.parse(selectedInstallments!), appo); updateTamaraRequestStatus("success", "14", orderID, res["tamara_order_id"], int.parse(selectedInstallments!), appo);
} else { } else {
updateTamaraRequestStatus( updateTamaraRequestStatus("Failed", "00", transID!, tamaraOrderID != null ? tamaraOrderID : "", int.parse(selectedInstallments), appo);
"Failed", "00", Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), tamaraOrderID != null ? tamaraOrderID : "", int.parse(selectedInstallments!), appo);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -1309,10 +1308,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
addVIDARequestInsert(String advanceNumber, String paymentReference, AppoitmentAllHistoryResultList appo) { addVIDARequestInsert(String advanceNumber, String paymentReference, AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service.insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, appo.serviceID, appo.doctorID, appo.appointmentDate!, transID!, projectViewModel.isArabic ? 1 : 2, context).then((res) {
.insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, appo.serviceID, appo.doctorID, appo.appointmentDate!,
transID!, projectViewModel.isArabic ? 1 : 2, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
getPatientAppointmentHistory(); getPatientAppointmentHistory();
}).catchError((err) { }).catchError((err) {
@ -1367,20 +1363,20 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
applePayInsertRequest.clientRequestID = transID; applePayInsertRequest.clientRequestID = transID;
applePayInsertRequest.clinicID = appo.clinicID; applePayInsertRequest.clinicID = appo.clinicID;
applePayInsertRequest.currency = projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR"; applePayInsertRequest.currency = projectViewModel.user.outSA == 1 ? "AED" : "SAR";
// applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress; // applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress;
applePayInsertRequest.customerEmail = "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com"; applePayInsertRequest.customerEmail = "CustID_${projectViewModel.user.patientID}@HMG.com";
applePayInsertRequest.customerID = projectViewModel.authenticatedUserObject.user.patientID; applePayInsertRequest.customerID = projectViewModel.user.patientID;
applePayInsertRequest.customerName = projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user!.lastName!; applePayInsertRequest.customerName = projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!;
applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN); applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN);
applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN); applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN);
applePayInsertRequest.doctorID = appo.doctorID; applePayInsertRequest.doctorID = appo.doctorID;
applePayInsertRequest.projectID = appo.projectID.toString(); applePayInsertRequest.projectID = appo.projectID.toString();
applePayInsertRequest.serviceID = ServiceTypeEnum.advancePayment.getIdFromServiceEnum().toString(); applePayInsertRequest.serviceID = ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum().toString();
applePayInsertRequest.channelID = 3; applePayInsertRequest.channelID = 3;
applePayInsertRequest.patientID = projectViewModel.authenticatedUserObject.user.patientID; applePayInsertRequest.patientID = projectViewModel.user.patientID;
applePayInsertRequest.patientTypeID = projectViewModel.authenticatedUserObject.user.patientType; applePayInsertRequest.patientTypeID = projectViewModel.user.patientType;
applePayInsertRequest.patientOutSA = projectViewModel.authenticatedUserObject.user.outSA; applePayInsertRequest.patientOutSA = projectViewModel.user.outSA;
applePayInsertRequest.appointmentDate = appo.appointmentDate; applePayInsertRequest.appointmentDate = appo.appointmentDate;
applePayInsertRequest.appointmentNo = appo.appointmentNo; applePayInsertRequest.appointmentNo = appo.appointmentNo;
applePayInsertRequest.orderDescription = "Appointment Payment"; applePayInsertRequest.orderDescription = "Appointment Payment";
@ -1391,7 +1387,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
applePayInsertRequest.isSchedule = appo.isLiveCareAppointment! ? "1" : "0"; applePayInsertRequest.isSchedule = appo.isLiveCareAppointment! ? "1" : "0";
applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en'; applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en';
applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2; applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2;
applePayInsertRequest.userName = projectViewModel.authenticatedUserObject.user.patientID; applePayInsertRequest.userName = projectViewModel.user.patientID;
applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html"; applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html";
applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html"; applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html";
applePayInsertRequest.paymentOption = "ApplePay"; applePayInsertRequest.paymentOption = "ApplePay";
@ -1408,21 +1404,21 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
service.applePayInsertRequest(applePayInsertRequest, context).then((res) async { service.applePayInsertRequest(applePayInsertRequest, context).then((res) async {
await context.read<PayfortViewModel>().initiateApplePayWithPayfort( await context.read<PayfortViewModel>().initiateApplePayWithPayfort(
customerName: projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user.lastName!, customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com", customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "Appointment Payment", orderDescription: "Appointment Payment",
orderAmount: double.parse(patientShareResponse.patientShareWithTax.toString()), orderAmount: double.parse(patientShareResponse.patientShareWithTax.toString()),
merchantReference: transID, merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR", currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async { onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}"); log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString()); AppToast.showErrorToast(message: failureResult.toString());
}, },
onSuccess: (successResult) async { onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}"); log("Payfort: ${successResult.responseMessage}");
await context.read<PayfortViewModel>().addPayfortApplePayResponse(result: successResult); await context.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
checkPaymentStatus(appo); checkPaymentStatus(appo);
}, },
projectId: appo.projectID, projectId: appo.projectID,

@ -370,20 +370,20 @@ class _clinic_listState extends State<ClinicList> {
applePayInsertRequest.clientRequestID = transID; applePayInsertRequest.clientRequestID = transID;
applePayInsertRequest.clinicID = appo.clinicID; applePayInsertRequest.clinicID = appo.clinicID;
applePayInsertRequest.currency = projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR"; applePayInsertRequest.currency = projectViewModel.user.outSA == 1 ? "AED" : "SAR";
// applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress; // applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress;
applePayInsertRequest.customerEmail = "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com"; applePayInsertRequest.customerEmail = "CustID_${projectViewModel.user.patientID}@HMG.com";
applePayInsertRequest.customerID = projectViewModel.authenticatedUserObject.user.patientID; applePayInsertRequest.customerID = projectViewModel.user.patientID;
applePayInsertRequest.customerName = projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user.lastName!; applePayInsertRequest.customerName = projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!;
applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN); applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN);
applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN); applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN);
applePayInsertRequest.doctorID = appo.doctorID; applePayInsertRequest.doctorID = appo.doctorID;
applePayInsertRequest.projectID = appo.projectID.toString(); applePayInsertRequest.projectID = appo.projectID.toString();
applePayInsertRequest.serviceID = ServiceTypeEnum.liveCareAppointment.getIdFromServiceEnum().toString(); applePayInsertRequest.serviceID = ServiceTypeEnum.liveCareAppointment.getIdFromServiceEnum().toString();
applePayInsertRequest.channelID = 3; applePayInsertRequest.channelID = 3;
applePayInsertRequest.patientID = projectViewModel.authenticatedUserObject.user.patientID; applePayInsertRequest.patientID = projectViewModel.user.patientID;
applePayInsertRequest.patientTypeID = projectViewModel.authenticatedUserObject.user.patientType; applePayInsertRequest.patientTypeID = projectViewModel.user.patientType;
applePayInsertRequest.patientOutSA = projectViewModel.authenticatedUserObject.user.outSA; applePayInsertRequest.patientOutSA = projectViewModel.user.outSA;
applePayInsertRequest.appointmentDate = appo.appointmentDate; applePayInsertRequest.appointmentDate = appo.appointmentDate;
applePayInsertRequest.appointmentNo = appo.appointmentNo; applePayInsertRequest.appointmentNo = appo.appointmentNo;
applePayInsertRequest.orderDescription = "LiveCare Payment"; applePayInsertRequest.orderDescription = "LiveCare Payment";
@ -394,7 +394,7 @@ class _clinic_listState extends State<ClinicList> {
applePayInsertRequest.isSchedule = appo.isLiveCareAppointment! ? "1" : "0"; applePayInsertRequest.isSchedule = appo.isLiveCareAppointment! ? "1" : "0";
applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en'; applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en';
applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2; applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2;
applePayInsertRequest.userName = projectViewModel.authenticatedUserObject.user.patientID; applePayInsertRequest.userName = projectViewModel.user.patientID;
applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html"; applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html";
applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html"; applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html";
applePayInsertRequest.paymentOption = "ApplePay"; applePayInsertRequest.paymentOption = "ApplePay";
@ -411,14 +411,14 @@ class _clinic_listState extends State<ClinicList> {
service.applePayInsertRequest(applePayInsertRequest, localContext!).then((res) async { service.applePayInsertRequest(applePayInsertRequest, localContext!).then((res) async {
await localContext!.read<PayfortViewModel>().initiateApplePayWithPayfort( await localContext!.read<PayfortViewModel>().initiateApplePayWithPayfort(
customerName: projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject!.user.lastName!, customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com", customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "LiveCare Payment", orderDescription: "LiveCare Payment",
orderAmount: double.parse(amount), orderAmount: double.parse(amount),
merchantReference: transID, merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR", currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async { onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}"); log("failureResult: ${failureResult.toString()}");
GifLoaderDialogUtils.hideDialog(localContext!); GifLoaderDialogUtils.hideDialog(localContext!);
@ -427,7 +427,7 @@ class _clinic_listState extends State<ClinicList> {
onSuccess: (successResult) async { onSuccess: (successResult) async {
GifLoaderDialogUtils.hideDialog(localContext!); GifLoaderDialogUtils.hideDialog(localContext!);
log("Payfort: ${successResult.responseMessage}"); log("Payfort: ${successResult.responseMessage}");
await localContext!.read<PayfortViewModel>().addPayfortApplePayResponse(result: successResult); await localContext!.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
checkPaymentStatus(appo); checkPaymentStatus(appo);
}, },
projectId: appo.projectID, projectId: appo.projectID,
@ -515,8 +515,7 @@ class _clinic_listState extends State<ClinicList> {
if (res["status"].toString().toLowerCase() == "success") { if (res["status"].toString().toLowerCase() == "success") {
updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID, int.parse(selectedInstallmentPlan), appo); updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID, int.parse(selectedInstallmentPlan), appo);
} else { } else {
updateTamaraRequestStatus( updateTamaraRequestStatus("Failed", "00", transID!, tamaraOrderID != null ? tamaraOrderID : "", num.parse(selectedInstallmentPlan), appo);
"Failed", "00", transID!, tamaraOrderID != null ? tamaraOrderID : "", num.parse(selectedInstallmentPlan), appo);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);

@ -76,12 +76,19 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
Navigator.pop(context, true); Navigator.pop(context, true);
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.projectID = widget.patientInfoAndMobileNumber!.projectID; appo.projectID = widget.patientInfoAndMobileNumber!.projectID;
// if (widget.selectedPaymentMethod == "ApplePay") {
// startApplePay(); if (widget.selectedPaymentMethod == "ApplePay") {
// } else { if (projectViewModel.havePrivilege(103)) {
projectViewModel.analytics.advancePayments.payment_otp_confirmation(method: widget.selectedPaymentMethod!.toLowerCase(), type: 'wallet'); startApplePay();
} else {
openPayment(widget.selectedPaymentMethod!, widget.authenticatedUser!, double.parse(widget.advanceModel!.amount!), AppoitmentAllHistoryResultList()); openPayment(widget.selectedPaymentMethod!, widget.authenticatedUser!, double.parse(widget.advanceModel!.amount!), AppoitmentAllHistoryResultList());
// } }
} else {
openPayment(widget.selectedPaymentMethod!, widget.authenticatedUser!, double.parse(widget.advanceModel!.amount!), AppoitmentAllHistoryResultList());
}
projectViewModel.analytics.advancePayments.payment_otp_confirmation(method: widget.selectedPaymentMethod!.toLowerCase(), type: 'wallet');
// openPayment(widget.selectedPaymentMethod, widget.authenticatedUser, double.parse(widget.advanceModel.amount), null);
}); });
} }
@ -273,16 +280,16 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
applePayInsertRequest.clinicID = 0; applePayInsertRequest.clinicID = 0;
applePayInsertRequest.currency = projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR"; applePayInsertRequest.currency = projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR";
// applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress; // applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress;
applePayInsertRequest.customerEmail = "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com"; applePayInsertRequest.customerEmail = "CustID_${widget.advanceModel!.fileNumber}@HMG.com";
applePayInsertRequest.customerID = projectViewModel.authenticatedUserObject.user.patientID; applePayInsertRequest.customerID = widget.advanceModel!.fileNumber;
applePayInsertRequest.customerName = projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject!.user.lastName!; applePayInsertRequest.customerName = projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user.lastName!;
applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN); applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN);
applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN); applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN);
applePayInsertRequest.doctorID = 0; applePayInsertRequest.doctorID = 0;
applePayInsertRequest.projectID = widget.advanceModel!.hospitalsModel!.iD.toString(); applePayInsertRequest.projectID = widget.advanceModel!.hospitalsModel!.iD.toString();
applePayInsertRequest.serviceID = ServiceTypeEnum.advancePayment.getIdFromServiceEnum().toString(); applePayInsertRequest.serviceID = ServiceTypeEnum.advancePayment.getIdFromServiceEnum().toString();
applePayInsertRequest.channelID = 3; applePayInsertRequest.channelID = 3;
applePayInsertRequest.patientID = projectViewModel.authenticatedUserObject.user.patientID; applePayInsertRequest.patientID = widget.advanceModel!.fileNumber;
applePayInsertRequest.patientTypeID = projectViewModel.authenticatedUserObject.user.patientType; applePayInsertRequest.patientTypeID = projectViewModel.authenticatedUserObject.user.patientType;
applePayInsertRequest.patientOutSA = projectViewModel.authenticatedUserObject.user.outSA; applePayInsertRequest.patientOutSA = projectViewModel.authenticatedUserObject.user.outSA;
applePayInsertRequest.appointmentDate = null; applePayInsertRequest.appointmentDate = null;
@ -295,7 +302,7 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
applePayInsertRequest.isSchedule = "0"; applePayInsertRequest.isSchedule = "0";
applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en'; applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en';
applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2; applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2;
applePayInsertRequest.userName = projectViewModel.authenticatedUserObject.user.patientID; applePayInsertRequest.userName = int.parse(widget.advanceModel!.fileNumber!);
applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html"; applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html";
applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html"; applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html";
applePayInsertRequest.paymentOption = "ApplePay"; applePayInsertRequest.paymentOption = "ApplePay";
@ -314,7 +321,7 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
await context.read<PayfortViewModel>().initiateApplePayWithPayfort( await context.read<PayfortViewModel>().initiateApplePayWithPayfort(
customerName: projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user!.lastName!, customerName: projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user!.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com", customerEmail: "CustID_${widget.advanceModel!.fileNumber}@HMG.com",
orderDescription: "Advance Payment", orderDescription: "Advance Payment",
orderAmount: double.parse(widget.advanceModel!.amount!), orderAmount: double.parse(widget.advanceModel!.amount!),
merchantReference: transID, merchantReference: transID,
@ -326,7 +333,7 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
}, },
onSuccess: (successResult) async { onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}"); log("Payfort: ${successResult.responseMessage}");
await context.read<PayfortViewModel>().addPayfortApplePayResponse(result: successResult); await context.read<PayfortViewModel>().addPayfortApplePayResponse(int.parse(widget.advanceModel!.fileNumber!), result: successResult);
checkPaymentStatus(AppoitmentAllHistoryResultList()); checkPaymentStatus(AppoitmentAllHistoryResultList());
}, },
projectId: widget.advanceModel!.hospitalsModel!.iD, projectId: widget.advanceModel!.hospitalsModel!.iD,

@ -39,7 +39,7 @@ class PayfortService extends BaseService {
return payfortProjectDetailsRespModel; return payfortProjectDetailsRespModel;
} }
Future<void> addPayfortApplePayResponse({PayFortResult? result}) async { Future<void> addPayfortApplePayResponse(num patientID, {PayFortResult? result}) async {
Map<String, dynamic> body = { Map<String, dynamic> body = {
"Fort_id": result!.fortId, "Fort_id": result!.fortId,
"CommandType": result!.command, "CommandType": result!.command,
@ -56,6 +56,7 @@ class PayfortService extends BaseService {
"RemmeberMe": false, "RemmeberMe": false,
"Reconciliation_Reference": result.reconciliationReference, "Reconciliation_Reference": result.reconciliationReference,
"LanguageID": 1, "LanguageID": 1,
"PatientID": patientID
}; };
await baseAppClient.post( await baseAppClient.post(

@ -31,9 +31,9 @@ class PayfortViewModel extends ChangeNotifier {
} }
} }
Future<void> addPayfortApplePayResponse({PayFortResult? result}) async { Future<void> addPayfortApplePayResponse(num patientID, {PayFortResult? result}) async {
try { try {
await _payfortService.addPayfortApplePayResponse(result: result); await _payfortService.addPayfortApplePayResponse(patientID, result: result);
} on Exception catch (e, s) { } on Exception catch (e, s) {
print(s); print(s);
return null; return null;

@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:convert'; import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart'; import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
@ -31,17 +32,20 @@ class _SplashScreenState extends State<SplashScreen> {
@override @override
void initState() { void initState() {
AppGlobal.context = context;
super.initState(); super.initState();
print("Splash init called............."); print("Splash init called.............");
Timer( Timer(
Duration(seconds: 1, milliseconds: 500), Duration(seconds: 1, milliseconds: 500),
() async { () async {
await loadPrivilege().then((value) { await loadPrivilege().then((value) {
if(!_privilegeService.hasError) {
Navigator.of(context).pushReplacement( Navigator.of(context).pushReplacement(
MaterialPageRoute( MaterialPageRoute(
builder: (BuildContext context) => LandingPage(), builder: (BuildContext context) => LandingPage(),
), ),
); );
} else {}
}); });
}, },
); );
@ -69,6 +73,7 @@ class _SplashScreenState extends State<SplashScreen> {
// debugPrint("ALL SHARED PREFERENCES!!!!!"); // debugPrint("ALL SHARED PREFERENCES!!!!!");
// debugPrint(jsonEncode(value)); // debugPrint(jsonEncode(value));
}); });
// PushNotificationHandler(context).init(); // Asyncronously
} }
@override @override

@ -2953,6 +2953,7 @@ class TranslationBase {
String get habibCallCenter => localizedValues["habibCallCenter"][locale.languageCode]; String get habibCallCenter => localizedValues["habibCallCenter"][locale.languageCode];
String get cashAmountUpdateInsurance => localizedValues["cashAmountUpdateInsurance"][locale.languageCode]; String get cashAmountUpdateInsurance => localizedValues["cashAmountUpdateInsurance"][locale.languageCode];
String get validInsurance => localizedValues["validInsurance"][locale.languageCode]; String get validInsurance => localizedValues["validInsurance"][locale.languageCode];
String get contactRRT => localizedValues["contactRRT"][locale.languageCode];
String get checkInViaLocation => localizedValues["checkInViaLocation"][locale.languageCode]; String get checkInViaLocation => localizedValues["checkInViaLocation"][locale.languageCode];
String get locationCheckInError => localizedValues["locationCheckInError"][locale.languageCode]; String get locationCheckInError => localizedValues["locationCheckInError"][locale.languageCode];
String get upcoming => localizedValues["upcoming"][locale.languageCode]; String get upcoming => localizedValues["upcoming"][locale.languageCode];

@ -709,6 +709,8 @@ class _AppDrawerState extends State<AppDrawer> {
// Navigator.of(context).pop(); // Navigator.of(context).pop();
Provider.of<ProjectViewModel>(context, listen: false).user = result.list; Provider.of<ProjectViewModel>(context, listen: false).user = result.list;
Provider.of<ProjectViewModel>(context, listen: false).setUser(result.list); Provider.of<ProjectViewModel>(context, listen: false).setUser(result.list);
Provider.of<ProjectViewModel>(context, listen: false).authenticatedUserObject.user = result.list;
// await pharmacyModuleViewModel.generatePharmacyToken(); // await pharmacyModuleViewModel.generatePharmacyToken();
_vitalSignService.heightCm = ""; _vitalSignService.heightCm = "";
_vitalSignService.weightKg = ""; _vitalSignService.weightKg = "";

@ -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 LIVE
// static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT // 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 // static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS

Loading…
Cancel
Save