IHTSDO / snowstorm

Scalable SNOMED CT Terminology Server using Elasticsearch
Other
208 stars 83 forks source link

FHIR Expand using ECL without terms #136

Closed zaus71 closed 4 years ago

zaus71 commented 4 years ago

I wanted to create a query that returns all pathogens for UTI:

{{baseUrl}}/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=ecl/ << 68566005|UTI| .246075003|causitive agent|

this returns 35 results (with the SNOMED CT edition SnomedCT_InternationalRF2_PRODUCTION_20200309T120000Z)

then I wanted to shorten this one to:

{{baseUrl}}/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=ecl/ << 68566005| .246075003|

and I got 151 results (many of them wrong)

The ABNF definition for ECL says that the "term" is optional - so basically I would expect same results for both queries.

kaicode commented 4 years ago

Hi @zaus71, thanks for reporting your issue.

In your second query you will be seeing the results for << 68566005. This is because the .246075003 part is wrapped in pipes which is effectively escaping the text. The term is optional in ECL but please remove all the pipes like this: << 68566005.246075003. This gives 35 results, the same as your first query.

Kind regards, Kai

kaicode commented 4 years ago

I've updated the title of your issue to help other people find this answer, I hope that's okay. Cheers.

zaus71 commented 4 years ago

Thank you so much - now, of course, I see the pattern!