Skip to content

Commit

Permalink
Remove limit and fix reviewed clients filters
Browse files Browse the repository at this point in the history
  • Loading branch information
drizzentic committed Apr 13, 2023
1 parent 33811e0 commit bd244b4
Showing 1 changed file with 10 additions and 33 deletions.
43 changes: 10 additions & 33 deletions app/family-history/family-history.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,12 +426,7 @@ export class FamilyTestingService {
break;
}

sql +=
columns +
from +
w +
' group by tx.person_id LIMIT 2000 OFFSET ' +
params.startIndex;
sql += columns + from + w + ' group by tx.person_id';
return sql;
}

Expand All @@ -455,12 +450,7 @@ export class FamilyTestingService {
break;
}

sql +=
columns +
from +
w +
' group by tx.person_id LIMIT 2000 OFFSET ' +
params.startIndex;
sql += columns + from + w + ' group by tx.person_id';

return sql;
}
Expand Down Expand Up @@ -488,16 +478,12 @@ export class FamilyTestingService {
break;
}

sql +=
columns +
w +
' group by tx.person_id LIMIT 2000 OFFSET ' +
params.startIndex;
sql += columns + from + w + ' group by tx.person_id';

return sql;
}

revießwedWithChildren(params, sql, columns, from, where) {
reviewedWithChildren(params, sql, columns, from, where) {
let w =
where +
` and t8.location_id in (${params.locations})
Expand All @@ -520,12 +506,7 @@ export class FamilyTestingService {
break;
}

sql +=
columns +
from +
w +
' group by tx.person_id LIMIT 2000 OFFSET ' +
params.startIndex;
sql += columns + from + w + ' group by tx.person_id';

return sql;
}
Expand Down Expand Up @@ -554,11 +535,7 @@ export class FamilyTestingService {
break;
}

sql +=
columns +
w +
' group by tx.person_id LIMIT 2000 OFFSET ' +
params.startIndex;
sql += columns + from + w + ' group by tx.person_id';

return sql;
}
Expand All @@ -578,7 +555,7 @@ export class FamilyTestingService {
SEPARATOR ', ') AS phone_number,
DATE_FORMAT(t1.arv_first_regimen_start_date,
'%d-%m-%y') AS arv_first_regimen_start_date,
pr.name as patient_program_name,
pr.name as patient_program,
1 AS hideContactColumns
FROM
amrs.person t2
Expand Down Expand Up @@ -609,9 +586,9 @@ FROM
AND contacts.person_attribute_type_id IN (10 , 48))
LEFT JOIN
etl.flat_family_testing_index ft ON (t1.person_id = ft.person_id)
WHERE
WHERE t1.location_id in(${params.locations}) and
ft.person_id IS NULL
AND pr.uuid IN ('${params.programs}')
GROUP BY t1.person_id LIMIT 300 OFFSET ${params.startIndex};`;
GROUP BY t1.person_id;`;
}
}

0 comments on commit bd244b4

Please sign in to comment.