Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions app/utils/estimate_prioritization/prioritization_criteria.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
],
'adjustment_testadj': [
lambda estimate: (estimate['pop_adj'] is True) and (estimate['test_adj'] is True),
lambda estimate: (pd.isna(estimate['pop_adj'])) and (estimate['test_adj'] is True),
lambda estimate: (estimate['pop_adj'] is True) and (pd.isna(estimate['test_adj'])),
lambda estimate: (pd.isna(estimate['pop_adj'])) and (estimate['test_adj'] is True),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fair to me @123chrisc - could certainly make a cogent argument that now with higher seroprevalence and better assays, we should prioritize pop-adj test-unadj in these cases

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variables were all checked to match. Sorting pooling functions now!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All variables do have a pooling function. They are also matched to the airtable_fields_config.py

lambda estimate: (pd.isna(estimate['pop_adj'])) and (pd.isna(estimate['test_adj'])),
],
'primary_estimate_testunadj': [
Expand All @@ -24,7 +24,6 @@
lambda estimate: estimate['estimate_grade'] == 'National',
lambda estimate: estimate['estimate_grade'] == 'Regional',
lambda estimate: estimate['estimate_grade'] == 'Local',
lambda estimate: estimate['estimate_grade'] == 'Sublocal',
],
'age': [
lambda estimate: estimate['age'] == 'Multiple groups'
Expand Down Expand Up @@ -53,8 +52,11 @@
],
'test_type': [
lambda estimate: estimate['test_type'] == 'Neutralization',
lambda estimate: estimate['test_type'] == 'Multiple Types',
lambda estimate: estimate['test_type'] == 'ELISA',
lambda estimate: estimate['test_type'] == 'CLIA',
lambda estimate: estimate['test_type'] == 'ELISA'
lambda estimate: estimate['test_type'] == 'LFIA',
lambda estimate: estimate['test_type'] == 'Other',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 'catch-call' cases are already implied to be the last thing in the hierarchy, if they're not listed among the options listed- but it's good to be explicit about them!

],
'specimen': [
lambda estimate: estimate['specimen_type'] != 'Dried Blood'
Expand Down