Skip to content

Commit

Permalink
Updated name of patient count field in stats (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
dogversioning authored Apr 16, 2024
1 parent 415c9fa commit 117ec0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cumulus_library/statistics/counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ def get_where_clauses(
"""Convenience method for constructing arbitrary where clauses.
:param clause: either a string or a list of sql where statements
:param min_subject: if clause is none, the bin size for a cnt_subject filter
:param min_subject: if clause is none, the bin size for a cnt_subject_ref filter
(deprecated, use count_[fhir_resource](min_subject) instead)
"""
if clause is None:
return [f"cnt_subject >= {min_subject}"]
return [f"cnt_subject_ref >= {min_subject}"]
elif isinstance(clause, str):
return [clause]
elif isinstance(clause, list):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_counts_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def test_get_table_name(name, duration, expected):
@pytest.mark.parametrize(
"clause,min_subject,expected,raises",
[
(None, None, ["cnt_subject >= 10"], does_not_raise()),
(None, 5, ["cnt_subject >= 5"], does_not_raise()),
(None, None, ["cnt_subject_ref >= 10"], does_not_raise()),
(None, 5, ["cnt_subject_ref >= 5"], does_not_raise()),
("age > 5", None, ["age > 5"], does_not_raise()),
(["age > 5", "sex =='F'"], None, ["age > 5", "sex =='F'"], does_not_raise()),
("age > 5", 7, ["age > 5"], does_not_raise()),
Expand Down

0 comments on commit 117ec0f

Please sign in to comment.