Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Age of >18 years #292

Closed
bcorrie opened this issue Dec 4, 2019 · 6 comments
Closed

Age of >18 years #292

bcorrie opened this issue Dec 4, 2019 · 6 comments
Labels
ADC API V1 AIRR Data Commons API V1
Projects
Milestone

Comments

@bcorrie
Copy link
Contributor

bcorrie commented Dec 4, 2019

Our current spec says:

    age_max:
        type: number
        description: Upper boundary of age range or equal to age_min for specific age. This field should only be null if age_min is null.

How would I capture the age range of a subject where the ages of the subjects are stratified as in
age > 18 or age <= 18

The current spec says that age_max can't be null, which prevents one possibility - age_min = 18.001, age_max = null

Perhaps age_min = 18.001, age_max = 999 and age_min = 0, age_max = 18 assuming age_unit = 'year'

@bussec
Copy link
Member

bussec commented Dec 10, 2019

I am not a big fan of requiring users to enter arbitrary data into fields just to ensure that a query succeeds. So how far can/should we deviate from what you described before? If we assume that NULL in the data indicates an unbounded interval, this could be represented by an additional
OR data_(min|max) IS NULL condition on both sides of the AND in your example.

And while we are at it: age_* is a closed interval, yes?

@bcorrie
Copy link
Contributor Author

bcorrie commented Dec 10, 2019

And while we are at it: age_* is a closed interval, yes?

Yes, I would think so...

@bcorrie
Copy link
Contributor Author

bcorrie commented Dec 10, 2019

I am not a big fan of requiring users to enter arbitrary data into fields just to ensure that a query succeeds. So how far can/should we deviate from what you described before? If we assume that NULL in the data indicates an unbounded interval, this could be represented by an additional OR data_(min|max) IS NULL condition on both sides of the AND in your example.

I prefer using NULL as an indicator of an unbounded limit as well, but our current spec doesn't allow this, in fact it explicitly says this is not allowed. Does anyone remember the reason for that, in particular the explicit statement that it is not allowed...

@schristley
Copy link
Member

Does anyone remember the reason for that, in particular the explicit statement that it is not allowed...

It is essentially implied by the queries. Because we decided to combine single point age with age intervals into the same fields, that introduces requirements so that this query (for both a single age and for an interval) works:

30 >= age_min && 30 <= age_max

this could be represented by an additional
OR data_(min|max) IS NULL condition on both sides of the AND in your example

I think so.

30 >= age_min && (30 <= age_max || age_max is null)

@bcorrie bcorrie added ADC API V1 AIRR Data Commons API V1 AIRRv1.3 labels Jan 6, 2020
@bcorrie
Copy link
Contributor Author

bcorrie commented Jan 16, 2020

This needs to ensure that we have the ability to check for null - See #298 (comment)

@javh javh added this to the AIRR v1.3 milestone Feb 19, 2020
@javh javh added this to In progress in ADC API Feb 19, 2020
@bcorrie
Copy link
Contributor Author

bcorrie commented Feb 26, 2020

This needs to ensure that we have the ability to check for null - See #298 (comment)

Separate tests have been created for null fields, so closing this issue.

@bcorrie bcorrie closed this as completed Feb 26, 2020
@bcorrie bcorrie moved this from In progress to Done in ADC API Mar 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADC API V1 AIRR Data Commons API V1
Projects
ADC API
  
Done
Development

No branches or pull requests

4 participants