-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* add eligibility field to Response model/serializer, set value on object creation, add/refactor queries, add helper * add eligibility to the Response fields displayed in admin pages * add eligibility to response columns available for researcher download/display * display eligibility value in details table on individual responses page * alter child birthday field to not allow blank or null * add a default blank value for Study criteria expression, modify response eligibility migration to include change to Study model * fix failing tests: add required birthday to Child instances * add tests for child_in_age_range_for_study_days_difference * add tests for eligibility field, get_eligibility_for_response returns sorted list of eligibility strings
- Loading branch information
1 parent
251aacc
commit 5d170da
Showing
13 changed files
with
768 additions
and
11 deletions.
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.