Skip to content

Commit

Permalink
Excluding voided relationships
Browse files Browse the repository at this point in the history
  • Loading branch information
njorocs committed Sep 26, 2024
1 parent 44eeb4a commit 8ca3b7d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public EvaluatedPersonData evaluate(PersonDataDefinition definition, EvaluationC
" concat_ws( ' ', pn.family_name, pn.given_name, pn.middle_name ))), 11) as latest_case_manager, max(r.start_date)\n" +
" as start_date FROM relationship r INNER JOIN relationship_type t ON r.relationship = t.relationship_type_id\n" +
" INNER JOIN person_name pn ON r.person_a = pn.person_id WHERE t.uuid = '9065e3c6-b2f5-4f99-9cbf-f67fd9f82ec5'\n" +
" and date(r.start_date) <= (:endDate) GROUP BY case_manager_id) as t;";
" and date(r.start_date) <= (:endDate) and r.end_date is null and r.voided = 0 GROUP BY case_manager_id) as t;";

SqlQueryBuilder queryBuilder = new SqlQueryBuilder();
queryBuilder.append(qry);
Expand Down

0 comments on commit 8ca3b7d

Please sign in to comment.