Skip to content
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

Unable to perform _sort operations using search parameters with composed names #49

Closed
yoliva opened this Issue Mar 1, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@yoliva
Copy link

yoliva commented Mar 1, 2019

I'm unable to perform _sort operations in Tasks if the search parameter contains -. Example:
GET /fhir/Task?_sort=group-identifier
GET /fhir/Task?_sort=authored-on

I get an exception like this:

{
 "resourceType": "OperationOutcome",
 "issue": [
  {
   "severity": "fatal",
   "diagnostics": "java.lang.Exception: {:status :error, :errors [{:type :error, :message \"No search parameter for Task.groupidentifier\"}]}\n at proto.search.core$search.invokeStatic (core.clj:1120)\n    proto.search.core$search.doInvoke (core.clj:1111)\n    clojure.lang.RestFn.invoke (RestFn.java:470)\n    proto.operations$unsafe_search.invokeStatic (operations.clj:181)\n    proto.operations$unsafe_search.invoke (operations.clj:173)\n    proto.operations$eval12575$fn__12576.invoke (operations.clj:184)\n    clojure.lang.MultiFn.invoke (MultiFn.java:229)\n    unifn.core$_STAR_apply_impl$fn__209.invoke (core.clj:53)\n    unifn.core$_STAR_apply_impl.invokeStatic (core.clj:53)\n    unifn.core$_STAR_apply_impl.invoke (core.clj:35)\n    unifn.core$_STAR_apply.invokeStatic (core.clj:79)\n    unifn.core$_STAR_apply.invoke (core.clj:75)\n    unifn.core$_STAR_apply.invokeStatic (core.clj:84)\n    unifn.core$_STAR_apply.invoke (core.clj:75)\n    proto.operations$eval12579$fn__12580.invoke (operations.clj:188)\n    clojure.lang.MultiFn.invoke (MultiFn.java:229)\n    unifn.core$_STAR_apply_impl$fn__209.invoke (core.clj:53)\n    unifn.core$_STAR_apply_impl.invokeStatic (core.clj:53)\n    unifn.core$_STAR_apply_impl.invoke (core.clj:35)\n    unifn.core$_STAR_apply.invokeStatic (core.clj:79)\n    unifn.core$_STAR_apply.invoke (core.clj:75)\n    unifn.core$_STAR_apply.invokeStatic (core.clj:84)\n    unifn.core$_STAR_apply.invoke (core.clj:75)\n    fhir.core$transformator.invokeStatic (core.clj:159)\n    fhir.core$transformator.invoke (core.clj:159)\n    fhir.core$eval23618$fn__23619.invoke (core.clj:177)\n    clojure.lang.MultiFn.invoke (MultiFn.java:229)\n    unifn.core$_STAR_apply_impl$fn__209.invoke (core.clj:53)\n    unifn.core$_STAR_apply_impl.invokeStatic (core.clj:53)\n    unifn.core$_STAR_apply_impl.invoke (core.clj:35)\n    unifn.core$_STAR_apply.invokeStatic (core.clj:79)\n    unifn.core$_STAR_apply.invoke (core.clj:75)\n    unifn.routing$eval7184$fn__7186.invoke (routing.clj:29)\n    clojure.lang.MultiFn.invoke (MultiFn.java:229)\n    unifn.core$_STAR_apply_impl$fn__209.invoke (core.clj:53)\n    unifn.core$_STAR_apply_impl.invokeStatic (core.clj:53)\n    unifn.core$_STAR_apply_impl.invoke (core.clj:35)\n    unifn.core$_STAR_apply.invokeStatic (core.clj:79)\n    unifn.core$_STAR_apply.invoke (core.clj:75)\n    unifn.core$_STAR_apply.invokeStatic (core.clj:84)\n    unifn.core$_STAR_apply.invoke (core.clj:75)\n    aidbox.box$dispatch_to_box.invokeStatic (box.clj:139)\n    aidbox.box$dispatch_to_box.invoke (box.clj:133)\n    aidbox.core$eval29588$fn__29590.invoke (core.clj:252)\n    clojure.lang.MultiFn.invoke (MultiFn.java:229)\n    unifn.core$_STAR_apply_impl$fn__209.invoke (core.clj:53)\n    unifn.core$_STAR_apply_impl.invokeStatic (core.clj:53)\n    unifn.core$_STAR_apply_impl.invoke (core.clj:35)\n    unifn.core$_STAR_apply.invokeStatic (core.clj:79)\n    unifn.core$_STAR_apply.invoke (core.clj:75)\n    unifn.core$_STAR_apply.invokeStatic (core.clj:84)\n    unifn.core$_STAR_apply.invoke (core.clj:75)\n    unifn.rest$handle.invokeStatic (rest.clj:28)\n    unifn.rest$handle.invoke (rest.clj:24)\n    unifn.rest$restart$fn__9871.invoke (rest.clj:65)\n    org.httpkit.server.HttpHandler.run (RingHandler.java:91)\n    java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511)\n    java.util.concurrent.FutureTask.run (FutureTask.java:266)\n    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142)\n    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617)\n    java.lang.Thread.run (Thread.java:745)\n",
   "code": "exception"
  }
 ]
}

Looks like the server is removing the - and after making a couple of tests looks like that isn't just for Task.

@yoliva yoliva changed the title Unable to perform _sort in Task Unable to perform _sort operations with search parameters including `-` Mar 1, 2019

@yoliva yoliva changed the title Unable to perform _sort operations with search parameters including `-` Unable to perform _sort operations using search parameters with composed names Mar 1, 2019

@niquola

This comment has been minimized.

Copy link
Member

niquola commented Mar 5, 2019

fixed in 0.4.0

@niquola niquola closed this Mar 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.