@ssmusoke, Lluis meant auto discovery of latitude and longitude based on entered addresses.
@lluismf, the thing is OpenMRS servers are not necessarily connected to the Internet so Google’s API is not the best fit.
For the purpose of data analysis I would do it in bulk when importing data to a data analysis tool. The tool could store latitude and longitude for cities and require Internet connection to discover missing places.
The fields exist to support registering patients at home via mobile device, and capturing actual GPS coordinates that way. (I imagine this is done pretty rarely.)
The other way to determine geocoordinates for addresses in real life implementations is that many use the Address Hierarchy module. With this, you could ask people to populate geocoordinates on their address hierarchy definitions (or even feed this through the google API), and use this to populate the coordinates on ETL.