OHDSI / Atlas

ATLAS is an open source software tool for researchers to conduct scientific analyses on standardized observational data
http://atlas-demo.ohdsi.org/
Apache License 2.0
258 stars 126 forks source link

Concept added to Concept Set instead of Cohort Definition #2868

Open ttemnikova opened 1 year ago

ttemnikova commented 1 year ago

Expected behavior

When importing concepts to a local concept set of a cohort definition, cohort characterization or incidence rates, the selected concepts are added to the cohort definition, cohort characterization or incidence rates analysis accordingly. The button to add the concept has a text "Add to Concept Set" and adds the concept(s) locally.

Actual behavior

When importing concepts to a local concept set of a cohort definition, cohort characterization or incidence rates, the selected concepts are added to a new separate concept set. The button to add the concept has a text "Add to New Concept Set" and adds the concept(s) to a new separate concept set.

Steps to reproduce behavior

  1. Clear browser cookies or use the incognito mode
  2. Login to Atlas
  3. Create a cohort definition / cohort characterization / incidence rates
  4. Go to the Concept Sets tab
  5. Click the Import button
  6. Go to the Source Codes tab
  7. Paste a source code and click the Search concepts button
  8. Select a concept from the search result
  9. Click the Add button
chrisknoll commented 11 months ago

I am not seeing this behavior (on latest master branch): image

I went to a cohort definition, went to the concept sets, clicked import button, switched to source codes, entered 'E09' as a source code, selected the 2 concepts, and only 'Add to Concept Set' was shown (see picture). Clicking add did add it to the local concept set.

chrisknoll commented 11 months ago

Update, I can reporduce this, it doesn't require 'Import' but rather if you start with a empty cohort def (or incidence rate analysis), and click 'new concept set', the new concept set does not appear to be associated in the 'ConceptSetManager' which keeps track of the included source codes. Because that is not done (hypothetically) it assumes that you want to add to a new concept set to the repository concept (which is the default behavior for this UI component).

The core issue is that the UI element is not being associatd to the 'active' concept set for this asset (cohort definition/incidence rate, etc).