From 47bf1db52450f263fbe214a87ae71c1ec0e7f75b Mon Sep 17 00:00:00 2001 From: Manu Tarus Date: Mon, 9 Dec 2019 12:44:52 +0300 Subject: [PATCH 01/20] upgrade Android Gradle plugin from the current version 3.5.2 to version 3.5.3 --- opensrp-chw-core/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opensrp-chw-core/build.gradle b/opensrp-chw-core/build.gradle index 94f33512d4..759dc3add4 100644 --- a/opensrp-chw-core/build.gradle +++ b/opensrp-chw-core/build.gradle @@ -10,7 +10,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.5.2' + classpath 'com.android.tools.build:gradle:3.5.3' classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2' } } From eb38b8ddd7d066cdf4a96a76d3be6c26f7c07464 Mon Sep 17 00:00:00 2001 From: Manu Tarus Date: Mon, 9 Dec 2019 12:50:20 +0300 Subject: [PATCH 02/20] upgrade gradle --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index ce21f1a958..43e12e5234 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { mavenLocal() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.2' + classpath 'com.android.tools.build:gradle:3.5.3' classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.5.0-x' classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.11.0" // NOTE: Do not place your application dependencies here; they belong From cce86114da00288c05adc8cfa6771d404632cbe7 Mon Sep 17 00:00:00 2001 From: Manu Tarus Date: Mon, 9 Dec 2019 12:59:52 +0300 Subject: [PATCH 03/20] add malaria follow up visit --- .../core/activity/CoreFamilyOtherMemberProfileActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/opensrp-chw-core/src/main/java/org/smartregister/chw/core/activity/CoreFamilyOtherMemberProfileActivity.java b/opensrp-chw-core/src/main/java/org/smartregister/chw/core/activity/CoreFamilyOtherMemberProfileActivity.java index 85e116e335..5ea03b32c0 100644 --- a/opensrp-chw-core/src/main/java/org/smartregister/chw/core/activity/CoreFamilyOtherMemberProfileActivity.java +++ b/opensrp-chw-core/src/main/java/org/smartregister/chw/core/activity/CoreFamilyOtherMemberProfileActivity.java @@ -143,6 +143,9 @@ public boolean onOptionsItemSelected(MenuItem item) { } else if (i == R.id.action_malaria_registration) { startMalariaRegister(); return true; + }else if (i == R.id.action_malaria_followup_visit) { + startMalariaFollowUpVisit(); + return true; } else if (i == R.id.action_registration) { startFormForEdit(R.string.edit_member_form_title); return true; @@ -164,6 +167,8 @@ public CoreFamilyOtherMemberActivityPresenter presenter() { protected abstract void startMalariaRegister(); + protected abstract void startMalariaFollowUpVisit(); + public void startFormForEdit(Integer title_resource) { CommonRepository commonRepository = Utils.context().commonrepository(Utils.metadata().familyMemberRegister.tableName); From cceac6cc36732c25d81ed04a5f5c4406cd9b70a6 Mon Sep 17 00:00:00 2001 From: Manu Tarus Date: Mon, 9 Dec 2019 13:02:44 +0300 Subject: [PATCH 04/20] update string values --- opensrp-chw-core/src/main/res/menu/other_member_menu.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opensrp-chw-core/src/main/res/menu/other_member_menu.xml b/opensrp-chw-core/src/main/res/menu/other_member_menu.xml index 8f9f895e82..6b39816957 100644 --- a/opensrp-chw-core/src/main/res/menu/other_member_menu.xml +++ b/opensrp-chw-core/src/main/res/menu/other_member_menu.xml @@ -16,7 +16,7 @@ Date: Mon, 9 Dec 2019 13:03:21 +0300 Subject: [PATCH 05/20] resolve string values --- opensrp-chw-core/src/main/res/menu/pnc_member_profile_menu.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opensrp-chw-core/src/main/res/menu/pnc_member_profile_menu.xml b/opensrp-chw-core/src/main/res/menu/pnc_member_profile_menu.xml index 467e24cb8a..93dd2563cc 100644 --- a/opensrp-chw-core/src/main/res/menu/pnc_member_profile_menu.xml +++ b/opensrp-chw-core/src/main/res/menu/pnc_member_profile_menu.xml @@ -22,7 +22,7 @@ From 6b2247a84bae49e844f86511dbc4903cfe04ad0c Mon Sep 17 00:00:00 2001 From: Manu Tarus Date: Mon, 9 Dec 2019 13:21:25 +0300 Subject: [PATCH 06/20] remove unused fp string --- opensrp-chw-core/src/main/res/values/strings.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/opensrp-chw-core/src/main/res/values/strings.xml b/opensrp-chw-core/src/main/res/values/strings.xml index e3b315968c..41cf52a4fe 100644 --- a/opensrp-chw-core/src/main/res/values/strings.xml +++ b/opensrp-chw-core/src/main/res/values/strings.xml @@ -125,7 +125,6 @@ Remove this person Registration info ANC Registration - FP initiation Malaria Confirmation Family planning registration Follow-up Visit From 84b4878137284606f012b2c56a1b8777071eaa8e Mon Sep 17 00:00:00 2001 From: Manu Tarus Date: Mon, 9 Dec 2019 13:25:05 +0300 Subject: [PATCH 07/20] add malaria follow up visit to drop down menu --- .../chw/hf/activity/FamilyOtherMemberProfileActivity.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sample/src/main/java/org/smartregister/chw/hf/activity/FamilyOtherMemberProfileActivity.java b/sample/src/main/java/org/smartregister/chw/hf/activity/FamilyOtherMemberProfileActivity.java index 0efeb5eb45..197d5b2468 100644 --- a/sample/src/main/java/org/smartregister/chw/hf/activity/FamilyOtherMemberProfileActivity.java +++ b/sample/src/main/java/org/smartregister/chw/hf/activity/FamilyOtherMemberProfileActivity.java @@ -55,7 +55,12 @@ protected void startFpRegister() { @Override protected void startMalariaRegister() { - //TODO implement start anc malaria for HF + //TODO implement start malaria register for HF + } + + @Override + protected void startMalariaFollowUpVisit() { + //TODO implement start malaria follow-up visit for HF } @Override From c93a8d135a6d0446bab862676849f66d4d547c29 Mon Sep 17 00:00:00 2001 From: Manu Tarus Date: Mon, 9 Dec 2019 13:25:49 +0300 Subject: [PATCH 08/20] update gradle plug version --- sample/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample/build.gradle b/sample/build.gradle index 7611e82887..dccc8ff907 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -10,7 +10,7 @@ buildscript { maven { url 'https://maven.fabric.io/public' } } dependencies { - classpath 'com.android.tools.build:gradle:3.5.2' + classpath 'com.android.tools.build:gradle:3.5.3' classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2' classpath 'io.fabric.tools:gradle:1.30.0' } From 5bd639de8ed480edf28e926e104f4e82982f5ce3 Mon Sep 17 00:00:00 2001 From: Manu Tarus Date: Mon, 9 Dec 2019 19:03:03 +0300 Subject: [PATCH 09/20] make method checking for malaria positive not nullable --- .../main/java/org/smartregister/chw/core/dao/MalariaDao.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/opensrp-chw-core/src/main/java/org/smartregister/chw/core/dao/MalariaDao.java b/opensrp-chw-core/src/main/java/org/smartregister/chw/core/dao/MalariaDao.java index 7f15a5909c..622ec527be 100644 --- a/opensrp-chw-core/src/main/java/org/smartregister/chw/core/dao/MalariaDao.java +++ b/opensrp-chw-core/src/main/java/org/smartregister/chw/core/dao/MalariaDao.java @@ -1,6 +1,5 @@ package org.smartregister.chw.core.dao; -import org.jetbrains.annotations.Nullable; import org.smartregister.chw.malaria.domain.MemberObject; import org.smartregister.dao.AbstractDao; @@ -9,7 +8,6 @@ public class MalariaDao extends AbstractDao { - @Nullable public static Date getMalariaTestDate(String baseEntityID) { String sql = "select malaria_test_date from ec_malaria_confirmation where base_entity_id = '" + baseEntityID + "'"; From 9fbc9e37cb158f9cb022d79fccc1552695b25196 Mon Sep 17 00:00:00 2001 From: Manu Tarus Date: Mon, 9 Dec 2019 19:03:53 +0300 Subject: [PATCH 10/20] make menu order of items correct --- .../src/main/res/menu/other_member_menu.xml | 2 ++ .../src/main/res/menu/pnc_member_profile_menu.xml | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/opensrp-chw-core/src/main/res/menu/other_member_menu.xml b/opensrp-chw-core/src/main/res/menu/other_member_menu.xml index 6b39816957..809aaa6989 100644 --- a/opensrp-chw-core/src/main/res/menu/other_member_menu.xml +++ b/opensrp-chw-core/src/main/res/menu/other_member_menu.xml @@ -23,11 +23,13 @@ android:id="@+id/action_malaria_registration" android:enabled="true" android:title="@string/malaria_registration" + android:visible="false" app:showAsAction="never" /> + From 149de5e4f134c175c7e76c4ff08eb04b97430706 Mon Sep 17 00:00:00 2001 From: Manu Tarus Date: Tue, 10 Dec 2019 11:51:04 +0300 Subject: [PATCH 11/20] update pnc member profile menu item order --- .../src/main/res/menu/pnc_member_profile_menu.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/opensrp-chw-core/src/main/res/menu/pnc_member_profile_menu.xml b/opensrp-chw-core/src/main/res/menu/pnc_member_profile_menu.xml index 133616e253..dd2da546d8 100644 --- a/opensrp-chw-core/src/main/res/menu/pnc_member_profile_menu.xml +++ b/opensrp-chw-core/src/main/res/menu/pnc_member_profile_menu.xml @@ -28,6 +28,13 @@ android:visible="false" app:showAsAction="never" /> + + - - \ No newline at end of file From a7dde3b9f7cdf67d9242efe0afe5910c313108cb Mon Sep 17 00:00:00 2001 From: Manu Tarus Date: Tue, 10 Dec 2019 12:48:20 +0300 Subject: [PATCH 12/20] use common ids for profile menu items --- .../chw/core/activity/CorePncMemberProfileActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opensrp-chw-core/src/main/java/org/smartregister/chw/core/activity/CorePncMemberProfileActivity.java b/opensrp-chw-core/src/main/java/org/smartregister/chw/core/activity/CorePncMemberProfileActivity.java index a20cc21c23..8ea31e0147 100644 --- a/opensrp-chw-core/src/main/java/org/smartregister/chw/core/activity/CorePncMemberProfileActivity.java +++ b/opensrp-chw-core/src/main/java/org/smartregister/chw/core/activity/CorePncMemberProfileActivity.java @@ -53,7 +53,7 @@ public boolean onOptionsItemSelected(MenuItem item) { } return true; - } else if (itemId == R.id.action_malaria_confirmation) { + } else if (itemId == R.id.action_malaria_registration) { startMalariaRegister(); return true; } else if (itemId == R.id.action_fp_initiation) { From 412e4bb72a667cc62f68a803c46028ca40c6ac98 Mon Sep 17 00:00:00 2001 From: Manu Tarus Date: Tue, 10 Dec 2019 12:48:35 +0300 Subject: [PATCH 13/20] use common ids for profile menu items --- opensrp-chw-core/src/main/res/menu/pnc_member_profile_menu.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opensrp-chw-core/src/main/res/menu/pnc_member_profile_menu.xml b/opensrp-chw-core/src/main/res/menu/pnc_member_profile_menu.xml index dd2da546d8..1ee34c10bc 100644 --- a/opensrp-chw-core/src/main/res/menu/pnc_member_profile_menu.xml +++ b/opensrp-chw-core/src/main/res/menu/pnc_member_profile_menu.xml @@ -22,7 +22,7 @@ app:showAsAction="never" /> Date: Tue, 10 Dec 2019 15:00:22 +0300 Subject: [PATCH 14/20] add action for malaria followup visit menu item --- .../chw/core/activity/CorePncMemberProfileActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/opensrp-chw-core/src/main/java/org/smartregister/chw/core/activity/CorePncMemberProfileActivity.java b/opensrp-chw-core/src/main/java/org/smartregister/chw/core/activity/CorePncMemberProfileActivity.java index 8ea31e0147..e2f774c948 100644 --- a/opensrp-chw-core/src/main/java/org/smartregister/chw/core/activity/CorePncMemberProfileActivity.java +++ b/opensrp-chw-core/src/main/java/org/smartregister/chw/core/activity/CorePncMemberProfileActivity.java @@ -56,6 +56,9 @@ public boolean onOptionsItemSelected(MenuItem item) { } else if (itemId == R.id.action_malaria_registration) { startMalariaRegister(); return true; + } else if (itemId == R.id.action_malaria_followup_visit) { + startMalariaFollowUpVisit(); + return true; } else if (itemId == R.id.action_fp_initiation) { startFpRegister(); return true; @@ -148,4 +151,6 @@ public void setFamilyStatus(AlertStatus status) { protected abstract void startMalariaRegister(); protected abstract void startFpRegister(); + + protected abstract void startMalariaFollowUpVisit(); } \ No newline at end of file From ce51c98574fa7a14ec195ed7349137ea8c8960a2 Mon Sep 17 00:00:00 2001 From: Manu Tarus Date: Tue, 10 Dec 2019 15:01:22 +0300 Subject: [PATCH 15/20] add function to implement for malaria followup visit menu item --- .../chw/hf/activity/PncMemberProfileActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sample/src/main/java/org/smartregister/chw/hf/activity/PncMemberProfileActivity.java b/sample/src/main/java/org/smartregister/chw/hf/activity/PncMemberProfileActivity.java index 87780ce1e8..eb37136f2d 100644 --- a/sample/src/main/java/org/smartregister/chw/hf/activity/PncMemberProfileActivity.java +++ b/sample/src/main/java/org/smartregister/chw/hf/activity/PncMemberProfileActivity.java @@ -204,6 +204,11 @@ protected Class getPncRegisterActivityClass() return PncRegisterActivity.class; } + @Override + protected void startMalariaFollowUpVisit() { +// TODO implement functionality to malaria home visit + } + public PncMemberProfileContract.Presenter pncMemberProfilePresenter() { if (pncMemberProfilePresenter == null) { pncMemberProfilePresenter = new PncMemberProfilePresenter(this, new PncMemberProfileInteractor(), memberObject); From 54e745f57a20518e5c6312248acf9d090a2e7c1d Mon Sep 17 00:00:00 2001 From: Manu Tarus Date: Tue, 10 Dec 2019 15:02:59 +0300 Subject: [PATCH 16/20] Bump up version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index c15bd98575..33e5737229 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=1.1.11-SNAPSHOT +VERSION_NAME=1.1.12-SNAPSHOT VERSION_CODE=1 GROUP=org.smartregister POM_SETTING_DESCRIPTION=OpenSRP Client Chw Core Library From 2901b9293dded8a029ccab5920587335077af21e Mon Sep 17 00:00:00 2001 From: Manu Tarus Date: Wed, 11 Dec 2019 10:06:53 +0300 Subject: [PATCH 17/20] update family planning menu items --- .../chw/core/activity/CorePncMemberProfileActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/opensrp-chw-core/src/main/java/org/smartregister/chw/core/activity/CorePncMemberProfileActivity.java b/opensrp-chw-core/src/main/java/org/smartregister/chw/core/activity/CorePncMemberProfileActivity.java index e2f774c948..ae55504603 100644 --- a/opensrp-chw-core/src/main/java/org/smartregister/chw/core/activity/CorePncMemberProfileActivity.java +++ b/opensrp-chw-core/src/main/java/org/smartregister/chw/core/activity/CorePncMemberProfileActivity.java @@ -62,6 +62,9 @@ public boolean onOptionsItemSelected(MenuItem item) { } else if (itemId == R.id.action_fp_initiation) { startFpRegister(); return true; + }else if (itemId == R.id.action_fp_change) { + startFpChangeMethod(); + return true; } else if (itemId == R.id.action__pnc_remove_member) { removePncMember(); return true; @@ -152,5 +155,7 @@ public void setFamilyStatus(AlertStatus status) { protected abstract void startFpRegister(); + protected abstract void startFpChangeMethod(); + protected abstract void startMalariaFollowUpVisit(); } \ No newline at end of file From d9288d581f6f6e5009513522b6c4d96f4e594ae6 Mon Sep 17 00:00:00 2001 From: Manu Tarus Date: Wed, 11 Dec 2019 10:10:19 +0300 Subject: [PATCH 18/20] add fp method change constants --- .../org/smartregister/chw/core/utils/CoreConstants.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/opensrp-chw-core/src/main/java/org/smartregister/chw/core/utils/CoreConstants.java b/opensrp-chw-core/src/main/java/org/smartregister/chw/core/utils/CoreConstants.java index c8e917dc9a..bcbf0cf02f 100644 --- a/opensrp-chw-core/src/main/java/org/smartregister/chw/core/utils/CoreConstants.java +++ b/opensrp-chw-core/src/main/java/org/smartregister/chw/core/utils/CoreConstants.java @@ -153,6 +153,7 @@ public static class JSON_FORM { private static final String ANC_REFERRAL_FORM = "anc_referral_form"; private static final String PNC_REFERRAL_FORM = "pnc_referral_form"; private static final String FAMILY_PLANNING_REGISTRATION_FORM = "family_planning_registration"; + private static final String FAMILY_PLANNING_CHANGE_METHOD_FORM = "family_planning_change_method"; public static AssetManager assetManager; public static Locale locale; @@ -232,10 +233,14 @@ public static String getMalariaConfirmation() { return Utils.getLocalForm(MALARIA_CONFIRMATION, locale, assetManager); } - public static String getFpRegistration() { + public static String getFpRegistrationForm() { return Utils.getLocalForm(FAMILY_PLANNING_REGISTRATION_FORM, locale, assetManager); } + public static String getFpChengeMethodForm() { + return Utils.getLocalForm(FAMILY_PLANNING_CHANGE_METHOD_FORM, locale, assetManager); + } + public static boolean isMultiPartForm(JSONObject jsonForm) { String encounterType = jsonForm.optString(ENCOUNTER_TYPE); return !encounterType.equals(MALARIA_FOLLOW_UP_VISIT); From b87d4bd53449e18dd1b742cdf7acdbae2ed037ac Mon Sep 17 00:00:00 2001 From: Manu Tarus Date: Wed, 11 Dec 2019 10:11:52 +0300 Subject: [PATCH 19/20] add change fp method to menu items --- opensrp-chw-core/src/main/res/menu/other_member_menu.xml | 8 ++++++++ .../src/main/res/menu/pnc_member_profile_menu.xml | 7 +++++++ opensrp-chw-core/src/main/res/values/strings.xml | 1 + 3 files changed, 16 insertions(+) diff --git a/opensrp-chw-core/src/main/res/menu/other_member_menu.xml b/opensrp-chw-core/src/main/res/menu/other_member_menu.xml index 809aaa6989..0f947833b7 100644 --- a/opensrp-chw-core/src/main/res/menu/other_member_menu.xml +++ b/opensrp-chw-core/src/main/res/menu/other_member_menu.xml @@ -19,6 +19,14 @@ android:title="@string/family_planning_initiation" android:visible="false" app:showAsAction="never" /> + + + + + Permanent (Vasectomy) Malaria follow-up FP initiation + FP method change Pregnancy confirmation PNC danger signs outcome ANC danger signs outcome From 41de013b6277bb642b977d4ad80e1ceb81bb5526 Mon Sep 17 00:00:00 2001 From: Manu Tarus Date: Wed, 11 Dec 2019 10:12:45 +0300 Subject: [PATCH 20/20] show/hide fp and malaria menu items on pnc profile --- .../chw/hf/activity/PncMemberProfileActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sample/src/main/java/org/smartregister/chw/hf/activity/PncMemberProfileActivity.java b/sample/src/main/java/org/smartregister/chw/hf/activity/PncMemberProfileActivity.java index eb37136f2d..52192bc8f3 100644 --- a/sample/src/main/java/org/smartregister/chw/hf/activity/PncMemberProfileActivity.java +++ b/sample/src/main/java/org/smartregister/chw/hf/activity/PncMemberProfileActivity.java @@ -70,6 +70,11 @@ protected void startFpRegister() { //TODO implement start FP register for HF } + @Override + protected void startFpChangeMethod() { + //TODO implement start FP change method for HF + } + public void setReferralTasks(Set taskList) { if (referralRecyclerView != null && taskList.size() > 0) { RecyclerView.Adapter mAdapter = new ReferralCardViewAdapter(taskList, this, memberObject, getFamilyHeadName(),