From 682a83cf763ab7a9325bf2bf1ac2c44023b92acd Mon Sep 17 00:00:00 2001 From: njorocs Date: Fri, 23 Aug 2024 01:06:36 +0300 Subject: [PATCH] Refactoring contacts column name refs from id to patient_id --- .../HTSLinkedIDUContactsCohortDefinitionEvaluator.java | 2 +- .../HTSLinkedPartnerContactsCohortDefinitionEvaluator.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/org/openmrs/module/kenyaemr/reporting/cohort/definition/evaluator/HTSLinkedIDUContactsCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/kenyaemr/reporting/cohort/definition/evaluator/HTSLinkedIDUContactsCohortDefinitionEvaluator.java index 710b42f5ae..c422e069d0 100644 --- a/api/src/main/java/org/openmrs/module/kenyaemr/reporting/cohort/definition/evaluator/HTSLinkedIDUContactsCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/kenyaemr/reporting/cohort/definition/evaluator/HTSLinkedIDUContactsCohortDefinitionEvaluator.java @@ -47,7 +47,7 @@ public EvaluatedCohort evaluate(CohortDefinition cohortDefinition, EvaluationCon Cohort newCohort = new Cohort(); - String qry="select cl.id from kenyaemr_etl.etl_contacts_linked cl where cl.relationship_type =157351 group by cl.id;"; + String qry="select cl.patient_id from kenyaemr_etl.etl_contacts_linked cl where cl.relationship_type =157351 group by cl.patient_id;"; SqlQueryBuilder builder = new SqlQueryBuilder(); builder.append(qry); diff --git a/api/src/main/java/org/openmrs/module/kenyaemr/reporting/cohort/definition/evaluator/HTSLinkedPartnerContactsCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/kenyaemr/reporting/cohort/definition/evaluator/HTSLinkedPartnerContactsCohortDefinitionEvaluator.java index 20579e2a49..8cd08f458e 100644 --- a/api/src/main/java/org/openmrs/module/kenyaemr/reporting/cohort/definition/evaluator/HTSLinkedPartnerContactsCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/kenyaemr/reporting/cohort/definition/evaluator/HTSLinkedPartnerContactsCohortDefinitionEvaluator.java @@ -47,7 +47,7 @@ public EvaluatedCohort evaluate(CohortDefinition cohortDefinition, EvaluationCon Cohort newCohort = new Cohort(); - String qry="select cl.id from kenyaemr_etl.etl_contacts_linked cl where cl.relationship_type =163565 group by cl.id;"; + String qry="select cl.patient_id from kenyaemr_etl.etl_contacts_linked cl where cl.relationship_type =163565 group by cl.patient_id;"; SqlQueryBuilder builder = new SqlQueryBuilder(); builder.append(qry);