-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add eligibility to response model - fixes #1292 #1300
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
32a4f10
add eligibility field to Response model/serializer, set value on obje…
becky-gilbert 7ea95c9
add eligibility to the Response fields displayed in admin pages
becky-gilbert fe5b037
add eligibility to response columns available for researcher download…
becky-gilbert 400bfeb
display eligibility value in details table on individual responses page
becky-gilbert bb4fb0e
handle missing fields needed to set eligibility value
becky-gilbert fcf9541
alter child birthday field to not allow blank or null
becky-gilbert 0011558
add a default blank value for Study criteria expression, modify respo…
becky-gilbert 6f67673
fix failing tests: add required birthday to Child instances
becky-gilbert 1d25cc5
Revert "handle missing fields needed to set eligibility value" since …
becky-gilbert 8057c43
Merge branch 'develop' into add-eligibility-to-response-model
becky-gilbert 47dafb7
add tests for child_in_age_range_for_study_days_difference
becky-gilbert bb1f0cd
add tests for eligibility field, get_eligibility_for_response returns…
becky-gilbert 06ed8ca
add more tests, clean up comments
becky-gilbert File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
accounts/migrations/0055_alter_child_birthday_not_null_or_blank.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.2.11 on 2023-11-08 05:47 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("accounts", "0054_update_demo_fields"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="child", | ||
name="birthday", | ||
field=models.DateField(), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
studies/migrations/0094_add_response_eligibility_default_criteria_expression.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Generated by Django 3.2.11 on 2023-11-08 05:47 | ||
|
||
import django.contrib.postgres.fields | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("studies", "0093_remove_studytype_configuration"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="response", | ||
name="eligibility", | ||
field=django.contrib.postgres.fields.ArrayField( | ||
base_field=models.CharField( | ||
choices=[ | ||
("Eligible", "Eligible"), | ||
("Ineligible_TooYoung", "Ineligible Young"), | ||
("Ineligible_TooOld", "Ineligible Old"), | ||
("Ineligible_CriteriaExpression", "Ineligible Criteria"), | ||
("Ineligible_Participation", "Ineligible Participation"), | ||
], | ||
max_length=100, | ||
), | ||
blank=True, | ||
default=list, | ||
size=None, | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="study", | ||
name="criteria_expression", | ||
field=models.TextField(blank=True, default=""), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TextChoices! I should've known about this, very nice.