OpenReferralUK / human-services

Extensions proposed by the English Local Government Association (LGA) and the local government OpenCommunity project to the OpenReferral standard for human services data. Schema generator code is given to express the schema in various formats. Data conversion routines to make it conform to the standard. API that serves the data in a format compliant with the standard.
11 stars 6 forks source link

Boolean operators in searches #17

Open MikeThacker1 opened 4 years ago

MikeThacker1 commented 4 years ago

There's no clear guidance on how parameters are combined in API GET queries, but most are combined with a boolean AND.

There is a need to use a boolean OR in some circumstances, eg getting services with either of two taxonomy terms.

We'd like to suggest this syntax: /services?taxonomy_id=esdServiceType:12&taxonomy_id=esdServiceType:13,14,15 for getting services of service type 12 AND (13, 14, or 15)

A simpler implementation would just be the second part using comma-separated values to support am OR operation.

The is approach could be applied to the "?need", "?circumstance" and "?serviceType" parameters supported by implementations designed ton work with these LGA vocabularies.