From 022ef7ef6e21b8d5b5453b67839df52361900052 Mon Sep 17 00:00:00 2001 From: owais Date: Wed, 13 Jul 2022 13:37:10 +0500 Subject: [PATCH 1/2] bug fixes --- opensrp-chw/build.gradle | 2 +- .../rule/anc_member_registration_calculation.yml | 15 --------------- .../chw/application/ChwApplication.java | 4 ---- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/opensrp-chw/build.gradle b/opensrp-chw/build.gradle index 09a8c650d4..fe0906367c 100644 --- a/opensrp-chw/build.gradle +++ b/opensrp-chw/build.gradle @@ -304,7 +304,7 @@ dependencies { exclude group: 'com.rengwuxian.materialedittext', module: 'library' exclude group: 'org.smartregister', module: 'opensrp-client-native-form' } - implementation('org.smartregister:opensrp-client-native-form:2.1.13-SNAPSHOT@aar') { + implementation('org.smartregister:opensrp-client-native-form:2.1.14-SNAPSHOT@aar') { transitive = true exclude group: 'com.android.support', module: 'appcompat-v7' exclude group: 'com.android.support', module: 'cardview-v7' diff --git a/opensrp-chw/src/ba/assets/rule/anc_member_registration_calculation.yml b/opensrp-chw/src/ba/assets/rule/anc_member_registration_calculation.yml index ad416dd381..c55f5abc4d 100644 --- a/opensrp-chw/src/ba/assets/rule/anc_member_registration_calculation.yml +++ b/opensrp-chw/src/ba/assets/rule/anc_member_registration_calculation.yml @@ -14,14 +14,6 @@ condition: "true" actions: - "calculation = step1_gest_age + ' weeks'" ---- -name: step1_edd -description: Edd calculated -priority: 1 -condition: "true" -actions: - - "calculation = step1_last_menstrual_period != '' ? helper.addDuration(step1_last_menstrual_period,'280d') : ''" - --- name: step1_gravida description: gravida calculated @@ -29,13 +21,6 @@ priority: 1 condition: "true" actions: - "calculation = step1_no_prev_preg + 1" ---- -name: step1_last_menstrual_period -description: last_menstrual_period calculated -priority: 1 -condition: "true" -actions: - - "calculation = helper.subtractDuration(step1_edd,'280d')" --- name: step1_edd_note diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/application/ChwApplication.java b/opensrp-chw/src/main/java/org/smartregister/chw/application/ChwApplication.java index 73c203c49b..be81aa6e34 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/application/ChwApplication.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/application/ChwApplication.java @@ -261,10 +261,6 @@ private void initializeLibraries() { // set up processor FamilyLibrary.getInstance().setClientProcessorForJava(ChwClientProcessor.getInstance(getApplicationContext())); - // Set display date format for date pickers in native forms - Form form = new Form(); - form.setDatePickerDisplayFormat("dd MMM yyyy"); - NativeFormLibrary.getInstance().setClientFormDao(CoreLibrary.getInstance().context().getClientFormRepository()); } From 0f6e3241fa1b315c4ed418c14bd9853738ee83ed Mon Sep 17 00:00:00 2001 From: owais Date: Wed, 13 Jul 2022 15:12:32 +0500 Subject: [PATCH 2/2] revert date picker format --- .../org/smartregister/chw/application/ChwApplication.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/application/ChwApplication.java b/opensrp-chw/src/main/java/org/smartregister/chw/application/ChwApplication.java index be81aa6e34..73c203c49b 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/application/ChwApplication.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/application/ChwApplication.java @@ -261,6 +261,10 @@ private void initializeLibraries() { // set up processor FamilyLibrary.getInstance().setClientProcessorForJava(ChwClientProcessor.getInstance(getApplicationContext())); + // Set display date format for date pickers in native forms + Form form = new Form(); + form.setDatePickerDisplayFormat("dd MMM yyyy"); + NativeFormLibrary.getInstance().setClientFormDao(CoreLibrary.getInstance().context().getClientFormRepository()); }