OHDSI Home | Forums | Wiki | Github

Unable to register descendant concepts in Atlas

Hi,

I have fixed up Atlas on a local server and am trying to build concept sets. I would like to select hypertensive disorder (concept ID 316866) which has a non-zero descendant record count. However, when adding it to my concept set and selecting descendants, the concepts fail to show up under ‘included concepts’. Am I missing something?

Non-zero Descendant record count

Unable to register concepts under ‘Included Concepts’

Thank you :slight_smile:

Right mouse click and hit Inspect, go to Console. Do you see any errors there?

Also, does your vocabulary have all tables, like concept_ancestor and concept_relationship?

Thanks, here is the error message when I click on inspect.

I checked in SQL that the concept_ancestor and concept_relationship table exist, and have records shown below:

concept_ancestor:

concept_relationship:

Can you try going to this URL? It is the WebAPI endpoint for obtaining all related concepts for that concept, and it is the data that is used in the Atlas user interface. Do you see any errors in the response?

<WebAPI URL>/vocabulary/<source key of your vocabulary daimon>/concept/316866/related

it looks okay, at this URL I can see the related concepts:

Thks

My apologies @Ajit_Londhe, although the page loaded, I did indeed find a warning message in the console when going to the URL:

Tagging @Chris_Knoll as well as this is related to another post

Thank you very much,

Best Regards,
Hui Xing

You can ignore the warning when accessing the WebAPI url directly fromt he browser: the browser is expecting the URL to result in a HTML document, but the webservice is saying that the response was application/json.

Another thing to do in the console when viewing Atlas: when you open a new concept set, you should see requests to the server on the Network tab of the console. One of those will be related to getting the related concepts (ie: the endpoint that Ajit pointed you at). You can look at the payload and see if there’s anything in the result. It would be very strange to see a result in the JSON payload, but no records displayed in the table.

Thanks, @Chris_Knoll.

Are you referring to when we search for the concept under ‘Search’? I tried searching for concept 318666 which had a request to see related concepts. It seems there is a payload, Does this help? :slight_smile:



Thanks very much,
Hui Xing

I thought we were talking about the ‘Included Concepts’ tab under a concept set? That’s not search…

I was saying that you should: Open Atlas, open your browser console. Navigate to Concept Sets, open a concept set, then navigate to the ‘Included Concepts’ tab, and then check your network for the payload. What you did on the search screen is showing you what the search page requests from the server, but you need to look at what the included concepts page is doing from the server (since it appears the included concepts request is the one returning zero elements).

I see… thanks @Chris_knoll, pardon for the confusion. Below is the screenshot when I navigate to Concept Sets, open a concept set (in this case this concept set #6 comprises concept id 316866 ‘Hypertensive disorder’ and its decendants ticked) , then navigate to the ‘Included Concepts’ tab, and check the network for the payload.

Could you point me to the request related to getting the related concepts or how to go about checking?

Thanks very much,
Regards
Hui Xing

The call to ‘resolveConceptSetExpression’ will resolve the concept set into the specific concept_ids (for the included concepts tab), and then the call to identifiers converts the individual concept_ids into actual Concept objects. You should look inside both those requests.

I created this on the public atlas-demo site to see it work: http://atlas-demo.ohdsi.org/#/conceptset/1867437/included-conceptsets

@Chris_Knoll: Ah indeed…thanks for the pointer…you are right! The requests as seen on public atlas has a response but ours is returning no results. Is there a way we can resolve this?

Public Atlas

resolveConceptSetExpression - response is nonempty

identifiers - response is nonempty

Our local copy of Atlas

resolveConceptSetExpression - response is empty

The headers for the request:


identifiers - response is empty

The headers for the request:


Thank you!

Put the concept set into a cohort expression, and look at the SQL that is generated. The first query that populates the #codeset table and you can run the query directly on your own db server.

Thanks for the tip, @Chris_Knoll.

We obtained the code below and ran it directly on our db server. We are using MSSQL, and replaced the @vocabulary_database_schema with ‘cdm.dbo’, which is our schema where our vocabulary tables reside.

The result is that there are 0 rows obtained. Was wondering if the desired result is for some concept ids to be selected’?

Thanks!
Hui Xing

if that query returns no records, then that explains why the Atlas UI doesn’t show any records. Run pieces of that query and figure out why you’re not getting any records back.

Why is this query not returning any records but the other examples above did? is it something about the ‘invalid_reason’ column?

Ahh yes…After commenting out the criteria for invalid_reason, it does return some concepts:

Took a look at some of these records from the concepts table, and it seems the invalid_reason for these concepts is ‘’ (i.e. blank) instead of NULL:

In that case, would it help to update the blank records to NULL using the following code?
The logic is, if the valid end date is in 2099, it is still a valid concept, and hence, invalid reason can be changed from blank to ‘NULL’:

update cdm.dbo.CONCEPT
set invalid_reason = NULL
where year(valid_end_date)=2099

Thanks!
Regards,
Hui Xing

You could try that but there may be other columns in your database that contain ‘’ instead of null. So you might want to check your data.

Got it, thank you so much, @Chris_Knoll!

Hi all, just to update that the descendant concepts are now showing after we updated the invalid_reason to NULL for the concepts which had a valid_end_date in 2099. Thanks for the help!

Regards,
Hui Xing

t