Currently, the location input on the create encounter allows arbitrary input and only stores a string. To make it easier for users to find locations, and to unblock #246, the location input should be autocompleted using the Google Maps API, and should be stored in a format such that the exact location can be used for future calls to the Google Maps API.
If the encounter location isn't in Maps, the location should ideally still be stored as a string, without the Maps location data.
Acceptance Criteria
[ ] The location input autocompletes using Google Maps locations
[ ] The location is stored in a format compatible with the Google Maps API, but is still human-readable (or has a human-readable component)
[ ] The user can still choose an input that isn't a valid location on Google Maps, e.g. "Mum's House"
Implementation details
The manner in which location is stored on the backend may need to be changed to allow a location compatible with the Maps API to be retrieved later.
Google has documentation on how to achieve a similar result here
Testing notes
New tests will need to be created to check if this new functionality works as intended.
Description
Currently, the location input on the create encounter allows arbitrary input and only stores a string. To make it easier for users to find locations, and to unblock #246, the location input should be autocompleted using the Google Maps API, and should be stored in a format such that the exact location can be used for future calls to the Google Maps API.
If the encounter location isn't in Maps, the location should ideally still be stored as a string, without the Maps location data.
Acceptance Criteria
Implementation details
The manner in which location is stored on the backend may need to be changed to allow a location compatible with the Maps API to be retrieved later.
Google has documentation on how to achieve a similar result here
Testing notes
New tests will need to be created to check if this new functionality works as intended.