ExposuresProvider / icees-api

MIT License
2 stars 8 forks source link

Multivariate endpoint issue when using year as input parameter for filtering and for multivariate feature request #289

Closed karafecho closed 10 months ago

karafecho commented 10 months ago

This issue is to report an issue with the multivariate endpoint. Specifically, when a user selects year as an input parameter for filtering AND as a multivariate feature in their request, the results that are returned are correct but confusing, in that all years will be returned in the multivariate output but they will be empty apart from the year that was used for filtering.

Here's an example:


curl -X 'POST' \
  'https://icees-pcd.renci.org/cohort/COHORT%3A1/multivariate_feature_analysis' \
  -H 'accept: text/tabular' \
  -H 'Content-Type: application/json' \
  -d '[
  "TotalEDInpatientVisits",
  "year",
  "PrednisoneRx"
]'
+--------------------------+--------+----------------+-------------+
| TotalEDInpatientVisits   | year   | PrednisoneRx   |   frequency |
+==========================+========+================+=============+
| = 0                      | = 2010 | = 0            |        1311 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2010 | = 1            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2011 | = 0            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2011 | = 1            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2012 | = 0            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2012 | = 1            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2013 | = 0            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2013 | = 1            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2014 | = 0            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2014 | = 1            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2015 | = 0            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2015 | = 1            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2016 | = 0            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2016 | = 1            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2017 | = 0            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2017 | = 1            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2018 | = 0            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2018 | = 1            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2019 | = 0            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2019 | = 1            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2020 | = 0            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2020 | = 1            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2021 | = 0            |           0 |
+--------------------------+--------+----------------+-------------+
| = 0                      | = 2021 | = 1            |           0 |
+--------------------------+--------+----------------+-------------+
karafecho commented 10 months ago

Closing this ticket, as the issue was resolved ...