ExposuresProvider / icees-api

MIT License
2 stars 8 forks source link

fixed the association query bug with value 0 in the query #245

Closed hyi closed 1 year ago

hyi commented 1 year ago

In particular, this PR fixes the following query:

curl -X 'POST' \
  'https://icees-asthma.renci.org/patient/cohort/COHORT%3A1/feature_association?year=2010' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "feature_a": {
    "MaxDailyPM2.5Exposure_StudyMax": {
      "operator": "<",
      "value": "3"
    }
  },
  "feature_b": {
    "PrednisoneRx": {
      "operator": "=",
      "value": "0"
    }
  }
}'

which returned "return value": "Invalid input value 0 for feature PrednisoneRx. Please try again." initially, and with this bugfix PR, it will return correct association metrices.