ExposuresProvider / icees-api

MIT License
2 stars 8 forks source link

Apparent issue with Race variable #301

Closed karafecho closed 6 months ago

karafecho commented 6 months ago

This issue is to report an issue that appears to be specific to Race but may apply to other string variables (not tested). The issue is defined below.

For COHORT:1 (year = 2020), the following multivariate query returns results.

curl -X 'POST' \
  'https://icees-pcd.renci.org/cohort/COHORT%3A6/multivariate_feature_analysis?year=2020' \
  -H 'accept: text/tabular' \
  -H 'Content-Type: application/json' \
  -d '[
  "TotalEDInpatientVisits",
  "Sex2",
  "Race"
]'

For COHORT:4 (year = 2020, Race = Caucasian, AA, Asian): the same query returns an error.

curl -X 'POST' \
  'https://icees-pcd.renci.org/cohort/COHORT%3A4/multivariate_feature_analysis?year=2020' \
  -H 'accept: text/tabular' \
  -H 'Content-Type: application/json' \
  -d '[
  "TotalEDInpatientVisits",
  "Sex2",
  "Race"
]'

+---------+
| error   |
+=========+
| 'value' |
+---------+

For COHORT:6 (year=2020. TotalEDInpatientVisits <= 9), the same query returns results.

curl -X 'POST' \
  'https://icees-pcd.renci.org/cohort/COHORT%3A6/multivariate_feature_analysis?year=2020' \
  -H 'accept: text/tabular' \
  -H 'Content-Type: application/json' \
  -d '[
  "TotalEDInpatientVisits",
  "Sex2",
  "Race"
]'

It appears that Race cannot be included in the multivariate call if it was also selected for cohort creation. The same issue does not apply to TotalEDInpatientVisits, but rather appears to be specific to Race.

The issue is generalizable. A 2x2 Sex2 x AsthmaDx query returns results for COHORT:1 and COHORT:6 but returns the same value error for COHORT:4.

karafecho commented 6 months ago

Hong fixed the bug. Hong and Kara tested and confirmed that the fix indeed resolved the issue.

Closing ticket accordingly ...