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

Cohort definition editor loads full list of concept sets multiple times #2887

Closed anthonysena closed 8 months ago

anthonysena commented 9 months ago

Expected behavior

When the cohort definition editor opens, the only requests made to WebAPI are the ones necessary to set up the editor

Actual behavior

When loading a cohort definition, there is a call to the WebAPI/conceptset/ endpoint which loads the full list of concept sets in the WebAPI database for each concept set present in the cohort definition.

Steps to reproduce behavior

Load a cohort definition with > 0 concept sets. Observe the network trace via Google Chrome developer tools:

image

The screenshot above shows 5 calls to WebAPI/conceptset/ which is the number of concept sets in my cohort definition entry event section. If you open an inclusion rule with > 0 concept sets, WebAPI/conceptset/ is once again called for each concept set present in the inclusion rule.

chrisknoll commented 9 months ago

I think this is used to update the concept names or standard/non-standard status of concepts? I'd have to see where the UI makes the call and how the result is used (such as: does it take the result of conceptset/ and update the embedded concept set expression.

anthonysena commented 9 months ago

The linked PR shows where this is happening - essentially that component is used when selecting a concept set from the repository when editing their cohort definition. At the moment, when the components are activated, they make requests to the conceptset/ endpoint. The aim of the PR is to change the behavior to only load the full list of concept sets when that particular component is shown in a modal. The same component may also be used in a non-modal way and so I tried to make the loading behavior backwards compatible and only change the places where it is used in the cohort definition editor.