New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting in DSTU2 using reference parameters does not work in HAPI 1.0 #188

Closed
vkachroo opened this Issue Jun 22, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@vkachroo

vkachroo commented Jun 22, 2015

Hi Vishal,
I'd say you've found a bug on our server. The FHIR spec doesn't seem to indicate that reference parameters shouldn't be used as sort criteria, and the syntax the testing UI generates would be correct.
This does seem to be a somewhat odd thing to do though- The IDs of reference parameters aren't requird to follow any particular pattern, so the sort order you get back will be less predictable than it would be with other parameters. On our server we generate sequential numeric IDs so this would effectively sort by creation time, but other servers are allowed to use other schemes to assign IDs. I suppose this sort would have the effect of at least grouping medications by manufacturer, even if you couldn't predict which manufacturer would come first.
Would you mind to file an issue on our issue tracker? This should be fixable in reasonably short order.
Cheers,
James

On Wed, Jun 17, 2015 at 3:03 PM, Kachroo, Vishal wrote:
I am trying to understand if sorting using reference parameters is supported by FHIR spec (or HAPI 1.0). I tried to scour the spec. for any information on this but cannot find any.

I am looking to do

http://fhirtest.uhn.ca/baseDstu2/Medication?_sort=manufacturer

where manufacturer is a search parameter of type Reference.

My question is, does it make sense to sort by a reference parameter ? Because the reference is an internal identifier for the resource. But wanted to confirm that I am thinking right.

The URL above when issued against the HAPI DSTU2 public test server returns an error “Failed to call access method”

The HAPI FHIR UI does show reference parameters in the Sort Results drop down. Should these be removed, if indeed it does not make sense to sort by reference parameters ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment