facilityregistry / fred-api

Facility Registry API Documentation Website
11 stars 4 forks source link

Filtering #23

Closed mberg closed 11 years ago

mberg commented 11 years ago

Filtering Facilities

/facilities.json?property1=value&property2=value

Properties apply to all core and user defined facility properties

ghost commented 11 years ago

+1 for filtering. To keep it simple for 1.1 I would probably enforce some basic rules. Here are some thoughts:

For example: ?properties.services=OBG&properties.services=ER would filter all facilities offering OBG OR ER, where as ?identifiers.id=2030&identifiers.agency=MOH would filter facilities with an identifier 2030 AND identifier assigned by MOH.

Pattern matches can perhaps be controlled by a control parameter of ?matching=exact or ?matching=pattern with the default being "exact". This way you can roll pattern matching into 1.2 and it would still be backwards compatible with 1.1 & 1.0. Also this leads a future pathway to other matching algorithms such as ?matching=soundex or ?matching=geobounds

mberg commented 11 years ago

implementing justin's suggestions

mberg commented 11 years ago

For now we only support exact matches.

edjez commented 11 years ago

Not a huge fun of properties. 'namespaces' but OK with it to help consensus

mberg commented 11 years ago

Incorporated in 1.1 docs. Close for now.