Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

OpenSRP allows you to maintain location hierarchy inside OpenMRS and access it on your OpenSRP client.

  1. To get tree for all locations starting from the top most root send a http request to http://yourserver/location/location-tree. For demo server access the link http://46.101.51.199:8080/oweb/location/location-tree

...

  1. The response returned would be a json document mappable to org.opensrp.api.util.LocationTree.

To get subtree starting from a particular location add location id i.e. uuid in OpenMRS to the request as http://yourserver/location/location-tree/uuid as path variable. The returned tree would a json document mappable to org.opensrp.api.util.LocationTree where root location would be the one specified in filter.