Partager :

file How do you set a filter for Active concepts when doing an ECL query via snowstorm API?

  • Messages : 11
il y a 2 ans 4 mois #7381 par Guillermo Reynoso
Hi Anibal,

The forum software is adding a new line to the correct URL I posted, chunking out the ECL parameter. That results in a plain call to the /concepts endpoint and brings all concepts including inactive.

If you copy and paste the whole API call URL I posted before you should get the correct results.

Sorry for the inconvenience, nice to see the mystery has resolved itself.

Connexion ou Créer un compte pour participer à la conversation.

  • Messages : 50
il y a 2 ans 4 mois #7380 par Anibal Jodorcovsky
hmm, when I execute that URL from here I get this result:
{
items: [],
total: 489035,
limit: 1000,
offset: 0
}

And just the first item gives:
{
conceptId: "999486031000087102",
active: false,
definitionStatus: "PRIMITIVE",
moduleId: "20621000087109",
effectiveTime: "20150526",
fsn: {
term: "Stroke clinic (environment)",
lang: "en"
},
pt: {
term: "Stroke clinic",
lang: "en"
},
id: "999486031000087102",
idAndFsnTerm: "999486031000087102 | Stroke clinic (environment) |"
},

Am I reading something wrong then?

Connexion ou Créer un compte pour participer à la conversation.

  • Messages : 11
il y a 2 ans 4 mois #7379 par Guillermo Reynoso
Hi Anibal,

An ECL query like "Descendants of X" would always return active concepts, because when a concept is inactivated all the axioms are inactivated, so after classification they have no active relationships --> no parents, inactive concepts don't have ancestors, not even SNOMED CT concept root.

This call to the snowstorm API behind the SNOMED International Browser with the Canadian Edition Sep 30, 2021, would get you the same 236 concepts you get through the browser ECL interface.

browser.snomedtools.org/snowstorm/snomed-ct/MAIN/SNOMEDCT-CA/2021-09-30/concepts?offset=0&limit=1000&termActive=true&ecl=<<426013006

I could not reproduce your abnormal results returning "all concepts" with your example URL, if you can reproduce it consistently, please send the URL to the SNOMED International team for debugging. Really curious to learn how you got them. If you send "Any" in your ECL, you only get the 352832 active concepts in that version of the Canadian edition.

By the way, the first concept in your example (BISMUSAL) was part of a batch move of veterinary pharmaceutical products to a veterinary extension in 2009.

Hope this helps, abrazo...

Connexion ou Créer un compte pour participer à la conversation.

  • Messages : 50
il y a 2 ans 4 mois #7378 par Anibal Jodorcovsky
Hi all,

I'm using the snowstorm API to retrieve concepts given an ECL query.

For instance, this would be the URL:

{{url}}/concepts/?ecl=%3C%3C%20426013006%20|Order%20Saccharomycetales%20(organism)|

If I do this in the SNOMED CT browser I get 236 concepts with the Canadian Edition Sep 30 2021. When I use the snowstorm API (web call) above I get 489035 concepts but as I'm looking at them most of them are inactive:
{
conceptId: "99999003",
fsn: {
term: "BISMUSAL SUSPENSION (product)",
lang: "en"
},
pt: {
term: "BISMUSAL SUSPENSION",
lang: "en"
},
active: false,
effectiveTime: "20090731",
released: true,
releasedEffectiveTime: 20090731,
inactivationIndicator: "MOVED_ELSEWHERE",

How can I use the ECL query and also specify that I want the server to retrieve only active concepts?

Connexion ou Créer un compte pour participer à la conversation.

Modérateurs: Linda MonicoNaomi BrooksHelen Wu

Logo d'InfoCentral

La santé numérique à votre service

 

Transformer les soins de santé au Canada grâce aux technologies de l'information sur la santé.