From 06515b88597620046536aab42e24cb41e061e41e Mon Sep 17 00:00:00 2001 From: Billy Date: Thu, 18 Nov 2021 20:08:34 +0300 Subject: [PATCH 1/2] fixes hts count to remove negative tested --- .../chw/core/interactor/NavigationInteractor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opensrp-chw-core/src/main/java/org/smartregister/chw/core/interactor/NavigationInteractor.java b/opensrp-chw-core/src/main/java/org/smartregister/chw/core/interactor/NavigationInteractor.java index 39d3a13c1e..ebdc2d556c 100644 --- a/opensrp-chw-core/src/main/java/org/smartregister/chw/core/interactor/NavigationInteractor.java +++ b/opensrp-chw-core/src/main/java/org/smartregister/chw/core/interactor/NavigationInteractor.java @@ -6,6 +6,7 @@ import org.smartregister.chw.core.dao.NavigationDao; import org.smartregister.chw.core.utils.CoreConstants; import org.smartregister.chw.fp.util.FamilyPlanningConstants; +import org.smartregister.chw.hiv.util.DBConstants; import org.smartregister.chw.referral.util.Constants; import org.smartregister.family.util.AppExecutors; @@ -387,7 +388,8 @@ private int getCount(String tableName) { " from " + CoreConstants.TABLE_NAME.HTS_MEMBERS + " p " + " inner join ec_family_member m on p.base_entity_id = m.base_entity_id COLLATE NOCASE " + " inner join ec_family f on f.base_entity_id = m.relational_id COLLATE NOCASE " + - " where m.date_removed is null and p.is_closed = '0' and p.ctc_number is null and p.chw_referral_service = 'Suspected HIV' )" ; + " where m.date_removed is null and p.is_closed = '0' and p.ctc_number is null and p.chw_referral_service = 'Suspected HIV' and " + + " ( UPPER (p.client_hiv_status_after_testing) LIKE UPPER('Positive') OR p.client_hiv_status_after_testing IS NULL) )" ; return NavigationDao.getQueryCount(sqlHts); case org.smartregister.chw.hiv.util.Constants.Tables.HIV_INDEX: From 3fc158d2661ad3197ed8058a94c3094aba17d5bb Mon Sep 17 00:00:00 2001 From: Billy Date: Thu, 18 Nov 2021 21:22:58 +0300 Subject: [PATCH 2/2] removed unused import --- .../smartregister/chw/core/interactor/NavigationInteractor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opensrp-chw-core/src/main/java/org/smartregister/chw/core/interactor/NavigationInteractor.java b/opensrp-chw-core/src/main/java/org/smartregister/chw/core/interactor/NavigationInteractor.java index ebdc2d556c..a5ed3a5db6 100644 --- a/opensrp-chw-core/src/main/java/org/smartregister/chw/core/interactor/NavigationInteractor.java +++ b/opensrp-chw-core/src/main/java/org/smartregister/chw/core/interactor/NavigationInteractor.java @@ -6,7 +6,7 @@ import org.smartregister.chw.core.dao.NavigationDao; import org.smartregister.chw.core.utils.CoreConstants; import org.smartregister.chw.fp.util.FamilyPlanningConstants; -import org.smartregister.chw.hiv.util.DBConstants; + import org.smartregister.chw.referral.util.Constants; import org.smartregister.family.util.AppExecutors;