CR Implemented

merge-update-with-lab-changes
haroon amjad 2 years ago
parent b579e494c1
commit a0bca92195

@ -20,8 +20,8 @@ var PACKAGES_ORDERS = '/api/orders';
var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; 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:2018/';
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://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/';
@ -337,7 +337,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari
var CHANNEL = 3; var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958'; var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20'; var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 11.1; var VERSION_ID = 11.3;
var SETUP_ID = '91877'; var SETUP_ID = '91877';
var LANGUAGE = 2; var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0; // var PATIENT_OUT_SA = 0;

@ -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": "رجوع"},
@ -1901,4 +1901,5 @@ 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": "تواصل مع فريق الاستجابة السريعة"},
}; };

@ -219,9 +219,12 @@ 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(
order.pickupLocation.trim().toString(), width: MediaQuery.of(context).size.width * 0.7,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48), child: Text(
order.pickupLocation.trim().toString(),
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,13 +498,39 @@ class _PickupLocationState extends State<PickupLocation> {
), ),
], ],
), ),
// SizedBox(
// 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),
),
],
)
],
),
),
SizedBox( SizedBox(
height: 45, height: 100,
), ),
if (myAppointment != null)
SizedBox(
height: 100,
),
], ],
), ),
), ),
@ -510,62 +538,85 @@ 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: DefaultButton( child: Row(
TranslationBase.of(context).next, children: [
() { Expanded(
if (_result == null || _selectedHospital == null) flex: 1,
AppToast.showErrorToast(message: TranslationBase.of(context).selectAll); child: DefaultButton(
else TranslationBase.of(context).back,
setState(() { () {
widget.patientER_RC.transportationDetails.pickupSpot = _isInsideHome ? 1 : 0; widget.changeCurrentTab(0);
if (widget.patientER_RC.transportationDetails.direction == 0) { },
// To Hospital ),
widget.patientER_RC.transportationDetails.dropoffLatitude = _result.lat.toStringAsFixed(6); ),
widget.patientER_RC.transportationDetails.dropoffLongitude = _result.long.toStringAsFixed(6); SizedBox(width: 12.0),
widget.patientER_RC.transportationDetails.pickupLatitude = _selectedHospital.latitude; Expanded(
widget.patientER_RC.transportationDetails.pickupLongitude = _selectedHospital.longitude; flex: 1,
} else { child: DefaultButton(
// From Hospital TranslationBase.of(context).next,
widget.patientER_RC.transportationDetails.pickupLatitude = _selectedHospital.latitude; () {
widget.patientER_RC.transportationDetails.pickupLongitude = _selectedHospital.longitude; if (_result == null || _selectedHospital == null)
widget.patientER_RC.transportationDetails.dropoffLatitude = _result.lat.toStringAsFixed(6); AppToast.showErrorToast(message: TranslationBase.of(context).selectAll);
widget.patientER_RC.transportationDetails.dropoffLongitude = _result.long.toStringAsFixed(6); else
} setState(() {
widget.patientER_RC.transportationDetails.pickupSpot = _isInsideHome ? 1 : 0;
if (widget.patientER_RC.transportationDetails.direction == 0) {
// To Hospital
widget.patientER_RC.transportationDetails.dropoffLatitude = _result.lat.toStringAsFixed(6);
widget.patientER_RC.transportationDetails.dropoffLongitude = _result.long.toStringAsFixed(6);
widget.patientER_RC.transportationDetails.pickupLatitude = _selectedHospital.latitude;
widget.patientER_RC.transportationDetails.pickupLongitude = _selectedHospital.longitude;
} else {
// From Hospital
widget.patientER_RC.transportationDetails.pickupLatitude = _selectedHospital.latitude;
widget.patientER_RC.transportationDetails.pickupLongitude = _selectedHospital.longitude;
widget.patientER_RC.transportationDetails.dropoffLatitude = _result.lat.toStringAsFixed(6);
widget.patientER_RC.transportationDetails.dropoffLongitude = _result.long.toStringAsFixed(6);
}
widget.patientER_RC.transportationDetails.dropoffLocationName = widget.patientER_RC.transportationDetails.direction == 1 ? _result.formattedAddress : _selectedHospital.name; widget.patientER_RC.transportationDetails.dropoffLocationName = widget.patientER_RC.transportationDetails.direction == 1 ? _result.formattedAddress : _selectedHospital.name;
widget.patientER_RC.patientIdentificationID = widget.amRequestViewModel.user.patientIdentificationNo; widget.patientER_RC.patientIdentificationID = widget.amRequestViewModel.user.patientIdentificationNo;
widget.patientER_RC.transportationDetails.pickupDateTime = DateUtil.convertDateToStringLocation(DateTime.now()); widget.patientER_RC.transportationDetails.pickupDateTime = DateUtil.convertDateToStringLocation(DateTime.now());
widget.patientER_RC.transportationDetails.pickupLocationName = widget.patientER_RC.transportationDetails.direction == 1 ? _selectedHospital.name : _result.formattedAddress; widget.patientER_RC.transportationDetails.pickupLocationName = widget.patientER_RC.transportationDetails.direction == 1 ? _selectedHospital.name : _result.formattedAddress;
widget.patientER_RC.projectID = widget.amRequestViewModel.user.projectID; widget.patientER_RC.projectID = widget.amRequestViewModel.user.projectID;
widget.patientER_RC.patientID = widget.amRequestViewModel.user.patientID; widget.patientER_RC.patientID = widget.amRequestViewModel.user.patientID;
widget.patientER_RC.transportationDetails.requesterIsOutSA = false; widget.patientER_RC.transportationDetails.requesterIsOutSA = false;
widget.patientER_RC.transportationDetails.requesterMobileNo = widget.amRequestViewModel.user.mobileNumber; widget.patientER_RC.transportationDetails.requesterMobileNo = widget.amRequestViewModel.user.mobileNumber;
widget.patientER_RC.transportationDetails.requesterFileNo = widget.amRequestViewModel.user.patientID; widget.patientER_RC.transportationDetails.requesterFileNo = widget.amRequestViewModel.user.patientID;
if (_haveAppointment == HaveAppointment.YES) { if (_haveAppointment == HaveAppointment.YES) {
widget.patientER_RC.transportationDetails.appointmentNo = myAppointment.appointmentNo.toString(); widget.patientER_RC.transportationDetails.appointmentNo = myAppointment.appointmentNo.toString();
widget.patientER_RC.transportationDetails.appointmentClinicName = myAppointment.clinicName; widget.patientER_RC.transportationDetails.appointmentClinicName = myAppointment.clinicName;
widget.patientER_RC.transportationDetails.appointmentDoctorName = myAppointment.doctorNameObj; widget.patientER_RC.transportationDetails.appointmentDoctorName = myAppointment.doctorNameObj;
widget.patientER_RC.transportationDetails.appointmentBranch = myAppointment.projectName; widget.patientER_RC.transportationDetails.appointmentBranch = myAppointment.projectName;
widget.patientER_RC.transportationDetails.appointmentTime = myAppointment.appointmentDate; widget.patientER_RC.transportationDetails.appointmentTime = myAppointment.appointmentDate;
widget.patientER_RC.transportationDetails.haveAppointment = 1; widget.patientER_RC.transportationDetails.haveAppointment = 1;
widget.patientER_RC.transportationDetails.dropoffLatitude = myAppointment.latitude; widget.patientER_RC.transportationDetails.dropoffLatitude = myAppointment.latitude;
widget.patientER_RC.transportationDetails.dropoffLongitude = myAppointment.longitude; widget.patientER_RC.transportationDetails.dropoffLongitude = myAppointment.longitude;
widget.patientER_RC.transportationDetails.dropoffLocationName = myAppointment.projectName; widget.patientER_RC.transportationDetails.dropoffLocationName = myAppointment.projectName;
} else { } else {
widget.patientER_RC.transportationDetails.appointmentNo = "0"; widget.patientER_RC.transportationDetails.appointmentNo = "0";
widget.patientER_RC.transportationDetails.appointmentClinicName = ""; widget.patientER_RC.transportationDetails.appointmentClinicName = "";
widget.patientER_RC.transportationDetails.appointmentDoctorName = ""; widget.patientER_RC.transportationDetails.appointmentDoctorName = "";
widget.patientER_RC.transportationDetails.appointmentBranch = ""; widget.patientER_RC.transportationDetails.appointmentBranch = "";
widget.patientER_RC.transportationDetails.appointmentTime = ""; widget.patientER_RC.transportationDetails.appointmentTime = "";
widget.patientER_RC.transportationDetails.haveAppointment = 0; widget.patientER_RC.transportationDetails.haveAppointment = 0;
} }
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(
style: TextStyle( TranslationBase.of(context).twoDirec,
fontSize: 12.0, style: TextStyle(
letterSpacing: -0.48, fontSize: 12.0,
fontWeight: FontWeight.w600, letterSpacing: -0.48,
)), 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,38 +344,55 @@ 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: DefaultButton( child: Row(
TranslationBase.of(context).next, children: [
() { Expanded(
setState(() { flex: 1,
// widget.patientER.transportationMethodId = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1); child: DefaultButton(
// widget.patientER.direction = _direction == Direction.ToHospital ? 1 : 0; TranslationBase.of(context).back,
// widget.patientER.tripType = _way == Way.TwoWays ? 0 : 1; () {
// widget.patientER.selectedAmbulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1); Navigator.pop(context);
// widget.patientER.patientERTransportationMethod = _erTransportationMethod; },
// widget.patientER.orderServiceID = _orderService.getIdOrderService(); )),
// widget.patientER.pickupUrgency = 1; SizedBox(width: 12.0),
// widget.patientER.lineItemNo = 1; Expanded(
// widget.patientER.cost = _erTransportationMethod.price.toDouble(); flex: 1,
// widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0; child: DefaultButton(
// widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble(); TranslationBase.of(context).next,
// widget.changeCurrentTab(1); () {
setState(() {
// widget.patientER.transportationMethodId = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
// widget.patientER.direction = _direction == Direction.ToHospital ? 1 : 0;
// widget.patientER.tripType = _way == Way.TwoWays ? 0 : 1;
// widget.patientER.selectedAmbulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
// widget.patientER.patientERTransportationMethod = _erTransportationMethod;
// widget.patientER.orderServiceID = _orderService.getIdOrderService();
// widget.patientER.pickupUrgency = 1;
// widget.patientER.lineItemNo = 1;
// widget.patientER.cost = _erTransportationMethod.price.toDouble();
// widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0;
// widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble();
// widget.changeCurrentTab(1);
// widget.patientER_RC.transportationDetails.id = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1); // widget.patientER_RC.transportationDetails.id = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
widget.patientER_RC.transportationDetails.direction = _direction == Direction.ToHospital ? 0 : 1; widget.patientER_RC.transportationDetails.direction = _direction == Direction.ToHospital ? 0 : 1;
widget.patientER_RC.transportationDetails.tripType = _way == Way.TwoWays ? 0 : 1; widget.patientER_RC.transportationDetails.tripType = _way == Way.TwoWays ? 0 : 1;
widget.patientER_RC.transportationDetails.ambulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1); widget.patientER_RC.transportationDetails.ambulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
widget.patientER_RC.transportationDetails.transportationType = _erTransportationMethod.iD.toString(); widget.patientER_RC.transportationDetails.transportationType = _erTransportationMethod.iD.toString();
widget.patientER_RC.patientERTransportationMethod = _erTransportationMethod; widget.patientER_RC.patientERTransportationMethod = _erTransportationMethod;
widget.patientER_RC.transportationDetails.pickupUrgency = 1; widget.patientER_RC.transportationDetails.pickupUrgency = 1;
// widget.patientER.orderServiceID = _orderService.getIdOrderService(); // widget.patientER.orderServiceID = _orderService.getIdOrderService();
// widget.patientER.lineItemNo = 1; // widget.patientER.lineItemNo = 1;
// widget.patientER.cost = _erTransportationMethod.price.toDouble(); // widget.patientER.cost = _erTransportationMethod.price.toDouble();
// widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0; // widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0;
// widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble(); // widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble();
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 changeCurrentTab; final Function changeCurrentTab;
@ -86,48 +88,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)), // Text(TranslationBase.of(context).billAmount, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
SizedBox( // SizedBox(
height: 5, // 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),
),
],
)
],
),
), ),
Container( Container(
height: 55, margin: EdgeInsets.only(top: 12),
padding: EdgeInsets.all(10),
decoration: cardRadius(12), decoration: cardRadius(12),
child: Row( padding: EdgeInsets.all(16.0),
mainAxisAlignment: MainAxisAlignment.spaceBetween, child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
_getNormalText(TranslationBase.of(context).patientShareTotal + ':'), Text(TranslationBase.of(context).contactRRT + " : ", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
Container( SizedBox(height: 16.0),
padding: EdgeInsets.only(left: 20.0, right: 20.0), InkWell(
child: _getNormalText(TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.priceTotal}', isBold: true, isTotal: true) onTap: () {
), launchUrl(
Uri.parse("tel://0115259555"),
);
},
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("0115259555", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold)),
Icon(
Icons.headset_mic_rounded,
size: 30.0,
)
],
),
)
], ],
), ),
), ),
SizedBox(height: 50), SizedBox(height: 80),
], ],
), ),
), ),
@ -135,9 +178,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(
await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER_RC); 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);
},
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(
order.pickupLocation.trim().toString(), width: MediaQuery.of(context).size.width * 0.7,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48), child: Text(
order.pickupLocation.trim().toString(),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, overflow: TextOverflow.clip),
),
), ),
], ],
), ),

@ -168,22 +168,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),
children: [ padding: EdgeInsets.all(12),
Container( child: Column(
height: 30, crossAxisAlignment: CrossAxisAlignment.start,
decoration: BoxDecoration(color: Theme.of(context).appBarTheme.color, borderRadius: BorderRadius.only(topLeft: radius, topRight: radius)), children: [
child: Center(child: Text(TranslationBase.of(context).approximateServiceFee, style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w500, letterSpacing: 1))), Text(
), TranslationBase.of(context).billAmount,
pricingRow(label: TranslationBase.of(context).patientShare, value: '$amount ${TranslationBase.of(context).sar}'), textAlign: TextAlign.center,
Container(height: 0.5, color: Theme.of(context).appBarTheme.color), style: TextStyle(
pricingRow(label: TranslationBase.of(context).patientTaxToDo, value: '$vat ${TranslationBase.of(context).sar}'), fontSize: 16.0,
Container(height: 0.5, color: Theme.of(context).appBarTheme.color), fontWeight: FontWeight.w600,
pricingRow(label: TranslationBase.of(context).patientShareWithTax, value: '$total ${TranslationBase.of(context).sar}', labelBold: true), letterSpacing: -0.64,
Container(height: 0.5, color: Theme.of(context).appBarTheme.color), ),
], ),
mHeight(10),
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,

@ -2910,6 +2910,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];
} }

Loading…
Cancel
Save