From 63c69b47b5535c3b4eff0c631891b1b1e1231c21 Mon Sep 17 00:00:00 2001 From: qaziabubakar-vd <qaziabubakar47@gmail.com> Date: Fri, 17 Jun 2022 10:43:52 +0500 Subject: [PATCH 1/5] identify files --- opensrp-chw/build.gradle | 4 ++-- .../main/java/org/smartregister/chw/reporting/ChwReport.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/opensrp-chw/build.gradle b/opensrp-chw/build.gradle index c7cb877a22..1843ee3662 100644 --- a/opensrp-chw/build.gradle +++ b/opensrp-chw/build.gradle @@ -7,7 +7,7 @@ buildscript { dependencies { classpath 'org.apache.commons:commons-lang3:3.10' classpath 'com.android.tools.build:gradle:4.0.2' - classpath 'com.google.gms:google-services:4.3.4' + // classpath 'com.google.gms:google-services:4.3.4' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1' } } @@ -42,7 +42,7 @@ allprojects { apply plugin: 'com.android.application' apply plugin: 'jacoco' apply plugin: 'com.github.kt3k.coveralls' -apply plugin: 'com.google.gms.google-services' +//apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.firebase.crashlytics' apply from: "jacoco.gradle" apply plugin: 'kotlin-android' diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/reporting/ChwReport.java b/opensrp-chw/src/main/java/org/smartregister/chw/reporting/ChwReport.java index 5c420e217d..bc521f40e6 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/reporting/ChwReport.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/reporting/ChwReport.java @@ -81,6 +81,7 @@ public static void showIndicatorVisualisations(ViewGroup mainLayout, List<Map<St public static void showSupervisorIndicatorVisualisations(ViewGroup mainLayout, List<Map<String, IndicatorTally>> indicatorTallies, Activity context) { // Sync completion rate ror entire catchment area + // PieChartSlice chartSlice1 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, COUNT_PROVIDER_SYNCED_COMPLETED, "Sync Completed", mainLayout.getContext().getResources().getColor(R.color.pie_chart_yes_green), indicatorTallies, COUNT_PROVIDER_SYNCED_COMPLETED); PieChartSlice chartSlice2 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, COUNT_PROVIDER_SYNCED_PENDING, "Sync Pending", mainLayout.getContext().getResources().getColor(R.color.pie_chart_no_red), indicatorTallies, COUNT_PROVIDER_SYNCED_PENDING); appendView(mainLayout, new PieChartIndicatorView(mainLayout.getContext(), ReportingUtil.getPieChartDisplayModel(ReportingUtil.addPieChartSlices(chartSlice1, chartSlice2), R.string.catchment_sync_completion_rate_indicator, null, null))); From 1f9382d9ddb7365c37def1e8c211ed9278561cfe Mon Sep 17 00:00:00 2001 From: qaziabubakar-vd <qaziabubakar47@gmail.com> Date: Wed, 22 Jun 2022 16:28:29 +0500 Subject: [PATCH 2/5] tak completion rate --- .../main/java/org/smartregister/chw/reporting/ChwReport.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/reporting/ChwReport.java b/opensrp-chw/src/main/java/org/smartregister/chw/reporting/ChwReport.java index bc521f40e6..4ee6ebe558 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/reporting/ChwReport.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/reporting/ChwReport.java @@ -81,7 +81,8 @@ public static void showIndicatorVisualisations(ViewGroup mainLayout, List<Map<St public static void showSupervisorIndicatorVisualisations(ViewGroup mainLayout, List<Map<String, IndicatorTally>> indicatorTallies, Activity context) { // Sync completion rate ror entire catchment area - // + //supervisior + // sync completeion rate entire area PieChartSlice chartSlice1 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, COUNT_PROVIDER_SYNCED_COMPLETED, "Sync Completed", mainLayout.getContext().getResources().getColor(R.color.pie_chart_yes_green), indicatorTallies, COUNT_PROVIDER_SYNCED_COMPLETED); PieChartSlice chartSlice2 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, COUNT_PROVIDER_SYNCED_PENDING, "Sync Pending", mainLayout.getContext().getResources().getColor(R.color.pie_chart_no_red), indicatorTallies, COUNT_PROVIDER_SYNCED_PENDING); appendView(mainLayout, new PieChartIndicatorView(mainLayout.getContext(), ReportingUtil.getPieChartDisplayModel(ReportingUtil.addPieChartSlices(chartSlice1, chartSlice2), R.string.catchment_sync_completion_rate_indicator, null, null))); From 1f3d5f999666a9bf0435ea44b257863bba961738 Mon Sep 17 00:00:00 2001 From: qaziabubakar-vd <qaziabubakar47@gmail.com> Date: Wed, 22 Jun 2022 17:47:20 +0500 Subject: [PATCH 3/5] with chart task completion --- .../java/org/smartregister/chw/reporting/ChwReport.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/reporting/ChwReport.java b/opensrp-chw/src/main/java/org/smartregister/chw/reporting/ChwReport.java index 4ee6ebe558..6bae00cfc0 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/reporting/ChwReport.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/reporting/ChwReport.java @@ -3,6 +3,7 @@ import static org.smartregister.chw.util.ReportingConstants.SupervisorIndicatorKeys.COUNT_PROVIDER_SYNCED_COMPLETED; import static org.smartregister.chw.util.ReportingConstants.SupervisorIndicatorKeys.COUNT_PROVIDER_SYNCED_PENDING; + import android.app.Activity; import android.view.View; import android.view.ViewGroup; @@ -83,9 +84,13 @@ public static void showSupervisorIndicatorVisualisations(ViewGroup mainLayout, L // Sync completion rate ror entire catchment area //supervisior // sync completeion rate entire area - PieChartSlice chartSlice1 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, COUNT_PROVIDER_SYNCED_COMPLETED, "Sync Completed", mainLayout.getContext().getResources().getColor(R.color.pie_chart_yes_green), indicatorTallies, COUNT_PROVIDER_SYNCED_COMPLETED); + PieChartSlice chartSlice1 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, COUNT_PROVIDER_SYNCED_COMPLETED, "Sync Completed1", mainLayout.getContext().getResources().getColor(R.color.pie_chart_yes_green), indicatorTallies, COUNT_PROVIDER_SYNCED_COMPLETED); PieChartSlice chartSlice2 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, COUNT_PROVIDER_SYNCED_PENDING, "Sync Pending", mainLayout.getContext().getResources().getColor(R.color.pie_chart_no_red), indicatorTallies, COUNT_PROVIDER_SYNCED_PENDING); appendView(mainLayout, new PieChartIndicatorView(mainLayout.getContext(), ReportingUtil.getPieChartDisplayModel(ReportingUtil.addPieChartSlices(chartSlice1, chartSlice2), R.string.catchment_sync_completion_rate_indicator, null, null))); +// sync test + PieChartSlice chartSlice3 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, COUNT_PROVIDER_SYNCED_COMPLETED, "Sync Completed2", mainLayout.getContext().getResources().getColor(R.color.pie_chart_yes_green), indicatorTallies, COUNT_PROVIDER_SYNCED_COMPLETED); + PieChartSlice chartSlice4 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, COUNT_PROVIDER_SYNCED_COMPLETED, "Sync Pending", mainLayout.getContext().getResources().getColor(R.color.pie_chart_no_red), indicatorTallies, COUNT_PROVIDER_SYNCED_COMPLETED); + appendView(mainLayout, new PieChartIndicatorView(mainLayout.getContext(), ReportingUtil.getPieChartDisplayModel(ReportingUtil.addPieChartSlices(chartSlice3, chartSlice4), R.string.catchment_sync_completion_rate_indicator, null, null))); // Households with open tasks List<String> tableHeaderList = Arrays.asList("", "", ""); From b07cbe80aff927c923e66c966bc6ba0e2eb4813f Mon Sep 17 00:00:00 2001 From: qaziabubakar-vd <qaziabubakar47@gmail.com> Date: Wed, 22 Jun 2022 18:13:21 +0500 Subject: [PATCH 4/5] with quries --- ...pervisor-reporting-indicator-definitions.yml | 17 ++++++++++++++--- .../smartregister/chw/reporting/ChwReport.java | 6 ++++-- .../chw/util/ReportingConstants.java | 2 ++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/opensrp-chw/src/main/assets/config/supervisor-reporting-indicator-definitions.yml b/opensrp-chw/src/main/assets/config/supervisor-reporting-indicator-definitions.yml index acd4105d40..5f81229a6a 100644 --- a/opensrp-chw/src/main/assets/config/supervisor-reporting-indicator-definitions.yml +++ b/opensrp-chw/src/main/assets/config/supervisor-reporting-indicator-definitions.yml @@ -1,9 +1,20 @@ indicators: - - key: "supervisor_catchment_task_completion_rate" + - key: "supervisor_catchment_task_completion_rate" description: "Task Completion Rate for Entire Catchment Area" - indicatorQuery: "" + indicatorQuery: "SELECT count(DISTINCT ef.provider_id ) not_complete_task FROM schedule_service sc + INNER JOIN ec_family_member efm ON sc.base_entity_id= efm.base_entity_id COLLATE NOCASE + INNER JOIN ec_family ef ON efm.relational_id= ef.base_entity_id COLLATE NOCASE + AND sc.completion_date is NULL" - - key: "supervisor_synced_count" + - key: "supervisor_catchment_no_open_task_completion_rate" + description: "Task Completion Rate for Entire Catchment Area" + indicatorQuery: "SELECT (SELECT count(DISTINCT ef.provider_id) FROM ec_family ef)- + (SELECT count(DISTINCT ef.provider_id ) FROM schedule_service sc + INNER JOIN ec_family_member efm ON sc.base_entity_id= efm.base_entity_id COLLATE NOCASE + INNER JOIN ec_family ef ON efm.relational_id= ef.base_entity_id COLLATE NOCASE + AND sc.completion_date is NULL)count_chw_no_open_task" + + - key: "supervisor_synced_count" description: "Sync Completion Rate for Entire Catchment Area" indicatorQuery: "SELECT count(distinct json_extract(json, '$.providerId')) FROM event where syncStatus = 'Synced'" diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/reporting/ChwReport.java b/opensrp-chw/src/main/java/org/smartregister/chw/reporting/ChwReport.java index 6bae00cfc0..9a8942a05e 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/reporting/ChwReport.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/reporting/ChwReport.java @@ -2,6 +2,8 @@ import static org.smartregister.chw.util.ReportingConstants.SupervisorIndicatorKeys.COUNT_PROVIDER_SYNCED_COMPLETED; import static org.smartregister.chw.util.ReportingConstants.SupervisorIndicatorKeys.COUNT_PROVIDER_SYNCED_PENDING; +import static org.smartregister.chw.util.ReportingConstants.SupervisorIndicatorKeys.SUPERVISOR_CATCHMENT_NO_OPEN_TASK_COMPLETION_RATE; +import static org.smartregister.chw.util.ReportingConstants.SupervisorIndicatorKeys.SUPERVISOR_CATCHMENT_TASK_COMPLETION_RATE; import android.app.Activity; @@ -88,8 +90,8 @@ public static void showSupervisorIndicatorVisualisations(ViewGroup mainLayout, L PieChartSlice chartSlice2 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, COUNT_PROVIDER_SYNCED_PENDING, "Sync Pending", mainLayout.getContext().getResources().getColor(R.color.pie_chart_no_red), indicatorTallies, COUNT_PROVIDER_SYNCED_PENDING); appendView(mainLayout, new PieChartIndicatorView(mainLayout.getContext(), ReportingUtil.getPieChartDisplayModel(ReportingUtil.addPieChartSlices(chartSlice1, chartSlice2), R.string.catchment_sync_completion_rate_indicator, null, null))); // sync test - PieChartSlice chartSlice3 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, COUNT_PROVIDER_SYNCED_COMPLETED, "Sync Completed2", mainLayout.getContext().getResources().getColor(R.color.pie_chart_yes_green), indicatorTallies, COUNT_PROVIDER_SYNCED_COMPLETED); - PieChartSlice chartSlice4 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, COUNT_PROVIDER_SYNCED_COMPLETED, "Sync Pending", mainLayout.getContext().getResources().getColor(R.color.pie_chart_no_red), indicatorTallies, COUNT_PROVIDER_SYNCED_COMPLETED); + PieChartSlice chartSlice3 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, SUPERVISOR_CATCHMENT_TASK_COMPLETION_RATE, "Sync Completed2", mainLayout.getContext().getResources().getColor(R.color.pie_chart_yes_green), indicatorTallies, SUPERVISOR_CATCHMENT_TASK_COMPLETION_RATE); + PieChartSlice chartSlice4 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, SUPERVISOR_CATCHMENT_NO_OPEN_TASK_COMPLETION_RATE, "Sync Pending", mainLayout.getContext().getResources().getColor(R.color.pie_chart_no_red), indicatorTallies, SUPERVISOR_CATCHMENT_NO_OPEN_TASK_COMPLETION_RATE); appendView(mainLayout, new PieChartIndicatorView(mainLayout.getContext(), ReportingUtil.getPieChartDisplayModel(ReportingUtil.addPieChartSlices(chartSlice3, chartSlice4), R.string.catchment_sync_completion_rate_indicator, null, null))); // Households with open tasks diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/util/ReportingConstants.java b/opensrp-chw/src/main/java/org/smartregister/chw/util/ReportingConstants.java index e6dcb59f1c..5936879b30 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/util/ReportingConstants.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/util/ReportingConstants.java @@ -48,6 +48,8 @@ interface AncIndicatorKeys { } interface SupervisorIndicatorKeys { + String SUPERVISOR_CATCHMENT_TASK_COMPLETION_RATE="supervisor_catchment_task_completion_rate"; + String SUPERVISOR_CATCHMENT_NO_OPEN_TASK_COMPLETION_RATE="supervisor_catchment_no_open_task_completion_rate"; String COUNT_PROVIDER_SYNCED_COMPLETED = "supervisor_synced_count"; String COUNT_PROVIDER_SYNCED_PENDING = "supervisor_unsynced_count"; String SUPERVISOR_HOUSEHOLDS_WITH_OPEN_TASKS = "supervisor_households_with_open_tasks_for_month"; From 6bf66fe7bd3d711612e95ca5668ea8563882022c Mon Sep 17 00:00:00 2001 From: Qazi Abubakar <qma_2007@yahoo.com> Date: Thu, 23 Jun 2022 17:29:26 +0500 Subject: [PATCH 5/5] Integrated Pie Chart for sync completion rate --- ...ervisor-reporting-indicator-definitions.yml | 14 +++++++------- .../smartregister/chw/reporting/ChwReport.java | 18 +++++++++++------- .../chw/util/ReportingConstants.java | 4 ++-- opensrp-chw/src/main/res/values/strings.xml | 1 + 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/opensrp-chw/src/main/assets/config/supervisor-reporting-indicator-definitions.yml b/opensrp-chw/src/main/assets/config/supervisor-reporting-indicator-definitions.yml index 5f81229a6a..f956c3fffc 100644 --- a/opensrp-chw/src/main/assets/config/supervisor-reporting-indicator-definitions.yml +++ b/opensrp-chw/src/main/assets/config/supervisor-reporting-indicator-definitions.yml @@ -1,20 +1,20 @@ indicators: - - key: "supervisor_catchment_task_completion_rate" + - key: "chw_with_open_tasks" description: "Task Completion Rate for Entire Catchment Area" - indicatorQuery: "SELECT count(DISTINCT ef.provider_id ) not_complete_task FROM schedule_service sc + indicatorQuery: "SELECT count(DISTINCT ef.provider_id ) FROM schedule_service sc INNER JOIN ec_family_member efm ON sc.base_entity_id= efm.base_entity_id COLLATE NOCASE INNER JOIN ec_family ef ON efm.relational_id= ef.base_entity_id COLLATE NOCASE AND sc.completion_date is NULL" - - key: "supervisor_catchment_no_open_task_completion_rate" - description: "Task Completion Rate for Entire Catchment Area" - indicatorQuery: "SELECT (SELECT count(DISTINCT ef.provider_id) FROM ec_family ef)- + - key: "chw_with_no_open_tasks" + description: "Task Completion Rate for Entire Catchment Area" + indicatorQuery: "SELECT (SELECT count(DISTINCT ef.provider_id) FROM ec_family ef)- (SELECT count(DISTINCT ef.provider_id ) FROM schedule_service sc INNER JOIN ec_family_member efm ON sc.base_entity_id= efm.base_entity_id COLLATE NOCASE INNER JOIN ec_family ef ON efm.relational_id= ef.base_entity_id COLLATE NOCASE - AND sc.completion_date is NULL)count_chw_no_open_task" + AND sc.completion_date is NULL)" - - key: "supervisor_synced_count" + - key: "supervisor_synced_count" description: "Sync Completion Rate for Entire Catchment Area" indicatorQuery: "SELECT count(distinct json_extract(json, '$.providerId')) FROM event where syncStatus = 'Synced'" diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/reporting/ChwReport.java b/opensrp-chw/src/main/java/org/smartregister/chw/reporting/ChwReport.java index 9a8942a05e..1da7b73cb5 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/reporting/ChwReport.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/reporting/ChwReport.java @@ -1,10 +1,9 @@ package org.smartregister.chw.reporting; +import static org.smartregister.chw.util.ReportingConstants.SupervisorIndicatorKeys.CHW_WITH_NO_OPEN_TASKS; +import static org.smartregister.chw.util.ReportingConstants.SupervisorIndicatorKeys.CHW_WITH_OPEN_TASKS; import static org.smartregister.chw.util.ReportingConstants.SupervisorIndicatorKeys.COUNT_PROVIDER_SYNCED_COMPLETED; import static org.smartregister.chw.util.ReportingConstants.SupervisorIndicatorKeys.COUNT_PROVIDER_SYNCED_PENDING; -import static org.smartregister.chw.util.ReportingConstants.SupervisorIndicatorKeys.SUPERVISOR_CATCHMENT_NO_OPEN_TASK_COMPLETION_RATE; -import static org.smartregister.chw.util.ReportingConstants.SupervisorIndicatorKeys.SUPERVISOR_CATCHMENT_TASK_COMPLETION_RATE; - import android.app.Activity; import android.view.View; @@ -85,13 +84,18 @@ public static void showIndicatorVisualisations(ViewGroup mainLayout, List<Map<St public static void showSupervisorIndicatorVisualisations(ViewGroup mainLayout, List<Map<String, IndicatorTally>> indicatorTallies, Activity context) { // Sync completion rate ror entire catchment area //supervisior - // sync completeion rate entire area + /* // sync completeion rate entire area PieChartSlice chartSlice1 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, COUNT_PROVIDER_SYNCED_COMPLETED, "Sync Completed1", mainLayout.getContext().getResources().getColor(R.color.pie_chart_yes_green), indicatorTallies, COUNT_PROVIDER_SYNCED_COMPLETED); PieChartSlice chartSlice2 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, COUNT_PROVIDER_SYNCED_PENDING, "Sync Pending", mainLayout.getContext().getResources().getColor(R.color.pie_chart_no_red), indicatorTallies, COUNT_PROVIDER_SYNCED_PENDING); appendView(mainLayout, new PieChartIndicatorView(mainLayout.getContext(), ReportingUtil.getPieChartDisplayModel(ReportingUtil.addPieChartSlices(chartSlice1, chartSlice2), R.string.catchment_sync_completion_rate_indicator, null, null))); -// sync test - PieChartSlice chartSlice3 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, SUPERVISOR_CATCHMENT_TASK_COMPLETION_RATE, "Sync Completed2", mainLayout.getContext().getResources().getColor(R.color.pie_chart_yes_green), indicatorTallies, SUPERVISOR_CATCHMENT_TASK_COMPLETION_RATE); - PieChartSlice chartSlice4 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, SUPERVISOR_CATCHMENT_NO_OPEN_TASK_COMPLETION_RATE, "Sync Pending", mainLayout.getContext().getResources().getColor(R.color.pie_chart_no_red), indicatorTallies, SUPERVISOR_CATCHMENT_NO_OPEN_TASK_COMPLETION_RATE); + */ + // Sync completion rate ror entire catchment area + PieChartSlice chartSlice1 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, CHW_WITH_NO_OPEN_TASKS, "CHW with no open tasks", mainLayout.getContext().getResources().getColor(R.color.pie_chart_yes_green), indicatorTallies, CHW_WITH_NO_OPEN_TASKS); + PieChartSlice chartSlice2 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, CHW_WITH_OPEN_TASKS, "CHW with open tasks", mainLayout.getContext().getResources().getColor(R.color.pie_chart_no_red), indicatorTallies, CHW_WITH_OPEN_TASKS); + appendView(mainLayout, new PieChartIndicatorView(mainLayout.getContext(), ReportingUtil.getPieChartDisplayModel(ReportingUtil.addPieChartSlices(chartSlice1, chartSlice2), R.string.catchment_task_completion_rate_indicator, null, null))); + + PieChartSlice chartSlice3 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, COUNT_PROVIDER_SYNCED_COMPLETED, "Sync Completed1", mainLayout.getContext().getResources().getColor(R.color.pie_chart_yes_green), indicatorTallies, CHW_WITH_OPEN_TASKS); + PieChartSlice chartSlice4 = ReportingUtil.getPieChartSlice(ReportContract.IndicatorView.CountType.LATEST_COUNT, COUNT_PROVIDER_SYNCED_PENDING, "Sync Pending", mainLayout.getContext().getResources().getColor(R.color.pie_chart_no_red), indicatorTallies, CHW_WITH_NO_OPEN_TASKS); appendView(mainLayout, new PieChartIndicatorView(mainLayout.getContext(), ReportingUtil.getPieChartDisplayModel(ReportingUtil.addPieChartSlices(chartSlice3, chartSlice4), R.string.catchment_sync_completion_rate_indicator, null, null))); // Households with open tasks diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/util/ReportingConstants.java b/opensrp-chw/src/main/java/org/smartregister/chw/util/ReportingConstants.java index 5936879b30..79a06bdb85 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/util/ReportingConstants.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/util/ReportingConstants.java @@ -48,8 +48,8 @@ interface AncIndicatorKeys { } interface SupervisorIndicatorKeys { - String SUPERVISOR_CATCHMENT_TASK_COMPLETION_RATE="supervisor_catchment_task_completion_rate"; - String SUPERVISOR_CATCHMENT_NO_OPEN_TASK_COMPLETION_RATE="supervisor_catchment_no_open_task_completion_rate"; + String CHW_WITH_OPEN_TASKS = "chw_with_open_tasks"; + String CHW_WITH_NO_OPEN_TASKS = "chw_with_no_open_tasks"; String COUNT_PROVIDER_SYNCED_COMPLETED = "supervisor_synced_count"; String COUNT_PROVIDER_SYNCED_PENDING = "supervisor_unsynced_count"; String SUPERVISOR_HOUSEHOLDS_WITH_OPEN_TASKS = "supervisor_households_with_open_tasks_for_month"; diff --git a/opensrp-chw/src/main/res/values/strings.xml b/opensrp-chw/src/main/res/values/strings.xml index 29b0722674..7f283ac883 100644 --- a/opensrp-chw/src/main/res/values/strings.xml +++ b/opensrp-chw/src/main/res/values/strings.xml @@ -296,6 +296,7 @@ <!-- Supervisor indicator labels --> <string name="catchment_sync_completion_rate_indicator">Sync Completion Rate for Entire Catchment Area</string> + <string name="catchment_task_completion_rate_indicator">Task Completion Rate for Entire Catchment Area</string> <string name="households_with_open_tasks_indicator">Households with open tasks remaining for the month by CHW</string> <string name="incomplete_tasks_indicator">Tasks remaining incomplete for the month by CHW</string> <string name="last_sync_date_by_chw_indicator">Last sync by CHW</string>