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

ValueSet $expand returning 0 expanded records #285

Closed
dwnz1 opened this issue Jun 17, 2021 · 2 comments
Closed

ValueSet $expand returning 0 expanded records #285

dwnz1 opened this issue Jun 17, 2021 · 2 comments
Assignees

Comments

@dwnz1
Copy link

dwnz1 commented Jun 17, 2021

Firstly, apologies as this is likely a lack of understanding on my part, but I can't see a better place to ask the question.

I'm new to Snowstorm and I've (battled, but got there eventually, after having to find workarounds for HTTP timeouts amongst other things which I can see previous people have also encountered) to deploy an instance using the Docker-compose to Azure ACI and got it running.

I'm now wanting to make a GET request to get an expanded set of all substance-code values, as per the ValueSet defined here: https://www.hl7.org/fhir/valueset-substance-code.json

I've used the FHIR API to upload the valueset json file, as /fhir/ValueSet/substance-code, and if I make a GET to the valueset, I get the json back exactly as per the above json. However, when I make a GET request to /fhir/ValueSet/substance-code/$expand, I get the ValueSet json back, but the expand element is "expansion":{"total":0,"offset":0}}.

I've tried other public FHIR APIs and compared the non-expanded response, and its the same, but on those servers, I can call $expand and get the expanded result set.

Is there a step I have missed in my Snowstorm instance? It has just had the Snomed International 2021 snapshot loaded, and I can otherwise query fine and get results as I'd expect, e.g. /fhir/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=ecl/<<27624003 returns "expansion":{"total":2449,"offset":0,"contains":..."

@dwnz1 dwnz1 changed the title ValueSet $expand returning 0 records ValueSet $expand returning 0 expanded records Jun 17, 2021
@pgwilliams pgwilliams self-assigned this Jun 17, 2021
@pgwilliams
Copy link
Member

pgwilliams commented Jun 18, 2021

Hi @dwnz1 thanks for your query here. It looks like I've taken a wrong (?) interpretation of the spec here in http://build.fhir.org/valueset-definitions.html#ValueSet.compose.include.filter where it says "If multiple filters are specified, they SHALL all be true." and I've taken that to mean logical AND.

You can see this in the logs where the ECL formed is explicitly stated:
o.s.s.f.services.FHIRValueSetProvider : Recovered 0 Concepts from branch MAIN/2021-07-31 with ECL << 105590001 AND << 373873005.

Obviously a concept can't be both a substance and a product at the same time, which is why you're seeing 0 concepts. I'll change that to a logical OR now, since obviously that's the intention of that VS, and I'll bring it up for discussion at our next SNOMED on FHIR meeting to see if that line in the spec needs clarification. The filters cannot both be true at the same time, so I don't know what to make of the spec in that regard.

pgwilliams added a commit that referenced this issue Jun 18, 2021
kaicode pushed a commit that referenced this issue Jun 29, 2021
@kaicode
Copy link
Member

kaicode commented Aug 2, 2021

Fixed in release 7.1.2.

@kaicode kaicode closed this as completed Aug 2, 2021
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

No branches or pull requests

3 participants