facilityregistry / fred-api

Facility Registry API Documentation Website
11 stars 4 forks source link

Need a way to query location hierarchy #38

Open rowenaluk opened 11 years ago

rowenaluk commented 11 years ago

The current specification currently deals with querying facilities, and in 1.1, hierarchies of facilities. But a lot of countries have ambiguities around the names of districts, and the existence of names of sub-districts, which can contain facilities. As part of 1.1, we should discuss how facility registries plan to share this kind of location metadata, possibly as part of a broader discussion of other kinds of facility metadata we want to be able to share.

edjez commented 11 years ago

Agree - but would like to suggest that political boundary groupings (province, district, sector, communes, etc) is a grouping issue; not as much as a geographical/location issue. As a matter of fact, while in 99% of cases the grouping does correlate to a geographic containment, this is not strictly so in all countries. Sometimes MOH groupings slightly diverge from the political ones due to ..politics, or delays in implementing changes in district boundaries, or because a dept of Geography in Ministry A did not share the data with MOH in a timely way or good format.

With support for hierarchical groupings I think we can nail a whole family of these sort of requirements without going crazy on APIs. (eg. by implementing a field type for such hierarchical groupings and some query operators such as "under"/"within"; and when we get into form definition/metadata queries& updates, making sure such hierarchical codes and labels are appropriately shared )

rowenaluk commented 11 years ago

Agree that containers are an appropriate way of modeling this. I just wanted to start by defining the problem we're hoping to tackle, but am a big fan of hitting X birds with 1 stone.

ghost commented 11 years ago

I'm not sure if I am following the requirement here, but a general grouping mechanism would be beneficial. I'm thinking of the HL7v3 world where organizations are distinguished from facilities. For example, an organization "Good Health Hospital System" may have direct authority/ownership over one or more facilities (Good Health Clinic, Good Health Hospital, etc...). Sometimes it is helpful to query based on the organization that runs the facility.

There are many ways to skin this cat so to speak and I'm not sure which would be the best. The first thought that comes to mind is to create an OU (Org Unit, similar to AD) resource and have each facility resource point at the ou(s) to which it belongs (this would allow a software system to query the org structure to get information about it). This would also allow jurisdictions to organize facilities however they see fit (owner, district, ministry, etc...), though it does introduce a slightly more complex API with the introduction of a new resource.

edjez commented 11 years ago

Recommend to postpone from 1.1/current release as it is an easy additive feature for later on.