PAP-563: fix pickup location from hospital

merge-requests/310/head
Elham Rababah 4 years ago
parent aa1c92c142
commit 36d422c7aa

@ -393,13 +393,14 @@ class _PickupLocationState extends State<PickupLocation> {
setState(() {
widget.patientER.pickupSpot = _isInsideHome ? 1 : 0;
if (widget.patientER.direction == 0) {
widget.patientER.pickupLocationLattitude =
widget.patientER.dropoffLocationLattitude =
_result.geometry.location.lat.toString();
widget.patientER.pickupLocationLongitude =
widget.patientER.dropoffLocationLongitude =
_result.geometry.location.lng.toString();
widget.patientER.dropoffLocationLattitude =
widget.patientER.pickupLocationLattitude =
_selectedHospital.latitude;
widget.patientER.dropoffLocationLongitude =
widget.patientER.pickupLocationLongitude =
_selectedHospital.longitude;
} else {
widget.patientER.pickupLocationLattitude =
@ -416,7 +417,7 @@ class _PickupLocationState extends State<PickupLocation> {
widget.patientER.pickupLocationLattitude;
widget.patientER.longitude =
widget.patientER.pickupLocationLongitude;
widget.patientER.dropoffLocationName = _selectedHospital.name;
widget.patientER.dropoffLocationName = widget.patientER.direction == 0?_result.formattedAddress:_selectedHospital.name;
widget.patientER.createdBy =
widget.amRequestViewModel.user.patientID;
widget.patientER.isOutPatient =
@ -425,7 +426,7 @@ class _PickupLocationState extends State<PickupLocation> {
widget.amRequestViewModel.user.patientIdentificationNo;
widget.patientER.pickupDateTime =
DateUtil.convertDateToStringLocation(DateTime.now());
widget.patientER.pickupLocationName = _result.formattedAddress;
widget.patientER.pickupLocationName = widget.patientER.direction == 0?_selectedHospital.name:_result.formattedAddress;
widget.patientER.projectID =
widget.amRequestViewModel.user.projectID;
widget.patientER.requesterFileNo =

Loading…
Cancel
Save