IHTSDO / snowstorm

Scalable SNOMED CT Terminology Server using Elasticsearch
Other
204 stars 80 forks source link

get problems according to human body system #479

Closed juanidepapi closed 1 year ago

juanidepapi commented 1 year ago

hello. I would like to know how to perform an ECL query to obtain, for example, the number of diagnoses registered in an EHR related to the respiratory, digestive system... It is for surveillance and statistical purposes.

thank you so much!

kaicode commented 1 year ago

Hi juanidepapi,

This would be a two step process:

  1. Use a terminology server to select the SNOMED CT concepts of interest
  2. Use an EHR/Patient repository to select patients with a matching diagnoses

I can help with the first part!

To create the SNOMED CT query I would recommend starting in a SNOMED CT Browser. Using the International Edition to create this sort of high level query is fine.

Find a concept that best represents the type of finding or diagnoses you are interested in. Following your example I searched for "respiratory disorder" and found 50043002 |Disorder of respiratory system (disorder)|.

Screenshot 2023-02-08 at 12 50 01

Make sure you select a concept with a (finding) or (disorder) tag in the name when searching for diagnoses.

Using the ECL query language we can select all the types of 50043002 |Disorder of respiratory system (disorder)| in SNOMED CT using a descendants of self constraint like this: <<50043002 |Disorder of respiratory system (disorder)|.

We can run that ECL query to fetch the matched concepts by expanding an intensional ValueSet in the FHIR API: /fhir/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=ecl/<<50043002|Disorder%20of%20respiratory%20system%20(disorder)|

Please note that the public Snowstorm instance (https://snowstorm.ihtsdotools.org/fhir) is for reference and testing purposes only. Please run your own instance of Snowstorm or another SNOMED CT FHIR terminology server for scripting/application development/production purposes.

Does that answer your question?

Kai

kaicode commented 1 year ago

If you look at the children of concept 362965005 |Disorder of body system (disorder)| many of those may be of interest to you. http://snomed.info/id/362965005

Screenshot 2023-02-08 at 13 01 32
juanidepapi commented 1 year ago

Hello Kai!. Thank you very much for your answer.

I think I understood your explanation perfectly. I'll put it to the test and let you know how it went