From 81f9f82e856e9baa6dba5904c6e1260566d8ecb5 Mon Sep 17 00:00:00 2001 From: Allan Date: Thu, 12 May 2022 15:41:53 +0300 Subject: [PATCH] :construction: Add preg outcome birth place question --- .../assets/json.form/anc_pregnancy_outcome.json | 16 ++++++++++++++++ .../rule/anc_pregnancy_outcome_relevance.yml | 8 ++++++++ .../resources/anc_pregnancy_outcome.properties | 1 + .../anc_pregnancy_outcome_fr.properties | 1 + 4 files changed, 26 insertions(+) diff --git a/opensrp-chw/src/crvs/assets/json.form/anc_pregnancy_outcome.json b/opensrp-chw/src/crvs/assets/json.form/anc_pregnancy_outcome.json index a4a21dfb45..7e6d770139 100644 --- a/opensrp-chw/src/crvs/assets/json.form/anc_pregnancy_outcome.json +++ b/opensrp-chw/src/crvs/assets/json.form/anc_pregnancy_outcome.json @@ -176,6 +176,22 @@ } } }, + { + "key": "birth_place_name", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "edit_text", + "hint": "{{anc_pregnancy_outcome.step1.birth_place_name.hint}}", + "edit_type": "name", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "anc_pregnancy_outcome_relevance.yml" + } + } + } + }, { "key": "baby_label", "type": "label", diff --git a/opensrp-chw/src/crvs/assets/rule/anc_pregnancy_outcome_relevance.yml b/opensrp-chw/src/crvs/assets/rule/anc_pregnancy_outcome_relevance.yml index 69436068ad..9645f69638 100644 --- a/opensrp-chw/src/crvs/assets/rule/anc_pregnancy_outcome_relevance.yml +++ b/opensrp-chw/src/crvs/assets/rule/anc_pregnancy_outcome_relevance.yml @@ -22,6 +22,14 @@ condition: "step1_preg_outcome == 'Live birth' || step1_preg_outcome == 'Stillbi actions: - "isRelevant = true" +--- +name: step1_birth_place_name +description: birth_place_name relevance +priority: 1 +condition: "step1_preg_outcome == 'Live birth' || step1_preg_outcome == 'Stillbirth'" +actions: + - "isRelevant = true" + --- name: step1_baby_label description: baby_label relevance diff --git a/opensrp-chw/src/crvs/resources/anc_pregnancy_outcome.properties b/opensrp-chw/src/crvs/resources/anc_pregnancy_outcome.properties index 22839dfcd7..7f232688e7 100644 --- a/opensrp-chw/src/crvs/resources/anc_pregnancy_outcome.properties +++ b/opensrp-chw/src/crvs/resources/anc_pregnancy_outcome.properties @@ -18,6 +18,7 @@ anc_pregnancy_outcome.step1.delivery_date.v_required.err = Please enter date the anc_pregnancy_outcome.step1.stillbirth_classification.values[0] = Intrapartum stillbirth (Fresh) anc_pregnancy_outcome.step1.delivery_place.values[2] = Other anc_pregnancy_outcome.step1.delivery_place.hint = Place of delivery +anc_pregnancy_outcome.step1.birth_place_name.hint = Name of birth place anc_pregnancy_outcome.step1.title = Pregnancy Outcome anc_pregnancy_outcome.step1.type_of_pregnancy.values[1] = Twin anc_pregnancy_outcome.step1.preg_outcome.values[3] = Other diff --git a/opensrp-chw/src/crvs/resources/anc_pregnancy_outcome_fr.properties b/opensrp-chw/src/crvs/resources/anc_pregnancy_outcome_fr.properties index f22a3158ff..d7cb0a401c 100644 --- a/opensrp-chw/src/crvs/resources/anc_pregnancy_outcome_fr.properties +++ b/opensrp-chw/src/crvs/resources/anc_pregnancy_outcome_fr.properties @@ -18,6 +18,7 @@ anc_pregnancy_outcome.step1.delivery_date.v_required.err = Entrez la date anc_pregnancy_outcome.step1.stillbirth_classification.values[0] = Mortinaissance intra-partum (fraîche) anc_pregnancy_outcome.step1.delivery_place.values[2] = Autre anc_pregnancy_outcome.step1.delivery_place.hint = Lieu d'accouchement +anc_pregnancy_outcome.step1.birth_place_name.hint = Nom du lieu de naissance anc_pregnancy_outcome.step1.title = Résultat de la grossesse anc_pregnancy_outcome.step1.type_of_pregnancy.values[1] = Jumeaux anc_pregnancy_outcome.step1.preg_outcome.values[3] = Autre