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 patch #1239

Merged
merged 2 commits into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
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
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;`;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,30 +47,6 @@
"joinCondition": "t2.visit_id = t20.visit_id"
}
},
{
"table": "amrs.patient_identifier",
"alias": "upi",
"join": {
"type": "LEFT",
"joinCondition": "t2.person_id = upi.patient_id AND (upi.voided IS NULL || upi.voided = 0) AND upi.identifier_type = 45"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ovcid",
"join": {
"type": "LEFT",
"joinCondition": "t2.person_id = ovcid.patient_id AND (ovcid.voided IS NULL || ovcid.voided = 0) AND ovcid.identifier_type = 43"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ccc",
"join": {
"type": "LEFT",
"joinCondition": "t2.person_id = ccc.patient_id AND (ccc.voided IS NULL || ccc.voided = 0) AND ccc.identifier_type = 28"
}
},
{
"table": "etl.program_visit_map",
"alias": "t21",
Expand Down Expand Up @@ -117,21 +93,6 @@
"alias": "d",
"column": "date_format(t2.scheduled_date,'%Y-%m-%d')"
},
{
"type": "simple_column",
"alias": "ccc_number",
"column": "ccc.identifier"
},
{
"type": "simple_column",
"alias": "ovcid_id",
"column": "ovcid.identifier"
},
{
"type": "simple_column",
"alias": "upi_number",
"column": "upi.identifier"
},
{
"type": "simple_column",
"alias": "med_pick_up_date",
Expand Down
39 changes: 0 additions & 39 deletions app/reporting-framework/json-reports/hiv-summary-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,6 @@
"type": "INNER",
"joinCondition": "fhs.person_id = p.person_id"
}
},
{
"table": "amrs.patient_identifier",
"alias": "upi",
"join": {
"type": "LEFT",
"joinCondition": "fhs.person_id = upi.patient_id AND (upi.voided IS NULL || upi.voided = 0) AND upi.identifier_type = 45"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ovcid",
"join": {
"type": "LEFT",
"joinCondition": "fhs.person_id = ovcid.patient_id AND (ovcid.voided IS NULL || ovcid.voided = 0) AND ovcid.identifier_type = 43"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ccc",
"join": {
"type": "LEFT",
"joinCondition": "fhs.person_id = ccc.patient_id AND (ccc.voided IS NULL || ccc.voided = 0) AND ccc.identifier_type = 28"
}
}
],
"columns": [
Expand Down Expand Up @@ -80,21 +56,6 @@
"expression": "if(fhs.cur_arv_line=2,1,null)"
}
},
{
"type": "simple_column",
"alias": "ccc_number",
"column": "ccc.identifier"
},
{
"type": "simple_column",
"alias": "ovcid_id",
"column": "ovcid.identifier"
},
{
"type": "simple_column",
"alias": "upi_number",
"column": "upi.identifier"
},
{
"type": "derived_column",
"alias": "on_tdf_3tc_efv_400",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,6 @@
"type": "INNER",
"joinCondition": "l.location_id = hmsd.location_id"
}
},
{
"table": "amrs.patient_identifier",
"alias": "upi",
"join": {
"type": "LEFT",
"joinCondition": "hmsd.person_id = upi.patient_id AND (upi.voided IS NULL || upi.voided = 0) AND upi.identifier_type = 45"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ovcid",
"join": {
"type": "LEFT",
"joinCondition": "hmsd.person_id = ovcid.patient_id AND (ovcid.voided IS NULL || ovcid.voided = 0) AND ovcid.identifier_type = 43"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ccc",
"join": {
"type": "LEFT",
"joinCondition": "hmsd.person_id = ccc.patient_id AND (ccc.voided IS NULL || ccc.voided = 0) AND ccc.identifier_type = 28"
}
}
],
"columns": [
Expand All @@ -58,21 +34,6 @@
"alias": "age",
"column": "hmsd.age"
},
{
"type": "simple_column",
"alias": "ccc_number",
"column": "ccc.identifier"
},
{
"type": "simple_column",
"alias": "ovcid_id",
"column": "ovcid.identifier"
},
{
"type": "simple_column",
"alias": "upi_number",
"column": "upi.identifier"
},
{
"type": "simple_column",
"alias": "person_id",
Expand Down
39 changes: 0 additions & 39 deletions app/reporting-framework/json-reports/main-dataset-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,6 @@
"type": "LEFT",
"joinCondition": "csm.person_id = hmsd.person_id AND csm.endDate = hmsd.endDate"
}
},
{
"table": "amrs.patient_identifier",
"alias": "upi",
"join": {
"type": "LEFT",
"joinCondition": "hmsd.person_id = upi.patient_id AND (upi.voided IS NULL || upi.voided = 0) AND upi.identifier_type = 45"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ovcid",
"join": {
"type": "LEFT",
"joinCondition": "hmsd.person_id = ovcid.patient_id AND (ovcid.voided IS NULL || ovcid.voided = 0) AND ovcid.identifier_type = 43"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ccc",
"join": {
"type": "LEFT",
"joinCondition": "hmsd.person_id = ccc.patient_id AND (ccc.voided IS NULL || ccc.voided = 0) AND ccc.identifier_type = 28"
}
}
],
"columns": [
Expand All @@ -61,21 +37,6 @@
"alias": "birthdate",
"column": "hmsd.birthdate"
},
{
"type": "simple_column",
"alias": "ccc_number",
"column": "ccc.identifier"
},
{
"type": "simple_column",
"alias": "ovcid_id",
"column": "ovcid.identifier"
},
{
"type": "simple_column",
"alias": "upi_number",
"column": "upi.identifier"
},
{
"type": "simple_column",
"alias": "age",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,30 +56,6 @@
"joinCondition": "t1.person_id = pa.person_id"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ovc_id",
"join": {
"type": "LEFT",
"joinCondition": "t1.person_id = ovc_id.patient_id AND (ovc_id.voided IS NULL || ovc_id.voided = 0) AND ovc_id.identifier_type = 43"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ccc",
"join": {
"type": "LEFT",
"joinCondition": "t1.person_id = ccc.patient_id AND (ccc.voided IS NULL || ccc.voided = 0) AND ccc.identifier_type = 28"
}
},
{
"table": "amrs.patient_identifier",
"alias": "upi",
"join": {
"type": "LEFT",
"joinCondition": "t1.person_id = upi.patient_id AND (upi.voided IS NULL || upi.voided = 0) AND upi.identifier_type = 45"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ovc_id",
Expand Down Expand Up @@ -108,16 +84,6 @@
"alias": "person_id",
"column": "t1.person_id"
},
{
"type": "simple_column",
"alias": "upi_number",
"column": "upi.identifier"
},
{
"type": "simple_column",
"alias": "ccc_number",
"column": "ccc.identifier"
},
{
"type": "derived_column",
"alias": "person_name",
Expand All @@ -139,11 +105,6 @@
"alias": "ovc_identifier",
"column": "ovc_id.identifier"
},
{
"type": "simple_column",
"alias": "ovcid_id",
"column": "ovc_id.identifier"
},
{
"type": "derived_column",
"alias": "phone_number",
Expand Down
Loading