IHTSDO / snowstorm

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

ecl Description Filter is scanning Text Definitions #550

Open abelardy opened 1 year ago

abelardy commented 1 year ago

The following ecl:

<<782964007 {{ D term = wild:"death"}}

...correctly returns just 4 codes when run against Ontoserver

1197749008 Cell death inducing DFFA like effector C-related familial partial lipodystrophy (disorder) 723334006 Immunodeficiency due to mutation of FAS-associated protein with death domain gene (disorder) 703388005 Growth retardation, amino aciduria, cholestasis, iron overload, lactic acidosis, and early death (disorder) 711157000 Sudden infant death with dysgenesis of testes syndrome (disorder)

...whereas Snowstorm 8.1.0 returns an additional 61 results, all of which are being found because the string "death" appears somewhere within the text definition that is associated with the underlying concept (descrpition typeId = 900000000000550004)

I think this is an error: the default scope of a description filter should IMHO specifically exclude text definitions.

kaicode commented 1 year ago

Snowstorm is conformant with the specification in this case. The ECL specification allows specific description types within a description filter, however there is no default so all description types should be included unless otherwise specified.

Having said that, I do agree that getting results from text definitions can be very misleading and perhaps we should provide a default. Let's discuss this in the SNOMED Computable Languages Project Group this month.


On a related note I believe the same restriction should be applied when expanding a FHIR ValueSet using the filter parameter. I think only active descriptions of type FSN or Synonym should be considered when applying the filter. I have recently logged a Snowstorm ticket to get that fixed in the FHIR API.

abelardy commented 1 year ago

I would strongly suspect that whoever wrote the "all description types" part of the spec had forgotten about the existence of Text Definitions.