PAP-563: fix pickup location from hospital

merge-update-with-lab-changes
Elham Rababah 5 years ago
parent aa1c92c142
commit 36d422c7aa

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

Loading…
Cancel
Save