Hello team
How can i query a list of all facilities and their locations from CHT ?, So that when someone wants to filter data on the dashboard by district, it is able to query the facilities in that district and return an accurate response
Hello team
How can i query a list of all facilities and their locations from CHT ?, So that when someone wants to filter data on the dashboard by district, it is able to query the facilities in that district and return an accurate response
Coming soon, we will have REST api endpoints that allow for retrieving contacts by type. But for now, without having couch2pg setup so that you could query postgres, your best bet would be to query the contacts_by_type Couch view. That could return a list of all the facilities in your instance.
Alternatively (or supplementally), you could use the contacts_by_parent view to query all the facilities for a particular district.
thanks @jkuester , this gives the needed feedback