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

SQL Export template error on new Cohort #2825

Closed anton-abushkevich closed 1 year ago

anton-abushkevich commented 1 year ago

Expected behavior

No errors.

Actual behavior

изображение

Steps to reproduce behavior

Create new cohort, observe console log.

chrisknoll commented 1 year ago

There is another issue related to this function, that we may be able to extend this issue to cover:

When you select other sources from the dropdown, the input boxes don't populate with the values of cdmschema, etc. I haven't looked closely a tthe code but what is surprising to me is that the text boxes for each of the paramaters is dynamically built based on what tokens are found in the SQL....but how does the values in the SOURCE map over to the tokens found in the SQL? Seems like this couldn't be done...unless you somehow hard coded that the token 'cdmdatabaseschema' maps over to the cdm schema in the source.

Steps to reproduce:

  1. Go to sql export
  2. Turn on checkbox that will make the replacements from th etextbox
  3. select a source to populate the input boxes based on the values from the Source.
anton-abushkevich commented 1 year ago

You're right, there is a map: https://github.com/OHDSI/Atlas/blob/master/js/components/utilities/sql/sqlExportPanelConfig.js. It maps parameter names to daimon types (https://github.com/OHDSI/Atlas/blob/master/js/pages/configuration/sources/source-manager.js#L39).

anton-abushkevich commented 1 year ago

@chrisknoll I reproduced the issue you mentioned. For sure, parameter values should reflect selected source and it even worked before... Anyway, I fixed it and added to the PR - please check.

chrisknoll commented 1 year ago

Excellent, I will check this as soon as I am able. Thank you.