OHDSI Home | Forums | Wiki | Github

How to get the list of related measurement concept ids from the same family?

Hello Everyone,

Let’s say I am trying to find the people with eGFR measurement in CDM data.

But I also understand that certain patient measurements might be coded as eGFR - Male and eGFR - Female.

But if I wish to extract all patients with eGFR measurement, should I manually find the concept ids for all these measurements and use them in my SQL query?

I also see that Atlas has an option to select the children and parent of the given concept. Am I right?

If we like to do this outside Atlas, meaning write a query in postgresql db, how can I find all the concept_ids that are related to eGFR? Is there any table that will have all this?

Am I right in doing the below?

select concept_id_2 from cdm.concept_relationship where concept_id_1 = 123456789( dummy example - eGFR male)

Based on my research in the forum, I find out that there can be multiple related items for a concept and it’s bidirectional. So concept_id_1 or concept_id_2 doesn’t matter. Am I right?

As you can see below, if I just key-in a concept_id for one of the Respiratory rate here, I would like to get all related concept_ids (not sure whether everything in screenshot below is related though)

If it’s incorrect, Can someone help me understand or share a sample query on how to extract all the related measurements given an input concept_id?

Thanks
Selva

tables are:

  • concept_ancestor
  • concept_relationship

you can also try https://github.com/vojtechhuser/Athenian and https://github.com/vojtechhuser/Athenian/blob/master/vignette.R

Right now, a functional comprehensive hierarchy only exists for Conditions, Drugs, Visits and Geographic Regions. We are rolling it out for Procedures. Measurements and Devices don’t have that yet. So, yes, the right way to do it is to create Conceptsets by hand through querying the Concept Names.

t