Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POC-115b: load all records without limit #1235

Merged
merged 1 commit into from
Apr 11, 2023
Merged
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
15 changes: 5 additions & 10 deletions app/family-history/family-history.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,39 +116,34 @@ export class FamilyTestingService {
columns +
from +
where +
' and obs_group_id is not null and extract(year from (from_days(datediff(t1.date_elicited,t1.fm_dob)))) < 20 AND t1.relationship_type in ("CHILD","MOTHER","FATHER") AND fm_name is not null LIMIT 2000 OFFSET ' +
params.startIndex;
' and obs_group_id is not null and extract(year from (from_days(datediff(t1.date_elicited,t1.fm_dob)))) < 20 AND t1.relationship_type in ("CHILD","MOTHER","FATHER") AND fm_name is not null ';
} else if (params.elicited_clients == 5) {
//'Sexual partners'
sql +=
columns +
from +
where +
' and obs_group_id is not null and t1.relationship_type in ("PARTNER-SPOUSE","PARTNER-OTHER","FELLOW-WIFE") AND fm_name is not null LIMIT 2000 OFFSET ' +
params.startIndex;
' and obs_group_id is not null and t1.relationship_type in ("PARTNER-SPOUSE","PARTNER-OTHER","FELLOW-WIFE") AND fm_name is not null ';
} else if (params.elicited_clients == 6) {
//'Siblings'
sql +=
columns +
from +
where +
' and obs_group_id is not null and t1.relationship_type in ("SIBLING") AND fm_name is not null LIMIT 2000 OFFSET ' +
params.startIndex;
' and obs_group_id is not null and t1.relationship_type in ("SIBLING") AND fm_name is not null ';
} else if (params.elicited_clients == 7) {
//'Uncategorized contacts'
sql +=
columns +
from +
where +
' and obs_group_id is not null and t1.relationship_type not in ("SIBLING","PARTNER-SPOUSE","PARTNER-OTHER","FELLOW-WIFE","CHILD","MOTHER","FATHER") AND fm_name is not null LIMIT 2000 OFFSET ' +
params.startIndex;
' and obs_group_id is not null and t1.relationship_type not in ("SIBLING","PARTNER-SPOUSE","PARTNER-OTHER","FELLOW-WIFE","CHILD","MOTHER","FATHER") AND fm_name is not null ';
} else {
sql +=
columns +
from +
where +
' and obs_group_id is not null AND fm_name is not null LIMIT 2000 OFFSET ' +
params.startIndex;
' and obs_group_id is not null AND fm_name is not null ';
}

queryParts = {
Expand Down