diff --git a/pyproject.toml b/pyproject.toml index c1a2dae..ba97844 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "hutch-bunny" -version = "1.0.0-alpha.4" +version = "1.0.0-alpha.5" description = "A Cohort Discovery Task API worker" license = { text = "MIT License" } readme = "README.md" diff --git a/src/hutch_bunny/core/solvers/query_solvers.py b/src/hutch_bunny/core/solvers/query_solvers.py index 5cfadb4..ebece3e 100644 --- a/src/hutch_bunny/core/solvers/query_solvers.py +++ b/src/hutch_bunny/core/solvers/query_solvers.py @@ -128,7 +128,7 @@ def solve_query(self, results_modifier: list) -> Tuple[str, int]: if rounding > 0: stmnt = ( select( - func.count(table.person_id), + func.round((func.count() / rounding)) * rounding, Concept.concept_id, Concept.concept_name, ) @@ -138,7 +138,7 @@ def solve_query(self, results_modifier: list) -> Tuple[str, int]: else: stmnt = ( select( - func.round((func.count() / rounding)) * rounding, + func.count(table.person_id), Concept.concept_id, Concept.concept_name, )