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

Filtering on Expand throws error #5

Closed
sidharthramesh opened this issue Nov 21, 2021 · 4 comments · Fixed by #10
Closed

Filtering on Expand throws error #5

sidharthramesh opened this issue Nov 21, 2021 · 4 comments · Fixed by #10

Comments

@sidharthramesh
Copy link

sidharthramesh commented Nov 21, 2021

Sending the request:

curl -H "Accept: application/json" 'localhost:8080/fhir/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=ecl/<<50043002:<<263502005=<<19939008&filter=sili'

Returns:

{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","diagnostics":"Failed to call access method: java.lang.NullPointerException: Query must not be null"}]}

Also, I've noticed that switching the order of the query parameters:

curl -H "Accept: application/json" 'localhost:8080/fhir/ValueSet/$expand?url=http://snomed.info/sct?filter=sili&fhir_vs=ecl/<<50043002:<<263502005=<<19939008'

Throws:

{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","diagnostics":"Resource  is not known"}]}

Moreover, sometimes, the query might be URL encoded by some client libraries:
The conversion of

http://localhost:8080/fhir/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=ecl/<<50043002:<<263502005=<<19939008&filter=sili

would be

http://localhost:8080/fhir/ValueSet/$expand?url=http%3A%2F%2Fsnomed.info%2Fsct&fhir_vs=ecl%2F%3C%3C50043002%3A%3C%3C263502005%3D%3C%3C19939008

and this also throws:

{
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "severity": "error",
      "code": "processing",
      "diagnostics": "Resource  is not known"
    }
  ]
}

Been learning some clojure in my free time. And I think the regex might be a reason for the Resource is not known error:

(let [[_ _ edition _ version query] (re-matches #"http://snomed.info/sct(/(\d*))?(/version/(\d{8}))?\?fhir_vs(.*)" uri)]

Not really sure regarding the null pointer. Seems like you are getting the filter parameter:

^{:tag ca.uhn.fhir.rest.param.StringParam OperationParam {:name "filter"}} param-filter

But not sure how it's being used.

@wardle
Copy link
Owner

wardle commented Nov 21, 2021

Personally I'd just use expand from Hermes. Why complicate by using FHIR as a transport?

@wardle
Copy link
Owner

wardle commented Nov 21, 2021

Plus it has more sophisticated management of historical associations so that you can expand and include now thought to be outdated inactive concepts.

@sidharthramesh
Copy link
Author

I'm mostly using FHIR terminology to use it alongside external applications like EHRBase.

@wardle wardle closed this as completed in 67d0e7d Apr 13, 2023
@wardle wardle mentioned this issue Apr 15, 2023
@wardle
Copy link
Owner

wardle commented Apr 15, 2023

I have restarted work on hades as I now need a generic FHIR terminology server myself! The plan is to have a plug gable architecture with Hermes being but one provider. Others will include FHIR bundles, CodeSystems and data marked up in CSVW for example.

wardle added a commit that referenced this issue Oct 9, 2023
Merge 'Decoupled architecture': 

Start of new architecture with pluggable modular backend.

Still a work-in-progress, with additional modules needed for value sets and code systems including those built-in to HL7 FHIR but also other information standards/ value sets defined in a variety of formats (FHIR, JSON, EDN, CSVW) to create reproducible FHIR server images from source data.

As a by product, fixes #5 in relation to URL decoding.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants