Background
PSI and other organisation use DHIS2 as their de facto Master List of Facilities. DHIS2 provides various API endpoints to perform numerous CRUD operation across Org Units. DHIS API has a comprehensive documentation.
When creating consumer services, PSI requires to list facilites based on the current location of the user - this means listing facilities that are closest to the provided Latitude and Longitude of the user. This search option is not present in DHIS2, at least in the reviewed versions (2.38, 2.39 and 2.40 dev version - reviewed in February 2023).
Introduction
Locator API is self-contained API that provides new ways to retrieve organisation unit, in particular:
Request for closest org units based on a specific coordinates, with the possibility to define a boundary as a ratio in Kms.
Return an enumeration of Custom Attributes values - implemented for Area and SubArea, two of the suggested custom attributes that we recommend to install as part of the Org Units.
Filtering by specific Org Units custom attribute is severely limited
You cannot specify that attribute to search - it searches all of them
Multiple values are not supported. This affect the way that we use ‘comma separated’ values.