OHDSI Home | Forums | Wiki | Github

How are "Add Concept" dialogs linked to the DB?

I am having a problem with the “add concept” dialogs in the Cohort section of my installation. They are always empty, even though the concept data is present in the database and it can be looked up in the vocabulary search. Also, when I click “Import” rather then “Add” when adding criteria to a cohort I can access the concept with the ID I obtain from the vocabulary search without a problem. Would anyone be able to nudge me in the right direction how I can fix this dialog?

Here is the “Add Concept” dialog from the Atlas demo installation when trying to add an ethnicity to the criteria:

Here is the same dialog on my local installation:

However, if I click on “Import” rather than on “Add” I can use the code I found in the vocabulary section and/or your demo sever to put in the correct information.

I have also verified this information is present in the database backend.

Hi @kaiwpost,

It’s odd that you can import codes that can get resolved, but the search doesn’t show any results. I tried to reproduce this on our own env, and pulling up the dialog does show default ethnicity options. If you could go to your Chrome console (ctrl-shift i) and then start a new cohort -> open the ‘add concept’ dialog, you should see some requests in your network console going to the url that looks like:

https://yourWebAPIHost:8443/WebAPI/vocabulary/VOCABULARY_20170920/search

Note, you should look for the POST request. If you look at the the request payload, you should see this JSON string:

{"QUERY":"","DOMAIN_ID":["Ethnicity"],"INVALID_REASON":"V"}

Most likely you have multiple Vocabulary sources set up, and the one you are querying doesn’t have data in it?

Alteriatively, you can set a breakpoint in js/modules/WebAPIProvider/VocabularyProvider.js on line 95.and then perform the query. YOu’ll be able to inspect what the URL is being querried (online 104), what the defaultSource it’s going to use for the query (also on line 104). It’s a bit harder to simulate a POST request without other tools, but hopefully this inspection of the code is enough of a hint to understand why you might be querying the wrong database?

-Chris

Hi, Just a followup:

I traced through the code and there is a slight difference between the Add and Import modes of selecting concepts: when you Add, it does a vocabulary search on the domain ID (In this case, Domain_id of ‘Ethnicity’). In the case you import by concept ID, it doesn’t matter what the domain is, you’re just going to do a direct lookup. So I think that you have the vocabulary data, but something is amiss with your DOMAIN_ID for those concepts. Would you be able to query the database directly and learn what DOMAIN_ID those concepts are? It might be a case sensitivity thing…

t