Stream: implementers
Topic: Searching, chaining pinning
Grahame Grieve (Feb 02 2018 at 22:55):
Consider this search:
Grahame Grieve (Feb 02 2018 at 22:56):
GET Observation?code=X&component.code=Y&component.value-quantity=grZ
Grahame Grieve (Feb 02 2018 at 22:56):
this won't do what most people want.... they think they're searching for an observation that has a component with a code Y and value > 3.5
Grahame Grieve (Feb 02 2018 at 22:57):
but they're not. Instead, they're searching for an observation that has a component with code Y, and a component with value 3.5
Grahame Grieve (Feb 02 2018 at 22:58):
it's been claimed that this is counter-intuitive, and that we should say that all the component references are 'pinned' together, such that they automatically refer to the same component
Grahame Grieve (Feb 02 2018 at 22:59):
but that would mean that this search would become impossible
Grahame Grieve (Feb 02 2018 at 22:59):
GET Observation?code=X&component.code=Y&component.code=Z
Grahame Grieve (Feb 02 2018 at 22:59):
so far, we've said that if you really want control here, use the _filter parameter... but only my server implements it.
Grahame Grieve (Feb 02 2018 at 23:02):
why is that.... I'm not really sure... maybe it's because the _filter parameter syntax looks crappy... well, we copied it from odata... but I agree it's pretty crappy syntax, even if it's powerful
Grahame Grieve (Feb 02 2018 at 23:03):
so I don't know whether we want to see if we can make _filter better.... but there's another option, as shown in this query:
Grahame Grieve (Feb 02 2018 at 23:03):
GET Observation?code=X&component=$x&$x.code=Y&$x.value-quantity=grZ
Grahame Grieve (Feb 02 2018 at 23:04):
it suffers from the obvious disadvantage of squeezing a little more blood out the stone that is the parameter syntax.... but it might work. @Chris Grenz @Christiaan Knaap @Ewout Kramer @James Agnew @Josh Mandel
Josh Mandel (Feb 02 2018 at 23:49):
Presumably x
here is any variable name that the client uses consistently at these three spots? I think we talked through something like this at the workgroup session; it's definitely the least worst change we've entertained, IMO.
Grahame Grieve (Feb 03 2018 at 02:34):
Yes. I didn’t hear discussion of this variant
Christiaan Knaap (Feb 07 2018 at 14:05):
I think there was consensus in Mon Q1 or 2 about not extending the search syntax any further. And I find it hard to read. Plus it brings Observation.component into focus which is not a search parameter, so how do I evaluate that? Should I read $x.code as the search parameter 'component-code'? So I'm not in favour of this change.
Grahame Grieve (Feb 07 2018 at 18:28):
I'm not either. Not personally
Ewout Kramer (Feb 15 2018 at 15:23):
Presumably
x
here is any variable name that the client uses consistently at these three spots? I think we talked through something like this at the workgroup session; it's definitely the least worst change we've entertained, IMO.
Agree.
But as Christiaan and James have now promised to implement _filter, the rest of the world will soon follow ;-)
Grahame Grieve (Feb 15 2018 at 20:25):
well, I can only hope so.
Grahame Grieve (Feb 15 2018 at 20:25):
so we can stop all this stupid syntax hack stuff
Last updated: Apr 12 2022 at 19:14 UTC